@kanzo-tech/ui 0.11.0 → 0.13.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/dist/analytics.d.ts +1 -0
- package/dist/analytics.d.ts.map +1 -1
- package/dist/charts/chart-inputs.d.ts +6 -5
- package/dist/charts/chart-inputs.d.ts.map +1 -1
- package/dist/charts/chart-inputs.js +78 -77
- package/dist/charts/chart-inputs.js.map +1 -1
- package/dist/charts/chart-marks.d.ts +2 -1
- package/dist/charts/chart-marks.d.ts.map +1 -1
- package/dist/charts/chart-marks.js.map +1 -1
- package/dist/charts/chart-root.d.ts +8 -3
- package/dist/charts/chart-root.d.ts.map +1 -1
- package/dist/charts/chart-root.js +60 -60
- package/dist/charts/chart-root.js.map +1 -1
- package/dist/charts/chart-spec.d.ts +11 -4
- package/dist/charts/chart-spec.d.ts.map +1 -1
- package/dist/charts/chart-spec.js +44 -40
- package/dist/charts/chart-spec.js.map +1 -1
- package/dist/charts/chart-stat.d.ts +3 -2
- package/dist/charts/chart-stat.d.ts.map +1 -1
- package/dist/charts/chart-stat.js +10 -9
- package/dist/charts/chart-stat.js.map +1 -1
- package/dist/composites/language-picker.d.ts +51 -0
- package/dist/composites/language-picker.d.ts.map +1 -0
- package/dist/composites/language-picker.js +165 -0
- package/dist/composites/language-picker.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +687 -677
- package/dist/index.js.map +1 -1
- package/dist/lib/control-size.d.ts +26 -0
- package/dist/lib/control-size.d.ts.map +1 -0
- package/dist/lib/control-size.js +11 -0
- package/dist/lib/control-size.js.map +1 -0
- package/dist/lib/use-async-collection.d.ts +57 -0
- package/dist/lib/use-async-collection.d.ts.map +1 -0
- package/dist/lib/use-async-collection.js +43 -0
- package/dist/lib/use-async-collection.js.map +1 -0
- package/dist/lib/use-debounced-commit.d.ts +28 -0
- package/dist/lib/use-debounced-commit.d.ts.map +1 -0
- package/dist/lib/use-debounced-commit.js +26 -0
- package/dist/lib/use-debounced-commit.js.map +1 -0
- package/dist/shark-parity.divergences.d.ts.map +1 -1
- package/dist/simples/button.d.ts.map +1 -1
- package/dist/simples/button.js +34 -33
- package/dist/simples/button.js.map +1 -1
- package/dist/simples/checkbox.d.ts.map +1 -1
- package/dist/simples/checkbox.js +42 -42
- package/dist/simples/checkbox.js.map +1 -1
- package/dist/simples/combobox.d.ts.map +1 -1
- package/dist/simples/combobox.js +48 -49
- package/dist/simples/combobox.js.map +1 -1
- package/dist/simples/date-picker.d.ts +58 -2
- package/dist/simples/date-picker.d.ts.map +1 -1
- package/dist/simples/date-picker.js +210 -73
- package/dist/simples/date-picker.js.map +1 -1
- package/dist/simples/field.d.ts +35 -2
- package/dist/simples/field.d.ts.map +1 -1
- package/dist/simples/field.js +146 -116
- package/dist/simples/field.js.map +1 -1
- package/dist/simples/input-group.d.ts +9 -9
- package/dist/simples/input-group.d.ts.map +1 -1
- package/dist/simples/input-group.js +68 -78
- package/dist/simples/input-group.js.map +1 -1
- package/dist/simples/input.d.ts +9 -9
- package/dist/simples/input.d.ts.map +1 -1
- package/dist/simples/input.js +13 -14
- package/dist/simples/input.js.map +1 -1
- package/dist/simples/locale.d.ts +4 -0
- package/dist/simples/locale.d.ts.map +1 -0
- package/dist/simples/locale.js +8 -0
- package/dist/simples/locale.js.map +1 -0
- package/dist/simples/native-select.d.ts +9 -9
- package/dist/simples/native-select.d.ts.map +1 -1
- package/dist/simples/native-select.js +29 -28
- package/dist/simples/native-select.js.map +1 -1
- package/dist/simples/number-input.d.ts +9 -9
- package/dist/simples/number-input.d.ts.map +1 -1
- package/dist/simples/number-input.js +27 -27
- package/dist/simples/number-input.js.map +1 -1
- package/dist/simples/password-input.d.ts.map +1 -1
- package/dist/simples/password-input.js +24 -20
- package/dist/simples/password-input.js.map +1 -1
- package/dist/simples/pin-input.d.ts +9 -9
- package/dist/simples/pin-input.d.ts.map +1 -1
- package/dist/simples/pin-input.js +30 -29
- package/dist/simples/pin-input.js.map +1 -1
- package/dist/simples/radio-group.d.ts.map +1 -1
- package/dist/simples/radio-group.js +44 -43
- package/dist/simples/radio-group.js.map +1 -1
- package/dist/simples/segment-group.d.ts +8 -0
- package/dist/simples/segment-group.d.ts.map +1 -1
- package/dist/simples/segment-group.js +66 -52
- package/dist/simples/segment-group.js.map +1 -1
- package/dist/simples/switch.d.ts.map +1 -1
- package/dist/simples/switch.js +18 -12
- package/dist/simples/switch.js.map +1 -1
- package/dist/simples/tags-input.d.ts.map +1 -1
- package/dist/simples/tags-input.js +44 -39
- package/dist/simples/tags-input.js.map +1 -1
- package/dist/simples/toggle.d.ts +9 -9
- package/dist/simples/toggle.d.ts.map +1 -1
- package/dist/simples/toggle.js +24 -23
- package/dist/simples/toggle.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
3
|
-
import { useFieldContext as
|
|
4
|
-
import { useRadioGroupContext as
|
|
3
|
+
import { useFieldContext as p } from "@ark-ui/react/field";
|
|
4
|
+
import { useRadioGroupContext as b, RadioGroup as d } from "@ark-ui/react/radio-group";
|
|
5
|
+
import { tv as f } from "tailwind-variants";
|
|
5
6
|
import { cn as l } from "../lib/cn.js";
|
|
7
|
+
import { controlSizes as g, controlMinHeight as v } from "../lib/control-size.js";
|
|
6
8
|
import { FieldLabel as u } from "./field.js";
|
|
7
|
-
const
|
|
8
|
-
const { className:
|
|
9
|
+
const z = b, j = (t) => {
|
|
10
|
+
const { className: o, children: a, columns: e, style: s, slot: n, ...m } = t, r = p();
|
|
9
11
|
return /* @__PURE__ */ i(
|
|
10
|
-
|
|
12
|
+
d.Root,
|
|
11
13
|
{
|
|
12
14
|
className: l(
|
|
13
15
|
e === void 0 ? "flex flex-col gap-3" : "grid gap-3",
|
|
14
16
|
e === "auto" && "grid-cols-[repeat(auto-fit,minmax(8.5rem,1fr))]",
|
|
15
17
|
typeof e == "number" && "grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
|
|
16
18
|
"data-invalid:text-destructive dark:data-invalid:text-destructive-foreground",
|
|
17
|
-
|
|
19
|
+
o
|
|
18
20
|
),
|
|
19
21
|
disabled: r == null ? void 0 : r.disabled,
|
|
20
22
|
invalid: r == null ? void 0 : r.invalid,
|
|
21
23
|
readOnly: r == null ? void 0 : r.readOnly,
|
|
22
24
|
required: r == null ? void 0 : r.required,
|
|
23
25
|
style: typeof e == "number" ? { "--columns": e, ...s } : s,
|
|
24
|
-
...
|
|
26
|
+
...m,
|
|
25
27
|
"data-slot": n ?? "radio-group",
|
|
26
|
-
children:
|
|
28
|
+
children: a
|
|
27
29
|
}
|
|
28
30
|
);
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
+
}, x = f({
|
|
32
|
+
base: ["inline-flex items-center gap-2", "text-sm", "data-disabled:opacity-64"],
|
|
33
|
+
variants: { labelled: { true: [g.md, v] } }
|
|
34
|
+
}), H = (t) => {
|
|
35
|
+
const { tabIndex: o, className: a, children: e, slot: s, ...n } = t;
|
|
31
36
|
return /* @__PURE__ */ c(
|
|
32
|
-
|
|
37
|
+
d.Item,
|
|
33
38
|
{
|
|
34
|
-
className: l(
|
|
35
|
-
"inline-flex items-center gap-2",
|
|
36
|
-
"data-disabled:opacity-64",
|
|
37
|
-
t
|
|
38
|
-
),
|
|
39
|
+
className: l(x({ labelled: e != null }), a),
|
|
39
40
|
...n,
|
|
40
41
|
"data-slot": s ?? "radio-group-item",
|
|
41
42
|
children: [
|
|
42
43
|
/* @__PURE__ */ i(
|
|
43
|
-
|
|
44
|
+
d.ItemControl,
|
|
44
45
|
{
|
|
45
46
|
className: l(
|
|
46
47
|
"relative",
|
|
@@ -62,15 +63,15 @@ const k = m, I = (a) => {
|
|
|
62
63
|
"data-slot": "radio-group-item-control"
|
|
63
64
|
}
|
|
64
65
|
),
|
|
65
|
-
/* @__PURE__ */ i(
|
|
66
|
-
/* @__PURE__ */ i(
|
|
66
|
+
/* @__PURE__ */ i(h, { children: e }),
|
|
67
|
+
/* @__PURE__ */ i(d.ItemHiddenInput, { tabIndex: o })
|
|
67
68
|
]
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
|
-
},
|
|
71
|
-
const { tabIndex:
|
|
71
|
+
}, L = (t) => {
|
|
72
|
+
const { tabIndex: o, className: a, children: e, slot: s, ...n } = t;
|
|
72
73
|
return /* @__PURE__ */ c(
|
|
73
|
-
|
|
74
|
+
d.Item,
|
|
74
75
|
{
|
|
75
76
|
className: l(
|
|
76
77
|
"relative flex cursor-pointer gap-2 rounded-field border border-input bg-transparent p-3 transition-colors",
|
|
@@ -98,52 +99,52 @@ const k = m, I = (a) => {
|
|
|
98
99
|
"data-disabled:pointer-events-none data-disabled:opacity-64",
|
|
99
100
|
"has-data-focus-visible:border-primary has-data-focus-visible:ring-[3px] has-data-focus-visible:ring-ring",
|
|
100
101
|
"data-invalid:border-destructive",
|
|
101
|
-
|
|
102
|
+
a
|
|
102
103
|
),
|
|
103
104
|
...n,
|
|
104
105
|
"data-slot": s ?? "radio-group-card",
|
|
105
106
|
children: [
|
|
106
107
|
e,
|
|
107
|
-
/* @__PURE__ */ i(
|
|
108
|
+
/* @__PURE__ */ i(d.ItemHiddenInput, { tabIndex: o })
|
|
108
109
|
]
|
|
109
110
|
}
|
|
110
111
|
);
|
|
111
|
-
},
|
|
112
|
-
const { className:
|
|
112
|
+
}, q = (t) => {
|
|
113
|
+
const { className: o, slot: a, ...e } = t;
|
|
113
114
|
return /* @__PURE__ */ i(
|
|
114
|
-
|
|
115
|
+
d.ItemControl,
|
|
115
116
|
{
|
|
116
117
|
className: l(
|
|
117
118
|
"inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-input bg-field shadow-xs/5",
|
|
118
119
|
"before:size-1.5 before:rounded-full",
|
|
119
120
|
"data-[state=checked]:bg-primary data-[state=checked]:before:bg-primary-foreground",
|
|
120
|
-
|
|
121
|
+
o
|
|
121
122
|
),
|
|
122
123
|
...e,
|
|
123
|
-
"data-slot":
|
|
124
|
+
"data-slot": a ?? "radio-group-indicator"
|
|
124
125
|
}
|
|
125
126
|
);
|
|
126
|
-
},
|
|
127
|
-
const { className:
|
|
127
|
+
}, h = (t) => {
|
|
128
|
+
const { className: o, children: a, slot: e, ...s } = t;
|
|
128
129
|
return /* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(
|
|
129
|
-
|
|
130
|
+
d.ItemText,
|
|
130
131
|
{
|
|
131
132
|
...s,
|
|
132
133
|
"data-slot": e ?? "radio-group-item-text",
|
|
133
|
-
children:
|
|
134
|
+
children: a
|
|
134
135
|
}
|
|
135
136
|
) });
|
|
136
|
-
},
|
|
137
|
-
const { children:
|
|
138
|
-
return /* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(
|
|
137
|
+
}, w = (t) => {
|
|
138
|
+
const { children: o, slot: a, ...e } = t;
|
|
139
|
+
return /* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(d.Label, { ...e, "data-slot": a ?? "radio-group-label", children: o }) });
|
|
139
140
|
};
|
|
140
141
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
j as RadioGroup,
|
|
143
|
+
L as RadioGroupCard,
|
|
144
|
+
q as RadioGroupIndicator,
|
|
145
|
+
H as RadioGroupItem,
|
|
146
|
+
w as RadioGroupLabel,
|
|
147
|
+
h as RadioGroupText,
|
|
148
|
+
z as useRadioGroup
|
|
148
149
|
};
|
|
149
150
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../../src/simples/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { type UseFieldContext, useFieldContext } from \"@ark-ui/react/field\";\nimport {\n RadioGroup as ArkRadioGroup,\n useRadioGroupContext,\n} from \"@ark-ui/react/radio-group\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { FieldLabel } from \"./field\";\n\nexport const useRadioGroup = useRadioGroupContext;\n\nexport interface RadioGroupProps\n extends React.ComponentProps<typeof ArkRadioGroup.Root> {\n /**\n * Lay the items out as a grid instead of the default column. `\"auto\"` fits as many\n * card-width tracks as the container allows; a number pins the count.\n *\n * A declared addition to Shark's file, and the whole of what the deleted `CardRadioGroup`\n * added over this compound. Distinct from Ark's `orientation`, which is arrow-key direction\n * and not layout. The count is written to a `--columns` custom property rather than a class,\n * so a responsive count stays CSS and needs no second prop:\n * `columns={1} className=\"sm:[--columns:2] lg:[--columns:4]\"`.\n */\n columns?: number | \"auto\";\n}\n\n// Divergence from Shark, declared: Ark 5.37.2's `useRadioGroup` bridges `useFieldsetContext`\n// (disabled/invalid/legend id) but NOT `useFieldContext` — grep `dist/components` and radio-group\n// is one of only two form machines with zero `useFieldContext` imports (Slider is the other; the\n// thirteen single-control machines all have one). Ark's Field docs only claim \"most\" components\n// support the context and there is no upstream issue, so this reads as an unfilled gap, not a\n// decision. Shark neither bridges nor documents it: its docs say \"use the `invalid` prop on\n// RadioGroup\", and its own TanStack example wraps `<Field invalid>` around a RadioGroup that\n// never turns red. We bridge it, so `invalid` is stated once on the Field.\n//\n// State flags only, never `field.ids`: Field addresses ONE control, and a radio group has one\n// hidden input per item, so there is no single id for its label to point at — `FieldSet` +\n// `FieldLegend` remains the right labelling container. Explicit props still win, and with no\n// `Field` ancestor every flag is `undefined`, which Ark strips before it reaches the machine, so\n// the built-in Fieldset bridge is untouched.\nexport const RadioGroup = (props: RadioGroupProps) => {\n const { className, children, columns, style, slot, ...rest } = props;\n\n const field: UseFieldContext | undefined = useFieldContext();\n\n return (\n <ArkRadioGroup.Root\n className={cn(\n columns === undefined ? \"flex flex-col gap-3\" : \"grid gap-3\",\n columns === \"auto\" && \"grid-cols-[repeat(auto-fit,minmax(8.5rem,1fr))]\",\n typeof columns === \"number\" &&\n \"grid-cols-[repeat(var(--columns),minmax(0,1fr))]\",\n \"data-invalid:text-destructive dark:data-invalid:text-destructive-foreground\",\n className\n )}\n disabled={field?.disabled}\n invalid={field?.invalid}\n readOnly={field?.readOnly}\n required={field?.required}\n style={\n typeof columns === \"number\"\n ? ({ \"--columns\": columns, ...style } as React.CSSProperties)\n : style\n }\n {...rest}\n data-slot={slot ?? \"radio-group\"}\n >\n {children}\n </ArkRadioGroup.Root>\n );\n};\n\nexport const RadioGroupItem = (\n props: React.ComponentProps<typeof ArkRadioGroup.Item>\n) => {\n const { tabIndex, className, children, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.Item\n className={cn(\n \"inline-flex items-center gap-2\",\n \"data-disabled:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"radio-group-item\"}\n >\n <ArkRadioGroup.ItemControl\n className={cn(\n \"relative\",\n \"inline-flex shrink-0 items-center justify-center\",\n \"size-4\",\n \"border border-input shadow-xs/5\",\n \"bg-field\",\n \"rounded-full\",\n \"before:size-1.5 before:rounded-full\",\n \"data-focus-visible:border-primary data-focus-visible:ring-[3px] data-focus-visible:ring-ring data-focus-visible:ring-offset-1 data-focus-visible:ring-offset-background\",\n // No border clause here: `data-invalid` below already paints it solid `--destructive`,\n // and the `/64` this used to carry made focus *weaken* the boundary 1.4.11 asks 3:1 of.\n \"data-focus-visible:data-invalid:ring-destructive/48\",\n \"data-invalid:border-destructive data-invalid:text-destructive-foreground data-invalid:ring-[3px] data-invalid:ring-destructive/24\",\n \"dark:data-invalid:text-destructive-foreground dark:data-invalid:ring-[3px]\",\n \"data-[state=checked]:bg-primary data-[state=checked]:before:bg-primary-foreground\",\n \"data-invalid:data-[state=checked]:bg-transparent data-invalid:data-[state=checked]:before:bg-destructive-foreground\"\n )}\n data-slot=\"radio-group-item-control\"\n />\n\n <RadioGroupText>{children}</RadioGroupText>\n\n <ArkRadioGroup.ItemHiddenInput tabIndex={tabIndex} />\n </ArkRadioGroup.Item>\n );\n};\n\n// A card-shaped option: raw children (compose label/description/preview/indicator yourself),\n// full radio semantics from Ark, the selected look driven by `data-[state=checked]`. This is\n// what \"card radio\" is — the same machine styled as a card, not a separate component.\nexport const RadioGroupCard = (\n props: React.ComponentProps<typeof ArkRadioGroup.Item>\n) => {\n const { tabIndex, className, children, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.Item\n className={cn(\n \"relative flex cursor-pointer gap-2 rounded-field border border-input bg-transparent p-3 transition-colors\",\n // The rest state is the backdrop (`bg-transparent`) and a card can sit anywhere, so no\n // solid and no percentage is right everywhere: a 50% `bg-accent` measures ΔE 0.00 from rest\n // on an accent backdrop and solid `bg-secondary` measures 0.00 on a secondary one — a hover\n // and a selected state a user cannot see, on the surface each is most likely to meet. Both\n // are therefore alpha steps, composited onto whatever is under them.\n //\n // **Selected is the BRAND's step and hover is the neutral's**, which is the half worth not\n // undoing: the border already goes `--primary` when checked, so a neutral fill under a\n // brand border was the one place a tenant's palette stopped at the outline. It is also what\n // the reference does — shadcn's choice card is `border-primary` over a 5% `--primary`.\n //\n // Measured 2026-08-20 over `packages/theme/palettes/*.css` — six documents × two modes ×\n // the six surfaces a card can sit on (background, card, popover, muted, secondary, accent),\n // 72 pairs. Floors, light / dark: rest→hover ΔE 3.34 / 5.32, rest→selected 5.81 / 9.46,\n // hover→selected **1.46 / 3.47**. That last figure is the one to read before changing this:\n // the neutral `base-a5` it replaced measured 2.73 / 3.03 there, so the fill alone separates\n // hover from selected LESS well than it did. **`border-input` → `border-primary` is what\n // carries that step**, and it is a far larger signal than either fill; the fill's own job is\n // rest→selected, which improved. Take the border away and this stops being measured.\n \"hover:bg-foreground/14\",\n \"data-[state=checked]:border-primary data-[state=checked]:bg-primary/17\",\n \"data-disabled:pointer-events-none data-disabled:opacity-64\",\n \"has-data-focus-visible:border-primary has-data-focus-visible:ring-[3px] has-data-focus-visible:ring-ring\",\n \"data-invalid:border-destructive\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"radio-group-card\"}\n >\n {children}\n <ArkRadioGroup.ItemHiddenInput tabIndex={tabIndex} />\n </ArkRadioGroup.Item>\n );\n};\n\n// The visual radio dot, no semantics of its own — drop it inside a card to show selection.\nexport const RadioGroupIndicator = (\n props: React.ComponentProps<typeof ArkRadioGroup.ItemControl>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.ItemControl\n className={cn(\n \"inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-input bg-field shadow-xs/5\",\n \"before:size-1.5 before:rounded-full\",\n \"data-[state=checked]:bg-primary data-[state=checked]:before:bg-primary-foreground\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"radio-group-indicator\"}\n />\n );\n};\n\nexport const RadioGroupText = (\n props: React.ComponentProps<typeof ArkRadioGroup.ItemText>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <FieldLabel asChild>\n <ArkRadioGroup.ItemText\n {...rest}\n data-slot={slot ?? \"radio-group-item-text\"}\n >\n {children}\n </ArkRadioGroup.ItemText>\n </FieldLabel>\n );\n};\n\nexport const RadioGroupLabel = (\n props: React.ComponentProps<typeof ArkRadioGroup.Label>\n) => {\n const { children, slot, ...rest } = props;\n\n return (\n <FieldLabel asChild>\n <ArkRadioGroup.Label {...rest} data-slot={slot ?? \"radio-group-label\"}>\n {children}\n </ArkRadioGroup.Label>\n </FieldLabel>\n );\n};\n"],"names":[],"mappings":";;;;;;AAWO;AAgCL;AAIA;AACE;AAAe;AAAd;AACY;AACuC;AAC1B;AAEpB;AACF;AACA;AAAA;AAEe;AACD;AACC;AACA;AAIX;AAEF;AACe;AAElB;AAAA;AAGP;AAKE;AAEA;AACE;AAAe;AAAd;AACY;AACT;AACA;AACA;AAAA;AAEE;AACe;AAEnB;AAAA;AAAe;AAAd;AACY;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AAAA;AAEQ;AAAA;AAAA;AAGc;AAEyB;AAAA;AAAA;AAGzD;AAQE;AAEA;AACE;AAAe;AAAd;AACY;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEE;AACe;AAElB;AAAA;AACkD;AAAA;AAAA;AAGzD;AAME;AAEA;AACE;AAAe;AAAd;AACY;AACT;AACA;AACA;AACA;AAAA;AAEE;AACe;AAAA;AAGzB;AAKE;AAEA;AAEI;AAAe;AAAd;AACK;AACe;AAElB;AAAA;AAIT;AAKE;AAEA;AAOF;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../src/simples/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { type UseFieldContext, useFieldContext } from \"@ark-ui/react/field\";\nimport {\n RadioGroup as ArkRadioGroup,\n useRadioGroupContext,\n} from \"@ark-ui/react/radio-group\";\nimport type React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\nimport { controlMinHeight, controlSizes } from \"../lib/control-size\";\nimport { FieldLabel } from \"./field\";\n\nexport const useRadioGroup = useRadioGroupContext;\n\nexport interface RadioGroupProps\n extends React.ComponentProps<typeof ArkRadioGroup.Root> {\n /**\n * Lay the items out as a grid instead of the default column. `\"auto\"` fits as many\n * card-width tracks as the container allows; a number pins the count.\n *\n * A declared addition to Shark's file, and the whole of what the deleted `CardRadioGroup`\n * added over this compound. Distinct from Ark's `orientation`, which is arrow-key direction\n * and not layout. The count is written to a `--columns` custom property rather than a class,\n * so a responsive count stays CSS and needs no second prop:\n * `columns={1} className=\"sm:[--columns:2] lg:[--columns:4]\"`.\n */\n columns?: number | \"auto\";\n}\n\n// Divergence from Shark, declared: Ark 5.37.2's `useRadioGroup` bridges `useFieldsetContext`\n// (disabled/invalid/legend id) but NOT `useFieldContext` — grep `dist/components` and radio-group\n// is one of only two form machines with zero `useFieldContext` imports (Slider is the other; the\n// thirteen single-control machines all have one). Ark's Field docs only claim \"most\" components\n// support the context and there is no upstream issue, so this reads as an unfilled gap, not a\n// decision. Shark neither bridges nor documents it: its docs say \"use the `invalid` prop on\n// RadioGroup\", and its own TanStack example wraps `<Field invalid>` around a RadioGroup that\n// never turns red. We bridge it, so `invalid` is stated once on the Field.\n//\n// State flags only, never `field.ids`: Field addresses ONE control, and a radio group has one\n// hidden input per item, so there is no single id for its label to point at — `FieldSet` +\n// `FieldLegend` remains the right labelling container. Explicit props still win, and with no\n// `Field` ancestor every flag is `undefined`, which Ark strips before it reaches the machine, so\n// the built-in Fieldset bridge is untouched.\nexport const RadioGroup = (props: RadioGroupProps) => {\n const { className, children, columns, style, slot, ...rest } = props;\n\n const field: UseFieldContext | undefined = useFieldContext();\n\n return (\n <ArkRadioGroup.Root\n className={cn(\n columns === undefined ? \"flex flex-col gap-3\" : \"grid gap-3\",\n columns === \"auto\" && \"grid-cols-[repeat(auto-fit,minmax(8.5rem,1fr))]\",\n typeof columns === \"number\" &&\n \"grid-cols-[repeat(var(--columns),minmax(0,1fr))]\",\n \"data-invalid:text-destructive dark:data-invalid:text-destructive-foreground\",\n className\n )}\n disabled={field?.disabled}\n invalid={field?.invalid}\n readOnly={field?.readOnly}\n required={field?.required}\n style={\n typeof columns === \"number\"\n ? ({ \"--columns\": columns, ...style } as React.CSSProperties)\n : style\n }\n {...rest}\n data-slot={slot ?? \"radio-group\"}\n >\n {children}\n </ArkRadioGroup.Root>\n );\n};\n\n/**\n * The row an indicator and its label sit in. **Labelled, it is one control tall** — the shared\n * height, centred — so a switch, a checkbox or a radio lines up with an input beside it and with the\n * rows above and below in a form. Alone (no children: a cell in a table) it is the indicator and\n * nothing else, and the height is not asked of it.\n */\nconst radioGroupItemVariants = tv({\n base: [\"inline-flex items-center gap-2\", \"text-sm\", \"data-disabled:opacity-64\"],\n variants: { labelled: { true: [controlSizes.md, controlMinHeight] } },\n});\n\nexport const RadioGroupItem = (\n props: React.ComponentProps<typeof ArkRadioGroup.Item>\n) => {\n const { tabIndex, className, children, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.Item\n className={cn(radioGroupItemVariants({ labelled: children != null }), className)}\n {...rest}\n data-slot={slot ?? \"radio-group-item\"}\n >\n <ArkRadioGroup.ItemControl\n className={cn(\n \"relative\",\n \"inline-flex shrink-0 items-center justify-center\",\n \"size-4\",\n \"border border-input shadow-xs/5\",\n \"bg-field\",\n \"rounded-full\",\n \"before:size-1.5 before:rounded-full\",\n \"data-focus-visible:border-primary data-focus-visible:ring-[3px] data-focus-visible:ring-ring data-focus-visible:ring-offset-1 data-focus-visible:ring-offset-background\",\n // No border clause here: `data-invalid` below already paints it solid `--destructive`,\n // and the `/64` this used to carry made focus *weaken* the boundary 1.4.11 asks 3:1 of.\n \"data-focus-visible:data-invalid:ring-destructive/48\",\n \"data-invalid:border-destructive data-invalid:text-destructive-foreground data-invalid:ring-[3px] data-invalid:ring-destructive/24\",\n \"dark:data-invalid:text-destructive-foreground dark:data-invalid:ring-[3px]\",\n \"data-[state=checked]:bg-primary data-[state=checked]:before:bg-primary-foreground\",\n \"data-invalid:data-[state=checked]:bg-transparent data-invalid:data-[state=checked]:before:bg-destructive-foreground\"\n )}\n data-slot=\"radio-group-item-control\"\n />\n\n <RadioGroupText>{children}</RadioGroupText>\n\n <ArkRadioGroup.ItemHiddenInput tabIndex={tabIndex} />\n </ArkRadioGroup.Item>\n );\n};\n\n// A card-shaped option: raw children (compose label/description/preview/indicator yourself),\n// full radio semantics from Ark, the selected look driven by `data-[state=checked]`. This is\n// what \"card radio\" is — the same machine styled as a card, not a separate component.\nexport const RadioGroupCard = (\n props: React.ComponentProps<typeof ArkRadioGroup.Item>\n) => {\n const { tabIndex, className, children, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.Item\n className={cn(\n \"relative flex cursor-pointer gap-2 rounded-field border border-input bg-transparent p-3 transition-colors\",\n // The rest state is the backdrop (`bg-transparent`) and a card can sit anywhere, so no\n // solid and no percentage is right everywhere: a 50% `bg-accent` measures ΔE 0.00 from rest\n // on an accent backdrop and solid `bg-secondary` measures 0.00 on a secondary one — a hover\n // and a selected state a user cannot see, on the surface each is most likely to meet. Both\n // are therefore alpha steps, composited onto whatever is under them.\n //\n // **Selected is the BRAND's step and hover is the neutral's**, which is the half worth not\n // undoing: the border already goes `--primary` when checked, so a neutral fill under a\n // brand border was the one place a tenant's palette stopped at the outline. It is also what\n // the reference does — shadcn's choice card is `border-primary` over a 5% `--primary`.\n //\n // Measured 2026-08-20 over `packages/theme/palettes/*.css` — six documents × two modes ×\n // the six surfaces a card can sit on (background, card, popover, muted, secondary, accent),\n // 72 pairs. Floors, light / dark: rest→hover ΔE 3.34 / 5.32, rest→selected 5.81 / 9.46,\n // hover→selected **1.46 / 3.47**. That last figure is the one to read before changing this:\n // the neutral `base-a5` it replaced measured 2.73 / 3.03 there, so the fill alone separates\n // hover from selected LESS well than it did. **`border-input` → `border-primary` is what\n // carries that step**, and it is a far larger signal than either fill; the fill's own job is\n // rest→selected, which improved. Take the border away and this stops being measured.\n \"hover:bg-foreground/14\",\n \"data-[state=checked]:border-primary data-[state=checked]:bg-primary/17\",\n \"data-disabled:pointer-events-none data-disabled:opacity-64\",\n \"has-data-focus-visible:border-primary has-data-focus-visible:ring-[3px] has-data-focus-visible:ring-ring\",\n \"data-invalid:border-destructive\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"radio-group-card\"}\n >\n {children}\n <ArkRadioGroup.ItemHiddenInput tabIndex={tabIndex} />\n </ArkRadioGroup.Item>\n );\n};\n\n// The visual radio dot, no semantics of its own — drop it inside a card to show selection.\nexport const RadioGroupIndicator = (\n props: React.ComponentProps<typeof ArkRadioGroup.ItemControl>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkRadioGroup.ItemControl\n className={cn(\n \"inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-input bg-field shadow-xs/5\",\n \"before:size-1.5 before:rounded-full\",\n \"data-[state=checked]:bg-primary data-[state=checked]:before:bg-primary-foreground\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"radio-group-indicator\"}\n />\n );\n};\n\nexport const RadioGroupText = (\n props: React.ComponentProps<typeof ArkRadioGroup.ItemText>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <FieldLabel asChild>\n <ArkRadioGroup.ItemText\n {...rest}\n data-slot={slot ?? \"radio-group-item-text\"}\n >\n {children}\n </ArkRadioGroup.ItemText>\n </FieldLabel>\n );\n};\n\nexport const RadioGroupLabel = (\n props: React.ComponentProps<typeof ArkRadioGroup.Label>\n) => {\n const { children, slot, ...rest } = props;\n\n return (\n <FieldLabel asChild>\n <ArkRadioGroup.Label {...rest} data-slot={slot ?? \"radio-group-label\"}>\n {children}\n </ArkRadioGroup.Label>\n </FieldLabel>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAaO;AAgCL;AAIA;AACE;AAAe;AAAd;AACY;AACuC;AAC1B;AAEpB;AACF;AACA;AAAA;AAEe;AACD;AACC;AACA;AAIX;AAEF;AACe;AAElB;AAAA;AAGP;AAQkC;AAC8C;AAEhF;AAKE;AAEA;AACE;AAAe;AAAd;AACgF;AAC3E;AACe;AAEnB;AAAA;AAAe;AAAd;AACY;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AAAA;AAEQ;AAAA;AAAA;AAGc;AAEyB;AAAA;AAAA;AAGzD;AAQE;AAEA;AACE;AAAe;AAAd;AACY;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEE;AACe;AAElB;AAAA;AACkD;AAAA;AAAA;AAGzD;AAME;AAEA;AACE;AAAe;AAAd;AACY;AACT;AACA;AACA;AACA;AAAA;AAEE;AACe;AAAA;AAGzB;AAKE;AAEA;AAEI;AAAe;AAAd;AACK;AACe;AAElB;AAAA;AAIT;AAKE;AAEA;AAOF;;;;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SegmentGroup as ArkSegmentGroup } from '@ark-ui/react/segment-group';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
import { controlSizes } from '../lib/control-size';
|
|
3
4
|
export declare const useSegmentGroup: () => import('@ark-ui/react').UseSegmentGroupContext;
|
|
4
5
|
type SegmentGroupVariant = "default" | "underline" | "solid";
|
|
5
6
|
export interface SegmentGroupOption {
|
|
@@ -14,6 +15,13 @@ interface SegmentGroupProps extends React.ComponentProps<typeof ArkSegmentGroup.
|
|
|
14
15
|
* @default "default"
|
|
15
16
|
*/
|
|
16
17
|
variant?: SegmentGroupVariant;
|
|
18
|
+
/**
|
|
19
|
+
* The height of a segment row: the same token, and the same height, as an `Input` of that size.
|
|
20
|
+
* A vertical group stacks rows of that height.
|
|
21
|
+
*
|
|
22
|
+
* @default "md"
|
|
23
|
+
*/
|
|
24
|
+
size?: keyof typeof controlSizes;
|
|
17
25
|
/** Data-driven items rendered before `children` (additive with the compound API). */
|
|
18
26
|
options?: readonly SegmentGroupOption[];
|
|
19
27
|
/** Extra classes applied to each `options`-rendered item. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-group.d.ts","sourceRoot":"","sources":["../../src/simples/segment-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"segment-group.d.ts","sourceRoot":"","sources":["../../src/simples/segment-group.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,IAAI,eAAe,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,eAAO,MAAM,eAAe,sDAAyB,CAAC;AAEtD,KAAK,mBAAmB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,iBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;IACzD;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;IACjC,qFAAqF;IACrF,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACxC,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAKD,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,sBAkEpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,sBA6BzD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,sBAW7D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,sBA8B9D,CAAC"}
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useFieldContext as h } from "@ark-ui/react/field";
|
|
4
|
+
import { useSegmentGroupContext as b, SegmentGroup as i } from "@ark-ui/react/segment-group";
|
|
5
|
+
import { cn as s } from "../lib/cn.js";
|
|
6
|
+
import { controlSizes as f } from "../lib/control-size.js";
|
|
7
|
+
const j = b, C = (e) => {
|
|
5
8
|
const {
|
|
6
9
|
orientation: a = "horizontal",
|
|
7
10
|
variant: r = "default",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
size: n = "md",
|
|
12
|
+
options: d,
|
|
13
|
+
itemClassName: m,
|
|
14
|
+
className: p,
|
|
15
|
+
children: g,
|
|
16
|
+
slot: c,
|
|
17
|
+
...v
|
|
18
|
+
} = e, t = h();
|
|
19
|
+
return /* @__PURE__ */ u(
|
|
20
|
+
i.Root,
|
|
17
21
|
{
|
|
18
|
-
className:
|
|
22
|
+
className: s(
|
|
19
23
|
"group/segment-group relative",
|
|
20
24
|
"flex gap-2",
|
|
25
|
+
f[n],
|
|
26
|
+
// A horizontal group is one control tall, whatever its variant: the track's border and
|
|
27
|
+
// padding are inside that height, so the segments are what is left of it. Vertical is a
|
|
28
|
+
// stack of them.
|
|
29
|
+
"data-[orientation=horizontal]:h-(--size)",
|
|
21
30
|
"isolate",
|
|
22
31
|
"data-[orientation=vertical]:flex-col",
|
|
23
32
|
"data-disabled:opacity-64",
|
|
@@ -30,35 +39,40 @@ const N = c, w = (e) => {
|
|
|
30
39
|
// (ΔE 0.00–1.65), and step 5 is `--accent`. `--border` moved from 5 to 6 precisely so a
|
|
31
40
|
// border and a hover surface would stop being the same colour.
|
|
32
41
|
"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
|
-
|
|
42
|
+
p
|
|
34
43
|
),
|
|
35
44
|
"data-variant": r,
|
|
45
|
+
disabled: t == null ? void 0 : t.disabled,
|
|
46
|
+
invalid: t == null ? void 0 : t.invalid,
|
|
36
47
|
orientation: a,
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
readOnly: t == null ? void 0 : t.readOnly,
|
|
49
|
+
required: t == null ? void 0 : t.required,
|
|
50
|
+
...v,
|
|
51
|
+
"data-slot": c ?? "segment-group",
|
|
39
52
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
/* @__PURE__ */ o(y, {}),
|
|
54
|
+
d == null ? void 0 : d.map((l) => /* @__PURE__ */ o(
|
|
55
|
+
x,
|
|
43
56
|
{
|
|
44
|
-
value:
|
|
45
|
-
disabled:
|
|
46
|
-
className:
|
|
47
|
-
children: /* @__PURE__ */
|
|
57
|
+
value: l.value,
|
|
58
|
+
disabled: l.disabled,
|
|
59
|
+
className: s("px-3", m),
|
|
60
|
+
children: /* @__PURE__ */ o(z, { className: "flex items-center justify-center gap-2 text-sm font-medium", children: l.label })
|
|
48
61
|
},
|
|
49
|
-
|
|
62
|
+
l.value
|
|
50
63
|
)),
|
|
51
|
-
|
|
64
|
+
g
|
|
52
65
|
]
|
|
53
66
|
}
|
|
54
67
|
);
|
|
55
|
-
},
|
|
56
|
-
const { className: a, children: r, slot:
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
68
|
+
}, x = (e) => {
|
|
69
|
+
const { className: a, children: r, slot: n, ...d } = e;
|
|
70
|
+
return /* @__PURE__ */ u(
|
|
71
|
+
i.Item,
|
|
59
72
|
{
|
|
60
|
-
className:
|
|
73
|
+
className: s(
|
|
61
74
|
"relative z-1",
|
|
75
|
+
"data-[orientation=horizontal]:h-full data-[orientation=vertical]:h-(--size)",
|
|
62
76
|
"inline-flex items-center justify-center",
|
|
63
77
|
"cursor-pointer select-none",
|
|
64
78
|
"text-sm font-medium text-muted-foreground transition-colors",
|
|
@@ -70,31 +84,31 @@ const N = c, w = (e) => {
|
|
|
70
84
|
"data-disabled:pointer-events-none data-disabled:opacity-64",
|
|
71
85
|
a
|
|
72
86
|
),
|
|
73
|
-
...
|
|
74
|
-
"data-slot":
|
|
87
|
+
...d,
|
|
88
|
+
"data-slot": n ?? "segment-group-item",
|
|
75
89
|
children: [
|
|
76
90
|
r,
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ o(i.ItemControl, {}),
|
|
92
|
+
/* @__PURE__ */ o(i.ItemHiddenInput, {})
|
|
79
93
|
]
|
|
80
94
|
}
|
|
81
95
|
);
|
|
82
|
-
},
|
|
83
|
-
const { className: a, slot: r, ...
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
96
|
+
}, z = (e) => {
|
|
97
|
+
const { className: a, slot: r, ...n } = e;
|
|
98
|
+
return /* @__PURE__ */ o(
|
|
99
|
+
i.ItemText,
|
|
86
100
|
{
|
|
87
|
-
className:
|
|
88
|
-
...
|
|
101
|
+
className: s("relative z-1", a),
|
|
102
|
+
...n,
|
|
89
103
|
"data-slot": r ?? "segment-group-item-text"
|
|
90
104
|
}
|
|
91
105
|
);
|
|
92
|
-
},
|
|
93
|
-
const { className: a, slot: r, ...
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
106
|
+
}, y = (e) => {
|
|
107
|
+
const { className: a, slot: r, ...n } = e;
|
|
108
|
+
return /* @__PURE__ */ o(
|
|
109
|
+
i.Indicator,
|
|
96
110
|
{
|
|
97
|
-
className:
|
|
111
|
+
className: s(
|
|
98
112
|
"absolute top-(--top) left-(--left) z-0",
|
|
99
113
|
"h-(--height) w-(--width)",
|
|
100
114
|
"rounded-[inherit]",
|
|
@@ -114,16 +128,16 @@ const N = c, w = (e) => {
|
|
|
114
128
|
"motion-reduce:transition-none!",
|
|
115
129
|
a
|
|
116
130
|
),
|
|
117
|
-
...
|
|
131
|
+
...n,
|
|
118
132
|
"data-slot": r ?? "segment-group-indicator"
|
|
119
133
|
}
|
|
120
134
|
);
|
|
121
135
|
};
|
|
122
136
|
export {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
137
|
+
C as SegmentGroup,
|
|
138
|
+
y as SegmentGroupIndicator,
|
|
139
|
+
x as SegmentGroupItem,
|
|
140
|
+
z as SegmentGroupItemText,
|
|
141
|
+
j as useSegmentGroup
|
|
128
142
|
};
|
|
129
143
|
//# sourceMappingURL=segment-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-group.js","sources":["../../src/simples/segment-group.tsx"],"sourcesContent":["
|
|
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\";\nimport { controlSizes } from \"../lib/control-size\";\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 /**\n * The height of a segment row: the same token, and the same height, as an `Input` of that size.\n * A vertical group stacks rows of that height.\n *\n * @default \"md\"\n */\n size?: keyof typeof controlSizes;\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 size = \"md\",\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 controlSizes[size],\n // A horizontal group is one control tall, whatever its variant: the track's border and\n // padding are inside that height, so the segments are what is left of it. Vertical is a\n // stack of them.\n \"data-[orientation=horizontal]:h-(--size)\",\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\", 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 \"data-[orientation=horizontal]:h-full data-[orientation=vertical]:h-(--size)\",\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":";;;;;;AAWO;AAmCL;AAAM;AACU;AACJ;AACH;AACP;AACA;AACA;AACA;AACA;AACG;AAKL;AACE;AAAiB;AAAhB;AACY;AACT;AACA;AACiB;AAAA;AAAA;AAAA;AAIjB;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;AACuB;AAInC;AAAA;AAPO;AAAA;AAWV;AAAA;AAAA;AAGP;AAKE;AAEA;AACE;AAAiB;AAAhB;AACY;AACT;AACA;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;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/simples/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAoB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/simples/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAoB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,SAAS,gDAAmB,CAAC;AAa1C,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,sBAyExE,CAAC"}
|
package/dist/simples/switch.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useSwitchContext as l, Switch as t } from "@ark-ui/react/switch";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { tv as u } from "tailwind-variants";
|
|
4
|
+
import { cn as i } from "../lib/cn.js";
|
|
5
|
+
import { controlSizes as h, controlMinHeight as p } from "../lib/control-size.js";
|
|
6
|
+
const x = l, m = u({
|
|
7
|
+
base: ["inline-flex items-center gap-2", "text-sm", "data-disabled:opacity-64"],
|
|
8
|
+
variants: { labelled: { true: [h.md, p] } }
|
|
9
|
+
}), k = (r) => {
|
|
10
|
+
const { children: e, className: s, tabIndex: n, slot: o, ...c } = r;
|
|
6
11
|
return /* @__PURE__ */ d(
|
|
7
12
|
t.Root,
|
|
8
13
|
{
|
|
9
|
-
className:
|
|
14
|
+
className: i(
|
|
10
15
|
"group/switch",
|
|
11
16
|
"[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]",
|
|
12
|
-
"
|
|
13
|
-
"data-disabled:pointer-events-none
|
|
14
|
-
|
|
17
|
+
"w-fit",
|
|
18
|
+
"data-disabled:pointer-events-none",
|
|
19
|
+
m({ labelled: e !== void 0 }),
|
|
20
|
+
s
|
|
15
21
|
),
|
|
16
22
|
...c,
|
|
17
23
|
"data-slot": o ?? "switch",
|
|
@@ -19,7 +25,7 @@ const m = l, g = (s) => {
|
|
|
19
25
|
/* @__PURE__ */ a(
|
|
20
26
|
t.Control,
|
|
21
27
|
{
|
|
22
|
-
className:
|
|
28
|
+
className: i(
|
|
23
29
|
"h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)]",
|
|
24
30
|
"p-px",
|
|
25
31
|
"flex shrink-0 items-center",
|
|
@@ -40,7 +46,7 @@ const m = l, g = (s) => {
|
|
|
40
46
|
children: /* @__PURE__ */ a(
|
|
41
47
|
t.Thumb,
|
|
42
48
|
{
|
|
43
|
-
className:
|
|
49
|
+
className: i(
|
|
44
50
|
"block",
|
|
45
51
|
"aspect-square h-full w-auto",
|
|
46
52
|
"bg-background",
|
|
@@ -58,14 +64,14 @@ const m = l, g = (s) => {
|
|
|
58
64
|
)
|
|
59
65
|
}
|
|
60
66
|
),
|
|
61
|
-
|
|
67
|
+
e === void 0 ? null : /* @__PURE__ */ a(t.Label, { className: "text-sm leading-none", "data-slot": "switch-label", children: e }),
|
|
62
68
|
/* @__PURE__ */ a(t.HiddenInput, { tabIndex: n })
|
|
63
69
|
]
|
|
64
70
|
}
|
|
65
71
|
);
|
|
66
72
|
};
|
|
67
73
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
k as Switch,
|
|
75
|
+
x as useSwitch
|
|
70
76
|
};
|
|
71
77
|
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sources":["../../src/simples/switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, useSwitchContext } from \"@ark-ui/react/switch\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport const useSwitch = useSwitchContext;\n\nexport const Switch = (props: React.ComponentProps<typeof ArkSwitch.Root>) => {\n const { children, className, tabIndex, slot, ...rest } = props;\n\n return (\n <ArkSwitch.Root\n className={cn(\n \"group/switch\",\n \"[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]\",\n \"
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../../src/simples/switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, useSwitchContext } from \"@ark-ui/react/switch\";\nimport type React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\nimport { controlMinHeight, controlSizes } from \"../lib/control-size\";\n\nexport const useSwitch = useSwitchContext;\n\n/**\n * The row an indicator and its label sit in. **Labelled, it is one control tall** — the shared\n * height, centred — so a switch, a checkbox or a radio lines up with an input beside it and with the\n * rows above and below in a form. Alone (no children: a cell in a table) it is the indicator and\n * nothing else, and the height is not asked of it.\n */\nconst switchRowVariants = tv({\n base: [\"inline-flex items-center gap-2\", \"text-sm\", \"data-disabled:opacity-64\"],\n variants: { labelled: { true: [controlSizes.md, controlMinHeight] } },\n});\n\nexport const Switch = (props: React.ComponentProps<typeof ArkSwitch.Root>) => {\n const { children, className, tabIndex, slot, ...rest } = props;\n\n return (\n <ArkSwitch.Root\n className={cn(\n \"group/switch\",\n \"[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]\",\n \"w-fit\",\n \"data-disabled:pointer-events-none\",\n switchRowVariants({ labelled: children !== undefined }),\n className\n )}\n {...rest}\n data-slot={slot ?? \"switch\"}\n >\n {/* The track, and everything that used to be on the root.\n **It moved because the root has to be able to hold a label.** `children` were accepted by\n the type and rendered nowhere: the root is Ark's `<label for=…>` and carried the track's\n own box, so a caller passing text got a bare toggle with **no accessible name at all** —\n measured on `/docs/forms/switch`, whose own example passes one. WCAG 4.1.2, and the ring\n is the reason this is a part rather than a wrapper: on the root it would have drawn around\n the label too. */}\n <ArkSwitch.Control\n className={cn(\n \"h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)]\",\n \"p-px\",\n \"flex shrink-0 items-center\",\n \"rounded-full border border-transparent\",\n \"transition-all\",\n \"outline-none group-data-[focus-visible]/switch:ring-[3px] group-data-invalid/switch:ring-[3px]\",\n \"group-data-[focus-visible]/switch:border-primary group-data-[focus-visible]/switch:ring-ring\",\n \"group-data-invalid/switch:border-destructive group-data-invalid/switch:ring-destructive/24\",\n \"group-data-[state=checked]/switch:bg-primary\",\n // The track IS this control's boundary — `border` is transparent — and the thumb is\n // `bg-background`, so the track is the only thing that says the switch is off. A surface\n // step puts the thumb at ~1.07:1 against it and the off state stops being readable, which\n // is 1.4.11 asking about a *state*, not about a fill. Boundary contrast, spelled as a fill.\n \"group-data-[state=unchecked]/switch:bg-input\",\n \"motion-reduce:transition-none!\"\n )}\n data-slot=\"switch-control\"\n >\n <ArkSwitch.Thumb\n className={cn(\n \"block\",\n \"aspect-square h-full w-auto\",\n \"bg-background\",\n \"rounded-full ring-0\",\n \"pointer-events-none\",\n \"transition-transform\",\n \"data-[state=checked]:translate-x-[calc(var(--thumb-size)-4px)]\",\n \"dark:data-[state=checked]:bg-primary-foreground\",\n \"data-[state=unchecked]:translate-x-0\",\n \"dark:data-[state=unchecked]:bg-foreground\",\n \"motion-reduce:transition-none!\"\n )}\n data-slot=\"switch-thumb\"\n />\n </ArkSwitch.Control>\n\n {/* Not a second export: Shark ships `Switch` and `useSwitch` and nothing else, and this stays\n one component that renders its own parts — the same argument the docs page already makes\n about Control, Thumb and HiddenInput. */}\n {children === undefined ? null : (\n <ArkSwitch.Label className=\"text-sm leading-none\" data-slot=\"switch-label\">\n {children}\n </ArkSwitch.Label>\n )}\n\n <ArkSwitch.HiddenInput tabIndex={tabIndex} />\n </ArkSwitch.Root>\n );\n};\n"],"names":["useSwitch","useSwitchContext","switchRowVariants","tv","controlSizes","controlMinHeight","Switch","props","children","className","tabIndex","slot","rest","jsxs","ArkSwitch","cn","jsx"],"mappings":";;;;;AAMO,MAAMA,IAAYC,GAQnBC,IAAoBC,EAAG;AAAA,EAC3B,MAAM,CAAC,kCAAkC,WAAW,0BAA0B;AAAA,EAC9E,UAAU,EAAE,UAAU,EAAE,MAAM,CAACC,EAAa,IAAIC,CAAgB,EAAA,EAAE;AACpE,CAAC,GAEYC,IAAS,CAACC,MAAuD;AAC5E,QAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,UAAAC,GAAU,MAAAC,GAAM,GAAGC,MAASL;AAEzD,SACE,gBAAAM;AAAA,IAACC,EAAU;AAAA,IAAV;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAb,EAAkB,EAAE,UAAUM,MAAa,QAAW;AAAA,QACtDC;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,MASnB,UAAA;AAAA,QAAA,gBAAAK;AAAA,UAACF,EAAU;AAAA,UAAV;AAAA,YACC,WAAWC;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA;AAAA;AAAA;AAAA,cAKA;AAAA,cACA;AAAA,YAAA;AAAA,YAEF,aAAU;AAAA,YAEV,UAAA,gBAAAC;AAAA,cAACF,EAAU;AAAA,cAAV;AAAA,gBACC,WAAWC;AAAA,kBACT;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,gBAAA;AAAA,gBAEF,aAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,QAMDP,MAAa,SAAY,OACxB,gBAAAQ,EAACF,EAAU,OAAV,EAAgB,WAAU,wBAAuB,aAAU,gBACzD,UAAAN,EAAA,CACH;AAAA,QAGF,gBAAAQ,EAACF,EAAU,aAAV,EAAsB,UAAAJ,EAAA,CAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags-input.d.ts","sourceRoot":"","sources":["../../src/simples/tags-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,YAAY,EAG1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tags-input.d.ts","sourceRoot":"","sources":["../../src/simples/tags-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,YAAY,EAG1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,mGAAkB,CAAC;AAE5C,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,mDAAyB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,uDAAuB,CAAC;AAErD,eAAO,MAAM,SAAS,GACpB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,sBAiBtD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,sBAe9D,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,sBAWvD,CAAC;AAEF,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;qDA8B5B,CAAC;AAEH,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,OAAO,CAAC,EACvD,YAAY,CAAC,OAAO,wBAAwB,CAAC;CAAG;AAEpD,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,sBAW5D,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,sBAoBvD,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,sBAetD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,WAAW,CAAC,sBAqB7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,QAAQ,CAAC,sBAW1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,sBAkB3D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,iBAAiB,CAAC,sBAwBnE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,sBAyB9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,mBAGlC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,WAAW,CAAC,sBAKvD,CAAC"}
|