@yamada-ui/checkbox 0.1.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/index.js ADDED
@@ -0,0 +1,543 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Checkbox: () => Checkbox,
24
+ CheckboxGroup: () => CheckboxGroup,
25
+ CheckboxIcon: () => CheckboxIcon,
26
+ useCheckbox: () => useCheckbox,
27
+ useCheckboxGroup: () => useCheckboxGroup,
28
+ useCheckboxGroupContext: () => useCheckboxGroupContext
29
+ });
30
+ module.exports = __toCommonJS(src_exports);
31
+
32
+ // src/checkbox.tsx
33
+ var import_core = require("@yamada-ui/core");
34
+ var import_form_control = require("@yamada-ui/form-control");
35
+ var import_motion = require("@yamada-ui/motion");
36
+ var import_use_focus_visible = require("@yamada-ui/use-focus-visible");
37
+ var import_utils = require("@yamada-ui/utils");
38
+ var import_react = require("react");
39
+ var import_jsx_runtime = require("react/jsx-runtime");
40
+ var useCheckbox = (props) => {
41
+ const {
42
+ id,
43
+ name,
44
+ value,
45
+ defaultChecked,
46
+ tabIndex,
47
+ required,
48
+ disabled,
49
+ readOnly,
50
+ isIndeterminate,
51
+ ...rest
52
+ } = (0, import_form_control.useFormControlProps)(props);
53
+ const [isFocusVisible, setIsFocusVisible] = (0, import_react.useState)(false);
54
+ const [isFocused, setFocused] = (0, import_react.useState)(false);
55
+ const [isHovered, setHovered] = (0, import_react.useState)(false);
56
+ const [isActive, setActive] = (0, import_react.useState)(false);
57
+ const inputRef = (0, import_react.useRef)(null);
58
+ const [isLabel, setIsLabel] = (0, import_react.useState)(true);
59
+ const [isChecked, setIsChecked] = (0, import_react.useState)(!!defaultChecked);
60
+ const isControlled = props.isChecked !== void 0;
61
+ const checked = isControlled ? props.isChecked : isChecked;
62
+ const onChange = (0, import_utils.useCallbackRef)(
63
+ (ev) => {
64
+ var _a;
65
+ if (readOnly || disabled) {
66
+ ev.preventDefault();
67
+ return;
68
+ }
69
+ if (!isControlled)
70
+ setIsChecked(!checked || isIndeterminate ? true : ev.target.checked);
71
+ (_a = rest.onChange) == null ? void 0 : _a.call(rest, ev);
72
+ },
73
+ [readOnly, disabled, isControlled, checked, isIndeterminate]
74
+ );
75
+ const onBlur = (0, import_utils.useCallbackRef)(rest.onBlur);
76
+ const onFocus = (0, import_utils.useCallbackRef)(rest.onFocus);
77
+ const onKeyDown = (0, import_react.useCallback)(
78
+ ({ key }) => {
79
+ if (key === " ")
80
+ setActive(true);
81
+ },
82
+ [setActive]
83
+ );
84
+ const onKeyUp = (0, import_react.useCallback)(
85
+ ({ key }) => {
86
+ if (key === " ")
87
+ setActive(false);
88
+ },
89
+ [setActive]
90
+ );
91
+ (0, import_react.useEffect)(() => {
92
+ return (0, import_use_focus_visible.trackFocusVisible)(setIsFocusVisible);
93
+ }, []);
94
+ (0, import_utils.useSafeLayoutEffect)(() => {
95
+ if (inputRef.current)
96
+ inputRef.current.indeterminate = Boolean(isIndeterminate);
97
+ }, [isIndeterminate]);
98
+ (0, import_utils.useUpdateEffect)(() => {
99
+ if (disabled)
100
+ setFocused(false);
101
+ }, [disabled, setFocused]);
102
+ (0, import_utils.useSafeLayoutEffect)(() => {
103
+ var _a;
104
+ if (!((_a = inputRef.current) == null ? void 0 : _a.form))
105
+ return;
106
+ inputRef.current.form.onreset = () => setIsChecked(!!defaultChecked);
107
+ }, []);
108
+ (0, import_utils.useSafeLayoutEffect)(() => {
109
+ if (!inputRef.current)
110
+ return;
111
+ if (inputRef.current.checked !== checked)
112
+ setIsChecked(inputRef.current.checked);
113
+ }, [inputRef.current]);
114
+ const getContainerProps = (0, import_react.useCallback)(
115
+ (props2 = {}, ref = null) => ({
116
+ ...(0, import_utils.pickObject)(rest, import_form_control.formControlProperties),
117
+ ...props2,
118
+ ref: (0, import_utils.mergeRefs)(ref, (el) => {
119
+ if (el)
120
+ setIsLabel(el.tagName === "LABEL");
121
+ }),
122
+ "data-checked": (0, import_utils.dataAttr)(checked),
123
+ onClick: (0, import_utils.handlerAll)(props2.onClick, () => {
124
+ var _a;
125
+ if (isLabel)
126
+ return;
127
+ (_a = inputRef.current) == null ? void 0 : _a.click();
128
+ requestAnimationFrame(() => {
129
+ var _a2;
130
+ return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
131
+ });
132
+ })
133
+ }),
134
+ [checked, isLabel, rest]
135
+ );
136
+ const getIconProps = (0, import_react.useCallback)(
137
+ (props2 = {}, ref = null) => ({
138
+ ...(0, import_utils.pickObject)(rest, import_form_control.formControlProperties),
139
+ ...props2,
140
+ ref,
141
+ "data-active": (0, import_utils.dataAttr)(isActive),
142
+ "data-hover": (0, import_utils.dataAttr)(isHovered),
143
+ "data-checked": (0, import_utils.dataAttr)(checked),
144
+ "data-focus": (0, import_utils.dataAttr)(isFocused),
145
+ "data-focus-visible": (0, import_utils.dataAttr)(isFocused && isFocusVisible),
146
+ "data-indeterminate": (0, import_utils.dataAttr)(isIndeterminate),
147
+ "aria-hidden": true,
148
+ onMouseDown: (0, import_utils.handlerAll)(props2.onMouseDown, (ev) => {
149
+ if (isFocused)
150
+ ev.preventDefault();
151
+ setActive(true);
152
+ }),
153
+ onMouseUp: (0, import_utils.handlerAll)(props2.onMouseUp, () => setActive(false)),
154
+ onMouseEnter: (0, import_utils.handlerAll)(props2.onMouseEnter, () => setHovered(true)),
155
+ onMouseLeave: (0, import_utils.handlerAll)(props2.onMouseLeave, () => setHovered(false))
156
+ }),
157
+ [isActive, checked, isFocused, isHovered, isFocusVisible, isIndeterminate, rest]
158
+ );
159
+ const getInputProps = (0, import_react.useCallback)(
160
+ (props2 = {}, ref = null) => ({
161
+ ...(0, import_utils.pickObject)(rest, import_form_control.formControlProperties),
162
+ ...props2,
163
+ ref: (0, import_utils.mergeRefs)(inputRef, ref),
164
+ id,
165
+ type: "checkbox",
166
+ name,
167
+ value,
168
+ tabIndex,
169
+ required,
170
+ disabled,
171
+ readOnly,
172
+ checked,
173
+ style: {
174
+ border: "0px",
175
+ clip: "rect(0px, 0px, 0px, 0px)",
176
+ height: "1px",
177
+ width: "1px",
178
+ margin: "-1px",
179
+ padding: "0px",
180
+ overflow: "hidden",
181
+ whiteSpace: "nowrap",
182
+ position: "absolute"
183
+ },
184
+ onChange: (0, import_utils.handlerAll)(props2.onChange, onChange),
185
+ onBlur: (0, import_utils.handlerAll)(props2.onBlur, onBlur, () => setFocused(false)),
186
+ onFocus: (0, import_utils.handlerAll)(props2.onFocus, onFocus, () => setFocused(true)),
187
+ onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, onKeyDown),
188
+ onKeyUp: (0, import_utils.handlerAll)(props2.onKeyUp, onKeyUp)
189
+ }),
190
+ [
191
+ rest,
192
+ id,
193
+ name,
194
+ value,
195
+ tabIndex,
196
+ required,
197
+ disabled,
198
+ readOnly,
199
+ checked,
200
+ onChange,
201
+ onBlur,
202
+ onFocus,
203
+ onKeyDown,
204
+ onKeyUp
205
+ ]
206
+ );
207
+ const getLabelProps = (0, import_react.useCallback)(
208
+ (props2 = {}, ref = null) => ({
209
+ ...(0, import_utils.pickObject)(rest, import_form_control.formControlProperties),
210
+ ...props2,
211
+ ref,
212
+ "data-checked": (0, import_utils.dataAttr)(checked),
213
+ onMouseDown: (0, import_utils.handlerAll)(props2.onMouseDown, (ev) => {
214
+ ev.preventDefault();
215
+ ev.stopPropagation();
216
+ }),
217
+ onTouchStart: (0, import_utils.handlerAll)(props2.onTouchStart, (ev) => {
218
+ ev.preventDefault();
219
+ ev.stopPropagation();
220
+ })
221
+ }),
222
+ [checked, rest]
223
+ );
224
+ return {
225
+ isFocusVisible,
226
+ isFocused,
227
+ isHovered,
228
+ isActive,
229
+ isChecked: checked,
230
+ isIndeterminate,
231
+ getContainerProps,
232
+ getIconProps,
233
+ getInputProps,
234
+ getLabelProps
235
+ };
236
+ };
237
+ var Checkbox = (0, import_react.forwardRef)(
238
+ (props, ref) => {
239
+ var _a, _b, _c, _d, _e;
240
+ const group = useCheckboxGroupContext();
241
+ const control = (0, import_form_control.useFormControl)(props);
242
+ const [styles, mergedProps] = (0, import_core.useMultiComponentStyle)("Checkbox", {
243
+ ...group ? (0, import_utils.omitObject)(group, ["value"]) : {},
244
+ ...props
245
+ });
246
+ const {
247
+ className,
248
+ gap = "0.5rem",
249
+ isRequired = (_a = group == null ? void 0 : group.isRequired) != null ? _a : control.isRequired,
250
+ isReadOnly = (_b = group == null ? void 0 : group.isReadOnly) != null ? _b : control.isReadOnly,
251
+ isDisabled = (_c = group == null ? void 0 : group.isDisabled) != null ? _c : control.isDisabled,
252
+ isInvalid = (_d = group == null ? void 0 : group.isInvalid) != null ? _d : control.isInvalid,
253
+ iconProps,
254
+ inputProps,
255
+ labelProps,
256
+ children,
257
+ ...rest
258
+ } = (0, import_core.omitThemeProps)(mergedProps);
259
+ const {
260
+ isChecked,
261
+ isIndeterminate,
262
+ getContainerProps,
263
+ getInputProps,
264
+ getIconProps,
265
+ getLabelProps
266
+ } = useCheckbox({
267
+ ...rest,
268
+ isRequired,
269
+ isReadOnly,
270
+ isDisabled,
271
+ isInvalid,
272
+ isChecked: (group == null ? void 0 : group.value) && rest.value ? group.value.includes(rest.value) : rest.isChecked,
273
+ onChange: (group == null ? void 0 : group.onChange) && rest.value ? (0, import_utils.funcAll)(group.onChange, rest.onChange) : rest.onChange
274
+ });
275
+ const cloneIcon = (0, import_react.cloneElement)((_e = iconProps == null ? void 0 : iconProps.children) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIcon, {}), {
276
+ __css: {
277
+ opacity: isChecked || isIndeterminate ? 1 : 0,
278
+ transform: isChecked || isIndeterminate ? "scale(1)" : "scale(0.95)",
279
+ transitionProperty: "transform",
280
+ transitionDuration: "normal"
281
+ },
282
+ isIndeterminate,
283
+ isChecked,
284
+ isRequired,
285
+ isReadOnly,
286
+ isDisabled,
287
+ isInvalid
288
+ });
289
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
290
+ import_core.ui.label,
291
+ {
292
+ className: (0, import_utils.cx)("ui-checkbox", className),
293
+ ...getContainerProps(),
294
+ __css: {
295
+ cursor: "pointer",
296
+ position: "relative",
297
+ display: "inline-flex",
298
+ alignItems: "center",
299
+ verticalAlign: "top",
300
+ gap,
301
+ ...styles.container
302
+ },
303
+ ...(0, import_utils.omitObject)(rest, [
304
+ "id",
305
+ "name",
306
+ "value",
307
+ "defaultValue",
308
+ "defaultChecked",
309
+ "isChecked",
310
+ "isIndeterminate",
311
+ "onChange",
312
+ "onBlur",
313
+ "onFocus",
314
+ "tabIndex"
315
+ ]),
316
+ children: [
317
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.input, { className: "ui-checkbox-input", ...getInputProps(inputProps, ref) }),
318
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
319
+ import_core.ui.span,
320
+ {
321
+ className: "ui-checkbox-icon",
322
+ __css: {
323
+ pointerEvents: isReadOnly ? "none" : void 0,
324
+ position: "relative",
325
+ display: "inline-block",
326
+ userSelect: "none",
327
+ ...styles.icon
328
+ },
329
+ ...getIconProps((0, import_utils.omitObject)(iconProps != null ? iconProps : { children: void 0 }, ["children"])),
330
+ children: cloneIcon
331
+ }
332
+ ),
333
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
334
+ import_core.ui.span,
335
+ {
336
+ className: "ui-checkbox-label",
337
+ __css: { ...styles.label },
338
+ ...getLabelProps(labelProps),
339
+ children
340
+ }
341
+ )
342
+ ]
343
+ }
344
+ );
345
+ }
346
+ );
347
+ Checkbox.displayName = "Checkbox";
348
+ var CheckboxIcon = ({
349
+ isIndeterminate,
350
+ isChecked,
351
+ isRequired,
352
+ isReadOnly,
353
+ isDisabled,
354
+ isInvalid,
355
+ ...rest
356
+ }) => {
357
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion.AnimatePresence, { initial: false, children: isIndeterminate || isChecked ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
358
+ import_core.ui.div,
359
+ {
360
+ __css: {
361
+ position: "absolute",
362
+ top: "50%",
363
+ left: "50%",
364
+ transform: "translate(-50%, -50%)"
365
+ },
366
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
367
+ import_core.ui.div,
368
+ {
369
+ as: import_motion.motion.div,
370
+ variants: {
371
+ unchecked: { scale: 0.5 },
372
+ checked: { scale: 1 }
373
+ },
374
+ initial: "unchecked",
375
+ animate: "checked",
376
+ exit: "unchecked",
377
+ style: {
378
+ display: "flex",
379
+ alignItems: "center",
380
+ justifyContent: "center"
381
+ },
382
+ children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IndeterminateIcon, { ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckIcon, { ...rest })
383
+ }
384
+ )
385
+ }
386
+ ) : null });
387
+ };
388
+ var CheckIcon = (props) => {
389
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
390
+ import_core.ui.svg,
391
+ {
392
+ as: import_motion.motion.svg,
393
+ width: "1.2em",
394
+ viewBox: "0 0 12 10",
395
+ variants: {
396
+ unchecked: {
397
+ opacity: 0,
398
+ strokeDashoffset: 16
399
+ },
400
+ checked: {
401
+ opacity: 1,
402
+ strokeDashoffset: 0,
403
+ transition: { duration: 0.2 }
404
+ }
405
+ },
406
+ style: {
407
+ fill: "none",
408
+ strokeWidth: 2,
409
+ stroke: "currentColor",
410
+ strokeDasharray: 16
411
+ },
412
+ ...props,
413
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "1.5 6 4.5 9 10.5 1" })
414
+ }
415
+ );
416
+ };
417
+ var IndeterminateIcon = (props) => {
418
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
419
+ import_core.ui.svg,
420
+ {
421
+ as: import_motion.motion.svg,
422
+ width: "1.2em",
423
+ viewBox: "0 0 24 24",
424
+ variants: {
425
+ unchecked: {
426
+ scaleX: 0.65,
427
+ opacity: 0
428
+ },
429
+ checked: {
430
+ scaleX: 1,
431
+ opacity: 1,
432
+ transition: {
433
+ scaleX: { duration: 0 },
434
+ opacity: { duration: 0.02 }
435
+ }
436
+ }
437
+ },
438
+ style: { stroke: "currentColor", strokeWidth: 4 },
439
+ ...props,
440
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "21", x2: "3", y1: "12", y2: "12" })
441
+ }
442
+ );
443
+ };
444
+
445
+ // src/checkbox-group.tsx
446
+ var import_form_control2 = require("@yamada-ui/form-control");
447
+ var import_layouts = require("@yamada-ui/layouts");
448
+ var import_use_controllable_state = require("@yamada-ui/use-controllable-state");
449
+ var import_utils2 = require("@yamada-ui/utils");
450
+ var import_react2 = require("react");
451
+ var import_jsx_runtime2 = require("react/jsx-runtime");
452
+ var isEvent = (value) => value && (0, import_utils2.isObject)(value) && (0, import_utils2.isObject)(value.target);
453
+ var useCheckboxGroup = ({
454
+ isNative,
455
+ ...props
456
+ }) => {
457
+ props.onChange = (0, import_utils2.useCallbackRef)(props.onChange);
458
+ const [value, setValue] = (0, import_use_controllable_state.useControllableState)({
459
+ value: props.value,
460
+ defaultValue: props.defaultValue || [],
461
+ onChange: props.onChange
462
+ });
463
+ const onChange = (0, import_react2.useCallback)(
464
+ (evOrValue) => {
465
+ const isChecked = isEvent(evOrValue) ? evOrValue.target.checked : !value.includes(evOrValue);
466
+ const selectedValue = isEvent(evOrValue) ? evOrValue.target.value : evOrValue;
467
+ const nextValue = isChecked ? [...value, selectedValue] : value.filter((v) => String(v) !== String(selectedValue));
468
+ setValue(nextValue);
469
+ },
470
+ [value, setValue]
471
+ );
472
+ const getCheckboxProps = (0, import_react2.useCallback)(
473
+ (props2 = {}, ref = null) => ({
474
+ ...props2,
475
+ ref,
476
+ [isNative ? "checked" : "isChecked"]: value.some(
477
+ (val) => String(props2.value) === String(val)
478
+ ),
479
+ onChange
480
+ }),
481
+ [onChange, isNative, value]
482
+ );
483
+ return { value, setValue, onChange, getCheckboxProps };
484
+ };
485
+ var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils2.createContext)(
486
+ {
487
+ strict: false,
488
+ name: "CheckboxGroupContext"
489
+ }
490
+ );
491
+ var CheckboxGroup = (0, import_react2.forwardRef)(
492
+ ({
493
+ className,
494
+ size,
495
+ variant,
496
+ colorScheme,
497
+ children,
498
+ direction = "column",
499
+ gap,
500
+ ...props
501
+ }, ref) => {
502
+ const { value, onChange } = useCheckboxGroup(props);
503
+ const { isRequired, isReadOnly, isDisabled, isInvalid } = (0, import_form_control2.useFormControl)(props);
504
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
505
+ CheckboxGroupProvider,
506
+ {
507
+ value: {
508
+ size,
509
+ variant,
510
+ colorScheme,
511
+ isRequired,
512
+ isReadOnly,
513
+ isDisabled,
514
+ isInvalid,
515
+ value,
516
+ onChange
517
+ },
518
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
519
+ import_layouts.Flex,
520
+ {
521
+ ref,
522
+ className: (0, import_utils2.cx)("ui-checkbox-group", className),
523
+ role: "group",
524
+ direction,
525
+ gap: gap != null ? gap : direction === "row" ? "1rem" : void 0,
526
+ ...(0, import_utils2.omitObject)(props, ["value", "defaultValue", "onChange"]),
527
+ children
528
+ }
529
+ )
530
+ }
531
+ );
532
+ }
533
+ );
534
+ CheckboxGroup.displayName = "CheckboxGroup";
535
+ // Annotate the CommonJS export names for ESM import in node:
536
+ 0 && (module.exports = {
537
+ Checkbox,
538
+ CheckboxGroup,
539
+ CheckboxIcon,
540
+ useCheckbox,
541
+ useCheckboxGroup,
542
+ useCheckboxGroupContext
543
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,18 @@
1
+ import {
2
+ Checkbox,
3
+ CheckboxIcon,
4
+ useCheckbox
5
+ } from "./chunk-WVMK5AIG.mjs";
6
+ import {
7
+ CheckboxGroup,
8
+ useCheckboxGroup,
9
+ useCheckboxGroupContext
10
+ } from "./chunk-3MZZPRTR.mjs";
11
+ export {
12
+ Checkbox,
13
+ CheckboxGroup,
14
+ CheckboxIcon,
15
+ useCheckbox,
16
+ useCheckboxGroup,
17
+ useCheckboxGroupContext
18
+ };
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@yamada-ui/checkbox",
3
+ "version": "0.1.0",
4
+ "description": "Yamada UI checkbox component",
5
+ "keywords": [
6
+ "yamada",
7
+ "yamada ui",
8
+ "react",
9
+ "emotion",
10
+ "component",
11
+ "checkbox",
12
+ "ui",
13
+ "uikit",
14
+ "styled",
15
+ "style-props",
16
+ "styled-component",
17
+ "css-in-js"
18
+ ],
19
+ "author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
20
+ "license": "MIT",
21
+ "main": "dist/index.js",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "sideEffects": false,
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/hirotomoyamada/yamada-ui",
32
+ "directory": "packages/components/checkbox"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
+ },
37
+ "dependencies": {
38
+ "@yamada-ui/core": "0.1.0",
39
+ "@yamada-ui/utils": "0.1.0",
40
+ "@yamada-ui/layouts": "0.1.0",
41
+ "@yamada-ui/form-control": "0.1.0",
42
+ "@yamada-ui/motion": "0.1.0",
43
+ "@yamada-ui/use-controllable-state": "0.1.0",
44
+ "@yamada-ui/use-focus-visible": "0.1.0"
45
+ },
46
+ "devDependencies": {
47
+ "react": "^18.0.0",
48
+ "clean-package": "2.2.0"
49
+ },
50
+ "peerDependencies": {
51
+ "react": ">=18"
52
+ },
53
+ "clean-package": "../../../clean-package.config.json",
54
+ "tsup": {
55
+ "clean": true,
56
+ "target": "es2019",
57
+ "format": [
58
+ "cjs",
59
+ "esm"
60
+ ]
61
+ },
62
+ "module": "dist/index.mjs",
63
+ "types": "dist/index.d.ts",
64
+ "exports": {
65
+ ".": {
66
+ "types": "./dist/index.d.ts",
67
+ "import": "./dist/index.mjs",
68
+ "require": "./dist/index.js"
69
+ },
70
+ "./package.json": "./package.json"
71
+ },
72
+ "scripts": {
73
+ "dev": "pnpm build:fast -- --watch",
74
+ "build": "tsup src --dts",
75
+ "build:fast": "tsup src",
76
+ "clean": "rimraf dist .turbo",
77
+ "typecheck": "tsc --noEmit",
78
+ "gen:docs": "tsx ../../../scripts/generate-docs"
79
+ }
80
+ }