@blockle/blocks 0.18.4 → 0.19.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.
Files changed (27) hide show
  1. package/dist/index.cjs +25 -9
  2. package/dist/index.mjs +25 -9
  3. package/dist/momotaro.chunk.d.ts +52 -314
  4. package/dist/styles/components/display/Divider/Divider.cjs +48 -35
  5. package/dist/styles/components/display/Divider/Divider.mjs +49 -36
  6. package/dist/styles/components/form/Button/Button.cjs +9 -9
  7. package/dist/styles/components/form/Button/Button.mjs +9 -9
  8. package/dist/styles/components/form/Checkbox/Checkbox.cjs +10 -2
  9. package/dist/styles/components/form/Checkbox/Checkbox.mjs +12 -4
  10. package/dist/styles/components/form/Input/Input.cjs +11 -2
  11. package/dist/styles/components/form/Input/Input.mjs +12 -3
  12. package/dist/styles/components/form/Radio/Radio.cjs +2 -3
  13. package/dist/styles/components/form/Radio/Radio.mjs +3 -4
  14. package/dist/styles/components/form/Select/Select.cjs +9 -3
  15. package/dist/styles/components/form/Select/Select.mjs +10 -4
  16. package/dist/styles/components/form/Slider/Slider.cjs +5 -1
  17. package/dist/styles/components/form/Slider/Slider.mjs +6 -2
  18. package/dist/styles/components/form/Switch/Switch.cjs +9 -2
  19. package/dist/styles/components/form/Switch/Switch.mjs +11 -4
  20. package/dist/styles/components/typography/Text/Text.cjs +14 -4
  21. package/dist/styles/components/typography/Text/Text.mjs +14 -4
  22. package/dist/styles/lib/css/atoms/sprinkles.css.mjs +1 -1
  23. package/dist/styles/themes/momotaro/components/button.css.mjs +1 -1
  24. package/dist/styles/themes/momotaro/components/helpers.css.mjs +1 -1
  25. package/dist/styles/themes/momotaro/components/progress.css.mjs +1 -1
  26. package/dist/styles/themes/momotaro/components/spinner.css.mjs +1 -1
  27. package/package.json +34 -34
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
3
3
  import { divider } from "./divider.css.mjs";
4
- import { createContext, useContext, forwardRef, Children, isValidElement, cloneElement } from "react";
4
+ import { createContext, useContext, Children, isValidElement, cloneElement } from "react";
5
5
  import { getAtomsAndProps } from "../../../lib/utils/atom-props.mjs";
6
6
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
7
7
  const BlocksProviderContext = createContext(null);
@@ -84,6 +84,20 @@ const useComponentStyleDefaultProps = (name) => {
84
84
  }
85
85
  return component.defaultVariants ?? {};
86
86
  };
87
+ function setRef(ref, value) {
88
+ if (typeof ref === "function") {
89
+ ref(value);
90
+ } else if (ref !== null && ref !== void 0) {
91
+ ref.current = value;
92
+ }
93
+ }
94
+ function composeRefs(...refs) {
95
+ return (node) => {
96
+ for (const ref of refs) {
97
+ setRef(ref, node);
98
+ }
99
+ };
100
+ }
87
101
  function mergeProps(slotProps, childProps) {
88
102
  const overrideProps = {};
89
103
  for (const propName in childProps) {
@@ -101,33 +115,35 @@ function mergeProps(slotProps, childProps) {
101
115
  childPropValue(...args);
102
116
  slotPropValue(...args);
103
117
  };
104
- } else if (propName === "style") {
105
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
106
- } else if (propName === "className") {
107
- overrideProps[propName] = classnames(slotPropValue, childPropValue);
108
- } else {
109
- overrideProps[propName] = childPropValue;
110
- }
118
+ } else
119
+ switch (propName) {
120
+ case "style": {
121
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
122
+ break;
123
+ }
124
+ case "className": {
125
+ overrideProps[propName] = classnames(slotPropValue, childPropValue);
126
+ break;
127
+ }
128
+ case "ref": {
129
+ overrideProps[propName] = composeRefs(slotPropValue, childPropValue);
130
+ break;
131
+ }
132
+ default: {
133
+ overrideProps[propName] = childPropValue;
134
+ }
135
+ }
111
136
  }
