@craftzbay/ui 0.11.2 → 0.11.4
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-lib/_virtual/_rolldown/runtime.js +11 -0
- package/dist-lib/components/ui/Accordion.js +42 -67
- package/dist-lib/components/ui/Accordion.js.map +1 -1
- package/dist-lib/components/ui/Alert.js +71 -77
- package/dist-lib/components/ui/Alert.js.map +1 -1
- package/dist-lib/components/ui/Avatar.js +67 -92
- package/dist-lib/components/ui/Avatar.js.map +1 -1
- package/dist-lib/components/ui/Badge.js +119 -74
- package/dist-lib/components/ui/Badge.js.map +1 -1
- package/dist-lib/components/ui/Breadcrumbs.js +62 -50
- package/dist-lib/components/ui/Breadcrumbs.js.map +1 -1
- package/dist-lib/components/ui/Button.js +129 -127
- package/dist-lib/components/ui/Button.js.map +1 -1
- package/dist-lib/components/ui/Calendar.d.ts +1 -1
- package/dist-lib/components/ui/Calendar.js +99 -136
- package/dist-lib/components/ui/Calendar.js.map +1 -1
- package/dist-lib/components/ui/Card.js +88 -94
- package/dist-lib/components/ui/Card.js.map +1 -1
- package/dist-lib/components/ui/Carousel.js +125 -170
- package/dist-lib/components/ui/Carousel.js.map +1 -1
- package/dist-lib/components/ui/Chart.d.ts +3 -3
- package/dist-lib/components/ui/Chart.js +435 -464
- package/dist-lib/components/ui/Chart.js.map +1 -1
- package/dist-lib/components/ui/Checkbox.js +60 -69
- package/dist-lib/components/ui/Checkbox.js.map +1 -1
- package/dist-lib/components/ui/Combobox.js +179 -192
- package/dist-lib/components/ui/Combobox.js.map +1 -1
- package/dist-lib/components/ui/CommandPalette.d.ts +2 -2
- package/dist-lib/components/ui/CommandPalette.js +106 -167
- package/dist-lib/components/ui/CommandPalette.js.map +1 -1
- package/dist-lib/components/ui/ContextMenu.d.ts +1 -1
- package/dist-lib/components/ui/ContextMenu.js +89 -154
- package/dist-lib/components/ui/ContextMenu.js.map +1 -1
- package/dist-lib/components/ui/DataGrid.d.ts +1 -1
- package/dist-lib/components/ui/DataGrid.js +99 -96
- package/dist-lib/components/ui/DataGrid.js.map +1 -1
- package/dist-lib/components/ui/DatePicker.js +151 -188
- package/dist-lib/components/ui/DatePicker.js.map +1 -1
- package/dist-lib/components/ui/DesignSystemProvider.d.ts +1 -1
- package/dist-lib/components/ui/DesignSystemProvider.js +120 -130
- package/dist-lib/components/ui/DesignSystemProvider.js.map +1 -1
- package/dist-lib/components/ui/Dialog.d.ts +3 -3
- package/dist-lib/components/ui/Dialog.js +108 -156
- package/dist-lib/components/ui/Dialog.js.map +1 -1
- package/dist-lib/components/ui/Drawer.d.ts +3 -3
- package/dist-lib/components/ui/Drawer.js +90 -124
- package/dist-lib/components/ui/Drawer.js.map +1 -1
- package/dist-lib/components/ui/DropdownMenu.d.ts +1 -1
- package/dist-lib/components/ui/DropdownMenu.js +92 -158
- package/dist-lib/components/ui/DropdownMenu.js.map +1 -1
- package/dist-lib/components/ui/EmptyState.js +31 -44
- package/dist-lib/components/ui/EmptyState.js.map +1 -1
- package/dist-lib/components/ui/ErrorState.js +57 -67
- package/dist-lib/components/ui/ErrorState.js.map +1 -1
- package/dist-lib/components/ui/FileUpload.js +113 -107
- package/dist-lib/components/ui/FileUpload.js.map +1 -1
- package/dist-lib/components/ui/Form.d.ts +6 -4
- package/dist-lib/components/ui/Form.js +117 -122
- package/dist-lib/components/ui/Form.js.map +1 -1
- package/dist-lib/components/ui/Icon.d.ts +1 -1
- package/dist-lib/components/ui/Icon.js +30 -29
- package/dist-lib/components/ui/Icon.js.map +1 -1
- package/dist-lib/components/ui/IconButton.js +61 -61
- package/dist-lib/components/ui/IconButton.js.map +1 -1
- package/dist-lib/components/ui/Input.js +133 -156
- package/dist-lib/components/ui/Input.js.map +1 -1
- package/dist-lib/components/ui/Kbd.js +14 -21
- package/dist-lib/components/ui/Kbd.js.map +1 -1
- package/dist-lib/components/ui/MultiSelect.js +176 -208
- package/dist-lib/components/ui/MultiSelect.js.map +1 -1
- package/dist-lib/components/ui/Pagination.js +152 -149
- package/dist-lib/components/ui/Pagination.js.map +1 -1
- package/dist-lib/components/ui/Popover.js +18 -33
- package/dist-lib/components/ui/Popover.js.map +1 -1
- package/dist-lib/components/ui/Progress.js +77 -99
- package/dist-lib/components/ui/Progress.js.map +1 -1
- package/dist-lib/components/ui/RadioGroup.js +51 -80
- package/dist-lib/components/ui/RadioGroup.js.map +1 -1
- package/dist-lib/components/ui/RelativeTime.js +22 -29
- package/dist-lib/components/ui/RelativeTime.js.map +1 -1
- package/dist-lib/components/ui/ScrollArea.js +39 -58
- package/dist-lib/components/ui/ScrollArea.js.map +1 -1
- package/dist-lib/components/ui/Select.js +108 -131
- package/dist-lib/components/ui/Select.js.map +1 -1
- package/dist-lib/components/ui/Separator.js +18 -24
- package/dist-lib/components/ui/Separator.js.map +1 -1
- package/dist-lib/components/ui/Sheet.d.ts +2 -2
- package/dist-lib/components/ui/Sheet.js +77 -129
- package/dist-lib/components/ui/Sheet.js.map +1 -1
- package/dist-lib/components/ui/Sidebar.d.ts +1 -1
- package/dist-lib/components/ui/Sidebar.js +168 -207
- package/dist-lib/components/ui/Sidebar.js.map +1 -1
- package/dist-lib/components/ui/Skeleton.js +17 -27
- package/dist-lib/components/ui/Skeleton.js.map +1 -1
- package/dist-lib/components/ui/Slider.js +45 -62
- package/dist-lib/components/ui/Slider.js.map +1 -1
- package/dist-lib/components/ui/Snackbar.js +75 -55
- package/dist-lib/components/ui/Snackbar.js.map +1 -1
- package/dist-lib/components/ui/Spinner.js +45 -52
- package/dist-lib/components/ui/Spinner.js.map +1 -1
- package/dist-lib/components/ui/Stepper.js +56 -108
- package/dist-lib/components/ui/Stepper.js.map +1 -1
- package/dist-lib/components/ui/Switch.js +46 -79
- package/dist-lib/components/ui/Switch.js.map +1 -1
- package/dist-lib/components/ui/Table.js +108 -169
- package/dist-lib/components/ui/Table.js.map +1 -1
- package/dist-lib/components/ui/Tabs.js +57 -88
- package/dist-lib/components/ui/Tabs.js.map +1 -1
- package/dist-lib/components/ui/TagInput.js +76 -109
- package/dist-lib/components/ui/TagInput.js.map +1 -1
- package/dist-lib/components/ui/Textarea.js +74 -86
- package/dist-lib/components/ui/Textarea.js.map +1 -1
- package/dist-lib/components/ui/Timeline.d.ts +3 -3
- package/dist-lib/components/ui/Timeline.js +61 -49
- package/dist-lib/components/ui/Timeline.js.map +1 -1
- package/dist-lib/components/ui/Toast.d.ts +1 -1
- package/dist-lib/components/ui/Toast.js +136 -150
- package/dist-lib/components/ui/Toast.js.map +1 -1
- package/dist-lib/components/ui/Tooltip.d.ts +2 -2
- package/dist-lib/components/ui/Tooltip.js +35 -56
- package/dist-lib/components/ui/Tooltip.js.map +1 -1
- package/dist-lib/components/ui/TopNav.js +46 -66
- package/dist-lib/components/ui/TopNav.js.map +1 -1
- package/dist-lib/components/ui/Tree.js +134 -168
- package/dist-lib/components/ui/Tree.js.map +1 -1
- package/dist-lib/hooks/use-debounce.js +27 -33
- package/dist-lib/hooks/use-debounce.js.map +1 -1
- package/dist-lib/hooks/use-delayed-loading.js +19 -18
- package/dist-lib/hooks/use-delayed-loading.js.map +1 -1
- package/dist-lib/hooks/use-field-ids.js +14 -16
- package/dist-lib/hooks/use-field-ids.js.map +1 -1
- package/dist-lib/hooks/use-media-query.js +15 -19
- package/dist-lib/hooks/use-media-query.js.map +1 -1
- package/dist-lib/hooks/use-modifier-key.js +20 -15
- package/dist-lib/hooks/use-modifier-key.js.map +1 -1
- package/dist-lib/hooks/use-strings.js +10 -10
- package/dist-lib/hooks/use-strings.js.map +1 -1
- package/dist-lib/hooks/use-toast.js +73 -62
- package/dist-lib/hooks/use-toast.js.map +1 -1
- package/dist-lib/icon.js +2 -6
- package/dist-lib/icons/index.js +166 -163
- package/dist-lib/icons/index.js.map +1 -1
- package/dist-lib/illustrations/index.d.ts +7 -7
- package/dist-lib/illustrations/index.js +255 -106
- package/dist-lib/illustrations/index.js.map +1 -1
- package/dist-lib/index.js +69 -291
- package/dist-lib/lib/cva.js +2 -0
- package/dist-lib/lib/format.js +71 -87
- package/dist-lib/lib/format.js.map +1 -1
- package/dist-lib/lib/return-focus.js +11 -11
- package/dist-lib/lib/return-focus.js.map +1 -1
- package/dist-lib/lib/strings.js +167 -135
- package/dist-lib/lib/strings.js.map +1 -1
- package/dist-lib/lib/strings.mn.js +150 -113
- package/dist-lib/lib/strings.mn.js.map +1 -1
- package/dist-lib/lib/utils.js +9 -9
- package/dist-lib/lib/utils.js.map +1 -1
- package/dist-lib/styles.css +3 -1
- package/dist-lib/theme.css +18 -5
- package/package.json +50 -50
- package/dist-lib/__tests__/helpers/color.d.ts +0 -9
- package/dist-lib/__tests__/helpers/theme.d.ts +0 -18
- package/dist-lib/icon.js.map +0 -1
- package/dist-lib/index.js.map +0 -1
|
@@ -1,100 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
cx: e / 2,
|
|
80
|
-
cy: e / 2,
|
|
81
|
-
r: a,
|
|
82
|
-
strokeWidth: t,
|
|
83
|
-
strokeLinecap: "round",
|
|
84
|
-
strokeDasharray: i,
|
|
85
|
-
strokeDashoffset: r ? i * 0.7 : k,
|
|
86
|
-
className: m(y[d], "fill-none transition-[stroke-dashoffset]"),
|
|
87
|
-
transform: `rotate(-90 ${e / 2} ${e / 2})`
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
M.displayName = "ProgressCircle";
|
|
96
|
-
export {
|
|
97
|
-
w as Progress,
|
|
98
|
-
M as ProgressCircle
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=Progress.js.map
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { forwardRef as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "@radix-ui/react-progress";
|
|
6
|
+
//#region src/components/ui/Progress.tsx
|
|
7
|
+
var a = {
|
|
8
|
+
sm: "h-1",
|
|
9
|
+
md: "h-1.5",
|
|
10
|
+
lg: "h-2"
|
|
11
|
+
}, o = {
|
|
12
|
+
accent: "bg-accent",
|
|
13
|
+
success: "bg-success",
|
|
14
|
+
warning: "bg-warning",
|
|
15
|
+
danger: "bg-danger"
|
|
16
|
+
}, s = t(function({ className: t, value: r, max: s = 100, size: c = "md", tone: l = "accent", ...u }, d) {
|
|
17
|
+
let f = r == null || Number.isNaN(r), p = s > 0 ? s : 100, m = f ? 0 : Math.min(p, Math.max(0, r)), h = m / p * 100;
|
|
18
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
19
|
+
ref: d,
|
|
20
|
+
value: f ? void 0 : m,
|
|
21
|
+
max: p,
|
|
22
|
+
className: e("bg-background-muted relative w-full overflow-hidden rounded-full", a[c], t),
|
|
23
|
+
...u,
|
|
24
|
+
children: /* @__PURE__ */ n(i.Indicator, {
|
|
25
|
+
className: e("h-full w-full flex-1 transition-transform", o[l], f && "animate-progress-indeterminate origin-left"),
|
|
26
|
+
"data-motion-keep": f ? "" : void 0,
|
|
27
|
+
style: f ? void 0 : { transform: `translateX(-${100 - h}%)` }
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
s.displayName = "Progress";
|
|
32
|
+
var c = {
|
|
33
|
+
sm: 24,
|
|
34
|
+
md: 36,
|
|
35
|
+
lg: 48
|
|
36
|
+
}, l = {
|
|
37
|
+
accent: "stroke-accent",
|
|
38
|
+
success: "stroke-success",
|
|
39
|
+
warning: "stroke-warning",
|
|
40
|
+
danger: "stroke-danger"
|
|
41
|
+
}, u = t(function({ value: t, size: i = "md", thickness: a = 3, className: o, tone: s = "accent", ...u }, d) {
|
|
42
|
+
let f = typeof i == "number" ? i : c[i], p = t === void 0 || Number.isNaN(t), m = p ? 0 : Math.min(100, Math.max(0, t)), h = (f - a) / 2, g = 2 * Math.PI * h, _ = p ? 0 : g - m / 100 * g;
|
|
43
|
+
return /* @__PURE__ */ r("svg", {
|
|
44
|
+
ref: d,
|
|
45
|
+
width: f,
|
|
46
|
+
height: f,
|
|
47
|
+
viewBox: `0 0 ${f} ${f}`,
|
|
48
|
+
role: "progressbar",
|
|
49
|
+
"aria-valuemin": 0,
|
|
50
|
+
"aria-valuemax": 100,
|
|
51
|
+
"aria-valuenow": p ? void 0 : m,
|
|
52
|
+
"data-motion-keep": p ? "" : void 0,
|
|
53
|
+
className: e("shrink-0", p && "animate-spin", o),
|
|
54
|
+
...u,
|
|
55
|
+
children: [/* @__PURE__ */ n("circle", {
|
|
56
|
+
cx: f / 2,
|
|
57
|
+
cy: f / 2,
|
|
58
|
+
r: h,
|
|
59
|
+
strokeWidth: a,
|
|
60
|
+
className: "stroke-background-muted fill-none"
|
|
61
|
+
}), /* @__PURE__ */ n("circle", {
|
|
62
|
+
cx: f / 2,
|
|
63
|
+
cy: f / 2,
|
|
64
|
+
r: h,
|
|
65
|
+
strokeWidth: a,
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeDasharray: g,
|
|
68
|
+
strokeDashoffset: p ? g * .7 : _,
|
|
69
|
+
className: e(l[s], "fill-none transition-[stroke-dashoffset]"),
|
|
70
|
+
transform: `rotate(-90 ${f / 2} ${f / 2})`
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
u.displayName = "ProgressCircle";
|
|
75
|
+
//#endregion
|
|
76
|
+
export { s as Progress, u as ProgressCircle };
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","sources":["../../../src/components/ui/Progress.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type SVGProps } from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Linear — bar that fills left-to-right.\n * Circular — SVG ring. Both support determinate (value 0..100) and\n * indeterminate (`value` omitted) states.\n * --------------------------------------------------------------------------- */\n\nexport interface ProgressProps extends Omit<\n ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>,\n 'value'\n> {\n /** 0–`max` (default 100). Clamped. Omit for indeterminate. */\n value?: number | null;\n /** Bar height. */\n size?: 'sm' | 'md' | 'lg';\n /** Visual tone. Use `success`/`danger` to colour-code completion state. */\n tone?: 'accent' | 'success' | 'warning' | 'danger';\n}\n\nconst heightMap = { sm: 'h-1', md: 'h-1.5', lg: 'h-2' } as const;\nconst fillTone = {\n accent: 'bg-accent',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n} as const;\n\n/**\n * Linear progress bar.\n *\n * @example\n * <Progress value={uploadPct} aria-label=\"Upload progress\" />\n * <Progress aria-label=\"Loading\" /> // indeterminate\n *\n * @do Always pair Progress with an `aria-label` describing what is progressing.\n * @dont Use a Progress for an unknown-completion task — use a Spinner.\n */\nexport const Progress = forwardRef<ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n function Progress({ className, value, max = 100, size = 'md', tone = 'accent', ...props }, ref) {\n const indeterminate = value === undefined || value === null || Number.isNaN(value);\n const safeMax = max > 0 ? max : 100;\n const clamped = indeterminate ? 0 : Math.min(safeMax, Math.max(0, value as number));\n const pct = (clamped / safeMax) * 100;\n return (\n <ProgressPrimitive.Root\n ref={ref}\n value={indeterminate ? undefined : clamped}\n max={safeMax}\n className={cn(\n 'bg-background-muted relative w-full overflow-hidden rounded-full',\n heightMap[size],\n className,\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\n 'h-full w-full flex-1 transition-transform',\n fillTone[tone],\n indeterminate && 'animate-progress-indeterminate origin-left',\n )}\n data-motion-keep={indeterminate ? '' : undefined}\n style={indeterminate ? undefined : { transform: `translateX(-${100 - pct}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n },\n);\nProgress.displayName = 'Progress';\n\nexport interface ProgressCircleProps extends SVGProps<SVGSVGElement> {\n /** 0–100. Omit for indeterminate. */\n value?: number;\n /** `sm` 24 / `md` 36 / `lg` 48, or an explicit pixel size. */\n size?: 'sm' | 'md' | 'lg' | number;\n /** Stroke thickness. */\n thickness?: number;\n /** Visible label for screen readers. */\n 'aria-label': string;\n tone?: 'accent' | 'success' | 'warning' | 'danger';\n}\n\nconst circleSize = { sm: 24, md: 36, lg: 48 } as const;\n\nconst circleTone = {\n accent: 'stroke-accent',\n success: 'stroke-success',\n warning: 'stroke-warning',\n danger: 'stroke-danger',\n} as const;\n\n/**\n * Circular progress ring. Pairs with a numeric label for percentage-style\n * indicators.\n *\n * @example\n * <ProgressCircle value={72} aria-label=\"Storage used\" />\n */\nexport const ProgressCircle = forwardRef<SVGSVGElement, ProgressCircleProps>(\n function ProgressCircle(\n { value, size: sizeProp = 'md', thickness = 3, className, tone = 'accent', ...props },\n ref,\n ) {\n const size = typeof sizeProp === 'number' ? sizeProp : circleSize[sizeProp];\n const isIndeterminate = value === undefined || Number.isNaN(value);\n const clamped = isIndeterminate ? 0 : Math.min(100, Math.max(0, value as number));\n const radius = (size - thickness) / 2;\n const circumference = 2 * Math.PI * radius;\n const offset = isIndeterminate ? 0 : circumference - (clamped / 100) * circumference;\n\n return (\n <svg\n ref={ref}\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={isIndeterminate ? undefined : clamped}\n data-motion-keep={isIndeterminate ? '' : undefined}\n className={cn('shrink-0', isIndeterminate && 'animate-spin', className)}\n {...props}\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n strokeWidth={thickness}\n className=\"stroke-background-muted fill-none\"\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n strokeWidth={thickness}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={isIndeterminate ? circumference * 0.7 : offset}\n className={cn(circleTone[tone], 'fill-none transition-[stroke-dashoffset]')}\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n />\n </svg>\n );\n },\n);\nProgressCircle.displayName = 'ProgressCircle';\n"],"
|
|
1
|
+
{"version":3,"file":"Progress.js","names":[],"sources":["../../../src/components/ui/Progress.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type SVGProps } from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Linear — bar that fills left-to-right.\n * Circular — SVG ring. Both support determinate (value 0..100) and\n * indeterminate (`value` omitted) states.\n * --------------------------------------------------------------------------- */\n\nexport interface ProgressProps extends Omit<\n ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>,\n 'value'\n> {\n /** 0–`max` (default 100). Clamped. Omit for indeterminate. */\n value?: number | null;\n /** Bar height. */\n size?: 'sm' | 'md' | 'lg';\n /** Visual tone. Use `success`/`danger` to colour-code completion state. */\n tone?: 'accent' | 'success' | 'warning' | 'danger';\n}\n\nconst heightMap = { sm: 'h-1', md: 'h-1.5', lg: 'h-2' } as const;\nconst fillTone = {\n accent: 'bg-accent',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n} as const;\n\n/**\n * Linear progress bar.\n *\n * @example\n * <Progress value={uploadPct} aria-label=\"Upload progress\" />\n * <Progress aria-label=\"Loading\" /> // indeterminate\n *\n * @do Always pair Progress with an `aria-label` describing what is progressing.\n * @dont Use a Progress for an unknown-completion task — use a Spinner.\n */\nexport const Progress = forwardRef<ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n function Progress({ className, value, max = 100, size = 'md', tone = 'accent', ...props }, ref) {\n const indeterminate = value === undefined || value === null || Number.isNaN(value);\n const safeMax = max > 0 ? max : 100;\n const clamped = indeterminate ? 0 : Math.min(safeMax, Math.max(0, value as number));\n const pct = (clamped / safeMax) * 100;\n return (\n <ProgressPrimitive.Root\n ref={ref}\n value={indeterminate ? undefined : clamped}\n max={safeMax}\n className={cn(\n 'bg-background-muted relative w-full overflow-hidden rounded-full',\n heightMap[size],\n className,\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\n 'h-full w-full flex-1 transition-transform',\n fillTone[tone],\n indeterminate && 'animate-progress-indeterminate origin-left',\n )}\n data-motion-keep={indeterminate ? '' : undefined}\n style={indeterminate ? undefined : { transform: `translateX(-${100 - pct}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n },\n);\nProgress.displayName = 'Progress';\n\nexport interface ProgressCircleProps extends SVGProps<SVGSVGElement> {\n /** 0–100. Omit for indeterminate. */\n value?: number;\n /** `sm` 24 / `md` 36 / `lg` 48, or an explicit pixel size. */\n size?: 'sm' | 'md' | 'lg' | number;\n /** Stroke thickness. */\n thickness?: number;\n /** Visible label for screen readers. */\n 'aria-label': string;\n tone?: 'accent' | 'success' | 'warning' | 'danger';\n}\n\nconst circleSize = { sm: 24, md: 36, lg: 48 } as const;\n\nconst circleTone = {\n accent: 'stroke-accent',\n success: 'stroke-success',\n warning: 'stroke-warning',\n danger: 'stroke-danger',\n} as const;\n\n/**\n * Circular progress ring. Pairs with a numeric label for percentage-style\n * indicators.\n *\n * @example\n * <ProgressCircle value={72} aria-label=\"Storage used\" />\n */\nexport const ProgressCircle = forwardRef<SVGSVGElement, ProgressCircleProps>(\n function ProgressCircle(\n { value, size: sizeProp = 'md', thickness = 3, className, tone = 'accent', ...props },\n ref,\n ) {\n const size = typeof sizeProp === 'number' ? sizeProp : circleSize[sizeProp];\n const isIndeterminate = value === undefined || Number.isNaN(value);\n const clamped = isIndeterminate ? 0 : Math.min(100, Math.max(0, value as number));\n const radius = (size - thickness) / 2;\n const circumference = 2 * Math.PI * radius;\n const offset = isIndeterminate ? 0 : circumference - (clamped / 100) * circumference;\n\n return (\n <svg\n ref={ref}\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={isIndeterminate ? undefined : clamped}\n data-motion-keep={isIndeterminate ? '' : undefined}\n className={cn('shrink-0', isIndeterminate && 'animate-spin', className)}\n {...props}\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n strokeWidth={thickness}\n className=\"stroke-background-muted fill-none\"\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n strokeWidth={thickness}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={isIndeterminate ? circumference * 0.7 : offset}\n className={cn(circleTone[tone], 'fill-none transition-[stroke-dashoffset]')}\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n />\n </svg>\n );\n },\n);\nProgressCircle.displayName = 'ProgressCircle';\n"],"mappings":";;;;;;AAwBA,IAAM,IAAY;CAAE,IAAI;CAAO,IAAI;CAAS,IAAI;AAAM,GAChD,IAAW;CACf,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;AACV,GAYa,IAAW,EACtB,SAAkB,EAAE,cAAW,UAAO,SAAM,KAAK,UAAO,MAAM,UAAO,UAAU,GAAG,KAAS,GAAK;CAC9F,IAAM,IAAgB,KAAiC,QAAQ,OAAO,MAAM,CAAK,GAC3E,IAAU,IAAM,IAAI,IAAM,KAC1B,IAAU,IAAgB,IAAI,KAAK,IAAI,GAAS,KAAK,IAAI,GAAG,CAAe,CAAC,GAC5E,IAAO,IAAU,IAAW;CAClC,OACE,kBAAC,EAAkB,MAAnB;EACO;EACL,OAAO,IAAgB,KAAA,IAAY;EACnC,KAAK;EACL,WAAW,EACT,oEACA,EAAU,IACV,CACF;EACA,GAAI;EAEJ,UAAA,kBAAC,EAAkB,WAAnB;GACE,WAAW,EACT,6CACA,EAAS,IACT,KAAiB,4CACnB;GACA,oBAAkB,IAAgB,KAAK,KAAA;GACvC,OAAO,IAAgB,KAAA,IAAY,EAAE,WAAW,eAAe,MAAM,EAAI,IAAI;EAC9E,CAAA;CACqB,CAAA;AAE5B,CACF;AACA,EAAS,cAAc;AAcvB,IAAM,IAAa;CAAE,IAAI;CAAI,IAAI;CAAI,IAAI;AAAG,GAEtC,IAAa;CACjB,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;AACV,GASa,IAAiB,EAC5B,SACE,EAAE,UAAO,MAAM,IAAW,MAAM,eAAY,GAAG,cAAW,UAAO,UAAU,GAAG,KAC9E,GACA;CACA,IAAM,IAAO,OAAO,KAAa,WAAW,IAAW,EAAW,IAC5D,IAAkB,MAAU,KAAA,KAAa,OAAO,MAAM,CAAK,GAC3D,IAAU,IAAkB,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,CAAe,CAAC,GAC1E,KAAU,IAAO,KAAa,GAC9B,IAAgB,IAAI,KAAK,KAAK,GAC9B,IAAS,IAAkB,IAAI,IAAiB,IAAU,MAAO;CAEvE,OACE,kBAAC,OAAD;EACO;EACL,OAAO;EACP,QAAQ;EACR,SAAS,OAAO,EAAK,GAAG;EACxB,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe,IAAkB,KAAA,IAAY;EAC7C,oBAAkB,IAAkB,KAAK,KAAA;EACzC,WAAW,EAAG,YAAY,KAAmB,gBAAgB,CAAS;EACtE,GAAI;EAXN,UAAA,CAaE,kBAAC,UAAD;GACE,IAAI,IAAO;GACX,IAAI,IAAO;GACX,GAAG;GACH,aAAa;GACb,WAAU;EACX,CAAA,GACD,kBAAC,UAAD;GACE,IAAI,IAAO;GACX,IAAI,IAAO;GACX,GAAG;GACH,aAAa;GACb,eAAc;GACd,iBAAiB;GACjB,kBAAkB,IAAkB,IAAgB,KAAM;GAC1D,WAAW,EAAG,EAAW,IAAO,0CAA0C;GAC1E,WAAW,cAAc,IAAO,EAAE,GAAG,IAAO,EAAE;EAC/C,CAAA,CACE;;AAET,CACF;AACA,EAAe,cAAc"}
|
|
@@ -1,81 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
...p,
|
|
55
|
-
children: /* @__PURE__ */ e(d.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "bg-accent size-2 rounded-full", "aria-hidden": !0 }) })
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
r && /* @__PURE__ */ c("div", { className: "flex flex-col gap-0.5", children: [
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
"label",
|
|
61
|
-
{
|
|
62
|
-
htmlFor: s,
|
|
63
|
-
className: i(
|
|
64
|
-
"text-foreground text-sm select-none",
|
|
65
|
-
l && "cursor-not-allowed opacity-50",
|
|
66
|
-
t && "sr-only"
|
|
67
|
-
),
|
|
68
|
-
children: r
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
o && /* @__PURE__ */ e("p", { id: n, className: "text-foreground-subtle text-xs", children: o })
|
|
72
|
-
] })
|
|
73
|
-
] });
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
N.displayName = "RadioItem";
|
|
77
|
-
export {
|
|
78
|
-
y as RadioGroup,
|
|
79
|
-
N as RadioItem
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=RadioGroup.js.map
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { forwardRef as t, useId as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import * as a from "@radix-ui/react-radio-group";
|
|
6
|
+
//#region src/components/ui/RadioGroup.tsx
|
|
7
|
+
var o = t(function({ className: t, orientation: n = "vertical", ...i }, o) {
|
|
8
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
9
|
+
ref: o,
|
|
10
|
+
orientation: n,
|
|
11
|
+
className: e("flex gap-3", n === "vertical" ? "flex-col" : "flex-row flex-wrap", t),
|
|
12
|
+
...i
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
o.displayName = "RadioGroup";
|
|
16
|
+
var s = t(function({ className: t, label: o, description: s, hideLabel: c, id: l, disabled: u, "aria-describedby": d, ...f }, p) {
|
|
17
|
+
let m = n(), h = l ?? m, g = s ? `${h}-desc` : void 0, _ = [g, d].filter(Boolean).join(" ") || void 0;
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
19
|
+
className: e("flex items-start gap-2.5", t),
|
|
20
|
+
children: [/* @__PURE__ */ r(a.Item, {
|
|
21
|
+
ref: p,
|
|
22
|
+
id: h,
|
|
23
|
+
disabled: u,
|
|
24
|
+
"aria-describedby": _,
|
|
25
|
+
className: e("bg-card relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border", "before:absolute before:-inset-1.5 before:rounded-full before:content-[\"\"]", "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]", "focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2", "data-[state=checked]:border-accent", "disabled:cursor-not-allowed disabled:opacity-50", "border-border-input aria-invalid:border-danger"),
|
|
26
|
+
...f,
|
|
27
|
+
children: /* @__PURE__ */ r(a.Indicator, {
|
|
28
|
+
className: "flex items-center justify-center",
|
|
29
|
+
children: /* @__PURE__ */ r("span", {
|
|
30
|
+
className: "bg-accent size-2 rounded-full",
|
|
31
|
+
"aria-hidden": !0
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
}), o && /* @__PURE__ */ i("div", {
|
|
35
|
+
className: "flex flex-col gap-0.5",
|
|
36
|
+
children: [/* @__PURE__ */ r("label", {
|
|
37
|
+
htmlFor: h,
|
|
38
|
+
className: e("text-foreground text-sm select-none", u && "cursor-not-allowed opacity-50", c && "sr-only"),
|
|
39
|
+
children: o
|
|
40
|
+
}), s && /* @__PURE__ */ r("p", {
|
|
41
|
+
id: g,
|
|
42
|
+
className: "text-foreground-subtle text-xs",
|
|
43
|
+
children: s
|
|
44
|
+
})]
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
s.displayName = "RadioItem";
|
|
49
|
+
//#endregion
|
|
50
|
+
export { o as RadioGroup, s as RadioItem };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sources":["../../../src/components/ui/RadioGroup.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useId,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type ReactNode,\n} from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { cn } from '@/lib/utils';\n\nexport interface RadioGroupProps extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** Lay out the radios vertically (default) or horizontally. Also drives arrow-key navigation. */\n orientation?: 'horizontal' | 'vertical';\n}\n\nexport const RadioGroup = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n function RadioGroup({ className, orientation = 'vertical', ...props }, ref) {\n return (\n <RadioGroupPrimitive.Root\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex gap-3',\n orientation === 'vertical' ? 'flex-col' : 'flex-row flex-wrap',\n className,\n )}\n {...props}\n />\n );\n },\n);\nRadioGroup.displayName = 'RadioGroup';\n\nexport interface RadioItemProps extends Omit<\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n 'asChild'\n> {\n label?: ReactNode;\n description?: ReactNode;\n hideLabel?: boolean;\n}\n\n/**\n * One radio option with inline label + description.\n *\n * @example\n * <RadioGroup defaultValue=\"weekly\">\n * <RadioItem value=\"daily\" label=\"Daily\" description=\"Every morning at 9am\" />\n * <RadioItem value=\"weekly\" label=\"Weekly\" description=\"Monday mornings\" />\n * <RadioItem value=\"never\" label=\"Never\" />\n * </RadioGroup>\n *\n * @do Pair every RadioItem with a label — naked radios are unreachable for\n * screen reader users.\n * @dont Use RadioGroup for binary choices — use Switch.\n */\nexport const RadioItem = forwardRef<ElementRef<typeof RadioGroupPrimitive.Item>, RadioItemProps>(\n function RadioItem(\n {\n className,\n label,\n description,\n hideLabel,\n id,\n disabled,\n 'aria-describedby': ariaDescribedby,\n ...props\n },\n ref,\n ) {\n const autoId = useId();\n const fieldId = id ?? autoId;\n const descId = description ? `${fieldId}-desc` : undefined;\n const describedBy = [descId, ariaDescribedby].filter(Boolean).join(' ') || undefined;\n\n return (\n <div className={cn('flex items-start gap-2.5', className)}>\n <RadioGroupPrimitive.Item\n ref={ref}\n id={fieldId}\n disabled={disabled}\n aria-describedby={describedBy}\n className={cn(\n 'bg-card relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border',\n // WCAG 2.5.8: 16px visual box, ≥24px hit area via an invisible inset halo.\n 'before:absolute before:-inset-1.5 before:rounded-full before:content-[\"\"]',\n 'transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]',\n 'focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'data-[state=checked]:border-accent',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'border-border-input aria-invalid:border-danger',\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"bg-accent size-2 rounded-full\" aria-hidden />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n\n {label && (\n <div className=\"flex flex-col gap-0.5\">\n <label\n htmlFor={fieldId}\n className={cn(\n 'text-foreground text-sm select-none',\n disabled && 'cursor-not-allowed opacity-50',\n hideLabel && 'sr-only',\n )}\n >\n {label}\n </label>\n {description && (\n <p id={descId} className=\"text-foreground-subtle text-xs\">\n {description}\n </p>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nRadioItem.displayName = 'RadioItem';\n"],"
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":[],"sources":["../../../src/components/ui/RadioGroup.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useId,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type ReactNode,\n} from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { cn } from '@/lib/utils';\n\nexport interface RadioGroupProps extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** Lay out the radios vertically (default) or horizontally. Also drives arrow-key navigation. */\n orientation?: 'horizontal' | 'vertical';\n}\n\nexport const RadioGroup = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n function RadioGroup({ className, orientation = 'vertical', ...props }, ref) {\n return (\n <RadioGroupPrimitive.Root\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex gap-3',\n orientation === 'vertical' ? 'flex-col' : 'flex-row flex-wrap',\n className,\n )}\n {...props}\n />\n );\n },\n);\nRadioGroup.displayName = 'RadioGroup';\n\nexport interface RadioItemProps extends Omit<\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n 'asChild'\n> {\n label?: ReactNode;\n description?: ReactNode;\n hideLabel?: boolean;\n}\n\n/**\n * One radio option with inline label + description.\n *\n * @example\n * <RadioGroup defaultValue=\"weekly\">\n * <RadioItem value=\"daily\" label=\"Daily\" description=\"Every morning at 9am\" />\n * <RadioItem value=\"weekly\" label=\"Weekly\" description=\"Monday mornings\" />\n * <RadioItem value=\"never\" label=\"Never\" />\n * </RadioGroup>\n *\n * @do Pair every RadioItem with a label — naked radios are unreachable for\n * screen reader users.\n * @dont Use RadioGroup for binary choices — use Switch.\n */\nexport const RadioItem = forwardRef<ElementRef<typeof RadioGroupPrimitive.Item>, RadioItemProps>(\n function RadioItem(\n {\n className,\n label,\n description,\n hideLabel,\n id,\n disabled,\n 'aria-describedby': ariaDescribedby,\n ...props\n },\n ref,\n ) {\n const autoId = useId();\n const fieldId = id ?? autoId;\n const descId = description ? `${fieldId}-desc` : undefined;\n const describedBy = [descId, ariaDescribedby].filter(Boolean).join(' ') || undefined;\n\n return (\n <div className={cn('flex items-start gap-2.5', className)}>\n <RadioGroupPrimitive.Item\n ref={ref}\n id={fieldId}\n disabled={disabled}\n aria-describedby={describedBy}\n className={cn(\n 'bg-card relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border',\n // WCAG 2.5.8: 16px visual box, ≥24px hit area via an invisible inset halo.\n 'before:absolute before:-inset-1.5 before:rounded-full before:content-[\"\"]',\n 'transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]',\n 'focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'data-[state=checked]:border-accent',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'border-border-input aria-invalid:border-danger',\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"bg-accent size-2 rounded-full\" aria-hidden />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n\n {label && (\n <div className=\"flex flex-col gap-0.5\">\n <label\n htmlFor={fieldId}\n className={cn(\n 'text-foreground text-sm select-none',\n disabled && 'cursor-not-allowed opacity-50',\n hideLabel && 'sr-only',\n )}\n >\n {label}\n </label>\n {description && (\n <p id={descId} className=\"text-foreground-subtle text-xs\">\n {description}\n </p>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nRadioItem.displayName = 'RadioItem';\n"],"mappings":";;;;;;AAiBA,IAAa,IAAa,EACxB,SAAoB,EAAE,cAAW,iBAAc,YAAY,GAAG,KAAS,GAAK;CAC1E,OACE,kBAAC,EAAoB,MAArB;EACO;EACQ;EACb,WAAW,EACT,cACA,MAAgB,aAAa,aAAa,sBAC1C,CACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AACA,EAAW,cAAc;AAyBzB,IAAa,IAAY,EACvB,SACE,EACE,cACA,UACA,gBACA,cACA,OACA,aACA,oBAAoB,GACpB,GAAG,KAEL,GACA;CACA,IAAM,IAAS,EAAM,GACf,IAAU,KAAM,GAChB,IAAS,IAAc,GAAG,EAAQ,SAAS,KAAA,GAC3C,IAAc,CAAC,GAAQ,CAAe,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CAE3E,OACE,kBAAC,OAAD;EAAK,WAAW,EAAG,4BAA4B,CAAS;EAAxD,UAAA,CACE,kBAAC,EAAoB,MAArB;GACO;GACL,IAAI;GACM;GACV,oBAAkB;GAClB,WAAW,EACT,gGAEA,+EACA,4EACA,8HACA,sCACA,mDACA,gDACF;GACA,GAAI;GAEJ,UAAA,kBAAC,EAAoB,WAArB;IAA+B,WAAU;IACvC,UAAA,kBAAC,QAAD;KAAM,WAAU;KAAgC,eAAA;IAAa,CAAA;GAChC,CAAA;EACP,CAAA,GAEzB,KACC,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,SAAD;IACE,SAAS;IACT,WAAW,EACT,uCACA,KAAY,iCACZ,KAAa,SACf;IAEC,UAAA;GACI,CAAA,GACN,KACC,kBAAC,KAAD;IAAG,IAAI;IAAQ,WAAU;IACtB,UAAA;GACA,CAAA,CAEF;EAEJ,CAAA,CAAA;;AAET,CACF;AACA,EAAU,cAAc"}
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { formatDate as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
dateTime: Number.isNaN(s.getTime()) ? void 0 : s.toISOString(),
|
|
20
|
-
title: u,
|
|
21
|
-
className: b("tabular", g),
|
|
22
|
-
...p,
|
|
23
|
-
children: i
|
|
24
|
-
}
|
|
25
|
-
);
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { formatString as t } from "../../lib/strings.js";
|
|
4
|
+
import { formatDate as n } from "../../lib/format.js";
|
|
5
|
+
import { useStrings as r } from "../../hooks/use-strings.js";
|
|
6
|
+
import { forwardRef as i } from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/ui/RelativeTime.tsx
|
|
9
|
+
var o = 6e4, s = 60 * o, c = 24 * s, l = i(function({ date: i, now: l, absolute: u, className: d, ...f }, p) {
|
|
10
|
+
let m = r().relativeTime, h = i instanceof Date ? i : new Date(i), g = l === void 0 ? Date.now() : l instanceof Date ? l.getTime() : l, _ = h.getTime() - g, v = Math.abs(_), y = _ > 0, b = n(h, u), x;
|
|
11
|
+
return x = v < o ? m.justNow : v < s ? t(y ? m.inMinutes : m.minutesAgo, { n: Math.round(v / o) }) : v < c ? t(y ? m.inHours : m.hoursAgo, { n: Math.round(v / s) }) : v < 30 * c ? t(y ? m.inDays : m.daysAgo, { n: Math.round(v / c) }) : b, /* @__PURE__ */ a("time", {
|
|
12
|
+
ref: p,
|
|
13
|
+
dateTime: Number.isNaN(h.getTime()) ? void 0 : h.toISOString(),
|
|
14
|
+
title: b,
|
|
15
|
+
className: e("tabular", d),
|
|
16
|
+
...f,
|
|
17
|
+
children: x
|
|
18
|
+
});
|
|
26
19
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=RelativeTime.js.map
|
|
20
|
+
l.displayName = "RelativeTime";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { l as RelativeTime };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=RelativeTime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelativeTime.js","sources":["../../../src/components/ui/RelativeTime.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type TimeHTMLAttributes } from 'react';\nimport { formatDate, type FormatDateOptions } from '@/lib/format';\nimport { formatString } from '@/lib/strings';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cn } from '@/lib/utils';\n\nexport interface RelativeTimeProps extends Omit<TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The instant to describe. */\n date: Date | number | string;\n /** Reference \"now\". Default `Date.now()` at render — pass one for stable SSR/tests. */\n now?: Date | number;\n /** Options for the absolute `title` (tooltip). */\n absolute?: FormatDateOptions;\n}\n\nconst MIN = 60_000;\nconst HOUR = 60 * MIN;\nconst DAY = 24 * HOUR;\n\n/**\n * `<time>` showing \"5 min ago\" with the absolute timestamp as `title` and a\n * machine-readable `dateTime`. Strings come from `UiStrings.relativeTime`.\n * Beyond 30 days it falls back to the absolute date so text never goes stale.\n *\n * @example\n * <RelativeTime date={post.createdAt} />\n */\nexport const RelativeTime = forwardRef<HTMLTimeElement, RelativeTimeProps>(function RelativeTime(\n { date, now, absolute, className, ...props },\n ref,\n) {\n const strings = useStrings().relativeTime;\n const d = date instanceof Date ? date : new Date(date);\n const ref_ = now === undefined ? Date.now() : now instanceof Date ? now.getTime() : now;\n const diff = d.getTime() - ref_;\n const abs = Math.abs(diff);\n const future = diff > 0;\n const title = formatDate(d, absolute);\n\n let label: string;\n if (abs < MIN) label = strings.justNow;\n else if (abs < HOUR)\n label = formatString(future ? strings.inMinutes : strings.minutesAgo, {\n n: Math.round(abs / MIN),\n });\n else if (abs < DAY)\n label = formatString(future ? strings.inHours : strings.hoursAgo, {\n n: Math.round(abs / HOUR),\n });\n else if (abs < 30 * DAY)\n label = formatString(future ? strings.inDays : strings.daysAgo, { n: Math.round(abs / DAY) });\n else label = title;\n\n return (\n <time\n ref={ref}\n dateTime={Number.isNaN(d.getTime()) ? undefined : d.toISOString()}\n title={title}\n className={cn('tabular', className)}\n {...props}\n >\n {label}\n </time>\n );\n});\nRelativeTime.displayName = 'RelativeTime';\n"],"
|
|
1
|
+
{"version":3,"file":"RelativeTime.js","names":[],"sources":["../../../src/components/ui/RelativeTime.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type TimeHTMLAttributes } from 'react';\nimport { formatDate, type FormatDateOptions } from '@/lib/format';\nimport { formatString } from '@/lib/strings';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cn } from '@/lib/utils';\n\nexport interface RelativeTimeProps extends Omit<TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The instant to describe. */\n date: Date | number | string;\n /** Reference \"now\". Default `Date.now()` at render — pass one for stable SSR/tests. */\n now?: Date | number;\n /** Options for the absolute `title` (tooltip). */\n absolute?: FormatDateOptions;\n}\n\nconst MIN = 60_000;\nconst HOUR = 60 * MIN;\nconst DAY = 24 * HOUR;\n\n/**\n * `<time>` showing \"5 min ago\" with the absolute timestamp as `title` and a\n * machine-readable `dateTime`. Strings come from `UiStrings.relativeTime`.\n * Beyond 30 days it falls back to the absolute date so text never goes stale.\n *\n * @example\n * <RelativeTime date={post.createdAt} />\n */\nexport const RelativeTime = forwardRef<HTMLTimeElement, RelativeTimeProps>(function RelativeTime(\n { date, now, absolute, className, ...props },\n ref,\n) {\n const strings = useStrings().relativeTime;\n const d = date instanceof Date ? date : new Date(date);\n const ref_ = now === undefined ? Date.now() : now instanceof Date ? now.getTime() : now;\n const diff = d.getTime() - ref_;\n const abs = Math.abs(diff);\n const future = diff > 0;\n const title = formatDate(d, absolute);\n\n let label: string;\n if (abs < MIN) label = strings.justNow;\n else if (abs < HOUR)\n label = formatString(future ? strings.inMinutes : strings.minutesAgo, {\n n: Math.round(abs / MIN),\n });\n else if (abs < DAY)\n label = formatString(future ? strings.inHours : strings.hoursAgo, {\n n: Math.round(abs / HOUR),\n });\n else if (abs < 30 * DAY)\n label = formatString(future ? strings.inDays : strings.daysAgo, { n: Math.round(abs / DAY) });\n else label = title;\n\n return (\n <time\n ref={ref}\n dateTime={Number.isNaN(d.getTime()) ? undefined : d.toISOString()}\n title={title}\n className={cn('tabular', className)}\n {...props}\n >\n {label}\n </time>\n );\n});\nRelativeTime.displayName = 'RelativeTime';\n"],"mappings":";;;;;;;;AAiBA,IAAM,IAAM,KACN,IAAO,KAAK,GACZ,IAAM,KAAK,GAUJ,IAAe,EAA+C,SACzE,EAAE,SAAM,QAAK,aAAU,cAAW,GAAG,KACrC,GACA;CACA,IAAM,IAAU,EAAW,CAAC,CAAC,cACvB,IAAI,aAAgB,OAAO,IAAO,IAAI,KAAK,CAAI,GAC/C,IAAO,MAAQ,KAAA,IAAY,KAAK,IAAI,IAAI,aAAe,OAAO,EAAI,QAAQ,IAAI,GAC9E,IAAO,EAAE,QAAQ,IAAI,GACrB,IAAM,KAAK,IAAI,CAAI,GACnB,IAAS,IAAO,GAChB,IAAQ,EAAW,GAAG,CAAQ,GAEhC;CAcJ,OAbA,AAWK,IAXD,IAAM,IAAa,EAAQ,UACtB,IAAM,IACL,EAAa,IAAS,EAAQ,YAAY,EAAQ,YAAY,EACpE,GAAG,KAAK,MAAM,IAAM,CAAG,EACzB,CAAC,IACM,IAAM,IACL,EAAa,IAAS,EAAQ,UAAU,EAAQ,UAAU,EAChE,GAAG,KAAK,MAAM,IAAM,CAAI,EAC1B,CAAC,IACM,IAAM,KAAK,IACV,EAAa,IAAS,EAAQ,SAAS,EAAQ,SAAS,EAAE,GAAG,KAAK,MAAM,IAAM,CAAG,EAAE,CAAC,IACjF,GAGX,kBAAC,QAAD;EACO;EACL,UAAU,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAI,KAAA,IAAY,EAAE,YAAY;EACzD;EACP,WAAW,EAAG,WAAW,CAAS;EAClC,GAAI;EAEH,UAAA;CACG,CAAA;AAEV,CAAC;AACD,EAAa,cAAc"}
|
|
@@ -1,60 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
children: r
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
/* @__PURE__ */ l(t, {}),
|
|
31
|
-
/* @__PURE__ */ l(o.Corner, {})
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
p.displayName = "ScrollArea";
|
|
38
|
-
const t = s(function({ className: e, orientation: r = "vertical", ...a }, i) {
|
|
39
|
-
return /* @__PURE__ */ l(
|
|
40
|
-
o.ScrollAreaScrollbar,
|
|
41
|
-
{
|
|
42
|
-
ref: i,
|
|
43
|
-
orientation: r,
|
|
44
|
-
className: n(
|
|
45
|
-
"flex touch-none transition-colors duration-[var(--duration-fast)] select-none",
|
|
46
|
-
r === "vertical" && "h-full w-2 border-l border-l-transparent p-px",
|
|
47
|
-
r === "horizontal" && "h-2 flex-col border-t border-t-transparent p-px",
|
|
48
|
-
e
|
|
49
|
-
),
|
|
50
|
-
...a,
|
|
51
|
-
children: /* @__PURE__ */ l(o.ScrollAreaThumb, { className: "bg-border-strong relative flex-1 rounded-full" })
|
|
52
|
-
}
|
|
53
|
-
);
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { useStrings as t } from "../../hooks/use-strings.js";
|
|
4
|
+
import { forwardRef as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import * as a from "@radix-ui/react-scroll-area";
|
|
7
|
+
//#region src/components/ui/ScrollArea.tsx
|
|
8
|
+
var o = n(function({ className: n, children: o, viewportLabel: c, ...l }, u) {
|
|
9
|
+
let d = t();
|
|
10
|
+
return /* @__PURE__ */ i(a.Root, {
|
|
11
|
+
ref: u,
|
|
12
|
+
className: e("relative overflow-hidden", n),
|
|
13
|
+
...l,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ r(a.Viewport, {
|
|
16
|
+
role: "group",
|
|
17
|
+
"aria-label": c ?? d.scrollArea.region,
|
|
18
|
+
tabIndex: 0,
|
|
19
|
+
className: e("h-full w-full rounded-[inherit]", "focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),
|
|
20
|
+
children: o
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ r(s, {}),
|
|
23
|
+
/* @__PURE__ */ r(a.Corner, {})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
54
26
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
o.displayName = "ScrollArea";
|
|
28
|
+
var s = n(function({ className: t, orientation: n = "vertical", ...i }, o) {
|
|
29
|
+
return /* @__PURE__ */ r(a.ScrollAreaScrollbar, {
|
|
30
|
+
ref: o,
|
|
31
|
+
orientation: n,
|
|
32
|
+
className: e("flex touch-none transition-colors duration-[var(--duration-fast)] select-none", n === "vertical" && "h-full w-2 border-l border-l-transparent p-px", n === "horizontal" && "h-2 flex-col border-t border-t-transparent p-px", t),
|
|
33
|
+
...i,
|
|
34
|
+
children: /* @__PURE__ */ r(a.ScrollAreaThumb, { className: "bg-border-strong relative flex-1 rounded-full" })
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
s.displayName = "ScrollBar";
|
|
38
|
+
//#endregion
|
|
39
|
+
export { o as ScrollArea, s as ScrollBar };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=ScrollArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.js","sources":["../../../src/components/ui/ScrollArea.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef } from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { cn } from '@/lib/utils';\nimport { useStrings } from '@/hooks/use-strings';\n\n/**\n * Custom scroll container with consistent styled scrollbars across OS / browsers.\n * Use when the default OS scrollbar would visually clash (sidebars, command\n * palettes, code panes). Falls back to native scroll inside the viewport.\n *\n * @example\n * <ScrollArea className=\"h-64 rounded-md border border-border\">\n * <div className=\"p-3\">…long content…</div>\n * </ScrollArea>\n */\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {\n /**\n * Accessible name of the viewport (a focusable `group` so keyboard users\n * can scroll it). Defaults to `strings.scrollArea.region`.\n */\n viewportLabel?: string;\n}\n\nexport const ScrollArea = forwardRef<ElementRef<typeof ScrollAreaPrimitive.Root>, ScrollAreaProps>(\n function ScrollArea({ className, children, viewportLabel, ...props }, ref) {\n const strings = useStrings();\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n role=\"group\"\n aria-label={viewportLabel ?? strings.scrollArea.region}\n tabIndex={0}\n className={cn(\n 'h-full w-full rounded-[inherit]',\n 'focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n },\n);\nScrollArea.displayName = 'ScrollArea';\n\nexport const ScrollBar = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(function ScrollBar({ className, orientation = 'vertical', ...props }, ref) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none transition-colors duration-[var(--duration-fast)] select-none',\n orientation === 'vertical' && 'h-full w-2 border-l border-l-transparent p-px',\n orientation === 'horizontal' && 'h-2 flex-col border-t border-t-transparent p-px',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border-strong relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n});\nScrollBar.displayName = 'ScrollBar';\n"],"
|
|
1
|
+
{"version":3,"file":"ScrollArea.js","names":[],"sources":["../../../src/components/ui/ScrollArea.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef } from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { cn } from '@/lib/utils';\nimport { useStrings } from '@/hooks/use-strings';\n\n/**\n * Custom scroll container with consistent styled scrollbars across OS / browsers.\n * Use when the default OS scrollbar would visually clash (sidebars, command\n * palettes, code panes). Falls back to native scroll inside the viewport.\n *\n * @example\n * <ScrollArea className=\"h-64 rounded-md border border-border\">\n * <div className=\"p-3\">…long content…</div>\n * </ScrollArea>\n */\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {\n /**\n * Accessible name of the viewport (a focusable `group` so keyboard users\n * can scroll it). Defaults to `strings.scrollArea.region`.\n */\n viewportLabel?: string;\n}\n\nexport const ScrollArea = forwardRef<ElementRef<typeof ScrollAreaPrimitive.Root>, ScrollAreaProps>(\n function ScrollArea({ className, children, viewportLabel, ...props }, ref) {\n const strings = useStrings();\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n role=\"group\"\n aria-label={viewportLabel ?? strings.scrollArea.region}\n tabIndex={0}\n className={cn(\n 'h-full w-full rounded-[inherit]',\n 'focus-visible:ring-ring focus-visible:ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n },\n);\nScrollArea.displayName = 'ScrollArea';\n\nexport const ScrollBar = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(function ScrollBar({ className, orientation = 'vertical', ...props }, ref) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none transition-colors duration-[var(--duration-fast)] select-none',\n orientation === 'vertical' && 'h-full w-2 border-l border-l-transparent p-px',\n orientation === 'horizontal' && 'h-2 flex-col border-t border-t-transparent p-px',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border-strong relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n});\nScrollBar.displayName = 'ScrollBar';\n"],"mappings":";;;;;;;AAyBA,IAAa,IAAa,EACxB,SAAoB,EAAE,cAAW,aAAU,kBAAe,GAAG,KAAS,GAAK;CACzE,IAAM,IAAU,EAAW;CAC3B,OACE,kBAAC,EAAoB,MAArB;EACO;EACL,WAAW,EAAG,4BAA4B,CAAS;EACnD,GAAI;EAHN,UAAA;GAKE,kBAAC,EAAoB,UAArB;IACE,MAAK;IACL,cAAY,KAAiB,EAAQ,WAAW;IAChD,UAAU;IACV,WAAW,EACT,mCACA,4HACF;IAEC;GAC2B,CAAA;GAC9B,kBAAC,GAAD,CAAY,CAAA;GACZ,kBAAC,EAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B,CACF;AACA,EAAW,cAAc;AAEzB,IAAa,IAAY,EAGvB,SAAmB,EAAE,cAAW,iBAAc,YAAY,GAAG,KAAS,GAAK;CAC3E,OACE,kBAAC,EAAoB,qBAArB;EACO;EACQ;EACb,WAAW,EACT,iFACA,MAAgB,cAAc,iDAC9B,MAAgB,gBAAgB,mDAChC,CACF;EACA,GAAI;EAEJ,UAAA,kBAAC,EAAoB,iBAArB,EAAqC,WAAU,gDAAiD,CAAA;CACzD,CAAA;AAE7C,CAAC;AACD,EAAU,cAAc"}
|