Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6aed15d
add: preliminary keyboard nav support.
ItzNotABug Jul 14, 2025
e2eb987
update: use contextual logic.
ItzNotABug Jul 14, 2025
3bfe2c7
Merge branch 'feat-spreadsheet' into keyboard-nav-sheet
ItzNotABug Jul 14, 2025
7e2deae
fix: zIndex.
ItzNotABug Jul 14, 2025
3d145d4
ci: empty commit
ItzNotABug Jul 16, 2025
2acaff9
Merge branch 'feat-spreadsheet' into keyboard-nav-sheet
ItzNotABug Jul 16, 2025
ac94143
update: cell focus navigation.
ItzNotABug Jul 19, 2025
d7034e5
fix: first item not working on nav.
ItzNotABug Jul 19, 2025
f36ef60
Merge branch 'next' into keyboard-nav-sheet
ItzNotABug Jul 20, 2025
8892b0f
Merge branch 'feat-spreadsheet' into keyboard-nav-sheet
ItzNotABug Jul 28, 2025
ebaa13e
Merge branch 'feat-spreadsheet' into 'keyboard-nav-sheet'.
ItzNotABug Jul 29, 2025
3ea76a5
Merge remote-tracking branch 'origin/keyboard-nav-sheet' into keyboar…
ItzNotABug Jul 29, 2025
5913d0c
fix: add `portal` on tooltip; border/outline width for focused state.
ItzNotABug Jul 29, 2025
963d0b9
fix: random overflow and borders.
ItzNotABug Jul 29, 2025
cc69c76
fix: random overflow and borders.
ItzNotABug Jul 29, 2025
0a9015e
fix: misc.
ItzNotABug Jul 29, 2025
3d31cea
attempt: fix.
ItzNotABug Jul 29, 2025
0cc4af0
fix: overflown value text content.
ItzNotABug Jul 31, 2025
14c6853
Add Storybook build to main build process
TorstenDittmann Jul 31, 2025
99f5ea4
Merge branch 'next' of https://github.com/appwrite/pink into next
TorstenDittmann Jul 31, 2025
a209351
Fix build script command reference
TorstenDittmann Jul 31, 2025
fb7591b
fix: add text wrapping for long URLs and content
HarshMN2345 Jul 31, 2025
260eb79
Merge pull request #349 from appwrite/fix-SER-135-fix-function-logs-c…
ItzNotABug Aug 1, 2025
a7a43d6
Merge branch 'next' into 'keyboard-nav-sheet'.
ItzNotABug Aug 1, 2025
95dc1c9
fix: inconsistent border on non-resizable column.
ItzNotABug Aug 1, 2025
97e114e
fix: focused state.
ItzNotABug Aug 1, 2025
142a846
fix: keyboard nav & focus.
ItzNotABug Aug 4, 2025
18ed891
fix: values updates.
ItzNotABug Aug 4, 2025
a64ab34
fix:
ItzNotABug Aug 4, 2025
51326d1
fix: editor
ItzNotABug Aug 4, 2025
f4bae29
Merge remote-tracking branch 'origin/keyboard-nav-sheet' into keyboar…
ItzNotABug Aug 4, 2025
bfa834d
fix: outlines.
ItzNotABug Aug 4, 2025
1bc7cf7
fix: alignment.
ItzNotABug Aug 4, 2025
da8cd99
add: disabled row state.
ItzNotABug Aug 4, 2025
3b4734f
feat: virtual spreadsheet
TorstenDittmann Aug 4, 2025
a53ff9c
Merge branch 'keyboard-nav-sheet' into 'feat-virtual-spreadsheet'.
ItzNotABug Aug 5, 2025
4ac7e2f
update: full height.
ItzNotABug Aug 5, 2025
31a9048
address comments.
ItzNotABug Aug 5, 2025
fce7eac
update: misc cleanup.
ItzNotABug Aug 5, 2025
9da8171
fix: editing mode and focus issues.
ItzNotABug Aug 5, 2025
7ab8acd
fix: selector count.
ItzNotABug Aug 5, 2025
25a3ab9
update: empty cells.
ItzNotABug Aug 5, 2025
cf90d64
update: empty cells <> virtual lists.
ItzNotABug Aug 5, 2025
5f582f9
fix: cell navs, backwards compat.
ItzNotABug Aug 5, 2025
bc41d0c
update: rows.
ItzNotABug Aug 5, 2025
d303221
fix: revert size change.
ItzNotABug Aug 5, 2025
23c182d
fix: count.
ItzNotABug Aug 5, 2025
7f47803
lint.
ItzNotABug Aug 5, 2025
24930a2
revert: architect's fix
ItzNotABug Aug 5, 2025
c880f34
update: selected rows destruction fix.
ItzNotABug Aug 5, 2025
e6b154b
fix: dropdown cut-off.
ItzNotABug Aug 5, 2025
3f81097
Merge pull request #351 from appwrite/fix-selects
ItzNotABug Aug 5, 2025
0468c93
hotfix.
ItzNotABug Aug 5, 2025
753f9c0
another hotfix.
ItzNotABug Aug 5, 2025
950fa5e
fixes:
ItzNotABug Aug 7, 2025
0c51a94
fixes.
ItzNotABug Aug 8, 2025
b00fb9c
update: conditional paddings.
ItzNotABug Aug 8, 2025
0c30e2f
feat: delay to tooltips.
ItzNotABug Aug 8, 2025
363dcac
update: increase touch target for resize, misc.
ItzNotABug Aug 9, 2025
c0cdd91
feat: infinite scrolling.
ItzNotABug Aug 10, 2025
b4e47f3
feat: bidirectional scrolling.
ItzNotABug Aug 10, 2025
cad4411
update: loading time on demos, lint.
ItzNotABug Aug 10, 2025
da2ca90
fix: condition.
ItzNotABug Aug 11, 2025
206f46f
fix: scroll listener conditions.
ItzNotABug Aug 11, 2025
c1b4460
update: add scroll listener effectively.
ItzNotABug Aug 11, 2025
19eed0b
fix: add scroll listener logic not firing on console.
ItzNotABug Aug 11, 2025
182bbaa
update: comment.
ItzNotABug Aug 11, 2025
fd15f6e
update: reorder [no specific reason, just ocd things].
ItzNotABug Aug 11, 2025
828a552
feat: added badge as a argument to fieldset
HarshMN2345 Aug 11, 2025
d93a5e9
feat: used stack instead of css
HarshMN2345 Aug 11, 2025
b023951
fix: non-full pages issue, binding var support.
ItzNotABug Aug 11, 2025
3f2602a
comments.
ItzNotABug Aug 11, 2025
2a50f4b
Merge pull request #353 from appwrite/feat-add-badge-to-fieldset
ItzNotABug Aug 12, 2025
8675026
updates, fixes.
ItzNotABug Aug 12, 2025
c467db8
add: update method.
ItzNotABug Aug 12, 2025
10eee24
fix: target index scroll.
ItzNotABug Aug 13, 2025
698efda
update: hover state for resize.
ItzNotABug Aug 13, 2025
0fed23b
fix: colors.
ItzNotABug Aug 13, 2025
8076873
fix: drag and reordering the columns. my sanity has been restored 😮‍💨
ItzNotABug Aug 15, 2025
fe36900
fix: last column calculation.
ItzNotABug Aug 15, 2025
202a180
fix: column width calculations.
ItzNotABug Aug 16, 2025
8672d4d
update: improved edge case handling with only non action item.
ItzNotABug Aug 16, 2025
fcd953f
lint.
ItzNotABug Aug 16, 2025
558e460
optimize: sparse paging.
ItzNotABug Aug 16, 2025
85acd09
fix: remove debounce and load page on visibility.
ItzNotABug Aug 16, 2025
c165ec2
fix: width logic, again.
ItzNotABug Aug 16, 2025
e10aaa8
add: hover logic for sequence and checkbox.
ItzNotABug Aug 16, 2025
45189ad
update: only remove focus if hover mode is true.
ItzNotABug Aug 16, 2025
247af49
update: keyboard events, navigation, and bug fix with select showing …
ItzNotABug Aug 16, 2025
7a52c75
update: improved keyboard nav and enter trigger on action.
ItzNotABug Aug 16, 2025
9081fa8
fix: an edge case when Table is used inside a Dialog component.
ItzNotABug Aug 17, 2025
535121c
update: simplify fix for the width issue on dialogs.
ItzNotABug Aug 17, 2025
db071ac
add: end slot to textarea for console.
ItzNotABug Aug 17, 2025
34671e4
update: add `close` support to editor;
ItzNotABug Aug 18, 2025
7e90824
update: border color on hover.
ItzNotABug Aug 18, 2025
65f97c8
fix: hover on non-draggable columns and missing borders on select.
ItzNotABug Aug 18, 2025
6bf3dd0
add: tooltip support to bottom action.
ItzNotABug Aug 19, 2025
9f28c76
fix: border for select cells.
ItzNotABug Aug 19, 2025
09eb531
Merge branch 'next' into 'feat-virtual-spreadsheet'.
ItzNotABug Aug 19, 2025
0478e12
Merge pull request #350 from appwrite/feat-virtual-spreadsheet
ItzNotABug Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions v2/pink-sb/src/lib/Dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Icon from './Icon.svelte';
import Text from './typography/Text.svelte';
import { setContext } from 'svelte';
import { writable } from 'svelte/store';

