@nayhoo/ui 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{avatar.css-m44RZpGY.d.mts → avatar.css-YFj-sVm_.d.mts} +2 -2
- package/dist/{avatar.css-m44RZpGY.d.ts → avatar.css-YFj-sVm_.d.ts} +2 -2
- package/dist/{badge.css-BiiAU3Jo.d.mts → badge.css-qilqDGjW.d.mts} +1 -1
- package/dist/{badge.css-BiiAU3Jo.d.ts → badge.css-qilqDGjW.d.ts} +1 -1
- package/dist/{button.css-CBtNCrkL.d.mts → button.css-KMqdCdRL.d.mts} +2 -2
- package/dist/{button.css-CBtNCrkL.d.ts → button.css-KMqdCdRL.d.ts} +2 -2
- package/dist/{checkbox.css-CJD0qdcJ.d.mts → checkbox.css-CGzH7iFG.d.mts} +1 -1
- package/dist/{checkbox.css-CJD0qdcJ.d.ts → checkbox.css-CGzH7iFG.d.ts} +1 -1
- package/dist/{chunk-4JJB6DUF.mjs → chunk-65T2AXGV.mjs} +4 -4
- package/dist/chunk-65T2AXGV.mjs.map +1 -0
- package/dist/chunk-A5XHUJ2A.mjs +12 -0
- package/dist/chunk-A5XHUJ2A.mjs.map +1 -0
- package/dist/{chunk-OWCOYR6H.mjs → chunk-CQ3SNSPG.mjs} +8 -8
- package/dist/chunk-CQ3SNSPG.mjs.map +1 -0
- package/dist/{chunk-QSFZ2LOS.mjs → chunk-EFNLOCJE.mjs} +3 -3
- package/dist/chunk-EFNLOCJE.mjs.map +1 -0
- package/dist/{chunk-GWDU7T23.mjs → chunk-ENQ7ORHL.mjs} +1 -1
- package/dist/chunk-ENQ7ORHL.mjs.map +1 -0
- package/dist/chunk-GW7MIISK.mjs +40 -0
- package/dist/chunk-GW7MIISK.mjs.map +1 -0
- package/dist/chunk-KWTNICKO.mjs +12 -0
- package/dist/chunk-KWTNICKO.mjs.map +1 -0
- package/dist/{chunk-HNN7XTNY.mjs → chunk-VJMDG74N.mjs} +8 -9
- package/dist/chunk-VJMDG74N.mjs.map +1 -0
- package/dist/{chunk-VW4CTCZL.mjs → chunk-VZW5PY4D.mjs} +13 -7
- package/dist/chunk-VZW5PY4D.mjs.map +1 -0
- package/dist/chunk-WRIZ5KCE.mjs +12 -0
- package/dist/chunk-WRIZ5KCE.mjs.map +1 -0
- package/dist/chunk-YXNAFARR.mjs +43 -0
- package/dist/chunk-YXNAFARR.mjs.map +1 -0
- package/dist/components/aspect-ratio.d.mts +1 -1
- package/dist/components/aspect-ratio.d.ts +1 -1
- package/dist/components/aspect-ratio.js.map +1 -1
- package/dist/components/aspect-ratio.mjs.map +1 -1
- package/dist/components/avatar.d.mts +2 -2
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/badge.d.mts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.css +11 -150
- package/dist/components/button.css.map +1 -1
- package/dist/components/button.d.mts +2 -3
- package/dist/components/button.d.ts +2 -3
- package/dist/components/button.js +23 -17
- package/dist/components/button.js.map +1 -1
- package/dist/components/button.mjs +4 -4
- package/dist/components/checkbox.d.mts +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/container.d.mts +1 -1
- package/dist/components/container.d.ts +1 -1
- package/dist/components/dialog.css +232 -1710
- package/dist/components/dialog.css.map +1 -1
- package/dist/components/dialog.d.mts +1 -2
- package/dist/components/dialog.d.ts +1 -2
- package/dist/components/dialog.js +58 -235
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dialog.mjs +12 -13
- package/dist/components/dialog.mjs.map +1 -1
- package/dist/components/form.d.mts +1 -1
- package/dist/components/form.d.ts +1 -1
- package/dist/components/heading.css +20 -29
- package/dist/components/heading.css.map +1 -1
- package/dist/components/heading.d.mts +3 -7
- package/dist/components/heading.d.ts +3 -7
- package/dist/components/heading.js +42 -23
- package/dist/components/heading.js.map +1 -1
- package/dist/components/heading.mjs +4 -2
- package/dist/components/icon-button.css +13 -42
- package/dist/components/icon-button.css.map +1 -1
- package/dist/components/icon-button.d.mts +2 -3
- package/dist/components/icon-button.d.ts +2 -3
- package/dist/components/icon-button.js +18 -13
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/icon-button.mjs +4 -4
- package/dist/components/image.d.mts +5 -4
- package/dist/components/image.d.ts +5 -4
- package/dist/components/image.js +12 -5
- package/dist/components/image.js.map +1 -1
- package/dist/components/image.mjs +12 -5
- package/dist/components/image.mjs.map +1 -1
- package/dist/components/link.d.mts +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/link.js.map +1 -1
- package/dist/components/link.mjs +1 -1
- package/dist/components/link.mjs.map +1 -1
- package/dist/components/select.css +11 -150
- package/dist/components/select.css.map +1 -1
- package/dist/components/select.d.mts +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +23 -17
- package/dist/components/select.js.map +1 -1
- package/dist/components/select.mjs +4 -4
- package/dist/components/separator.d.mts +3 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js.map +1 -1
- package/dist/components/separator.mjs.map +1 -1
- package/dist/components/skeleton.d.mts +1 -1
- package/dist/components/skeleton.d.ts +1 -1
- package/dist/components/spinner.css +5 -29
- package/dist/components/spinner.css.map +1 -1
- package/dist/components/spinner.d.mts +3 -5
- package/dist/components/spinner.d.ts +3 -5
- package/dist/components/spinner.js +12 -6
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/spinner.mjs +2 -2
- package/dist/components/status.d.mts +1 -1
- package/dist/components/status.d.ts +1 -1
- package/dist/components/switch.d.mts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/text-area.d.mts +1 -1
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-field.d.mts +1 -1
- package/dist/components/text-field.d.ts +1 -1
- package/dist/components/text.d.mts +2 -2
- package/dist/components/text.d.ts +2 -2
- package/dist/components/text.js +2 -2
- package/dist/components/text.js.map +1 -1
- package/dist/components/text.mjs +1 -1
- package/dist/components/tooltip.css +2 -1
- package/dist/components/tooltip.css.map +1 -1
- package/dist/components/tooltip.d.mts +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tooltip.mjs +2 -2
- package/dist/{container.css-DrtNVXzo.d.mts → container.css-BgQOsZ4q.d.mts} +1 -1
- package/dist/{container.css-DrtNVXzo.d.ts → container.css-BgQOsZ4q.d.ts} +1 -1
- package/dist/dialog.css-CYDkFLZx.d.mts +27 -0
- package/dist/dialog.css-CYDkFLZx.d.ts +27 -0
- package/dist/{form.css-CBijFS-Z.d.mts → form.css-NAo0sSxW.d.mts} +1 -1
- package/dist/{form.css-CBijFS-Z.d.ts → form.css-NAo0sSxW.d.ts} +1 -1
- package/dist/heading.css-8Qi1-uCW.d.mts +53 -0
- package/dist/heading.css-8Qi1-uCW.d.ts +53 -0
- package/dist/{icon-button.css-ndHR4t3c.d.mts → icon-button.css-DOlVsfKX.d.mts} +1 -6
- package/dist/{icon-button.css-ndHR4t3c.d.ts → icon-button.css-DOlVsfKX.d.ts} +1 -6
- package/dist/{link.css-CgQxXknE.d.mts → link.css-CiQJiLia.d.mts} +1 -1
- package/dist/{link.css-CgQxXknE.d.ts → link.css-CiQJiLia.d.ts} +1 -1
- package/dist/patterns/index.css +231 -1709
- package/dist/patterns/index.css.map +1 -1
- package/dist/patterns/index.d.mts +17 -5
- package/dist/patterns/index.d.ts +17 -5
- package/dist/patterns/index.js +69 -279
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/index.mjs +27 -46
- package/dist/patterns/index.mjs.map +1 -1
- package/dist/providers/index.css +97 -192
- package/dist/providers/index.css.map +1 -1
- package/dist/providers/index.d.mts +2 -2
- package/dist/providers/index.d.ts +2 -2
- package/dist/providers/index.js +60 -53
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +13 -11
- package/dist/providers/index.mjs.map +1 -1
- package/dist/{skeleton.css-CpCE7T-Z.d.mts → skeleton.css-Dqj91z1J.d.mts} +1 -1
- package/dist/{skeleton.css-CpCE7T-Z.d.ts → skeleton.css-Dqj91z1J.d.ts} +1 -1
- package/dist/spinner.css-BZiQWnG0.d.mts +22 -0
- package/dist/spinner.css-BZiQWnG0.d.ts +22 -0
- package/dist/{status.css-BgE7VySx.d.mts → status.css-Co587rxg.d.mts} +1 -1
- package/dist/{status.css-BgE7VySx.d.ts → status.css-Co587rxg.d.ts} +1 -1
- package/dist/{switch.css-DL5vSOih.d.mts → switch.css-h_sQVT_Y.d.mts} +2 -2
- package/dist/{switch.css-DL5vSOih.d.ts → switch.css-h_sQVT_Y.d.ts} +2 -2
- package/dist/{text-area.css-CAGsYX0q.d.mts → text-area.css-mKrAGHB3.d.mts} +1 -1
- package/dist/{text-area.css-CAGsYX0q.d.ts → text-area.css-mKrAGHB3.d.ts} +1 -1
- package/dist/{text-field.css-T4wUHMsd.d.mts → text-field.css-BdmWDCNj.d.mts} +1 -1
- package/dist/{text-field.css-T4wUHMsd.d.ts → text-field.css-BdmWDCNj.d.ts} +1 -1
- package/dist/{text.css-CjBSPcnP.d.mts → text.css-CxDfx0B7.d.mts} +1 -1
- package/dist/{text.css-CjBSPcnP.d.ts → text.css-CxDfx0B7.d.ts} +1 -1
- package/dist/theme/index.css +236 -1714
- package/dist/theme/index.css.map +1 -1
- package/dist/theme/index.d.mts +41 -155
- package/dist/theme/index.d.ts +41 -155
- package/dist/theme/index.js +49 -233
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +24 -24
- package/dist/{tooltip.css-XeMsLpNS.d.mts → tooltip.css-otpfm6_m.d.mts} +1 -1
- package/dist/{tooltip.css-XeMsLpNS.d.ts → tooltip.css-otpfm6_m.d.ts} +1 -1
- package/package.json +5 -15
- package/dist/chunk-4JJB6DUF.mjs.map +0 -1
- package/dist/chunk-DO2J4RNO.mjs +0 -232
- package/dist/chunk-DO2J4RNO.mjs.map +0 -1
- package/dist/chunk-GWDU7T23.mjs.map +0 -1
- package/dist/chunk-HNN7XTNY.mjs.map +0 -1
- package/dist/chunk-LFQ232LO.mjs +0 -43
- package/dist/chunk-LFQ232LO.mjs.map +0 -1
- package/dist/chunk-NOIOHUNH.mjs +0 -7
- package/dist/chunk-NOIOHUNH.mjs.map +0 -1
- package/dist/chunk-OWCOYR6H.mjs.map +0 -1
- package/dist/chunk-QSFZ2LOS.mjs.map +0 -1
- package/dist/chunk-URGU4MLN.mjs +0 -12
- package/dist/chunk-URGU4MLN.mjs.map +0 -1
- package/dist/chunk-VW4CTCZL.mjs.map +0 -1
- package/dist/chunk-ZDBDV2HW.mjs +0 -12
- package/dist/chunk-ZDBDV2HW.mjs.map +0 -1
- package/dist/components/label.css +0 -65
- package/dist/components/label.css.map +0 -1
- package/dist/components/label.d.mts +0 -12
- package/dist/components/label.d.ts +0 -12
- package/dist/components/label.js +0 -75
- package/dist/components/label.js.map +0 -1
- package/dist/components/label.mjs +0 -32
- package/dist/components/label.mjs.map +0 -1
- package/dist/components/paragraph.css +0 -58
- package/dist/components/paragraph.css.map +0 -1
- package/dist/components/paragraph.d.mts +0 -13
- package/dist/components/paragraph.d.ts +0 -13
- package/dist/components/paragraph.js +0 -63
- package/dist/components/paragraph.js.map +0 -1
- package/dist/components/paragraph.mjs +0 -30
- package/dist/components/paragraph.mjs.map +0 -1
- package/dist/dialog.css-Ab_SVu1p.d.mts +0 -34
- package/dist/dialog.css-Ab_SVu1p.d.ts +0 -34
- package/dist/spinner.css-D4j8oa1u.d.mts +0 -46
- package/dist/spinner.css-D4j8oa1u.d.ts +0 -46
|
@@ -22,7 +22,7 @@ interface ThemeProviderProps extends react.PropsWithChildren {
|
|
|
22
22
|
scriptProps?: ScriptProps;
|
|
23
23
|
}
|
|
24
24
|
declare const useTheme: () => UseThemeProps;
|
|
25
|
-
declare const ThemeProvider: (props: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare const ThemeProvider: ({ ...props }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
26
26
|
|
|
27
27
|
type AddToastPayload = Omit<Toast, "status">;
|
|
28
28
|
type ToastContextProps = ((payload: AddToastPayload) => void) & {
|
|
@@ -37,7 +37,7 @@ type Toast = {
|
|
|
37
37
|
status: "default" | "error" | "success";
|
|
38
38
|
action?: react.ReactNode;
|
|
39
39
|
} & ToastPrimitives.ToastProps;
|
|
40
|
-
declare const Toast: (props: ToastPrimitives.ToastProps & {
|
|
40
|
+
declare const Toast: ({ ...props }: ToastPrimitives.ToastProps & {
|
|
41
41
|
toast: Toast;
|
|
42
42
|
}) => react_jsx_runtime.JSX.Element;
|
|
43
43
|
declare const ToastAction: ({ ...props }: Omit<ToastPrimitives.ToastActionProps, "asChild">) => react_jsx_runtime.JSX.Element;
|
|
@@ -22,7 +22,7 @@ interface ThemeProviderProps extends react.PropsWithChildren {
|
|
|
22
22
|
scriptProps?: ScriptProps;
|
|
23
23
|
}
|
|
24
24
|
declare const useTheme: () => UseThemeProps;
|
|
25
|
-
declare const ThemeProvider: (props: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare const ThemeProvider: ({ ...props }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
26
26
|
|
|
27
27
|
type AddToastPayload = Omit<Toast, "status">;
|
|
28
28
|
type ToastContextProps = ((payload: AddToastPayload) => void) & {
|
|
@@ -37,7 +37,7 @@ type Toast = {
|
|
|
37
37
|
status: "default" | "error" | "success";
|
|
38
38
|
action?: react.ReactNode;
|
|
39
39
|
} & ToastPrimitives.ToastProps;
|
|
40
|
-
declare const Toast: (props: ToastPrimitives.ToastProps & {
|
|
40
|
+
declare const Toast: ({ ...props }: ToastPrimitives.ToastProps & {
|
|
41
41
|
toast: Toast;
|
|
42
42
|
}) => react_jsx_runtime.JSX.Element;
|
|
43
43
|
declare const ToastAction: ({ ...props }: Omit<ToastPrimitives.ToastActionProps, "asChild">) => react_jsx_runtime.JSX.Element;
|
package/dist/providers/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var saveToLS = (storageKey2, value) => {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
var useTheme = () => React.useContext(ThemeContext) ?? defaultContext;
|
|
74
|
-
var ThemeProvider = (props) => {
|
|
74
|
+
var ThemeProvider = ({ ...props }) => {
|
|
75
75
|
const context = React.useContext(ThemeContext);
|
|
76
76
|
if (context) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });
|
|
77
77
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, { ...props });
|
|
@@ -225,7 +225,7 @@ var script = (storageKey2, defaultTheme2, systemThemes2, classes2) => {
|
|
|
225
225
|
// src/theme/recipes/spinner.css.ts
|
|
226
226
|
var import_createRuntimeFn = require("homemade-recipes/createRuntimeFn");
|
|
227
227
|
var spinnerRecipe = (0, import_createRuntimeFn.createRuntimeFn)((function() {
|
|
228
|
-
var x = { defaultClassName: "spinner__15xzcy90", variantClassNames: { size: { "1": "spinner_size_1__15xzcy91", "2": "spinner_size_2__15xzcy92", "3": "spinner_size_3__15xzcy93"
|
|
228
|
+
var x = { defaultClassName: "spinner__15xzcy90", variantClassNames: { size: { "1": "spinner_size_1__15xzcy91", "2": "spinner_size_2__15xzcy92", "3": "spinner_size_3__15xzcy93" } }, defaultVariants: { size: "2" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
229
229
|
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
230
230
|
return x;
|
|
231
231
|
})());
|
|
@@ -261,37 +261,42 @@ function mergeClasses(...classes2) {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
// src/components/spinner.tsx
|
|
264
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
265
264
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
266
|
-
var
|
|
267
|
-
var Spinner = ({ asChild, ...props }) => {
|
|
265
|
+
var Spinner = ({ ...props }) => {
|
|
268
266
|
const [variants, rest] = extractVariantsFromProps(
|
|
269
267
|
props,
|
|
270
268
|
...spinnerRecipe.variants()
|
|
271
269
|
);
|
|
272
270
|
const spinner = spinnerRecipe(variants);
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
role: "status",
|
|
275
|
+
"aria-label": "Loading",
|
|
276
|
+
...rest,
|
|
277
|
+
className: mergeClasses(spinner, rest.className),
|
|
278
|
+
children: rest.children
|
|
279
|
+
}
|
|
280
|
+
);
|
|
275
281
|
};
|
|
276
282
|
|
|
277
283
|
// src/theme/recipes/button.css.ts
|
|
278
284
|
var import_createRuntimeFn2 = require("homemade-recipes/createRuntimeFn");
|
|
279
285
|
var buttonIconRecipe = (0, import_createRuntimeFn2.createRuntimeFn)((function() {
|
|
280
|
-
var x = { defaultClassName: "
|
|
286
|
+
var x = { defaultClassName: "button__hi3ya0e", variantClassNames: { size: { "1": "button_size_1__hi3ya0f", "2": "button_size_2__hi3ya0g", "3": "button_size_3__hi3ya0h" } }, defaultVariants: {}, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
281
287
|
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
282
288
|
return x;
|
|
283
289
|
})());
|
|
284
290
|
var buttonRecipe = (0, import_createRuntimeFn2.createRuntimeFn)((function() {
|
|
285
|
-
var x = { defaultClassName: "button__hi3ya00", variantClassNames: { fullWidth: { true: "button_fullWidth_true__hi3ya01", false: "button_fullWidth_false__hi3ya02" }, loading: { true: "button_loading_true__hi3ya03" }, size: { "1": "button_size_1__hi3ya04", "2": "button_size_2__hi3ya05", "3": "button_size_3__hi3ya06" }, variant: { primary: "button_variant_primary__hi3ya07", secondary: "button_variant_secondary__hi3ya08", outline: "button_variant_outline__hi3ya09", ghost: "button_variant_ghost__hi3ya0a", error: "button_variant_error__hi3ya0b", success: "button_variant_success__hi3ya0c" }, round: { true: "button_round_true__hi3ya0d" } }, defaultVariants: { size: "2", variant: "primary" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0
|
|
291
|
+
var x = { defaultClassName: "button__hi3ya00", variantClassNames: { fullWidth: { true: "button_fullWidth_true__hi3ya01", false: "button_fullWidth_false__hi3ya02" }, loading: { true: "button_loading_true__hi3ya03" }, size: { "1": "button_size_1__hi3ya04", "2": "button_size_2__hi3ya05", "3": "button_size_3__hi3ya06" }, variant: { primary: "button_variant_primary__hi3ya07", secondary: "button_variant_secondary__hi3ya08", outline: "button_variant_outline__hi3ya09", ghost: "button_variant_ghost__hi3ya0a", error: "button_variant_error__hi3ya0b", success: "button_variant_success__hi3ya0c" }, round: { true: "button_round_true__hi3ya0d" } }, defaultVariants: { size: "2", variant: "primary" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
286
292
|
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
287
293
|
return x;
|
|
288
294
|
})());
|
|
289
|
-
var buttonSpinner = "
|
|
295
|
+
var buttonSpinner = "button_buttonSpinner__hi3ya0i";
|
|
290
296
|
|
|
291
297
|
// src/components/button.tsx
|
|
292
|
-
var
|
|
298
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
293
299
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
294
|
-
var defaultElement2 = "button";
|
|
295
300
|
var Button = ({
|
|
296
301
|
asChild,
|
|
297
302
|
leftIcon,
|
|
@@ -303,40 +308,40 @@ var Button = ({
|
|
|
303
308
|
...buttonRecipe.variants()
|
|
304
309
|
);
|
|
305
310
|
const button = buttonRecipe(variants);
|
|
306
|
-
const Comp = asChild ? import_react_slot2.Slot : defaultElement2;
|
|
307
311
|
const buttonIcon = buttonIconRecipe({
|
|
308
312
|
size: variants.size
|
|
309
313
|
});
|
|
314
|
+
const disabled = rest.disabled || Boolean(variants.loading);
|
|
310
315
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
311
|
-
|
|
316
|
+
"button",
|
|
312
317
|
{
|
|
313
318
|
...rest,
|
|
314
319
|
className: mergeClasses(button, rest.className),
|
|
315
|
-
disabled
|
|
320
|
+
disabled,
|
|
321
|
+
"aria-disabled": disabled,
|
|
316
322
|
...leftIcon && { "data-left-icon": "" },
|
|
317
323
|
...rightIcon && { "data-right-icon": "" },
|
|
318
324
|
children: [
|
|
319
|
-
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
325
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_slot.Slot, { className: buttonIcon, children: leftIcon }),
|
|
320
326
|
rest.children,
|
|
321
|
-
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
322
|
-
variants.loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Spinner, { className: buttonSpinner })
|
|
327
|
+
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_slot.Slot, { className: buttonIcon, children: rightIcon }),
|
|
328
|
+
variants.loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Spinner, { className: buttonSpinner, size: variants.size })
|
|
323
329
|
]
|
|
324
330
|
}
|
|
325
331
|
);
|
|
326
332
|
};
|
|
327
333
|
|
|
328
|
-
// src/theme/recipes/
|
|
334
|
+
// src/theme/recipes/heading.css.ts
|
|
329
335
|
var import_createRuntimeFn3 = require("homemade-recipes/createRuntimeFn");
|
|
330
|
-
var
|
|
331
|
-
var x = { defaultClassName: "
|
|
336
|
+
var headingRecipe = (0, import_createRuntimeFn3.createRuntimeFn)((function() {
|
|
337
|
+
var x = { defaultClassName: "heading__1mvqggb0", variantClassNames: { color: { primary: "heading_color_primary__1mvqggb1", secondary: "heading_color_secondary__1mvqggb2", error: "heading_color_error__1mvqggb3", subtle: "heading_color_subtle__1mvqggb4" }, level: { "1": "heading_level_1__1mvqggb5", "2": "heading_level_2__1mvqggb6", "3": "heading_level_3__1mvqggb7", "4": "heading_level_4__1mvqggb8", "5": "heading_level_5__1mvqggb9", "6": "heading_level_6__1mvqggba" }, weight: { regular: "heading_weight_regular__1mvqggbb", medium: "heading_weight_medium__1mvqggbc", bold: "heading_weight_bold__1mvqggbd" } }, defaultVariants: { level: "1", weight: "medium" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
332
338
|
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
333
339
|
return x;
|
|
334
340
|
})());
|
|
335
341
|
|
|
336
342
|
// src/components/heading.tsx
|
|
337
|
-
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
338
343
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
339
|
-
var
|
|
344
|
+
var headingAs = {
|
|
340
345
|
1: "h1",
|
|
341
346
|
2: "h2",
|
|
342
347
|
3: "h3",
|
|
@@ -344,72 +349,74 @@ var textAs = {
|
|
|
344
349
|
5: "h5",
|
|
345
350
|
6: "h6"
|
|
346
351
|
};
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
5: "4",
|
|
353
|
-
6: "3"
|
|
352
|
+
var extractElementFromLevel = (level) => {
|
|
353
|
+
if (!level) {
|
|
354
|
+
return "h1";
|
|
355
|
+
}
|
|
356
|
+
return headingAs[level];
|
|
354
357
|
};
|
|
355
|
-
var Heading = ({
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const text = textRecipe({ color, size: textSize[level], weight });
|
|
364
|
-
const Comp = asChild ? import_react_slot3.Slot : textAs[level];
|
|
365
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ...props, className: mergeClasses(text, props.className), children: props.children });
|
|
358
|
+
var Heading = ({ ...props }) => {
|
|
359
|
+
const [variants, rest] = extractVariantsFromProps(
|
|
360
|
+
props,
|
|
361
|
+
...headingRecipe.variants()
|
|
362
|
+
);
|
|
363
|
+
const heading = headingRecipe(variants);
|
|
364
|
+
const Comp = extractElementFromLevel(variants.level);
|
|
365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ...rest, className: mergeClasses(heading, rest.className), children: rest.children });
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
// src/theme/recipes/icon-button.css.ts
|
|
369
369
|
var import_createRuntimeFn4 = require("homemade-recipes/createRuntimeFn");
|
|
370
370
|
var iconButtonRecipe = (0, import_createRuntimeFn4.createRuntimeFn)((function() {
|
|
371
|
-
var x = { defaultClassName: "icon-button__v93z8s0", variantClassNames: { loading: { true: "icon-button_loading_true__v93z8s1" }, size: { "1": "icon-button_size_1__v93z8s2", "2": "icon-button_size_2__v93z8s3", "3": "icon-button_size_3__v93z8s4"
|
|
371
|
+
var x = { defaultClassName: "icon-button__v93z8s0", variantClassNames: { loading: { true: "icon-button_loading_true__v93z8s1" }, size: { "1": "icon-button_size_1__v93z8s2", "2": "icon-button_size_2__v93z8s3", "3": "icon-button_size_3__v93z8s4" }, variant: { ghost: "icon-button_variant_ghost__v93z8s5", outline: "icon-button_variant_outline__v93z8s6" }, round: { true: "icon-button_round_true__v93z8s7" } }, defaultVariants: { size: "1", variant: "ghost" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
372
372
|
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
373
373
|
return x;
|
|
374
374
|
})());
|
|
375
375
|
|
|
376
376
|
// src/components/icon-button.tsx
|
|
377
|
-
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
378
377
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
379
|
-
var defaultElement3 = "button";
|
|
380
378
|
var IconButton = ({ asChild, ...props }) => {
|
|
381
379
|
const [variants, rest] = extractVariantsFromProps(
|
|
382
380
|
props,
|
|
383
381
|
...iconButtonRecipe.variants()
|
|
384
382
|
);
|
|
385
383
|
const iconButton = iconButtonRecipe(variants);
|
|
386
|
-
const
|
|
384
|
+
const disabled = rest.disabled || Boolean(variants.loading);
|
|
387
385
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
388
|
-
|
|
386
|
+
"button",
|
|
389
387
|
{
|
|
390
388
|
...rest,
|
|
391
389
|
className: mergeClasses(iconButton, rest.className),
|
|
392
|
-
disabled
|
|
390
|
+
disabled,
|
|
391
|
+
"aria-disabled": disabled,
|
|
393
392
|
children: [
|
|
394
393
|
rest.children,
|
|
395
|
-
variants.loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, { style: { position: "absolute" } })
|
|
394
|
+
variants.loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, { size: variants.size, style: { position: "absolute" } })
|
|
396
395
|
]
|
|
397
396
|
}
|
|
398
397
|
);
|
|
399
398
|
};
|
|
400
399
|
|
|
400
|
+
// src/theme/recipes/text.css.ts
|
|
401
|
+
var import_createRuntimeFn5 = require("homemade-recipes/createRuntimeFn");
|
|
402
|
+
var textRecipe = (0, import_createRuntimeFn5.createRuntimeFn)((function() {
|
|
403
|
+
var x = { defaultClassName: "text__1y7s4vx0", variantClassNames: { color: { primary: "text_color_primary__1y7s4vx1", secondary: "text_color_secondary__1y7s4vx2", error: "text_color_error__1y7s4vx3", subtle: "text_color_subtle__1y7s4vx4" }, size: { "1": "text_size_1__1y7s4vx5", "2": "text_size_2__1y7s4vx6", "3": "text_size_3__1y7s4vx7", "4": "text_size_4__1y7s4vx8", "5": "text_size_5__1y7s4vx9", "6": "text_size_6__1y7s4vxa", "7": "text_size_7__1y7s4vxb", "8": "text_size_8__1y7s4vxc", "9": "text_size_9__1y7s4vxd" }, weight: { regular: "text_weight_regular__1y7s4vxe", medium: "text_weight_medium__1y7s4vxf", bold: "text_weight_bold__1y7s4vxg" } }, defaultVariants: { size: "3" }, compoundVariants: [], responsiveVariantClassNames: { initial: void 0 }, conditionNames: [], conditions: { xs: "520px", sm: "768px", md: "1024px", lg: "1280px", xl: "1640px" }, identifier: "homemade-recipe__lb053z0", cssCache: [] };
|
|
404
|
+
x.responsiveVariantClassNames.initial = x.variantClassNames;
|
|
405
|
+
return x;
|
|
406
|
+
})());
|
|
407
|
+
|
|
401
408
|
// src/components/text.tsx
|
|
402
|
-
var
|
|
409
|
+
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
403
410
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
404
|
-
var
|
|
411
|
+
var defaultElement = "p";
|
|
405
412
|
var Text = ({ asChild, ...props }) => {
|
|
406
413
|
const [variants, rest] = extractVariantsFromProps(
|
|
407
414
|
props,
|
|
408
415
|
...textRecipe.variants()
|
|
409
416
|
);
|
|
410
417
|
const text = textRecipe(variants);
|
|
411
|
-
const Comp = asChild ?
|
|
412
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Comp, {
|
|
418
|
+
const Comp = asChild ? import_react_slot2.Slot : defaultElement;
|
|
419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Comp, { className: mergeClasses(text, rest.className), ...rest, children: rest.children });
|
|
413
420
|
};
|
|
414
421
|
|
|
415
422
|
// src/theme/styles/toast.css.ts
|
|
@@ -576,7 +583,7 @@ var ToastProvider = ({
|
|
|
576
583
|
}
|
|
577
584
|
) });
|
|
578
585
|
};
|
|
579
|
-
var Toast = (props) => {
|
|
586
|
+
var Toast = ({ ...props }) => {
|
|
580
587
|
const { onOpenChange, toast, id, ...toastProps } = props;
|
|
581
588
|
const ref = React2.useRef(null);
|
|
582
589
|
const context = React2.useContext(ToastContextImpl);
|