@kanzo-tech/ui 0.11.0 → 0.12.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.
@@ -1,21 +1,23 @@
1
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- import { useSegmentGroupContext as c, SegmentGroup as o } from "@ark-ui/react/segment-group";
3
- import { cn as i } from "../lib/cn.js";
4
- const N = c, w = (e) => {
1
+ "use client";
2
+ import { jsxs as u, jsx as o } from "react/jsx-runtime";
3
+ import { useFieldContext as v } from "@ark-ui/react/field";
4
+ import { useSegmentGroupContext as h, SegmentGroup as i } from "@ark-ui/react/segment-group";
5
+ import { cn as d } from "../lib/cn.js";
6
+ const G = h, S = (a) => {
5
7
  const {
6
- orientation: a = "horizontal",
7
- variant: r = "default",
8
- options: t,
9
- itemClassName: s,
10
- className: u,
11
- children: p,
12
- slot: g,
13
- ...m
14
- } = e;
15
- return /* @__PURE__ */ l(
16
- o.Root,
8
+ orientation: r = "horizontal",
9
+ variant: n = "default",
10
+ options: e,
11
+ itemClassName: l,
12
+ className: p,
13
+ children: g,
14
+ slot: m,
15
+ ...c
16
+ } = a, t = v();
17
+ return /* @__PURE__ */ u(
18
+ i.Root,
17
19
  {
18
- className: i(
20
+ className: d(
19
21
  "group/segment-group relative",
20
22
  "flex gap-2",
21
23
  "isolate",
@@ -30,34 +32,38 @@ const N = c, w = (e) => {
30
32
  // (ΔE 0.00–1.65), and step 5 is `--accent`. `--border` moved from 5 to 6 precisely so a
31
33
  // border and a hover surface would stop being the same colour.
32
34
  "data-[variant=solid]:rounded-field data-[variant=solid]:border data-[variant=solid]:border-border data-[variant=solid]:bg-muted data-[variant=solid]:p-1",
33
- u
35
+ p
34
36
  ),
35
- "data-variant": r,
36
- orientation: a,
37
- ...m,
38
- "data-slot": g ?? "segment-group",
37
+ "data-variant": n,
38
+ disabled: t == null ? void 0 : t.disabled,
39
+ invalid: t == null ? void 0 : t.invalid,
40
+ orientation: r,
41
+ readOnly: t == null ? void 0 : t.readOnly,
42
+ required: t == null ? void 0 : t.required,
43
+ ...c,
44
+ "data-slot": m ?? "segment-group",
39
45
  children: [
40
- /* @__PURE__ */ n(b, {}),
41
- t == null ? void 0 : t.map((d) => /* @__PURE__ */ n(
42
- v,
46
+ /* @__PURE__ */ o(f, {}),
47
+ e == null ? void 0 : e.map((s) => /* @__PURE__ */ o(
48
+ b,
43
49
  {
44
- value: d.value,
45
- disabled: d.disabled,
46
- className: i("px-3 py-1.5", s),
47
- children: /* @__PURE__ */ n(h, { className: "flex items-center justify-center gap-2 text-sm font-medium", children: d.label })
50
+ value: s.value,
51
+ disabled: s.disabled,
52
+ className: d("px-3 py-1.5", l),
53
+ children: /* @__PURE__ */ o(x, { className: "flex items-center justify-center gap-2 text-sm font-medium", children: s.label })
48
54
  },
49
- d.value
55
+ s.value
50
56
  )),
51
- p
57
+ g
52
58
  ]
53
59
  }
54
60
  );
55
- }, v = (e) => {
56
- const { className: a, children: r, slot: t, ...s } = e;
57
- return /* @__PURE__ */ l(
58
- o.Item,
61
+ }, b = (a) => {
62
+ const { className: r, children: n, slot: e, ...l } = a;
63
+ return /* @__PURE__ */ u(
64
+ i.Item,
59
65
  {
60
- className: i(
66
+ className: d(
61
67
  "relative z-1",
62
68
  "inline-flex items-center justify-center",
63
69
  "cursor-pointer select-none",
@@ -68,33 +74,33 @@ const N = c, w = (e) => {
68
74
  "rounded-[inherit] border border-transparent",
69
75
  "outline-none data-focus-visible:border-primary data-focus-visible:ring-[3px] data-focus-visible:ring-ring",
70
76
  "data-disabled:pointer-events-none data-disabled:opacity-64",
71
- a
77
+ r
72
78
  ),
73
- ...s,
74
- "data-slot": t ?? "segment-group-item",
79
+ ...l,
80
+ "data-slot": e ?? "segment-group-item",
75
81
  children: [
76
- r,
77
- /* @__PURE__ */ n(o.ItemControl, {}),
78
- /* @__PURE__ */ n(o.ItemHiddenInput, {})
82
+ n,
83
+ /* @__PURE__ */ o(i.ItemControl, {}),
84
+ /* @__PURE__ */ o(i.ItemHiddenInput, {})
79
85
  ]
80
86
  }
81
87
  );
82
- }, h = (e) => {
83
- const { className: a, slot: r, ...t } = e;
84
- return /* @__PURE__ */ n(
85
- o.ItemText,
88
+ }, x = (a) => {
89
+ const { className: r, slot: n, ...e } = a;
90
+ return /* @__PURE__ */ o(
91
+ i.ItemText,
86
92
  {
87
- className: i("relative z-1", a),
88
- ...t,
89
- "data-slot": r ?? "segment-group-item-text"
93
+ className: d("relative z-1", r),
94
+ ...e,
95
+ "data-slot": n ?? "segment-group-item-text"
90
96
  }
91
97
  );
92
- }, b = (e) => {
93
- const { className: a, slot: r, ...t } = e;
94
- return /* @__PURE__ */ n(
95
- o.Indicator,
98
+ }, f = (a) => {
99
+ const { className: r, slot: n, ...e } = a;
100
+ return /* @__PURE__ */ o(
101
+ i.Indicator,
96
102
  {
97
- className: i(
103
+ className: d(
98
104
  "absolute top-(--top) left-(--left) z-0",
99
105
  "h-(--height) w-(--width)",
100
106
  "rounded-[inherit]",
@@ -112,18 +118,18 @@ const N = c, w = (e) => {
112
118
  "data-[orientation=horizontal]:group-data-[variant=underline]/segment-group:h-0.5",
113
119
  "data-[orientation=vertical]:group-data-[variant=underline]/segment-group:w-0.5",
114
120
  "motion-reduce:transition-none!",
115
- a
121
+ r
116
122
  ),
117
- ...t,
118
- "data-slot": r ?? "segment-group-indicator"
123
+ ...e,
124
+ "data-slot": n ?? "segment-group-indicator"
119
125
  }
120
126
  );
121
127
  };
122
128
  export {
123
- w as SegmentGroup,
124
- b as SegmentGroupIndicator,
125
- v as SegmentGroupItem,
126
- h as SegmentGroupItemText,
127
- N as useSegmentGroup
129
+ S as SegmentGroup,
130
+ f as SegmentGroupIndicator,
131
+ b as SegmentGroupItem,
132
+ x as SegmentGroupItemText,
133
+ G as useSegmentGroup
128
134
  };
129
135
  //# sourceMappingURL=segment-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"segment-group.js","sources":["../../src/simples/segment-group.tsx"],"sourcesContent":["import {\n SegmentGroup as ArkSegmentGroup,\n useSegmentGroupContext,\n} from \"@ark-ui/react/segment-group\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport const useSegmentGroup = useSegmentGroupContext;\n\ntype SegmentGroupVariant = \"default\" | \"underline\" | \"solid\";\n\nexport interface SegmentGroupOption {\n value: string;\n label: React.ReactNode;\n disabled?: boolean;\n}\n\ninterface SegmentGroupProps\n extends React.ComponentProps<typeof ArkSegmentGroup.Root> {\n /**\n * The visual variant of the segment group.\n *\n * @default \"default\"\n */\n variant?: SegmentGroupVariant;\n /** Data-driven items rendered before `children` (additive with the compound API). */\n options?: readonly SegmentGroupOption[];\n /** Extra classes applied to each `options`-rendered item. */\n itemClassName?: string;\n}\n\nexport const SegmentGroup = (props: SegmentGroupProps) => {\n const {\n orientation = \"horizontal\",\n variant = \"default\",\n options,\n itemClassName,\n className,\n children,\n slot,\n ...rest\n } = props;\n\n return (\n <ArkSegmentGroup.Root\n className={cn(\n \"group/segment-group relative\",\n \"flex gap-2\",\n \"isolate\",\n \"data-[orientation=vertical]:flex-col\",\n \"data-disabled:opacity-64\",\n \"data-[variant=underline]:gap-1 data-[variant=underline]:border-input\",\n \"data-[orientation=horizontal]:data-[variant=underline]:border-b\",\n \"data-[orientation=vertical]:data-[variant=underline]:border-l\",\n // `solid`: a filled `bg-muted` track with equal-width segments — the contained\n // \"segmented control\" look, so consumers stop hand-rolling the track each time.\n // The track border is solid: diluted, it composited to ramp step 5 on every backdrop\n // (ΔE 0.00–1.65), and step 5 is `--accent`. `--border` moved from 5 to 6 precisely so a\n // border and a hover surface would stop being the same colour.\n \"data-[variant=solid]:rounded-field data-[variant=solid]:border data-[variant=solid]:border-border data-[variant=solid]:bg-muted data-[variant=solid]:p-1\",\n className\n )}\n data-variant={variant}\n orientation={orientation}\n {...rest}\n data-slot={slot ?? \"segment-group\"}\n >\n <SegmentGroupIndicator />\n\n {options?.map((o) => (\n <SegmentGroupItem\n key={o.value}\n value={o.value}\n disabled={o.disabled}\n className={cn(\"px-3 py-1.5\", itemClassName)}\n >\n <SegmentGroupItemText className=\"flex items-center justify-center gap-2 text-sm font-medium\">\n {o.label}\n </SegmentGroupItemText>\n </SegmentGroupItem>\n ))}\n\n {children}\n </ArkSegmentGroup.Root>\n );\n};\n\nexport const SegmentGroupItem = (\n props: React.ComponentProps<typeof ArkSegmentGroup.Item>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.Item\n className={cn(\n \"relative z-1\",\n \"inline-flex items-center justify-center\",\n \"cursor-pointer select-none\",\n \"text-sm font-medium text-muted-foreground transition-colors\",\n \"hover:text-foreground data-[state=checked]:text-foreground\",\n \"data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start\",\n \"group-data-[variant=solid]/segment-group:flex-1 group-data-[variant=solid]/segment-group:justify-center\",\n \"rounded-[inherit] border border-transparent\",\n \"outline-none data-focus-visible:border-primary data-focus-visible:ring-[3px] data-focus-visible:ring-ring\",\n \"data-disabled:pointer-events-none data-disabled:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"segment-group-item\"}\n >\n {children}\n\n <ArkSegmentGroup.ItemControl />\n <ArkSegmentGroup.ItemHiddenInput />\n </ArkSegmentGroup.Item>\n );\n};\n\nexport const SegmentGroupItemText = (\n props: React.ComponentProps<typeof ArkSegmentGroup.ItemText>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.ItemText\n className={cn(\"relative z-1\", className)}\n {...rest}\n data-slot={slot ?? \"segment-group-item-text\"}\n />\n );\n};\n\nexport const SegmentGroupIndicator = (\n props: React.ComponentProps<typeof ArkSegmentGroup.Indicator>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.Indicator\n className={cn(\n \"absolute top-(--top) left-(--left) z-0\",\n \"h-(--height) w-(--width)\",\n \"rounded-[inherit]\",\n // The moving \"pill\": an elevated surface with a hairline border and a soft shadow, so\n // the selected segment reads as a raised chip on the muted track (crisp, not flat).\n // Solid for the same reason as the track — diluted it landed on step 5, `--accent`.\n \"border border-border bg-background shadow-sm\",\n \"transition-[width,height,left,top] duration-150 ease-out\",\n \"[transition-property:var(--transition-property,width,height,left,top)]\",\n // `underline` is a bar, not a pill: drop the chrome and paint the accent.\n \"group-data-[variant=underline]/segment-group:border-transparent group-data-[variant=underline]/segment-group:bg-primary group-data-[variant=underline]/segment-group:shadow-none\",\n \"data-[orientation=horizontal]:group-data-[variant=underline]/segment-group:top-[calc(var(--top)+var(--height)-1px)]\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:right-[calc(var(--left)+var(--width)-1px)]\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:-translate-x-px\",\n \"data-[orientation=horizontal]:group-data-[variant=underline]/segment-group:h-0.5\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:w-0.5\",\n \"motion-reduce:transition-none!\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"segment-group-indicator\"}\n />\n );\n};\n"],"names":["useSegmentGroup","useSegmentGroupContext","SegmentGroup","props","orientation","variant","options","itemClassName","className","children","slot","rest","jsxs","ArkSegmentGroup","cn","jsx","SegmentGroupIndicator","o","SegmentGroupItem","SegmentGroupItemText"],"mappings":";;;AAOO,MAAMA,IAAkBC,GAwBlBC,IAAe,CAACC,MAA6B;AACxD,QAAM;AAAA,IACJ,aAAAC,IAAc;AAAA,IACd,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR;AAEJ,SACE,gBAAAS;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMA;AAAA,QACAN;AAAA,MAAA;AAAA,MAEF,gBAAcH;AAAA,MACd,aAAAD;AAAA,MACC,GAAGO;AAAA,MACJ,aAAWD,KAAQ;AAAA,MAEnB,UAAA;AAAA,QAAA,gBAAAK,EAACC,GAAA,EAAsB;AAAA,QAEtBV,KAAA,gBAAAA,EAAS,IAAI,CAACW,MACb,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YAEC,OAAOD,EAAE;AAAA,YACT,UAAUA,EAAE;AAAA,YACZ,WAAWH,EAAG,eAAeP,CAAa;AAAA,YAE1C,UAAA,gBAAAQ,EAACI,GAAA,EAAqB,WAAU,8DAC7B,YAAE,MAAA,CACL;AAAA,UAAA;AAAA,UAPKF,EAAE;AAAA,QAAA;AAAA,QAWVR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,GAEaS,IAAmB,CAC9Bf,MACG;AACH,QAAM,EAAE,WAAAK,GAAW,UAAAC,GAAU,MAAAC,GAAM,GAAGC,MAASR;AAE/C,SACE,gBAAAS;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,MAElB,UAAA;AAAA,QAAAD;AAAA,QAED,gBAAAM,EAACF,EAAgB,aAAhB,EAA4B;AAAA,QAC7B,gBAAAE,EAACF,EAAgB,iBAAhB,CAAA,CAAgC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGvC,GAEaM,IAAuB,CAClChB,MACG;AACH,QAAM,EAAE,WAAAK,GAAW,MAAAE,GAAM,GAAGC,MAASR;AAErC,SACE,gBAAAY;AAAA,IAACF,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWC,EAAG,gBAAgBN,CAAS;AAAA,MACtC,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB,GAEaM,IAAwB,CACnCb,MACG;AACH,QAAM,EAAE,WAAAK,GAAW,MAAAE,GAAM,GAAGC,MAASR;AAErC,SACE,gBAAAY;AAAA,IAACF,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA,QAIA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB;"}
1
+ {"version":3,"file":"segment-group.js","sources":["../../src/simples/segment-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { type UseFieldContext, useFieldContext } from \"@ark-ui/react/field\";\nimport {\n SegmentGroup as ArkSegmentGroup,\n useSegmentGroupContext,\n} from \"@ark-ui/react/segment-group\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport const useSegmentGroup = useSegmentGroupContext;\n\ntype SegmentGroupVariant = \"default\" | \"underline\" | \"solid\";\n\nexport interface SegmentGroupOption {\n value: string;\n label: React.ReactNode;\n disabled?: boolean;\n}\n\ninterface SegmentGroupProps\n extends React.ComponentProps<typeof ArkSegmentGroup.Root> {\n /**\n * The visual variant of the segment group.\n *\n * @default \"default\"\n */\n variant?: SegmentGroupVariant;\n /** Data-driven items rendered before `children` (additive with the compound API). */\n options?: readonly SegmentGroupOption[];\n /** Extra classes applied to each `options`-rendered item. */\n itemClassName?: string;\n}\n\n// Ark's `useSegmentGroup` reads no `useFieldContext`, so a `Field disabled` left the segments\n// clickable. Bridged here the way `RadioGroup` does it — state flags only, explicit props win, and\n// with no `Field` ancestor every flag is `undefined`, which Ark strips before the machine sees it.\nexport const SegmentGroup = (props: SegmentGroupProps) => {\n const {\n orientation = \"horizontal\",\n variant = \"default\",\n options,\n itemClassName,\n className,\n children,\n slot,\n ...rest\n } = props;\n\n const field: UseFieldContext | undefined = useFieldContext();\n\n return (\n <ArkSegmentGroup.Root\n className={cn(\n \"group/segment-group relative\",\n \"flex gap-2\",\n \"isolate\",\n \"data-[orientation=vertical]:flex-col\",\n \"data-disabled:opacity-64\",\n \"data-[variant=underline]:gap-1 data-[variant=underline]:border-input\",\n \"data-[orientation=horizontal]:data-[variant=underline]:border-b\",\n \"data-[orientation=vertical]:data-[variant=underline]:border-l\",\n // `solid`: a filled `bg-muted` track with equal-width segments — the contained\n // \"segmented control\" look, so consumers stop hand-rolling the track each time.\n // The track border is solid: diluted, it composited to ramp step 5 on every backdrop\n // (ΔE 0.00–1.65), and step 5 is `--accent`. `--border` moved from 5 to 6 precisely so a\n // border and a hover surface would stop being the same colour.\n \"data-[variant=solid]:rounded-field data-[variant=solid]:border data-[variant=solid]:border-border data-[variant=solid]:bg-muted data-[variant=solid]:p-1\",\n className\n )}\n data-variant={variant}\n disabled={field?.disabled}\n invalid={field?.invalid}\n orientation={orientation}\n readOnly={field?.readOnly}\n required={field?.required}\n {...rest}\n data-slot={slot ?? \"segment-group\"}\n >\n <SegmentGroupIndicator />\n\n {options?.map((o) => (\n <SegmentGroupItem\n key={o.value}\n value={o.value}\n disabled={o.disabled}\n className={cn(\"px-3 py-1.5\", itemClassName)}\n >\n <SegmentGroupItemText className=\"flex items-center justify-center gap-2 text-sm font-medium\">\n {o.label}\n </SegmentGroupItemText>\n </SegmentGroupItem>\n ))}\n\n {children}\n </ArkSegmentGroup.Root>\n );\n};\n\nexport const SegmentGroupItem = (\n props: React.ComponentProps<typeof ArkSegmentGroup.Item>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.Item\n className={cn(\n \"relative z-1\",\n \"inline-flex items-center justify-center\",\n \"cursor-pointer select-none\",\n \"text-sm font-medium text-muted-foreground transition-colors\",\n \"hover:text-foreground data-[state=checked]:text-foreground\",\n \"data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start\",\n \"group-data-[variant=solid]/segment-group:flex-1 group-data-[variant=solid]/segment-group:justify-center\",\n \"rounded-[inherit] border border-transparent\",\n \"outline-none data-focus-visible:border-primary data-focus-visible:ring-[3px] data-focus-visible:ring-ring\",\n \"data-disabled:pointer-events-none data-disabled:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"segment-group-item\"}\n >\n {children}\n\n <ArkSegmentGroup.ItemControl />\n <ArkSegmentGroup.ItemHiddenInput />\n </ArkSegmentGroup.Item>\n );\n};\n\nexport const SegmentGroupItemText = (\n props: React.ComponentProps<typeof ArkSegmentGroup.ItemText>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.ItemText\n className={cn(\"relative z-1\", className)}\n {...rest}\n data-slot={slot ?? \"segment-group-item-text\"}\n />\n );\n};\n\nexport const SegmentGroupIndicator = (\n props: React.ComponentProps<typeof ArkSegmentGroup.Indicator>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSegmentGroup.Indicator\n className={cn(\n \"absolute top-(--top) left-(--left) z-0\",\n \"h-(--height) w-(--width)\",\n \"rounded-[inherit]\",\n // The moving \"pill\": an elevated surface with a hairline border and a soft shadow, so\n // the selected segment reads as a raised chip on the muted track (crisp, not flat).\n // Solid for the same reason as the track — diluted it landed on step 5, `--accent`.\n \"border border-border bg-background shadow-sm\",\n \"transition-[width,height,left,top] duration-150 ease-out\",\n \"[transition-property:var(--transition-property,width,height,left,top)]\",\n // `underline` is a bar, not a pill: drop the chrome and paint the accent.\n \"group-data-[variant=underline]/segment-group:border-transparent group-data-[variant=underline]/segment-group:bg-primary group-data-[variant=underline]/segment-group:shadow-none\",\n \"data-[orientation=horizontal]:group-data-[variant=underline]/segment-group:top-[calc(var(--top)+var(--height)-1px)]\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:right-[calc(var(--left)+var(--width)-1px)]\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:-translate-x-px\",\n \"data-[orientation=horizontal]:group-data-[variant=underline]/segment-group:h-0.5\",\n \"data-[orientation=vertical]:group-data-[variant=underline]/segment-group:w-0.5\",\n \"motion-reduce:transition-none!\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"segment-group-indicator\"}\n />\n );\n};\n"],"names":[],"mappings":";;;;;AAUO;AA4BL;AAAM;AACU;AACJ;AACV;AACA;AACA;AACA;AACA;AACG;AAKL;AACE;AAAiB;AAAhB;AACY;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AAAA;AAEY;AACG;AACD;AAChB;AACiB;AACA;AACb;AACe;AAEnB;AAAuB;AAGrB;AAAC;AAAA;AAEU;AACG;AAC8B;AAI1C;AAAA;AAPO;AAAA;AAWV;AAAA;AAAA;AAGP;AAKE;AAEA;AACE;AAAiB;AAAhB;AACY;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEE;AACe;AAElB;AAAA;AAE4B;AACI;AAAA;AAAA;AAGvC;AAKE;AAEA;AACE;AAAiB;AAAhB;AACwC;AACnC;AACe;AAAA;AAGzB;AAKE;AAEA;AACE;AAAiB;AAAhB;AACY;AACT;AACA;AACA;AAAA;AAAA;AAAA;AAIA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEE;AACe;AAAA;AAGzB;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanzo-tech/ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Kanzo shared UI — domain-free components over Ark UI and tailwind-variants, themed by tokens.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -95,8 +95,8 @@
95
95
  "tailwind-merge": "^3.6.0",
96
96
  "tailwind-variants": "^3.2.2",
97
97
  "tw-animate-css": "^1.4.0",
98
- "@kanzo-tech/theme": "0.11.0",
99
- "@kanzo-tech/mosaic": "0.11.0"
98
+ "@kanzo-tech/mosaic": "0.12.0",
99
+ "@kanzo-tech/theme": "0.12.0"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@codemirror/autocomplete": "^6.18.6",
@@ -122,12 +122,12 @@
122
122
  "rollup-plugin-preserve-directives": "^0.4.0",
123
123
  "tailwindcss": "4"
124
124
  },
125
- "//size-limit": "Budgets OUR shipped code only. `ignore` mirrors the build's `external` list in vite.config.ts — anything externalised resolves from the consumer's node_modules, so counting it here measures the ecosystem, not us; keep the two lists in sync. Barrel measured at 35.27 kB brotlied, budget set just above so real growth trips the gate. The analytics budget (then spelled `charts`) went 4 kB -> 6 kB when the five preset charts became a composable grammar (measured 5.47 kB), then 6 kB -> 60 kB when ChartFilter/ChartSearch/ChartSlider brought Select, Combobox, Input, Field and Slider into the subpath (measured 56.01 kB). That last jump is mostly an artefact of measuring a subpath in isolation: in an app that also imports the root barrel those modules are the same files and dedupe, so the incremental cost is far smaller. The root barrel went 38 kB -> 42 kB (measured 40.66 kB) for the AI-assist compounds: real growth, and growth nobody downloads unless they import it. That is the point -- this gauge measures the WHOLE library, not what a consumer pays. The gauge that measures the latter is 'one component (tree-shaken)' below: Button resolves to 1.08 kB and three of our modules, with no trace of the AI code, so tree-shaking is doing its job. Treat this budget as a change detector for the library's total size and that one as the regression gate for consumer cost. Rebaselined 2026-07-31: analytics measured 66.30 kB against a stale 60 kB budget, so the gate was already red before the colour work touched it -- measured by removing that work's only addition to the subpath (`useThemeTick` reading the palette through the theme context), which moves the figure by 0.03 kB. The growth is somebody else's and is not attributed here, because the minified bundle does not say and a note that guessed would be worse than one that does not: what is recorded is the number and the fact that it predates this branch. Budget set to 68 kB, just above the measurement, so the next real growth trips it again. Rebaselined 2026-08-18: the root barrel went 42 kB -> 42.5 kB (measured 42.12 kB, against 41.54 kB at fb8e5b5) when the core's axes became a generated declaration the barrel carries -- the JSON is 302 B -> 648 B of it, brotlied on its own, and the rest is the one resolution chain. The other three gauges did not move at all, `one component` included, so no consumer of a component pays for it; see `/docs/design/colour` for the four figures and how to re-derive them. Measured again 2026-08-20, and NOT rebaselined: 42.12 kB -> 42.32 kB across one branch that took four modules OUT of the barrel (`complete`, `suggest`, `use-ai` and the `Suggestion` type left for @kanzo-tech/ai) and put two IN (`Diagnostic`, `Questionnaire`). Net +0.20 kB, which is the honest reading and the only one available: the two movements cannot be separated from a single minified bundle, and a note that guessed at the split would be worse than one that says it did not. The AI compounds' arrival is recorded above as 38 -> 42 kB, so their departure is worth about that much and the two new components spent it. Still under the 43 kB gate, so the gate is untouched. Raised 2026-09-30, 43.5 kB -> 44 kB, as a decision (Ángel): the root barrel measured 43.57 kB after four issues from keasy landed in one day -- `FieldRequiredIndicator`'s `fallback` (+0.13 kB), the `Empty*` parts (+0.20), the `Stat*` compound that replaced `StatTile` and the copied `MetricCard` (+0.25) and the `Gated*` parts (+0.18). Three compounds the library did not have, each with its second call site in keasy, each replacing code keasy copied. `one component (tree-shaken)` did not move (1.26 kB), so no consumer of a component pays for them. Budget set just above the measurement so the next growth trips it again.",
125
+ "//size-limit": "Budgets OUR shipped code only. `ignore` mirrors the build's `external` list in vite.config.ts — anything externalised resolves from the consumer's node_modules, so counting it here measures the ecosystem, not us; keep the two lists in sync. Barrel measured at 35.27 kB brotlied, budget set just above so real growth trips the gate. The analytics budget (then spelled `charts`) went 4 kB -> 6 kB when the five preset charts became a composable grammar (measured 5.47 kB), then 6 kB -> 60 kB when ChartFilter/ChartSearch/ChartSlider brought Select, Combobox, Input, Field and Slider into the subpath (measured 56.01 kB). That last jump is mostly an artefact of measuring a subpath in isolation: in an app that also imports the root barrel those modules are the same files and dedupe, so the incremental cost is far smaller. The root barrel went 38 kB -> 42 kB (measured 40.66 kB) for the AI-assist compounds: real growth, and growth nobody downloads unless they import it. That is the point -- this gauge measures the WHOLE library, not what a consumer pays. The gauge that measures the latter is 'one component (tree-shaken)' below: Button resolves to 1.08 kB and three of our modules, with no trace of the AI code, so tree-shaking is doing its job. Treat this budget as a change detector for the library's total size and that one as the regression gate for consumer cost. Rebaselined 2026-07-31: analytics measured 66.30 kB against a stale 60 kB budget, so the gate was already red before the colour work touched it -- measured by removing that work's only addition to the subpath (`useThemeTick` reading the palette through the theme context), which moves the figure by 0.03 kB. The growth is somebody else's and is not attributed here, because the minified bundle does not say and a note that guessed would be worse than one that does not: what is recorded is the number and the fact that it predates this branch. Budget set to 68 kB, just above the measurement, so the next real growth trips it again. Rebaselined 2026-08-18: the root barrel went 42 kB -> 42.5 kB (measured 42.12 kB, against 41.54 kB at fb8e5b5) when the core's axes became a generated declaration the barrel carries -- the JSON is 302 B -> 648 B of it, brotlied on its own, and the rest is the one resolution chain. The other three gauges did not move at all, `one component` included, so no consumer of a component pays for it; see `/docs/design/colour` for the four figures and how to re-derive them. Measured again 2026-08-20, and NOT rebaselined: 42.12 kB -> 42.32 kB across one branch that took four modules OUT of the barrel (`complete`, `suggest`, `use-ai` and the `Suggestion` type left for @kanzo-tech/ai) and put two IN (`Diagnostic`, `Questionnaire`). Net +0.20 kB, which is the honest reading and the only one available: the two movements cannot be separated from a single minified bundle, and a note that guessed at the split would be worse than one that says it did not. The AI compounds' arrival is recorded above as 38 -> 42 kB, so their departure is worth about that much and the two new components spent it. Still under the 43 kB gate, so the gate is untouched. Raised 2026-09-30, 43.5 kB -> 44 kB, as a decision (Ángel): the root barrel measured 43.57 kB after four issues from keasy landed in one day -- `FieldRequiredIndicator`'s `fallback` (+0.13 kB), the `Empty*` parts (+0.20), the `Stat*` compound that replaced `StatTile` and the copied `MetricCard` (+0.25) and the `Gated*` parts (+0.18). Three compounds the library did not have, each with its second call site in keasy, each replacing code keasy copied. `one component (tree-shaken)` did not move (1.26 kB), so no consumer of a component pays for them. Budget set just above the measurement so the next growth trips it again. Raised 2026-09-30, 44 kB -> 45.5 kB, as a decision (Ángel; branch `feat/form-primitives`): the barrel measured 45.09 kB after `LanguagePicker`, `useAsyncCollection`, `useDebouncedCommit`, the `Field` bridge on `DatePicker` and `SegmentGroup`, `FieldHelper`'s `tone`, `FieldGroup`'s `columns` and `LocaleProvider` landed together for a form generator that was carrying its own copies. `one component (tree-shaken)` did not move (1.26 kB), so no consumer of a component pays for them; analytics went 66.24 -> 67.13 kB and stays under its 68 kB.",
126
126
  "size-limit": [
127
127
  {
128
128
  "name": "root barrel (JS)",
129
129
  "path": "dist/index.js",
130
- "limit": "44 kB",
130
+ "limit": "45.5 kB",
131
131
  "ignore": [
132
132
  "react",
133
133
  "react-dom",