@softure-ai/theme-notion 0.15.0 → 0.16.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 +6 -0
- package/README.md +2 -1
- package/dist/notion/FoldRow.d.ts +5 -0
- package/dist/notion/FoldRow.d.ts.map +1 -1
- package/dist/notion/FoldRow.js +2 -2
- package/dist/notion/FoldRow.js.map +1 -1
- package/package.json +1 -1
- package/src/notion/FoldRow.tsx +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.16.0
|
|
8
|
+
|
|
9
|
+
- `FoldRow isOpenInitially`: renders the row open (`<details open>`), so a page can open the row its address points at (a
|
|
10
|
+
`?item=` link, a tab inside the row that lives in the address). Only the first render reads it; the native element
|
|
11
|
+
keeps its own state afterwards. New optional prop only.
|
|
12
|
+
|
|
7
13
|
## 0.15.0
|
|
8
14
|
|
|
9
15
|
- Form controls that line up: `FileInput`, a compact file picker for a form row (a button at the 28 px height of
|
package/README.md
CHANGED
|
@@ -186,7 +186,8 @@ so the content can be several tables or a list. `size="touch"` makes the summary
|
|
|
186
186
|
(44 px) instead of the row height, for a phone list. `actions` puts controls on the row's right (a delete button,
|
|
187
187
|
a menu), beside the `<details>` rather than inside its `<summary>`, so clicking one never folds the row; they show
|
|
188
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"`).
|
|
189
|
+
wrapper (`data-slot="fold-row-with-actions"`). `isOpenInitially` renders the row open (`<details open>`), for the row the
|
|
190
|
+
address points at; only the first render reads it, and the reader can still fold the row.
|
|
190
191
|
|
|
191
192
|
```tsx
|
|
192
193
|
<FoldRow title="Dentist" facts={["12.01.2027"]} badges={[]} detailsLabel="Visit details" details={rows} />
|
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
|
+
* Renders the row open (`<details open>`), for a row the address points at; the reader still folds it. Only the
|
|
43
|
+
* first render reads it: the native element keeps its own state afterwards.
|
|
44
|
+
*/
|
|
45
|
+
readonly isOpenInitially?: boolean;
|
|
41
46
|
/**
|
|
42
47
|
* Controls on the row's right, outside the summary, so clicking them never folds the row (a delete button, a
|
|
43
48
|
* menu). Shown whether the row is open or closed, centred on the summary's first line.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoldRow.d.ts","sourceRoot":"","sources":["../../src/notion/FoldRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAe,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CACtB;AAED,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAC3B;IACE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAA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Q,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;;;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
|
@@ -26,7 +26,7 @@ export function FoldRow(props) {
|
|
|
26
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
27
|
}
|
|
28
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] })] }));
|
|
29
|
+
const { isInset = false, isOpenInitially = false, size = "default", children, className } = props;
|
|
30
|
+
return (_jsxs("details", { "data-slot": "fold-row", open: isOpenInitially || undefined, 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] })] }));
|
|
31
31
|
}
|
|
32
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,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"FoldRow.js","sourceRoot":"","sources":["../../src/notion/FoldRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CA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AAC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/theme-notion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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",
|
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
|
+
* Renders the row open (`<details open>`), for a row the address points at; the reader still folds it. Only the
|
|
58
|
+
* first render reads it: the native element keeps its own state afterwards.
|
|
59
|
+
*/
|
|
60
|
+
readonly isOpenInitially?: boolean;
|
|
56
61
|
/**
|
|
57
62
|
* Controls on the row's right, outside the summary, so clicking them never folds the row (a delete button, a
|
|
58
63
|
* menu). Shown whether the row is open or closed, centred on the summary's first line.
|
|
@@ -138,9 +143,9 @@ export function FoldRow(props: FoldRowProps) {
|
|
|
138
143
|
}
|
|
139
144
|
|
|
140
145
|
function FoldRowDetails(props: FoldRowProps & { readonly className: string }) {
|
|
141
|
-
const { isInset = false, size = "default", children, className } = props;
|
|
146
|
+
const { isInset = false, isOpenInitially = false, size = "default", children, className } = props;
|
|
142
147
|
return (
|
|
143
|
-
<details data-slot="fold-row" className={cn("group/fold-row", className)}>
|
|
148
|
+
<details data-slot="fold-row" open={isOpenInitially || undefined} className={cn("group/fold-row", className)}>
|
|
144
149
|
<summary
|
|
145
150
|
data-slot="fold-row-summary"
|
|
146
151
|
className={cn(
|