export let title: string;
export let open = false;
Expand All @@ -14,7 +15,7 @@

setContext('dialog-group', true);

function handleBLur(event: MouseEvent) {
function handleBlur(event: MouseEvent) {
if (event.target === dialog) {
dialog.close();
}
Expand All @@ -36,7 +37,7 @@
}
</script>

<svelte:window on:mousedown={handleBLur} on:keydown={handleKeydown} />
<svelte:window on:mousedown={handleBlur} on:keydown={handleKeydown} />

<dialog bind:this={dialog} on:close={() => (open = false)}>
<section>
Expand All @@ -48,9 +49,11 @@
<Icon icon={IconX} />
</Button>
</Stack>
<Text variant="m-400" color="--fgcolor-neutral-secondary">
<slot />
</Text>
<div class="dialog-content">
<Text variant="m-400" color="--fgcolor-neutral-secondary">
<slot />
</Text>
</div>
</header>
<footer>
<slot name="footer">
Expand Down Expand Up @@ -107,6 +110,10 @@
border-bottom: var(--border-width-s) solid var(--border-neutral);
background: var(--bgcolor-neutral-primary);
padding-block-start: var(--space-7);

& .dialog-content {
width: 100%;
}
}
}

Expand Down
19 changes: 16 additions & 3 deletions v2/pink-sb/src/lib/Fieldset.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
<script lang="ts">
import Badge from './Badge.svelte';
import Stack from './layout/Stack.svelte';

