@yamada-ui/react 2.3.4-dev-20261116090244 → 2.3.4-dev-20261116185022
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/cjs/components/dropzone/use-dropzone.cjs +8 -12
- package/dist/cjs/components/dropzone/use-dropzone.cjs.map +1 -1
- package/dist/esm/components/dropzone/use-dropzone.js +8 -12
- package/dist/esm/components/dropzone/use-dropzone.js.map +1 -1
- package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
- package/dist/types/components/calendar/calendar.style.d.ts +2 -2
- package/dist/types/components/carousel/carousel.style.d.ts +2 -2
- package/dist/types/components/chart/cartesian-chart.style.d.ts +1 -1
- package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
- package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
- package/dist/types/components/field/field.style.d.ts +2 -2
- package/dist/types/components/fieldset/fieldset.style.d.ts +1 -1
- package/dist/types/components/select/select.style.d.ts +1 -1
- package/dist/types/components/stat/stat.style.d.ts +2 -2
- package/dist/types/components/tag/tag.style.d.ts +1 -1
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ let file_selector = require("file-selector");
|
|
|
8
8
|
let react_dropzone = require("react-dropzone");
|
|
9
9
|
// src/components/dropzone/use-dropzone.ts
|
|
10
10
|
const useDropzone = (props = {}) => {
|
|
11
|
-
const { props: { id, name, accept, autoFocus = false, disabled, getFilesFromEvent = file_selector.fromEvent, loading, maxFiles = 0, maxSize = Infinity, minSize = 0, multiple = false, noClick = false, noDrag = false, noDragEventsBubbling = false, noKeyboard = false, openRef, preventDropOnDocument = true, readOnly, useFsAccessApi = false, validator, onDragEnter, onDragLeave, onDragOver, onDrop, onDropAccepted, onDropRejected, onError, onFileDialogCancel, onFileDialogOpen, ...rest }, ariaProps, dataProps, eventProps } = require_use_field_props.useFieldProps(props);
|
|
11
|
+
const { props: { id, ref: refProp, name, accept, autoFocus = false, disabled, getFilesFromEvent = file_selector.fromEvent, loading, maxFiles = 0, maxSize = Infinity, minSize = 0, multiple = false, noClick = false, noDrag = false, noDragEventsBubbling = false, noKeyboard = false, openRef, preventDropOnDocument = true, readOnly, useFsAccessApi = false, validator, onDragEnter, onDragLeave, onDragOver, onDrop, onDropAccepted, onDropRejected, onError, onFileDialogCancel, onFileDialogOpen, ...rest }, ariaProps, dataProps, eventProps } = require_use_field_props.useFieldProps(props);
|
|
12
12
|
const labelledbyId = (0, react.useId)();
|
|
13
13
|
const interactive = !(loading || readOnly || disabled);
|
|
14
14
|
const { acceptedFiles, fileRejections, isDragAccept: dragAccept, isDragActive: dragActive, isDragReject: dragReject, isFocused: focused, open, getInputProps: getOriginalInputProps, getRootProps: getOriginalRootProps } = (0, react_dropzone.useDropzone)({
|
|
@@ -43,20 +43,17 @@ const useDropzone = (props = {}) => {
|
|
|
43
43
|
const dragIdle = !dragAccept && !dragReject;
|
|
44
44
|
require_ref.assignRef(openRef, open);
|
|
45
45
|
const getRootProps = (0, react.useCallback)(({ ref, ...props } = {}) => {
|
|
46
|
-
const { ref:
|
|
47
|
-
const { ref: rootRef, ...rootProps } = getOriginalRootProps(require_props.mergeProps({
|
|
46
|
+
const { ref: rootRef, ...rootProps } = getOriginalRootProps(require_props.mergeProps(dataProps, eventProps, {
|
|
48
47
|
id: labelledbyId,
|
|
49
|
-
...dataProps,
|
|
50
|
-
...eventProps,
|
|
51
48
|
"aria-disabled": (0, require_utils_index.utils_exports.ariaAttr)(!interactive),
|
|
52
49
|
"data-accept": (0, require_utils_index.utils_exports.dataAttr)(dragAccept),
|
|
53
50
|
"data-idle": (0, require_utils_index.utils_exports.dataAttr)(dragIdle),
|
|
54
51
|
"data-loading": (0, require_utils_index.utils_exports.dataAttr)(loading),
|
|
55
52
|
"data-reject": (0, require_utils_index.utils_exports.dataAttr)(dragReject)
|
|
56
|
-
},
|
|
53
|
+
}, rest, props)());
|
|
57
54
|
return {
|
|
58
55
|
...rootProps,
|
|
59
|
-
ref: require_ref.mergeRefs(
|
|
56
|
+
ref: require_ref.mergeRefs(refProp, ref, rootRef)
|
|
60
57
|
};
|
|
61
58
|
}, [
|
|
62
59
|
getOriginalRootProps,
|
|
@@ -68,6 +65,7 @@ const useDropzone = (props = {}) => {
|
|
|
68
65
|
dragIdle,
|
|
69
66
|
loading,
|
|
70
67
|
dragReject,
|
|
68
|
+
refProp,
|
|
71
69
|
rest
|
|
72
70
|
]);
|
|
73
71
|
return {
|
|
@@ -80,14 +78,12 @@ const useDropzone = (props = {}) => {
|
|
|
80
78
|
focused,
|
|
81
79
|
loading,
|
|
82
80
|
open,
|
|
83
|
-
getInputProps: (0, react.useCallback)((props = {}) => getOriginalInputProps(require_props.mergeProps({
|
|
81
|
+
getInputProps: (0, react.useCallback)((props = {}) => getOriginalInputProps(require_props.mergeProps(ariaProps, dataProps, {
|
|
84
82
|
id,
|
|
85
83
|
name,
|
|
84
|
+
"aria-labelledby": labelledbyId,
|
|
86
85
|
disabled,
|
|
87
|
-
readOnly
|
|
88
|
-
...ariaProps,
|
|
89
|
-
...dataProps,
|
|
90
|
-
"aria-labelledby": labelledbyId
|
|
86
|
+
readOnly
|
|
91
87
|
}, props)()), [
|
|
92
88
|
getOriginalInputProps,
|
|
93
89
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dropzone.cjs","names":["fromEvent","useFieldProps","useId","useOriginalDropzone","useCallback","mergeProps","mergeRefs"],"sources":["../../../../src/components/dropzone/use-dropzone.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport type { Accept, DropzoneOptions } from \"react-dropzone\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { fromEvent } from \"file-selector\"\nimport { useCallback, useId } from \"react\"\nimport { useDropzone as useOriginalDropzone } from \"react-dropzone\"\nimport { mergeProps } from \"../../core\"\nimport { ariaAttr, assignRef, dataAttr, isArray, mergeRefs } from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport interface UseDropzoneProps\n extends Omit<HTMLProps, \"onDrop\" | \"onError\">, FieldProps {\n /**\n * Set accepted file types.\n */\n accept?: Accept | string[]\n /**\n * Set to true to focus the root element on render.\n *\n * @default false\n */\n autoFocus?: boolean\n /**\n * Use this to provide a custom file aggregator.\n */\n getFilesFromEvent?: DropzoneOptions[\"getFilesFromEvent\"]\n /**\n * If `true`, display the dropzone loading icon.\n *\n * @default false\n */\n loading?: boolean\n /**\n * Maximum accepted number of files.\n * The default value is 0 which means there is no limitation to how many files are accepted.\n *\n * @default 0\n */\n maxFiles?: number\n /**\n * Maximum file size (in bytes).\n *\n * @default Infinity\n */\n maxSize?: number\n /**\n * Minimum file size (in bytes).\n *\n * @default 0\n */\n minSize?: number\n /**\n * Allow drag and drop (or selection from the file dialog) of multiple files.\n *\n * @default false\n */\n multiple?: boolean\n /**\n * The HTML `name` attribute used for forms.\n */\n name?: string\n /**\n * If true, disables click to open the native file selection dialog.\n *\n * @default false\n */\n noClick?: boolean\n /**\n * If true, disables drag and drop.\n *\n * @default false\n */\n noDrag?: boolean\n /**\n * If true, stops drag event propagation to parents.\n *\n * @default false\n */\n noDragEventsBubbling?: boolean\n /**\n * If true, disables `space` and `enter` to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n *\n * @default false\n */\n noKeyboard?: boolean\n /**\n * Ref to a open function.\n */\n openRef?: RefObject<() => void>\n /**\n * If false, allow dropped items to take over the current browser window.\n *\n * @default true\n */\n preventDropOnDocument?: boolean\n /**\n * If true, use the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API) to read files.\n *\n * @default false\n */\n useFsAccessApi?: boolean\n /**\n * Custom validation function.\n * It must return null if there's no errors.\n */\n validator?: DropzoneOptions[\"validator\"]\n /**\n * Callback for when the dragenter event occurs.\n */\n onDragEnter?: DropzoneOptions[\"onDragEnter\"]\n /**\n * Callback for when the dragleave event occurs.\n */\n onDragLeave?: DropzoneOptions[\"onDragLeave\"]\n /**\n * Callback for when the dragover event occurs.\n */\n onDragOver?: DropzoneOptions[\"onDragOver\"]\n /**\n * Callback for when the drop event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n */\n onDrop?: DropzoneOptions[\"onDrop\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n */\n onDropAccepted?: DropzoneOptions[\"onDropAccepted\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n */\n onDropRejected?: DropzoneOptions[\"onDropRejected\"]\n /**\n * Callback for when there's some error from any of the promises.\n */\n onError?: DropzoneOptions[\"onError\"]\n /**\n * Callback for when closing the file dialog with no selection.\n */\n onFileDialogCancel?: DropzoneOptions[\"onFileDialogCancel\"]\n /**\n * Callback for when opening the file dialog.\n */\n onFileDialogOpen?: DropzoneOptions[\"onFileDialogOpen\"]\n}\n\nexport const useDropzone = (props: UseDropzoneProps = {}) => {\n const {\n props: {\n id,\n name,\n accept,\n autoFocus = false,\n disabled,\n getFilesFromEvent = fromEvent,\n loading,\n maxFiles = 0,\n maxSize = Infinity,\n minSize = 0,\n multiple = false,\n noClick = false,\n noDrag = false,\n noDragEventsBubbling = false,\n noKeyboard = false,\n openRef,\n preventDropOnDocument = true,\n readOnly,\n useFsAccessApi = false,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const labelledbyId = useId()\n const interactive = !(loading || readOnly || disabled)\n const {\n acceptedFiles,\n fileRejections,\n isDragAccept: dragAccept,\n isDragActive: dragActive,\n isDragReject: dragReject,\n isFocused: focused,\n open,\n getInputProps: getOriginalInputProps,\n getRootProps: getOriginalRootProps,\n } = useOriginalDropzone({\n accept: isArray(accept)\n ? accept.reduce((prev, current) => ({ ...prev, [current]: [] }), {})\n : accept,\n autoFocus,\n disabled: !interactive,\n getFilesFromEvent,\n maxFiles,\n maxSize,\n minSize,\n multiple,\n noClick,\n noDrag,\n noDragEventsBubbling,\n noKeyboard,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n })\n const dragIdle = !dragAccept && !dragReject\n\n assignRef(openRef, open)\n\n const getRootProps: PropGetter = useCallback(\n ({ ref, ...props } = {}) => {\n const { ref:
|
|
1
|
+
{"version":3,"file":"use-dropzone.cjs","names":["fromEvent","useFieldProps","useId","useOriginalDropzone","useCallback","mergeProps","mergeRefs"],"sources":["../../../../src/components/dropzone/use-dropzone.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport type { Accept, DropzoneOptions } from \"react-dropzone\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { fromEvent } from \"file-selector\"\nimport { useCallback, useId } from \"react\"\nimport { useDropzone as useOriginalDropzone } from \"react-dropzone\"\nimport { mergeProps } from \"../../core\"\nimport { ariaAttr, assignRef, dataAttr, isArray, mergeRefs } from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport interface UseDropzoneProps\n extends Omit<HTMLProps, \"onDrop\" | \"onError\">, FieldProps {\n /**\n * Set accepted file types.\n */\n accept?: Accept | string[]\n /**\n * Set to true to focus the root element on render.\n *\n * @default false\n */\n autoFocus?: boolean\n /**\n * Use this to provide a custom file aggregator.\n */\n getFilesFromEvent?: DropzoneOptions[\"getFilesFromEvent\"]\n /**\n * If `true`, display the dropzone loading icon.\n *\n * @default false\n */\n loading?: boolean\n /**\n * Maximum accepted number of files.\n * The default value is 0 which means there is no limitation to how many files are accepted.\n *\n * @default 0\n */\n maxFiles?: number\n /**\n * Maximum file size (in bytes).\n *\n * @default Infinity\n */\n maxSize?: number\n /**\n * Minimum file size (in bytes).\n *\n * @default 0\n */\n minSize?: number\n /**\n * Allow drag and drop (or selection from the file dialog) of multiple files.\n *\n * @default false\n */\n multiple?: boolean\n /**\n * The HTML `name` attribute used for forms.\n */\n name?: string\n /**\n * If true, disables click to open the native file selection dialog.\n *\n * @default false\n */\n noClick?: boolean\n /**\n * If true, disables drag and drop.\n *\n * @default false\n */\n noDrag?: boolean\n /**\n * If true, stops drag event propagation to parents.\n *\n * @default false\n */\n noDragEventsBubbling?: boolean\n /**\n * If true, disables `space` and `enter` to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n *\n * @default false\n */\n noKeyboard?: boolean\n /**\n * Ref to a open function.\n */\n openRef?: RefObject<() => void>\n /**\n * If false, allow dropped items to take over the current browser window.\n *\n * @default true\n */\n preventDropOnDocument?: boolean\n /**\n * If true, use the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API) to read files.\n *\n * @default false\n */\n useFsAccessApi?: boolean\n /**\n * Custom validation function.\n * It must return null if there's no errors.\n */\n validator?: DropzoneOptions[\"validator\"]\n /**\n * Callback for when the dragenter event occurs.\n */\n onDragEnter?: DropzoneOptions[\"onDragEnter\"]\n /**\n * Callback for when the dragleave event occurs.\n */\n onDragLeave?: DropzoneOptions[\"onDragLeave\"]\n /**\n * Callback for when the dragover event occurs.\n */\n onDragOver?: DropzoneOptions[\"onDragOver\"]\n /**\n * Callback for when the drop event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n */\n onDrop?: DropzoneOptions[\"onDrop\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n */\n onDropAccepted?: DropzoneOptions[\"onDropAccepted\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n */\n onDropRejected?: DropzoneOptions[\"onDropRejected\"]\n /**\n * Callback for when there's some error from any of the promises.\n */\n onError?: DropzoneOptions[\"onError\"]\n /**\n * Callback for when closing the file dialog with no selection.\n */\n onFileDialogCancel?: DropzoneOptions[\"onFileDialogCancel\"]\n /**\n * Callback for when opening the file dialog.\n */\n onFileDialogOpen?: DropzoneOptions[\"onFileDialogOpen\"]\n}\n\nexport const useDropzone = (props: UseDropzoneProps = {}) => {\n const {\n props: {\n id,\n ref: refProp,\n name,\n accept,\n autoFocus = false,\n disabled,\n getFilesFromEvent = fromEvent,\n loading,\n maxFiles = 0,\n maxSize = Infinity,\n minSize = 0,\n multiple = false,\n noClick = false,\n noDrag = false,\n noDragEventsBubbling = false,\n noKeyboard = false,\n openRef,\n preventDropOnDocument = true,\n readOnly,\n useFsAccessApi = false,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const labelledbyId = useId()\n const interactive = !(loading || readOnly || disabled)\n const {\n acceptedFiles,\n fileRejections,\n isDragAccept: dragAccept,\n isDragActive: dragActive,\n isDragReject: dragReject,\n isFocused: focused,\n open,\n getInputProps: getOriginalInputProps,\n getRootProps: getOriginalRootProps,\n } = useOriginalDropzone({\n accept: isArray(accept)\n ? accept.reduce((prev, current) => ({ ...prev, [current]: [] }), {})\n : accept,\n autoFocus,\n disabled: !interactive,\n getFilesFromEvent,\n maxFiles,\n maxSize,\n minSize,\n multiple,\n noClick,\n noDrag,\n noDragEventsBubbling,\n noKeyboard,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n })\n const dragIdle = !dragAccept && !dragReject\n\n assignRef(openRef, open)\n\n const getRootProps: PropGetter = useCallback(\n ({ ref, ...props } = {}) => {\n const { ref: rootRef, ...rootProps } = getOriginalRootProps(\n mergeProps(\n dataProps,\n eventProps,\n {\n id: labelledbyId,\n \"aria-disabled\": ariaAttr(!interactive),\n \"data-accept\": dataAttr(dragAccept),\n \"data-idle\": dataAttr(dragIdle),\n \"data-loading\": dataAttr(loading),\n \"data-reject\": dataAttr(dragReject),\n },\n rest,\n props,\n )(),\n ) as HTMLProps\n\n return { ...rootProps, ref: mergeRefs(refProp, ref, rootRef) }\n },\n [\n getOriginalRootProps,\n labelledbyId,\n dataProps,\n eventProps,\n interactive,\n dragAccept,\n dragIdle,\n loading,\n dragReject,\n refProp,\n rest,\n ],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n getOriginalInputProps(\n mergeProps(\n ariaProps,\n dataProps,\n {\n id,\n name,\n \"aria-labelledby\": labelledbyId,\n disabled,\n readOnly,\n },\n props,\n )(),\n ),\n [\n getOriginalInputProps,\n id,\n name,\n disabled,\n readOnly,\n ariaProps,\n dataProps,\n labelledbyId,\n ],\n )\n\n return {\n acceptedFiles,\n dragAccept,\n dragActive,\n dragIdle,\n dragReject,\n fileRejections,\n focused,\n loading,\n open,\n getInputProps,\n getRootProps,\n }\n}\n\nexport type UseDropzoneReturn = ReturnType<typeof useDropzone>\n"],"mappings":";;;;;;;;;AAuJA,MAAa,eAAe,QAA0B,CAAC,MAAM;CAC3D,MAAM,EACJ,OAAO,EACL,IACA,KAAK,SACL,MACA,QACA,YAAY,OACZ,UACA,oBAAoBA,cAAAA,WACpB,SACA,WAAW,GACX,UAAU,UACV,UAAU,GACV,WAAW,OACX,UAAU,OACV,SAAS,OACT,uBAAuB,OACvB,aAAa,OACb,SACA,wBAAwB,MACxB,UACA,iBAAiB,OACjB,WACA,aACA,aACA,YACA,QACA,gBACA,gBACA,SACA,oBACA,kBACA,GAAG,QAEL,WACA,WACA,eACEC,wBAAAA,cAAc,KAAK;CACvB,MAAM,gBAAA,GAAeC,MAAAA,MAAAA,CAAM;CAC3B,MAAM,cAAc,EAAE,WAAW,YAAY;CAC7C,MAAM,EACJ,eACA,gBACA,cAAc,YACd,cAAc,YACd,cAAc,YACd,WAAW,SACX,MACA,eAAe,uBACf,cAAc,0BAAA,GACZC,eAAAA,YAAAA,CAAoB;EACtB,SAAA,GAAA,oBAAA,cAAQ,QAAA,CAAQ,MAAM,IAClB,OAAO,QAAQ,MAAM,aAAa;GAAE,GAAG;IAAO,UAAU,CAAC;EAAE,IAAI,CAAC,CAAC,IACjE;EACJ;EACA,UAAU,CAAC;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,WAAW,CAAC,cAAc,CAAC;CAEjC,YAAA,UAAU,SAAS,IAAI;CAEvB,MAAM,gBAAA,GAA2BC,MAAAA,YAAAA,EAC9B,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM;EAC1B,MAAM,EAAE,KAAK,SAAS,GAAG,cAAc,qBACrCC,cAAAA,WACE,WACA,YACA;GACE,IAAI;GACJ,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,CAAC,WAAW;GACtC,gBAAA,GAAA,oBAAA,cAAe,SAAA,CAAS,UAAU;GAClC,cAAA,GAAA,oBAAA,cAAa,SAAA,CAAS,QAAQ;GAC9B,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,gBAAA,GAAA,oBAAA,cAAe,SAAA,CAAS,UAAU;EACpC,GACA,MACA,KACF,CAAC,CAAC,CACJ;EAEA,OAAO;GAAE,GAAG;GAAW,KAAKC,YAAAA,UAAU,SAAS,KAAK,OAAO;EAAE;CAC/D,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CA8BA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAA,GAtCyCF,MAAAA,YAAAA,EACxC,QAAQ,CAAC,MACR,sBACEC,cAAAA,WACE,WACA,WACA;GACE;GACA;GACA,mBAAmB;GACnB;GACA;EACF,GACA,KACF,CAAC,CAAC,CACJ,GACF;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAaY;EACZ;CACF;AACF"}
|
|
@@ -8,7 +8,7 @@ import { fromEvent } from "file-selector";
|
|
|
8
8
|
import { useDropzone } from "react-dropzone";
|
|
9
9
|
// src/components/dropzone/use-dropzone.ts
|
|
10
10
|
const useDropzone$1 = (props = {}) => {
|
|
11
|
-
const { props: { id, name, accept, autoFocus = false, disabled, getFilesFromEvent = fromEvent, loading, maxFiles = 0, maxSize = Infinity, minSize = 0, multiple = false, noClick = false, noDrag = false, noDragEventsBubbling = false, noKeyboard = false, openRef, preventDropOnDocument = true, readOnly, useFsAccessApi = false, validator, onDragEnter, onDragLeave, onDragOver, onDrop, onDropAccepted, onDropRejected, onError, onFileDialogCancel, onFileDialogOpen, ...rest }, ariaProps, dataProps, eventProps } = useFieldProps(props);
|
|
11
|
+
const { props: { id, ref: refProp, name, accept, autoFocus = false, disabled, getFilesFromEvent = fromEvent, loading, maxFiles = 0, maxSize = Infinity, minSize = 0, multiple = false, noClick = false, noDrag = false, noDragEventsBubbling = false, noKeyboard = false, openRef, preventDropOnDocument = true, readOnly, useFsAccessApi = false, validator, onDragEnter, onDragLeave, onDragOver, onDrop, onDropAccepted, onDropRejected, onError, onFileDialogCancel, onFileDialogOpen, ...rest }, ariaProps, dataProps, eventProps } = useFieldProps(props);
|
|
12
12
|
const labelledbyId = useId();
|
|
13
13
|
const interactive = !(loading || readOnly || disabled);
|
|
14
14
|
const { acceptedFiles, fileRejections, isDragAccept: dragAccept, isDragActive: dragActive, isDragReject: dragReject, isFocused: focused, open, getInputProps: getOriginalInputProps, getRootProps: getOriginalRootProps } = useDropzone({
|
|
@@ -43,20 +43,17 @@ const useDropzone$1 = (props = {}) => {
|
|
|
43
43
|
const dragIdle = !dragAccept && !dragReject;
|
|
44
44
|
assignRef(openRef, open);
|
|
45
45
|
const getRootProps = useCallback(({ ref, ...props } = {}) => {
|
|
46
|
-
const { ref:
|
|
47
|
-
const { ref: rootRef, ...rootProps } = getOriginalRootProps(mergeProps({
|
|
46
|
+
const { ref: rootRef, ...rootProps } = getOriginalRootProps(mergeProps(dataProps, eventProps, {
|
|
48
47
|
id: labelledbyId,
|
|
49
|
-
...dataProps,
|
|
50
|
-
...eventProps,
|
|
51
48
|
"aria-disabled": (0, utils_exports.ariaAttr)(!interactive),
|
|
52
49
|
"data-accept": (0, utils_exports.dataAttr)(dragAccept),
|
|
53
50
|
"data-idle": (0, utils_exports.dataAttr)(dragIdle),
|
|
54
51
|
"data-loading": (0, utils_exports.dataAttr)(loading),
|
|
55
52
|
"data-reject": (0, utils_exports.dataAttr)(dragReject)
|
|
56
|
-
},
|
|
53
|
+
}, rest, props)());
|
|
57
54
|
return {
|
|
58
55
|
...rootProps,
|
|
59
|
-
ref: mergeRefs(
|
|
56
|
+
ref: mergeRefs(refProp, ref, rootRef)
|
|
60
57
|
};
|
|
61
58
|
}, [
|
|
62
59
|
getOriginalRootProps,
|
|
@@ -68,6 +65,7 @@ const useDropzone$1 = (props = {}) => {
|
|
|
68
65
|
dragIdle,
|
|
69
66
|
loading,
|
|
70
67
|
dragReject,
|
|
68
|
+
refProp,
|
|
71
69
|
rest
|
|
72
70
|
]);
|
|
73
71
|
return {
|
|
@@ -80,14 +78,12 @@ const useDropzone$1 = (props = {}) => {
|
|
|
80
78
|
focused,
|
|
81
79
|
loading,
|
|
82
80
|
open,
|
|
83
|
-
getInputProps: useCallback((props = {}) => getOriginalInputProps(mergeProps({
|
|
81
|
+
getInputProps: useCallback((props = {}) => getOriginalInputProps(mergeProps(ariaProps, dataProps, {
|
|
84
82
|
id,
|
|
85
83
|
name,
|
|
84
|
+
"aria-labelledby": labelledbyId,
|
|
86
85
|
disabled,
|
|
87
|
-
readOnly
|
|
88
|
-
...ariaProps,
|
|
89
|
-
...dataProps,
|
|
90
|
-
"aria-labelledby": labelledbyId
|
|
86
|
+
readOnly
|
|
91
87
|
}, props)()), [
|
|
92
88
|
getOriginalInputProps,
|
|
93
89
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dropzone.js","names":["useDropzone","useOriginalDropzone","isArray","ariaAttr","dataAttr"],"sources":["../../../../src/components/dropzone/use-dropzone.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport type { Accept, DropzoneOptions } from \"react-dropzone\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { fromEvent } from \"file-selector\"\nimport { useCallback, useId } from \"react\"\nimport { useDropzone as useOriginalDropzone } from \"react-dropzone\"\nimport { mergeProps } from \"../../core\"\nimport { ariaAttr, assignRef, dataAttr, isArray, mergeRefs } from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport interface UseDropzoneProps\n extends Omit<HTMLProps, \"onDrop\" | \"onError\">, FieldProps {\n /**\n * Set accepted file types.\n */\n accept?: Accept | string[]\n /**\n * Set to true to focus the root element on render.\n *\n * @default false\n */\n autoFocus?: boolean\n /**\n * Use this to provide a custom file aggregator.\n */\n getFilesFromEvent?: DropzoneOptions[\"getFilesFromEvent\"]\n /**\n * If `true`, display the dropzone loading icon.\n *\n * @default false\n */\n loading?: boolean\n /**\n * Maximum accepted number of files.\n * The default value is 0 which means there is no limitation to how many files are accepted.\n *\n * @default 0\n */\n maxFiles?: number\n /**\n * Maximum file size (in bytes).\n *\n * @default Infinity\n */\n maxSize?: number\n /**\n * Minimum file size (in bytes).\n *\n * @default 0\n */\n minSize?: number\n /**\n * Allow drag and drop (or selection from the file dialog) of multiple files.\n *\n * @default false\n */\n multiple?: boolean\n /**\n * The HTML `name` attribute used for forms.\n */\n name?: string\n /**\n * If true, disables click to open the native file selection dialog.\n *\n * @default false\n */\n noClick?: boolean\n /**\n * If true, disables drag and drop.\n *\n * @default false\n */\n noDrag?: boolean\n /**\n * If true, stops drag event propagation to parents.\n *\n * @default false\n */\n noDragEventsBubbling?: boolean\n /**\n * If true, disables `space` and `enter` to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n *\n * @default false\n */\n noKeyboard?: boolean\n /**\n * Ref to a open function.\n */\n openRef?: RefObject<() => void>\n /**\n * If false, allow dropped items to take over the current browser window.\n *\n * @default true\n */\n preventDropOnDocument?: boolean\n /**\n * If true, use the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API) to read files.\n *\n * @default false\n */\n useFsAccessApi?: boolean\n /**\n * Custom validation function.\n * It must return null if there's no errors.\n */\n validator?: DropzoneOptions[\"validator\"]\n /**\n * Callback for when the dragenter event occurs.\n */\n onDragEnter?: DropzoneOptions[\"onDragEnter\"]\n /**\n * Callback for when the dragleave event occurs.\n */\n onDragLeave?: DropzoneOptions[\"onDragLeave\"]\n /**\n * Callback for when the dragover event occurs.\n */\n onDragOver?: DropzoneOptions[\"onDragOver\"]\n /**\n * Callback for when the drop event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n */\n onDrop?: DropzoneOptions[\"onDrop\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n */\n onDropAccepted?: DropzoneOptions[\"onDropAccepted\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n */\n onDropRejected?: DropzoneOptions[\"onDropRejected\"]\n /**\n * Callback for when there's some error from any of the promises.\n */\n onError?: DropzoneOptions[\"onError\"]\n /**\n * Callback for when closing the file dialog with no selection.\n */\n onFileDialogCancel?: DropzoneOptions[\"onFileDialogCancel\"]\n /**\n * Callback for when opening the file dialog.\n */\n onFileDialogOpen?: DropzoneOptions[\"onFileDialogOpen\"]\n}\n\nexport const useDropzone = (props: UseDropzoneProps = {}) => {\n const {\n props: {\n id,\n name,\n accept,\n autoFocus = false,\n disabled,\n getFilesFromEvent = fromEvent,\n loading,\n maxFiles = 0,\n maxSize = Infinity,\n minSize = 0,\n multiple = false,\n noClick = false,\n noDrag = false,\n noDragEventsBubbling = false,\n noKeyboard = false,\n openRef,\n preventDropOnDocument = true,\n readOnly,\n useFsAccessApi = false,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const labelledbyId = useId()\n const interactive = !(loading || readOnly || disabled)\n const {\n acceptedFiles,\n fileRejections,\n isDragAccept: dragAccept,\n isDragActive: dragActive,\n isDragReject: dragReject,\n isFocused: focused,\n open,\n getInputProps: getOriginalInputProps,\n getRootProps: getOriginalRootProps,\n } = useOriginalDropzone({\n accept: isArray(accept)\n ? accept.reduce((prev, current) => ({ ...prev, [current]: [] }), {})\n : accept,\n autoFocus,\n disabled: !interactive,\n getFilesFromEvent,\n maxFiles,\n maxSize,\n minSize,\n multiple,\n noClick,\n noDrag,\n noDragEventsBubbling,\n noKeyboard,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n })\n const dragIdle = !dragAccept && !dragReject\n\n assignRef(openRef, open)\n\n const getRootProps: PropGetter = useCallback(\n ({ ref, ...props } = {}) => {\n const { ref:
|
|
1
|
+
{"version":3,"file":"use-dropzone.js","names":["useDropzone","useOriginalDropzone","isArray","ariaAttr","dataAttr"],"sources":["../../../../src/components/dropzone/use-dropzone.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport type { Accept, DropzoneOptions } from \"react-dropzone\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { fromEvent } from \"file-selector\"\nimport { useCallback, useId } from \"react\"\nimport { useDropzone as useOriginalDropzone } from \"react-dropzone\"\nimport { mergeProps } from \"../../core\"\nimport { ariaAttr, assignRef, dataAttr, isArray, mergeRefs } from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport interface UseDropzoneProps\n extends Omit<HTMLProps, \"onDrop\" | \"onError\">, FieldProps {\n /**\n * Set accepted file types.\n */\n accept?: Accept | string[]\n /**\n * Set to true to focus the root element on render.\n *\n * @default false\n */\n autoFocus?: boolean\n /**\n * Use this to provide a custom file aggregator.\n */\n getFilesFromEvent?: DropzoneOptions[\"getFilesFromEvent\"]\n /**\n * If `true`, display the dropzone loading icon.\n *\n * @default false\n */\n loading?: boolean\n /**\n * Maximum accepted number of files.\n * The default value is 0 which means there is no limitation to how many files are accepted.\n *\n * @default 0\n */\n maxFiles?: number\n /**\n * Maximum file size (in bytes).\n *\n * @default Infinity\n */\n maxSize?: number\n /**\n * Minimum file size (in bytes).\n *\n * @default 0\n */\n minSize?: number\n /**\n * Allow drag and drop (or selection from the file dialog) of multiple files.\n *\n * @default false\n */\n multiple?: boolean\n /**\n * The HTML `name` attribute used for forms.\n */\n name?: string\n /**\n * If true, disables click to open the native file selection dialog.\n *\n * @default false\n */\n noClick?: boolean\n /**\n * If true, disables drag and drop.\n *\n * @default false\n */\n noDrag?: boolean\n /**\n * If true, stops drag event propagation to parents.\n *\n * @default false\n */\n noDragEventsBubbling?: boolean\n /**\n * If true, disables `space` and `enter` to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n *\n * @default false\n */\n noKeyboard?: boolean\n /**\n * Ref to a open function.\n */\n openRef?: RefObject<() => void>\n /**\n * If false, allow dropped items to take over the current browser window.\n *\n * @default true\n */\n preventDropOnDocument?: boolean\n /**\n * If true, use the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API) to read files.\n *\n * @default false\n */\n useFsAccessApi?: boolean\n /**\n * Custom validation function.\n * It must return null if there's no errors.\n */\n validator?: DropzoneOptions[\"validator\"]\n /**\n * Callback for when the dragenter event occurs.\n */\n onDragEnter?: DropzoneOptions[\"onDragEnter\"]\n /**\n * Callback for when the dragleave event occurs.\n */\n onDragLeave?: DropzoneOptions[\"onDragLeave\"]\n /**\n * Callback for when the dragover event occurs.\n */\n onDragOver?: DropzoneOptions[\"onDragOver\"]\n /**\n * Callback for when the drop event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n */\n onDrop?: DropzoneOptions[\"onDrop\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n */\n onDropAccepted?: DropzoneOptions[\"onDropAccepted\"]\n /**\n * Callback for when the drop event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n */\n onDropRejected?: DropzoneOptions[\"onDropRejected\"]\n /**\n * Callback for when there's some error from any of the promises.\n */\n onError?: DropzoneOptions[\"onError\"]\n /**\n * Callback for when closing the file dialog with no selection.\n */\n onFileDialogCancel?: DropzoneOptions[\"onFileDialogCancel\"]\n /**\n * Callback for when opening the file dialog.\n */\n onFileDialogOpen?: DropzoneOptions[\"onFileDialogOpen\"]\n}\n\nexport const useDropzone = (props: UseDropzoneProps = {}) => {\n const {\n props: {\n id,\n ref: refProp,\n name,\n accept,\n autoFocus = false,\n disabled,\n getFilesFromEvent = fromEvent,\n loading,\n maxFiles = 0,\n maxSize = Infinity,\n minSize = 0,\n multiple = false,\n noClick = false,\n noDrag = false,\n noDragEventsBubbling = false,\n noKeyboard = false,\n openRef,\n preventDropOnDocument = true,\n readOnly,\n useFsAccessApi = false,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const labelledbyId = useId()\n const interactive = !(loading || readOnly || disabled)\n const {\n acceptedFiles,\n fileRejections,\n isDragAccept: dragAccept,\n isDragActive: dragActive,\n isDragReject: dragReject,\n isFocused: focused,\n open,\n getInputProps: getOriginalInputProps,\n getRootProps: getOriginalRootProps,\n } = useOriginalDropzone({\n accept: isArray(accept)\n ? accept.reduce((prev, current) => ({ ...prev, [current]: [] }), {})\n : accept,\n autoFocus,\n disabled: !interactive,\n getFilesFromEvent,\n maxFiles,\n maxSize,\n minSize,\n multiple,\n noClick,\n noDrag,\n noDragEventsBubbling,\n noKeyboard,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onError,\n onFileDialogCancel,\n onFileDialogOpen,\n })\n const dragIdle = !dragAccept && !dragReject\n\n assignRef(openRef, open)\n\n const getRootProps: PropGetter = useCallback(\n ({ ref, ...props } = {}) => {\n const { ref: rootRef, ...rootProps } = getOriginalRootProps(\n mergeProps(\n dataProps,\n eventProps,\n {\n id: labelledbyId,\n \"aria-disabled\": ariaAttr(!interactive),\n \"data-accept\": dataAttr(dragAccept),\n \"data-idle\": dataAttr(dragIdle),\n \"data-loading\": dataAttr(loading),\n \"data-reject\": dataAttr(dragReject),\n },\n rest,\n props,\n )(),\n ) as HTMLProps\n\n return { ...rootProps, ref: mergeRefs(refProp, ref, rootRef) }\n },\n [\n getOriginalRootProps,\n labelledbyId,\n dataProps,\n eventProps,\n interactive,\n dragAccept,\n dragIdle,\n loading,\n dragReject,\n refProp,\n rest,\n ],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n getOriginalInputProps(\n mergeProps(\n ariaProps,\n dataProps,\n {\n id,\n name,\n \"aria-labelledby\": labelledbyId,\n disabled,\n readOnly,\n },\n props,\n )(),\n ),\n [\n getOriginalInputProps,\n id,\n name,\n disabled,\n readOnly,\n ariaProps,\n dataProps,\n labelledbyId,\n ],\n )\n\n return {\n acceptedFiles,\n dragAccept,\n dragActive,\n dragIdle,\n dragReject,\n fileRejections,\n focused,\n loading,\n open,\n getInputProps,\n getRootProps,\n }\n}\n\nexport type UseDropzoneReturn = ReturnType<typeof useDropzone>\n"],"mappings":";;;;;;;;;AAuJA,MAAaA,iBAAe,QAA0B,CAAC,MAAM;CAC3D,MAAM,EACJ,OAAO,EACL,IACA,KAAK,SACL,MACA,QACA,YAAY,OACZ,UACA,oBAAoB,WACpB,SACA,WAAW,GACX,UAAU,UACV,UAAU,GACV,WAAW,OACX,UAAU,OACV,SAAS,OACT,uBAAuB,OACvB,aAAa,OACb,SACA,wBAAwB,MACxB,UACA,iBAAiB,OACjB,WACA,aACA,aACA,YACA,QACA,gBACA,gBACA,SACA,oBACA,kBACA,GAAG,QAEL,WACA,WACA,eACE,cAAc,KAAK;CACvB,MAAM,eAAe,MAAM;CAC3B,MAAM,cAAc,EAAE,WAAW,YAAY;CAC7C,MAAM,EACJ,eACA,gBACA,cAAc,YACd,cAAc,YACd,cAAc,YACd,WAAW,SACX,MACA,eAAe,uBACf,cAAc,yBACZC,YAAoB;EACtB,SAAA,GAAQC,cAAAA,QAAAA,CAAQ,MAAM,IAClB,OAAO,QAAQ,MAAM,aAAa;GAAE,GAAG;IAAO,UAAU,CAAC;EAAE,IAAI,CAAC,CAAC,IACjE;EACJ;EACA,UAAU,CAAC;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,WAAW,CAAC,cAAc,CAAC;CAEjC,UAAU,SAAS,IAAI;CAEvB,MAAM,eAA2B,aAC9B,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM;EAC1B,MAAM,EAAE,KAAK,SAAS,GAAG,cAAc,qBACrC,WACE,WACA,YACA;GACE,IAAI;GACJ,kBAAA,GAAiBC,cAAAA,SAAAA,CAAS,CAAC,WAAW;GACtC,gBAAA,GAAeC,cAAAA,SAAAA,CAAS,UAAU;GAClC,cAAA,GAAaA,cAAAA,SAAAA,CAAS,QAAQ;GAC9B,iBAAA,GAAgBA,cAAAA,SAAAA,CAAS,OAAO;GAChC,gBAAA,GAAeA,cAAAA,SAAAA,CAAS,UAAU;EACpC,GACA,MACA,KACF,CAAC,CAAC,CACJ;EAEA,OAAO;GAAE,GAAG;GAAW,KAAK,UAAU,SAAS,KAAK,OAAO;EAAE;CAC/D,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CA8BA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAtCyC,aACxC,QAAQ,CAAC,MACR,sBACE,WACE,WACA,WACA;GACE;GACA;GACA,mBAAmB;GACnB;GACA;EACF,GACA,KACF,CAAC,CAAC,CACJ,GACF;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAaY;EACZ;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "
|
|
4
|
+
export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText">>, {
|
|
5
5
|
xs: {
|
|
6
6
|
empty: {
|
|
7
7
|
gap: "1.5";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "
|
|
4
|
+
export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "day" | "months" | "years" | "weeks" | "weekday" | "control", {
|
|
5
5
|
/**
|
|
6
6
|
* If `true`, the calendar will be fixed rows.
|
|
7
7
|
*
|
|
@@ -73,5 +73,5 @@ export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "ce
|
|
|
73
73
|
"--font-size": "fontSizes.xl";
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
}, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "
|
|
76
|
+
}, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "day" | "months" | "years" | "weeks" | "weekday" | "control">>>;
|
|
77
77
|
export type CalendarStyle = typeof calendarStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev" | "item" | "root" | "
|
|
4
|
+
export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev" | "item" | "root" | "trigger" | "indicator" | "indicators", CSSPropObject<CSSSlotObject<"list" | "next" | "prev" | "item" | "root" | "trigger" | "indicator" | "indicators">>, {
|
|
5
5
|
sm: {
|
|
6
6
|
root: {
|
|
7
7
|
h: "sm";
|
|
@@ -17,5 +17,5 @@ export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev"
|
|
|
17
17
|
h: "lg";
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
}, CSSModifierObject<CSSSlotObject<"list" | "next" | "prev" | "item" | "root" | "
|
|
20
|
+
}, CSSModifierObject<CSSSlotObject<"list" | "next" | "prev" | "item" | "root" | "trigger" | "indicator" | "indicators">>>;
|
|
21
21
|
export type CarouselStyle = typeof carouselStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const cartesianChartStyle: ComponentSlotStyle<"area" | "line" | "grid" | "bar" | "dot" | "root" | "
|
|
4
|
+
export declare const cartesianChartStyle: ComponentSlotStyle<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine", CSSPropObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>>;
|
|
5
5
|
export type CartesianChartStyle = typeof cartesianChartStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "
|
|
4
|
+
export declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
|
|
5
5
|
export type PolarChartStyle = typeof polarChartStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const colorPickerStyle: ComponentSlotStyle<"input" | "content" | "icon" | "colorSwatch" | "root" | "
|
|
4
|
+
export declare const colorPickerStyle: ComponentSlotStyle<"input" | "content" | "icon" | "colorSwatch" | "root" | "field" | "eyeDropper", CSSPropObject<CSSSlotObject<"input" | "content" | "icon" | "colorSwatch" | "root" | "field" | "eyeDropper">>, {
|
|
5
5
|
xs: {
|
|
6
6
|
field: {
|
|
7
7
|
fontSize: "1em";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const fieldStyle: ComponentSlotStyle<"label" | "
|
|
4
|
+
export declare const fieldStyle: ComponentSlotStyle<"label" | "root" | "errorMessage" | "helperMessage" | "requiredIndicator", {
|
|
5
5
|
/**
|
|
6
6
|
* The orientation of the field.
|
|
7
7
|
*/
|
|
@@ -35,5 +35,5 @@ export declare const fieldStyle: ComponentSlotStyle<"label" | "errorMessage" | "
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
}, CSSModifierObject<CSSSlotObject<"label" | "
|
|
38
|
+
}, CSSModifierObject<CSSSlotObject<"label" | "root" | "errorMessage" | "helperMessage" | "requiredIndicator">>, CSSModifierObject<CSSSlotObject<"label" | "root" | "errorMessage" | "helperMessage" | "requiredIndicator">>>;
|
|
39
39
|
export type FieldStyle = typeof fieldStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const fieldsetStyle: ComponentSlotStyle<"header" | "legend" | "content" | "
|
|
4
|
+
export declare const fieldsetStyle: ComponentSlotStyle<"header" | "legend" | "content" | "root" | "errorMessage" | "helperMessage", CSSPropObject<CSSSlotObject<"header" | "legend" | "content" | "root" | "errorMessage" | "helperMessage">>, {
|
|
5
5
|
sm: {
|
|
6
6
|
content: {
|
|
7
7
|
gap: "3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const selectStyle: ComponentSlotStyle<"label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "
|
|
3
|
+
export declare const selectStyle: ComponentSlotStyle<"label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText", {
|
|
4
4
|
/**
|
|
5
5
|
* If `true`, wrap the value text.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
|
|
3
3
|
import "../../index.js";
|
|
4
|
-
export declare const statStyle: ComponentSlotStyle<"label" | "value" | "icon" | "
|
|
4
|
+
export declare const statStyle: ComponentSlotStyle<"label" | "value" | "icon" | "root" | "helperMessage" | "unit", {
|
|
5
5
|
/**
|
|
6
6
|
* If `true`, container will center its children regardless of their width.
|
|
7
7
|
*
|
|
@@ -92,5 +92,5 @@ export declare const statStyle: ComponentSlotStyle<"label" | "value" | "icon" |
|
|
|
92
92
|
gap: "2";
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
-
}, CSSModifierObject<CSSSlotObject<"label" | "value" | "icon" | "
|
|
95
|
+
}, CSSModifierObject<CSSSlotObject<"label" | "value" | "icon" | "root" | "helperMessage" | "unit">>>;
|
|
96
96
|
export type StatStyle = typeof statStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const tagStyle: ComponentSlotStyle<"content" | "icon" | "closeButton" | "
|
|
3
|
+
export declare const tagStyle: ComponentSlotStyle<"content" | "icon" | "closeButton" | "root" | "endIcon" | "startIcon", {
|
|
4
4
|
/**
|
|
5
5
|
* If `true`, the tag is full rounded. Else, it'll be slightly round.
|
|
6
6
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.4-dev-
|
|
4
|
+
"version": "2.3.4-dev-20261116185022",
|
|
5
5
|
"description": "React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"yamada",
|
|
@@ -161,8 +161,8 @@
|
|
|
161
161
|
"@types/jsdom": "^28.0.1",
|
|
162
162
|
"@types/yamljs": "^0.2.34",
|
|
163
163
|
"@vitejs/plugin-react": "^6.2.1",
|
|
164
|
-
"@vitest/browser": "^
|
|
165
|
-
"@vitest/browser-playwright": "^
|
|
164
|
+
"@vitest/browser": "^5.1.0",
|
|
165
|
+
"@vitest/browser-playwright": "^5.1.0",
|
|
166
166
|
"@yamada-ui/workspace": "1.0.0",
|
|
167
167
|
"axe-core": "^4.14.0",
|
|
168
168
|
"axe-playwright": "^2.2.2",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"clean-package": "./clean-package.config.json",
|
|
190
190
|
"types": "dist/types/index.d.ts",
|
|
191
191
|
"scripts": {
|
|
192
|
-
"clean": "rimraf node_modules dist trace coverage storybook-static .turbo .vitest
|
|
192
|
+
"clean": "rimraf node_modules dist trace coverage storybook-static .turbo .vitest __screenshots__",
|
|
193
193
|
"prebuild": "pnpm gen:tokens",
|
|
194
194
|
"build": "tsdown",
|
|
195
195
|
"storybook": "storybook dev -p 6006 -c storybook",
|