112
137
  return { ...slotProps, ...overrideProps };
113
138
  }
114
- function setRef(ref, value) {
115
- if (typeof ref === "function") {
116
- ref(value);
117
- } else if (ref !== null && ref !== void 0) {
118
- ref.current = value;
119
- }
120
- }
121
- function composeRefs(...refs) {
122
- return (node) => {
123
- for (const ref of refs) {
124
- setRef(ref, node);
125
- }
126
- };
127
- }
128
139
  function createAsChildTemplate(defaultElement) {
129
140
  const Tag = defaultElement;
130
- const Template2 = forwardRef(function Template22({ asChild, children, ...rootProps }, ref) {
141
+ const Template2 = ({
142
+ asChild,
143
+ children,
144
+ ref,
145
+ ...rootProps
146
+ }) => {
131
147
  if (!asChild) {
132
148
  const tagProps = { ref, ...rootProps };
133
149
  return /* @__PURE__ */ jsx(Tag, { ...tagProps, children });
@@ -146,7 +162,7 @@ function createAsChildTemplate(defaultElement) {
146
162
  }
147
163
  return null;
148
164
  }
149
- if (!isValidElement(slot)) {
165
+ if (!isValidElementWithChildren(slot)) {
150
166
  return null;
151
167
  }
152
168
  if (!isValidElement(slot.props.children)) {
@@ -159,36 +175,33 @@ function createAsChildTemplate(defaultElement) {
159
175
  }
160
176
  return null;
161
177
  }
162
- if (!isValidElement(slot.props.children)) {
178
+ if (!isValidElementWithChildren(slot.props.children)) {
163
179
  return null;
164
180
  }
165
181
  const nextChildren = [...childrenArray];
166
182
  if (nextChildren.length === 1 && !slot.props.children.props.children) {
167
- return cloneElement(slot.props.children, {
168
- ...mergeProps(rootProps, slot.props.children.props),
169
- ref: composeRefs(ref, slot.props.children.ref)
170
- });
183
+ return cloneElement(slot.props.children, mergeProps(rootProps, slot.props.children.props));
171
184
  }
172
185
  nextChildren[slotIndex] = slot.props.children.props.children;
173
186
  return cloneElement(
174
187
  slot.props.children,
175
- {
176
- ...mergeProps(rootProps, slot.props.children.props),
177
- ref: composeRefs(ref, slot.props.children.ref)
178
- },
188
+ mergeProps(rootProps, slot.props.children.props),
179
189
  nextChildren
180
190
  );
181
- });
191
+ };
182
192
  return {
183
193
  Template: Template2,
184
194
  Slot: Slot$1
185
195
  };
186
196
  }
197
+ function isValidElementWithChildren(child) {
198
+ return isValidElement(child) && !!child.props;
199
+ }
187
200
  const Slot$1 = ({ children }) => {
188
201
  return children;
189
202
  };
190
203
  const { Template, Slot } = createAsChildTemplate("div");
191
- const Box = forwardRef(function Box2({ asChild, className, children, ...restProps }, ref) {
204
+ const Box = ({ asChild, className, children, ref, ...restProps }) => {
192
205
  const [atomsProps, otherProps] = getAtomsAndProps(restProps);
193
206
  return /* @__PURE__ */ jsx(
194
207
  Template,
@@ -200,7 +213,7 @@ const Box = forwardRef(function Box2({ asChild, className, children, ...restProp
200
213
  children: /* @__PURE__ */ jsx(Slot, { children })
201
214
  }
202
215
  );
203
- });
216
+ };
204
217
  const Divider = ({ className, color, ...restProps }) => {
205
218
  const dividerClass = useComponentStyles("divider", { base: true });
206
219
  const dividerDefaults = useComponentStyleDefaultProps("divider");
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("react");
4
3
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
5
4
  const styles_lib_utils_atomProps_cjs = require("../../../lib/utils/atom-props.cjs");
6
5
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
@@ -11,19 +10,20 @@ const Spinner = ({ className, size, color, ...restProps }) => {
11
10
  return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { color, className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(spinnerClassName, className), ...restProps });
12
11
  };
13
12
  const { Template, Slot } = styles_components_display_Divider_Divider_cjs.createAsChildTemplate("button");
14
- const Button = react.forwardRef(function Button2({
13
+ const Button = ({
14
+ asChild,
15
15
  children,
16
16
  className,
17
- variant,
17
+ disabled,
18
+ endSlot,
18
19
  intent,
20
+ loading,
21
+ ref,
19
22
  size,
20
23
  startSlot,
21
- endSlot,
22
- loading,
23
- disabled,
24
- asChild,
24
+ variant,
25
25
  ...restProps
26
- }, ref) {
26
+ }) => {
27
27
  const buttonClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("button", {
28
28
  base: true,
29
29
  variants: {
@@ -51,6 +51,6 @@ const Button = react.forwardRef(function Button2({
51
51
  ]
52
52
  }
53
53
  );
54
- });
54
+ };
55
55
  exports.Button = Button;
56
56
  exports.Spinner = Spinner;
@@ -1,5 +1,4 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { useComponentStyles, Box, createAsChildTemplate } from "../../display/Divider/Divider.mjs";
4
3
  import { getAtomsAndProps } from "../../../lib/utils/atom-props.mjs";
5
4
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
@@ -10,19 +9,20 @@ const Spinner = ({ className, size, color, ...restProps }) => {
10
9
  return /* @__PURE__ */ jsx(Box, { color, className: classnames(spinnerClassName, className), ...restProps });
11
10
  };
12
11
  const { Template, Slot } = createAsChildTemplate("button");
13
- const Button = forwardRef(function Button2({
12
+ const Button = ({
13
+ asChild,
14
14
  children,
15
15
  className,
16
- variant,
16
+ disabled,
17
+ endSlot,
17
18
  intent,
19
+ loading,
20
+ ref,
18
21
  size,
19
22
  startSlot,
20
- endSlot,
21
- loading,
22
- disabled,
23
- asChild,
23
+ variant,
24
24
  ...restProps
25
- }, ref) {
25
+ }) => {
26
26
  const buttonClassName = useComponentStyles("button", {
27
27
  base: true,
28
28
  variants: {
@@ -50,7 +50,7 @@ const Button = forwardRef(function Button2({
50
50
  ]
51
51
  }
52
52
  );
53
- });
53
+ };
54
54
  export {
55
55
  Button,
56
56
  Spinner
@@ -28,7 +28,15 @@ const Label = ({
28
28
  }
29
29
  );
30
30
  };
31
- const Checkbox = react.forwardRef(function Checkbox2({ name, id, children, required, className, ...restProps }, ref) {
31
+ const Checkbox = ({
32
+ children,
33
+ className,
34
+ id,
35
+ name,
36
+ ref,
37
+ required,
38
+ ...restProps
39
+ }) => {
32
40
  const containerClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { base: true }, false);
33
41
  const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { icon: true }, false);
34
42
  const labelClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { label: true }, false);
@@ -55,7 +63,7 @@ const Checkbox = react.forwardRef(function Checkbox2({ name, id, children, requi
55
63
  input,
56
64
  children && /* @__PURE__ */ jsxRuntime.jsx(Label, { required, htmlFor: inputId, children })
57
65
  ] });
58
- });
66
+ };
59
67
  const DefaultIcon = () => {
60
68
  return (
61
69
  // TOOD - replace with actual icon component renderer
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useId } from "react";
2
+ import { useId } from "react";
3
3
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
4
  import { useComponentStyles } from "../../display/Divider/Divider.mjs";
5
5
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
6
- import { container, input, icon } from "./checkbox.css.mjs";
6
+ import { input, icon, container } from "./checkbox.css.mjs";
7
7
  const Label = ({
8
8
  asSpan,
9
9
  children,
@@ -27,7 +27,15 @@ const Label = ({
27
27
  }
28
28
  );
29
29
  };
30
- const Checkbox = forwardRef(function Checkbox2({ name, id, children, required, className, ...restProps }, ref) {
30
+ const Checkbox = ({
31
+ children,
32
+ className,
33
+ id,
34
+ name,
35
+ ref,
36
+ required,
37
+ ...restProps
38
+ }) => {
31
39
  const containerClassName = useComponentStyles("checkbox", { base: true }, false);
32
40
  const iconClassName = useComponentStyles("checkbox", { icon: true }, false);
33
41
  const labelClassName = useComponentStyles("checkbox", { label: true }, false);
@@ -54,7 +62,7 @@ const Checkbox = forwardRef(function Checkbox2({ name, id, children, required, c
54
62
  input$1,
55
63
  children && /* @__PURE__ */ jsx(Label, { required, htmlFor: inputId, children })
56
64
  ] });
57
- });
65
+ };
58
66
  const DefaultIcon = () => {
59
67
  return (
60
68
  // TOOD - replace with actual icon component renderer
@@ -4,7 +4,16 @@ const react = require("react");
4
4
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
5
5
  const styles_components_form_Input_input_css_cjs = require("./input.css.cjs");
6
6
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
7
- const Input = react.forwardRef(function Input2({ className, name, type = "text", startSlot, endSlot, placeholder, ...restProps }, ref) {
7
+ const Input = ({
8
+ className,
9
+ endSlot,
10
+ name,
11
+ placeholder,
12
+ ref,
13
+ startSlot,
14
+ type = "text",
15
+ ...restProps
16
+ }) => {
8
17
  const id = react.useId();
9
18
  const containerClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("input", { container: true }, false);
10
19
  const inputClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("input", { input: true });
@@ -24,5 +33,5 @@ const Input = react.forwardRef(function Input2({ className, name, type = "text",
24
33
  ),
25
34
  endSlot
26
35
  ] }) });
27
- });
36
+ };
28
37
  exports.Input = Input;
@@ -1,9 +1,18 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useId } from "react";
2
+ import { useId } from "react";
3
3
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
4
  import { input } from "./input.css.mjs";
5
5
  import { useComponentStyles, Box } from "../../display/Divider/Divider.mjs";
6
- const Input = forwardRef(function Input2({ className, name, type = "text", startSlot, endSlot, placeholder, ...restProps }, ref) {
6
+ const Input = ({
7
+ className,
8
+ endSlot,
9
+ name,
10
+ placeholder,
11
+ ref,
12
+ startSlot,
13
+ type = "text",
14
+ ...restProps
15
+ }) => {
7
16
  const id = useId();
8
17
  const containerClassName = useComponentStyles("input", { container: true }, false);
9
18
  const inputClassName = useComponentStyles("input", { input: true });
@@ -23,7 +32,7 @@ const Input = forwardRef(function Input2({ className, name, type = "text", start
23
32
  ),
24
33
  endSlot
25
34
  ] }) });
26
- });
35
+ };
27
36
  export {
28
37
  Input
29
38
  };
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("react");
4
3
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
5
4
  const styles_components_form_Radio_radio_css_cjs = require("./radio.css.cjs");
6
5
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
7
6
  const styles_components_form_Checkbox_Checkbox_cjs = require("../Checkbox/Checkbox.cjs");
8
- const Radio = react.forwardRef(function Checkbox({ name, children, className, ...restProps }, ref) {
7
+ const Radio = ({ name, children, className, ref, ...restProps }) => {
9
8
  const containerClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("radio", { base: true }, false);
10
9
  const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("radio", { icon: true }, false);
11
10
  const labelClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { label: true }, false);
@@ -20,5 +19,5 @@ const Radio = react.forwardRef(function Checkbox({ name, children, className, ..
20
19
  input,
21
20
  /* @__PURE__ */ jsxRuntime.jsx(styles_components_form_Checkbox_Checkbox_cjs.Label, { asSpan: true, children })
22
21
  ] });
23
- });
22
+ };
24
23
  exports.Radio = Radio;
@@ -1,10 +1,9 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
- import { container, input, icon } from "./radio.css.mjs";
3
+ import { input, icon, container } from "./radio.css.mjs";
5
4
  import { useComponentStyles } from "../../display/Divider/Divider.mjs";
6
5
  import { Label } from "../Checkbox/Checkbox.mjs";
7
- const Radio = forwardRef(function Checkbox({ name, children, className, ...restProps }, ref) {
6
+ const Radio = ({ name, children, className, ref, ...restProps }) => {
8
7
  const containerClassName = useComponentStyles("radio", { base: true }, false);
9
8
  const iconClassName = useComponentStyles("radio", { icon: true }, false);
10
9
  const labelClassName = useComponentStyles("checkbox", { label: true }, false);
@@ -19,7 +18,7 @@ const Radio = forwardRef(function Checkbox({ name, children, className, ...restP
19
18
  input$1,
20
19
  /* @__PURE__ */ jsx(Label, { asSpan: true, children })
21
20
  ] });
22
- });
21
+ };
23
22
  export {
24
23
  Radio
25
24
  };
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("react");
4
3
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
5
4
  const styles_components_form_Select_select_css_cjs = require("./select.css.cjs");
6
5
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
7
- const Select = react.forwardRef(function Select2({ children, placeholder, className, variant, ...restProps }, ref) {
6
+ const Select = ({
7
+ children,
8
+ placeholder,
9
+ className,
10
+ variant,
11
+ ref,
12
+ ...restProps
13
+ }) => {
8
14
  const wrapperClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { wrapper: true }, false);
9
15
  const selectClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { select: true, variants: { variant } });
10
16
  const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { icon: true }, false);
@@ -23,7 +29,7 @@ const Select = react.forwardRef(function Select2({ children, placeholder, classN
23
29
  ),
24
30
  /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(styles_components_form_Select_select_css_cjs.icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
25
31
  ] });
26
- });
32
+ };
27
33
  const DefaultIcon = () => {
28
34
  return (
29
35
  // TOOD - replace with actual icon component renderer
@@ -1,9 +1,15 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
- import { wrapper, select, icon } from "./select.css.mjs";
3
+ import { select, icon, wrapper } from "./select.css.mjs";
5
4
  import { useComponentStyles, Box } from "../../display/Divider/Divider.mjs";
6
- const Select = forwardRef(function Select2({ children, placeholder, className, variant, ...restProps }, ref) {
5
+ const Select = ({
6
+ children,
7
+ placeholder,
8
+ className,
9
+ variant,
10
+ ref,
11
+ ...restProps
12
+ }) => {
7
13
  const wrapperClassName = useComponentStyles("select", { wrapper: true }, false);
8
14
  const selectClassName = useComponentStyles("select", { select: true, variants: { variant } });
9
15
  const iconClassName = useComponentStyles("select", { icon: true }, false);
@@ -22,7 +28,7 @@ const Select = forwardRef(function Select2({ children, placeholder, className, v
22
28
  ),
23
29
  /* @__PURE__ */ jsx(Box, { className: classnames(icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
24
30
  ] });
25
- });
31
+ };
26
32
  const DefaultIcon = () => {
27
33
  return (
28
34
  // TOOD - replace with actual icon component renderer
@@ -48,7 +48,11 @@ function getProgress(event, rect) {
48
48
  const y = (clientY - top) / height;
49
49
  return [x, y];
50
50
  }
51
- function usePointerProgress({ container, orientation, onChange }) {
51
+ function usePointerProgress({
52
+ container,
53
+ orientation,
54
+ onChange
55
+ }) {
52
56
  react.useEffect(() => {
53
57
  const element = container.current;
54
58
  function pointerdown(event) {
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useCallback, useEffect, useRef } from "react";
3
3
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
- import { containerVertical, container, track, filledTrack, thumb } from "./slider.css.mjs";
4
+ import { filledTrack, track, thumb, containerVertical, container } from "./slider.css.mjs";
5
5
  import { useComponentStyles } from "../../display/Divider/Divider.mjs";
6
6
  function useControlledValue({
7
7
  defaultValue,
@@ -47,7 +47,11 @@ function getProgress(event, rect) {
47
47
  const y = (clientY - top) / height;
48
48
  return [x, y];
49
49
  }
50
- function usePointerProgress({ container: container2, orientation, onChange }) {
50
+ function usePointerProgress({
51
+ container: container2,
52
+ orientation,
53
+ onChange
54
+ }) {
51
55
  useEffect(() => {
52
56
  const element = container2.current;
53
57
  function pointerdown(event) {
@@ -4,7 +4,14 @@ const react = require("react");
4
4
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
5
5
  const styles_components_form_Switch_switch_css_cjs = require("./switch.css.cjs");
6
6
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
7
- const Switch = react.forwardRef(function Switch2({ className, checked, onChange, defaultChecked, ...restProps }, ref) {
7
+ const Switch = ({
8
+ checked,
9
+ className,
10
+ defaultChecked,
11
+ onChange,
12
+ ref,
13
+ ...restProps
14
+ }) => {
8
15
  const [isChecked, setIsChecked] = react.useState(defaultChecked || checked || false);
9
16
  const baseClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("switch", { base: true });
10
17
  const sliderClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("switch", { slider: true }, false);
@@ -58,5 +65,5 @@ const Switch = react.forwardRef(function Switch2({ className, checked, onChange,
58
65
  ]
59
66
  }
60
67
  ) });
61
- });
68
+ };
62
69
  exports.Switch = Switch;
@@ -1,9 +1,16 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useState, useEffect, useCallback } from "react";
2
+ import { useState, useEffect, useCallback } from "react";
3
3
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
- import { container, input } from "./switch.css.mjs";
4
+ import { input, container } from "./switch.css.mjs";
5
5
  import { useComponentStyles } from "../../display/Divider/Divider.mjs";
6
- const Switch = forwardRef(function Switch2({ className, checked, onChange, defaultChecked, ...restProps }, ref) {
6
+ const Switch = ({
7
+ checked,
8
+ className,
9
+ defaultChecked,
10
+ onChange,
11
+ ref,
12
+ ...restProps
13
+ }) => {
7
14
  const [isChecked, setIsChecked] = useState(defaultChecked || checked || false);
8
15
  const baseClassName = useComponentStyles("switch", { base: true });
9
16
  const sliderClassName = useComponentStyles("switch", { slider: true }, false);
@@ -57,7 +64,7 @@ const Switch = forwardRef(function Switch2({ className, checked, onChange, defau
57
64
  ]
58
65
  }
59
66
  ) });
60
- });
67
+ };
61
68
  export {
62
69
  Switch
63
70
  };
@@ -1,10 +1,20 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("react");
4
3
  const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
5
4
  const styles_components_typography_Text_text_css_cjs = require("./text.css.cjs");
6
5
  const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
7
- const Text = react.forwardRef(function Text2({ tag: Tag = "span", asChild, children, className, ...restProps }, ref) {
8
- return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { ref, asChild: true, className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(styles_components_typography_Text_text_css_cjs.text, className), ...restProps, children: asChild ? children : /* @__PURE__ */ jsxRuntime.jsx(Tag, { children }) });
9
- });
6
+ const Text = ({
7
+ asChild,
8
+ children,
9
+ className,
10
+ ref,
11
+ tag,
12
+ ...restProps
13
+ }) => {
14
+ const Component = tag ?? "span";
15
+ return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { asChild: true, className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(styles_components_typography_Text_text_css_cjs.text, className), ...restProps, children: asChild ? children : (
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, children })
18
+ ) });
19
+ };
10
20
  exports.Text = Text;
@@ -1,11 +1,21 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
4
3
  import { text } from "./text.css.mjs";
5
4
  import { Box } from "../../display/Divider/Divider.mjs";
6
- const Text = forwardRef(function Text2({ tag: Tag = "span", asChild, children, className, ...restProps }, ref) {
7
- return /* @__PURE__ */ jsx(Box, { ref, asChild: true, className: classnames(text, className), ...restProps, children: asChild ? children : /* @__PURE__ */ jsx(Tag, { children }) });
8
- });
5
+ const Text = ({
6
+ asChild,
7
+ children,
8
+ className,
9
+ ref,
10
+ tag,
11
+ ...restProps
12
+ }) => {
13
+ const Component = tag ?? "span";
14
+ return /* @__PURE__ */ jsx(Box, { asChild: true, className: classnames(text, className), ...restProps, children: asChild ? children : (
15
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
+ /* @__PURE__ */ jsx(Component, { ref, children })
17
+ ) });
18
+ };
9
19
  export {
10
20
  Text
11
21
  };
@@ -1,7 +1,7 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { defineProperties, createSprinkles } from "@vanilla-extract/sprinkles";
3
3
  import { unresponsiveProperties, responsiveProperties } from "./atomicProperties.mjs";
4
- import { minMediaQuery, breakpointNames } from "./breakpoints.mjs";
4
+ import { breakpointNames, minMediaQuery } from "./breakpoints.mjs";
5
5
  setFileScope("src/lib/css/atoms/sprinkles.css.ts", "@blockle/blocks");
6
6
  const unresponsiveAtomicProperties = defineProperties({
7
7
  properties: unresponsiveProperties,
@@ -3,7 +3,7 @@ import { createVar } from "@vanilla-extract/css";
3
3
  import { style } from "../../../lib/css/style/style.mjs";
4
4
  import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
5
5
  import { vars } from "../../../lib/theme/vars.css.mjs";
6
- import { clickable, focusRingColor } from "./helpers.css.mjs";
6
+ import { focusRingColor, clickable } from "./helpers.css.mjs";
7
7
  setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
8
8
  const intentColor = createVar("intentColor");
9
9
  const hoverBackgroundColor = createVar("hoverBackgroundColor");
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { createVar, style, fallbackVar } from "@vanilla-extract/css";
2
+ import { style, fallbackVar, createVar } from "@vanilla-extract/css";
3
3
  import { vars } from "../../../lib/theme/vars.css.mjs";
4
4
  setFileScope("src/themes/momotaro/components/helpers.css.ts", "@blockle/blocks");
5
5
  const focusRingColor = createVar("focusRingColor");
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { keyframes, style } from "@vanilla-extract/css";
2
+ import { style, keyframes } from "@vanilla-extract/css";
3
3
  import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
4
4
  import { vars } from "../../../lib/theme/vars.css.mjs";
5
5
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { keyframes, style } from "@vanilla-extract/css";
2
+ import { style, keyframes } from "@vanilla-extract/css";
3
3
  import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
4
4
  setFileScope("src/themes/momotaro/components/spinner.css.ts", "@blockle/blocks");
5
5
  const spinAnimation = keyframes({