export let legend: string;
export let badge: string | undefined = undefined;
export let badgeVariant: 'primary' | 'secondary' | 'accent' = 'secondary';
</script>

<fieldset>
<legend><span>{legend}</span></legend>
<legend>
<span>
<Stack inline direction="row" alignItems="center" gap="xxs">
<span class="legend-text">{legend}</span>
{#if badge}
<Badge content={badge} variant={badgeVariant} size="xs" />
{/if}
</Stack>
</span>
</legend>
<div class="content"><slot /></div>
</fieldset>

Expand All @@ -20,8 +34,7 @@
margin-left: var(--space-6, 12px);
}

span {
padding: 0 var(--space-2, 4px);
.legend-text {
font-family: var(--font-family-sansserif);
font-size: var(--font-size-xs, 12px);
font-style: normal;
Expand Down
13 changes: 10 additions & 3 deletions v2/pink-sb/src/lib/Logs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,28 @@
color: var(--fgcolor-neutral-primary);
font-family: var(--font-family-code), var(--mono-fallbacks);
font-size: var(--font-size-xs);
white-space: pre;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: break-word;
line-height: 140%;
letter-spacing: 0;
max-height: 600px;
width: 100%;
overflow-y: scroll;
overflow-x: hidden;
overflow-x: auto;
display: flex;
flex-direction: column;
padding: var(--space-6);
white-space: pre-line;
scroll-behavior: smooth;
height: var(--p-height);
min-height: 10px;

code {
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: break-word;
}

&.full-height {
min-height: 300px;
max-height: none;
Expand Down
6 changes: 5 additions & 1 deletion v2/pink-sb/src/lib/Popover.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { fade } from 'svelte/transition';
import { hasContext, tick } from 'svelte';
import { activePopover } from './context.js';
import type { Placement } from '@floating-ui/dom';
import { onMount, hasContext, setContext, tick } from 'svelte';
import { computePosition, autoUpdate, shift, offset, flip } from '@floating-ui/dom';

export let portal: boolean = false;
Expand Down Expand Up @@ -107,6 +107,10 @@
return { destroy: cleanup };
});
}

