@kanzo-tech/ui 0.10.0 → 0.11.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.
Files changed (47) hide show
  1. package/dist/charts/chart-stat.d.ts +12 -10
  2. package/dist/charts/chart-stat.d.ts.map +1 -1
  3. package/dist/charts/chart-stat.js +21 -16
  4. package/dist/charts/chart-stat.js.map +1 -1
  5. package/dist/guard-corpus.d.ts.map +1 -1
  6. package/dist/index.d.ts +5 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +312 -295
  9. package/dist/index.js.map +1 -1
  10. package/dist/layouts/empty.d.ts +54 -0
  11. package/dist/layouts/empty.d.ts.map +1 -0
  12. package/dist/layouts/empty.js +99 -0
  13. package/dist/layouts/empty.js.map +1 -0
  14. package/dist/layouts/gated.d.ts +24 -0
  15. package/dist/layouts/gated.d.ts.map +1 -0
  16. package/dist/layouts/gated.js +46 -0
  17. package/dist/layouts/gated.js.map +1 -0
  18. package/dist/layouts/section.d.ts +30 -5
  19. package/dist/layouts/section.d.ts.map +1 -1
  20. package/dist/layouts/section.js +71 -53
  21. package/dist/layouts/section.js.map +1 -1
  22. package/dist/simples/field.d.ts +7 -1
  23. package/dist/simples/field.d.ts.map +1 -1
  24. package/dist/simples/field.js +55 -47
  25. package/dist/simples/field.js.map +1 -1
  26. package/dist/simples/floating-panel.js +1 -1
  27. package/dist/simples/floating-panel.js.map +1 -1
  28. package/dist/simples/stat.d.ts +45 -0
  29. package/dist/simples/stat.d.ts.map +1 -0
  30. package/dist/simples/stat.js +155 -0
  31. package/dist/simples/stat.js.map +1 -0
  32. package/dist/table/actions-column.d.ts +20 -0
  33. package/dist/table/actions-column.d.ts.map +1 -0
  34. package/dist/table/actions-column.js +38 -0
  35. package/dist/table/actions-column.js.map +1 -0
  36. package/dist/table/data-table-content.d.ts.map +1 -1
  37. package/dist/table/data-table-content.js +31 -20
  38. package/dist/table/data-table-content.js.map +1 -1
  39. package/dist/table.d.ts +2 -0
  40. package/dist/table.d.ts.map +1 -1
  41. package/dist/table.js +13 -11
  42. package/dist/table.js.map +1 -1
  43. package/package.json +5 -5
  44. package/dist/simples/stat-tile.d.ts +0 -31
  45. package/dist/simples/stat-tile.d.ts.map +0 -1
  46. package/dist/simples/stat-tile.js +0 -64
  47. package/dist/simples/stat-tile.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,54 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import { ComponentProps } from 'react';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ /** Fills the region it sits in and centres what it holds, on both axes. */
