@blockle/blocks 0.20.0-alpha1 → 1.0.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/README.md +1 -70
- package/dist/index.cjs +21 -71
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -0
- package/dist/index.spec.d.ts +0 -0
- package/dist/reset.cjs +1 -2
- package/dist/reset.d.ts +0 -2
- package/dist/reset.js +1 -0
- package/package.json +24 -81
- package/LICENSE +0 -21
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.cjs +0 -19
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.mjs +0 -20
- package/dist/components/accessibility/VisuallyHidden/index.cjs +0 -1
- package/dist/components/accessibility/VisuallyHidden/index.mjs +0 -1
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.cjs +0 -15
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.mjs +0 -16
- package/dist/components/display/Divider/Divider.cjs +0 -25
- package/dist/components/display/Divider/Divider.mjs +0 -26
- package/dist/components/display/Divider/divider.css.cjs +0 -15
- package/dist/components/display/Divider/divider.css.mjs +0 -16
- package/dist/components/display/Divider/index.cjs +0 -1
- package/dist/components/display/Divider/index.mjs +0 -1
- package/dist/components/feedback/Progress/Progress.cjs +0 -53
- package/dist/components/feedback/Progress/Progress.mjs +0 -54
- package/dist/components/feedback/Progress/index.cjs +0 -1
- package/dist/components/feedback/Progress/index.mjs +0 -1
- package/dist/components/feedback/Spinner/Spinner.cjs +0 -25
- package/dist/components/feedback/Spinner/Spinner.mjs +0 -26
- package/dist/components/feedback/Spinner/index.cjs +0 -1
- package/dist/components/feedback/Spinner/index.mjs +0 -1
- package/dist/components/form/Button/Button.cjs +0 -58
- package/dist/components/form/Button/Button.css.cjs +0 -15
- package/dist/components/form/Button/Button.css.mjs +0 -16
- package/dist/components/form/Button/Button.mjs +0 -59
- package/dist/components/form/Button/index.cjs +0 -1
- package/dist/components/form/Button/index.mjs +0 -1
- package/dist/components/form/Checkbox/Checkbox.cjs +0 -78
- package/dist/components/form/Checkbox/Checkbox.mjs +0 -79
- package/dist/components/form/Checkbox/checkbox.css.cjs +0 -31
- package/dist/components/form/Checkbox/checkbox.css.mjs +0 -32
- package/dist/components/form/Checkbox/index.cjs +0 -1
- package/dist/components/form/Checkbox/index.mjs +0 -1
- package/dist/components/form/Input/Input.cjs +0 -50
- package/dist/components/form/Input/Input.mjs +0 -51
- package/dist/components/form/Input/index.cjs +0 -1
- package/dist/components/form/Input/index.mjs +0 -1
- package/dist/components/form/Input/input.css.cjs +0 -20
- package/dist/components/form/Input/input.css.mjs +0 -21
- package/dist/components/form/Label/Label.cjs +0 -29
- package/dist/components/form/Label/Label.mjs +0 -30
- package/dist/components/form/Label/index.cjs +0 -1
- package/dist/components/form/Label/index.mjs +0 -1
- package/dist/components/form/Radio/Radio.cjs +0 -47
- package/dist/components/form/Radio/Radio.mjs +0 -48
- package/dist/components/form/Radio/RadioGroup.cjs +0 -1
- package/dist/components/form/Radio/RadioGroup.mjs +0 -1
- package/dist/components/form/Radio/index.cjs +0 -1
- package/dist/components/form/Radio/index.mjs +0 -1
- package/dist/components/form/Radio/radio.css.cjs +0 -31
- package/dist/components/form/Radio/radio.css.mjs +0 -32
- package/dist/components/form/Select/Select.cjs +0 -64
- package/dist/components/form/Select/Select.mjs +0 -65
- package/dist/components/form/Select/index.cjs +0 -1
- package/dist/components/form/Select/index.mjs +0 -1
- package/dist/components/form/Select/select.css.cjs +0 -37
- package/dist/components/form/Select/select.css.mjs +0 -38
- package/dist/components/form/Slider/Slider.cjs +0 -139
- package/dist/components/form/Slider/Slider.mjs +0 -142
- package/dist/components/form/Slider/index.cjs +0 -1
- package/dist/components/form/Slider/index.mjs +0 -1
- package/dist/components/form/Slider/slider.css.cjs +0 -74
- package/dist/components/form/Slider/slider.css.mjs +0 -75
- package/dist/components/form/Slider/usePointerProgress.cjs +0 -44
- package/dist/components/form/Slider/usePointerProgress.mjs +0 -45
- package/dist/components/form/Switch/Switch.cjs +0 -71
- package/dist/components/form/Switch/Switch.mjs +0 -74
- package/dist/components/form/Switch/index.cjs +0 -1
- package/dist/components/form/Switch/index.mjs +0 -1
- package/dist/components/form/Switch/switch.css.cjs +0 -26
- package/dist/components/form/Switch/switch.css.mjs +0 -27
- package/dist/components/layout/Box/Box.cjs +0 -27
- package/dist/components/layout/Box/Box.mjs +0 -28
- package/dist/components/layout/Box/index.cjs +0 -1
- package/dist/components/layout/Box/index.mjs +0 -1
- package/dist/components/layout/Inline/Inline.cjs +0 -29
- package/dist/components/layout/Inline/Inline.mjs +0 -30
- package/dist/components/layout/Inline/index.cjs +0 -1
- package/dist/components/layout/Inline/index.mjs +0 -1
- package/dist/components/layout/Stack/Stack.cjs +0 -29
- package/dist/components/layout/Stack/Stack.mjs +0 -30
- package/dist/components/layout/Stack/index.cjs +0 -1
- package/dist/components/layout/Stack/index.mjs +0 -1
- package/dist/components/navigation/Link/Link.cjs +0 -31
- package/dist/components/navigation/Link/Link.mjs +0 -32
- package/dist/components/navigation/Link/index.cjs +0 -1
- package/dist/components/navigation/Link/index.mjs +0 -1
- package/dist/components/other/BlocksProvider/BlocksProvider.cjs +0 -36
- package/dist/components/other/BlocksProvider/BlocksProvider.mjs +0 -39
- package/dist/components/other/BlocksProvider/context.cjs +0 -4
- package/dist/components/other/BlocksProvider/context.mjs +0 -7
- package/dist/components/other/BlocksProvider/index.cjs +0 -1
- package/dist/components/other/BlocksProvider/index.mjs +0 -1
- package/dist/components/other/Portal/Portal.cjs +0 -7
- package/dist/components/other/Portal/Portal.mjs +0 -8
- package/dist/components/other/Portal/index.cjs +0 -1
- package/dist/components/other/Portal/index.mjs +0 -1
- package/dist/components/overlay/Dialog/Dialog.cjs +0 -77
- package/dist/components/overlay/Dialog/Dialog.mjs +0 -80
- package/dist/components/overlay/Dialog/dialog.css.cjs +0 -21
- package/dist/components/overlay/Dialog/dialog.css.mjs +0 -22
- package/dist/components/overlay/Dialog/dialogHelper.cjs +0 -20
- package/dist/components/overlay/Dialog/dialogHelper.mjs +0 -21
- package/dist/components/overlay/Dialog/index.cjs +0 -1
- package/dist/components/overlay/Dialog/index.mjs +0 -1
- package/dist/components/overlay/Popover/Popover.cjs +0 -111
- package/dist/components/overlay/Popover/Popover.mjs +0 -112
- package/dist/components/overlay/Popover/popover-utils.cjs +0 -61
- package/dist/components/overlay/Popover/popover-utils.mjs +0 -62
- package/dist/components/overlay/Tooltip/Tooltip.cjs +0 -71
- package/dist/components/overlay/Tooltip/Tooltip.mjs +0 -74
- package/dist/components/overlay/Tooltip/index.cjs +0 -1
- package/dist/components/overlay/Tooltip/index.mjs +0 -1
- package/dist/components/typography/Heading/Heading.cjs +0 -23
- package/dist/components/typography/Heading/Heading.mjs +0 -24
- package/dist/components/typography/Heading/heading.css.cjs +0 -15
- package/dist/components/typography/Heading/heading.css.mjs +0 -16
- package/dist/components/typography/Heading/index.cjs +0 -1
- package/dist/components/typography/Heading/index.mjs +0 -1
- package/dist/components/typography/Text/Text.cjs +0 -20
- package/dist/components/typography/Text/Text.mjs +0 -21
- package/dist/components/typography/Text/index.cjs +0 -1
- package/dist/components/typography/Text/index.mjs +0 -1
- package/dist/components/typography/Text/text.css.cjs +0 -15
- package/dist/components/typography/Text/text.css.mjs +0 -16
- package/dist/hooks/useClickOutside/useClickOutside.cjs +0 -22
- package/dist/hooks/useClickOutside/useClickOutside.mjs +0 -23
- package/dist/hooks/useControlledValue/useControlledValue.cjs +0 -31
- package/dist/hooks/useControlledValue/useControlledValue.mjs +0 -32
- package/dist/hooks/useIsomorphicLayoutEffect/index.cjs +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/index.mjs +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +0 -4
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +0 -7
- package/dist/hooks/useKeyboard/index.cjs +0 -1
- package/dist/hooks/useKeyboard/index.mjs +0 -1
- package/dist/hooks/useKeyboard/useKeyboard.cjs +0 -19
- package/dist/hooks/useKeyboard/useKeyboard.mjs +0 -22
- package/dist/hooks/useLayer/index.cjs +0 -1
- package/dist/hooks/useLayer/index.mjs +0 -1
- package/dist/hooks/useLayer/useLayer.cjs +0 -25
- package/dist/hooks/useLayer/useLayer.mjs +0 -26
- package/dist/hooks/usePreventBodyScroll/index.cjs +0 -1
- package/dist/hooks/usePreventBodyScroll/index.mjs +0 -1
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.cjs +0 -29
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.mjs +0 -30
- package/dist/hooks/useRestoreFocus/index.cjs +0 -1
- package/dist/hooks/useRestoreFocus/index.mjs +0 -1
- package/dist/hooks/useRestoreFocus/useRestoreFocus.cjs +0 -17
- package/dist/hooks/useRestoreFocus/useRestoreFocus.mjs +0 -18
- package/dist/hooks/useRootAriaHidden/index.cjs +0 -1
- package/dist/hooks/useRootAriaHidden/index.mjs +0 -1
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.cjs +0 -11
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.mjs +0 -12
- package/dist/hooks/useVisibilityState/index.cjs +0 -1
- package/dist/hooks/useVisibilityState/index.mjs +0 -1
- package/dist/hooks/useVisibilityState/useVisibilityState.cjs +0 -15
- package/dist/hooks/useVisibilityState/useVisibilityState.mjs +0 -16
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +0 -73
- package/dist/lib/asChildRenderer/createAsChildTemplate.cjs +0 -72
- package/dist/lib/asChildRenderer/createAsChildTemplate.mjs +0 -73
- package/dist/lib/css/atoms/atomicProperties.cjs +0 -89
- package/dist/lib/css/atoms/atomicProperties.mjs +0 -90
- package/dist/lib/css/atoms/atoms.cjs +0 -2
- package/dist/lib/css/atoms/atoms.mjs +0 -1
- package/dist/lib/css/atoms/breakpoints.cjs +0 -13
- package/dist/lib/css/atoms/breakpoints.mjs +0 -14
- package/dist/lib/css/atoms/index.cjs +0 -2
- package/dist/lib/css/atoms/index.mjs +0 -1
- package/dist/lib/css/atoms/sprinkles.css.cjs +0 -38
- package/dist/lib/css/atoms/sprinkles.css.mjs +0 -39
- package/dist/lib/css/flexbox/flexbox.cjs +0 -16
- package/dist/lib/css/flexbox/flexbox.mjs +0 -17
- package/dist/lib/css/layers/layers.css.cjs +0 -7
- package/dist/lib/css/layers/layers.css.mjs +0 -8
- package/dist/lib/css/reset/reset.css.cjs +0 -38
- package/dist/lib/css/reset/reset.css.mjs +0 -37
- package/dist/lib/css/style/style.cjs +0 -28
- package/dist/lib/css/style/style.mjs +0 -29
- package/dist/lib/css/utils/cssUtils.cjs +0 -5
- package/dist/lib/css/utils/cssUtils.mjs +0 -6
- package/dist/lib/react/mergeProps.cjs +0 -42
- package/dist/lib/react/mergeProps.mjs +0 -43
- package/dist/lib/react/refs.cjs +0 -16
- package/dist/lib/react/refs.mjs +0 -17
- package/dist/lib/theme/makeComponentTheme.cjs +0 -5
- package/dist/lib/theme/makeComponentTheme.mjs +0 -6
- package/dist/lib/theme/makeTheme.cjs +0 -12
- package/dist/lib/theme/makeTheme.mjs +0 -13
- package/dist/lib/theme/makeVanillaTheme.cjs +0 -19
- package/dist/lib/theme/makeVanillaTheme.mjs +0 -20
- package/dist/lib/theme/store/theme.cjs +0 -92
- package/dist/lib/theme/store/theme.mjs +0 -93
- package/dist/lib/theme/tokens.cjs +0 -81
- package/dist/lib/theme/tokens.mjs +0 -82
- package/dist/lib/theme/vars.css.cjs +0 -9
- package/dist/lib/theme/vars.css.mjs +0 -10
- package/dist/lib/utils/atom-props.cjs +0 -15
- package/dist/lib/utils/atom-props.mjs +0 -16
- package/dist/lib/utils/classnames.cjs +0 -6
- package/dist/lib/utils/classnames.mjs +0 -7
- package/dist/lib/utils/dom.cjs +0 -12
- package/dist/lib/utils/dom.mjs +0 -13
- package/dist/lib/utils/math.cjs +0 -12
- package/dist/lib/utils/math.mjs +0 -13
- package/dist/momotaro.chunk.d.ts +0 -906
- package/dist/reset.d.mts +0 -2
- package/dist/reset.mjs +0 -2
- package/dist/themes/momotaro/components/button.css.cjs +0 -103
- package/dist/themes/momotaro/components/button.css.mjs +0 -104
- package/dist/themes/momotaro/components/checkbox.css.cjs +0 -59
- package/dist/themes/momotaro/components/checkbox.css.mjs +0 -60
- package/dist/themes/momotaro/components/dialog.css.cjs +0 -78
- package/dist/themes/momotaro/components/dialog.css.mjs +0 -79
- package/dist/themes/momotaro/components/divider.css.cjs +0 -15
- package/dist/themes/momotaro/components/divider.css.mjs +0 -16
- package/dist/themes/momotaro/components/helpers.css.cjs +0 -43
- package/dist/themes/momotaro/components/helpers.css.mjs +0 -44
- package/dist/themes/momotaro/components/index.cjs +0 -34
- package/dist/themes/momotaro/components/index.mjs +0 -35
- package/dist/themes/momotaro/components/input.css.cjs +0 -41
- package/dist/themes/momotaro/components/input.css.mjs +0 -42
- package/dist/themes/momotaro/components/label.css.cjs +0 -33
- package/dist/themes/momotaro/components/label.css.mjs +0 -34
- package/dist/themes/momotaro/components/link.css.cjs +0 -53
- package/dist/themes/momotaro/components/link.css.mjs +0 -54
- package/dist/themes/momotaro/components/popover.css.cjs +0 -32
- package/dist/themes/momotaro/components/popover.css.mjs +0 -33
- package/dist/themes/momotaro/components/progress.css.cjs +0 -55
- package/dist/themes/momotaro/components/progress.css.mjs +0 -56
- package/dist/themes/momotaro/components/radio.css.cjs +0 -60
- package/dist/themes/momotaro/components/radio.css.mjs +0 -61
- package/dist/themes/momotaro/components/select.css.cjs +0 -44
- package/dist/themes/momotaro/components/select.css.mjs +0 -45
- package/dist/themes/momotaro/components/slider.css.cjs +0 -89
- package/dist/themes/momotaro/components/slider.css.mjs +0 -90
- package/dist/themes/momotaro/components/spinner.css.cjs +0 -43
- package/dist/themes/momotaro/components/spinner.css.mjs +0 -44
- package/dist/themes/momotaro/components/switch.css.cjs +0 -58
- package/dist/themes/momotaro/components/switch.css.mjs +0 -59
- package/dist/themes/momotaro/components/tooltip.css.cjs +0 -30
- package/dist/themes/momotaro/components/tooltip.css.mjs +0 -31
- package/dist/themes/momotaro/components/transitions.cjs +0 -3
- package/dist/themes/momotaro/components/transitions.mjs +0 -4
- package/dist/themes/momotaro/index.cjs +0 -2
- package/dist/themes/momotaro/index.mjs +0 -1
- package/dist/themes/momotaro/momotaro.css.cjs +0 -13
- package/dist/themes/momotaro/momotaro.css.mjs +0 -14
- package/dist/themes/momotaro/tokens.css.cjs +0 -85
- package/dist/themes/momotaro/tokens.css.mjs +0 -86
- package/dist/themes/momotaro.cjs +0 -4
- package/dist/themes/momotaro.d.mts +0 -1
- package/dist/themes/momotaro.d.ts +0 -1
- package/dist/themes/momotaro.mjs +0 -4
- package/reset/index.d.ts +0 -1
- package/reset/package.json +0 -5
- package/themes/momotaro/index.d.ts +0 -1
- package/themes/momotaro/package.json +0 -5
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
4
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
5
|
-
const components_layout_Box_Box_cjs = require("../../layout/Box/Box.cjs");
|
|
6
|
-
const Spinner = ({
|
|
7
|
-
className,
|
|
8
|
-
size,
|
|
9
|
-
color,
|
|
10
|
-
...restProps
|
|
11
|
-
}) => {
|
|
12
|
-
const spinnerClassName = lib_theme_store_theme_cjs.getComponentStyles("spinner", {
|
|
13
|
-
base: true,
|
|
14
|
-
variants: { size, color }
|
|
15
|
-
});
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
components_layout_Box_Box_cjs.Box,
|
|
18
|
-
{
|
|
19
|
-
color,
|
|
20
|
-
className: lib_utils_classnames_cjs.classnames(spinnerClassName, className),
|
|
21
|
-
...restProps
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
exports.Spinner = Spinner;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
3
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
4
|
-
import { Box } from "../../layout/Box/Box.mjs";
|
|
5
|
-
const Spinner = ({
|
|
6
|
-
className,
|
|
7
|
-
size,
|
|
8
|
-
color,
|
|
9
|
-
...restProps
|
|
10
|
-
}) => {
|
|
11
|
-
const spinnerClassName = getComponentStyles("spinner", {
|
|
12
|
-
base: true,
|
|
13
|
-
variants: { size, color }
|
|
14
|
-
});
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
Box,
|
|
17
|
-
{
|
|
18
|
-
color,
|
|
19
|
-
className: classnames(spinnerClassName, className),
|
|
20
|
-
...restProps
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
Spinner
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_asChildRenderer_createAsChildTemplate_cjs = require("../../../lib/asChildRenderer/createAsChildTemplate.cjs");
|
|
4
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
-
const lib_utils_atomProps_cjs = require("../../../lib/utils/atom-props.cjs");
|
|
6
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
7
|
-
const components_form_Button_Button_css_cjs = require("./Button.css.cjs");
|
|
8
|
-
const components_feedback_Spinner_Spinner_cjs = require("../../feedback/Spinner/Spinner.cjs");
|
|
9
|
-
const lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
10
|
-
const { Template, Slot } = lib_asChildRenderer_createAsChildTemplate_cjs.createAsChildTemplate("button");
|
|
11
|
-
const Button = ({
|
|
12
|
-
asChild,
|
|
13
|
-
children,
|
|
14
|
-
className,
|
|
15
|
-
disabled,
|
|
16
|
-
endSlot,
|
|
17
|
-
intent,
|
|
18
|
-
loading,
|
|
19
|
-
ref,
|
|
20
|
-
size,
|
|
21
|
-
startSlot,
|
|
22
|
-
variant,
|
|
23
|
-
...restProps
|
|
24
|
-
}) => {
|
|
25
|
-
const buttonClassName = lib_theme_store_theme_cjs.getComponentStyles("button", {
|
|
26
|
-
base: true,
|
|
27
|
-
variants: {
|
|
28
|
-
variant,
|
|
29
|
-
intent,
|
|
30
|
-
size,
|
|
31
|
-
disabled,
|
|
32
|
-
loading
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const [atomsProps, otherProps] = lib_utils_atomProps_cjs.getAtomsAndProps(restProps);
|
|
36
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
37
|
-
Template,
|
|
38
|
-
{
|
|
39
|
-
ref,
|
|
40
|
-
asChild,
|
|
41
|
-
disabled: disabled || loading,
|
|
42
|
-
className: lib_utils_classnames_cjs.classnames(
|
|
43
|
-
components_form_Button_Button_css_cjs.buttonReset,
|
|
44
|
-
buttonClassName,
|
|
45
|
-
lib_css_atoms_sprinkles_css_cjs.atoms(atomsProps),
|
|
46
|
-
className
|
|
47
|
-
),
|
|
48
|
-
...otherProps,
|
|
49
|
-
children: [
|
|
50
|
-
startSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { children: startSlot }),
|
|
51
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(components_feedback_Spinner_Spinner_cjs.Spinner, { size }),
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.jsx(Slot, { children }),
|
|
53
|
-
endSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { children: endSlot })
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
exports.Button = Button;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
-
fileScope.setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
6
|
-
const buttonReset = css.style({
|
|
7
|
-
"@layer": {
|
|
8
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
all: "unset",
|
|
10
|
-
cursor: "pointer"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "buttonReset");
|
|
14
|
-
fileScope.endFileScope();
|
|
15
|
-
exports.buttonReset = buttonReset;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.mjs";
|
|
4
|
-
setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
5
|
-
const buttonReset = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
all: "unset",
|
|
9
|
-
cursor: "pointer"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}, "buttonReset");
|
|
13
|
-
endFileScope();
|
|
14
|
-
export {
|
|
15
|
-
buttonReset
|
|
16
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createAsChildTemplate } from "../../../lib/asChildRenderer/createAsChildTemplate.mjs";
|
|
3
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
4
|
-
import { getAtomsAndProps } from "../../../lib/utils/atom-props.mjs";
|
|
5
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
6
|
-
import { buttonReset } from "./Button.css.mjs";
|
|
7
|
-
import { Spinner } from "../../feedback/Spinner/Spinner.mjs";
|
|
8
|
-
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
9
|
-
const { Template, Slot } = createAsChildTemplate("button");
|
|
10
|
-
const Button = ({
|
|
11
|
-
asChild,
|
|
12
|
-
children,
|
|
13
|
-
className,
|
|
14
|
-
disabled,
|
|
15
|
-
endSlot,
|
|
16
|
-
intent,
|
|
17
|
-
loading,
|
|
18
|
-
ref,
|
|
19
|
-
size,
|
|
20
|
-
startSlot,
|
|
21
|
-
variant,
|
|
22
|
-
...restProps
|
|
23
|
-
}) => {
|
|
24
|
-
const buttonClassName = getComponentStyles("button", {
|
|
25
|
-
base: true,
|
|
26
|
-
variants: {
|
|
27
|
-
variant,
|
|
28
|
-
intent,
|
|
29
|
-
size,
|
|
30
|
-
disabled,
|
|
31
|
-
loading
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const [atomsProps, otherProps] = getAtomsAndProps(restProps);
|
|
35
|
-
return /* @__PURE__ */ jsxs(
|
|
36
|
-
Template,
|
|
37
|
-
{
|
|
38
|
-
ref,
|
|
39
|
-
asChild,
|
|
40
|
-
disabled: disabled || loading,
|
|
41
|
-
className: classnames(
|
|
42
|
-
buttonReset,
|
|
43
|
-
buttonClassName,
|
|
44
|
-
atoms(atomsProps),
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...otherProps,
|
|
48
|
-
children: [
|
|
49
|
-
startSlot && /* @__PURE__ */ jsx("div", { children: startSlot }),
|
|
50
|
-
loading && /* @__PURE__ */ jsx(Spinner, { size }),
|
|
51
|
-
/* @__PURE__ */ jsx(Slot, { children }),
|
|
52
|
-
endSlot && /* @__PURE__ */ jsx("div", { children: endSlot })
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
Button
|
|
59
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
6
|
-
const components_form_Label_Label_cjs = require("../Label/Label.cjs");
|
|
7
|
-
const components_form_Checkbox_checkbox_css_cjs = require("./checkbox.css.cjs");
|
|
8
|
-
const Checkbox = ({
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
id,
|
|
12
|
-
name,
|
|
13
|
-
ref,
|
|
14
|
-
required,
|
|
15
|
-
...restProps
|
|
16
|
-
}) => {
|
|
17
|
-
const containerClassName = lib_theme_store_theme_cjs.getComponentStyles(
|
|
18
|
-
"checkbox",
|
|
19
|
-
{ base: true },
|
|
20
|
-
false
|
|
21
|
-
);
|
|
22
|
-
const iconClassName = lib_theme_store_theme_cjs.getComponentStyles("checkbox", { icon: true }, false);
|
|
23
|
-
const labelClassName = lib_theme_store_theme_cjs.getComponentStyles("checkbox", { label: true }, false);
|
|
24
|
-
const reactId = react.useId();
|
|
25
|
-
const inputId = id || reactId;
|
|
26
|
-
const input = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
className: lib_utils_classnames_cjs.classnames(components_form_Checkbox_checkbox_css_cjs.container, containerClassName, className),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
-
"input",
|
|
33
|
-
{
|
|
34
|
-
ref,
|
|
35
|
-
type: "checkbox",
|
|
36
|
-
name,
|
|
37
|
-
id: inputId,
|
|
38
|
-
className: components_form_Checkbox_checkbox_css_cjs.input,
|
|
39
|
-
...restProps
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: lib_utils_classnames_cjs.classnames(components_form_Checkbox_checkbox_css_cjs.icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
if (!children) {
|
|
47
|
-
return input;
|
|
48
|
-
}
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: labelClassName, children: [
|
|
50
|
-
input,
|
|
51
|
-
children && /* @__PURE__ */ jsxRuntime.jsx(components_form_Label_Label_cjs.Label, { required, htmlFor: inputId, children })
|
|
52
|
-
] });
|
|
53
|
-
};
|
|
54
|
-
const DefaultIcon = () => {
|
|
55
|
-
return (
|
|
56
|
-
// TOOD - replace with actual icon component renderer
|
|
57
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
58
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
-
"svg",
|
|
60
|
-
{
|
|
61
|
-
viewBox: "0 0 24 24",
|
|
62
|
-
fill: "none",
|
|
63
|
-
strokeWidth: "1.5",
|
|
64
|
-
stroke: "currentColor",
|
|
65
|
-
style: { width: "1rem", height: "1rem", display: "block" },
|
|
66
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
-
"path",
|
|
68
|
-
{
|
|
69
|
-
strokeLinecap: "round",
|
|
70
|
-
strokeLinejoin: "round",
|
|
71
|
-
d: "m4.5 12.75 6 6 9-13.5"
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
exports.Checkbox = Checkbox;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
4
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
5
|
-
import { Label } from "../Label/Label.mjs";
|
|
6
|
-
import { input, icon, container } from "./checkbox.css.mjs";
|
|
7
|
-
const Checkbox = ({
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
name,
|
|
12
|
-
ref,
|
|
13
|
-
required,
|
|
14
|
-
...restProps
|
|
15
|
-
}) => {
|
|
16
|
-
const containerClassName = getComponentStyles(
|
|
17
|
-
"checkbox",
|
|
18
|
-
{ base: true },
|
|
19
|
-
false
|
|
20
|
-
);
|
|
21
|
-
const iconClassName = getComponentStyles("checkbox", { icon: true }, false);
|
|
22
|
-
const labelClassName = getComponentStyles("checkbox", { label: true }, false);
|
|
23
|
-
const reactId = useId();
|
|
24
|
-
const inputId = id || reactId;
|
|
25
|
-
const input$1 = /* @__PURE__ */ jsxs(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
className: classnames(container, containerClassName, className),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
"input",
|
|
32
|
-
{
|
|
33
|
-
ref,
|
|
34
|
-
type: "checkbox",
|
|
35
|
-
name,
|
|
36
|
-
id: inputId,
|
|
37
|
-
className: input,
|
|
38
|
-
...restProps
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
if (!children) {
|
|
46
|
-
return input$1;
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */ jsxs("span", { className: labelClassName, children: [
|
|
49
|
-
input$1,
|
|
50
|
-
children && /* @__PURE__ */ jsx(Label, { required, htmlFor: inputId, children })
|
|
51
|
-
] });
|
|
52
|
-
};
|
|
53
|
-
const DefaultIcon = () => {
|
|
54
|
-
return (
|
|
55
|
-
// TOOD - replace with actual icon component renderer
|
|
56
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
"svg",
|
|
59
|
-
{
|
|
60
|
-
viewBox: "0 0 24 24",
|
|
61
|
-
fill: "none",
|
|
62
|
-
strokeWidth: "1.5",
|
|
63
|
-
stroke: "currentColor",
|
|
64
|
-
style: { width: "1rem", height: "1rem", display: "block" },
|
|
65
|
-
children: /* @__PURE__ */ jsx(
|
|
66
|
-
"path",
|
|
67
|
-
{
|
|
68
|
-
strokeLinecap: "round",
|
|
69
|
-
strokeLinejoin: "round",
|
|
70
|
-
d: "m4.5 12.75 6 6 9-13.5"
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
Checkbox
|
|
79
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
-
fileScope.setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
6
|
-
const container = css.style({
|
|
7
|
-
"@layer": {
|
|
8
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
position: "relative",
|
|
10
|
-
cursor: "pointer",
|
|
11
|
-
overflow: "hidden"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}, "container");
|
|
15
|
-
const input = css.style({
|
|
16
|
-
position: "absolute",
|
|
17
|
-
inset: 0,
|
|
18
|
-
opacity: 0,
|
|
19
|
-
"@layer": {
|
|
20
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
21
|
-
all: "unset"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}, "input");
|
|
25
|
-
const icon = css.style({
|
|
26
|
-
pointerEvents: "none"
|
|
27
|
-
}, "icon");
|
|
28
|
-
fileScope.endFileScope();
|
|
29
|
-
exports.container = container;
|
|
30
|
-
exports.icon = icon;
|
|
31
|
-
exports.input = input;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.mjs";
|
|
4
|
-
setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
5
|
-
const container = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
position: "relative",
|
|
9
|
-
cursor: "pointer",
|
|
10
|
-
overflow: "hidden"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "container");
|
|
14
|
-
const input = style({
|
|
15
|
-
position: "absolute",
|
|
16
|
-
inset: 0,
|
|
17
|
-
opacity: 0,
|
|
18
|
-
"@layer": {
|
|
19
|
-
[blocksLayer]: {
|
|
20
|
-
all: "unset"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, "input");
|
|
24
|
-
const icon = style({
|
|
25
|
-
pointerEvents: "none"
|
|
26
|
-
}, "icon");
|
|
27
|
-
endFileScope();
|
|
28
|
-
export {
|
|
29
|
-
container,
|
|
30
|
-
icon,
|
|
31
|
-
input
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
6
|
-
const components_form_Input_input_css_cjs = require("./input.css.cjs");
|
|
7
|
-
const components_layout_Box_Box_cjs = require("../../layout/Box/Box.cjs");
|
|
8
|
-
const Input = ({
|
|
9
|
-
className,
|
|
10
|
-
endSlot,
|
|
11
|
-
name,
|
|
12
|
-
placeholder,
|
|
13
|
-
ref,
|
|
14
|
-
startSlot,
|
|
15
|
-
type = "text",
|
|
16
|
-
...restProps
|
|
17
|
-
}) => {
|
|
18
|
-
const id = react.useId();
|
|
19
|
-
const containerClassName = lib_theme_store_theme_cjs.getComponentStyles(
|
|
20
|
-
"input",
|
|
21
|
-
{ container: true },
|
|
22
|
-
false
|
|
23
|
-
);
|
|
24
|
-
const inputClassName = lib_theme_store_theme_cjs.getComponentStyles("input", { input: true });
|
|
25
|
-
return /* @__PURE__ */ jsxRuntime.jsx(components_layout_Box_Box_cjs.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26
|
-
components_layout_Box_Box_cjs.Box,
|
|
27
|
-
{
|
|
28
|
-
display: "flex",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
className: lib_utils_classnames_cjs.classnames(containerClassName, className),
|
|
31
|
-
children: [
|
|
32
|
-
startSlot,
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
-
"input",
|
|
35
|
-
{
|
|
36
|
-
id,
|
|
37
|
-
ref,
|
|
38
|
-
name,
|
|
39
|
-
type,
|
|
40
|
-
placeholder,
|
|
41
|
-
className: lib_utils_classnames_cjs.classnames(components_form_Input_input_css_cjs.input, inputClassName),
|
|
42
|
-
...restProps
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
endSlot
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
) });
|
|
49
|
-
};
|
|
50
|
-
exports.Input = Input;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
4
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
5
|
-
import { input } from "./input.css.mjs";
|
|
6
|
-
import { Box } from "../../layout/Box/Box.mjs";
|
|
7
|
-
const Input = ({
|
|
8
|
-
className,
|
|
9
|
-
endSlot,
|
|
10
|
-
name,
|
|
11
|
-
placeholder,
|
|
12
|
-
ref,
|
|
13
|
-
startSlot,
|
|
14
|
-
type = "text",
|
|
15
|
-
...restProps
|
|
16
|
-
}) => {
|
|
17
|
-
const id = useId();
|
|
18
|
-
const containerClassName = getComponentStyles(
|
|
19
|
-
"input",
|
|
20
|
-
{ container: true },
|
|
21
|
-
false
|
|
22
|
-
);
|
|
23
|
-
const inputClassName = getComponentStyles("input", { input: true });
|
|
24
|
-
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(
|
|
25
|
-
Box,
|
|
26
|
-
{
|
|
27
|
-
display: "flex",
|
|
28
|
-
alignItems: "center",
|
|
29
|
-
className: classnames(containerClassName, className),
|
|
30
|
-
children: [
|
|
31
|
-
startSlot,
|
|
32
|
-
/* @__PURE__ */ jsx(
|
|
33
|
-
"input",
|
|
34
|
-
{
|
|
35
|
-
id,
|
|
36
|
-
ref,
|
|
37
|
-
name,
|
|
38
|
-
type,
|
|
39
|
-
placeholder,
|
|
40
|
-
className: classnames(input, inputClassName),
|
|
41
|
-
...restProps
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
endSlot
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
) });
|
|
48
|
-
};
|
|
49
|
-
export {
|
|
50
|
-
Input
|
|
51
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
-
fileScope.setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
6
|
-
const input = css.style({
|
|
7
|
-
"@layer": {
|
|
8
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
appearance: "none",
|
|
10
|
-
width: "100%",
|
|
11
|
-
selectors: {
|
|
12
|
-
"&:-webkit-autofill": {
|
|
13
|
-
transitionDelay: "9999s"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}, "input");
|
|
19
|
-
fileScope.endFileScope();
|
|
20
|
-
exports.input = input;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.mjs";
|
|
4
|
-
setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
5
|
-
const input = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
appearance: "none",
|
|
9
|
-
width: "100%",
|
|
10
|
-
selectors: {
|
|
11
|
-
"&:-webkit-autofill": {
|
|
12
|
-
transitionDelay: "9999s"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}, "input");
|
|
18
|
-
endFileScope();
|
|
19
|
-
export {
|
|
20
|
-
input
|
|
21
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
4
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
5
|
-
const lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
6
|
-
const Label = ({
|
|
7
|
-
asSpan,
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
required,
|
|
11
|
-
size,
|
|
12
|
-
cursor,
|
|
13
|
-
...restProps
|
|
14
|
-
}) => {
|
|
15
|
-
const Component = asSpan ? "span" : "label";
|
|
16
|
-
const containerClassName = lib_theme_store_theme_cjs.getComponentStyles("label", {
|
|
17
|
-
base: true,
|
|
18
|
-
variants: { required, size }
|
|
19
|
-
});
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
-
Component,
|
|
22
|
-
{
|
|
23
|
-
className: lib_utils_classnames_cjs.classnames(containerClassName, className, lib_css_atoms_sprinkles_css_cjs.atoms({ cursor })),
|
|
24
|
-
...restProps,
|
|
25
|
-
children
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
exports.Label = Label;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
3
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
4
|
-
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
5
|
-
const Label = ({
|
|
6
|
-
asSpan,
|
|
7
|
-
children,
|
|
8
|
-
className,
|
|
9
|
-
required,
|
|
10
|
-
size,
|
|
11
|
-
cursor,
|
|
12
|
-
...restProps
|
|
13
|
-
}) => {
|
|
14
|
-
const Component = asSpan ? "span" : "label";
|
|
15
|
-
const containerClassName = getComponentStyles("label", {
|
|
16
|
-
base: true,
|
|
17
|
-
variants: { required, size }
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
Component,
|
|
21
|
-
{
|
|
22
|
-
className: classnames(containerClassName, className, atoms({ cursor })),
|
|
23
|
-
...restProps,
|
|
24
|
-
children
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
Label
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|