@softure-ai/theme-notion 0.13.0 → 0.14.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 +7 -0
- package/README.md +5 -1
- package/dist/messages/en.d.ts.map +1 -1
- 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/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/notion/FoldRow.tsx +26 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ 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.14.0
|
|
8
|
+
|
|
9
|
+
- `FoldRow actions`: controls on the row's right (a delete button, a menu), rendered beside the `<details>` instead of
|
|
10
|
+
inside its `<summary>`, so clicking one never folds the row; shown open or closed, centred on the summary's first
|
|
11
|
+
line (row height, or the touch target at `size="touch"`). With `actions` the row is wrapped in
|
|
12
|
+
`data-slot="fold-row-with-actions"`, which carries the bottom border. New optional prop only.
|
|
13
|
+
|
|
7
14
|
## 0.13.0
|
|
8
15
|
|
|
9
16
|
- `AsidePanel` follow-ups (#1075): `AsidePanelToggle icon` (a `LucideIcon` drawn in both states, for a panel that
|
package/README.md
CHANGED
|
@@ -181,13 +181,17 @@ right; opened, it shows a `DetailTable` and its `children`. The opened content i
|
|
|
181
181
|
sets `data-inset` on the content, like `StatsFold`. A row with a summary of its own (icons, a status) passes `summary`,
|
|
182
182
|
drawn after the chevron in place of `title`, `facts` and `badges`; `details` and `detailsLabel` are optional together,
|
|
183
183
|
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.
|
|
184
|
+
(44 px) instead of the row height, for a phone list. `actions` puts controls on the row's right (a delete button,
|
|
185
|
+
a menu), beside the `<details>` rather than inside its `<summary>`, so clicking one never folds the row; they show
|
|
186
|
+
whether the row is open or closed, centred on the summary's first line, and the row's bottom border moves to the
|
|
187
|
+
wrapper (`data-slot="fold-row-with-actions"`).
|
|
185
188
|
|
|
186
189
|
```tsx
|
|
187
190
|
<FoldRow title="Dentist" facts={["12.01.2027"]} badges={[]} detailsLabel="Visit details" details={rows} />
|
|
188
191
|
<FoldRow summary={<><Receipt aria-hidden="true" className="size-4" /> Invoice 12/2026 <Badge>Paid</Badge></>}>
|
|
189
192
|
<InvoiceLines />
|
|
190
193
|
</FoldRow>
|
|
194
|
+
<FoldRow title="clip.mp4" badges={[]} actions={<DeleteButton />} />
|
|
191
195
|
```
|
|
192
196
|
|
|
193
197
|
**`FilterChip`.** The filters above a list or a table, drawn the way a Notion database view draws them: a 24 px pill
|
|
@@ -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":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE;aACb,UAAU;iBACR,IAAI,EAAE,gBAAgB;iBACtB,IAAI,EAAE,gBAAgB;iBACtB,KAAK,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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":"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,EAAE,KAAK,CAAC;CAC1B,GACD;IACE,0FAA0F;IAC1F,QAAQ,CAAC,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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,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,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;AAsDpD,MAAM,aAAa,GAAG,sCAAsC,CAAC;AAC7D,MAAM,mBAAmB,GAAG,iDAAiD,CAAC;AAE9E,SAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,KAAK,GAAG,EAAE,EACV,MAAM,GAKP;IACC,OAAO,CACL,8BA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AAC,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,GAAI,EACpG,QAAQ,IACL,IACE,CACX,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.14.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/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(
|