@acronis-platform/ui-react 0.46.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/alert/alert.js +99 -0
- package/dist/components/ui/alert/alert.js.map +1 -0
- package/dist/components/ui/chart/chart.js +213 -0
- package/dist/components/ui/chart/chart.js.map +1 -0
- package/dist/components/ui/combobox/combobox.js +149 -0
- package/dist/components/ui/combobox/combobox.js.map +1 -0
- package/dist/components/ui/field/field.js +189 -0
- package/dist/components/ui/field/field.js.map +1 -0
- package/dist/components/ui/form/form.js +16 -0
- package/dist/components/ui/form/form.js.map +1 -0
- package/dist/components/ui/skeleton/skeleton.js +22 -0
- package/dist/components/ui/skeleton/skeleton.js.map +1 -0
- package/dist/index.js +292 -251
- package/dist/index.js.map +1 -1
- package/dist/react.js +292 -251
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/alert/alert.d.ts +14 -0
- package/dist/src/components/ui/alert/index.d.ts +2 -0
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/chart/chart.d.ts +55 -0
- package/dist/src/components/ui/chart/index.d.ts +2 -0
- package/dist/src/components/ui/combobox/combobox.d.ts +28 -0
- package/dist/src/components/ui/combobox/index.d.ts +2 -0
- package/dist/src/components/ui/field/field.d.ts +39 -0
- package/dist/src/components/ui/field/field.docs.d.ts +27 -0
- package/dist/src/components/ui/field/index.d.ts +2 -0
- package/dist/src/components/ui/form/form.d.ts +6 -0
- package/dist/src/components/ui/form/index.d.ts +1 -0
- package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
- package/dist/src/components/ui/skeleton/index.d.ts +1 -0
- package/dist/src/components/ui/skeleton/skeleton.d.ts +4 -0
- package/dist/src/components/ui/tag/tag.d.ts +1 -1
- package/dist/src/index.d.ts +7 -0
- package/dist/ui-react.css +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Field as r } from "@base-ui/react/field";
|
|
3
|
+
import { cva as n } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
5
|
+
import { Separator as d } from "../separator/separator.js";
|
|
6
|
+
import { labelClassName as s } from "../label/label.js";
|
|
7
|
+
const f = n(
|
|
8
|
+
"group/field flex w-full gap-3 data-[invalid]:text-[var(--ui-text-on-status-danger)]",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
orientation: {
|
|
12
|
+
vertical: "flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
13
|
+
horizontal: "flex-row items-center [&>[data-slot=field-label]]:flex-auto",
|
|
14
|
+
responsive: "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
orientation: "vertical"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
function v({ className: e, orientation: t = "vertical", ...o }) {
|
|
23
|
+
return /* @__PURE__ */ a(
|
|
24
|
+
r.Root,
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "field",
|
|
27
|
+
"data-orientation": t,
|
|
28
|
+
className: l(f({ orientation: t }), e),
|
|
29
|
+
...o
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function b({ className: e, ...t }) {
|
|
34
|
+
return /* @__PURE__ */ a(
|
|
35
|
+
r.Label,
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "field-label",
|
|
38
|
+
className: l(
|
|
39
|
+
s,
|
|
40
|
+
"flex w-fit items-center gap-2 leading-snug group-data-[disabled]/field:opacity-50",
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
...t
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function N({ className: e, ...t }) {
|
|
48
|
+
return /* @__PURE__ */ a(
|
|
49
|
+
r.Control,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "field-control",
|
|
52
|
+
className: l(e),
|
|
53
|
+
...t
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function F({ className: e, ...t }) {
|
|
58
|
+
return /* @__PURE__ */ a(
|
|
59
|
+
r.Description,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "field-description",
|
|
62
|
+
className: l(
|
|
63
|
+
"text-sm font-normal leading-normal text-muted-foreground",
|
|
64
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-[var(--ui-background-brand-secondary)]",
|
|
65
|
+
e
|
|
66
|
+
),
|
|
67
|
+
...t
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function w({ className: e, ...t }) {
|
|
72
|
+
return /* @__PURE__ */ a(
|
|
73
|
+
r.Error,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "field-error",
|
|
76
|
+
className: l(
|
|
77
|
+
"text-sm font-normal text-[var(--ui-text-on-status-danger)]",
|
|
78
|
+
e
|
|
79
|
+
),
|
|
80
|
+
...t
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
function y({ className: e, ...t }) {
|
|
85
|
+
return /* @__PURE__ */ a(
|
|
86
|
+
"fieldset",
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "field-set",
|
|
89
|
+
className: l(
|
|
90
|
+
"flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
91
|
+
e
|
|
92
|
+
),
|
|
93
|
+
...t
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function h({
|
|
98
|
+
className: e,
|
|
99
|
+
variant: t = "legend",
|
|
100
|
+
...o
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ a(
|
|
103
|
+
"legend",
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "field-legend",
|
|
106
|
+
"data-variant": t,
|
|
107
|
+
className: l(
|
|
108
|
+
"mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",
|
|
109
|
+
e
|
|
110
|
+
),
|
|
111
|
+
...o
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function k({ className: e, ...t }) {
|
|
116
|
+
return /* @__PURE__ */ a(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
"data-slot": "field-group",
|
|
120
|
+
className: l(
|
|
121
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 [&>[data-slot=field-group]]:gap-4",
|
|
122
|
+
e
|
|
123
|
+
),
|
|
124
|
+
...t
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function C({ className: e, ...t }) {
|
|
129
|
+
return /* @__PURE__ */ a(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "field-content",
|
|
133
|
+
className: l(
|
|
134
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
135
|
+
e
|
|
136
|
+
),
|
|
137
|
+
...t
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function L({ className: e, ...t }) {
|
|
142
|
+
return /* @__PURE__ */ a(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
"data-slot": "field-title",
|
|
146
|
+
className: l(
|
|
147
|
+
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled]/field:opacity-50",
|
|
148
|
+
e
|
|
149
|
+
),
|
|
150
|
+
...t
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
function S({ children: e, className: t, ...o }) {
|
|
155
|
+
return /* @__PURE__ */ i(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
"data-slot": "field-separator",
|
|
159
|
+
"data-content": !!e,
|
|
160
|
+
className: l("relative -my-2 h-5 text-sm", t),
|
|
161
|
+
...o,
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ a(d, { className: "absolute inset-0 top-1/2" }),
|
|
164
|
+
e && /* @__PURE__ */ a(
|
|
165
|
+
"span",
|
|
166
|
+
{
|
|
167
|
+
"data-slot": "field-separator-content",
|
|
168
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
169
|
+
children: e
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
export {
|
|
177
|
+
v as Field,
|
|
178
|
+
C as FieldContent,
|
|
179
|
+
N as FieldControl,
|
|
180
|
+
F as FieldDescription,
|
|
181
|
+
w as FieldError,
|
|
182
|
+
k as FieldGroup,
|
|
183
|
+
b as FieldLabel,
|
|
184
|
+
h as FieldLegend,
|
|
185
|
+
S as FieldSeparator,
|
|
186
|
+
y as FieldSet,
|
|
187
|
+
L as FieldTitle
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","sources":["../../../../src/components/ui/field/field.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Field as FieldPrimitive } from '@base-ui/react/field';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\nimport { labelClassName } from '../label';\nimport { Separator } from '../separator';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `field`\n// (packages/ui-legacy/src/components/ui/field.tsx), rebuilt on Base UI's `Field`\n// primitive. `Field` (Root) / `FieldLabel` / `FieldControl` / `FieldDescription` /\n// `FieldError` auto-wire the label↔control↔description↔error associations and\n// expose Base UI's validity state — no manual `htmlFor`/`id`/`aria-*`. The\n// structural parts (`FieldSet`, `FieldLegend`, `FieldGroup`, `FieldContent`,\n// `FieldTitle`, `FieldSeparator`) are styled markup (Base UI has no equivalent).\n// Field pairs with the *bare* controls — `InputBox`, `Checkbox`, `Switch`,\n// `RadioGroup` — not the self-contained `InputText`/`InputSearch` fields.\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid]:text-[var(--ui-text-on-status-danger)]',\n {\n variants: {\n orientation: {\n vertical: 'flex-col [&>*]:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'flex-row items-center [&>[data-slot=field-label]]:flex-auto',\n responsive:\n 'flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nexport interface FieldProps\n extends Omit<React.ComponentProps<typeof FieldPrimitive.Root>, 'className'>,\n VariantProps<typeof fieldVariants> {\n className?: string;\n}\n\nfunction Field({ className, orientation = 'vertical', ...props }: FieldProps) {\n return (\n <FieldPrimitive.Root\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nexport interface FieldLabelProps\n extends Omit<React.ComponentProps<typeof FieldPrimitive.Label>, 'className'> {\n className?: string;\n}\n\nfunction FieldLabel({ className, ...props }: FieldLabelProps) {\n return (\n <FieldPrimitive.Label\n data-slot=\"field-label\"\n className={cn(\n labelClassName,\n 'flex w-fit items-center gap-2 leading-snug group-data-[disabled]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nexport interface FieldControlProps\n extends Omit<React.ComponentProps<typeof FieldPrimitive.Control>, 'className'> {\n className?: string;\n}\n\n// Thin wrapper over Base UI's Field.Control — usually used with `render` to wire\n// a bare ui-react control (e.g. `<FieldControl render={<InputBox />} />`), which\n// receives the field's id / aria-describedby / name automatically.\nfunction FieldControl({ className, ...props }: FieldControlProps) {\n return (\n <FieldPrimitive.Control\n data-slot=\"field-control\"\n className={cn(className)}\n {...props}\n />\n );\n}\n\nexport interface FieldDescriptionProps\n extends Omit<\n React.ComponentProps<typeof FieldPrimitive.Description>,\n 'className'\n > {\n className?: string;\n}\n\nfunction FieldDescription({ className, ...props }: FieldDescriptionProps) {\n return (\n <FieldPrimitive.Description\n data-slot=\"field-description\"\n className={cn(\n 'text-sm font-normal leading-normal text-muted-foreground',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-[var(--ui-background-brand-secondary)]',\n className\n )}\n {...props}\n />\n );\n}\n\nexport interface FieldErrorProps\n extends Omit<React.ComponentProps<typeof FieldPrimitive.Error>, 'className'> {\n className?: string;\n}\n\nfunction FieldError({ className, ...props }: FieldErrorProps) {\n return (\n <FieldPrimitive.Error\n data-slot=\"field-error\"\n className={cn(\n 'text-sm font-normal text-[var(--ui-text-on-status-danger)]',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nexport interface FieldLegendProps extends React.ComponentProps<'legend'> {\n variant?: 'legend' | 'label';\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: FieldLegendProps) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 [&>[data-slot=field-group]]:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-title\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nexport interface FieldSeparatorProps extends React.ComponentProps<'div'> {\n children?: React.ReactNode;\n}\n\nfunction FieldSeparator({ children, className, ...props }: FieldSeparatorProps) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n data-slot=\"field-separator-content\"\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldControl,\n FieldDescription,\n FieldError,\n FieldSet,\n FieldLegend,\n FieldGroup,\n FieldContent,\n FieldTitle,\n FieldSeparator,\n};\n"],"names":["fieldVariants","cva","Field","className","orientation","props","jsx","FieldPrimitive","cn","FieldLabel","labelClassName","FieldControl","FieldDescription","FieldError","FieldSet","FieldLegend","variant","FieldGroup","FieldContent","FieldTitle","FieldSeparator","children","jsxs","Separator"],"mappings":";;;;;;AAoBA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,UAAU;AAAA,QACV,YACE;AAAA,QACF,YACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAQA,SAASC,EAAM,EAAE,WAAAC,GAAW,aAAAC,IAAc,YAAY,GAAGC,KAAqB;AAC5E,SACE,gBAAAC;AAAA,IAACC,EAAe;AAAA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AA,CAA2B;AAAA,QAC/CF,KACC,gBAAAf;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET,UAAAe;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Form as f } from "@base-ui/react/form";
|
|
3
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
4
|
+
function a({ className: o, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ m(
|
|
6
|
+
f,
|
|
7
|
+
{
|
|
8
|
+
className: l("flex w-full flex-col gap-6", o),
|
|
9
|
+
...r
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
a as Form
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sources":["../../../../src/components/ui/form/form.tsx"],"sourcesContent":["'use client';\n\nimport {\n Form as FormPrimitive,\n type FormProps as BaseFormProps,\n} from '@base-ui/react/form';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `form`\n// (packages/ui-legacy/src/components/ui/form.tsx), rebuilt on Base UI's Form.\n// The legacy form was a react-hook-form wrapper (FormProvider/Controller); this\n// version drops that dependency and coordinates the ui-react `Field`s directly via\n// Base UI's native form: it collects values by each Field's `name`, runs their\n// validation on submit (or per `validationMode`), surfaces server `errors` keyed\n// by field name, and calls `onFormSubmit(values)` only when all fields are valid.\nexport interface FormProps<\n FormValues extends Record<string, unknown> = Record<string, unknown>,\n> extends Omit<BaseFormProps<FormValues>, 'className'> {\n className?: string;\n}\n\nfunction Form<\n FormValues extends Record<string, unknown> = Record<string, unknown>,\n>({ className, ...props }: FormProps<FormValues>) {\n return (\n <FormPrimitive\n className={cn('flex w-full flex-col gap-6', className)}\n {...props}\n />\n );\n}\n\nexport { Form };\n"],"names":["Form","className","props","jsx","FormPrimitive","cn"],"mappings":";;;AAsBA,SAASA,EAEP,EAAE,WAAAC,GAAW,GAAGC,KAAgC;AAChD,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWC,EAAG,8BAA8BJ,CAAS;AAAA,MACpD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
4
|
+
const s = t.forwardRef(
|
|
5
|
+
({ className: e, ...a }, o) => /* @__PURE__ */ r(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: o,
|
|
9
|
+
"data-slot": "skeleton",
|
|
10
|
+
className: m(
|
|
11
|
+
"animate-pulse rounded-md bg-[var(--ui-background-surface-active)]",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...a
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
s.displayName = "Skeleton";
|
|
19
|
+
export {
|
|
20
|
+
s as Skeleton
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sources":["../../../../src/components/ui/skeleton/skeleton.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `skeleton`\n// (packages/ui-legacy/src/components/ui/skeleton.tsx). A pulsing placeholder box\n// for loading states — no Base UI primitive, just a styled `<div>`. The legacy\n// `bg-muted` (--ui-background-surface-secondary) is near-white and nearly\n// invisible on a white surface, so the fill uses the more visible\n// `--ui-background-surface-active` gray (still subtle in dark). Shape and size\n// come from the caller's className.\nexport type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"skeleton\"\n className={cn(\n 'animate-pulse rounded-md bg-[var(--ui-background-surface-active)]',\n className\n )}\n {...props}\n />\n )\n);\nSkeleton.displayName = 'Skeleton';\n\nexport { Skeleton };\n"],"names":["Skeleton","React","className","props","ref","jsx","cn"],"mappings":";;;AAaA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACxB,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,aAAU;AAAA,MACV,WAAWE;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AACAH,EAAS,cAAc;"}
|