@wow-two-beta/ui 0.0.3 → 0.0.5
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/actions/index.d.ts +240 -2
- package/dist/actions/index.js +5 -2
- package/dist/chunk-33IOXQYO.js +47 -0
- package/dist/chunk-33IOXQYO.js.map +1 -0
- package/dist/chunk-4CIRBYYP.js +120 -0
- package/dist/chunk-4CIRBYYP.js.map +1 -0
- package/dist/chunk-6NYTRHP7.js +168 -0
- package/dist/chunk-6NYTRHP7.js.map +1 -0
- package/dist/chunk-77WSI427.js +39 -0
- package/dist/chunk-77WSI427.js.map +1 -0
- package/dist/chunk-BMBIZLO4.js +34 -0
- package/dist/chunk-BMBIZLO4.js.map +1 -0
- package/dist/chunk-D67WGR7Y.js +212 -0
- package/dist/chunk-D67WGR7Y.js.map +1 -0
- package/dist/chunk-DN7WBRIV.js +17 -0
- package/dist/chunk-DN7WBRIV.js.map +1 -0
- package/dist/chunk-JCMV6IT4.js +268 -0
- package/dist/chunk-JCMV6IT4.js.map +1 -0
- package/dist/chunk-JTJEI6MF.js +11 -0
- package/dist/chunk-JTJEI6MF.js.map +1 -0
- package/dist/chunk-KSJE3JAI.js +604 -0
- package/dist/chunk-KSJE3JAI.js.map +1 -0
- package/dist/chunk-KZ4VFY2T.js +11 -0
- package/dist/chunk-KZ4VFY2T.js.map +1 -0
- package/dist/chunk-MP4OTUFA.js +318 -0
- package/dist/chunk-MP4OTUFA.js.map +1 -0
- package/dist/chunk-Q27NAHVB.js +34 -0
- package/dist/chunk-Q27NAHVB.js.map +1 -0
- package/dist/chunk-SYG6ZE42.js +218 -0
- package/dist/chunk-SYG6ZE42.js.map +1 -0
- package/dist/chunk-TDX22OWF.js +33 -0
- package/dist/chunk-TDX22OWF.js.map +1 -0
- package/dist/chunk-YLN7VMYU.js +275 -0
- package/dist/chunk-YLN7VMYU.js.map +1 -0
- package/dist/display/index.d.ts +805 -1
- package/dist/display/index.js +6 -1
- package/dist/feedback/index.d.ts +506 -1
- package/dist/feedback/index.js +5 -1
- package/dist/forms/index.d.ts +217 -1
- package/dist/forms/index.js +8 -1
- package/dist/hooks/index.d.ts +2 -5
- package/dist/hooks/index.js +4 -1
- package/dist/icons/index.d.ts +2 -5
- package/dist/icons/index.js +3 -1
- package/dist/index-Bk6CuDNT.d.ts +247 -0
- package/dist/index-C0IDphm_.d.ts +61 -0
- package/dist/index-CEAM9LLM.d.ts +37 -0
- package/dist/index-PAuwodyY.d.ts +103 -0
- package/dist/index-goThcZ1E.d.ts +416 -0
- package/dist/index.d.ts +13 -5
- package/dist/index.js +16 -9
- package/dist/layout/index.d.ts +605 -1
- package/dist/layout/index.js +5 -1
- package/dist/primitives/index.d.ts +5 -0
- package/dist/primitives/index.js +10 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/tailwind/index.js +8 -2
- package/dist/tailwind/index.js.map +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +3 -1
- package/package.json +8 -1
- package/dist/chunk-6YKPUEHU.js +0 -47
- package/dist/chunk-6YKPUEHU.js.map +0 -1
- package/dist/chunk-7CP7KR5F.js +0 -41
- package/dist/chunk-7CP7KR5F.js.map +0 -1
- package/dist/chunk-A2OBJDIK.js +0 -3
- package/dist/chunk-A2OBJDIK.js.map +0 -1
- package/dist/chunk-CTVGU35H.js +0 -6
- package/dist/chunk-CTVGU35H.js.map +0 -1
- package/dist/chunk-ECZ4YFAI.js +0 -16
- package/dist/chunk-ECZ4YFAI.js.map +0 -1
- package/dist/chunk-PSDQXPUE.js +0 -3
- package/dist/chunk-PSDQXPUE.js.map +0 -1
- package/dist/chunk-U4JXXIE2.js +0 -6
- package/dist/chunk-U4JXXIE2.js.map +0 -1
- package/dist/chunk-YP4MAZRQ.js +0 -3
- package/dist/chunk-YP4MAZRQ.js.map +0 -1
- package/dist/chunk-ZDU7SROW.js +0 -3
- package/dist/chunk-ZDU7SROW.js.map +0 -1
- package/dist/index-CdSRWb8y.d.ts +0 -78
- package/dist/index-D-adCzNR.d.ts +0 -14
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { tv } from './chunk-BMBIZLO4.js';
|
|
2
|
+
import { cn } from './chunk-KZ4VFY2T.js';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Box = forwardRef(
|
|
7
|
+
({ as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, className: cn(className), ...props })
|
|
8
|
+
);
|
|
9
|
+
Box.displayName = "Box";
|
|
10
|
+
|
|
11
|
+
// src/layout/stack/Stack.variants.ts
|
|
12
|
+
var stackVariants = tv({
|
|
13
|
+
base: "flex",
|
|
14
|
+
variants: {
|
|
15
|
+
direction: {
|
|
16
|
+
row: "flex-row",
|
|
17
|
+
column: "flex-col",
|
|
18
|
+
"row-reverse": "flex-row-reverse",
|
|
19
|
+
"column-reverse": "flex-col-reverse"
|
|
20
|
+
},
|
|
21
|
+
align: {
|
|
22
|
+
start: "items-start",
|
|
23
|
+
center: "items-center",
|
|
24
|
+
end: "items-end",
|
|
25
|
+
stretch: "items-stretch",
|
|
26
|
+
baseline: "items-baseline"
|
|
27
|
+
},
|
|
28
|
+
justify: {
|
|
29
|
+
start: "justify-start",
|
|
30
|
+
center: "justify-center",
|
|
31
|
+
end: "justify-end",
|
|
32
|
+
between: "justify-between",
|
|
33
|
+
around: "justify-around",
|
|
34
|
+
evenly: "justify-evenly"
|
|
35
|
+
},
|
|
36
|
+
gap: {
|
|
37
|
+
"0": "gap-0",
|
|
38
|
+
"1": "gap-1",
|
|
39
|
+
"2": "gap-2",
|
|
40
|
+
"3": "gap-3",
|
|
41
|
+
"4": "gap-4",
|
|
42
|
+
"5": "gap-5",
|
|
43
|
+
"6": "gap-6",
|
|
44
|
+
"8": "gap-8",
|
|
45
|
+
"10": "gap-10",
|
|
46
|
+
"12": "gap-12"
|
|
47
|
+
},
|
|
48
|
+
wrap: {
|
|
49
|
+
wrap: "flex-wrap",
|
|
50
|
+
nowrap: "flex-nowrap",
|
|
51
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
direction: "column",
|
|
56
|
+
gap: "4"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var Stack = forwardRef(
|
|
60
|
+
({ as: Component = "div", className, direction, align, justify, gap, wrap, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
61
|
+
Component,
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
className: cn(stackVariants({ direction, align, justify, gap, wrap }), className),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
Stack.displayName = "Stack";
|
|
70
|
+
var HStack = forwardRef((props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "row", ...props }));
|
|
71
|
+
HStack.displayName = "HStack";
|
|
72
|
+
var VStack = forwardRef((props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "column", ...props }));
|
|
73
|
+
VStack.displayName = "VStack";
|
|
74
|
+
|
|
75
|
+
// src/layout/grid/Grid.variants.ts
|
|
76
|
+
var gridVariants = tv({
|
|
77
|
+
base: "grid",
|
|
78
|
+
variants: {
|
|
79
|
+
columns: {
|
|
80
|
+
"1": "grid-cols-1",
|
|
81
|
+
"2": "grid-cols-2",
|
|
82
|
+
"3": "grid-cols-3",
|
|
83
|
+
"4": "grid-cols-4",
|
|
84
|
+
"5": "grid-cols-5",
|
|
85
|
+
"6": "grid-cols-6",
|
|
86
|
+
"8": "grid-cols-8",
|
|
87
|
+
"12": "grid-cols-12"
|
|
88
|
+
},
|
|
89
|
+
gap: {
|
|
90
|
+
"0": "gap-0",
|
|
91
|
+
"1": "gap-1",
|
|
92
|
+
"2": "gap-2",
|
|
93
|
+
"3": "gap-3",
|
|
94
|
+
"4": "gap-4",
|
|
95
|
+
"5": "gap-5",
|
|
96
|
+
"6": "gap-6",
|
|
97
|
+
"8": "gap-8",
|
|
98
|
+
"10": "gap-10",
|
|
99
|
+
"12": "gap-12"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
defaultVariants: {
|
|
103
|
+
columns: "2",
|
|
104
|
+
gap: "4"
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var Grid = forwardRef(
|
|
108
|
+
({ as: Component = "div", className, columns, gap, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
109
|
+
Component,
|
|
110
|
+
{
|
|
111
|
+
ref,
|
|
112
|
+
className: cn(gridVariants({ columns, gap }), className),
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
);
|
|
117
|
+
Grid.displayName = "Grid";
|
|
118
|
+
|
|
119
|
+
// src/layout/container/Container.variants.ts
|
|
120
|
+
var containerVariants = tv({
|
|
121
|
+
base: "mx-auto w-full px-4",
|
|
122
|
+
variants: {
|
|
123
|
+
size: {
|
|
124
|
+
sm: "max-w-screen-sm",
|
|
125
|
+
md: "max-w-screen-md",
|
|
126
|
+
lg: "max-w-screen-lg",
|
|
127
|
+
xl: "max-w-screen-xl",
|
|
128
|
+
"2xl": "max-w-screen-2xl",
|
|
129
|
+
full: "max-w-full"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
defaultVariants: {
|
|
133
|
+
size: "lg"
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
var Container = forwardRef(
|
|
137
|
+
({ as: Component = "div", className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
138
|
+
Component,
|
|
139
|
+
{
|
|
140
|
+
ref,
|
|
141
|
+
className: cn(containerVariants({ size }), className),
|
|
142
|
+
...props
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
Container.displayName = "Container";
|
|
147
|
+
var Flex = forwardRef(
|
|
148
|
+
({ as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
149
|
+
Component,
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
className: cn("flex", className),
|
|
153
|
+
...props
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
);
|
|
157
|
+
Flex.displayName = "Flex";
|
|
158
|
+
var AspectRatio = forwardRef(
|
|
159
|
+
({ ratio = 1, className, style, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
className: cn("relative w-full", className),
|
|
164
|
+
style: { aspectRatio: `${ratio}`, ...style },
|
|
165
|
+
...props,
|
|
166
|
+
children
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
);
|
|
170
|
+
AspectRatio.displayName = "AspectRatio";
|
|
171
|
+
var Spacer = forwardRef(
|
|
172
|
+
({ size, axis = "horizontal", className, style, ...props }, ref) => {
|
|
173
|
+
const fixed = size !== void 0 ? axis === "horizontal" ? { width: typeof size === "number" ? `${size}px` : size, flexShrink: 0 } : { height: typeof size === "number" ? `${size}px` : size, flexShrink: 0 } : void 0;
|
|
174
|
+
return /* @__PURE__ */ jsx(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
ref,
|
|
178
|
+
"aria-hidden": "true",
|
|
179
|
+
className: cn(size === void 0 && "flex-1", className),
|
|
180
|
+
style: { ...fixed, ...style },
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
Spacer.displayName = "Spacer";
|
|
187
|
+
var Center = forwardRef(
|
|
188
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
ref,
|
|
192
|
+
className: cn("flex items-center justify-center", className),
|
|
193
|
+
...props
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
);
|
|
197
|
+
Center.displayName = "Center";
|
|
198
|
+
var ScrollArea = forwardRef(
|
|
199
|
+
({ axis = "vertical", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
ref,
|
|
203
|
+
className: cn(
|
|
204
|
+
"relative",
|
|
205
|
+
axis === "vertical" && "overflow-y-auto overflow-x-hidden",
|
|
206
|
+
axis === "horizontal" && "overflow-x-auto overflow-y-hidden",
|
|
207
|
+
axis === "both" && "overflow-auto",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
);
|
|
214
|
+
ScrollArea.displayName = "ScrollArea";
|
|
215
|
+
|
|
216
|
+
export { AspectRatio, Box, Center, Container, Flex, Grid, HStack, ScrollArea, Spacer, Stack, VStack, containerVariants, gridVariants, stackVariants };
|
|
217
|
+
//# sourceMappingURL=chunk-SYG6ZE42.js.map
|
|
218
|
+
//# sourceMappingURL=chunk-SYG6ZE42.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layout/box/Box.tsx","../src/layout/stack/Stack.variants.ts","../src/layout/stack/Stack.tsx","../src/layout/hStack/HStack.tsx","../src/layout/vStack/VStack.tsx","../src/layout/grid/Grid.variants.ts","../src/layout/grid/Grid.tsx","../src/layout/container/Container.variants.ts","../src/layout/container/Container.tsx","../src/layout/flex/Flex.tsx","../src/layout/aspectRatio/AspectRatio.tsx","../src/layout/spacer/Spacer.tsx","../src/layout/center/Center.tsx","../src/layout/scrollArea/ScrollArea.tsx"],"names":["forwardRef","jsx"],"mappings":";;;;;AAaO,IAAM,GAAA,GAAM,UAAA;AAAA,EACjB,CAAC,EAAE,EAAA,EAAI,YAAY,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC/C,GAAA,CAAC,aAAU,GAAA,EAA8B,SAAA,EAAW,GAAG,SAAS,CAA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AAAA,QACnB;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA;AAGV;AACA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"chunk-SYG6ZE42.js","sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType, type Ref } from 'react';\nimport { cn } from '../../utils';\n\nexport interface BoxProps extends Omit<ComponentPropsWithoutRef<'div'>, 'as'> {\n /** HTML element to render. Default `div`. */\n as?: ElementType;\n}\n\n/**\n * The lowest-level layout primitive. Renders any element (default `div`)\n * with className passthrough. Use as a styling shell when no other layout\n * atom fits.\n */\nexport const Box = forwardRef<HTMLElement, BoxProps>(\n ({ as: Component = 'div', className, ...props }, ref) => (\n <Component ref={ref as Ref<HTMLElement>} className={cn(className)} {...props} />\n ),\n);\nBox.displayName = 'Box';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const stackVariants = tv({\n base: 'flex',\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n gap: {\n '0': 'gap-0',\n '1': 'gap-1',\n '2': 'gap-2',\n '3': 'gap-3',\n '4': 'gap-4',\n '5': 'gap-5',\n '6': 'gap-6',\n '8': 'gap-8',\n '10': 'gap-10',\n '12': 'gap-12',\n },\n wrap: {\n wrap: 'flex-wrap',\n nowrap: 'flex-nowrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n gap: '4',\n },\n});\n\nexport type StackVariants = VariantProps<typeof stackVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { stackVariants, type StackVariants } from './Stack.variants';\n\nexport interface StackProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n StackVariants {\n as?: ElementType;\n}\n\n/**\n * Vertical (default) or horizontal flex container with gap and alignment\n * variants. For row preset use `HStack`, for column use `VStack`.\n */\nexport const Stack = forwardRef<HTMLElement, StackProps>(\n ({ as: Component = 'div', className, direction, align, justify, gap, wrap, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(stackVariants({ direction, align, justify, gap, wrap }), className)}\n {...props}\n />\n ),\n);\nStack.displayName = 'Stack';\n","import { forwardRef, type Ref } from 'react';\nimport { Stack, type StackProps } from '../stack/Stack';\n\nexport type HStackProps = Omit<StackProps, 'direction'>;\n\n/** Stack preset: `direction=\"row\"`. */\nexport const HStack = forwardRef<HTMLElement, HStackProps>((props, ref) => (\n <Stack ref={ref as Ref<HTMLElement>} direction=\"row\" {...props} />\n));\nHStack.displayName = 'HStack';\n","import { forwardRef, type Ref } from 'react';\nimport { Stack, type StackProps } from '../stack/Stack';\n\nexport type VStackProps = Omit<StackProps, 'direction'>;\n\n/** Stack preset: `direction=\"column\"` (default). Provided for symmetry with HStack. */\nexport const VStack = forwardRef<HTMLElement, VStackProps>((props, ref) => (\n <Stack ref={ref as Ref<HTMLElement>} direction=\"column\" {...props} />\n));\nVStack.displayName = 'VStack';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const gridVariants = tv({\n base: 'grid',\n variants: {\n columns: {\n '1': 'grid-cols-1',\n '2': 'grid-cols-2',\n '3': 'grid-cols-3',\n '4': 'grid-cols-4',\n '5': 'grid-cols-5',\n '6': 'grid-cols-6',\n '8': 'grid-cols-8',\n '12': 'grid-cols-12',\n },\n gap: {\n '0': 'gap-0',\n '1': 'gap-1',\n '2': 'gap-2',\n '3': 'gap-3',\n '4': 'gap-4',\n '5': 'gap-5',\n '6': 'gap-6',\n '8': 'gap-8',\n '10': 'gap-10',\n '12': 'gap-12',\n },\n },\n defaultVariants: {\n columns: '2',\n gap: '4',\n },\n});\n\nexport type GridVariants = VariantProps<typeof gridVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { gridVariants, type GridVariants } from './Grid.variants';\n\nexport interface GridProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n GridVariants {\n as?: ElementType;\n}\n\n/**\n * CSS grid container with column and gap variants. For non-uniform tracks\n * pass an explicit `style={{ gridTemplateColumns }}` — the variant covers\n * the equal-column case.\n */\nexport const Grid = forwardRef<HTMLElement, GridProps>(\n ({ as: Component = 'div', className, columns, gap, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(gridVariants({ columns, gap }), className)}\n {...props}\n />\n ),\n);\nGrid.displayName = 'Grid';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const containerVariants = tv({\n base: 'mx-auto w-full px-4',\n variants: {\n size: {\n sm: 'max-w-screen-sm',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n full: 'max-w-full',\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport type ContainerVariants = VariantProps<typeof containerVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { containerVariants, type ContainerVariants } from './Container.variants';\n\nexport interface ContainerProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n ContainerVariants {\n as?: ElementType;\n}\n\n/**\n * Centered max-width wrapper with horizontal padding. Use at page-level to\n * constrain content width.\n */\nexport const Container = forwardRef<HTMLElement, ContainerProps>(\n ({ as: Component = 'div', className, size, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(containerVariants({ size }), className)}\n {...props}\n />\n ),\n);\nContainer.displayName = 'Container';\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\n\nexport interface FlexProps extends Omit<ComponentPropsWithoutRef<'div'>, 'as'> {\n as?: ElementType;\n}\n\n/**\n * Bare flex container — no opinions on direction, gap, or alignment.\n * Use for one-off flex layouts that don't fit `Stack`'s variant matrix.\n */\nexport const Flex = forwardRef<HTMLElement, FlexProps>(\n ({ as: Component = 'div', className, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn('flex', className)}\n {...props}\n />\n ),\n);\nFlex.displayName = 'Flex';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<'div'> {\n /** Numeric ratio (width/height). Default 1 (square). */\n ratio?: number;\n}\n\n/**\n * Constrain children to an aspect ratio (width / height). Children are\n * absolutely positioned and stretched to fill — typically pass a single\n * `<img>`, `<video>`, or `<iframe>` with `className=\"absolute inset-0 w-full h-full\"`.\n */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(\n ({ ratio = 1, className, style, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('relative w-full', className)}\n style={{ aspectRatio: `${ratio}`, ...style }}\n {...props}\n >\n {children}\n </div>\n ),\n);\nAspectRatio.displayName = 'AspectRatio';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface SpacerProps extends ComponentPropsWithoutRef<'div'> {\n /** Optional explicit size (CSS length). When inside a flex/grid parent,\n * the default `flex: 1` already pushes siblings apart. */\n size?: number | string;\n axis?: 'horizontal' | 'vertical';\n}\n\n/**\n * A flexible empty box. In a flex parent it expands (`flex: 1`) and pushes\n * siblings to opposite ends. Pass `size` for a fixed gap.\n */\nexport const Spacer = forwardRef<HTMLDivElement, SpacerProps>(\n ({ size, axis = 'horizontal', className, style, ...props }, ref) => {\n const fixed: React.CSSProperties | undefined =\n size !== undefined\n ? axis === 'horizontal'\n ? { width: typeof size === 'number' ? `${size}px` : size, flexShrink: 0 }\n : { height: typeof size === 'number' ? `${size}px` : size, flexShrink: 0 }\n : undefined;\n\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={cn(size === undefined && 'flex-1', className)}\n style={{ ...fixed, ...style }}\n {...props}\n />\n );\n },\n);\nSpacer.displayName = 'Spacer';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport type CenterProps = ComponentPropsWithoutRef<'div'>;\n\n/** Flex shorthand that centers its children both axes. */\nexport const Center = forwardRef<HTMLDivElement, CenterProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center justify-center', className)}\n {...props}\n />\n ),\n);\nCenter.displayName = 'Center';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<'div'> {\n axis?: 'vertical' | 'horizontal' | 'both';\n}\n\n/**\n * Native scrollable container with stable visuals. For custom-styled\n * scrollbars (track + thumb separately animated) use the L5 ScrollArea\n * organism. This atom exists for the common case.\n */\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ axis = 'vertical', className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'relative',\n axis === 'vertical' && 'overflow-y-auto overflow-x-hidden',\n axis === 'horizontal' && 'overflow-x-auto overflow-y-hidden',\n axis === 'both' && 'overflow-auto',\n className,\n )}\n {...props}\n />\n ),\n);\nScrollArea.displayName = 'ScrollArea';\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cn } from './chunk-KZ4VFY2T.js';
|
|
2
|
+
import { __export } from './chunk-PZ5AY32C.js';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/icons/index.ts
|
|
7
|
+
var icons_exports = {};
|
|
8
|
+
__export(icons_exports, {
|
|
9
|
+
Icon: () => Icon
|
|
10
|
+
});
|
|
11
|
+
var Icon = forwardRef(
|
|
12
|
+
({ icon: IconComp, size = 20, className, "aria-label": ariaLabel, ...rest }, ref) => {
|
|
13
|
+
const labelled = ariaLabel !== void 0;
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
IconComp,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
size,
|
|
19
|
+
className: cn("shrink-0", className),
|
|
20
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
21
|
+
"aria-label": ariaLabel,
|
|
22
|
+
role: labelled ? "img" : void 0,
|
|
23
|
+
focusable: false,
|
|
24
|
+
...rest
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Icon.displayName = "Icon";
|
|
30
|
+
|
|
31
|
+
export { Icon, icons_exports };
|
|
32
|
+
//# sourceMappingURL=chunk-TDX22OWF.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-TDX22OWF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/icons/index.ts","../src/icons/Icon.tsx"],"names":[],"mappings":";;;;;;AAAA,IAAA,aAAA,GAAA;AAAA,QAAA,CAAA,aAAA,EAAA;AAAA,EAAA,IAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AC6BO,IAAM,IAAA,GAAO,UAAA;AAAA,EAClB,CAAC,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,GAAO,EAAA,EAAI,SAAA,EAAW,YAAA,EAAc,SAAA,EAAW,GAAG,IAAA,EAAK,EAAG,GAAA,KAAQ;AACnF,IAAA,MAAM,WAAW,SAAA,KAAc,MAAA;AAC/B,IAAA,uBACE,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,IAAA;AAAA,QACA,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAS,CAAA;AAAA,QACnC,aAAA,EAAa,WAAW,MAAA,GAAY,IAAA;AAAA,QACpC,YAAA,EAAY,SAAA;AAAA,QACZ,IAAA,EAAM,WAAW,KAAA,GAAQ,MAAA;AAAA,QACzB,SAAA,EAAW,KAAA;AAAA,QACV,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,IAAA,CAAK,WAAA,GAAc,MAAA","file":"chunk-TDX22OWF.js","sourcesContent":["export { Icon, type IconProps, type IconAdapter, type IconAdapterProps } from './Icon';\n","import { forwardRef, type ComponentType, type SVGProps } from 'react';\nimport { cn } from '../utils/cn';\n\nexport interface IconAdapterProps extends SVGProps<SVGSVGElement> {\n size?: number | string;\n}\n\nexport type IconAdapter = ComponentType<IconAdapterProps>;\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'aria-hidden'> {\n /** Icon component — pass a `lucide-react` icon, custom SVG component, or any matching shape. */\n icon: IconAdapter;\n /** Pixel size of the rendered SVG. Default 20. */\n size?: number | string;\n /**\n * Provide an aria-label when the icon stands alone (decorative siblings\n * should pass it via parent). Sets `role=\"img\"` and unhides from AT.\n * Without it, the icon is `aria-hidden` and decorative.\n */\n 'aria-label'?: string;\n}\n\n/**\n * Generic icon wrapper. Accepts any icon component matching the lucide-react\n * shape (`{ size, color, className, ...svgProps }`).\n *\n * - Without `aria-label` → decorative, `aria-hidden`.\n * - With `aria-label` → semantic, `role=\"img\"`.\n */\nexport const Icon = forwardRef<SVGSVGElement, IconProps>(\n ({ icon: IconComp, size = 20, className, 'aria-label': ariaLabel, ...rest }, ref) => {\n const labelled = ariaLabel !== undefined;\n return (\n <IconComp\n ref={ref}\n size={size}\n className={cn('shrink-0', className)}\n aria-hidden={labelled ? undefined : true}\n aria-label={ariaLabel}\n role={labelled ? 'img' : undefined}\n focusable={false}\n {...rest}\n />\n );\n },\n);\nIcon.displayName = 'Icon';\n"]}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { tv } from './chunk-BMBIZLO4.js';
|
|
2
|
+
import { cn } from './chunk-KZ4VFY2T.js';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/feedback/spinner/Spinner.variants.ts
|
|
7
|
+
var spinnerVariants = tv({
|
|
8
|
+
base: "inline-block animate-spin rounded-full border-current border-b-transparent",
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xs: "h-3 w-3 border",
|
|
12
|
+
sm: "h-4 w-4 border-2",
|
|
13
|
+
md: "h-5 w-5 border-2",
|
|
14
|
+
lg: "h-8 w-8 border-2",
|
|
15
|
+
xl: "h-12 w-12 border-[3px]"
|
|
16
|
+
},
|
|
17
|
+
tone: {
|
|
18
|
+
default: "text-neutral-500",
|
|
19
|
+
brand: "text-brand-600",
|
|
20
|
+
muted: "text-neutral-300",
|
|
21
|
+
current: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
size: "md",
|
|
26
|
+
tone: "default"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var Spinner = forwardRef(
|
|
30
|
+
({ className, size, tone, label = "Loading", role = "status", ...props }, ref) => /* @__PURE__ */ jsxs("span", { ref, role, ...props, children: [
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: cn(spinnerVariants({ size, tone }), className) }),
|
|
32
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
33
|
+
] })
|
|
34
|
+
);
|
|
35
|
+
Spinner.displayName = "Spinner";
|
|
36
|
+
|
|
37
|
+
// src/feedback/skeleton/Skeleton.variants.ts
|
|
38
|
+
var skeletonVariants = tv({
|
|
39
|
+
base: "animate-pulse bg-neutral-200",
|
|
40
|
+
variants: {
|
|
41
|
+
shape: {
|
|
42
|
+
rect: "rounded-md",
|
|
43
|
+
text: "h-4 rounded-sm",
|
|
44
|
+
circle: "rounded-full"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
shape: "rect"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
var Skeleton = forwardRef(
|
|
52
|
+
({ className, shape, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
className: cn(skeletonVariants({ shape }), className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
Skeleton.displayName = "Skeleton";
|
|
63
|
+
|
|
64
|
+
// src/feedback/progressBar/ProgressBar.variants.ts
|
|
65
|
+
var progressTrackVariants = tv({
|
|
66
|
+
base: "h-2 w-full overflow-hidden rounded-full bg-neutral-200",
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
sm: "h-1",
|
|
70
|
+
md: "h-2",
|
|
71
|
+
lg: "h-3"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
size: "md"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var progressFillVariants = tv({
|
|
79
|
+
base: "h-full rounded-full transition-[width] duration-300",
|
|
80
|
+
variants: {
|
|
81
|
+
tone: {
|
|
82
|
+
brand: "bg-brand-600",
|
|
83
|
+
success: "bg-success-500",
|
|
84
|
+
warning: "bg-warning-500",
|
|
85
|
+
danger: "bg-danger-500",
|
|
86
|
+
neutral: "bg-neutral-500"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
tone: "brand"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
var ProgressBar = forwardRef(
|
|
94
|
+
({ value, max = 100, size, tone, label, className, ...props }, ref) => {
|
|
95
|
+
const determinate = typeof value === "number";
|
|
96
|
+
const pct = determinate ? Math.min(100, Math.max(0, value / max * 100)) : void 0;
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
ref,
|
|
101
|
+
role: "progressbar",
|
|
102
|
+
"aria-label": label,
|
|
103
|
+
"aria-valuemin": 0,
|
|
104
|
+
"aria-valuemax": max,
|
|
105
|
+
"aria-valuenow": determinate ? value : void 0,
|
|
106
|
+
className: cn(progressTrackVariants({ size }), className),
|
|
107
|
+
...props,
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: cn(
|
|
112
|
+
progressFillVariants({ tone }),
|
|
113
|
+
!determinate && "w-1/3 animate-[indeterminate_1.4s_ease-in-out_infinite]"
|
|
114
|
+
),
|
|
115
|
+
style: determinate ? { width: `${pct}%` } : void 0
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
ProgressBar.displayName = "ProgressBar";
|
|
123
|
+
var TONE_CLASS = {
|
|
124
|
+
brand: "text-brand-600",
|
|
125
|
+
success: "text-success-500",
|
|
126
|
+
warning: "text-warning-500",
|
|
127
|
+
danger: "text-danger-500",
|
|
128
|
+
neutral: "text-neutral-500"
|
|
129
|
+
};
|
|
130
|
+
var ProgressCircle = forwardRef(
|
|
131
|
+
({ value, max = 100, size = 40, thickness = 4, tone = "brand", label, className, ...props }, ref) => {
|
|
132
|
+
const determinate = typeof value === "number";
|
|
133
|
+
const radius = (size - thickness) / 2;
|
|
134
|
+
const circumference = 2 * Math.PI * radius;
|
|
135
|
+
const pct = determinate ? Math.min(100, Math.max(0, value / max * 100)) : 25;
|
|
136
|
+
const offset = circumference - pct / 100 * circumference;
|
|
137
|
+
return /* @__PURE__ */ jsx(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
ref,
|
|
141
|
+
role: "progressbar",
|
|
142
|
+
"aria-label": label,
|
|
143
|
+
"aria-valuemin": 0,
|
|
144
|
+
"aria-valuemax": max,
|
|
145
|
+
"aria-valuenow": determinate ? value : void 0,
|
|
146
|
+
className: cn("inline-block", !determinate && "animate-spin", TONE_CLASS[tone], className),
|
|
147
|
+
style: { width: size, height: size },
|
|
148
|
+
...props,
|
|
149
|
+
children: /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
"circle",
|
|
152
|
+
{
|
|
153
|
+
cx: size / 2,
|
|
154
|
+
cy: size / 2,
|
|
155
|
+
r: radius,
|
|
156
|
+
stroke: "currentColor",
|
|
157
|
+
strokeWidth: thickness,
|
|
158
|
+
fill: "none",
|
|
159
|
+
opacity: 0.2
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
"circle",
|
|
164
|
+
{
|
|
165
|
+
cx: size / 2,
|
|
166
|
+
cy: size / 2,
|
|
167
|
+
r: radius,
|
|
168
|
+
stroke: "currentColor",
|
|
169
|
+
strokeWidth: thickness,
|
|
170
|
+
strokeLinecap: "round",
|
|
171
|
+
fill: "none",
|
|
172
|
+
strokeDasharray: circumference,
|
|
173
|
+
strokeDashoffset: offset,
|
|
174
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`,
|
|
175
|
+
style: { transition: "stroke-dashoffset 300ms ease" }
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
] })
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
ProgressCircle.displayName = "ProgressCircle";
|
|
184
|
+
|
|
185
|
+
// src/feedback/alertSimple/AlertSimple.variants.ts
|
|
186
|
+
var alertSimpleVariants = tv({
|
|
187
|
+
base: "rounded-md border px-4 py-3 text-sm",
|
|
188
|
+
variants: {
|
|
189
|
+
severity: {
|
|
190
|
+
info: "border-info-100 bg-info-50 text-info-900",
|
|
191
|
+
success: "border-success-100 bg-success-50 text-success-900",
|
|
192
|
+
warning: "border-warning-100 bg-warning-50 text-warning-900",
|
|
193
|
+
danger: "border-danger-100 bg-danger-50 text-danger-900",
|
|
194
|
+
neutral: "border-neutral-200 bg-neutral-50 text-neutral-900"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
defaultVariants: {
|
|
198
|
+
severity: "info"
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
var AlertSimple = forwardRef(
|
|
202
|
+
({ className, severity, role = "status", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
ref,
|
|
206
|
+
role,
|
|
207
|
+
className: cn(alertSimpleVariants({ severity }), className),
|
|
208
|
+
...props
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
);
|
|
212
|
+
AlertSimple.displayName = "AlertSimple";
|
|
213
|
+
|
|
214
|
+
// src/feedback/bannerSimple/BannerSimple.variants.ts
|
|
215
|
+
var bannerSimpleVariants = tv({
|
|
216
|
+
base: "w-full px-6 py-3 text-sm",
|
|
217
|
+
variants: {
|
|
218
|
+
severity: {
|
|
219
|
+
info: "bg-info-500 text-white",
|
|
220
|
+
success: "bg-success-500 text-white",
|
|
221
|
+
warning: "bg-warning-500 text-warning-900",
|
|
222
|
+
danger: "bg-danger-500 text-white",
|
|
223
|
+
neutral: "bg-neutral-900 text-neutral-50"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
defaultVariants: {
|
|
227
|
+
severity: "info"
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
var BannerSimple = forwardRef(
|
|
231
|
+
({ className, severity, role = "status", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
ref,
|
|
235
|
+
role,
|
|
236
|
+
className: cn(bannerSimpleVariants({ severity }), className),
|
|
237
|
+
...props
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
);
|
|
241
|
+
BannerSimple.displayName = "BannerSimple";
|
|
242
|
+
|
|
243
|
+
// src/feedback/toastSimple/ToastSimple.variants.ts
|
|
244
|
+
var toastSimpleVariants = tv({
|
|
245
|
+
base: "pointer-events-auto rounded-md border bg-white shadow-lg px-4 py-3 text-sm",
|
|
246
|
+
variants: {
|
|
247
|
+
severity: {
|
|
248
|
+
info: "border-info-100",
|
|
249
|
+
success: "border-success-100",
|
|
250
|
+
warning: "border-warning-100",
|
|
251
|
+
danger: "border-danger-100",
|
|
252
|
+
neutral: "border-neutral-200"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
defaultVariants: {
|
|
256
|
+
severity: "neutral"
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
var ToastSimple = forwardRef(
|
|
260
|
+
({ className, severity, role = "status", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
261
|
+
"div",
|
|
262
|
+
{
|
|
263
|
+
ref,
|
|
264
|
+
role,
|
|
265
|
+
"aria-live": "polite",
|
|
266
|
+
className: cn(toastSimpleVariants({ severity }), className),
|
|
267
|
+
...props
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
);
|
|
271
|
+
ToastSimple.displayName = "ToastSimple";
|
|
272
|
+
|
|
273
|
+
export { AlertSimple, BannerSimple, ProgressBar, ProgressCircle, Skeleton, Spinner, ToastSimple, alertSimpleVariants, bannerSimpleVariants, progressFillVariants, progressTrackVariants, skeletonVariants, spinnerVariants, toastSimpleVariants };
|
|
274
|
+
//# sourceMappingURL=chunk-YLN7VMYU.js.map
|
|
275
|
+
//# sourceMappingURL=chunk-YLN7VMYU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/feedback/spinner/Spinner.variants.ts","../src/feedback/spinner/Spinner.tsx","../src/feedback/skeleton/Skeleton.variants.ts","../src/feedback/skeleton/Skeleton.tsx","../src/feedback/progressBar/ProgressBar.variants.ts","../src/feedback/progressBar/ProgressBar.tsx","../src/feedback/progressCircle/ProgressCircle.tsx","../src/feedback/alertSimple/AlertSimple.variants.ts","../src/feedback/alertSimple/AlertSimple.tsx","../src/feedback/bannerSimple/BannerSimple.variants.ts","../src/feedback/bannerSimple/BannerSimple.tsx","../src/feedback/toastSimple/ToastSimple.variants.ts","../src/feedback/toastSimple/ToastSimple.tsx"],"names":["forwardRef","jsx","jsxs"],"mappings":";;;;;;AAEO,IAAM,kBAAkB,EAAA,CAAG;AAAA,EAChC,IAAA,EAAM,4EAAA;AAAA,EACN,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,gBAAA;AAAA,MACJ,EAAA,EAAI,kBAAA;AAAA,MACJ,EAAA,EAAI,kBAAA;AAAA,MACJ,EAAA,EAAI,kBAAA;AAAA,MACJ,EAAA,EAAI;AAAA,KACN;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,OAAA,EAAS,kBAAA;AAAA,MACT,KAAA,EAAO,gBAAA;AAAA,MACP,KAAA,EAAO,kBAAA;AAAA,MACP,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,IAAA;AAAA,IACN,IAAA,EAAM;AAAA;AAEV,CAAC;ACRM,IAAM,OAAA,GAAU,UAAA;AAAA,EACrB,CAAC,EAAE,SAAA,EAAW,MAAM,IAAA,EAAM,KAAA,GAAQ,WAAW,IAAA,GAAO,QAAA,EAAU,GAAG,KAAA,IAAS,GAAA,qBACxE,IAAA,CAAC,UAAK,GAAA,EAAU,IAAA,EAAa,GAAG,KAAA,EAC9B,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,EAAA,CAAG,eAAA,CAAgB,EAAE,MAAM,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA,EAAG,CAAA;AAAA,oBACjE,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAW,QAAA,EAAA,KAAA,EAAM;AAAA,GAAA,EACnC;AAEJ;AACA,OAAA,CAAQ,WAAA,GAAc,SAAA;;;ACrBf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,MACR,IAAA,EAAM,iBAAA;AAAA,MACN,OAAA,EAAS,oBAAA;AAAA,MACT,OAAA,EAAS,oBAAA;AAAA,MACT,MAAA,EAAQ,mBAAA;AAAA,MACR,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,QAAA,EAAU;AAAA;AAEd,CAAC;ACFM,IAAM,WAAA,GAAcD,UAAAA;AAAA,EACzB,CAAC,EAAE,SAAA,EAAW,QAAA,EAAU,IAAA,GAAO,UAAU,GAAG,KAAA,EAAM,EAAG,GAAA,qBACnDC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,WAAW,EAAA,CAAG,mBAAA,CAAoB,EAAE,QAAA,EAAU,GAAG,SAAS,CAAA;AAAA,MACzD,GAAG;AAAA;AAAA;AAGV;AACA,WAAA,CAAY,WAAA,GAAc,aAAA","file":"chunk-YLN7VMYU.js","sourcesContent":["import { tv, type VariantProps } from '../../utils';\n\nexport const spinnerVariants = tv({\n base: 'inline-block animate-spin rounded-full border-current border-b-transparent',\n variants: {\n size: {\n xs: 'h-3 w-3 border',\n sm: 'h-4 w-4 border-2',\n md: 'h-5 w-5 border-2',\n lg: 'h-8 w-8 border-2',\n xl: 'h-12 w-12 border-[3px]',\n },\n tone: {\n default: 'text-neutral-500',\n brand: 'text-brand-600',\n muted: 'text-neutral-300',\n current: '',\n },\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n});\n\nexport type SpinnerVariants = VariantProps<typeof spinnerVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport { spinnerVariants, type SpinnerVariants } from './Spinner.variants';\n\nexport interface SpinnerProps\n extends Omit<ComponentPropsWithoutRef<'span'>, 'children'>,\n SpinnerVariants {\n /** Accessible label. Default `\"Loading\"`. */\n label?: string;\n}\n\n/**\n * Indeterminate loading spinner. Renders a spinning circle and a visually\n * hidden text label for screen readers.\n */\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(\n ({ className, size, tone, label = 'Loading', role = 'status', ...props }, ref) => (\n <span ref={ref} role={role} {...props}>\n <span className={cn(spinnerVariants({ size, tone }), className)} />\n <span className=\"sr-only\">{label}</span>\n </span>\n ),\n);\nSpinner.displayName = 'Spinner';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const skeletonVariants = tv({\n base: 'animate-pulse bg-neutral-200',\n variants: {\n shape: {\n rect: 'rounded-md',\n text: 'h-4 rounded-sm',\n circle: 'rounded-full',\n },\n },\n defaultVariants: {\n shape: 'rect',\n },\n});\n\nexport type SkeletonVariants = VariantProps<typeof skeletonVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport { skeletonVariants, type SkeletonVariants } from './Skeleton.variants';\n\nexport interface SkeletonProps extends ComponentPropsWithoutRef<'div'>, SkeletonVariants {}\n\n/**\n * Loading placeholder. Use sized via `className` (e.g. `w-32 h-4`) for text\n * lines, or as a full block with `shape=\"rect\"`.\n */\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(\n ({ className, shape, ...props }, ref) => (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={cn(skeletonVariants({ shape }), className)}\n {...props}\n />\n ),\n);\nSkeleton.displayName = 'Skeleton';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const progressTrackVariants = tv({\n base: 'h-2 w-full overflow-hidden rounded-full bg-neutral-200',\n variants: {\n size: {\n sm: 'h-1',\n md: 'h-2',\n lg: 'h-3',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nexport const progressFillVariants = tv({\n base: 'h-full rounded-full transition-[width] duration-300',\n variants: {\n tone: {\n brand: 'bg-brand-600',\n success: 'bg-success-500',\n warning: 'bg-warning-500',\n danger: 'bg-danger-500',\n neutral: 'bg-neutral-500',\n },\n },\n defaultVariants: {\n tone: 'brand',\n },\n});\n\nexport type ProgressBarVariants = VariantProps<typeof progressTrackVariants> &\n VariantProps<typeof progressFillVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport {\n progressFillVariants,\n progressTrackVariants,\n type ProgressBarVariants,\n} from './ProgressBar.variants';\n\nexport interface ProgressBarProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'children'>,\n ProgressBarVariants {\n /** Current value 0–100. Pass `undefined` for indeterminate. */\n value?: number;\n max?: number;\n /** Accessible label for the progress. */\n label?: string;\n}\n\n/**\n * Linear progress indicator. Set `value` (0–`max`) for determinate; omit\n * for indeterminate.\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n ({ value, max = 100, size, tone, label, className, ...props }, ref) => {\n const determinate = typeof value === 'number';\n const pct = determinate ? Math.min(100, Math.max(0, (value / max) * 100)) : undefined;\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={determinate ? value : undefined}\n className={cn(progressTrackVariants({ size }), className)}\n {...props}\n >\n <div\n className={cn(\n progressFillVariants({ tone }),\n !determinate && 'w-1/3 animate-[indeterminate_1.4s_ease-in-out_infinite]',\n )}\n style={determinate ? { width: `${pct}%` } : undefined}\n />\n </div>\n );\n },\n);\nProgressBar.displayName = 'ProgressBar';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface ProgressCircleProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n /** 0–100. Omit for indeterminate. */\n value?: number;\n max?: number;\n size?: number;\n thickness?: number;\n tone?: 'brand' | 'success' | 'warning' | 'danger' | 'neutral';\n label?: string;\n}\n\nconst TONE_CLASS: Record<NonNullable<ProgressCircleProps['tone']>, string> = {\n brand: 'text-brand-600',\n success: 'text-success-500',\n warning: 'text-warning-500',\n danger: 'text-danger-500',\n neutral: 'text-neutral-500',\n};\n\n/**\n * Circular progress indicator (SVG). Determinate when `value` is set;\n * indeterminate (rotating) when omitted.\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n { value, max = 100, size = 40, thickness = 4, tone = 'brand', label, className, ...props },\n ref,\n ) => {\n const determinate = typeof value === 'number';\n const radius = (size - thickness) / 2;\n const circumference = 2 * Math.PI * radius;\n const pct = determinate ? Math.min(100, Math.max(0, (value / max) * 100)) : 25;\n const offset = circumference - (pct / 100) * circumference;\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={determinate ? value : undefined}\n className={cn('inline-block', !determinate && 'animate-spin', TONE_CLASS[tone], className)}\n style={{ width: size, height: size }}\n {...props}\n >\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"currentColor\"\n strokeWidth={thickness}\n fill=\"none\"\n opacity={0.2}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"currentColor\"\n strokeWidth={thickness}\n strokeLinecap=\"round\"\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n style={{ transition: 'stroke-dashoffset 300ms ease' }}\n />\n </svg>\n </div>\n );\n },\n);\nProgressCircle.displayName = 'ProgressCircle';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const alertSimpleVariants = tv({\n base: 'rounded-md border px-4 py-3 text-sm',\n variants: {\n severity: {\n info: 'border-info-100 bg-info-50 text-info-900',\n success: 'border-success-100 bg-success-50 text-success-900',\n warning: 'border-warning-100 bg-warning-50 text-warning-900',\n danger: 'border-danger-100 bg-danger-50 text-danger-900',\n neutral: 'border-neutral-200 bg-neutral-50 text-neutral-900',\n },\n },\n defaultVariants: {\n severity: 'info',\n },\n});\n\nexport type AlertSimpleVariants = VariantProps<typeof alertSimpleVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport { alertSimpleVariants, type AlertSimpleVariants } from './AlertSimple.variants';\n\nexport interface AlertSimpleProps\n extends ComponentPropsWithoutRef<'div'>,\n AlertSimpleVariants {}\n\n/**\n * Atomic alert — a styled colored container that takes free-form `children`.\n * No internal slots; consumer composes title/description/actions inline.\n *\n * For the structured Icon + Title + Description + Actions composition use\n * the `Alert` molecule (L4).\n */\nexport const AlertSimple = forwardRef<HTMLDivElement, AlertSimpleProps>(\n ({ className, severity, role = 'status', ...props }, ref) => (\n <div\n ref={ref}\n role={role}\n className={cn(alertSimpleVariants({ severity }), className)}\n {...props}\n />\n ),\n);\nAlertSimple.displayName = 'AlertSimple';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const bannerSimpleVariants = tv({\n base: 'w-full px-6 py-3 text-sm',\n variants: {\n severity: {\n info: 'bg-info-500 text-white',\n success: 'bg-success-500 text-white',\n warning: 'bg-warning-500 text-warning-900',\n danger: 'bg-danger-500 text-white',\n neutral: 'bg-neutral-900 text-neutral-50',\n },\n },\n defaultVariants: {\n severity: 'info',\n },\n});\n\nexport type BannerSimpleVariants = VariantProps<typeof bannerSimpleVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport { bannerSimpleVariants, type BannerSimpleVariants } from './BannerSimple.variants';\n\nexport interface BannerSimpleProps\n extends ComponentPropsWithoutRef<'div'>,\n BannerSimpleVariants {}\n\n/**\n * Full-width banner — typically pinned to the top of the app to broadcast\n * status. Atom; for structured slotted layout use `Banner` (L4).\n */\nexport const BannerSimple = forwardRef<HTMLDivElement, BannerSimpleProps>(\n ({ className, severity, role = 'status', ...props }, ref) => (\n <div\n ref={ref}\n role={role}\n className={cn(bannerSimpleVariants({ severity }), className)}\n {...props}\n />\n ),\n);\nBannerSimple.displayName = 'BannerSimple';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const toastSimpleVariants = tv({\n base: 'pointer-events-auto rounded-md border bg-white shadow-lg px-4 py-3 text-sm',\n variants: {\n severity: {\n info: 'border-info-100',\n success: 'border-success-100',\n warning: 'border-warning-100',\n danger: 'border-danger-100',\n neutral: 'border-neutral-200',\n },\n },\n defaultVariants: {\n severity: 'neutral',\n },\n});\n\nexport type ToastSimpleVariants = VariantProps<typeof toastSimpleVariants>;\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\nimport { toastSimpleVariants, type ToastSimpleVariants } from './ToastSimple.variants';\n\nexport interface ToastSimpleProps\n extends ComponentPropsWithoutRef<'div'>,\n ToastSimpleVariants {}\n\n/**\n * Atomic toast — a single notification card with free-form `children`.\n * Visual only; the queue / portal manager (`Toaster`) lives at L5. For\n * the structured Icon + Title + Description + Action layout, use the\n * `Toast` molecule (L4).\n */\nexport const ToastSimple = forwardRef<HTMLDivElement, ToastSimpleProps>(\n ({ className, severity, role = 'status', ...props }, ref) => (\n <div\n ref={ref}\n role={role}\n aria-live=\"polite\"\n className={cn(toastSimpleVariants({ severity }), className)}\n {...props}\n />\n ),\n);\nToastSimple.displayName = 'ToastSimple';\n"]}
|