@softure-ai/theme-notion 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +49 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/messages/en.d.ts +6 -0
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +1 -0
- package/dist/messages/en.js.map +1 -1
- package/dist/messages/index.d.ts +6 -0
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/notion/FileInput.d.ts +25 -0
- package/dist/notion/FileInput.d.ts.map +1 -0
- package/dist/notion/FileInput.js +35 -0
- package/dist/notion/FileInput.js.map +1 -0
- package/dist/notion/FoldRow.d.ts +5 -0
- package/dist/notion/FoldRow.d.ts.map +1 -1
- package/dist/notion/FoldRow.js +11 -3
- package/dist/notion/FoldRow.js.map +1 -1
- package/dist/notion/FormGrid.d.ts +8 -0
- package/dist/notion/FormGrid.d.ts.map +1 -0
- package/dist/notion/FormGrid.js +19 -0
- package/dist/notion/FormGrid.js.map +1 -0
- package/dist/notion/PropertyList.js +1 -1
- package/dist/notion/Timeline.js +1 -1
- package/dist/notion/palette.d.ts.map +1 -1
- package/dist/notion/tones.d.ts.map +1 -1
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/button-group.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/field.d.ts +1 -1
- package/dist/ui/input-group.d.ts +2 -2
- package/dist/ui/item.d.ts +3 -3
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/sonner.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -0
- package/src/messages/en.ts +1 -0
- package/src/notion/FileInput.tsx +118 -0
- package/src/notion/FoldRow.tsx +26 -2
- package/src/notion/FormGrid.tsx +46 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ Newest first. Each version lists what changed for an app that uses the theme. Wh
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done").
|
|
6
6
|
|
|
7
|
+
## 0.15.0
|
|
8
|
+
|
|
9
|
+
- Form controls that line up: `FileInput`, a compact file picker for a form row (a button at the 28 px height of
|
|
10
|
+
`Input` and the default `SelectTrigger`, the chosen file's name beside it, copy in `notionMessages.en.fileInput`
|
|
11
|
+
replaced through `messages`; the native input stays focusable and labelled by `FieldLabel htmlFor`), instead of the
|
|
12
|
+
browser's own English "Choose File" inside `Input type="file"`; and `FormGrid`, fields side by side (`columns` 1–3,
|
|
13
|
+
`rows` per field) whose label, control and hint share rows across the columns through CSS subgrid. The README states
|
|
14
|
+
the form rule: controls at their default size, all 28 px. New exports only.
|
|
15
|
+
|
|
16
|
+
## 0.14.0
|
|
17
|
+
|
|
18
|
+
- `FoldRow actions`: controls on the row's right (a delete button, a menu), rendered beside the `<details>` instead of
|
|
19
|
+
inside its `<summary>`, so clicking one never folds the row; shown open or closed, centred on the summary's first
|
|
20
|
+
line (row height, or the touch target at `size="touch"`). With `actions` the row is wrapped in
|
|
21
|
+
`data-slot="fold-row-with-actions"`, which carries the bottom border. New optional prop only.
|
|
22
|
+
|
|
7
23
|
## 0.13.0
|
|
8
24
|
|
|
9
25
|
- `AsidePanel` follow-ups (#1075): `AsidePanelToggle icon` (a `LucideIcon` drawn in both states, for a panel that
|
package/README.md
CHANGED
|
@@ -146,7 +146,9 @@ stages with a state, below), `Timeline` (dated entries on a vertical rail, below
|
|
|
146
146
|
`TopLoadingBar` (a thin bar at the top while a route loads on a wide screen, below),
|
|
147
147
|
`RouteLoading` (the launch screen or the top bar, picked by the browser, below),
|
|
148
148
|
`UploadField`, `UploadList` and `UploadItem` (pick or drop files, one row per file with progress, retry and remove,
|
|
149
|
-
below)
|
|
149
|
+
below),
|
|
150
|
+
`FileInput` (a compact file picker for a form row: a button and the chosen file's name, below),
|
|
151
|
+
`FormGrid` (fields side by side whose label, control and hint line up across columns, below).
|
|
150
152
|
|
|
151
153
|
**Touch sizes.** The controls a phone view taps most reach the `touch-target` token (44 px, Apple's HIG and WCAG
|
|
152
154
|
2.5.5): `Button` sizes `touch` (44 px high, padded like `lg`) and `icon-touch` (44 × 44), `SelectTrigger`
|
|
@@ -181,13 +183,17 @@ right; opened, it shows a `DetailTable` and its `children`. The opened content i
|
|
|
181
183
|
sets `data-inset` on the content, like `StatsFold`. A row with a summary of its own (icons, a status) passes `summary`,
|
|
182
184
|
drawn after the chevron in place of `title`, `facts` and `badges`; `details` and `detailsLabel` are optional together,
|
|
183
185
|
so the content can be several tables or a list. `size="touch"` makes the summary at least the `touch-target` height
|
|
184
|
-
(44 px) instead of the row height, for a phone list.
|
|
186
|
+
(44 px) instead of the row height, for a phone list. `actions` puts controls on the row's right (a delete button,
|
|
187
|
+
a menu), beside the `<details>` rather than inside its `<summary>`, so clicking one never folds the row; they show
|
|
188
|
+
whether the row is open or closed, centred on the summary's first line, and the row's bottom border moves to the
|
|
189
|
+
wrapper (`data-slot="fold-row-with-actions"`).
|
|
185
190
|
|
|
186
191
|
```tsx
|
|
187
192
|
<FoldRow title="Dentist" facts={["12.01.2027"]} badges={[]} detailsLabel="Visit details" details={rows} />
|
|
188
193
|
<FoldRow summary={<><Receipt aria-hidden="true" className="size-4" /> Invoice 12/2026 <Badge>Paid</Badge></>}>
|
|
189
194
|
<InvoiceLines />
|
|
190
195
|
</FoldRow>
|
|
196
|
+
<FoldRow title="clip.mp4" badges={[]} actions={<DeleteButton />} />
|
|
191
197
|
```
|
|
192
198
|
|
|
193
199
|
**`FilterChip`.** The filters above a list or a table, drawn the way a Notion database view draws them: a 24 px pill
|
|
@@ -545,6 +551,47 @@ name); `messages` replaces any of it.
|
|
|
545
551
|
</UploadList>
|
|
546
552
|
```
|
|
547
553
|
|
|
554
|
+
**`FileInput`.** The file picker of a form row, where `UploadField`'s dropping area is too large (one font, one
|
|
555
|
+
logo). A button at the height of `Input` and the default `SelectTrigger` (28 px) and, beside it, the chosen file's name
|
|
556
|
+
or "No file chosen", all in the app's words: `notionMessages.en.fileInput` (`choose`, `chooseMany` with `multiple`,
|
|
557
|
+
`none`, `count` for several files with `{count}`), replaced through `messages`. The native `<input type="file">` stays
|
|
558
|
+
in the page, visually hidden but focusable: `FieldLabel htmlFor` and the button open it, the keyboard reaches it (the
|
|
559
|
+
button draws its focus ring and its invalid border), and a test uploads to it. `accept`, `multiple`, `disabled`,
|
|
560
|
+
`name`, `aria-invalid` and `aria-describedby` reach the input; `onFilesSelected(files)` gets each pick and the input is
|
|
561
|
+
cleared, so picking the same file again is a change too. `fileName` shows the app's own name instead (e.g. the file
|
|
562
|
+
uploaded last; `null` for none).
|
|
563
|
+
|
|
564
|
+
```tsx
|
|
565
|
+
<Field>
|
|
566
|
+
<FieldLabel htmlFor="logo">Logo</FieldLabel>
|
|
567
|
+
<FileInput id="logo" accept=".svg,.png" fileName={logo?.name ?? null} onFilesSelected={([file]) => upload(file)} />
|
|
568
|
+
<FieldDescription>An SVG or a PNG.</FieldDescription>
|
|
569
|
+
</Field>
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
**`FormGrid`.** Fields side by side (`columns` 1, 2 or 3 from `md` up, one column below; 2 by default) whose parts
|
|
573
|
+
line up across the columns: each child `Field` spans `rows` rows of the grid (3 by default: label, control, hint) and a
|
|
574
|
+
vertical field lays its parts out on those shared rows (CSS subgrid), so a label or hint that wraps in one column
|
|
575
|
+
moves the whole row down together. A field with more parts passes more `rows`, or wraps the extra parts (an error, a
|
|
576
|
+
reset button) in one element; a horizontal field (a `Switch` with its label) keeps its own layout in the same area.
|
|
577
|
+
In a form, use the controls at their default size: `Input`, `SelectTrigger` and `FileInput` are all 28 px high
|
|
578
|
+
(`SelectTrigger size="sm"` is 24 px, for toolbars).
|
|
579
|
+
|
|
580
|
+
```tsx
|
|
581
|
+
<FormGrid>
|
|
582
|
+
<Field>
|
|
583
|
+
<FieldLabel htmlFor="font">Font</FieldLabel>
|
|
584
|
+
<Select>…</Select>
|
|
585
|
+
<FieldDescription>Picked from the uploaded fonts.</FieldDescription>
|
|
586
|
+
</Field>
|
|
587
|
+
<Field>
|
|
588
|
+
<FieldLabel htmlFor="weight">Weight</FieldLabel>
|
|
589
|
+
<Input id="weight" type="number" />
|
|
590
|
+
<FieldDescription>From 100 to 900.</FieldDescription>
|
|
591
|
+
</Field>
|
|
592
|
+
</FormGrid>
|
|
593
|
+
```
|
|
594
|
+
|
|
548
595
|
**`SortableList`.** A list whose rows are reordered by dragging, built on the headless `@dnd-kit/core` and
|
|
549
596
|
`@dnd-kit/sortable`. On a touch screen a long press (`holdDelay`, 500 ms) lifts a row; moving more than `tolerance`
|
|
550
597
|
(8 px) before that scrolls instead, and a tap still activates the row. A mouse drags the same way; from the keyboard
|
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export { SheetMenu, SheetMenuButton, SheetMenuItem, type SheetMenuButtonProps }
|
|
|
60
60
|
export { SidePanel, type SidePanelLayout, type SidePanelProps } from "./notion/SidePanel.js";
|
|
61
61
|
export { SortableActivator, SortableHandle, SortableItem, SortableList, type SortableActivatorProps, type SortableAnnouncements, type SortableDragBy, type SortableHandleProps, type SortableItemProps, type SortableListProps, type SortableMove, } from "./notion/Sortable.js";
|
|
62
62
|
export { StatCards, StatPills, StatsFold, type StatCard, type StatCardAside, type StatCardsProps, type StatPill, type StatPillsProps, type StatsFoldProps, } from "./notion/Stats.js";
|
|
63
|
+
export { FileInput, type FileInputMessages, type FileInputMessagesOverride, type FileInputProps } from "./notion/FileInput.js";
|
|
64
|
+
export { FormGrid, type FormGridColumns, type FormGridProps } from "./notion/FormGrid.js";
|
|
63
65
|
export { Status, type StatusProps } from "./notion/Status.js";
|
|
64
66
|
export { Steps, type StepItem, type StepState, type StepsLayout, type StepsProps } from "./notion/Steps.js";
|
|
65
67
|
export { TabBar, type TabBarItem, type TabBarProps } from "./notion/TabBar.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1E,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,yB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AiB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,8 @@ export { SheetMenu, SheetMenuButton, SheetMenuItem } from "./notion/SheetMenu.js
|
|
|
62
62
|
export { SidePanel } from "./notion/SidePanel.js";
|
|
63
63
|
export { SortableActivator, SortableHandle, SortableItem, SortableList, } from "./notion/Sortable.js";
|
|
64
64
|
export { StatCards, StatPills, StatsFold, } from "./notion/Stats.js";
|
|
65
|
+
export { FileInput } from "./notion/FileInput.js";
|
|
66
|
+
export { FormGrid } from "./notion/FormGrid.js";
|
|
65
67
|
export { Status } from "./notion/Status.js";
|
|
66
68
|
export { Steps } from "./notion/Steps.js";
|
|
67
69
|
export { TabBar } from "./notion/TabBar.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,oGAAoG;AACpG,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAE1E,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B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sB,CAAC;AAC9B,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,GAOV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAA+E,MAAM,uBAAuB,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAA4C,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAoB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAoE,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,MAAM,EAAqC,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAA0G,MAAM,sBAAsB,CAAC;AACxJ,OAAO,EAAE,aAAa,EAA2B,MAAM,2BAA2B,CAAC;AACnF,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,GAQX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAA0B,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC"}
|
package/dist/messages/en.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ export declare const en: {
|
|
|
17
17
|
readonly dialog: {
|
|
18
18
|
readonly close: "Close";
|
|
19
19
|
};
|
|
20
|
+
readonly fileInput: {
|
|
21
|
+
readonly choose: "Choose a file";
|
|
22
|
+
readonly chooseMany: "Choose files";
|
|
23
|
+
readonly none: "No file chosen";
|
|
24
|
+
readonly count: "{count} files";
|
|
25
|
+
};
|
|
20
26
|
readonly filterChip: {
|
|
21
27
|
readonly add: "Add filter";
|
|
22
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"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tB,MAAM,EAAE,QAAQ;iBAChB,IAAI,EAAE,MAAM;iBACZ,MAAM,EAAE,QAAQ;;aAElB,KAAK;iBAAI,IAAI,EAAE,MAAM;iBAAE,OAAO,EAAE,SAAS;iBAAE,IAAI,EAAE,OAAO;iBAAE,MAAM,EAAE,QAAQ;;aAC1E,OAAO;iBAAI,KAAK,EAAE,iBAAiB;iBAAE,WAAW,EAAE,gCAAgC;;CAC1E,CAAC"}
|
package/dist/messages/en.js
CHANGED
|
@@ -12,6 +12,7 @@ export const en = {
|
|
|
12
12
|
},
|
|
13
13
|
breadcrumb: { label: "breadcrumb", more: "More" },
|
|
14
14
|
dialog: { close: "Close" },
|
|
15
|
+
fileInput: { choose: "Choose a file", chooseMany: "Choose files", none: "No file chosen", count: "{count} files" },
|
|
15
16
|
filterChip: { add: "Add filter" },
|
|
16
17
|
sheet: { close: "Close" },
|
|
17
18
|
sidePanel: { close: "Close" },
|
package/dist/messages/en.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kBAAkB;QAC1B,WAAW,EAAE,kCAAkC;KAChD;IACD,UAAU,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;IACjD,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;IAC1B,UAAU,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE;IACjC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;IACzB,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;IAC7B,OAAO,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,8BAA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AW,EAAE,gCAAgC,EAAE;CAC5E,CAAC"}
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export declare const notionMessages: {
|
|
|
16
16
|
readonly dialog: {
|
|
17
17
|
readonly close: "Close";
|
|
18
18
|
};
|
|
19
|
+
readonly fileInput: {
|
|
20
|
+
readonly choose: "Choose a file";
|
|
21
|
+
readonly chooseMany: "Choose files";
|
|
22
|
+
readonly none: "No file chosen";
|
|
23
|
+
readonly count: "{count} files";
|
|
24
|
+
};
|
|
19
25
|
readonly filterChip: {
|
|
20
26
|
readonly add: "Add filter";
|
|
21
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qGAAqG;AACrG,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qGAAqG;AACrG,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAS,CAAC;AAErC,MAAM,MAAM,cAAc,GAAG,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
/** The texts of the file input; `{count}` stands for the number of files picked. Built-in English: `notionMessages.en.fileInput`. */
|
|
3
|
+
export interface FileInputMessages {
|
|
4
|
+
readonly choose: string;
|
|
5
|
+
readonly chooseMany: string;
|
|
6
|
+
readonly none: string;
|
|
7
|
+
readonly count: string;
|
|
8
|
+
}
|
|
9
|
+
/** The app's wording for the file input; each text left out keeps the built-in English one. */
|
|
10
|
+
export type FileInputMessagesOverride = Partial<FileInputMessages>;
|
|
11
|
+
export interface FileInputProps {
|
|
12
|
+
readonly id?: string;
|
|
13
|
+
readonly name?: string;
|
|
14
|
+
readonly accept?: string;
|
|
15
|
+
readonly multiple?: boolean;
|
|
16
|
+
readonly disabled?: boolean;
|
|
17
|
+
readonly fileName?: string | null;
|
|
18
|
+
readonly onFilesSelected: (files: File[]) => void;
|
|
19
|
+
readonly messages?: FileInputMessagesOverride;
|
|
20
|
+
readonly className?: string;
|
|
21
|
+
readonly "aria-invalid"?: ComponentProps<"input">["aria-invalid"];
|
|
22
|
+
readonly "aria-describedby"?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function FileInput({ id, name, accept, multiple, disabled, fileName, onFilesSelected, messages, className, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, }: FileInputProps): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=FileInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../src/notion/FileInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAQrE,qIAAqI;AACrI,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,+FAA+F;AAC/F,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEnE,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAG5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC;IAClE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAUD,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,QAAgB,EAChB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,SAAS,EACT,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,GACpC,EAAE,cAAc,+BAwDhB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Upload as UploadIcon } from "lucide-react";
|
|
4
|
+
import { useId, useRef, useState } from "react";
|
|
5
|
+
import { en } from "../messages/en.js";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
import { buttonVariants } from "../ui/button.js";
|
|
8
|
+
import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
|
|
9
|
+
/** What the input shows for a pick: the one file's name, or how many files. */
|
|
10
|
+
function describePick(files, words) {
|
|
11
|
+
return files.length === 1 ? files[0].name : words.count.replaceAll("{count}", String(files.length));
|
|
12
|
+
}
|
|
13
|
+
// A file picker for a form row: a button at the height of `Input` and `SelectTrigger` (28 px) and the chosen file's
|
|
14
|
+
// name beside it, in the app's language. The native input stays in the page, visually hidden: the field's label and
|
|
15
|
+
// the button open it, the keyboard focuses it (the button draws its focus ring), and it is what a test uploads to.
|
|
16
|
+
export function FileInput({ id, name, accept, multiple = false, disabled = false, fileName, onFilesSelected, messages, className, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, }) {
|
|
17
|
+
const words = { ...en.fileInput, ...messages };
|
|
18
|
+
const generatedId = useId();
|
|
19
|
+
const inputId = id ?? generatedId;
|
|
20
|
+
const nameId = `${inputId}-name`;
|
|
21
|
+
const inputRef = useRef(null);
|
|
22
|
+
const [picked, setPicked] = useState(null);
|
|
23
|
+
const shown = fileName === undefined ? picked : fileName;
|
|
24
|
+
return (_jsxs("div", { "data-slot": "file-input", "data-disabled": disabled || undefined, className: cn("flex h-7 min-w-0 items-center gap-2", className), children: [_jsx("input", { ref: inputRef, id: inputId, name: name, type: "file", accept: accept, multiple: multiple, disabled: disabled, "aria-invalid": ariaInvalid, "aria-describedby": [nameId, ariaDescribedBy].filter(Boolean).join(" "), className: "peer sr-only", onChange: (event) => {
|
|
25
|
+
// A change always carries a FileList; an empty one is a cancelled pick.
|
|
26
|
+
const files = Array.from(event.currentTarget.files);
|
|
27
|
+
event.currentTarget.value = "";
|
|
28
|
+
const [first, ...rest] = files;
|
|
29
|
+
if (first === undefined)
|
|
30
|
+
return;
|
|
31
|
+
setPicked(describePick([first, ...rest], words));
|
|
32
|
+
onFilesSelected(files);
|
|
33
|
+
} }), _jsxs("button", { type: "button", tabIndex: -1, "aria-hidden": "true", disabled: disabled, "data-slot": "file-input-button", onClick: () => inputRef.current?.click(), className: cn(buttonVariants({ variant: "outline" }), "select-none", "peer-focus-visible:border-ring peer-focus-visible:ring-2 peer-focus-visible:ring-ring", "peer-aria-invalid:border-destructive"), children: [_jsx(UploadIcon, { "aria-hidden": "true", strokeWidth: ICON_STROKE_WIDTH }), multiple ? words.chooseMany : words.choose] }), _jsx("span", { id: nameId, "data-slot": "file-input-name", title: shown ?? undefined, className: cn("min-w-0 truncate text-sm", shown === null ? "text-muted-foreground" : "text-foreground"), children: shown ?? words.none })] }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=FileInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/notion/FileInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAgCrD,+EAA+E;AAC/E,SAAS,YAAY,CAAC,KAAiC,EAAE,KAAwB;IAC/E,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,oHAAoH;AACpH,oHAAoH;AACpH,mHAAmH;AACnH,MAAM,UAAU,SAAS,CAAC,EACxB,EAAE,EACF,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,SAAS,EACT,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,GACpB;IACf,MAAM,KAAK,GAAsB,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,QAAQ,EAAE,CAAC;IAClE,MAAM,WAAW,GAAG,KAAK,EAAE,CAAC;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,EAGF,kBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,iBACA,MAAM,EAClB,QAAQ,EAAE,QAAQ,eACR,mBAAmB,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,EACxC,SAAS,EAAE,EAAE,CACX,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EACtC,aAAa,EACb,uFAAuF,EACvF,sCAAsC,CACvC,aAED,KAAC,UAAU,mBAAa,MAAM,EAAC,WAAW,EAAE,iBAAiB,GAAI,EAChE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IACpC,EACT,eAAM,EAAE,EAAE,MAAM,eAAY,iBAAiB,EAAC,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,iBAAiB,CAAC,YAC7K,KAAK,IAAI,KAAK,CAAC,IAAI,GACf,IACH,CACP,CAAC;AACJ,CAAC"}
|
package/dist/notion/FoldRow.d.ts
CHANGED
|
@@ -38,6 +38,11 @@ export type FoldRowProps = FoldRowSummaryProps & FoldRowDetailsProps & {
|
|
|
38
38
|
readonly size?: "default" | "touch";
|
|
39
39
|
/** More content under the table when opened. */
|
|
40
40
|
readonly children?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Controls on the row's right, outside the summary, so clicking them never folds the row (a delete button, a
|
|
43
|
+
* menu). Shown whether the row is open or closed, centred on the summary's first line.
|
|
44
|
+
*/
|
|
45
|
+
readonly actions?: ReactNode;
|
|
41
46
|
};
|
|
42
47
|
export declare function FoldRow(props: FoldRowProps): import("react").JSX.Element;
|
|
43
48
|
//# sourceMappingURL=FoldRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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M,MAAM,mBAAmB,GAC3B;IACE,2CAA2C;IAC3C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;CACxC,GACD;IACE,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAC5C,mBAAmB,GAAG;IACpB,+GAA+G;IAC/G,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,kGAAkG;IAClG,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B,CAAC;AA4DJ,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAiB1C"}
|
package/dist/notion/FoldRow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRight } from "lucide-react";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { Badge } from "../ui/badge.js";
|
|
@@ -18,7 +18,15 @@ function FoldRowChevron() {
|
|
|
18
18
|
}
|
|
19
19
|
// An item as one folding list row: a native `<details>` that opens in place to its details, with no client state.
|
|
20
20
|
export function FoldRow(props) {
|
|
21
|
-
const {
|
|
22
|
-
|
|
21
|
+
const { actions, size = "default" } = props;
|
|
22
|
+
if (actions === undefined || actions === null) {
|
|
23
|
+
return _jsx(FoldRowDetails, { ...props, className: "border-b border-border" });
|
|
24
|
+
}
|
|
25
|
+
// The actions sit beside the `<details>`, not in its `<summary>`: a control inside the summary would fold the row.
|
|
26
|
+
return (_jsxs("div", { "data-slot": "fold-row-with-actions", className: "flex items-start gap-1 border-b border-border", children: [_jsx(FoldRowDetails, { ...props, className: "min-w-0 flex-1" }), _jsx("div", { "data-slot": "fold-row-actions", className: cn("flex shrink-0 items-center gap-1", size === "touch" ? "min-h-touch-target" : "min-h-row-height"), children: actions })] }));
|
|
27
|
+
}
|
|
28
|
+
function FoldRowDetails(props) {
|
|
29
|
+
const { isInset = false, size = "default", children, className } = props;
|
|
30
|
+
return (_jsxs("details", { "data-slot": "fold-row", className: cn("group/fold-row", className), children: [_jsx("summary", { "data-slot": "fold-row-summary", className: cn("flex cursor-pointer list-none flex-wrap items-center gap-x-2 gap-y-1 rounded-md px-1 py-1 transition-colors duration-120 group-open/fold-row:bg-accent hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none [&::-webkit-details-marker]:hidden", size === "touch" ? "min-h-touch-target" : "min-h-row-height"), children: props.summary === undefined ? (_jsx(FoldRowFixedSummary, { title: props.title, facts: props.facts, badges: props.badges ?? [] })) : (_jsxs(_Fragment, { children: [_jsx(FoldRowChevron, {}), _jsx("span", { "data-slot": "fold-row-summary-slot", className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1", children: props.summary })] })) }), _jsxs("div", { "data-slot": "fold-row-content", "data-inset": isInset, className: isInset ? INSET_CONTENT_CLASS : CONTENT_CLASS, children: [props.details === undefined ? null : _jsx(DetailTable, { label: props.detailsLabel, rows: props.details }), children] })] }));
|
|
23
31
|
}
|
|
24
32
|
//# sourceMappingURL=FoldRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoldRow.js","sourceRoot":"","sources":["../../src/notion/FoldRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MA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AAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,aACtE,+BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACX,mRAAmR,EACnR,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,kBAAkB,CAC7D,YAEA,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAC7B,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,EAAE,GAAI,CAC5F,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,cAAc,KAAG,EAClB,4BACY,uBAAuB,EACjC,SAAS,EAAC,4DAA4D,YAErE,KAAK,CAAC,OAAO,GACT,IACN,CACJ,GACO,EACV,4BAAe,kBAAkB,gBAAa,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,aAAa,aAC5G,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,GAAI,EACpG,QAAQ,IACL,IACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export type FormGridColumns = 1 | 2 | 3;
|
|
3
|
+
export interface FormGridProps extends ComponentProps<"div"> {
|
|
4
|
+
readonly columns?: FormGridColumns;
|
|
5
|
+
readonly rows?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function FormGrid({ columns, rows, className, style, ...props }: FormGridProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=FormGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormGrid.d.ts","sourceRoot":"","sources":["../../src/notion/FormGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,OAAO,CAAC;AAI3D,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,KAAK,CAAC;IAE1D,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IAGnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAYD,wBAAgB,QAAQ,CAAC,EAAE,OAAW,EAAE,IAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAqB5F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
const COLUMNS = {
|
|
4
|
+
1: "grid-cols-1",
|
|
5
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
6
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
7
|
+
};
|
|
8
|
+
// Fields side by side whose label, control and hint line up across the columns: each child `Field` spans `rows` rows
|
|
9
|
+
// of the grid, and a vertical field lays its parts out on those shared rows (CSS subgrid), so a label that wraps in
|
|
10
|
+
// one column moves the controls of the whole row down together, and the shorter label sits on its control. A
|
|
11
|
+
// horizontal field (a switch with its label) keeps its own row layout inside the same area.
|
|
12
|
+
export function FormGrid({ columns = 2, rows = 3, className, style, ...props }) {
|
|
13
|
+
// A whole number of rows, at least one; anything else falls back to the default three.
|
|
14
|
+
const span = Number.isFinite(rows) ? Math.max(1, Math.trunc(rows)) : 3;
|
|
15
|
+
return (_jsx("div", { "data-slot": "form-grid", "data-columns": columns, style: { "--form-grid-rows": String(span), ...style }, className: cn("grid gap-x-6 gap-y-6", COLUMNS[columns], "*:data-[slot=field]:row-span-(--form-grid-rows)", "*:data-[slot=field]:data-[orientation=vertical]:grid *:data-[slot=field]:data-[orientation=vertical]:grid-rows-subgrid", "*:data-[slot=field]:data-[orientation=vertical]:*:m-0",
|
|
16
|
+
// A one-line label beside a two-line one sits on its control, as a label does in a single field.
|
|
17
|
+
"*:data-[slot=field]:data-[orientation=vertical]:*:first:self-end", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=FormGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormGrid.js","sourceRoot":"","sources":["../../src/notion/FormGrid.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAYrC,MAAM,OAAO,GAA8C;IACzD,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,4BAA4B;IAC/B,CAAC,EAAE,2CAA2C;CAC/C,CAAC;AAEF,qHAAqH;AACrH,oHAAoH;AACpH,6GAA6G;AAC7G,4FAA4F;AAC5F,MAAM,UAAU,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAiB;IAC3F,uFAAuF;IACvF,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,CACL,2BACY,WAAW,kBACP,OAAO,EACrB,KAAK,EAAE,EAAE,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,EAAmB,EACtE,SAAS,EAAE,EAAE,CACX,sBAAsB,EACtB,OAAO,CAAC,OAAO,CAAC,EAChB,iDAAiD,EACjD,wHAAwH,EACxH,uDAAuD;QACvD,iGAAiG;QACjG,kEAAkE,EAClE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Field, FieldGroup, FieldLabel } from "../ui/field.js";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
// Properties as in a Notion database page: a 160 px label with its type icon, then the value.
|
package/dist/notion/Timeline.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRight } from "lucide-react";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/notion/palette.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/notion/palette.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,YAAI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAEvH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tones.d.ts","sourceRoot":"","sources":["../../src/notion/tones.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjD,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"tones.d.ts","sourceRoot":"","sources":["../../src/notion/tones.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjD,eAAO,MAAM,KAAK,YAAI,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAEnF,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAG1C,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC,CAMnE,CAAC;AAKF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAMpD,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAMpD,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAMpD,CAAC"}
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "blue" | "brown" | "default" | "destructive" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "yellow" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
color?: "
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | "tag" | null | undefined;
|
|
5
|
+
color?: "blue" | "brown" | "default" | "gray" | "green" | "none" | "orange" | "pink" | "purple" | "red" | "yellow" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Badge({ className, variant, color, asChild, ...props }: Omit<React.ComponentProps<"span">, "color"> & VariantProps<typeof badgeVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { Separator } from "./separator.js";
|
|
3
3
|
declare const buttonGroupVariants: (props?: ({
|
|
4
|
-
orientation?: "
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
|
|
7
7
|
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "default" | "destructive" | "floating" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-touch" | "icon-xs" | "lg" | "sm" | "touch" | "xs" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
package/dist/ui/field.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare function FieldLegend({ className, variant, ...props }: React.ComponentPr
|
|
|
6
6
|
}): import("react").JSX.Element;
|
|
7
7
|
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
8
8
|
declare const fieldVariants: (props?: ({
|
|
9
|
-
orientation?: "
|
|
9
|
+
orientation?: "horizontal" | "responsive" | "vertical" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
|
|
12
12
|
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
package/dist/ui/input-group.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
5
|
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
-
align?: "
|
|
6
|
+
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
9
9
|
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
-
size?: "
|
|
10
|
+
size?: "icon-sm" | "icon-xs" | "sm" | "xs" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
|
|
13
13
|
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
package/dist/ui/item.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import { Separator } from "./separator.js";
|
|
|
4
4
|
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
5
|
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
6
6
|
declare const itemVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "
|
|
7
|
+
variant?: "default" | "muted" | "outline" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
}): React.JSX.Element;
|
|
13
13
|
declare const itemMediaVariants: (props?: ({
|
|
14
|
-
variant?: "default" | "
|
|
14
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
17
17
|
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/sidebar.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">
|
|
|
50
50
|
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
51
51
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
52
52
|
variant?: "default" | "outline" | null | undefined;
|
|
53
|
-
size?: "
|
|
53
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
54
54
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
55
55
|
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
56
56
|
asChild?: boolean;
|
package/dist/ui/sonner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/ui/sonner.tsx"],"names":[],"mappings":"AASA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAA;AAI7D,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/ui/sonner.tsx"],"names":[],"mappings":"AASA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAA;AAI7D,QAAA,MAAM,OAAO,wBAAoC,YAAY,gCAuB5D,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/theme-notion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "SOFTURE AI Notion theme: shadcn/ui components (new-york v4, Radix, Tailwind CSS v4, lucide) with the Notion design system's tokens and deltas, ready to import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@softure-ai/theme-kit": "^0.1.4",
|
|
65
65
|
"class-variance-authority": "^0.7.1",
|
|
66
66
|
"cmdk": "^1.1.1",
|
|
67
|
-
"lucide-react": "^1.
|
|
67
|
+
"lucide-react": "^1.70.0",
|
|
68
68
|
"radix-ui": "^1.8.1",
|
|
69
69
|
"sonner": "^2.0.8",
|
|
70
70
|
"tw-animate-css": "^1.4.0"
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"@axe-core/playwright": "^4.14.0",
|
|
79
79
|
"@fontsource/inter": "^5.3.0",
|
|
80
80
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
81
|
-
"@playwright/test": "^1.
|
|
81
|
+
"@playwright/test": "^1.64.1",
|
|
82
82
|
"@softure-ai/ui": "^0.3.4",
|
|
83
|
-
"zod": "^4.6.
|
|
83
|
+
"zod": "^4.6.7"
|
|
84
84
|
}
|
|
85
85
|
}
|
package/src/index.ts
CHANGED
|
@@ -98,6 +98,8 @@ export {
|
|
|
98
98
|
type StatPillsProps,
|
|
99
99
|
type StatsFoldProps,
|
|
100
100
|
} from "./notion/Stats.js";
|
|
101
|
+
export { FileInput, type FileInputMessages, type FileInputMessagesOverride, type FileInputProps } from "./notion/FileInput.js";
|
|
102
|
+
export { FormGrid, type FormGridColumns, type FormGridProps } from "./notion/FormGrid.js";
|
|
101
103
|
export { Status, type StatusProps } from "./notion/Status.js";
|
|
102
104
|
export { Steps, type StepItem, type StepState, type StepsLayout, type StepsProps } from "./notion/Steps.js";
|
|
103
105
|
export { TabBar, type TabBarItem, type TabBarProps } from "./notion/TabBar.js";
|
package/src/messages/en.ts
CHANGED
|
@@ -12,6 +12,7 @@ export const en = {
|
|
|
12
12
|
},
|
|
13
13
|
breadcrumb: { label: "breadcrumb", more: "More" },
|
|
14
14
|
dialog: { close: "Close" },
|
|
15
|
+
fileInput: { choose: "Choose a file", chooseMany: "Choose files", none: "No file chosen", count: "{count} files" },
|
|
15
16
|
filterChip: { add: "Add filter" },
|
|
16
17
|
sheet: { close: "Close" },
|
|
17
18
|
sidePanel: { close: "Close" },
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Upload as UploadIcon } from "lucide-react";
|
|
4
|
+
import { useId, useRef, useState, type ComponentProps } from "react";
|
|
5
|
+
|
|
6
|
+
import { en } from "../messages/en.js";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
import { buttonVariants } from "../ui/button.js";
|
|
9
|
+
|
|
10
|
+
import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
|
|
11
|
+
|
|
12
|
+
/** The texts of the file input; `{count}` stands for the number of files picked. Built-in English: `notionMessages.en.fileInput`. */
|
|
13
|
+
export interface FileInputMessages {
|
|
14
|
+
readonly choose: string;
|
|
15
|
+
readonly chooseMany: string;
|
|
16
|
+
readonly none: string;
|
|
17
|
+
readonly count: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The app's wording for the file input; each text left out keeps the built-in English one. */
|
|
21
|
+
export type FileInputMessagesOverride = Partial<FileInputMessages>;
|
|
22
|
+
|
|
23
|
+
export interface FileInputProps {
|
|
24
|
+
// The native input's id, for the field's `FieldLabel htmlFor`; generated when left out.
|
|
25
|
+
readonly id?: string;
|
|
26
|
+
readonly name?: string;
|
|
27
|
+
// Passed to the native file input: file types, several files.
|
|
28
|
+
readonly accept?: string;
|
|
29
|
+
readonly multiple?: boolean;
|
|
30
|
+
readonly disabled?: boolean;
|
|
31
|
+
// The name shown beside the button, e.g. the file uploaded last; `null` shows "No file chosen". Left out, the input
|
|
32
|
+
// shows the name of what was picked last.
|
|
33
|
+
readonly fileName?: string | null;
|
|
34
|
+
// The files picked; the input is cleared afterwards, so picking the same file again is a change too.
|
|
35
|
+
readonly onFilesSelected: (files: File[]) => void;
|
|
36
|
+
readonly messages?: FileInputMessagesOverride;
|
|
37
|
+
readonly className?: string;
|
|
38
|
+
readonly "aria-invalid"?: ComponentProps<"input">["aria-invalid"];
|
|
39
|
+
readonly "aria-describedby"?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** What the input shows for a pick: the one file's name, or how many files. */
|
|
43
|
+
function describePick(files: readonly [File, ...File[]], words: FileInputMessages): string {
|
|
44
|
+
return files.length === 1 ? files[0].name : words.count.replaceAll("{count}", String(files.length));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// A file picker for a form row: a button at the height of `Input` and `SelectTrigger` (28 px) and the chosen file's
|
|
48
|
+
// name beside it, in the app's language. The native input stays in the page, visually hidden: the field's label and
|
|
49
|
+
// the button open it, the keyboard focuses it (the button draws its focus ring), and it is what a test uploads to.
|
|
50
|
+
export function FileInput({
|
|
51
|
+
id,
|
|
52
|
+
name,
|
|
53
|
+
accept,
|
|
54
|
+
multiple = false,
|
|
55
|
+
disabled = false,
|
|
56
|
+
fileName,
|
|
57
|
+
onFilesSelected,
|
|
58
|
+
messages,
|
|
59
|
+
className,
|
|
60
|
+
"aria-invalid": ariaInvalid,
|
|
61
|
+
"aria-describedby": ariaDescribedBy,
|
|
62
|
+
}: FileInputProps) {
|
|
63
|
+
const words: FileInputMessages = { ...en.fileInput, ...messages };
|
|
64
|
+
const generatedId = useId();
|
|
65
|
+
const inputId = id ?? generatedId;
|
|
66
|
+
const nameId = `${inputId}-name`;
|
|
67
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
68
|
+
const [picked, setPicked] = useState<string | null>(null);
|
|
69
|
+
const shown = fileName === undefined ? picked : fileName;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div data-slot="file-input" data-disabled={disabled || undefined} className={cn("flex h-7 min-w-0 items-center gap-2", className)}>
|
|
73
|
+
<input
|
|
74
|
+
ref={inputRef}
|
|
75
|
+
id={inputId}
|
|
76
|
+
name={name}
|
|
77
|
+
type="file"
|
|
78
|
+
accept={accept}
|
|
79
|
+
multiple={multiple}
|
|
80
|
+
disabled={disabled}
|
|
81
|
+
aria-invalid={ariaInvalid}
|
|
82
|
+
aria-describedby={[nameId, ariaDescribedBy].filter(Boolean).join(" ")}
|
|
83
|
+
className="peer sr-only"
|
|
84
|
+
onChange={(event) => {
|
|
85
|
+
// A change always carries a FileList; an empty one is a cancelled pick.
|
|
86
|
+
const files = Array.from(event.currentTarget.files as FileList);
|
|
87
|
+
event.currentTarget.value = "";
|
|
88
|
+
const [first, ...rest] = files;
|
|
89
|
+
if (first === undefined) return;
|
|
90
|
+
setPicked(describePick([first, ...rest], words));
|
|
91
|
+
onFilesSelected(files);
|
|
92
|
+
}}
|
|
93
|
+
/>
|
|
94
|
+
{/* The visible button: the native input before it takes focus and keys, so this one is out of the tab order and
|
|
95
|
+
hidden from assistive technology; a click on it opens the picker. */}
|
|
96
|
+
<button
|
|
97
|
+
type="button"
|
|
98
|
+
tabIndex={-1}
|
|
99
|
+
aria-hidden="true"
|
|
100
|
+
disabled={disabled}
|
|
101
|
+
data-slot="file-input-button"
|
|
102
|
+
onClick={() => inputRef.current?.click()}
|
|
103
|
+
className={cn(
|
|
104
|
+
buttonVariants({ variant: "outline" }),
|
|
105
|
+
"select-none",
|
|
106
|
+
"peer-focus-visible:border-ring peer-focus-visible:ring-2 peer-focus-visible:ring-ring",
|
|
107
|
+
"peer-aria-invalid:border-destructive",
|
|
108
|
+
)}
|
|
109
|
+
>
|
|
110
|
+
<UploadIcon aria-hidden="true" strokeWidth={ICON_STROKE_WIDTH} />
|
|
111
|
+
{multiple ? words.chooseMany : words.choose}
|
|
112
|
+
</button>
|
|
113
|
+
<span id={nameId} data-slot="file-input-name" title={shown ?? undefined} className={cn("min-w-0 truncate text-sm", shown === null ? "text-muted-foreground" : "text-foreground")}>
|
|
114
|
+
{shown ?? words.none}
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
package/src/notion/FoldRow.tsx
CHANGED
|
@@ -53,6 +53,11 @@ export type FoldRowProps = FoldRowSummaryProps &
|
|
|
53
53
|
readonly size?: "default" | "touch";
|
|
54
54
|
/** More content under the table when opened. */
|
|
55
55
|
readonly children?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Controls on the row's right, outside the summary, so clicking them never folds the row (a delete button, a
|
|
58
|
+
* menu). Shown whether the row is open or closed, centred on the summary's first line.
|
|
59
|
+
*/
|
|
60
|
+
readonly actions?: ReactNode;
|
|
56
61
|
};
|
|
57
62
|
|
|
58
63
|
const CONTENT_CLASS = "flex flex-col gap-2 p-3 empty:hidden";
|
|
@@ -114,9 +119,28 @@ function FoldRowChevron() {
|
|
|
114
119
|
|
|
115
120
|
// An item as one folding list row: a native `<details>` that opens in place to its details, with no client state.
|
|
116
121
|
export function FoldRow(props: FoldRowProps) {
|
|
117
|
-
const {
|
|
122
|
+
const { actions, size = "default" } = props;
|
|
123
|
+
if (actions === undefined || actions === null) {
|
|
124
|
+
return <FoldRowDetails {...props} className="border-b border-border" />;
|
|
125
|
+
}
|
|
126
|
+
// The actions sit beside the `<details>`, not in its `<summary>`: a control inside the summary would fold the row.
|
|
118
127
|
return (
|
|
119
|
-
<
|
|
128
|
+
<div data-slot="fold-row-with-actions" className="flex items-start gap-1 border-b border-border">
|
|
129
|
+
<FoldRowDetails {...props} className="min-w-0 flex-1" />
|
|
130
|
+
<div
|
|
131
|
+
data-slot="fold-row-actions"
|
|
132
|
+
className={cn("flex shrink-0 items-center gap-1", size === "touch" ? "min-h-touch-target" : "min-h-row-height")}
|
|
133
|
+
>
|
|
134
|
+
{actions}
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function FoldRowDetails(props: FoldRowProps & { readonly className: string }) {
|
|
141
|
+
const { isInset = false, size = "default", children, className } = props;
|
|
142
|
+
return (
|
|
143
|
+
<details data-slot="fold-row" className={cn("group/fold-row", className)}>
|
|
120
144
|
<summary
|
|
121
145
|
data-slot="fold-row-summary"
|
|
122
146
|
className={cn(
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentProps, CSSProperties } from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
|
|
5
|
+
export type FormGridColumns = 1 | 2 | 3;
|
|
6
|
+
|
|
7
|
+
export interface FormGridProps extends ComponentProps<"div"> {
|
|
8
|
+
// Columns from `md` up (one column below); 2 by default.
|
|
9
|
+
readonly columns?: FormGridColumns;
|
|
10
|
+
// The rows each field takes: label, control and hint by default. A field with more parts (an error, a reset button)
|
|
11
|
+
// passes more, or wraps the extra parts in one element.
|
|
12
|
+
readonly rows?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const COLUMNS: Readonly<Record<FormGridColumns, string>> = {
|
|
16
|
+
1: "grid-cols-1",
|
|
17
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
18
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Fields side by side whose label, control and hint line up across the columns: each child `Field` spans `rows` rows
|
|
22
|
+
// of the grid, and a vertical field lays its parts out on those shared rows (CSS subgrid), so a label that wraps in
|
|
23
|
+
// one column moves the controls of the whole row down together, and the shorter label sits on its control. A
|
|
24
|
+
// horizontal field (a switch with its label) keeps its own row layout inside the same area.
|
|
25
|
+
export function FormGrid({ columns = 2, rows = 3, className, style, ...props }: FormGridProps) {
|
|
26
|
+
// A whole number of rows, at least one; anything else falls back to the default three.
|
|
27
|
+
const span = Number.isFinite(rows) ? Math.max(1, Math.trunc(rows)) : 3;
|
|
28
|
+
return (
|
|
29
|
+
<div
|
|
30
|
+
data-slot="form-grid"
|
|
31
|
+
data-columns={columns}
|
|
32
|
+
style={{ "--form-grid-rows": String(span), ...style } as CSSProperties}
|
|
33
|
+
className={cn(
|
|
34
|
+
"grid gap-x-6 gap-y-6",
|
|
35
|
+
COLUMNS[columns],
|
|
36
|
+
"*:data-[slot=field]:row-span-(--form-grid-rows)",
|
|
37
|
+
"*:data-[slot=field]:data-[orientation=vertical]:grid *:data-[slot=field]:data-[orientation=vertical]:grid-rows-subgrid",
|
|
38
|
+
"*:data-[slot=field]:data-[orientation=vertical]:*:m-0",
|
|
39
|
+
// A one-line label beside a two-line one sits on its control, as a label does in a single field.
|
|
40
|
+
"*:data-[slot=field]:data-[orientation=vertical]:*:first:self-end",
|
|
41
|
+
className,
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|