@bestow-ui/react 0.8.2 → 0.9.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/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/index.cjs +658 -371
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +601 -36
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +179 -18
- package/dist/index.d.ts +179 -18
- package/dist/index.js +630 -350
- package/dist/index.js.map +1 -1
- package/package.json +22 -4
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/theme/contract.css.ts
|
|
4
4
|
var themeClass = { light: "tkagtb0", dark: "tkagtb1" };
|
|
5
|
-
var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } },
|
|
5
|
+
var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } }, duration: { fast: "var(--bestow-duration-fast)", normal: "var(--bestow-duration-normal)", slow: "var(--bestow-duration-slow)" }, zIndex: { dropdown: "var(--bestow-z-index-dropdown)", overlay: "var(--bestow-z-index-overlay)", modal: "var(--bestow-z-index-modal)", toast: "var(--bestow-z-index-toast)", tooltip: "var(--bestow-z-index-tooltip)" }, color: { bg: { "default": "var(--bestow-color-bg-default)", subtle: "var(--bestow-color-bg-subtle)", muted: "var(--bestow-color-bg-muted)", inverse: "var(--bestow-color-bg-inverse)", overlay: "var(--bestow-color-bg-overlay)" }, fg: { "default": "var(--bestow-color-fg-default)", muted: "var(--bestow-color-fg-muted)", subtle: "var(--bestow-color-fg-subtle)", inverse: "var(--bestow-color-fg-inverse)" }, border: { "default": "var(--bestow-color-border-default)", strong: "var(--bestow-color-border-strong)", focus: "var(--bestow-color-border-focus)" }, primary: { solid: "var(--bestow-color-primary-solid)", solidHover: "var(--bestow-color-primary-solid-hover)", contrast: "var(--bestow-color-primary-contrast)", subtle: "var(--bestow-color-primary-subtle)", subtleHover: "var(--bestow-color-primary-subtle-hover)", text: "var(--bestow-color-primary-text)" }, neutral: { solid: "var(--bestow-color-neutral-solid)", solidHover: "var(--bestow-color-neutral-solid-hover)", contrast: "var(--bestow-color-neutral-contrast)", subtle: "var(--bestow-color-neutral-subtle)", subtleHover: "var(--bestow-color-neutral-subtle-hover)", text: "var(--bestow-color-neutral-text)" }, danger: { solid: "var(--bestow-color-danger-solid)", solidHover: "var(--bestow-color-danger-solid-hover)", contrast: "var(--bestow-color-danger-contrast)", subtle: "var(--bestow-color-danger-subtle)", subtleHover: "var(--bestow-color-danger-subtle-hover)", text: "var(--bestow-color-danger-text)" }, success: { solid: "var(--bestow-color-success-solid)", solidHover: "var(--bestow-color-success-solid-hover)", contrast: "var(--bestow-color-success-contrast)", subtle: "var(--bestow-color-success-subtle)", subtleHover: "var(--bestow-color-success-subtle-hover)", text: "var(--bestow-color-success-text)" }, warning: { solid: "var(--bestow-color-warning-solid)", solidHover: "var(--bestow-color-warning-solid-hover)", contrast: "var(--bestow-color-warning-contrast)", subtle: "var(--bestow-color-warning-subtle)", subtleHover: "var(--bestow-color-warning-subtle-hover)", text: "var(--bestow-color-warning-text)" } }, shadow: { sm: "var(--bestow-shadow-sm)", md: "var(--bestow-shadow-md)", lg: "var(--bestow-shadow-lg)" } };
|
|
6
6
|
|
|
7
7
|
// src/theme/color.ts
|
|
8
8
|
import { darkColors, lightColors, palette } from "@bestow-ui/tokens";
|
|
@@ -78,6 +78,11 @@ function findReadable(base, startL, step, backgrounds) {
|
|
|
78
78
|
}
|
|
79
79
|
return step < 0 ? palette.black : palette.white;
|
|
80
80
|
}
|
|
81
|
+
function hoverFor(base, delta, contrast) {
|
|
82
|
+
const preferred = withL(base, Math.min(1, Math.max(0, base.l + delta)));
|
|
83
|
+
if (contrastRatio(contrast, preferred) >= 4.5) return preferred;
|
|
84
|
+
return withL(base, Math.min(1, Math.max(0, base.l - delta)));
|
|
85
|
+
}
|
|
81
86
|
function pickContrast(solid) {
|
|
82
87
|
const white = palette.white;
|
|
83
88
|
const dark = palette.gray[900];
|
|
@@ -93,10 +98,11 @@ function createIntentColors(intent, color) {
|
|
|
93
98
|
const base = rgbToOklch(parseHex(solid));
|
|
94
99
|
const lightSubtle = withL(base, 0.97, Math.min(base.c, 0.12) * 0.3);
|
|
95
100
|
const lightSubtleHover = withL(base, 0.93, Math.min(base.c, 0.12) * 0.45);
|
|
101
|
+
const lightContrast = pickContrast(solid);
|
|
96
102
|
const light = {
|
|
97
103
|
solid,
|
|
98
|
-
solidHover:
|
|
99
|
-
contrast:
|
|
104
|
+
solidHover: hoverFor(base, -0.06, lightContrast),
|
|
105
|
+
contrast: lightContrast,
|
|
100
106
|
subtle: lightSubtle,
|
|
101
107
|
subtleHover: lightSubtleHover,
|
|
102
108
|
text: findReadable(base, Math.min(base.l, 0.55), -0.02, [lightColors.bg.default, lightSubtle, lightSubtleHover])
|
|
@@ -106,15 +112,19 @@ function createIntentColors(intent, color) {
|
|
|
106
112
|
const darkBase = rgbToOklch(parseHex(darkSolid));
|
|
107
113
|
const darkSubtleOnBg = blend(darkSolid, 0.16, darkBg);
|
|
108
114
|
const darkSubtleHoverOnBg = blend(darkSolid, 0.26, darkBg);
|
|
115
|
+
const darkContrast = pickContrast(darkSolid);
|
|
109
116
|
const dark = {
|
|
110
117
|
solid: darkSolid,
|
|
111
|
-
solidHover:
|
|
112
|
-
contrast:
|
|
118
|
+
solidHover: hoverFor(darkBase, 0.06, darkContrast),
|
|
119
|
+
contrast: darkContrast,
|
|
113
120
|
subtle: rgba(darkSolid, 0.16),
|
|
114
121
|
subtleHover: rgba(darkSolid, 0.26),
|
|
115
122
|
text: findReadable(darkBase, Math.max(darkBase.l, 0.75), 0.02, [darkBg, darkSubtleOnBg, darkSubtleHoverOnBg])
|
|
116
123
|
};
|
|
117
|
-
const focus = intent === "primary" ? {
|
|
124
|
+
const focus = intent === "primary" ? {
|
|
125
|
+
light: { border: { focus: light.solid } },
|
|
126
|
+
dark: { border: { focus: withL(darkBase, Math.min(1, darkBase.l + 0.06)) } }
|
|
127
|
+
} : void 0;
|
|
118
128
|
return {
|
|
119
129
|
light: { color: { [intent]: light, ...focus?.light } },
|
|
120
130
|
dark: { color: { [intent]: dark, ...focus?.dark } }
|
|
@@ -126,10 +136,10 @@ import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
|
126
136
|
function deepMerge(target, source) {
|
|
127
137
|
if (!source) return target;
|
|
128
138
|
const out = { ...target };
|
|
129
|
-
for (const [key,
|
|
130
|
-
if (
|
|
139
|
+
for (const [key, value3] of Object.entries(source)) {
|
|
140
|
+
if (value3 === void 0) continue;
|
|
131
141
|
const prev = out[key];
|
|
132
|
-
out[key] = typeof
|
|
142
|
+
out[key] = typeof value3 === "object" && typeof prev === "object" ? deepMerge(prev, value3) : value3;
|
|
133
143
|
}
|
|
134
144
|
return out;
|
|
135
145
|
}
|
|
@@ -148,11 +158,11 @@ function mergeThemes(a, b) {
|
|
|
148
158
|
return createTheme(a, b);
|
|
149
159
|
}
|
|
150
160
|
function flatten(partial, contract, out) {
|
|
151
|
-
for (const [key,
|
|
161
|
+
for (const [key, value3] of Object.entries(partial)) {
|
|
152
162
|
const target = contract[key];
|
|
153
163
|
if (target === void 0) continue;
|
|
154
|
-
if (typeof target === "string" && typeof
|
|
155
|
-
else if (typeof target === "object" && typeof
|
|
164
|
+
if (typeof target === "string" && typeof value3 === "string") out[target] = value3;
|
|
165
|
+
else if (typeof target === "object" && typeof value3 === "object") flatten(value3, target, out);
|
|
156
166
|
}
|
|
157
167
|
return out;
|
|
158
168
|
}
|
|
@@ -181,17 +191,17 @@ var ThemeProvider = /* @__PURE__ */ forwardRef(function ThemeProvider2({ theme:
|
|
|
181
191
|
const parent = useContext(ThemeContext);
|
|
182
192
|
const theme = themeProp ?? parent.theme;
|
|
183
193
|
const merged = useMemo(() => mergeThemes(parent.overrides, overrides), [parent.overrides, overrides]);
|
|
184
|
-
const
|
|
194
|
+
const value3 = useMemo(
|
|
185
195
|
() => ({ theme, overrides: merged, style: themeToStyle(merged, theme) }),
|
|
186
196
|
[theme, merged]
|
|
187
197
|
);
|
|
188
|
-
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value:
|
|
198
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: value3, children: /* @__PURE__ */ jsx(
|
|
189
199
|
"div",
|
|
190
200
|
{
|
|
191
201
|
ref,
|
|
192
202
|
"data-theme": theme,
|
|
193
203
|
className: cx(themeClass[theme], root, className),
|
|
194
|
-
style:
|
|
204
|
+
style: value3.style ? { ...value3.style, ...style } : style,
|
|
195
205
|
...rest,
|
|
196
206
|
children
|
|
197
207
|
}
|
|
@@ -230,94 +240,207 @@ var Accordion = /* @__PURE__ */ forwardRef2(function Accordion2({ className, ...
|
|
|
230
240
|
const rootProps = "value" in props ? { ...typedProps, value: props.value ?? (props.type === "multiple" ? [] : "") } : typedProps;
|
|
231
241
|
return /* @__PURE__ */ jsx2(RadixAccordion.Root, { ref, className: cx(root2, className), ...rootProps });
|
|
232
242
|
});
|
|
233
|
-
var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title:
|
|
243
|
+
var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title: title6, headingLevel = 3, className, children, ...rest }, ref) {
|
|
234
244
|
const Heading = `h${headingLevel}`;
|
|
235
245
|
return /* @__PURE__ */ jsxs(RadixAccordion.Item, { ref, className: cx(item, className), ...rest, children: [
|
|
236
246
|
/* @__PURE__ */ jsx2(RadixAccordion.Header, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { className: header, children: /* @__PURE__ */ jsxs(RadixAccordion.Trigger, { className: trigger, children: [
|
|
237
|
-
|
|
247
|
+
title6,
|
|
238
248
|
/* @__PURE__ */ jsx2(ChevronDownIcon, { size: 18, className: chevron })
|
|
239
249
|
] }) }) }),
|
|
240
250
|
/* @__PURE__ */ jsx2(RadixAccordion.Content, { className: content, children: /* @__PURE__ */ jsx2("div", { className: contentInner, children }) })
|
|
241
251
|
] });
|
|
242
252
|
});
|
|
243
253
|
|
|
254
|
+
// src/components/Alert/Alert.tsx
|
|
255
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
256
|
+
import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon } from "@bestow-ui/icons";
|
|
257
|
+
|
|
258
|
+
// src/components/Alert/Alert.css.ts
|
|
259
|
+
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
260
|
+
var action = "bsmpc0j";
|
|
261
|
+
var alert = /* @__PURE__ */ _7a468({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
|
|
262
|
+
var closeButton = "bsmpc0k";
|
|
263
|
+
var content2 = "bsmpc0g";
|
|
264
|
+
var description = "bsmpc0i";
|
|
265
|
+
var icon = "bsmpc0f";
|
|
266
|
+
var title = "bsmpc0h";
|
|
267
|
+
|
|
268
|
+
// src/components/Alert/Alert.tsx
|
|
269
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
270
|
+
var defaultIcons = {
|
|
271
|
+
primary: InfoIcon,
|
|
272
|
+
neutral: InfoIcon,
|
|
273
|
+
success: CircleCheckIcon,
|
|
274
|
+
warning: TriangleAlertIcon,
|
|
275
|
+
danger: CircleAlertIcon
|
|
276
|
+
};
|
|
277
|
+
var Alert = /* @__PURE__ */ forwardRef3(function Alert2({ variant, color = "primary", title: title6, icon: icon6, action: action3, onClose, closeLabel = "\uB2EB\uAE30", className, children, ...rest }, ref) {
|
|
278
|
+
const DefaultIcon = defaultIcons[color];
|
|
279
|
+
const iconNode = icon6 === void 0 ? /* @__PURE__ */ jsx3(DefaultIcon, { size: 18 }) : icon6;
|
|
280
|
+
return /* @__PURE__ */ jsxs2("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
281
|
+
iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx3("span", { className: icon, "aria-hidden": true, children: iconNode }),
|
|
282
|
+
/* @__PURE__ */ jsxs2("div", { className: content2, children: [
|
|
283
|
+
title6 && /* @__PURE__ */ jsx3("div", { className: title, children: title6 }),
|
|
284
|
+
children && /* @__PURE__ */ jsx3("div", { className: description, children })
|
|
285
|
+
] }),
|
|
286
|
+
action3 && /* @__PURE__ */ jsx3("div", { className: action, children: action3 }),
|
|
287
|
+
onClose && /* @__PURE__ */ jsx3("button", { type: "button", className: closeButton, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx3(XIcon, { size: 16 }) })
|
|
288
|
+
] });
|
|
289
|
+
});
|
|
290
|
+
|
|
244
291
|
// src/components/Avatar/Avatar.tsx
|
|
245
292
|
import * as RadixAvatar from "@radix-ui/react-avatar";
|
|
246
293
|
import { UserIcon } from "@bestow-ui/icons";
|
|
247
|
-
import { forwardRef as
|
|
294
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
248
295
|
|
|
249
296
|
// src/components/Avatar/Avatar.css.ts
|
|
250
|
-
import { createRuntimeFn as
|
|
297
|
+
import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
251
298
|
var fallback = "_1fd2kp27";
|
|
252
299
|
var image = "_1fd2kp26";
|
|
253
|
-
var root3 =
|
|
300
|
+
var root3 = /* @__PURE__ */ _7a4682({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
|
|
254
301
|
|
|
255
302
|
// src/components/Avatar/Avatar.tsx
|
|
256
|
-
import { jsx as
|
|
303
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
257
304
|
function getInitials(name) {
|
|
258
305
|
const [a = "", b = ""] = name.trim().split(/\s+/);
|
|
259
306
|
const first = (word) => Array.from(word)[0] ?? "";
|
|
260
307
|
return (first(a) + first(b)).toUpperCase();
|
|
261
308
|
}
|
|
262
|
-
var Avatar = /* @__PURE__ */
|
|
263
|
-
const
|
|
264
|
-
const a11y =
|
|
309
|
+
var Avatar = /* @__PURE__ */ forwardRef4(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
|
|
310
|
+
const label5 = alt ?? name;
|
|
311
|
+
const a11y = label5 ? { role: "img", "aria-label": label5 } : { "aria-hidden": true };
|
|
265
312
|
const initials = name ? getInitials(name) : "";
|
|
266
|
-
return /* @__PURE__ */
|
|
267
|
-
src && /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ jsxs3(RadixAvatar.Root, { ref, className: cx(root3({ size, shape }), className), ...a11y, ...rest, children: [
|
|
314
|
+
src && /* @__PURE__ */ jsx4(RadixAvatar.Image, { src, alt: "", className: image }),
|
|
315
|
+
/* @__PURE__ */ jsx4(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx4(UserIcon, { size: "60%" })) })
|
|
269
316
|
] });
|
|
270
317
|
});
|
|
271
318
|
|
|
272
319
|
// src/components/Badge/Badge.tsx
|
|
273
|
-
import { forwardRef as
|
|
320
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
274
321
|
|
|
275
322
|
// src/components/Badge/Badge.css.ts
|
|
276
|
-
import { createRuntimeFn as
|
|
277
|
-
var badge =
|
|
278
|
-
var
|
|
323
|
+
import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
324
|
+
var badge = /* @__PURE__ */ _7a4683({ defaultClassName: "_1295cfn4", variantClassNames: { variant: { solid: "_1295cfn5", soft: "_1295cfn6", outline: "_1295cfn7" }, color: { primary: "_1295cfn8", neutral: "_1295cfn9", danger: "_1295cfna", success: "_1295cfnb", warning: "_1295cfnc" }, size: { sm: "_1295cfnd", md: "_1295cfne", lg: "_1295cfnf" } }, defaultVariants: { variant: "soft", color: "neutral", size: "md" }, compoundVariants: [] });
|
|
325
|
+
var icon2 = "_1295cfng";
|
|
279
326
|
|
|
280
327
|
// src/components/Badge/Badge.tsx
|
|
281
|
-
import { jsx as
|
|
282
|
-
var Badge = /* @__PURE__ */
|
|
283
|
-
return /* @__PURE__ */
|
|
284
|
-
startIcon && /* @__PURE__ */
|
|
328
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
329
|
+
var Badge = /* @__PURE__ */ forwardRef5(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
|
|
330
|
+
return /* @__PURE__ */ jsxs4("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
|
|
331
|
+
startIcon && /* @__PURE__ */ jsx5("span", { className: icon2, children: startIcon }),
|
|
285
332
|
children
|
|
286
333
|
] });
|
|
287
334
|
});
|
|
288
335
|
|
|
289
|
-
// src/components/
|
|
290
|
-
import { forwardRef as
|
|
336
|
+
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
337
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
338
|
+
import { ChevronRightIcon } from "@bestow-ui/icons";
|
|
291
339
|
|
|
292
|
-
// src/components/
|
|
293
|
-
import {
|
|
294
|
-
import { forwardRef as
|
|
340
|
+
// src/components/Link/Link.tsx
|
|
341
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
342
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
343
|
+
import { ExternalLinkIcon } from "@bestow-ui/icons";
|
|
295
344
|
|
|
296
345
|
// src/styles/visuallyHidden.css.ts
|
|
297
346
|
var visuallyHidden = "_1kdtbw10";
|
|
298
347
|
|
|
348
|
+
// src/components/Link/Link.css.ts
|
|
349
|
+
import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
350
|
+
var externalIcon = "_1t4hlp6";
|
|
351
|
+
var link = /* @__PURE__ */ _7a4684({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
|
|
352
|
+
|
|
353
|
+
// src/components/Link/Link.tsx
|
|
354
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
355
|
+
var Link = /* @__PURE__ */ forwardRef6(function Link2({
|
|
356
|
+
as: Component = "a",
|
|
357
|
+
asChild,
|
|
358
|
+
color,
|
|
359
|
+
underline,
|
|
360
|
+
external,
|
|
361
|
+
externalLabel = "(\uC0C8 \uCC3D)",
|
|
362
|
+
target,
|
|
363
|
+
rel,
|
|
364
|
+
className,
|
|
365
|
+
children,
|
|
366
|
+
...rest
|
|
367
|
+
}, ref) {
|
|
368
|
+
const linkClassName = cx(link({ color, underline }), className);
|
|
369
|
+
if (asChild) {
|
|
370
|
+
return (
|
|
371
|
+
// Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
|
|
372
|
+
/* @__PURE__ */ jsx6(Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children })
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
return /* @__PURE__ */ jsxs5(
|
|
376
|
+
Component,
|
|
377
|
+
{
|
|
378
|
+
ref,
|
|
379
|
+
className: linkClassName,
|
|
380
|
+
target: external ? target ?? "_blank" : target,
|
|
381
|
+
rel: external ? rel ?? "noopener noreferrer" : rel,
|
|
382
|
+
...rest,
|
|
383
|
+
children: [
|
|
384
|
+
children,
|
|
385
|
+
external && /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
386
|
+
" ",
|
|
387
|
+
/* @__PURE__ */ jsx6(ExternalLinkIcon, { className: externalIcon }),
|
|
388
|
+
/* @__PURE__ */ jsx6("span", { className: visuallyHidden, children: externalLabel })
|
|
389
|
+
] })
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
// src/components/Breadcrumb/Breadcrumb.css.ts
|
|
396
|
+
var current = "_18t8ztt3";
|
|
397
|
+
var item2 = "_18t8ztt1";
|
|
398
|
+
var link2 = "_18t8ztt2";
|
|
399
|
+
var list = "_18t8ztt0";
|
|
400
|
+
var separator = "_18t8ztt4";
|
|
401
|
+
|
|
402
|
+
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
403
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
404
|
+
var Breadcrumb = /* @__PURE__ */ forwardRef7(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabel = "\uC774\uB3D9 \uACBD\uB85C", className, ...rest }, ref) {
|
|
405
|
+
const sep = separator3 ?? /* @__PURE__ */ jsx7(ChevronRightIcon, { size: 14 });
|
|
406
|
+
return /* @__PURE__ */ jsx7("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx7("ol", { className: list, children: items2.map((item6, index) => {
|
|
407
|
+
const isCurrent = index === items2.length - 1;
|
|
408
|
+
return /* @__PURE__ */ jsxs6("li", { className: item2, children: [
|
|
409
|
+
index > 0 && /* @__PURE__ */ jsx7("span", { className: separator, "aria-hidden": true, children: sep }),
|
|
410
|
+
isCurrent || item6.href === void 0 ? /* @__PURE__ */ jsx7("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item6.label }) : /* @__PURE__ */ jsx7(Link, { as: linkAs, href: item6.href, color: "neutral", underline: "hover", className: link2, children: item6.label })
|
|
411
|
+
] }, index);
|
|
412
|
+
}) }) });
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
// src/components/Button/Button.tsx
|
|
416
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
417
|
+
|
|
418
|
+
// src/components/Spinner/Spinner.tsx
|
|
419
|
+
import { LoaderIcon } from "@bestow-ui/icons";
|
|
420
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
421
|
+
|
|
299
422
|
// src/components/Spinner/Spinner.css.ts
|
|
300
|
-
import { createRuntimeFn as
|
|
301
|
-
var spinner =
|
|
423
|
+
import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
424
|
+
var spinner = /* @__PURE__ */ _7a4685({ defaultClassName: "_4b5tg40", variantClassNames: { color: { current: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "current", size: "md" }, compoundVariants: [] });
|
|
302
425
|
|
|
303
426
|
// src/components/Spinner/Spinner.tsx
|
|
304
|
-
import { jsx as
|
|
305
|
-
var Spinner = /* @__PURE__ */
|
|
306
|
-
const a11y =
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
|
|
427
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
428
|
+
var Spinner = /* @__PURE__ */ forwardRef8(function Spinner2({ size, color, label: label5 = "\uB85C\uB529 \uC911", className, ...rest }, ref) {
|
|
429
|
+
const a11y = label5 ? { role: "status" } : { "aria-hidden": true };
|
|
430
|
+
return /* @__PURE__ */ jsxs7("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
431
|
+
/* @__PURE__ */ jsx8(LoaderIcon, { size: "100%" }),
|
|
432
|
+
label5 && /* @__PURE__ */ jsx8("span", { className: visuallyHidden, children: label5 })
|
|
310
433
|
] });
|
|
311
434
|
});
|
|
312
435
|
|
|
313
436
|
// src/components/Button/Button.css.ts
|
|
314
|
-
import { createRuntimeFn as
|
|
315
|
-
var button =
|
|
316
|
-
var
|
|
437
|
+
import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
438
|
+
var button = /* @__PURE__ */ _7a4686({ defaultClassName: "xcekda6", variantClassNames: { variant: { solid: "xcekda7", soft: "xcekda8", outline: "xcekda9", ghost: "xcekdaa" }, color: { primary: "xcekdab", neutral: "xcekdac", danger: "xcekdad" }, size: { sm: "xcekdae", md: "xcekdaf", lg: "xcekdag" }, fullWidth: { true: "xcekdah" } }, defaultVariants: { variant: "solid", color: "primary", size: "md" }, compoundVariants: [] });
|
|
439
|
+
var icon3 = "xcekdai";
|
|
317
440
|
|
|
318
441
|
// src/components/Button/Button.tsx
|
|
319
|
-
import { jsx as
|
|
320
|
-
var Button = /* @__PURE__ */
|
|
442
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
443
|
+
var Button = /* @__PURE__ */ forwardRef9(function Button2({
|
|
321
444
|
variant,
|
|
322
445
|
color,
|
|
323
446
|
size,
|
|
@@ -338,8 +461,8 @@ var Button = /* @__PURE__ */ forwardRef6(function Button2({
|
|
|
338
461
|
}
|
|
339
462
|
onClick?.(event);
|
|
340
463
|
};
|
|
341
|
-
const leading = loading ? /* @__PURE__ */
|
|
342
|
-
return /* @__PURE__ */
|
|
464
|
+
const leading = loading ? /* @__PURE__ */ jsx9(Spinner, { size: "sm", label: "" }) : startIcon;
|
|
465
|
+
return /* @__PURE__ */ jsxs8(
|
|
343
466
|
"button",
|
|
344
467
|
{
|
|
345
468
|
ref,
|
|
@@ -350,70 +473,70 @@ var Button = /* @__PURE__ */ forwardRef6(function Button2({
|
|
|
350
473
|
onClick: handleClick,
|
|
351
474
|
...rest,
|
|
352
475
|
children: [
|
|
353
|
-
leading && /* @__PURE__ */
|
|
476
|
+
leading && /* @__PURE__ */ jsx9("span", { className: icon3, children: leading }),
|
|
354
477
|
children,
|
|
355
|
-
endIcon && /* @__PURE__ */
|
|
478
|
+
endIcon && /* @__PURE__ */ jsx9("span", { className: icon3, children: endIcon })
|
|
356
479
|
]
|
|
357
480
|
}
|
|
358
481
|
);
|
|
359
482
|
});
|
|
360
483
|
|
|
361
484
|
// src/components/Card/Card.tsx
|
|
362
|
-
import { forwardRef as
|
|
485
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
363
486
|
|
|
364
487
|
// src/components/Card/Card.css.ts
|
|
365
|
-
import { createRuntimeFn as
|
|
488
|
+
import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
366
489
|
var body = "dnuf1u9";
|
|
367
|
-
var card =
|
|
490
|
+
var card = /* @__PURE__ */ _7a4687({ defaultClassName: "dnuf1u0", variantClassNames: { variant: { outline: "dnuf1u1", elevated: "dnuf1u2", soft: "dnuf1u3" }, padding: { none: "dnuf1u4", sm: "dnuf1u5", md: "dnuf1u6", lg: "dnuf1u7" } }, defaultVariants: { variant: "outline", padding: "md" }, compoundVariants: [] });
|
|
368
491
|
var footer = "dnuf1ua";
|
|
369
492
|
var header2 = "dnuf1u8";
|
|
370
493
|
|
|
371
494
|
// src/components/Card/Card.tsx
|
|
372
|
-
import { jsx as
|
|
373
|
-
var Card = /* @__PURE__ */
|
|
374
|
-
return /* @__PURE__ */
|
|
495
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
496
|
+
var Card = /* @__PURE__ */ forwardRef10(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
|
|
497
|
+
return /* @__PURE__ */ jsx10(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
|
|
375
498
|
});
|
|
376
|
-
var CardHeader = /* @__PURE__ */
|
|
377
|
-
return /* @__PURE__ */
|
|
499
|
+
var CardHeader = /* @__PURE__ */ forwardRef10(function CardHeader2({ className, ...rest }, ref) {
|
|
500
|
+
return /* @__PURE__ */ jsx10("div", { ref, className: cx(header2, className), ...rest });
|
|
378
501
|
});
|
|
379
|
-
var CardBody = /* @__PURE__ */
|
|
380
|
-
return /* @__PURE__ */
|
|
502
|
+
var CardBody = /* @__PURE__ */ forwardRef10(function CardBody2({ className, ...rest }, ref) {
|
|
503
|
+
return /* @__PURE__ */ jsx10("div", { ref, className: cx(body, className), ...rest });
|
|
381
504
|
});
|
|
382
|
-
var CardFooter = /* @__PURE__ */
|
|
383
|
-
return /* @__PURE__ */
|
|
505
|
+
var CardFooter = /* @__PURE__ */ forwardRef10(function CardFooter2({ className, ...rest }, ref) {
|
|
506
|
+
return /* @__PURE__ */ jsx10("div", { ref, className: cx(footer, className), ...rest });
|
|
384
507
|
});
|
|
385
508
|
|
|
386
509
|
// src/components/Checkbox/Checkbox.tsx
|
|
387
|
-
import { forwardRef as
|
|
510
|
+
import { forwardRef as forwardRef11, useEffect, useRef } from "react";
|
|
388
511
|
|
|
389
512
|
// src/utils/mergeRefs.ts
|
|
390
513
|
function mergeRefs(...refs) {
|
|
391
|
-
return (
|
|
514
|
+
return (value3) => {
|
|
392
515
|
for (const ref of refs) {
|
|
393
|
-
if (typeof ref === "function") ref(
|
|
394
|
-
else if (ref) ref.current =
|
|
516
|
+
if (typeof ref === "function") ref(value3);
|
|
517
|
+
else if (ref) ref.current = value3;
|
|
395
518
|
}
|
|
396
519
|
};
|
|
397
520
|
}
|
|
398
521
|
|
|
399
522
|
// src/components/Checkbox/Checkbox.css.ts
|
|
400
|
-
import { createRuntimeFn as
|
|
523
|
+
import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
401
524
|
var checkIcon = "_1y7mzsn8 _1y7mzsn7";
|
|
402
|
-
var control =
|
|
525
|
+
var control = /* @__PURE__ */ _7a4688({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
403
526
|
var indeterminateIcon = "_1y7mzsn9 _1y7mzsn7";
|
|
404
527
|
var input = "_1y7mzsn6";
|
|
405
|
-
var root4 =
|
|
528
|
+
var root4 = /* @__PURE__ */ _7a4688({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
406
529
|
|
|
407
530
|
// src/components/Checkbox/Checkbox.tsx
|
|
408
|
-
import { jsx as
|
|
409
|
-
var Checkbox = /* @__PURE__ */
|
|
531
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
532
|
+
var Checkbox = /* @__PURE__ */ forwardRef11(function Checkbox2({ label: label5, size, indeterminate = false, invalid, disabled, className, ...rest }, ref) {
|
|
410
533
|
const innerRef = useRef(null);
|
|
411
534
|
useEffect(() => {
|
|
412
535
|
if (innerRef.current) innerRef.current.indeterminate = indeterminate;
|
|
413
536
|
}, [indeterminate]);
|
|
414
|
-
return /* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ jsxs9("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
538
|
+
/* @__PURE__ */ jsxs9("span", { className: control({ size }), children: [
|
|
539
|
+
/* @__PURE__ */ jsx11(
|
|
417
540
|
"input",
|
|
418
541
|
{
|
|
419
542
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -424,7 +547,7 @@ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label4, s
|
|
|
424
547
|
...rest
|
|
425
548
|
}
|
|
426
549
|
),
|
|
427
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ jsx11("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx11(
|
|
428
551
|
"path",
|
|
429
552
|
{
|
|
430
553
|
d: "M5 10.5l3.2 3L15 7",
|
|
@@ -434,57 +557,146 @@ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label4, s
|
|
|
434
557
|
strokeLinejoin: "round"
|
|
435
558
|
}
|
|
436
559
|
) }),
|
|
437
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ jsx11("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx11("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
438
561
|
] }),
|
|
439
|
-
|
|
562
|
+
label5
|
|
440
563
|
] });
|
|
441
564
|
});
|
|
442
565
|
|
|
443
566
|
// src/components/Divider/Divider.tsx
|
|
444
|
-
import { forwardRef as
|
|
567
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
445
568
|
|
|
446
569
|
// src/components/Divider/Divider.css.ts
|
|
447
|
-
import { createRuntimeFn as
|
|
448
|
-
var divider =
|
|
570
|
+
import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
571
|
+
var divider = /* @__PURE__ */ _7a4689({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
449
572
|
var labeled = "_1t3gq8v3";
|
|
450
573
|
var line = "_1t3gq8v4";
|
|
451
574
|
|
|
452
575
|
// src/components/Divider/Divider.tsx
|
|
453
|
-
import { jsx as
|
|
454
|
-
var Divider = /* @__PURE__ */
|
|
576
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
577
|
+
var Divider = /* @__PURE__ */ forwardRef12(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
|
|
455
578
|
if (children && orientation === "horizontal") {
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
-
/* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ jsxs10("div", { ref, className: cx(labeled, className), ...rest, children: [
|
|
580
|
+
/* @__PURE__ */ jsx12("span", { className: line, "aria-hidden": true }),
|
|
458
581
|
children,
|
|
459
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ jsx12("span", { className: line, "aria-hidden": true })
|
|
460
583
|
] });
|
|
461
584
|
}
|
|
462
585
|
const a11y = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation === "vertical" ? "vertical" : void 0 };
|
|
463
|
-
return /* @__PURE__ */
|
|
586
|
+
return /* @__PURE__ */ jsx12("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
|
|
464
587
|
});
|
|
465
588
|
|
|
589
|
+
// src/components/Drawer/Drawer.tsx
|
|
590
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
591
|
+
import { XIcon as XIcon2 } from "@bestow-ui/icons";
|
|
592
|
+
|
|
593
|
+
// src/components/IconButton/IconButton.tsx
|
|
594
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
595
|
+
|
|
596
|
+
// src/components/IconButton/IconButton.css.ts
|
|
597
|
+
import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
598
|
+
var iconButton = /* @__PURE__ */ _7a46810({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
599
|
+
|
|
600
|
+
// src/components/IconButton/IconButton.tsx
|
|
601
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
602
|
+
var IconButton = /* @__PURE__ */ forwardRef13(function IconButton2({ variant = "ghost", color = "neutral", size, loading, className, children, ...rest }, ref) {
|
|
603
|
+
return /* @__PURE__ */ jsx13(
|
|
604
|
+
Button,
|
|
605
|
+
{
|
|
606
|
+
ref,
|
|
607
|
+
variant,
|
|
608
|
+
color,
|
|
609
|
+
size,
|
|
610
|
+
loading,
|
|
611
|
+
className: cx(iconButton({ size }), className),
|
|
612
|
+
...rest,
|
|
613
|
+
children: !loading && children
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
// src/components/Drawer/Drawer.css.ts
|
|
619
|
+
import { createRuntimeFn as _7a46811 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
620
|
+
var body2 = "nmobyvy";
|
|
621
|
+
var closeButton2 = "nmobyvx";
|
|
622
|
+
var content3 = /* @__PURE__ */ _7a46811({ defaultClassName: "nmobyv9", variantClassNames: { side: { right: "nmobyva", left: "nmobyvb", top: "nmobyvc", bottom: "nmobyvd" }, size: { sm: "nmobyve", md: "nmobyvf", lg: "nmobyvg" } }, defaultVariants: { side: "right", size: "md" }, compoundVariants: [[{ side: "right", size: "sm" }, "nmobyvh"], [{ side: "right", size: "md" }, "nmobyvi"], [{ side: "right", size: "lg" }, "nmobyvj"], [{ side: "left", size: "sm" }, "nmobyvk"], [{ side: "left", size: "md" }, "nmobyvl"], [{ side: "left", size: "lg" }, "nmobyvm"], [{ side: "top", size: "sm" }, "nmobyvn"], [{ side: "top", size: "md" }, "nmobyvo"], [{ side: "top", size: "lg" }, "nmobyvp"], [{ side: "bottom", size: "sm" }, "nmobyvq"], [{ side: "bottom", size: "md" }, "nmobyvr"], [{ side: "bottom", size: "lg" }, "nmobyvs"]] });
|
|
623
|
+
var description2 = "nmobyvw";
|
|
624
|
+
var footer2 = "nmobyvz";
|
|
625
|
+
var header3 = "nmobyvt";
|
|
626
|
+
var headings = "nmobyvu";
|
|
627
|
+
var overlay = "nmobyv0";
|
|
628
|
+
var title2 = "nmobyvv";
|
|
629
|
+
|
|
630
|
+
// src/components/Drawer/Drawer.tsx
|
|
631
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
632
|
+
function Drawer({
|
|
633
|
+
open,
|
|
634
|
+
defaultOpen,
|
|
635
|
+
onOpenChange,
|
|
636
|
+
trigger: trigger4,
|
|
637
|
+
title: title6,
|
|
638
|
+
description: description6,
|
|
639
|
+
children,
|
|
640
|
+
footer: footer5,
|
|
641
|
+
side,
|
|
642
|
+
size,
|
|
643
|
+
hideCloseButton = false,
|
|
644
|
+
closeOnOverlayClick = true,
|
|
645
|
+
className
|
|
646
|
+
}) {
|
|
647
|
+
const portal2 = usePortalProps();
|
|
648
|
+
return /* @__PURE__ */ jsxs11(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
|
|
649
|
+
trigger4 && /* @__PURE__ */ jsx14(Dialog.Trigger, { asChild: true, children: trigger4 }),
|
|
650
|
+
/* @__PURE__ */ jsxs11(Dialog.Portal, { children: [
|
|
651
|
+
/* @__PURE__ */ jsx14(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
|
|
652
|
+
/* @__PURE__ */ jsxs11(
|
|
653
|
+
Dialog.Content,
|
|
654
|
+
{
|
|
655
|
+
className: cx(portal2.className, content3({ side, size }), className),
|
|
656
|
+
style: portal2.style,
|
|
657
|
+
"data-side": side ?? "right",
|
|
658
|
+
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
659
|
+
...description6 ? {} : { "aria-describedby": void 0 },
|
|
660
|
+
children: [
|
|
661
|
+
/* @__PURE__ */ jsxs11("div", { className: header3, children: [
|
|
662
|
+
/* @__PURE__ */ jsxs11("div", { className: headings, children: [
|
|
663
|
+
/* @__PURE__ */ jsx14(Dialog.Title, { className: title2, children: title6 }),
|
|
664
|
+
description6 && /* @__PURE__ */ jsx14(Dialog.Description, { className: description2, children: description6 })
|
|
665
|
+
] }),
|
|
666
|
+
!hideCloseButton && /* @__PURE__ */ jsx14(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx14(IconButton, { "aria-label": "\uB2EB\uAE30", size: "sm", className: closeButton2, children: /* @__PURE__ */ jsx14(XIcon2, {}) }) })
|
|
667
|
+
] }),
|
|
668
|
+
children && /* @__PURE__ */ jsx14("div", { className: body2, children }),
|
|
669
|
+
footer5 && /* @__PURE__ */ jsx14("div", { className: footer2, children: footer5 })
|
|
670
|
+
]
|
|
671
|
+
}
|
|
672
|
+
)
|
|
673
|
+
] })
|
|
674
|
+
] });
|
|
675
|
+
}
|
|
676
|
+
var DrawerClose = Dialog.Close;
|
|
677
|
+
|
|
466
678
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
467
679
|
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
468
|
-
import { forwardRef as
|
|
680
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
469
681
|
|
|
470
682
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
471
|
-
var
|
|
683
|
+
var content4 = "_1d7ahux0";
|
|
472
684
|
var danger = "_1d7ahux2";
|
|
473
|
-
var
|
|
474
|
-
var
|
|
685
|
+
var icon4 = "_1d7ahux3";
|
|
686
|
+
var item3 = "_1d7ahux1";
|
|
475
687
|
var label = "_1d7ahux5";
|
|
476
|
-
var
|
|
688
|
+
var separator2 = "_1d7ahux6";
|
|
477
689
|
var shortcut = "_1d7ahux4";
|
|
478
690
|
|
|
479
691
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
480
|
-
import { jsx as
|
|
692
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
481
693
|
var DropdownMenu = RadixMenu.Root;
|
|
482
694
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
483
695
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
484
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
696
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef14(
|
|
485
697
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
486
698
|
const portal2 = usePortalProps();
|
|
487
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ jsx15(RadixMenu.Portal, { children: /* @__PURE__ */ jsx15(
|
|
488
700
|
RadixMenu.Content,
|
|
489
701
|
{
|
|
490
702
|
ref,
|
|
@@ -492,59 +704,59 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef10(
|
|
|
492
704
|
align,
|
|
493
705
|
sideOffset,
|
|
494
706
|
collisionPadding,
|
|
495
|
-
className: cx(portal2.className,
|
|
707
|
+
className: cx(portal2.className, content4, className),
|
|
496
708
|
style: { ...portal2.style, ...style },
|
|
497
709
|
...rest
|
|
498
710
|
}
|
|
499
711
|
) });
|
|
500
712
|
}
|
|
501
713
|
);
|
|
502
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
503
|
-
function DropdownMenuItem2({ icon:
|
|
504
|
-
return /* @__PURE__ */
|
|
505
|
-
|
|
714
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef14(
|
|
715
|
+
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "default", className, children, ...rest }, ref) {
|
|
716
|
+
return /* @__PURE__ */ jsxs12(RadixMenu.Item, { ref, className: cx(item3, color === "danger" && danger, className), ...rest, children: [
|
|
717
|
+
icon6 && /* @__PURE__ */ jsx15("span", { className: icon4, "aria-hidden": true, children: icon6 }),
|
|
506
718
|
children,
|
|
507
|
-
shortcut2 && /* @__PURE__ */
|
|
719
|
+
shortcut2 && /* @__PURE__ */ jsx15("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
508
720
|
] });
|
|
509
721
|
}
|
|
510
722
|
);
|
|
511
|
-
var DropdownMenuLabel = /* @__PURE__ */
|
|
723
|
+
var DropdownMenuLabel = /* @__PURE__ */ forwardRef14(
|
|
512
724
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
513
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ jsx15(RadixMenu.Label, { ref, className: cx(label, className), ...rest });
|
|
514
726
|
}
|
|
515
727
|
);
|
|
516
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
728
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef14(
|
|
517
729
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
518
|
-
return /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ jsx15(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
|
|
519
731
|
}
|
|
520
732
|
);
|
|
521
733
|
|
|
522
734
|
// src/components/Input/Input.tsx
|
|
523
|
-
import { forwardRef as
|
|
735
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
524
736
|
|
|
525
737
|
// src/components/Input/Input.css.ts
|
|
526
|
-
import { createRuntimeFn as
|
|
738
|
+
import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
527
739
|
var adornment = "_19p5zvh6";
|
|
528
740
|
var field = "_19p5zvh7";
|
|
529
741
|
var fieldFullWidth = "_19p5zvh8";
|
|
530
|
-
var helperText =
|
|
742
|
+
var helperText = /* @__PURE__ */ _7a46812({ defaultClassName: "_19p5zvhb", variantClassNames: { error: { true: "_19p5zvhc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
531
743
|
var input2 = "_19p5zvh5";
|
|
532
744
|
var label2 = "_19p5zvh9";
|
|
533
745
|
var requiredMark = "_19p5zvha";
|
|
534
|
-
var root5 =
|
|
746
|
+
var root5 = /* @__PURE__ */ _7a46812({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
535
747
|
|
|
536
748
|
// src/components/Input/Input.tsx
|
|
537
|
-
import { jsx as
|
|
538
|
-
var Input = /* @__PURE__ */
|
|
539
|
-
return /* @__PURE__ */
|
|
749
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
750
|
+
var Input = /* @__PURE__ */ forwardRef15(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
|
|
751
|
+
return /* @__PURE__ */ jsxs13(
|
|
540
752
|
"div",
|
|
541
753
|
{
|
|
542
754
|
className: cx(root5({ size, fullWidth }), rootClassName),
|
|
543
755
|
"data-invalid": invalid || void 0,
|
|
544
756
|
"data-disabled": disabled || void 0,
|
|
545
757
|
children: [
|
|
546
|
-
startAdornment && /* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
758
|
+
startAdornment && /* @__PURE__ */ jsx16("span", { className: adornment, children: startAdornment }),
|
|
759
|
+
/* @__PURE__ */ jsx16(
|
|
548
760
|
"input",
|
|
549
761
|
{
|
|
550
762
|
ref,
|
|
@@ -554,25 +766,25 @@ var Input = /* @__PURE__ */ forwardRef11(function Input2({ size, invalid, fullWi
|
|
|
554
766
|
...rest
|
|
555
767
|
}
|
|
556
768
|
),
|
|
557
|
-
endAdornment && /* @__PURE__ */
|
|
769
|
+
endAdornment && /* @__PURE__ */ jsx16("span", { className: adornment, children: endAdornment })
|
|
558
770
|
]
|
|
559
771
|
}
|
|
560
772
|
);
|
|
561
773
|
});
|
|
562
774
|
|
|
563
775
|
// src/components/Input/TextField.tsx
|
|
564
|
-
import { forwardRef as
|
|
565
|
-
import { jsx as
|
|
566
|
-
var TextField = /* @__PURE__ */
|
|
776
|
+
import { forwardRef as forwardRef16, useId } from "react";
|
|
777
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
778
|
+
var TextField = /* @__PURE__ */ forwardRef16(function TextField2({ label: label5, helperText: helperText2, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
|
|
567
779
|
const generatedId = useId();
|
|
568
780
|
const inputId = id ?? generatedId;
|
|
569
781
|
const helperId = helperText2 ? `${inputId}-helper` : void 0;
|
|
570
|
-
return /* @__PURE__ */
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
required && /* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ jsxs14("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
783
|
+
label5 && /* @__PURE__ */ jsxs14("label", { htmlFor: inputId, className: label2, children: [
|
|
784
|
+
label5,
|
|
785
|
+
required && /* @__PURE__ */ jsx17("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
574
786
|
] }),
|
|
575
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ jsx17(
|
|
576
788
|
Input,
|
|
577
789
|
{
|
|
578
790
|
ref,
|
|
@@ -584,75 +796,75 @@ var TextField = /* @__PURE__ */ forwardRef12(function TextField2({ label: label4
|
|
|
584
796
|
...rest
|
|
585
797
|
}
|
|
586
798
|
),
|
|
587
|
-
helperText2 && /* @__PURE__ */
|
|
799
|
+
helperText2 && /* @__PURE__ */ jsx17("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
588
800
|
] });
|
|
589
801
|
});
|
|
590
802
|
|
|
591
803
|
// src/components/Modal/Modal.tsx
|
|
592
|
-
import * as
|
|
593
|
-
import { XIcon } from "@bestow-ui/icons";
|
|
804
|
+
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
805
|
+
import { XIcon as XIcon3 } from "@bestow-ui/icons";
|
|
594
806
|
|
|
595
807
|
// src/components/Modal/Modal.css.ts
|
|
596
|
-
import { createRuntimeFn as
|
|
597
|
-
var
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var
|
|
605
|
-
var
|
|
808
|
+
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
809
|
+
var body3 = "_1pdsmv0a";
|
|
810
|
+
var closeButton3 = "_1pdsmv09";
|
|
811
|
+
var content5 = /* @__PURE__ */ _7a46813({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
812
|
+
var description3 = "_1pdsmv08";
|
|
813
|
+
var footer3 = "_1pdsmv0b";
|
|
814
|
+
var header4 = "_1pdsmv05";
|
|
815
|
+
var headings2 = "_1pdsmv06";
|
|
816
|
+
var overlay2 = "_1pdsmv00";
|
|
817
|
+
var title3 = "_1pdsmv07";
|
|
606
818
|
|
|
607
819
|
// src/components/Modal/Modal.tsx
|
|
608
|
-
import { jsx as
|
|
820
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
609
821
|
function Modal({
|
|
610
822
|
open,
|
|
611
823
|
defaultOpen,
|
|
612
824
|
onOpenChange,
|
|
613
825
|
trigger: trigger4,
|
|
614
|
-
title:
|
|
615
|
-
description:
|
|
826
|
+
title: title6,
|
|
827
|
+
description: description6,
|
|
616
828
|
children,
|
|
617
|
-
footer:
|
|
829
|
+
footer: footer5,
|
|
618
830
|
size,
|
|
619
831
|
hideCloseButton = false,
|
|
620
832
|
closeOnOverlayClick = true,
|
|
621
833
|
className
|
|
622
834
|
}) {
|
|
623
835
|
const portal2 = usePortalProps();
|
|
624
|
-
return /* @__PURE__ */
|
|
625
|
-
trigger4 && /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
|
|
836
|
+
return /* @__PURE__ */ jsxs15(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
837
|
+
trigger4 && /* @__PURE__ */ jsx18(Dialog2.Trigger, { asChild: true, children: trigger4 }),
|
|
838
|
+
/* @__PURE__ */ jsxs15(Dialog2.Portal, { children: [
|
|
839
|
+
/* @__PURE__ */ jsx18(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
|
|
840
|
+
/* @__PURE__ */ jsxs15(
|
|
841
|
+
Dialog2.Content,
|
|
630
842
|
{
|
|
631
|
-
className: cx(portal2.className,
|
|
843
|
+
className: cx(portal2.className, content5({ size }), className),
|
|
632
844
|
style: portal2.style,
|
|
633
845
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
634
|
-
...
|
|
846
|
+
...description6 ? {} : { "aria-describedby": void 0 },
|
|
635
847
|
children: [
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
|
|
848
|
+
/* @__PURE__ */ jsxs15("div", { className: header4, children: [
|
|
849
|
+
/* @__PURE__ */ jsxs15("div", { className: headings2, children: [
|
|
850
|
+
/* @__PURE__ */ jsx18(Dialog2.Title, { className: title3, children: title6 }),
|
|
851
|
+
description6 && /* @__PURE__ */ jsx18(Dialog2.Description, { className: description3, children: description6 })
|
|
640
852
|
] }),
|
|
641
|
-
!hideCloseButton && /* @__PURE__ */
|
|
853
|
+
!hideCloseButton && /* @__PURE__ */ jsx18(Dialog2.Close, { className: closeButton3, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx18(XIcon3, { size: 16 }) })
|
|
642
854
|
] }),
|
|
643
|
-
children && /* @__PURE__ */
|
|
644
|
-
|
|
855
|
+
children && /* @__PURE__ */ jsx18("div", { className: body3, children }),
|
|
856
|
+
footer5 && /* @__PURE__ */ jsx18("div", { className: footer3, children: footer5 })
|
|
645
857
|
]
|
|
646
858
|
}
|
|
647
859
|
)
|
|
648
860
|
] })
|
|
649
861
|
] });
|
|
650
862
|
}
|
|
651
|
-
var ModalClose =
|
|
863
|
+
var ModalClose = Dialog2.Close;
|
|
652
864
|
|
|
653
865
|
// src/components/Pagination/Pagination.tsx
|
|
654
|
-
import { ChevronLeftIcon, ChevronRightIcon } from "@bestow-ui/icons";
|
|
655
|
-
import { forwardRef as
|
|
866
|
+
import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2 } from "@bestow-ui/icons";
|
|
867
|
+
import { forwardRef as forwardRef17, useState } from "react";
|
|
656
868
|
|
|
657
869
|
// src/components/Pagination/getPaginationItems.ts
|
|
658
870
|
var range = (start, end) => end < start ? [] : Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -679,15 +891,15 @@ function getPaginationItems(page, totalPages, siblingCount = 1, boundaryCount =
|
|
|
679
891
|
}
|
|
680
892
|
|
|
681
893
|
// src/components/Pagination/Pagination.css.ts
|
|
682
|
-
import { createRuntimeFn as
|
|
894
|
+
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
683
895
|
var ellipsis = "_1iraoak4";
|
|
684
|
-
var
|
|
685
|
-
var
|
|
896
|
+
var item4 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1iraoak1", variantClassNames: { size: { sm: "_1iraoak2", md: "_1iraoak3" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
897
|
+
var list2 = "_1iraoak0";
|
|
686
898
|
|
|
687
899
|
// src/components/Pagination/Pagination.tsx
|
|
688
|
-
import { jsx as
|
|
900
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
689
901
|
var defaultItemLabel = (type, page) => type === "previous" ? "\uC774\uC804 \uD398\uC774\uC9C0" : type === "next" ? "\uB2E4\uC74C \uD398\uC774\uC9C0" : `${page} \uD398\uC774\uC9C0`;
|
|
690
|
-
var Pagination = /* @__PURE__ */
|
|
902
|
+
var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
|
|
691
903
|
totalPages,
|
|
692
904
|
page: pageProp,
|
|
693
905
|
defaultPage = 1,
|
|
@@ -708,9 +920,9 @@ var Pagination = /* @__PURE__ */ forwardRef13(function Pagination2({
|
|
|
708
920
|
if (pageProp === void 0) setUncontrolledPage(next);
|
|
709
921
|
onPageChange?.(next);
|
|
710
922
|
};
|
|
711
|
-
const itemClass =
|
|
712
|
-
return /* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
923
|
+
const itemClass = item4({ size });
|
|
924
|
+
return /* @__PURE__ */ jsx19("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs16("ul", { className: list2, children: [
|
|
925
|
+
/* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
|
|
714
926
|
"button",
|
|
715
927
|
{
|
|
716
928
|
type: "button",
|
|
@@ -718,23 +930,23 @@ var Pagination = /* @__PURE__ */ forwardRef13(function Pagination2({
|
|
|
718
930
|
"aria-label": getItemLabel("previous", page - 1),
|
|
719
931
|
disabled: page <= 1,
|
|
720
932
|
onClick: () => goTo(page - 1),
|
|
721
|
-
children: /* @__PURE__ */
|
|
933
|
+
children: /* @__PURE__ */ jsx19(ChevronLeftIcon, { size: 16 })
|
|
722
934
|
}
|
|
723
935
|
) }),
|
|
724
936
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
725
|
-
(
|
|
937
|
+
(item6) => typeof item6 === "number" ? /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
|
|
726
938
|
"button",
|
|
727
939
|
{
|
|
728
940
|
type: "button",
|
|
729
941
|
className: itemClass,
|
|
730
|
-
"aria-label": getItemLabel("page",
|
|
731
|
-
"aria-current":
|
|
732
|
-
onClick: () => goTo(
|
|
733
|
-
children:
|
|
942
|
+
"aria-label": getItemLabel("page", item6),
|
|
943
|
+
"aria-current": item6 === page ? "page" : void 0,
|
|
944
|
+
onClick: () => goTo(item6),
|
|
945
|
+
children: item6
|
|
734
946
|
}
|
|
735
|
-
) },
|
|
947
|
+
) }, item6) : /* @__PURE__ */ jsx19("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item6)
|
|
736
948
|
),
|
|
737
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
|
|
738
950
|
"button",
|
|
739
951
|
{
|
|
740
952
|
type: "button",
|
|
@@ -742,7 +954,7 @@ var Pagination = /* @__PURE__ */ forwardRef13(function Pagination2({
|
|
|
742
954
|
"aria-label": getItemLabel("next", page + 1),
|
|
743
955
|
disabled: page >= totalPages,
|
|
744
956
|
onClick: () => goTo(page + 1),
|
|
745
|
-
children: /* @__PURE__ */
|
|
957
|
+
children: /* @__PURE__ */ jsx19(ChevronRightIcon2, { size: 16 })
|
|
746
958
|
}
|
|
747
959
|
) })
|
|
748
960
|
] }) });
|
|
@@ -750,22 +962,22 @@ var Pagination = /* @__PURE__ */ forwardRef13(function Pagination2({
|
|
|
750
962
|
|
|
751
963
|
// src/components/Popover/Popover.tsx
|
|
752
964
|
import * as RadixPopover from "@radix-ui/react-popover";
|
|
753
|
-
import { XIcon as
|
|
965
|
+
import { XIcon as XIcon4 } from "@bestow-ui/icons";
|
|
754
966
|
import { useId as useId2 } from "react";
|
|
755
967
|
|
|
756
968
|
// src/components/Popover/Popover.css.ts
|
|
757
969
|
var arrow = "_1j99p8x4";
|
|
758
|
-
var
|
|
759
|
-
var
|
|
760
|
-
var
|
|
761
|
-
var
|
|
970
|
+
var closeButton4 = "_1j99p8x3";
|
|
971
|
+
var content6 = "_1j99p8x0";
|
|
972
|
+
var header5 = "_1j99p8x1";
|
|
973
|
+
var title4 = "_1j99p8x2";
|
|
762
974
|
|
|
763
975
|
// src/components/Popover/Popover.tsx
|
|
764
|
-
import { jsx as
|
|
976
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
765
977
|
function Popover({
|
|
766
|
-
content:
|
|
978
|
+
content: content10,
|
|
767
979
|
children,
|
|
768
|
-
title:
|
|
980
|
+
title: title6,
|
|
769
981
|
"aria-label": ariaLabel,
|
|
770
982
|
showClose = false,
|
|
771
983
|
showArrow = false,
|
|
@@ -780,26 +992,26 @@ function Popover({
|
|
|
780
992
|
}) {
|
|
781
993
|
const portal2 = usePortalProps();
|
|
782
994
|
const titleId = useId2();
|
|
783
|
-
return /* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
785
|
-
/* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ jsxs17(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
996
|
+
/* @__PURE__ */ jsx20(RadixPopover.Trigger, { asChild: true, children }),
|
|
997
|
+
/* @__PURE__ */ jsx20(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs17(
|
|
786
998
|
RadixPopover.Content,
|
|
787
999
|
{
|
|
788
1000
|
side,
|
|
789
1001
|
align,
|
|
790
1002
|
sideOffset: 6,
|
|
791
1003
|
collisionPadding: 8,
|
|
792
|
-
"aria-labelledby":
|
|
793
|
-
"aria-label":
|
|
794
|
-
className: cx(portal2.className,
|
|
1004
|
+
"aria-labelledby": title6 ? titleId : void 0,
|
|
1005
|
+
"aria-label": title6 ? void 0 : ariaLabel,
|
|
1006
|
+
className: cx(portal2.className, content6, className),
|
|
795
1007
|
style: { ...portal2.style, ...style },
|
|
796
1008
|
children: [
|
|
797
|
-
(
|
|
798
|
-
|
|
799
|
-
showClose && /* @__PURE__ */
|
|
1009
|
+
(title6 || showClose) && /* @__PURE__ */ jsxs17("div", { className: header5, children: [
|
|
1010
|
+
title6 && /* @__PURE__ */ jsx20("h2", { id: titleId, className: title4, children: title6 }),
|
|
1011
|
+
showClose && /* @__PURE__ */ jsx20(RadixPopover.Close, { className: closeButton4, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx20(XIcon4, { size: 16 }) })
|
|
800
1012
|
] }),
|
|
801
|
-
|
|
802
|
-
showArrow && /* @__PURE__ */
|
|
1013
|
+
content10,
|
|
1014
|
+
showArrow && /* @__PURE__ */ jsx20(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
|
|
803
1015
|
]
|
|
804
1016
|
}
|
|
805
1017
|
) })
|
|
@@ -807,30 +1019,91 @@ function Popover({
|
|
|
807
1019
|
}
|
|
808
1020
|
var PopoverClose = RadixPopover.Close;
|
|
809
1021
|
|
|
1022
|
+
// src/components/Progress/Progress.tsx
|
|
1023
|
+
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
1024
|
+
|
|
1025
|
+
// src/components/Progress/Progress.css.ts
|
|
1026
|
+
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1027
|
+
var header6 = "_1tvkq001";
|
|
1028
|
+
var indicator = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq008", variantClassNames: { color: { primary: "_1tvkq009", neutral: "_1tvkq00a", success: "_1tvkq00b", warning: "_1tvkq00c", danger: "_1tvkq00d" } }, defaultVariants: { color: "primary" }, compoundVariants: [] });
|
|
1029
|
+
var label3 = "_1tvkq002";
|
|
1030
|
+
var root6 = "_1tvkq000";
|
|
1031
|
+
var track = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq004", variantClassNames: { size: { sm: "_1tvkq005", md: "_1tvkq006", lg: "_1tvkq007" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1032
|
+
var value = "_1tvkq003";
|
|
1033
|
+
|
|
1034
|
+
// src/components/Progress/Progress.tsx
|
|
1035
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1036
|
+
var defaultFormat = (value3, max) => `${Math.round(value3 / max * 100)}%`;
|
|
1037
|
+
var Progress = /* @__PURE__ */ forwardRef18(function Progress2({
|
|
1038
|
+
value: value3,
|
|
1039
|
+
max = 100,
|
|
1040
|
+
label: label5,
|
|
1041
|
+
"aria-label": ariaLabel,
|
|
1042
|
+
showValue,
|
|
1043
|
+
formatValue = defaultFormat,
|
|
1044
|
+
size,
|
|
1045
|
+
color,
|
|
1046
|
+
className,
|
|
1047
|
+
...rest
|
|
1048
|
+
}, ref) {
|
|
1049
|
+
const labelId = useId3();
|
|
1050
|
+
const isIndeterminate = value3 === void 0 || value3 === null;
|
|
1051
|
+
const safeMax = max > 0 ? max : 100;
|
|
1052
|
+
const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value3));
|
|
1053
|
+
const valueText = isIndeterminate ? void 0 : formatValue(clamped, safeMax);
|
|
1054
|
+
return /* @__PURE__ */ jsxs18("div", { ref, className: cx(root6, className), ...rest, children: [
|
|
1055
|
+
(label5 || showValue && valueText) && /* @__PURE__ */ jsxs18("div", { className: header6, children: [
|
|
1056
|
+
label5 && /* @__PURE__ */ jsx21("span", { id: labelId, className: label3, children: label5 }),
|
|
1057
|
+
showValue && valueText && /* @__PURE__ */ jsx21("span", { className: value, "aria-hidden": true, children: valueText })
|
|
1058
|
+
] }),
|
|
1059
|
+
/* @__PURE__ */ jsx21(
|
|
1060
|
+
"div",
|
|
1061
|
+
{
|
|
1062
|
+
role: "progressbar",
|
|
1063
|
+
"aria-labelledby": label5 ? labelId : void 0,
|
|
1064
|
+
"aria-label": label5 ? void 0 : ariaLabel,
|
|
1065
|
+
"aria-valuemin": 0,
|
|
1066
|
+
"aria-valuemax": safeMax,
|
|
1067
|
+
"aria-valuenow": isIndeterminate ? void 0 : clamped,
|
|
1068
|
+
"aria-valuetext": valueText,
|
|
1069
|
+
className: track({ size }),
|
|
1070
|
+
children: /* @__PURE__ */ jsx21(
|
|
1071
|
+
"div",
|
|
1072
|
+
{
|
|
1073
|
+
className: indicator({ color }),
|
|
1074
|
+
"data-state": isIndeterminate ? "indeterminate" : clamped >= safeMax ? "complete" : "loading",
|
|
1075
|
+
style: isIndeterminate ? void 0 : { width: `${clamped / safeMax * 100}%` }
|
|
1076
|
+
}
|
|
1077
|
+
)
|
|
1078
|
+
}
|
|
1079
|
+
)
|
|
1080
|
+
] });
|
|
1081
|
+
});
|
|
1082
|
+
|
|
810
1083
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
811
1084
|
import * as RadixRadioGroup from "@radix-ui/react-radio-group";
|
|
812
|
-
import { forwardRef as
|
|
1085
|
+
import { forwardRef as forwardRef19, useId as useId4 } from "react";
|
|
813
1086
|
|
|
814
1087
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
815
|
-
import { createRuntimeFn as
|
|
816
|
-
var
|
|
1088
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1089
|
+
var description4 = "_1w9iwjmd";
|
|
817
1090
|
var groupLabel = "_1w9iwjme";
|
|
818
|
-
var
|
|
819
|
-
var items =
|
|
1091
|
+
var indicator2 = "_1w9iwjma";
|
|
1092
|
+
var items = /* @__PURE__ */ _7a46816({ defaultClassName: "_1w9iwjm0", variantClassNames: { orientation: { vertical: "_1w9iwjm1", horizontal: "_1w9iwjm2" } }, defaultVariants: { orientation: "vertical" }, compoundVariants: [] });
|
|
820
1093
|
var labelText = "_1w9iwjmc";
|
|
821
|
-
var option =
|
|
822
|
-
var radio =
|
|
1094
|
+
var option = /* @__PURE__ */ _7a46816({ defaultClassName: "_1w9iwjm3", variantClassNames: { size: { sm: "_1w9iwjm4", md: "_1w9iwjm5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1095
|
+
var radio = /* @__PURE__ */ _7a46816({ defaultClassName: "_1w9iwjm7", variantClassNames: { size: { sm: "_1w9iwjm8", md: "_1w9iwjm9" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
823
1096
|
var text = "_1w9iwjmb";
|
|
824
1097
|
|
|
825
1098
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
826
|
-
import { jsx as
|
|
827
|
-
var RadioGroup = /* @__PURE__ */
|
|
1099
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1100
|
+
var RadioGroup = /* @__PURE__ */ forwardRef19(function RadioGroup2(props, ref) {
|
|
828
1101
|
const {
|
|
829
1102
|
options,
|
|
830
|
-
value:
|
|
1103
|
+
value: value3,
|
|
831
1104
|
defaultValue,
|
|
832
1105
|
onValueChange,
|
|
833
|
-
label:
|
|
1106
|
+
label: label5,
|
|
834
1107
|
helperText: helperText2,
|
|
835
1108
|
error,
|
|
836
1109
|
orientation = "vertical",
|
|
@@ -843,21 +1116,21 @@ var RadioGroup = /* @__PURE__ */ forwardRef14(function RadioGroup2(props, ref) {
|
|
|
843
1116
|
className
|
|
844
1117
|
} = props;
|
|
845
1118
|
const isControlled = "value" in props;
|
|
846
|
-
const generatedId =
|
|
1119
|
+
const generatedId = useId4();
|
|
847
1120
|
const baseId = id ?? generatedId;
|
|
848
|
-
const labelId =
|
|
1121
|
+
const labelId = label5 ? `${baseId}-label` : void 0;
|
|
849
1122
|
const helperId = helperText2 ? `${baseId}-helper` : void 0;
|
|
850
|
-
return /* @__PURE__ */
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
required && /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ jsxs19("div", { className: cx(field, className), children: [
|
|
1124
|
+
label5 && /* @__PURE__ */ jsxs19("span", { id: labelId, className: cx(label2, groupLabel), children: [
|
|
1125
|
+
label5,
|
|
1126
|
+
required && /* @__PURE__ */ jsx22("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
854
1127
|
] }),
|
|
855
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ jsx22(
|
|
856
1129
|
RadixRadioGroup.Root,
|
|
857
1130
|
{
|
|
858
1131
|
ref,
|
|
859
1132
|
id: baseId,
|
|
860
|
-
value: isControlled ?
|
|
1133
|
+
value: isControlled ? value3 ?? "" : void 0,
|
|
861
1134
|
defaultValue,
|
|
862
1135
|
onValueChange,
|
|
863
1136
|
orientation,
|
|
@@ -873,8 +1146,8 @@ var RadioGroup = /* @__PURE__ */ forwardRef14(function RadioGroup2(props, ref) {
|
|
|
873
1146
|
const itemId = `${baseId}-${option2.value}`;
|
|
874
1147
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
875
1148
|
const itemDisabled = disabled || option2.disabled;
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ jsxs19("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
1150
|
+
/* @__PURE__ */ jsx22(
|
|
878
1151
|
RadixRadioGroup.Item,
|
|
879
1152
|
{
|
|
880
1153
|
id: itemId,
|
|
@@ -882,45 +1155,45 @@ var RadioGroup = /* @__PURE__ */ forwardRef14(function RadioGroup2(props, ref) {
|
|
|
882
1155
|
disabled: option2.disabled,
|
|
883
1156
|
"aria-describedby": descriptionId,
|
|
884
1157
|
className: radio({ size }),
|
|
885
|
-
children: /* @__PURE__ */
|
|
1158
|
+
children: /* @__PURE__ */ jsx22(RadixRadioGroup.Indicator, { className: indicator2 })
|
|
886
1159
|
}
|
|
887
1160
|
),
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
option2.description && /* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ jsxs19("span", { className: text, children: [
|
|
1162
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
1163
|
+
option2.description && /* @__PURE__ */ jsx22("span", { id: descriptionId, className: description4, children: option2.description })
|
|
891
1164
|
] })
|
|
892
1165
|
] }, option2.value);
|
|
893
1166
|
})
|
|
894
1167
|
}
|
|
895
1168
|
),
|
|
896
|
-
helperText2 && /* @__PURE__ */
|
|
1169
|
+
helperText2 && /* @__PURE__ */ jsx22("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
897
1170
|
] });
|
|
898
1171
|
});
|
|
899
1172
|
|
|
900
1173
|
// src/components/Select/Select.tsx
|
|
901
1174
|
import * as RadixSelect from "@radix-ui/react-select";
|
|
902
|
-
import { forwardRef as
|
|
1175
|
+
import { forwardRef as forwardRef20, useId as useId5 } from "react";
|
|
903
1176
|
import { CheckIcon, ChevronDownIcon as ChevronDownIcon2 } from "@bestow-ui/icons";
|
|
904
1177
|
|
|
905
1178
|
// src/components/Select/Select.css.ts
|
|
906
|
-
var
|
|
907
|
-
var
|
|
908
|
-
var
|
|
1179
|
+
var content7 = "_1kx81e83";
|
|
1180
|
+
var icon5 = "_1kx81e82";
|
|
1181
|
+
var item5 = "_1kx81e85";
|
|
909
1182
|
var itemIndicator = "_1kx81e86";
|
|
910
1183
|
var trigger2 = "_1kx81e80";
|
|
911
|
-
var
|
|
1184
|
+
var value2 = "_1kx81e81";
|
|
912
1185
|
var viewport = "_1kx81e84";
|
|
913
1186
|
|
|
914
1187
|
// src/components/Select/Select.tsx
|
|
915
|
-
import { jsx as
|
|
916
|
-
var Select = /* @__PURE__ */
|
|
1188
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1189
|
+
var Select = /* @__PURE__ */ forwardRef20(function Select2(props, ref) {
|
|
917
1190
|
const {
|
|
918
1191
|
options,
|
|
919
|
-
value:
|
|
1192
|
+
value: value3,
|
|
920
1193
|
defaultValue,
|
|
921
1194
|
onValueChange,
|
|
922
1195
|
placeholder,
|
|
923
|
-
label:
|
|
1196
|
+
label: label5,
|
|
924
1197
|
helperText: helperText2,
|
|
925
1198
|
error,
|
|
926
1199
|
size,
|
|
@@ -933,26 +1206,26 @@ var Select = /* @__PURE__ */ forwardRef15(function Select2(props, ref) {
|
|
|
933
1206
|
className
|
|
934
1207
|
} = props;
|
|
935
1208
|
const isControlled = "value" in props;
|
|
936
|
-
const generatedId =
|
|
1209
|
+
const generatedId = useId5();
|
|
937
1210
|
const triggerId = id ?? generatedId;
|
|
938
1211
|
const helperId = helperText2 ? `${triggerId}-helper` : void 0;
|
|
939
1212
|
const portal2 = usePortalProps();
|
|
940
|
-
return /* @__PURE__ */
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
required && /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ jsxs20("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
1214
|
+
label5 && /* @__PURE__ */ jsxs20("label", { htmlFor: triggerId, className: label2, children: [
|
|
1215
|
+
label5,
|
|
1216
|
+
required && /* @__PURE__ */ jsx23("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
944
1217
|
] }),
|
|
945
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ jsxs20(
|
|
946
1219
|
RadixSelect.Root,
|
|
947
1220
|
{
|
|
948
|
-
value: isControlled ?
|
|
1221
|
+
value: isControlled ? value3 ?? "" : void 0,
|
|
949
1222
|
defaultValue,
|
|
950
1223
|
onValueChange,
|
|
951
1224
|
disabled,
|
|
952
1225
|
required,
|
|
953
1226
|
name,
|
|
954
1227
|
children: [
|
|
955
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ jsxs20(
|
|
956
1229
|
RadixSelect.Trigger,
|
|
957
1230
|
{
|
|
958
1231
|
ref,
|
|
@@ -963,28 +1236,28 @@ var Select = /* @__PURE__ */ forwardRef15(function Select2(props, ref) {
|
|
|
963
1236
|
"data-invalid": error || void 0,
|
|
964
1237
|
className: cx(root5({ size, fullWidth }), trigger2, className),
|
|
965
1238
|
children: [
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ jsx23("span", { className: value2, children: /* @__PURE__ */ jsx23(RadixSelect.Value, { placeholder }) }),
|
|
1240
|
+
/* @__PURE__ */ jsx23(RadixSelect.Icon, { className: icon5, children: /* @__PURE__ */ jsx23(ChevronDownIcon2, { size: 16 }) })
|
|
968
1241
|
]
|
|
969
1242
|
}
|
|
970
1243
|
),
|
|
971
|
-
/* @__PURE__ */
|
|
1244
|
+
/* @__PURE__ */ jsx23(RadixSelect.Portal, { children: /* @__PURE__ */ jsx23(
|
|
972
1245
|
RadixSelect.Content,
|
|
973
1246
|
{
|
|
974
1247
|
position: "popper",
|
|
975
1248
|
sideOffset: 4,
|
|
976
1249
|
collisionPadding: 8,
|
|
977
|
-
className: cx(portal2.className,
|
|
1250
|
+
className: cx(portal2.className, content7),
|
|
978
1251
|
style: portal2.style,
|
|
979
|
-
children: /* @__PURE__ */
|
|
1252
|
+
children: /* @__PURE__ */ jsx23(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs20(
|
|
980
1253
|
RadixSelect.Item,
|
|
981
1254
|
{
|
|
982
1255
|
value: option2.value,
|
|
983
1256
|
disabled: option2.disabled,
|
|
984
|
-
className:
|
|
1257
|
+
className: item5,
|
|
985
1258
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
1259
|
+
/* @__PURE__ */ jsx23(RadixSelect.ItemText, { children: option2.label }),
|
|
1260
|
+
/* @__PURE__ */ jsx23(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx23(CheckIcon, { size: 16 }) })
|
|
988
1261
|
]
|
|
989
1262
|
},
|
|
990
1263
|
option2.value
|
|
@@ -994,29 +1267,29 @@ var Select = /* @__PURE__ */ forwardRef15(function Select2(props, ref) {
|
|
|
994
1267
|
]
|
|
995
1268
|
}
|
|
996
1269
|
),
|
|
997
|
-
helperText2 && /* @__PURE__ */
|
|
1270
|
+
helperText2 && /* @__PURE__ */ jsx23("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
998
1271
|
] });
|
|
999
1272
|
});
|
|
1000
1273
|
|
|
1001
1274
|
// src/components/Skeleton/Skeleton.tsx
|
|
1002
1275
|
import { assignInlineVars as assignInlineVars2 } from "@vanilla-extract/dynamic";
|
|
1003
|
-
import { forwardRef as
|
|
1276
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1004
1277
|
|
|
1005
1278
|
// src/components/Skeleton/Skeleton.css.ts
|
|
1006
|
-
import { createRuntimeFn as
|
|
1279
|
+
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1007
1280
|
var height = "var(--_1s8datd1)";
|
|
1008
1281
|
var lines = "_1s8datd6";
|
|
1009
|
-
var skeleton =
|
|
1282
|
+
var skeleton = /* @__PURE__ */ _7a46817({ defaultClassName: "_1s8datd2", variantClassNames: { variant: { text: "_1s8datd3", rect: "_1s8datd4", circle: "_1s8datd5" } }, defaultVariants: { variant: "text" }, compoundVariants: [] });
|
|
1010
1283
|
var width = "var(--_1s8datd0)";
|
|
1011
1284
|
|
|
1012
1285
|
// src/components/Skeleton/Skeleton.tsx
|
|
1013
|
-
import { jsx as
|
|
1014
|
-
var toCss = (
|
|
1015
|
-
var Skeleton = /* @__PURE__ */
|
|
1286
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1287
|
+
var toCss = (value3) => typeof value3 === "number" ? `${value3}px` : value3;
|
|
1288
|
+
var Skeleton = /* @__PURE__ */ forwardRef21(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
|
|
1016
1289
|
const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
|
|
1017
1290
|
const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
|
|
1018
1291
|
if (variant === "text" && lines2 > 1) {
|
|
1019
|
-
return /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ jsx24(
|
|
1020
1293
|
"span",
|
|
1021
1294
|
{
|
|
1022
1295
|
ref,
|
|
@@ -1024,7 +1297,7 @@ var Skeleton = /* @__PURE__ */ forwardRef16(function Skeleton2({ variant = "text
|
|
|
1024
1297
|
className: cx(lines, className),
|
|
1025
1298
|
style: { ...assignInlineVars2({ [width]: w }), ...style },
|
|
1026
1299
|
...rest,
|
|
1027
|
-
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */
|
|
1300
|
+
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ jsx24(
|
|
1028
1301
|
"span",
|
|
1029
1302
|
{
|
|
1030
1303
|
className: skeleton({ variant }),
|
|
@@ -1035,7 +1308,7 @@ var Skeleton = /* @__PURE__ */ forwardRef16(function Skeleton2({ variant = "text
|
|
|
1035
1308
|
}
|
|
1036
1309
|
);
|
|
1037
1310
|
}
|
|
1038
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ jsx24(
|
|
1039
1312
|
"span",
|
|
1040
1313
|
{
|
|
1041
1314
|
ref,
|
|
@@ -1048,104 +1321,104 @@ var Skeleton = /* @__PURE__ */ forwardRef16(function Skeleton2({ variant = "text
|
|
|
1048
1321
|
});
|
|
1049
1322
|
|
|
1050
1323
|
// src/components/Stack/Stack.tsx
|
|
1051
|
-
import { forwardRef as
|
|
1324
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1052
1325
|
|
|
1053
1326
|
// src/components/Stack/Stack.css.ts
|
|
1054
|
-
import { createRuntimeFn as
|
|
1055
|
-
var stack =
|
|
1327
|
+
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1328
|
+
var stack = /* @__PURE__ */ _7a46818({ defaultClassName: "_1jz9hj90", variantClassNames: { direction: { row: "_1jz9hj91", column: "_1jz9hj92", "row-reverse": "_1jz9hj93", "column-reverse": "_1jz9hj94" }, gap: { "0": "_1jz9hj95", "1": "_1jz9hj96", "2": "_1jz9hj97", "3": "_1jz9hj98", "4": "_1jz9hj99", "5": "_1jz9hj9a", "6": "_1jz9hj9b", "8": "_1jz9hj9c", "10": "_1jz9hj9d", "12": "_1jz9hj9e", "16": "_1jz9hj9f" }, align: { start: "_1jz9hj9g", center: "_1jz9hj9h", end: "_1jz9hj9i", stretch: "_1jz9hj9j", baseline: "_1jz9hj9k" }, justify: { start: "_1jz9hj9l", center: "_1jz9hj9m", end: "_1jz9hj9n", between: "_1jz9hj9o", around: "_1jz9hj9p", evenly: "_1jz9hj9q" }, wrap: { true: "_1jz9hj9r" } }, defaultVariants: { direction: "column" }, compoundVariants: [] });
|
|
1056
1329
|
|
|
1057
1330
|
// src/components/Stack/Stack.tsx
|
|
1058
|
-
import { jsx as
|
|
1059
|
-
var Stack = /* @__PURE__ */
|
|
1060
|
-
return /* @__PURE__ */
|
|
1331
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1332
|
+
var Stack = /* @__PURE__ */ forwardRef22(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
|
|
1333
|
+
return /* @__PURE__ */ jsx25(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
|
|
1061
1334
|
});
|
|
1062
1335
|
|
|
1063
1336
|
// src/components/Switch/Switch.tsx
|
|
1064
1337
|
import * as RadixSwitch from "@radix-ui/react-switch";
|
|
1065
|
-
import { forwardRef as
|
|
1338
|
+
import { forwardRef as forwardRef23, useId as useId6 } from "react";
|
|
1066
1339
|
|
|
1067
1340
|
// src/components/Switch/Switch.css.ts
|
|
1068
|
-
import { createRuntimeFn as
|
|
1069
|
-
var
|
|
1070
|
-
var
|
|
1071
|
-
var thumb =
|
|
1072
|
-
var
|
|
1341
|
+
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1342
|
+
var label4 = "o33ul29";
|
|
1343
|
+
var root7 = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1344
|
+
var thumb = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1345
|
+
var track2 = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1073
1346
|
|
|
1074
1347
|
// src/components/Switch/Switch.tsx
|
|
1075
|
-
import { jsx as
|
|
1076
|
-
var Switch = /* @__PURE__ */
|
|
1077
|
-
const generatedId =
|
|
1348
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1349
|
+
var Switch = /* @__PURE__ */ forwardRef23(function Switch2({ label: label5, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
1350
|
+
const generatedId = useId6();
|
|
1078
1351
|
const switchId = id ?? generatedId;
|
|
1079
|
-
return /* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsxs21("span", { className: cx(root7({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
1353
|
+
/* @__PURE__ */ jsx26(
|
|
1081
1354
|
RadixSwitch.Root,
|
|
1082
1355
|
{
|
|
1083
1356
|
ref,
|
|
1084
1357
|
id: switchId,
|
|
1085
1358
|
disabled,
|
|
1086
1359
|
"aria-label": ariaLabel,
|
|
1087
|
-
className:
|
|
1360
|
+
className: track2({ size }),
|
|
1088
1361
|
...rest,
|
|
1089
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsx26(RadixSwitch.Thumb, { className: thumb({ size }) })
|
|
1090
1363
|
}
|
|
1091
1364
|
),
|
|
1092
|
-
|
|
1365
|
+
label5 && /* @__PURE__ */ jsx26("label", { htmlFor: switchId, className: label4, children: label5 })
|
|
1093
1366
|
] });
|
|
1094
1367
|
});
|
|
1095
1368
|
|
|
1096
1369
|
// src/components/Tabs/Tabs.tsx
|
|
1097
1370
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
1098
|
-
import { createContext as createContext2, forwardRef as
|
|
1371
|
+
import { createContext as createContext2, forwardRef as forwardRef24, useContext as useContext2 } from "react";
|
|
1099
1372
|
|
|
1100
1373
|
// src/components/Tabs/Tabs.css.ts
|
|
1101
|
-
import { createRuntimeFn as
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1104
|
-
var trigger3 =
|
|
1374
|
+
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1375
|
+
var content8 = "fvhbtda";
|
|
1376
|
+
var list3 = /* @__PURE__ */ _7a46820({ defaultClassName: "fvhbtd0", variantClassNames: { variant: { line: "fvhbtd1", soft: "fvhbtd2" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
|
|
1377
|
+
var trigger3 = /* @__PURE__ */ _7a46820({ defaultClassName: "fvhbtd3", variantClassNames: { variant: { line: "fvhbtd4", soft: "fvhbtd5" }, size: { sm: "fvhbtd6", md: "fvhbtd7" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd8"], [{ variant: "soft", size: "md" }, "fvhbtd9"]] });
|
|
1105
1378
|
|
|
1106
1379
|
// src/components/Tabs/Tabs.tsx
|
|
1107
|
-
import { jsx as
|
|
1380
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1108
1381
|
var TabsStyleContext = /* @__PURE__ */ createContext2({ variant: "line", size: "md" });
|
|
1109
|
-
var Tabs = /* @__PURE__ */
|
|
1382
|
+
var Tabs = /* @__PURE__ */ forwardRef24(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
|
|
1110
1383
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
1111
|
-
return /* @__PURE__ */
|
|
1384
|
+
return /* @__PURE__ */ jsx27(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx27(RadixTabs.Root, { ref, ...props, ...controlled }) });
|
|
1112
1385
|
});
|
|
1113
|
-
var TabsList = /* @__PURE__ */
|
|
1386
|
+
var TabsList = /* @__PURE__ */ forwardRef24(function TabsList2({ className, ...rest }, ref) {
|
|
1114
1387
|
const { variant } = useContext2(TabsStyleContext);
|
|
1115
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ jsx27(RadixTabs.List, { ref, className: cx(list3({ variant }), className), ...rest });
|
|
1116
1389
|
});
|
|
1117
|
-
var TabsTrigger = /* @__PURE__ */
|
|
1390
|
+
var TabsTrigger = /* @__PURE__ */ forwardRef24(function TabsTrigger2({ className, ...rest }, ref) {
|
|
1118
1391
|
const { variant, size } = useContext2(TabsStyleContext);
|
|
1119
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ jsx27(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
1120
1393
|
});
|
|
1121
|
-
var TabsContent = /* @__PURE__ */
|
|
1122
|
-
return /* @__PURE__ */
|
|
1394
|
+
var TabsContent = /* @__PURE__ */ forwardRef24(function TabsContent2({ className, ...rest }, ref) {
|
|
1395
|
+
return /* @__PURE__ */ jsx27(RadixTabs.Content, { ref, className: cx(content8, className), ...rest });
|
|
1123
1396
|
});
|
|
1124
1397
|
|
|
1125
1398
|
// src/components/Textarea/Textarea.tsx
|
|
1126
1399
|
import {
|
|
1127
|
-
forwardRef as
|
|
1400
|
+
forwardRef as forwardRef25,
|
|
1128
1401
|
useCallback,
|
|
1129
1402
|
useEffect as useEffect2,
|
|
1130
|
-
useId as
|
|
1403
|
+
useId as useId7,
|
|
1131
1404
|
useLayoutEffect,
|
|
1132
1405
|
useRef as useRef2,
|
|
1133
1406
|
useState as useState2
|
|
1134
1407
|
} from "react";
|
|
1135
1408
|
|
|
1136
1409
|
// src/components/Textarea/Textarea.css.ts
|
|
1137
|
-
import { createRuntimeFn as
|
|
1410
|
+
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1138
1411
|
var count = "_1koawa9";
|
|
1139
1412
|
var countOver = "_1koawaa";
|
|
1140
1413
|
var defaultWidth = "_1koawa7";
|
|
1141
|
-
var
|
|
1142
|
-
var textarea =
|
|
1414
|
+
var footer4 = "_1koawa8";
|
|
1415
|
+
var textarea = /* @__PURE__ */ _7a46821({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
1143
1416
|
|
|
1144
1417
|
// src/components/Textarea/Textarea.tsx
|
|
1145
|
-
import { jsx as
|
|
1418
|
+
import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1146
1419
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect2;
|
|
1147
|
-
var Textarea = /* @__PURE__ */
|
|
1148
|
-
label:
|
|
1420
|
+
var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
|
|
1421
|
+
label: label5,
|
|
1149
1422
|
helperText: helperText2,
|
|
1150
1423
|
error,
|
|
1151
1424
|
size,
|
|
@@ -1156,7 +1429,7 @@ var Textarea = /* @__PURE__ */ forwardRef20(function Textarea2({
|
|
|
1156
1429
|
required,
|
|
1157
1430
|
id,
|
|
1158
1431
|
rows = 3,
|
|
1159
|
-
value:
|
|
1432
|
+
value: value3,
|
|
1160
1433
|
defaultValue,
|
|
1161
1434
|
onChange,
|
|
1162
1435
|
maxLength,
|
|
@@ -1165,12 +1438,12 @@ var Textarea = /* @__PURE__ */ forwardRef20(function Textarea2({
|
|
|
1165
1438
|
"aria-describedby": ariaDescribedBy,
|
|
1166
1439
|
...rest
|
|
1167
1440
|
}, ref) {
|
|
1168
|
-
const generatedId =
|
|
1441
|
+
const generatedId = useId7();
|
|
1169
1442
|
const textareaId = id ?? generatedId;
|
|
1170
1443
|
const helperId = helperText2 ? `${textareaId}-helper` : void 0;
|
|
1171
1444
|
const innerRef = useRef2(null);
|
|
1172
1445
|
const [uncontrolledLength, setUncontrolledLength] = useState2(() => String(defaultValue ?? "").length);
|
|
1173
|
-
const length =
|
|
1446
|
+
const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
|
|
1174
1447
|
const fitHeight = useCallback(() => {
|
|
1175
1448
|
const el = innerRef.current;
|
|
1176
1449
|
if (!autoResize || !el) return;
|
|
@@ -1178,24 +1451,24 @@ var Textarea = /* @__PURE__ */ forwardRef20(function Textarea2({
|
|
|
1178
1451
|
const borders = el.offsetHeight - el.clientHeight;
|
|
1179
1452
|
el.style.height = `${el.scrollHeight + borders}px`;
|
|
1180
1453
|
}, [autoResize]);
|
|
1181
|
-
useIsomorphicLayoutEffect(fitHeight, [fitHeight,
|
|
1454
|
+
useIsomorphicLayoutEffect(fitHeight, [fitHeight, value3]);
|
|
1182
1455
|
const handleChange = (event) => {
|
|
1183
|
-
if (
|
|
1456
|
+
if (value3 === void 0) setUncontrolledLength(event.target.value.length);
|
|
1184
1457
|
fitHeight();
|
|
1185
1458
|
onChange?.(event);
|
|
1186
1459
|
};
|
|
1187
|
-
return /* @__PURE__ */
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
required && /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ jsxs22("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
1461
|
+
label5 && /* @__PURE__ */ jsxs22("label", { htmlFor: textareaId, className: label2, children: [
|
|
1462
|
+
label5,
|
|
1463
|
+
required && /* @__PURE__ */ jsx28("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
1191
1464
|
] }),
|
|
1192
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ jsx28(
|
|
1193
1466
|
"textarea",
|
|
1194
1467
|
{
|
|
1195
1468
|
ref: mergeRefs(innerRef, ref),
|
|
1196
1469
|
id: textareaId,
|
|
1197
1470
|
rows,
|
|
1198
|
-
value:
|
|
1471
|
+
value: value3,
|
|
1199
1472
|
defaultValue,
|
|
1200
1473
|
onChange: handleChange,
|
|
1201
1474
|
maxLength,
|
|
@@ -1211,9 +1484,9 @@ var Textarea = /* @__PURE__ */ forwardRef20(function Textarea2({
|
|
|
1211
1484
|
...rest
|
|
1212
1485
|
}
|
|
1213
1486
|
),
|
|
1214
|
-
(helperText2 || showCount) && /* @__PURE__ */
|
|
1215
|
-
helperText2 && /* @__PURE__ */
|
|
1216
|
-
showCount && /* @__PURE__ */
|
|
1487
|
+
(helperText2 || showCount) && /* @__PURE__ */ jsxs22("div", { className: footer4, children: [
|
|
1488
|
+
helperText2 && /* @__PURE__ */ jsx28("p", { id: helperId, className: helperText({ error }), children: helperText2 }),
|
|
1489
|
+
showCount && /* @__PURE__ */ jsx28("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
1217
1490
|
] })
|
|
1218
1491
|
] });
|
|
1219
1492
|
});
|
|
@@ -1221,22 +1494,22 @@ var Textarea = /* @__PURE__ */ forwardRef20(function Textarea2({
|
|
|
1221
1494
|
// src/components/Toast/Toast.tsx
|
|
1222
1495
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
1223
1496
|
import { createContext as createContext3, useCallback as useCallback2, useContext as useContext3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
|
|
1224
|
-
import { XIcon as
|
|
1497
|
+
import { XIcon as XIcon5 } from "@bestow-ui/icons";
|
|
1225
1498
|
|
|
1226
1499
|
// src/components/Toast/Toast.css.ts
|
|
1227
|
-
import { createRuntimeFn as
|
|
1228
|
-
var
|
|
1229
|
-
var close = "
|
|
1230
|
-
var
|
|
1231
|
-
var
|
|
1232
|
-
var toast =
|
|
1500
|
+
import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1501
|
+
var action2 = "_1g11zvx8";
|
|
1502
|
+
var close = "_1g11zvx9";
|
|
1503
|
+
var description5 = "_1g11zvx7";
|
|
1504
|
+
var title5 = "_1g11zvx6";
|
|
1505
|
+
var toast = /* @__PURE__ */ _7a46822({ defaultClassName: "_1g11zvx1", variantClassNames: { variant: { "default": "_1g11zvx2", success: "_1g11zvx3", warning: "_1g11zvx4", danger: "_1g11zvx5" } }, defaultVariants: { variant: "default" }, compoundVariants: [] });
|
|
1233
1506
|
var viewport2 = "_1g11zvx0";
|
|
1234
1507
|
|
|
1235
1508
|
// src/components/Toast/Toast.tsx
|
|
1236
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1237
1510
|
var REMOVE_DELAY = 500;
|
|
1238
1511
|
var ToastContext = /* @__PURE__ */ createContext3(null);
|
|
1239
|
-
function ToastProvider({ children, duration = 5e3, label:
|
|
1512
|
+
function ToastProvider({ children, duration = 5e3, label: label5 = "\uC54C\uB9BC" }) {
|
|
1240
1513
|
const [toasts, setToasts] = useState3([]);
|
|
1241
1514
|
const nextId = useRef3(0);
|
|
1242
1515
|
const portal2 = usePortalProps();
|
|
@@ -1250,10 +1523,10 @@ function ToastProvider({ children, duration = 5e3, label: label4 = "\uC54C\uB9BC
|
|
|
1250
1523
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
1251
1524
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
1252
1525
|
}, []);
|
|
1253
|
-
const
|
|
1254
|
-
return /* @__PURE__ */
|
|
1526
|
+
const value3 = useMemo2(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
1527
|
+
return /* @__PURE__ */ jsx29(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs23(RadixToast.Provider, { duration, label: label5, swipeDirection: "right", children: [
|
|
1255
1528
|
children,
|
|
1256
|
-
toasts.map(({ id, open, title:
|
|
1529
|
+
toasts.map(({ id, open, title: title6, description: description6, variant, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs23(
|
|
1257
1530
|
RadixToast.Root,
|
|
1258
1531
|
{
|
|
1259
1532
|
open,
|
|
@@ -1263,15 +1536,15 @@ function ToastProvider({ children, duration = 5e3, label: label4 = "\uC54C\uB9BC
|
|
|
1263
1536
|
},
|
|
1264
1537
|
className: toast({ variant }),
|
|
1265
1538
|
children: [
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ jsx29(RadixToast.Title, { className: title5, children: title6 }),
|
|
1540
|
+
description6 && /* @__PURE__ */ jsx29(RadixToast.Description, { className: description5, children: description6 }),
|
|
1541
|
+
action3 && /* @__PURE__ */ jsx29(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx29(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
1542
|
+
/* @__PURE__ */ jsx29(RadixToast.Close, { className: close, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx29(XIcon5, { size: 16 }) })
|
|
1270
1543
|
]
|
|
1271
1544
|
},
|
|
1272
1545
|
id
|
|
1273
1546
|
)),
|
|
1274
|
-
/* @__PURE__ */
|
|
1547
|
+
/* @__PURE__ */ jsx29(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
1275
1548
|
] }) });
|
|
1276
1549
|
}
|
|
1277
1550
|
function useToast() {
|
|
@@ -1285,12 +1558,12 @@ import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
|
1285
1558
|
|
|
1286
1559
|
// src/components/Tooltip/Tooltip.css.ts
|
|
1287
1560
|
var arrow2 = "z7rufs1";
|
|
1288
|
-
var
|
|
1561
|
+
var content9 = "z7rufs0";
|
|
1289
1562
|
|
|
1290
1563
|
// src/components/Tooltip/Tooltip.tsx
|
|
1291
|
-
import { jsx as
|
|
1564
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1292
1565
|
function Tooltip({
|
|
1293
|
-
content:
|
|
1566
|
+
content: content10,
|
|
1294
1567
|
children,
|
|
1295
1568
|
side = "top",
|
|
1296
1569
|
align = "center",
|
|
@@ -1302,21 +1575,21 @@ function Tooltip({
|
|
|
1302
1575
|
className
|
|
1303
1576
|
}) {
|
|
1304
1577
|
const portal2 = usePortalProps();
|
|
1305
|
-
if (disabled ||
|
|
1306
|
-
return /* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */
|
|
1308
|
-
/* @__PURE__ */
|
|
1578
|
+
if (disabled || content10 == null || content10 === "") return children;
|
|
1579
|
+
return /* @__PURE__ */ jsx30(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs24(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1580
|
+
/* @__PURE__ */ jsx30(RadixTooltip.Trigger, { asChild: true, children }),
|
|
1581
|
+
/* @__PURE__ */ jsx30(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs24(
|
|
1309
1582
|
RadixTooltip.Content,
|
|
1310
1583
|
{
|
|
1311
1584
|
side,
|
|
1312
1585
|
align,
|
|
1313
1586
|
sideOffset: 6,
|
|
1314
1587
|
collisionPadding: 8,
|
|
1315
|
-
className: cx(portal2.className,
|
|
1588
|
+
className: cx(portal2.className, content9, className),
|
|
1316
1589
|
style: portal2.style,
|
|
1317
1590
|
children: [
|
|
1318
|
-
|
|
1319
|
-
/* @__PURE__ */
|
|
1591
|
+
content10,
|
|
1592
|
+
/* @__PURE__ */ jsx30(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
1320
1593
|
]
|
|
1321
1594
|
}
|
|
1322
1595
|
) })
|
|
@@ -1324,14 +1597,14 @@ function Tooltip({
|
|
|
1324
1597
|
}
|
|
1325
1598
|
|
|
1326
1599
|
// src/components/Typography/Typography.tsx
|
|
1327
|
-
import { forwardRef as
|
|
1600
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
1328
1601
|
|
|
1329
1602
|
// src/components/Typography/Typography.css.ts
|
|
1330
|
-
import { createRuntimeFn as
|
|
1331
|
-
var typography =
|
|
1603
|
+
import { createRuntimeFn as _7a46823 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1604
|
+
var typography = /* @__PURE__ */ _7a46823({ defaultClassName: "kiolio0", variantClassNames: { variant: { display: "kiolio1", h1: "kiolio2", h2: "kiolio3", h3: "kiolio4", h4: "kiolio5", "body-lg": "kiolio6", body: "kiolio7", "body-sm": "kiolio8", caption: "kiolio9" }, color: { "default": "kiolioa", muted: "kioliob", subtle: "kiolioc", primary: "kioliod", danger: "kiolioe", success: "kioliof", warning: "kioliog", inherit: "kiolioh" }, weight: { regular: "kiolioi", medium: "kiolioj", semibold: "kioliok", bold: "kioliol" }, align: { start: "kioliom", center: "kiolion", end: "kiolioo" }, truncate: { true: "kioliop" } }, defaultVariants: { variant: "body", color: "default" }, compoundVariants: [] });
|
|
1332
1605
|
|
|
1333
1606
|
// src/components/Typography/Typography.tsx
|
|
1334
|
-
import { jsx as
|
|
1607
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1335
1608
|
var defaultElement = {
|
|
1336
1609
|
display: "h1",
|
|
1337
1610
|
h1: "h1",
|
|
@@ -1343,9 +1616,9 @@ var defaultElement = {
|
|
|
1343
1616
|
"body-sm": "p",
|
|
1344
1617
|
caption: "span"
|
|
1345
1618
|
};
|
|
1346
|
-
var Typography = /* @__PURE__ */
|
|
1619
|
+
var Typography = /* @__PURE__ */ forwardRef26(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
|
|
1347
1620
|
const Component = as ?? defaultElement[variant];
|
|
1348
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsx31(
|
|
1349
1622
|
Component,
|
|
1350
1623
|
{
|
|
1351
1624
|
ref,
|
|
@@ -1357,8 +1630,10 @@ var Typography = /* @__PURE__ */ forwardRef21(function Typography2({ variant = "
|
|
|
1357
1630
|
export {
|
|
1358
1631
|
Accordion,
|
|
1359
1632
|
AccordionItem,
|
|
1633
|
+
Alert,
|
|
1360
1634
|
Avatar,
|
|
1361
1635
|
Badge,
|
|
1636
|
+
Breadcrumb,
|
|
1362
1637
|
Button,
|
|
1363
1638
|
Card,
|
|
1364
1639
|
CardBody,
|
|
@@ -1366,6 +1641,8 @@ export {
|
|
|
1366
1641
|
CardHeader,
|
|
1367
1642
|
Checkbox,
|
|
1368
1643
|
Divider,
|
|
1644
|
+
Drawer,
|
|
1645
|
+
DrawerClose,
|
|
1369
1646
|
DropdownMenu,
|
|
1370
1647
|
DropdownMenuContent,
|
|
1371
1648
|
DropdownMenuGroup,
|
|
@@ -1373,12 +1650,15 @@ export {
|
|
|
1373
1650
|
DropdownMenuLabel,
|
|
1374
1651
|
DropdownMenuSeparator,
|
|
1375
1652
|
DropdownMenuTrigger,
|
|
1653
|
+
IconButton,
|
|
1376
1654
|
Input,
|
|
1655
|
+
Link,
|
|
1377
1656
|
Modal,
|
|
1378
1657
|
ModalClose,
|
|
1379
1658
|
Pagination,
|
|
1380
1659
|
Popover,
|
|
1381
1660
|
PopoverClose,
|
|
1661
|
+
Progress,
|
|
1382
1662
|
RadioGroup,
|
|
1383
1663
|
Select,
|
|
1384
1664
|
Skeleton,
|