5
+ export declare function EmptyRoot({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
6
+ export declare namespace EmptyRoot {
7
+ var displayName: string;
8
+ }
9
+ /** Indicator, title and description as one block: a tighter gap than the root's, and a reading
10
+ * measure. Without it the root's `gap-6` would fall between the title and its own sentence. */
11
+ export declare function EmptyHeader({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
12
+ export declare namespace EmptyHeader {
13
+ var displayName: string;
14
+ }
15
+ declare const emptyIndicatorVariants: import('tailwind-variants').TVReturnType<{
16
+ variant: {
17
+ default: string;
18
+ icon: string;
19
+ };
20
+ }, undefined, "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
21
+ variant: {
22
+ default: string;
23
+ icon: string;
24
+ };
25
+ }, undefined, import('tailwind-variants').TVReturnType<{
26
+ variant: {
27
+ default: string;
28
+ icon: string;
29
+ };
30
+ }, undefined, "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
31
+ export interface EmptyIndicatorProps extends ComponentProps<typeof ark.div>, VariantProps<typeof emptyIndicatorVariants> {
32
+ }
33
+ /** The icon or image above the title. `icon` sets the glyph on a muted tile; `default` leaves an
34
+ * avatar or an illustration as it is. */
35
+ export declare function EmptyIndicator({ variant, className, slot, ...rest }: EmptyIndicatorProps): import("react").JSX.Element;
36
+ export declare namespace EmptyIndicator {
37
+ var displayName: string;
38
+ }
39
+ /** A `div` by default: only the call site knows the outline, so a heading is `asChild` onto one. */
40
+ export declare function EmptyTitle({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
41
+ export declare namespace EmptyTitle {
42
+ var displayName: string;
43
+ }
44
+ export declare function EmptyDescription({ className, slot, ...rest }: ComponentProps<typeof ark.p>): import("react").JSX.Element;
45
+ export declare namespace EmptyDescription {
46
+ var displayName: string;
47
+ }
48
+ /** What the reader can do about it — actions, a link, a search field. */
49
+ export declare function EmptyContent({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
50
+ export declare namespace EmptyContent {
51
+ var displayName: string;
52
+ }
53
+ export {};
54
+ //# sourceMappingURL=empty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/layouts/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAO1D,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAWrF;yBAXe,SAAS;;;AAczB;gGACgG;AAChG,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAQvF;yBARe,WAAW;;;AAW3B,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;0IAS1B,CAAC;AAEH,MAAM,WAAW,mBACf,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,EACpC,YAAY,CAAC,OAAO,sBAAsB,CAAC;CAAG;AAElD;0CAC0C;AAC1C,wBAAgB,cAAc,CAAC,EAAE,OAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BASpG;yBATe,cAAc;;;AAY9B,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAQtF;yBARe,UAAU;;;AAW1B,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,+BAW1F;yBAXe,gBAAgB;;;AAchC,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAWxF;yBAXe,YAAY"}
@@ -0,0 +1,99 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { ark as r } from "@ark-ui/react/factory";
3
+ import { tv as s } from "tailwind-variants";
4
+ import { cn as i } from "../lib/cn.js";
5
+ function o({ className: t, slot: e, ...a }) {
6
+ return /* @__PURE__ */ n(
7
+ r.div,
8
+ {
9
+ className: i(
10
+ "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
11
+ t
12
+ ),
13
+ ...a,
14
+ "data-slot": e ?? "empty"
15
+ }
16
+ );
17
+ }
18
+ o.displayName = "EmptyRoot";
19
+ function l({ className: t, slot: e, ...a }) {
20
+ return /* @__PURE__ */ n(
21
+ r.div,
22
+ {
23
+ className: i("flex max-w-sm flex-col items-center gap-2 text-center", t),
24
+ ...a,
25
+ "data-slot": e ?? "empty-header"
26
+ }
27
+ );
28
+ }
29
+ l.displayName = "EmptyHeader";
30
+ const d = s({
31
+ base: "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
32
+ variants: {
33
+ variant: {
34
+ default: "bg-transparent",
35
+ icon: "size-10 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
36
+ }
37
+ },
38
+ defaultVariants: { variant: "default" }
39
+ });
40
+ function p({ variant: t = "default", className: e, slot: a, ...m }) {
41
+ return /* @__PURE__ */ n(
42
+ r.div,
43
+ {
44
+ className: i(d({ variant: t }), e),
45
+ "data-variant": t,
46
+ ...m,
47
+ "data-slot": a ?? "empty-indicator"
48
+ }
49
+ );
50
+ }
51
+ p.displayName = "EmptyIndicator";
52
+ function c({ className: t, slot: e, ...a }) {
53
+ return /* @__PURE__ */ n(
54
+ r.div,
55
+ {
56
+ className: i("font-medium text-lg tracking-tight", t),
57
+ ...a,
58
+ "data-slot": e ?? "empty-title"
59
+ }
60
+ );
61
+ }
62
+ c.displayName = "EmptyTitle";
63
+ function f({ className: t, slot: e, ...a }) {
64
+ return /* @__PURE__ */ n(
65
+ r.p,
66
+ {
67
+ className: i(
68
+ "text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
69
+ t
70
+ ),
71
+ ...a,
72
+ "data-slot": e ?? "empty-description"
73
+ }
74
+ );
75
+ }
76
+ f.displayName = "EmptyDescription";
77
+ function u({ className: t, slot: e, ...a }) {
78
+ return /* @__PURE__ */ n(
79
+ r.div,
80
+ {
81
+ className: i(
82
+ "flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",
83
+ t
84
+ ),
85
+ ...a,
86
+ "data-slot": e ?? "empty-content"
87
+ }
88
+ );
89
+ }
90
+ u.displayName = "EmptyContent";
91
+ export {
92
+ u as EmptyContent,
93
+ f as EmptyDescription,
94
+ l as EmptyHeader,
95
+ p as EmptyIndicator,
96
+ o as EmptyRoot,
97
+ c as EmptyTitle
98
+ };
99
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.js","sources":["../../src/layouts/empty.tsx"],"sourcesContent":["import { ark } from \"@ark-ui/react/factory\";\nimport type { ComponentProps } from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn.js\";\n\n// The zero state of a region: shadcn v4's `Empty` anatomy, under Ark's part vocabulary. Ark ships\n// no empty-state machine, so every part is presentational and carries no role — it is not a list\n// item, and it was being built from `Item`, whose `role=\"listitem\"` said it was.\n\n/** Fills the region it sits in and centres what it holds, on both axes. */\nexport function EmptyRoot({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\n \"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12\",\n className,\n )}\n {...rest}\n data-slot={slot ?? \"empty\"}\n />\n );\n}\nEmptyRoot.displayName = \"EmptyRoot\";\n\n/** Indicator, title and description as one block: a tighter gap than the root's, and a reading\n * measure. Without it the root's `gap-6` would fall between the title and its own sentence. */\nexport function EmptyHeader({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"flex max-w-sm flex-col items-center gap-2 text-center\", className)}\n {...rest}\n data-slot={slot ?? \"empty-header\"}\n />\n );\n}\nEmptyHeader.displayName = \"EmptyHeader\";\n\nconst emptyIndicatorVariants = tv({\n base: \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"size-10 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: { variant: \"default\" },\n});\n\nexport interface EmptyIndicatorProps\n extends ComponentProps<typeof ark.div>,\n VariantProps<typeof emptyIndicatorVariants> {}\n\n/** The icon or image above the title. `icon` sets the glyph on a muted tile; `default` leaves an\n * avatar or an illustration as it is. */\nexport function EmptyIndicator({ variant = \"default\", className, slot, ...rest }: EmptyIndicatorProps) {\n return (\n <ark.div\n className={cn(emptyIndicatorVariants({ variant }), className)}\n data-variant={variant}\n {...rest}\n data-slot={slot ?? \"empty-indicator\"}\n />\n );\n}\nEmptyIndicator.displayName = \"EmptyIndicator\";\n\n/** A `div` by default: only the call site knows the outline, so a heading is `asChild` onto one. */\nexport function EmptyTitle({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"font-medium text-lg tracking-tight\", className)}\n {...rest}\n data-slot={slot ?? \"empty-title\"}\n />\n );\n}\nEmptyTitle.displayName = \"EmptyTitle\";\n\nexport function EmptyDescription({ className, slot, ...rest }: ComponentProps<typeof ark.p>) {\n return (\n <ark.p\n className={cn(\n \"text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n className,\n )}\n {...rest}\n data-slot={slot ?? \"empty-description\"}\n />\n );\n}\nEmptyDescription.displayName = \"EmptyDescription\";\n\n/** What the reader can do about it — actions, a link, a search field. */\nexport function EmptyContent({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\n \"flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm\",\n className,\n )}\n {...rest}\n data-slot={slot ?? \"empty-content\"}\n />\n );\n}\nEmptyContent.displayName = \"EmptyContent\";\n"],"names":["EmptyRoot","className","slot","rest","jsx","ark","cn","EmptyHeader","emptyIndicatorVariants","tv","EmptyIndicator","variant","EmptyTitle","EmptyDescription","EmptyContent"],"mappings":";;;;AAUO,SAASA,EAAU,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AACtF,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAF,EAAU,cAAc;AAIjB,SAASO,EAAY,EAAE,WAAAN,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AACxF,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC,EAAG,yDAAyDL,CAAS;AAAA,MAC/E,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAK,EAAY,cAAc;AAE1B,MAAMC,IAAyBC,EAAG;AAAA,EAChC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,iBAAiB,EAAE,SAAS,UAAA;AAC9B,CAAC;AAQM,SAASC,EAAe,EAAE,SAAAC,IAAU,WAAW,WAAAV,GAAW,MAAAC,GAAM,GAAGC,KAA6B;AACrG,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC,EAAGE,EAAuB,EAAE,SAAAG,EAAA,CAAS,GAAGV,CAAS;AAAA,MAC5D,gBAAcU;AAAA,MACb,GAAGR;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAQ,EAAe,cAAc;AAGtB,SAASE,EAAW,EAAE,WAAAX,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AACvF,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC,EAAG,sCAAsCL,CAAS;AAAA,MAC5D,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAU,EAAW,cAAc;AAElB,SAASC,EAAiB,EAAE,WAAAZ,GAAW,MAAAC,GAAM,GAAGC,KAAsC;AAC3F,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAW,EAAiB,cAAc;AAGxB,SAASC,EAAa,EAAE,WAAAb,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AACzF,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAY,EAAa,cAAc;"}
@@ -0,0 +1,24 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import { ComponentProps } from 'react';
3
+ import { Badge } from '../simples/badge.js';
4
+ import { FloatProps } from '../simples/float.js';
5
+ export declare function GatedRoot({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
6
+ export declare namespace GatedRoot {
7
+ var displayName: string;
8
+ }
9
+ /** Takes what it holds out of focus, pointer and the accessibility tree, and mutes it. `inert`
10
+ * already hit-tests as `pointer-events: none`, so the class is not repeated. */
11
+ export declare function GatedContent({ className, slot, ...rest }: ComponentProps<typeof ark.div>): import("react").JSX.Element;
12
+ export declare namespace GatedContent {
13
+ var displayName: string;
14
+ }
15
+ export interface GatedBadgeProps extends ComponentProps<typeof Badge> {
16
+ /** @default "top-end" */
17
+ placement?: FloatProps["placement"];
18
+ }
19
+ /** The reason, as a `Badge` pinned to a corner of the root. It is what describes the root. */
20
+ export declare function GatedBadge({ placement, slot, ...rest }: GatedBadgeProps): import("react").JSX.Element;
21
+ export declare namespace GatedBadge {
22
+ var displayName: string;
23
+ }
24
+ //# sourceMappingURL=gated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gated.d.ts","sourceRoot":"","sources":["../../src/layouts/gated.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAe7D,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAarF;yBAbe,SAAS;;;AAgBzB;iFACiF;AACjF,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BASxF;yBATe,YAAY;;;AAkB5B,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,OAAO,KAAK,CAAC;IACnE,yBAAyB;IACzB,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;CACrC;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,EAAE,SAAqB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAOnF;yBAPe,UAAU"}
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { ark as r } from "@ark-ui/react/factory";
4
+ import { useContext as s, useId as m, createContext as c } from "react";
5
+ import { cn as n } from "../lib/cn.js";
6
+ import { Badge as l } from "../simples/badge.js";
7
+ import { Float as p } from "../simples/float.js";
8
+ const i = c(void 0);
9
+ function u({ className: t, slot: e, ...a }) {
10
+ const d = m();
11
+ return /* @__PURE__ */ o(i.Provider, { value: d, children: /* @__PURE__ */ o(
12
+ r.div,
13
+ {
14
+ role: "group",
15
+ "aria-describedby": d,
16
+ className: n("relative", t),
17
+ ...a,
18
+ "data-slot": e ?? "gated"
19
+ }
20
+ ) });
21
+ }
22
+ u.displayName = "GatedRoot";
23
+ function f({ className: t, slot: e, ...a }) {
24
+ return /* @__PURE__ */ o(
25
+ r.div,
26
+ {
27
+ className: n("opacity-64", t),
28
+ inert: !0,
29
+ ...a,
30
+ "data-slot": e ?? "gated-content"
31
+ }
32
+ );
33
+ }
34
+ f.displayName = "GatedContent";
35
+ const g = "data-[placement^=top]:-top-2 data-[placement^=bottom]:-bottom-2 data-[placement$=start]:-start-2 data-[placement$=end]:-end-2";
36
+ function v({ placement: t = "top-end", slot: e, ...a }) {
37
+ const d = s(i);
38
+ return /* @__PURE__ */ o(p, { className: g, placement: t, children: /* @__PURE__ */ o(l, { id: d, size: "xs", variant: "secondary", ...a, slot: e ?? "gated-badge" }) });
39
+ }
40
+ v.displayName = "GatedBadge";
41
+ export {
42
+ v as GatedBadge,
43
+ f as GatedContent,
44
+ u as GatedRoot
45
+ };
46
+ //# sourceMappingURL=gated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gated.js","sources":["../../src/layouts/gated.tsx"],"sourcesContent":["\"use client\";\n\nimport { ark } from \"@ark-ui/react/factory\";\nimport { createContext, useContext, useId, type ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.js\";\nimport { Badge } from \"../simples/badge.js\";\nimport { Float, type FloatProps } from \"../simples/float.js\";\n\n// A region shown but not yet usable. Ark ships nothing for it, so the ARIA contract is ours:\n//\n// - `GatedContent` is `inert`. Per HTML, inert content is unfocusable, is hit-tested as if it had\n// `pointer-events: none`, and is withheld from the accessibility tree — it is NOT readable to a\n// screen reader, which is what `aria-hidden` would have done too.\n// - So `GatedBadge` is the only readable part: plain text, outside the inert subtree, in reading\n// order after the content it replaces.\n// - `GatedRoot` is `role=\"group\"`, described by the badge. Name it with `aria-label` after the\n// feature — the visible title is inside the inert subtree and cannot name anything — and a\n// screen reader announces \"Scheduled runs, group, Coming soon\" where the region was.\n\nconst GatedContext = createContext<string | undefined>(undefined);\n\nexport function GatedRoot({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n const id = useId();\n return (\n <GatedContext.Provider value={id}>\n <ark.div\n role=\"group\"\n aria-describedby={id}\n className={cn(\"relative\", className)}\n {...rest}\n data-slot={slot ?? \"gated\"}\n />\n </GatedContext.Provider>\n );\n}\nGatedRoot.displayName = \"GatedRoot\";\n\n/** Takes what it holds out of focus, pointer and the accessibility tree, and mutes it. `inert`\n * already hit-tests as `pointer-events: none`, so the class is not repeated. */\nexport function GatedContent({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"opacity-64\", className)}\n inert\n {...rest}\n data-slot={slot ?? \"gated-content\"}\n />\n );\n}\nGatedContent.displayName = \"GatedContent\";\n\n// Straddles the edge it is pinned to by half an `xs` badge, read off `Float`'s own\n// `data-placement`. It overhangs the root, so leave room with MARGIN on the root: padding would move\n// the content and leave the badge where it was.\nconst straddle =\n \"data-[placement^=top]:-top-2 data-[placement^=bottom]:-bottom-2 data-[placement$=start]:-start-2 data-[placement$=end]:-end-2\";\n\nexport interface GatedBadgeProps extends ComponentProps<typeof Badge> {\n /** @default \"top-end\" */\n placement?: FloatProps[\"placement\"];\n}\n\n/** The reason, as a `Badge` pinned to a corner of the root. It is what describes the root. */\nexport function GatedBadge({ placement = \"top-end\", slot, ...rest }: GatedBadgeProps) {\n const id = useContext(GatedContext);\n return (\n <Float className={straddle} placement={placement}>\n <Badge id={id} size=\"xs\" variant=\"secondary\" {...rest} slot={slot ?? \"gated-badge\"} />\n </Float>\n );\n}\nGatedBadge.displayName = \"GatedBadge\";\n"],"names":["GatedRoot","GatedContent","GatedBadge"],"mappings":";;;;;;;AAmBA;AAEO;AACL;AACA;AAEI;AAAK;AAAJ;AACM;AACa;AACiB;AAC/B;AACe;AAAA;AAI3B;AACAA;AAIO;AACL;AACE;AAAK;AAAJ;AACsC;AAChC;AACD;AACe;AAAA;AAGzB;AACAC;AAKA;AASO;AACL;AACA;AAKF;AACAC;;;;;;"}
@@ -21,10 +21,35 @@ import { VariantProps } from 'tailwind-variants';
21
21
  * Parts are FLAT exports. Statics are lost when a module becomes a client reference under RSC,
22
22
  * so `Section.Header` would read back as `undefined` — a bug we hit for real with `Preferences`.
23
23
  */
24
- export declare const sectionVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex min-h-0 flex-1 flex-col", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex min-h-0 flex-1 flex-col", unknown, unknown, undefined>>;
24
+ export declare const sectionVariants: import('tailwind-variants').TVReturnType<{
25
+ /** `true` fills the region it sits in and scrolls its body — one section per region.
26
+ * `false` takes its content's height, so several stack in one scrolling pane: the body
27
+ * reads it off `data-fill` and stops scrolling on its own. */
28
+ fill: {
29
+ true: string;
30
+ false: string;
31
+ };
32
+ }, undefined, "group/section flex min-h-0 flex-col", {
33
+ /** `true` fills the region it sits in and scrolls its body — one section per region.
34
+ * `false` takes its content's height, so several stack in one scrolling pane: the body
35
+ * reads it off `data-fill` and stops scrolling on its own. */
36
+ fill: {
37
+ true: string;
38
+ false: string;
39
+ };
40
+ }, undefined, import('tailwind-variants').TVReturnType<{
41
+ /** `true` fills the region it sits in and scrolls its body — one section per region.
42
+ * `false` takes its content's height, so several stack in one scrolling pane: the body
43
+ * reads it off `data-fill` and stops scrolling on its own. */
44
+ fill: {
45
+ true: string;
46
+ false: string;
47
+ };
48
+ }, undefined, "group/section flex min-h-0 flex-col", unknown, unknown, undefined>>;
25
49
  /** The container. Presentational — the scale lives on the parts that render text. */
26
- export type SectionRootProps = ComponentProps<typeof ark.div>;
27
- export declare function SectionRoot({ className, slot, ...rest }: SectionRootProps): import("react").JSX.Element;
50
+ export interface SectionRootProps extends ComponentProps<typeof ark.div>, VariantProps<typeof sectionVariants> {
51
+ }
52
+ export declare function SectionRoot({ className, fill, slot, ...rest }: SectionRootProps): import("react").JSX.Element;
28
53
  export declare namespace SectionRoot {
29
54
  var displayName: string;
30
55
  }
@@ -134,7 +159,7 @@ declare const sectionBodyVariants: import('tailwind-variants').TVReturnType<{
134
159
  page: string;
135
160
  section: string;
136
161
  };
137
- }, undefined, "flex min-h-0 flex-1 flex-col gap-4 overflow-auto", {
162
+ }, undefined, string[], {
138
163
  scale: {
139
164
  page: string;
140
165
  section: string;
@@ -144,7 +169,7 @@ declare const sectionBodyVariants: import('tailwind-variants').TVReturnType<{
144
169
  page: string;
145
170
  section: string;
146
171
  };
147
- }, undefined, "flex min-h-0 flex-1 flex-col gap-4 overflow-auto", unknown, unknown, undefined>>;
172
+ }, undefined, string[], unknown, unknown, undefined>>;
148
173
  export interface SectionBodyProps extends ComponentProps<typeof ark.section>, VariantProps<typeof sectionBodyVariants> {
149
174
  }
150
175
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/layouts/section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,eAAe,kPAE1B,CAAC;AAEH,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9D,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAIzE;yBAJe,WAAW;;;AAO3B,QAAA,MAA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AC,CAAC;CAC/B;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAS7F;yBATe,YAAY;;;AAY5B,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,+BAQ5F;yBARe,kBAAkB;;;AAWlC;;gCAEgC;AAChC,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,+BAQ1F;yBARe,cAAc;;;AAW9B,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;qDASvB,CAAC;AAEH,MAAM,WAAW,gBACf,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,EACxC,YAAY,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE/C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,KAAK,EACL,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAQlB;yBAbe,WAAW;;;AAgB3B;oFACoF;AACpF,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,+BAW5F;yBAXe,aAAa"}
@@ -1,15 +1,30 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { ark as i } from "@ark-ui/react/factory";
2
+ import { ark as n } from "@ark-ui/react/factory";
3
3
  import { tv as r } from "tailwind-variants";
4
- import { cn as n } from "../lib/cn.js";
4
+ import { cn as i } from "../lib/cn.js";
5
5
  const d = r({
6
- base: "flex min-h-0 flex-1 flex-col"
6
+ base: "group/section flex min-h-0 flex-col",
7
+ variants: {
8
+ /** `true` fills the region it sits in and scrolls its body — one section per region.
9
+ * `false` takes its content's height, so several stack in one scrolling pane: the body
10
+ * reads it off `data-fill` and stops scrolling on its own. */
11
+ fill: { true: "flex-1", false: "flex-none" }
12
+ },
13
+ defaultVariants: { fill: !0 }
7
14
  });
8
- function m({ className: e, slot: t, ...o }) {
9
- return /* @__PURE__ */ a(i.div, { className: n(d(), e), ...o, "data-slot": t ?? "section" });
15
+ function f({ className: t, fill: e = !0, slot: o, ...s }) {
16
+ return /* @__PURE__ */ a(
17
+ n.div,
18
+ {
19
+ className: i(d({ fill: e }), t),
20
+ ...s,
21
+ "data-fill": e,
22
+ "data-slot": o ?? "section"
23
+ }
24
+ );
10
25
  }
11
- m.displayName = "SectionRoot";
12
- const f = r({
26
+ f.displayName = "SectionRoot";
27
+ const u = r({
13
28
  base: "flex items-start gap-3",
14
29
  variants: {
15
30
  /** `page` is the top of a screen; `section` is a block within one. The difference is
@@ -24,40 +39,40 @@ const f = r({
24
39
  },
25
40
  defaultVariants: { scale: "section", bordered: !1 }
26
41
  });
27
- function p({ className: e, scale: t, bordered: o, slot: s, ...c }) {
42
+ function m({ className: t, scale: e, bordered: o, slot: s, ...c }) {
28
43
  return /* @__PURE__ */ a(
29
- i.header,
44
+ n.header,
30
45
  {
31
- className: n(f({ scale: t, bordered: o }), e),
46
+ className: i(u({ scale: e, bordered: o }), t),
32
47
  ...c,
33
48
  "data-slot": s ?? "section-header"
34
49
  }
35
50
  );
36
51
  }
37
- p.displayName = "SectionHeader";
38
- function u({ className: e, slot: t, ...o }) {
52
+ m.displayName = "SectionHeader";
53
+ function p({ className: t, slot: e, ...o }) {
39
54
  return /* @__PURE__ */ a(
40
- i.div,
55
+ n.div,
41
56
  {
42
- className: n("mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-5", e),
57
+ className: i("mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-5", t),
43
58
  ...o,
44
- "data-slot": t ?? "section-icon"
59
+ "data-slot": e ?? "section-icon"
45
60
  }
46
61
  );
47
62
  }
48
- u.displayName = "SectionIcon";
49
- function b({ className: e, slot: t, ...o }) {
63
+ p.displayName = "SectionIcon";
64
+ function x({ className: t, slot: e, ...o }) {
50
65
  return /* @__PURE__ */ a(
51
- i.div,
66
+ n.div,
52
67
  {
53
- className: n("min-w-0 flex-1", e),
68
+ className: i("min-w-0 flex-1", t),
54
69
  ...o,
55
- "data-slot": t ?? "section-title-group"
70
+ "data-slot": e ?? "section-title-group"
56
71
  }
57
72
  );
58
73
  }
59
- b.displayName = "SectionTitleGroup";
60
- const x = r({
74
+ x.displayName = "SectionTitleGroup";
75
+ const b = r({
61
76
  base: "truncate text-foreground",
62
77
  variants: {
63
78
  scale: {
@@ -67,87 +82,90 @@ const x = r({
67
82
  },
68
83
  defaultVariants: { scale: "section" }
69
84
  });
70
- function N({ level: e = 2, scale: t, className: o, slot: s, ...c }) {
71
- const l = `h${e}`;
85
+ function g({ level: t = 2, scale: e, className: o, slot: s, ...c }) {
86
+ const l = `h${t}`;
72
87
  return /* @__PURE__ */ a(
73
88
  l,
74
89
  {
75
- className: n(x({ scale: t }), o),
90
+ className: i(b({ scale: e }), o),
76
91
  ...c,
77
92
  slot: s ?? "section-title"
78
93
  }
79
94
  );
80
95
  }
81
- N.displayName = "SectionTitle";
82
- function S({ className: e, slot: t, ...o }) {
96
+ g.displayName = "SectionTitle";
97
+ function N({ className: t, slot: e, ...o }) {
83
98
  return /* @__PURE__ */ a(
84
- i.p,
99
+ n.p,
85
100
  {
86
- className: n("mt-0.5 text-muted-foreground text-sm", e),
101
+ className: i("mt-0.5 text-muted-foreground text-sm", t),
87
102
  ...o,
88
- "data-slot": t ?? "section-description"
103
+ "data-slot": e ?? "section-description"
89
104
  }
90
105
  );
91
106
  }
92
- S.displayName = "SectionDescription";
93
- function g({ className: e, slot: t, ...o }) {
107
+ N.displayName = "SectionDescription";
108
+ function S({ className: t, slot: e, ...o }) {
94
109
  return /* @__PURE__ */ a(
95
- i.div,
110
+ n.div,
96
111
  {
97
- className: n("ms-auto flex shrink-0 items-center gap-2 self-center", e),
112
+ className: i("ms-auto flex shrink-0 items-center gap-2 self-center", t),
98
113
  ...o,
99
- "data-slot": t ?? "section-actions"
114
+ "data-slot": e ?? "section-actions"
100
115
  }
101
116
  );
102
117
  }
103
- g.displayName = "SectionActions";
118
+ S.displayName = "SectionActions";
104
119
  const y = r({
105
- base: "flex min-h-0 flex-1 flex-col gap-4 overflow-auto",
120
+ base: [
121
+ "flex min-h-0 flex-1 flex-col gap-4 overflow-auto",
122
+ "group-data-[fill=false]/section:flex-none group-data-[fill=false]/section:overflow-visible"
123
+ ],
106
124
  variants: {
107
125
  scale: { page: "p-4", section: "" }
108
126
  },
109
127
  defaultVariants: { scale: "section" }
110
128
  });
111
129
  function v({
112
- className: e,
113
- scale: t,
130
+ className: t,
131
+ scale: e,
114
132
  slot: o,
115
133
  ...s
116
134
  }) {
117
135
  return /* @__PURE__ */ a(
118
- i.section,
136
+ n.section,
119
137
  {
120
- className: n(y({ scale: t }), e),
138
+ className: i(y({ scale: e }), t),
121
139
  ...s,
122
140
  "data-slot": o ?? "section-body"
123
141
  }
124
142
  );
125
143
  }
126
144
  v.displayName = "SectionBody";
127
- function h({ className: e, slot: t, ...o }) {
145
+ function h({ className: t, slot: e, ...o }) {
128
146
  return /* @__PURE__ */ a(
129
- i.footer,
147
+ n.footer,
130
148
  {
131
- className: n(
149
+ className: i(
132
150
  "flex shrink-0 items-center justify-between gap-2 border-t border-border bg-card px-4 py-3",
133
- e
151
+ t
134
152
  ),
135
153
  ...o,
136
- "data-slot": t ?? "section-footer"
154
+ "data-slot": e ?? "section-footer"
137
155
  }
138
156
  );
139
157
  }
140
158
  h.displayName = "SectionFooter";
141
159
  export {
142
- g as SectionActions,
160
+ S as SectionActions,
143
161
  v as SectionBody,
144
- S as SectionDescription,
162
+ N as SectionDescription,
145
163
  h as SectionFooter,
146
- p as SectionHeader,
147
- u as SectionIcon,
148
- m as SectionRoot,
149
- N as SectionTitle,
150
- b as SectionTitleGroup,
164
+ m as SectionHeader,
165
+ p as SectionIcon,
166
+ f as SectionRoot,
167
+ g as SectionTitle,
168
+ x as SectionTitleGroup,
151
169
  d as sectionVariants
152
170
  };
153
171
  //# sourceMappingURL=section.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"section.js","sources":["../../src/layouts/section.tsx"],"sourcesContent":["import { ark } from \"@ark-ui/react/factory\";\nimport type { ComponentProps } from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn.js\";\n\n/**\n * Section — the content scaffolding that sits INSIDE a shell region.\n *\n * Different axis from `shell.tsx`: the Shell regions position the window, this positions the\n * content within them. They never compete, and a Section nests inside `ShellMain`.\n *\n * This is one vocabulary where there were three. `PageShell` (Header · Title · Description ·\n * Actions · Content · Footer), `SectionHeader` (Icon · Content · Title · Description ·\n * Actions) and `TopBarMain` (TitleGroup · Title · Subtitle · Actions) described the same row\n * — a heading with optional icon, supporting text and end-aligned controls — under three sets\n * of names. `scale` is what actually differed between them.\n *\n * NOT merged, deliberately: `CardHeader` and `DialogHeader` have this same shape but stay with\n * their components. A header wired to a machine belongs to that machine — `DialogHeader` wires\n * Ark's `aria-labelledby`. Precedent that the line is right: `TourHeader` *is* `DialogHeader`.\n * Sharing across machines is fine when the wiring is shared; merging layout with wiring is not.\n *\n * Parts are FLAT exports. Statics are lost when a module becomes a client reference under RSC,\n * so `Section.Header` would read back as `undefined` — a bug we hit for real with `Preferences`.\n */\n\nexport const sectionVariants = tv({\n base: \"flex min-h-0 flex-1 flex-col\",\n});\n\n/** The container. Presentational — the scale lives on the parts that render text. */\nexport type SectionRootProps = ComponentProps<typeof ark.div>;\n\nexport function SectionRoot({ className, slot, ...rest }: SectionRootProps) {\n return (\n <ark.div className={cn(sectionVariants(), className)} {...rest} data-slot={slot ?? \"section\"} />\n );\n}\nSectionRoot.displayName = \"SectionRoot\";\n\nconst sectionHeaderVariants = tv({\n base: \"flex items-start gap-3\",\n variants: {\n /** `page` is the top of a screen; `section` is a block within one. The difference is\n * breathing room, and it is the only thing that ever really separated PageShellHeader\n * from SectionHeader. */\n scale: {\n page: \"px-4 pt-4 pb-2\",\n section: \"\",\n },\n /** Draw a separator under the header. */\n bordered: { true: \"border-b border-border pb-3\", false: \"\" },\n },\n defaultVariants: { scale: \"section\", bordered: false },\n});\n\nexport interface SectionHeaderProps\n extends ComponentProps<typeof ark.header>,\n VariantProps<typeof sectionHeaderVariants> {}\n\n/**\n * A flex row, not a grid. `PageShellHeader` used a two-column grid so its actions could span\n * both text rows; a flex row with a title group and `ms-auto` on the actions achieves the same\n * alignment, handles the optional icon that the grid could not, and mirrors under RTL without\n * a second code path.\n */\nexport function SectionHeader({ className, scale, bordered, slot, ...rest }: SectionHeaderProps) {\n return (\n <ark.header\n className={cn(sectionHeaderVariants({ scale, bordered }), className)}\n {...rest}\n data-slot={slot ?? \"section-header\"}\n />\n );\n}\nSectionHeader.displayName = \"SectionHeader\";\n\n/** Leading icon or badge. `mt-0.5` optically aligns it with the title's cap height. */\nexport function SectionIcon({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-5\", className)}\n {...rest}\n data-slot={slot ?? \"section-icon\"}\n />\n );\n}\nSectionIcon.displayName = \"SectionIcon\";\n\n/** The text column: title over description. `min-w-0` is what lets the title truncate rather\n * than pushing the actions off the row. */\nexport function SectionTitleGroup({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"min-w-0 flex-1\", className)}\n {...rest}\n data-slot={slot ?? \"section-title-group\"}\n />\n );\n}\nSectionTitleGroup.displayName = \"SectionTitleGroup\";\n\nconst sectionTitleVariants = tv({\n base: \"truncate text-foreground\",\n variants: {\n scale: {\n page: \"text-lg font-bold\",\n section: \"text-lg font-semibold\",\n },\n },\n defaultVariants: { scale: \"section\" },\n});\n\nexport interface SectionTitleProps\n extends Omit<ComponentProps<\"h2\">, \"ref\">,\n VariantProps<typeof sectionTitleVariants> {\n /** Heading level, so the title slots into the surrounding document outline. Default 2.\n * Kept SEPARATE from `scale`: how big it looks and where it sits in the outline are\n * different questions, and tying them would force a visual choice to change semantics. */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nexport function SectionTitle({ level = 2, scale, className, slot, ...rest }: SectionTitleProps) {\n const Title = `h${level}` as const;\n return (\n <Title\n className={cn(sectionTitleVariants({ scale }), className)}\n {...rest}\n slot={slot ?? \"section-title\"}\n />\n );\n}\nSectionTitle.displayName = \"SectionTitle\";\n\n/** Supporting text under the title. Was `TopBarSubtitle` and `PageShellDescription` too. */\nexport function SectionDescription({ className, slot, ...rest }: ComponentProps<typeof ark.p>) {\n return (\n <ark.p\n className={cn(\"mt-0.5 text-muted-foreground text-sm\", className)}\n {...rest}\n data-slot={slot ?? \"section-description\"}\n />\n );\n}\nSectionDescription.displayName = \"SectionDescription\";\n\n/** End-aligned controls. `ms-auto` rather than the root's `justify-between`: with an optional\n * icon and text column ahead of it, one logical margin pushes the actions to the inline end\n * and still mirrors in RTL. */\nexport function SectionActions({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"ms-auto flex shrink-0 items-center gap-2 self-center\", className)}\n {...rest}\n data-slot={slot ?? \"section-actions\"}\n />\n );\n}\nSectionActions.displayName = \"SectionActions\";\n\nconst sectionBodyVariants = tv({\n base: \"flex min-h-0 flex-1 flex-col gap-4 overflow-auto\",\n variants: {\n scale: { page: \"p-4\", section: \"\" },\n },\n defaultVariants: { scale: \"section\" },\n});\n\nexport interface SectionBodyProps\n extends ComponentProps<typeof ark.section>,\n VariantProps<typeof sectionBodyVariants> {}\n\n/**\n * The content region. Renders `<section>`, NEVER `<main>` — a Section nests inside a shell\n * that already owns the page's single `<main>` landmark, and two of those are a conformance\n * error that also makes \"skip to main content\" ambiguous.\n */\nexport function SectionBody({\n className,\n scale,\n slot,\n ...rest\n}: SectionBodyProps) {\n return (\n <ark.section\n className={cn(sectionBodyVariants({ scale }), className)}\n {...rest}\n data-slot={slot ?? \"section-body\"}\n />\n );\n}\nSectionBody.displayName = \"SectionBody\";\n\n/** Pinned footer — form actions, a save bar. Unlike the header it carries a surface, because\n * it sits against the bottom of a scrolling body and needs to separate from it. */\nexport function SectionFooter({ className, slot, ...rest }: ComponentProps<typeof ark.footer>) {\n return (\n <ark.footer\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-t border-border bg-card px-4 py-3\",\n className,\n )}\n {...rest}\n data-slot={slot ?? \"section-footer\"}\n />\n );\n}\nSectionFooter.displayName = \"SectionFooter\";\n"],"names":["sectionVariants","tv","SectionRoot","className","slot","rest","jsx","ark","cn","sectionHeaderVariants","SectionHeader","scale","bordered","SectionIcon","SectionTitleGroup","sectionTitleVariants","SectionTitle","level","Title","SectionDescription","SectionActions","sectionBodyVariants","SectionBody","SectionFooter"],"mappings":";;;;AA0BO,MAAMA,IAAkBC,EAAG;AAAA,EAChC,MAAM;AACR,CAAC;AAKM,SAASC,EAAY,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAA0B;AAC1E,SACE,gBAAAC,EAACC,EAAI,KAAJ,EAAQ,WAAWC,EAAGR,EAAA,GAAmBG,CAAS,GAAI,GAAGE,GAAM,aAAWD,KAAQ,UAAA,CAAW;AAElG;AACAF,EAAY,cAAc;AAE1B,MAAMO,IAAwBR,EAAG;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAAA,IAIR,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA;AAAA,IAGX,UAAU,EAAE,MAAM,+BAA+B,OAAO,GAAA;AAAA,EAAG;AAAA,EAE7D,iBAAiB,EAAE,OAAO,WAAW,UAAU,GAAA;AACjD,CAAC;AAYM,SAASS,EAAc,EAAE,WAAAP,GAAW,OAAAQ,GAAO,UAAAC,GAAU,MAAAR,GAA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AAA,MAAA;AAAA,MAED,GAAGE;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAmB,EAAc,cAAc;"}
1
+ {"version":3,"file":"section.js","sources":["../../src/layouts/section.tsx"],"sourcesContent":["import { ark } from \"@ark-ui/react/factory\";\nimport type { ComponentProps } from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn.js\";\n\n/**\n * Section — the content scaffolding that sits INSIDE a shell region.\n *\n * Different axis from `shell.tsx`: the Shell regions position the window, this positions the\n * content within them. They never compete, and a Section nests inside `ShellMain`.\n *\n * This is one vocabulary where there were three. `PageShell` (Header · Title · Description ·\n * Actions · Content · Footer), `SectionHeader` (Icon · Content · Title · Description ·\n * Actions) and `TopBarMain` (TitleGroup · Title · Subtitle · Actions) described the same row\n * — a heading with optional icon, supporting text and end-aligned controls — under three sets\n * of names. `scale` is what actually differed between them.\n *\n * NOT merged, deliberately: `CardHeader` and `DialogHeader` have this same shape but stay with\n * their components. A header wired to a machine belongs to that machine — `DialogHeader` wires\n * Ark's `aria-labelledby`. Precedent that the line is right: `TourHeader` *is* `DialogHeader`.\n * Sharing across machines is fine when the wiring is shared; merging layout with wiring is not.\n *\n * Parts are FLAT exports. Statics are lost when a module becomes a client reference under RSC,\n * so `Section.Header` would read back as `undefined` — a bug we hit for real with `Preferences`.\n */\n\nexport const sectionVariants = tv({\n base: \"group/section flex min-h-0 flex-col\",\n variants: {\n /** `true` fills the region it sits in and scrolls its body — one section per region.\n * `false` takes its content's height, so several stack in one scrolling pane: the body\n * reads it off `data-fill` and stops scrolling on its own. */\n fill: { true: \"flex-1\", false: \"flex-none\" },\n },\n defaultVariants: { fill: true },\n});\n\n/** The container. Presentational — the scale lives on the parts that render text. */\nexport interface SectionRootProps\n extends ComponentProps<typeof ark.div>,\n VariantProps<typeof sectionVariants> {}\n\nexport function SectionRoot({ className, fill = true, slot, ...rest }: SectionRootProps) {\n return (\n <ark.div\n className={cn(sectionVariants({ fill }), className)}\n {...rest}\n data-fill={fill}\n data-slot={slot ?? \"section\"}\n />\n );\n}\nSectionRoot.displayName = \"SectionRoot\";\n\nconst sectionHeaderVariants = tv({\n base: \"flex items-start gap-3\",\n variants: {\n /** `page` is the top of a screen; `section` is a block within one. The difference is\n * breathing room, and it is the only thing that ever really separated PageShellHeader\n * from SectionHeader. */\n scale: {\n page: \"px-4 pt-4 pb-2\",\n section: \"\",\n },\n /** Draw a separator under the header. */\n bordered: { true: \"border-b border-border pb-3\", false: \"\" },\n },\n defaultVariants: { scale: \"section\", bordered: false },\n});\n\nexport interface SectionHeaderProps\n extends ComponentProps<typeof ark.header>,\n VariantProps<typeof sectionHeaderVariants> {}\n\n/**\n * A flex row, not a grid. `PageShellHeader` used a two-column grid so its actions could span\n * both text rows; a flex row with a title group and `ms-auto` on the actions achieves the same\n * alignment, handles the optional icon that the grid could not, and mirrors under RTL without\n * a second code path.\n */\nexport function SectionHeader({ className, scale, bordered, slot, ...rest }: SectionHeaderProps) {\n return (\n <ark.header\n className={cn(sectionHeaderVariants({ scale, bordered }), className)}\n {...rest}\n data-slot={slot ?? \"section-header\"}\n />\n );\n}\nSectionHeader.displayName = \"SectionHeader\";\n\n/** Leading icon or badge. `mt-0.5` optically aligns it with the title's cap height. */\nexport function SectionIcon({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-5\", className)}\n {...rest}\n data-slot={slot ?? \"section-icon\"}\n />\n );\n}\nSectionIcon.displayName = \"SectionIcon\";\n\n/** The text column: title over description. `min-w-0` is what lets the title truncate rather\n * than pushing the actions off the row. */\nexport function SectionTitleGroup({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"min-w-0 flex-1\", className)}\n {...rest}\n data-slot={slot ?? \"section-title-group\"}\n />\n );\n}\nSectionTitleGroup.displayName = \"SectionTitleGroup\";\n\nconst sectionTitleVariants = tv({\n base: \"truncate text-foreground\",\n variants: {\n scale: {\n page: \"text-lg font-bold\",\n section: \"text-lg font-semibold\",\n },\n },\n defaultVariants: { scale: \"section\" },\n});\n\nexport interface SectionTitleProps\n extends Omit<ComponentProps<\"h2\">, \"ref\">,\n VariantProps<typeof sectionTitleVariants> {\n /** Heading level, so the title slots into the surrounding document outline. Default 2.\n * Kept SEPARATE from `scale`: how big it looks and where it sits in the outline are\n * different questions, and tying them would force a visual choice to change semantics. */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nexport function SectionTitle({ level = 2, scale, className, slot, ...rest }: SectionTitleProps) {\n const Title = `h${level}` as const;\n return (\n <Title\n className={cn(sectionTitleVariants({ scale }), className)}\n {...rest}\n slot={slot ?? \"section-title\"}\n />\n );\n}\nSectionTitle.displayName = \"SectionTitle\";\n\n/** Supporting text under the title. Was `TopBarSubtitle` and `PageShellDescription` too. */\nexport function SectionDescription({ className, slot, ...rest }: ComponentProps<typeof ark.p>) {\n return (\n <ark.p\n className={cn(\"mt-0.5 text-muted-foreground text-sm\", className)}\n {...rest}\n data-slot={slot ?? \"section-description\"}\n />\n );\n}\nSectionDescription.displayName = \"SectionDescription\";\n\n/** End-aligned controls. `ms-auto` rather than the root's `justify-between`: with an optional\n * icon and text column ahead of it, one logical margin pushes the actions to the inline end\n * and still mirrors in RTL. */\nexport function SectionActions({ className, slot, ...rest }: ComponentProps<typeof ark.div>) {\n return (\n <ark.div\n className={cn(\"ms-auto flex shrink-0 items-center gap-2 self-center\", className)}\n {...rest}\n data-slot={slot ?? \"section-actions\"}\n />\n );\n}\nSectionActions.displayName = \"SectionActions\";\n\nconst sectionBodyVariants = tv({\n base: [\n \"flex min-h-0 flex-1 flex-col gap-4 overflow-auto\",\n \"group-data-[fill=false]/section:flex-none group-data-[fill=false]/section:overflow-visible\",\n ],\n variants: {\n scale: { page: \"p-4\", section: \"\" },\n },\n defaultVariants: { scale: \"section\" },\n});\n\nexport interface SectionBodyProps\n extends ComponentProps<typeof ark.section>,\n VariantProps<typeof sectionBodyVariants> {}\n\n/**\n * The content region. Renders `<section>`, NEVER `<main>` — a Section nests inside a shell\n * that already owns the page's single `<main>` landmark, and two of those are a conformance\n * error that also makes \"skip to main content\" ambiguous.\n */\nexport function SectionBody({\n className,\n scale,\n slot,\n ...rest\n}: SectionBodyProps) {\n return (\n <ark.section\n className={cn(sectionBodyVariants({ scale }), className)}\n {...rest}\n data-slot={slot ?? \"section-body\"}\n />\n );\n}\nSectionBody.displayName = \"SectionBody\";\n\n/** Pinned footer — form actions, a save bar. Unlike the header it carries a surface, because\n * it sits against the bottom of a scrolling body and needs to separate from it. */\nexport function SectionFooter({ className, slot, ...rest }: ComponentProps<typeof ark.footer>) {\n return (\n <ark.footer\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-t border-border bg-card px-4 py-3\",\n className,\n )}\n {...rest}\n data-slot={slot ?? \"section-footer\"}\n />\n );\n}\nSectionFooter.displayName = \"SectionFooter\";\n"],"names":["sectionVariants","tv","SectionRoot","className","fill","slot","rest","jsx","ark","cn","sectionHeaderVariants","SectionHeader","scale","bordered","SectionIcon","SectionTitleGroup","sectionTitleVariants","SectionTitle","level","Title","SectionDescription","SectionActions","sectionBodyVariants","SectionBody","SectionFooter"],"mappings":";;;;AA0BO,MAAMA,IAAkBC,EAAG;AAAA,EAChC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAAA,IAIR,MAAM,EAAE,MAAM,UAAU,OAAO,YAAA;AAAA,EAAY;AAAA,EAE7C,iBAAiB,EAAE,MAAM,GAAA;AAC3B,CAAC;AAOM,SAASC,EAAY,EAAE,WAAAC,GAAW,MAAAC,IAAO,IAAM,MAAAC,GAAM,GAAGC,KAA0B;AACvF,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC,EAAGT,EAAgB,EAAE,MAAAI,EAAA,CAAM,GAAGD,CAAS;AAAA,MACjD,GAAGG;AAAA,M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,SAASsB,EAAY;AAAA,EAC1B,WAAApB;AAAA,EACA,OAAAS;AAAA,EACA,MAAAP;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC,EAAGa,EAAoB,EAAE,OAAAV,EAAA,CAAO,GAAGT,CAAS;AAAA,MACtD,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAkB,EAAY,cAAc;AAInB,SAASC,EAAc,EAAE,WAAArB,GAAW,MAAAE,GAAM,GAAGC,KAA2C;AAC7F,SACE,gBAAAC;AAAA,IAACC,EAAI;AAAA,IAAJ;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;AACAmB,EAAc,cAAc;"}
@@ -46,7 +46,13 @@ export declare const FieldLegend: (props: FieldLegendProps) => React.JSX.Element
46
46
  export declare const FieldGroup: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
47
47
  export declare const FieldContent: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
48
48
  export declare const FieldLabel: (props: React.ComponentProps<typeof ArkField.Label>) => React.JSX.Element;
49
- export declare const FieldRequiredIndicator: (props: React.ComponentProps<typeof ark.span>) => React.JSX.Element;
49
+ /**
50
+ * The `*` of a required field and, through Ark's `fallback`, what an optional one says instead —
51
+ * one part, so a form marks one of the two and never both. The asterisk is hidden from assistive
52
+ * tech because the control's `required` already announces it; the fallback is not, because nothing
53
+ * else says a field is optional. Its text is the host's: this library ships no product copy.
54
+ */
55
+ export declare const FieldRequiredIndicator: (props: React.ComponentProps<typeof ArkField.RequiredIndicator>) => React.JSX.Element;
50
56
  export declare const FieldTitle: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
51
57
  export declare const FieldDescription: (props: React.ComponentProps<typeof ark.p>) => React.JSX.Element;
52
58
  export declare const FieldSeparator: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/simples/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EACL,KAAK,IAAI,QAAQ,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI1D,eAAO,MAAM,QAAQ,+CAAqB,CAAC;AAE3C,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAqCjB,CAAC;AAEH,UAAU,UACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,EAChD,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,sBAWtC,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,sBAiBrD,CAAC;AAEF,UAAU,gBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvD;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAgBlD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,sBAgBrE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,GAA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