setContext('popover-group', true);

onMount(() => autoUpdate(referenceElement, tooltipElement, update));
</script>

<svelte:window on:click={onBlur} on:keydown={onKeyDown} on:resize={update} />
Expand Down
54 changes: 49 additions & 5 deletions v2/pink-sb/src/lib/Tooltip.svelte
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
<script lang="ts">
import { tick } from 'svelte';
import { tick, hasContext } from 'svelte';
import type { Placement } from '@floating-ui/dom';
import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';

export let portal: boolean = false;
export let placement: Placement | undefined = undefined;
export let padding: 'none' | 'm' = 'm';
export let offsetAmount: number = 6;
export let disabled = false;
export let maxWidth = '11.25rem';
export let delay: number = 0;

let show = false;
let showing = false;
const id = 'tooltip-' + Math.random().toString(36).substring(2, 9);
let referenceElement: HTMLSpanElement;
let delayTimeout: ReturnType<typeof setTimeout>;

let tooltipElement: HTMLDivElement;
let referenceElement: HTMLSpanElement;
const id = 'tooltip-' + Math.random().toString(36).substring(2, 9);

const inDialogGroup = hasContext('dialog-group');

async function showTooltip() {
await update();
showing = show = !disabled;
if (disabled) return;

if (delayTimeout) {
clearTimeout(delayTimeout);
}

if (delay > 0) {
delayTimeout = setTimeout(async () => {
await update();
showing = show = true;
}, delay);
} else {
await update();
showing = show = true;
}
}

function hideTooltip() {
if (delayTimeout) {
clearTimeout(delayTimeout);
}
show = false;
}

Expand All @@ -43,6 +65,27 @@
});
}

function portalPopover(node: HTMLElement) {
if (!portal && !inDialogGroup) return;

const target = !inDialogGroup
? document.body
: // can be inside a modal/dialog
document.body.querySelector<HTMLDialogElement>('dialog[open]');

if (target) {
target.appendChild(node);
}

return {
destroy() {
if (target && node.parentNode === target) {
target.removeChild(node);
}
}
};
}

function fadeSlide(_: Node, { y = 8, duration = 200 } = {}) {
return {
duration,
Expand Down Expand Up @@ -83,6 +126,7 @@
{id}
transition:fadeSlide
use:autoUpdateAction
use:portalPopover
on:transitionend={() => (showing = false)}
bind:this={tooltipElement}
aria-hidden={!show}
Expand Down
1 change: 1 addition & 0 deletions v2/pink-sb/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ export { default as InlineInput } from './lab/InlineInput.svelte';
export { default as Sonner } from './lab/Sonner.svelte';
export { default as Logs } from './Logs.svelte';
export { default as Spreadsheet } from './spreadsheet/index.js';
export * from './spreadsheet/index.js';
5 changes: 3 additions & 2 deletions v2/pink-sb/src/lib/input/Select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

const dispatch = createEventDispatcher();
const inDialogGroup = hasContext('dialog-group');
const inPopoverGroup = hasContext('popover-group');

const {
elements: { trigger, menu, option },
Expand All @@ -65,7 +66,7 @@
sameWidth: true
},
preventScroll: false,
portal: inDialogGroup ? 'dialog[open]' : null,
portal: inDialogGroup ? 'dialog[open]' : inPopoverGroup ? 'body' : null,
onSelectedChange(event) {
value = event.next?.value;
dispatch('change', value);
Expand All @@ -90,7 +91,7 @@
<button
{...$trigger}
use:trigger
class="input"
class="input selects"
class:disabled
class:readonly
class:placeholder={!selectedLabel}
Expand Down
1 change: 1 addition & 0 deletions v2/pink-sb/src/lib/input/Textarea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<Nullable bind:disabled bind:value />
{/if}
</Layout.Stack>
<slot name="end"></slot>
</div>
</Base>

Expand Down
4 changes: 4 additions & 0 deletions v2/pink-sb/src/lib/selector/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
checked = !checked;
}
}

export function blur() {
element.blur();
}
</script>

<Base {label} {id} {description}>
Expand Down
Loading
Loading