@yamada-ui/react 2.3.4-dev-20261125044046 → 2.3.4-dev-20261125051717
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/action-bar/use-action-bar.cjs +1 -0
- package/dist/cjs/components/action-bar/use-action-bar.cjs.map +1 -1
- package/dist/cjs/components/tooltip/use-tooltip.cjs +3 -2
- package/dist/cjs/components/tooltip/use-tooltip.cjs.map +1 -1
- package/dist/esm/components/action-bar/use-action-bar.js +1 -0
- package/dist/esm/components/action-bar/use-action-bar.js.map +1 -1
- package/dist/esm/components/tooltip/use-tooltip.js +3 -2
- package/dist/esm/components/tooltip/use-tooltip.js.map +1 -1
- package/dist/types/components/accordion/accordion.style.d.ts +1 -1
- package/dist/types/components/avatar/avatar.d.ts +3 -3
- package/dist/types/components/avatar/avatar.style.d.ts +1 -1
- package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
- package/dist/types/components/bubble/bubble.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/polar-chart.style.d.ts +1 -1
- package/dist/types/components/data-list/data-list.style.d.ts +1 -1
- package/dist/types/components/flip/flip.d.ts +1 -1
- package/dist/types/components/flip/flip.style.d.ts +1 -1
- package/dist/types/components/list/list.style.d.ts +2 -2
- package/dist/types/components/marquee/marquee.style.d.ts +1 -1
- package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
- package/dist/types/components/notice/notice.style.d.ts +1 -1
- package/dist/types/components/number-input/number-input.style.d.ts +1 -1
- package/dist/types/components/pagination/pagination.style.d.ts +1 -1
- package/dist/types/components/rating/rating.style.d.ts +2 -2
- package/dist/types/components/reorder/reorder.style.d.ts +1 -1
- package/dist/types/components/resizable/resizable.style.d.ts +2 -2
- package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
- package/dist/types/components/steps/steps.style.d.ts +1 -1
- package/dist/types/components/timeline/timeline.d.ts +1 -1
- package/dist/types/components/timeline/timeline.style.d.ts +1 -1
- package/dist/types/components/tree/tree.style.d.ts +1 -1
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ const useActionBar = ({ closeOnEsc = true, defaultOpen, open: openProp, onClose:
|
|
|
17
17
|
});
|
|
18
18
|
const [contentId] = require_dom.useIds();
|
|
19
19
|
const onKeyDown = (0, react.useCallback)((ev) => {
|
|
20
|
+
if ((0, require_utils_index.utils_exports.isComposing)(ev)) return;
|
|
20
21
|
if (ev.key !== "Escape") return;
|
|
21
22
|
if (!closeOnEsc) return;
|
|
22
23
|
ev.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-action-bar.cjs","names":["useEnvironment","useDisclosure","useIds","useCallback","mergeProps"],"sources":["../../../../src/components/action-bar/use-action-bar.ts"],"sourcesContent":["\"use client\"\n\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport { useCallback } from \"react\"\nimport { mergeProps, useEnvironment } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { handlerAll, useIds } from \"../../utils\"\n\nexport interface UseActionBarProps\n extends HTMLProps, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the action bar will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n}\n\nexport const useActionBar = ({\n closeOnEsc = true,\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseActionBarProps = {}) => {\n const { getDocument } = useEnvironment()\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const [contentId] = useIds()\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n if (!closeOnEsc) return\n\n ev.stopPropagation()\n onClose()\n },\n [closeOnEsc, onClose],\n )\n\n useEventListener(getDocument(), \"keydown\", onKeyDown)\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) => mergeProps(rest, props)(),\n [rest],\n )\n\n const getOpenTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": open ? contentId : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"dialog\",\n ...props,\n onClick: handlerAll(props.onClick, onOpen),\n }),\n [contentId, onOpen, open],\n )\n\n const getCloseTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n ...props,\n onClick: handlerAll(props.onClick, onClose),\n }),\n [onClose],\n )\n\n const getContentProps: PropGetter<\"section\"> = useCallback(\n (props = {}) => ({\n id: contentId,\n role: \"dialog\",\n ...props,\n }),\n [contentId],\n )\n\n return {\n open,\n getCloseTriggerProps,\n getContentProps,\n getOpenTriggerProps,\n getRootProps,\n onClose,\n onOpen,\n }\n}\n\nexport type UseActionBarReturn = ReturnType<typeof useActionBar>\n"],"mappings":";;;;;;;;;AAoBA,MAAa,gBAAgB,EAC3B,aAAa,MACb,aACA,MAAM,UACN,SAAS,aACT,QAAQ,YACR,GAAG,SACkB,CAAC,MAAM;CAC5B,MAAM,EAAE,gBAAgBA,6BAAAA,eAAe;CACvC,MAAM,EAAE,MAAM,SAAS,WAAWC,uBAAAA,cAAc;EAC9C;EACA,MAAM;EACN,SAAS;EACT,QAAQ;CACV,CAAC;CACD,MAAM,CAAC,aAAaC,YAAAA,OAAO;CAE3B,MAAM,aAAA,GAAYC,MAAAA,YAAAA,EACf,OAAsB;EACrB,IAAI,GAAG,QAAQ,UAAU;EAEzB,IAAI,CAAC,YAAY;EAEjB,GAAG,gBAAgB;EACnB,QAAQ;CACV,GACA,CAAC,YAAY,OAAO,CACtB;CAEA,uCAAA,iBAAiB,YAAY,GAAG,WAAW,SAAS;CAEpD,MAAM,gBAAA,GAA2BA,MAAAA,YAAAA,EAC9B,QAAQ,CAAC,MAAMC,cAAAA,WAAW,MAAM,KAAK,CAAC,CAAC,GACxC,CAAC,IAAI,CACP;CAEA,MAAM,uBAAA,GAA4CD,MAAAA,YAAAA,EAC/C,QAAQ,CAAC,OAAO;EACf,iBAAiB,OAAO,YAAY,KAAA;EACpC,iBAAiB;EACjB,iBAAiB;EACjB,GAAG;EACH,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,SAAS,MAAM;CAC3C,IACA;EAAC;EAAW;EAAQ;CAAI,CAC1B;CAmBA,OAAO;EACL;EACA,uBAAA,GAnBiDA,MAAAA,YAAAA,EAChD,QAAQ,CAAC,OAAO;GACf,GAAG;GACH,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,SAAS,OAAO;EAC5C,IACA,CAAC,OAAO,CAcW;EACnB,kBAAA,GAZ6CA,MAAAA,YAAAA,EAC5C,QAAQ,CAAC,OAAO;GACf,IAAI;GACJ,MAAM;GACN,GAAG;EACL,IACA,CAAC,SAAS,CAMI;EACd;EACA;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"use-action-bar.cjs","names":["useEnvironment","useDisclosure","useIds","useCallback","mergeProps"],"sources":["../../../../src/components/action-bar/use-action-bar.ts"],"sourcesContent":["\"use client\"\n\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport { useCallback } from \"react\"\nimport { mergeProps, useEnvironment } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { handlerAll, isComposing, useIds } from \"../../utils\"\n\nexport interface UseActionBarProps\n extends HTMLProps, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the action bar will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n}\n\nexport const useActionBar = ({\n closeOnEsc = true,\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseActionBarProps = {}) => {\n const { getDocument } = useEnvironment()\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const [contentId] = useIds()\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (isComposing(ev)) return\n\n if (ev.key !== \"Escape\") return\n\n if (!closeOnEsc) return\n\n ev.stopPropagation()\n onClose()\n },\n [closeOnEsc, onClose],\n )\n\n useEventListener(getDocument(), \"keydown\", onKeyDown)\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) => mergeProps(rest, props)(),\n [rest],\n )\n\n const getOpenTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": open ? contentId : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"dialog\",\n ...props,\n onClick: handlerAll(props.onClick, onOpen),\n }),\n [contentId, onOpen, open],\n )\n\n const getCloseTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n ...props,\n onClick: handlerAll(props.onClick, onClose),\n }),\n [onClose],\n )\n\n const getContentProps: PropGetter<\"section\"> = useCallback(\n (props = {}) => ({\n id: contentId,\n role: \"dialog\",\n ...props,\n }),\n [contentId],\n )\n\n return {\n open,\n getCloseTriggerProps,\n getContentProps,\n getOpenTriggerProps,\n getRootProps,\n onClose,\n onOpen,\n }\n}\n\nexport type UseActionBarReturn = ReturnType<typeof useActionBar>\n"],"mappings":";;;;;;;;;AAoBA,MAAa,gBAAgB,EAC3B,aAAa,MACb,aACA,MAAM,UACN,SAAS,aACT,QAAQ,YACR,GAAG,SACkB,CAAC,MAAM;CAC5B,MAAM,EAAE,gBAAgBA,6BAAAA,eAAe;CACvC,MAAM,EAAE,MAAM,SAAS,WAAWC,uBAAAA,cAAc;EAC9C;EACA,MAAM;EACN,SAAS;EACT,QAAQ;CACV,CAAC;CACD,MAAM,CAAC,aAAaC,YAAAA,OAAO;CAE3B,MAAM,aAAA,GAAYC,MAAAA,YAAAA,EACf,OAAsB;EACrB,KAAA,GAAA,oBAAA,cAAI,YAAA,CAAY,EAAE,GAAG;EAErB,IAAI,GAAG,QAAQ,UAAU;EAEzB,IAAI,CAAC,YAAY;EAEjB,GAAG,gBAAgB;EACnB,QAAQ;CACV,GACA,CAAC,YAAY,OAAO,CACtB;CAEA,uCAAA,iBAAiB,YAAY,GAAG,WAAW,SAAS;CAEpD,MAAM,gBAAA,GAA2BA,MAAAA,YAAAA,EAC9B,QAAQ,CAAC,MAAMC,cAAAA,WAAW,MAAM,KAAK,CAAC,CAAC,GACxC,CAAC,IAAI,CACP;CAEA,MAAM,uBAAA,GAA4CD,MAAAA,YAAAA,EAC/C,QAAQ,CAAC,OAAO;EACf,iBAAiB,OAAO,YAAY,KAAA;EACpC,iBAAiB;EACjB,iBAAiB;EACjB,GAAG;EACH,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,SAAS,MAAM;CAC3C,IACA;EAAC;EAAW;EAAQ;CAAI,CAC1B;CAmBA,OAAO;EACL;EACA,uBAAA,GAnBiDA,MAAAA,YAAAA,EAChD,QAAQ,CAAC,OAAO;GACf,GAAG;GACH,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,SAAS,OAAO;EAC5C,IACA,CAAC,OAAO,CAcW;EACnB,kBAAA,GAZ6CA,MAAAA,YAAAA,EAC5C,QAAQ,CAAC,OAAO;GACf,IAAI;GACJ,MAAM;GACN,GAAG;EACL,IACA,CAAC,SAAS,CAMI;EACd;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -52,8 +52,9 @@ const useTooltip = (props = {}) => {
|
|
|
52
52
|
onForceClose();
|
|
53
53
|
}, closeDelay);
|
|
54
54
|
}, [closeDelay, onForceClose]);
|
|
55
|
-
require_hooks_use_event_listener_index.useEventListener(() => (0, require_utils_index.utils_exports.getDocument)(triggerRef.current), "keydown", (
|
|
56
|
-
if (
|
|
55
|
+
require_hooks_use_event_listener_index.useEventListener(() => (0, require_utils_index.utils_exports.getDocument)(triggerRef.current), "keydown", (ev) => {
|
|
56
|
+
if ((0, require_utils_index.utils_exports.isComposing)(ev)) return;
|
|
57
|
+
if (closeOnEsc && ev.key === "Escape") onDelayClose();
|
|
57
58
|
});
|
|
58
59
|
require_hooks_use_event_listener_index.useEventListener(() => (0, require_utils_index.utils_exports.getDocument)(triggerRef.current), "scroll", () => {
|
|
59
60
|
if (open && closeOnScroll) onForceClose();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.cjs","names":["usePopperProps","useId","useRef","useDisclosure","usePopper","useCallback","mergeProps","popperProps","useSplitProps"],"sources":["../../../../src/components/tooltip/use-tooltip.tsx"],"sourcesContent":["\"use client\"\n\nimport type { PointerEvent } from \"react\"\nimport type { PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UsePopperProps } from \"../../hooks/use-popper\"\nimport type { Dict } from \"../../utils\"\nimport { useCallback, useId, useRef } from \"react\"\nimport { mergeProps, useSplitProps } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { useOutsideClick } from \"../../hooks/use-outside-click\"\nimport { popperProps, usePopper, usePopperProps } from \"../../hooks/use-popper\"\nimport {\n dataAttr,\n getDocument,\n getWindow,\n handlerAll,\n useUnmountEffect,\n} from \"../../utils\"\n\nexport interface UseTooltipProps\n extends Omit<UseDisclosureProps, \"timing\">, UsePopperProps<\"button\"> {\n /**\n * The delay before hiding the tooltip.\n *\n * @default 100\n */\n closeDelay?: number\n /**\n * If `true`, the tooltip will hide on click.\n *\n * @default true\n */\n closeOnClick?: boolean\n /**\n * If `true`, the tooltip will hide on pressing Esc key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the tooltip will hide on scroll.\n *\n * @default false\n */\n closeOnScroll?: boolean\n /**\n * If `true`, the tooltip will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The delay before showing the tooltip.\n *\n * @default 400\n */\n openDelay?: number\n}\n\nexport const useTooltip = (props: UseTooltipProps = {}) => {\n const [\n popperProps,\n {\n closeDelay = 0,\n closeOnClick = true,\n closeOnEsc = true,\n closeOnScroll,\n defaultOpen,\n disabled,\n open: openProp,\n openDelay = 0,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n },\n ] = usePopperProps(props, [\"open\"])\n const describedbyId = useId()\n const triggerRef = useRef<HTMLButtonElement>(null)\n const openTimeout = useRef<NodeJS.Timeout>(undefined)\n const closeTimeout = useRef<NodeJS.Timeout>(undefined)\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const { getPopperProps, getReferenceProps } = usePopper({\n open,\n ...popperProps,\n })\n\n const onForceClose = useCallback(() => {\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n\n closeTimeout.current = undefined\n }\n\n onClose()\n }, [onClose])\n\n const onDelayOpen = useCallback(() => {\n if (!disabled && !openTimeout.current) {\n if (open) onForceClose()\n\n openTimeout.current = getWindow(triggerRef.current).setTimeout(\n onOpen,\n openDelay,\n )\n }\n }, [disabled, open, onForceClose, onOpen, openDelay])\n\n const onDelayClose = useCallback(() => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = getWindow(triggerRef.current).setTimeout(() => {\n onForceClose()\n }, closeDelay)\n }, [closeDelay, onForceClose])\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"keydown\",\n (
|
|
1
|
+
{"version":3,"file":"use-tooltip.cjs","names":["usePopperProps","useId","useRef","useDisclosure","usePopper","useCallback","mergeProps","popperProps","useSplitProps"],"sources":["../../../../src/components/tooltip/use-tooltip.tsx"],"sourcesContent":["\"use client\"\n\nimport type { PointerEvent } from \"react\"\nimport type { PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UsePopperProps } from \"../../hooks/use-popper\"\nimport type { Dict } from \"../../utils\"\nimport { useCallback, useId, useRef } from \"react\"\nimport { mergeProps, useSplitProps } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { useOutsideClick } from \"../../hooks/use-outside-click\"\nimport { popperProps, usePopper, usePopperProps } from \"../../hooks/use-popper\"\nimport {\n dataAttr,\n getDocument,\n getWindow,\n handlerAll,\n isComposing,\n useUnmountEffect,\n} from \"../../utils\"\n\nexport interface UseTooltipProps\n extends Omit<UseDisclosureProps, \"timing\">, UsePopperProps<\"button\"> {\n /**\n * The delay before hiding the tooltip.\n *\n * @default 100\n */\n closeDelay?: number\n /**\n * If `true`, the tooltip will hide on click.\n *\n * @default true\n */\n closeOnClick?: boolean\n /**\n * If `true`, the tooltip will hide on pressing Esc key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the tooltip will hide on scroll.\n *\n * @default false\n */\n closeOnScroll?: boolean\n /**\n * If `true`, the tooltip will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The delay before showing the tooltip.\n *\n * @default 400\n */\n openDelay?: number\n}\n\nexport const useTooltip = (props: UseTooltipProps = {}) => {\n const [\n popperProps,\n {\n closeDelay = 0,\n closeOnClick = true,\n closeOnEsc = true,\n closeOnScroll,\n defaultOpen,\n disabled,\n open: openProp,\n openDelay = 0,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n },\n ] = usePopperProps(props, [\"open\"])\n const describedbyId = useId()\n const triggerRef = useRef<HTMLButtonElement>(null)\n const openTimeout = useRef<NodeJS.Timeout>(undefined)\n const closeTimeout = useRef<NodeJS.Timeout>(undefined)\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const { getPopperProps, getReferenceProps } = usePopper({\n open,\n ...popperProps,\n })\n\n const onForceClose = useCallback(() => {\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n\n closeTimeout.current = undefined\n }\n\n onClose()\n }, [onClose])\n\n const onDelayOpen = useCallback(() => {\n if (!disabled && !openTimeout.current) {\n if (open) onForceClose()\n\n openTimeout.current = getWindow(triggerRef.current).setTimeout(\n onOpen,\n openDelay,\n )\n }\n }, [disabled, open, onForceClose, onOpen, openDelay])\n\n const onDelayClose = useCallback(() => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = getWindow(triggerRef.current).setTimeout(() => {\n onForceClose()\n }, closeDelay)\n }, [closeDelay, onForceClose])\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"keydown\",\n (ev) => {\n if (isComposing(ev)) return\n\n if (closeOnEsc && ev.key === \"Escape\") onDelayClose()\n },\n )\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"scroll\",\n () => {\n if (open && closeOnScroll) onForceClose()\n },\n )\n\n useOutsideClick({\n ref: triggerRef,\n enabled: open,\n handler: () => {\n onDelayClose()\n },\n })\n\n useUnmountEffect(() => {\n clearTimeout(openTimeout.current)\n clearTimeout(closeTimeout.current)\n })\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => {\n return getReferenceProps(\n mergeProps(\n props,\n {\n ref: triggerRef,\n \"aria-describedby\": open ? describedbyId : undefined,\n },\n {\n onBlur: onDelayClose,\n onClick: closeOnClick ? onDelayClose : undefined,\n onFocus: onDelayOpen,\n onPointerEnter: (ev: PointerEvent<HTMLButtonElement>) => {\n if (ev.pointerType !== \"touch\") onDelayOpen()\n },\n onPointerLeave: (ev: PointerEvent<HTMLButtonElement>) => {\n if (ev.pointerType !== \"touch\") onDelayClose()\n },\n },\n )(),\n )\n },\n [\n getReferenceProps,\n describedbyId,\n onDelayOpen,\n open,\n closeOnClick,\n onDelayClose,\n ],\n )\n\n const getPositionerProps: PropGetter = useCallback(\n (props) => {\n return getPopperProps(props)\n },\n [getPopperProps],\n )\n\n const getContentProps: PropGetter = useCallback(\n (props = {}) => ({\n id: describedbyId,\n \"data-close\": dataAttr(!open),\n \"data-open\": dataAttr(open),\n role: \"tooltip\",\n onPointerLeave: handlerAll(props.onPointerLeave, onDelayClose),\n ...props,\n }),\n [describedbyId, onDelayClose, open],\n )\n\n return {\n open,\n getContentProps,\n getPositionerProps,\n getTriggerProps,\n onClose: onForceClose,\n onDelayClose,\n onDelayOpen,\n onOpen,\n }\n}\n\nexport type UseTooltipReturn = ReturnType<typeof useTooltip>\n\nexport const tooltipProps: (keyof UseTooltipProps)[] = [\n ...popperProps,\n \"open\",\n \"defaultOpen\",\n \"onOpen\",\n \"onClose\",\n \"closeDelay\",\n \"closeOnClick\",\n \"closeOnEsc\",\n \"closeOnScroll\",\n \"disabled\",\n \"openDelay\",\n]\n\nexport const useTooltipProps = <\n Y extends Dict = Dict,\n M extends keyof UseTooltipProps = keyof UseTooltipProps,\n>(\n props: Y,\n omitKeys?: M[],\n) => {\n return useSplitProps(\n props,\n tooltipProps.filter((key) => !omitKeys?.includes(key as M)),\n ) as unknown as [\n keyof UseTooltipProps extends M\n ? UseTooltipProps\n : Omit<UseTooltipProps, M>,\n Omit<\n Y,\n keyof UseTooltipProps extends M\n ? keyof UseTooltipProps\n : Exclude<keyof UseTooltipProps, M>\n >,\n ]\n}\n"],"mappings":";;;;;;;;;;AA8DA,MAAa,cAAc,QAAyB,CAAC,MAAM;CACzD,MAAM,CACJ,aACA,EACE,aAAa,GACb,eAAe,MACf,aAAa,MACb,eACA,aACA,UACA,MAAM,UACN,YAAY,GACZ,SAAS,aACT,QAAQ,gBAERA,+BAAAA,eAAe,OAAO,CAAC,MAAM,CAAC;CAClC,MAAM,iBAAA,GAAgBC,MAAAA,MAAAA,CAAM;CAC5B,MAAM,cAAA,GAAaC,MAAAA,OAAAA,CAA0B,IAAI;CACjD,MAAM,eAAA,GAAcA,MAAAA,OAAAA,CAAuB,KAAA,C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OACA,aAAa,QAAQ,QAAQ,CAAC,UAAU,SAAS,GAAQ,CAAC,CAC5D;AAWF"}
|
|
@@ -17,6 +17,7 @@ const useActionBar = ({ closeOnEsc = true, defaultOpen, open: openProp, onClose:
|
|
|
17
17
|
});
|
|
18
18
|
const [contentId] = useIds();
|
|
19
19
|
const onKeyDown = useCallback((ev) => {
|
|
20
|
+
if ((0, utils_exports.isComposing)(ev)) return;
|
|
20
21
|
if (ev.key !== "Escape") return;
|
|
21
22
|
if (!closeOnEsc) return;
|
|
22
23
|
ev.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-action-bar.js","names":["handlerAll"],"sources":["../../../../src/components/action-bar/use-action-bar.ts"],"sourcesContent":["\"use client\"\n\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport { useCallback } from \"react\"\nimport { mergeProps, useEnvironment } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { handlerAll, useIds } from \"../../utils\"\n\nexport interface UseActionBarProps\n extends HTMLProps, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the action bar will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n}\n\nexport const useActionBar = ({\n closeOnEsc = true,\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseActionBarProps = {}) => {\n const { getDocument } = useEnvironment()\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const [contentId] = useIds()\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n if (!closeOnEsc) return\n\n ev.stopPropagation()\n onClose()\n },\n [closeOnEsc, onClose],\n )\n\n useEventListener(getDocument(), \"keydown\", onKeyDown)\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) => mergeProps(rest, props)(),\n [rest],\n )\n\n const getOpenTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": open ? contentId : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"dialog\",\n ...props,\n onClick: handlerAll(props.onClick, onOpen),\n }),\n [contentId, onOpen, open],\n )\n\n const getCloseTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n ...props,\n onClick: handlerAll(props.onClick, onClose),\n }),\n [onClose],\n )\n\n const getContentProps: PropGetter<\"section\"> = useCallback(\n (props = {}) => ({\n id: contentId,\n role: \"dialog\",\n ...props,\n }),\n [contentId],\n )\n\n return {\n open,\n getCloseTriggerProps,\n getContentProps,\n getOpenTriggerProps,\n getRootProps,\n onClose,\n onOpen,\n }\n}\n\nexport type UseActionBarReturn = ReturnType<typeof useActionBar>\n"],"mappings":";;;;;;;;;AAoBA,MAAa,gBAAgB,EAC3B,aAAa,MACb,aACA,MAAM,UACN,SAAS,aACT,QAAQ,YACR,GAAG,SACkB,CAAC,MAAM;CAC5B,MAAM,EAAE,gBAAgB,eAAe;CACvC,MAAM,EAAE,MAAM,SAAS,WAAW,cAAc;EAC9C;EACA,MAAM;EACN,SAAS;EACT,QAAQ;CACV,CAAC;CACD,MAAM,CAAC,aAAa,OAAO;CAE3B,MAAM,YAAY,aACf,OAAsB;EACrB,IAAI,GAAG,QAAQ,UAAU;EAEzB,IAAI,CAAC,YAAY;EAEjB,GAAG,gBAAgB;EACnB,QAAQ;CACV,GACA,CAAC,YAAY,OAAO,CACtB;CAEA,iBAAiB,YAAY,GAAG,WAAW,SAAS;CAEpD,MAAM,eAA2B,aAC9B,QAAQ,CAAC,MAAM,WAAW,MAAM,KAAK,CAAC,CAAC,GACxC,CAAC,IAAI,CACP;CAEA,MAAM,sBAA4C,aAC/C,QAAQ,CAAC,OAAO;EACf,iBAAiB,OAAO,YAAY,KAAA;EACpC,iBAAiB;EACjB,iBAAiB;EACjB,GAAG;EACH,UAAA,
|
|
1
|
+
{"version":3,"file":"use-action-bar.js","names":["isComposing","handlerAll"],"sources":["../../../../src/components/action-bar/use-action-bar.ts"],"sourcesContent":["\"use client\"\n\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport { useCallback } from \"react\"\nimport { mergeProps, useEnvironment } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { handlerAll, isComposing, useIds } from \"../../utils\"\n\nexport interface UseActionBarProps\n extends HTMLProps, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the action bar will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n}\n\nexport const useActionBar = ({\n closeOnEsc = true,\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseActionBarProps = {}) => {\n const { getDocument } = useEnvironment()\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const [contentId] = useIds()\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (isComposing(ev)) return\n\n if (ev.key !== \"Escape\") return\n\n if (!closeOnEsc) return\n\n ev.stopPropagation()\n onClose()\n },\n [closeOnEsc, onClose],\n )\n\n useEventListener(getDocument(), \"keydown\", onKeyDown)\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) => mergeProps(rest, props)(),\n [rest],\n )\n\n const getOpenTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": open ? contentId : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"dialog\",\n ...props,\n onClick: handlerAll(props.onClick, onOpen),\n }),\n [contentId, onOpen, open],\n )\n\n const getCloseTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n ...props,\n onClick: handlerAll(props.onClick, onClose),\n }),\n [onClose],\n )\n\n const getContentProps: PropGetter<\"section\"> = useCallback(\n (props = {}) => ({\n id: contentId,\n role: \"dialog\",\n ...props,\n }),\n [contentId],\n )\n\n return {\n open,\n getCloseTriggerProps,\n getContentProps,\n getOpenTriggerProps,\n getRootProps,\n onClose,\n onOpen,\n }\n}\n\nexport type UseActionBarReturn = ReturnType<typeof useActionBar>\n"],"mappings":";;;;;;;;;AAoBA,MAAa,gBAAgB,EAC3B,aAAa,MACb,aACA,MAAM,UACN,SAAS,aACT,QAAQ,YACR,GAAG,SACkB,CAAC,MAAM;CAC5B,MAAM,EAAE,gBAAgB,eAAe;CACvC,MAAM,EAAE,MAAM,SAAS,WAAW,cAAc;EAC9C;EACA,MAAM;EACN,SAAS;EACT,QAAQ;CACV,CAAC;CACD,MAAM,CAAC,aAAa,OAAO;CAE3B,MAAM,YAAY,aACf,OAAsB;EACrB,KAAA,GAAIA,cAAAA,YAAAA,CAAY,EAAE,GAAG;EAErB,IAAI,GAAG,QAAQ,UAAU;EAEzB,IAAI,CAAC,YAAY;EAEjB,GAAG,gBAAgB;EACnB,QAAQ;CACV,GACA,CAAC,YAAY,OAAO,CACtB;CAEA,iBAAiB,YAAY,GAAG,WAAW,SAAS;CAEpD,MAAM,eAA2B,aAC9B,QAAQ,CAAC,MAAM,WAAW,MAAM,KAAK,CAAC,CAAC,GACxC,CAAC,IAAI,CACP;CAEA,MAAM,sBAA4C,aAC/C,QAAQ,CAAC,OAAO;EACf,iBAAiB,OAAO,YAAY,KAAA;EACpC,iBAAiB;EACjB,iBAAiB;EACjB,GAAG;EACH,UAAA,GAASC,cAAAA,WAAAA,CAAW,MAAM,SAAS,MAAM;CAC3C,IACA;EAAC;EAAW;EAAQ;CAAI,CAC1B;CAmBA,OAAO;EACL;EACA,sBAnBiD,aAChD,QAAQ,CAAC,OAAO;GACf,GAAG;GACH,UAAA,GAASA,cAAAA,WAAAA,CAAW,MAAM,SAAS,OAAO;EAC5C,IACA,CAAC,OAAO,CAcW;EACnB,iBAZ6C,aAC5C,QAAQ,CAAC,OAAO;GACf,IAAI;GACJ,MAAM;GACN,GAAG;EACL,IACA,CAAC,SAAS,CAMI;EACd;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -52,8 +52,9 @@ const useTooltip = (props = {}) => {
|
|
|
52
52
|
onForceClose();
|
|
53
53
|
}, closeDelay);
|
|
54
54
|
}, [closeDelay, onForceClose]);
|
|
55
|
-
useEventListener(() => (0, utils_exports.getDocument)(triggerRef.current), "keydown", (
|
|
56
|
-
if (
|
|
55
|
+
useEventListener(() => (0, utils_exports.getDocument)(triggerRef.current), "keydown", (ev) => {
|
|
56
|
+
if ((0, utils_exports.isComposing)(ev)) return;
|
|
57
|
+
if (closeOnEsc && ev.key === "Escape") onDelayClose();
|
|
57
58
|
});
|
|
58
59
|
useEventListener(() => (0, utils_exports.getDocument)(triggerRef.current), "scroll", () => {
|
|
59
60
|
if (open && closeOnScroll) onForceClose();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.js","names":["getWindow","getDocument","dataAttr","handlerAll"],"sources":["../../../../src/components/tooltip/use-tooltip.tsx"],"sourcesContent":["\"use client\"\n\nimport type { PointerEvent } from \"react\"\nimport type { PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UsePopperProps } from \"../../hooks/use-popper\"\nimport type { Dict } from \"../../utils\"\nimport { useCallback, useId, useRef } from \"react\"\nimport { mergeProps, useSplitProps } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { useOutsideClick } from \"../../hooks/use-outside-click\"\nimport { popperProps, usePopper, usePopperProps } from \"../../hooks/use-popper\"\nimport {\n dataAttr,\n getDocument,\n getWindow,\n handlerAll,\n useUnmountEffect,\n} from \"../../utils\"\n\nexport interface UseTooltipProps\n extends Omit<UseDisclosureProps, \"timing\">, UsePopperProps<\"button\"> {\n /**\n * The delay before hiding the tooltip.\n *\n * @default 100\n */\n closeDelay?: number\n /**\n * If `true`, the tooltip will hide on click.\n *\n * @default true\n */\n closeOnClick?: boolean\n /**\n * If `true`, the tooltip will hide on pressing Esc key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the tooltip will hide on scroll.\n *\n * @default false\n */\n closeOnScroll?: boolean\n /**\n * If `true`, the tooltip will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The delay before showing the tooltip.\n *\n * @default 400\n */\n openDelay?: number\n}\n\nexport const useTooltip = (props: UseTooltipProps = {}) => {\n const [\n popperProps,\n {\n closeDelay = 0,\n closeOnClick = true,\n closeOnEsc = true,\n closeOnScroll,\n defaultOpen,\n disabled,\n open: openProp,\n openDelay = 0,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n },\n ] = usePopperProps(props, [\"open\"])\n const describedbyId = useId()\n const triggerRef = useRef<HTMLButtonElement>(null)\n const openTimeout = useRef<NodeJS.Timeout>(undefined)\n const closeTimeout = useRef<NodeJS.Timeout>(undefined)\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const { getPopperProps, getReferenceProps } = usePopper({\n open,\n ...popperProps,\n })\n\n const onForceClose = useCallback(() => {\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n\n closeTimeout.current = undefined\n }\n\n onClose()\n }, [onClose])\n\n const onDelayOpen = useCallback(() => {\n if (!disabled && !openTimeout.current) {\n if (open) onForceClose()\n\n openTimeout.current = getWindow(triggerRef.current).setTimeout(\n onOpen,\n openDelay,\n )\n }\n }, [disabled, open, onForceClose, onOpen, openDelay])\n\n const onDelayClose = useCallback(() => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = getWindow(triggerRef.current).setTimeout(() => {\n onForceClose()\n }, closeDelay)\n }, [closeDelay, onForceClose])\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"keydown\",\n (
|
|
1
|
+
{"version":3,"file":"use-tooltip.js","names":["getWindow","getDocument","isComposing","dataAttr","handlerAll"],"sources":["../../../../src/components/tooltip/use-tooltip.tsx"],"sourcesContent":["\"use client\"\n\nimport type { PointerEvent } from \"react\"\nimport type { PropGetter } from \"../../core\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UsePopperProps } from \"../../hooks/use-popper\"\nimport type { Dict } from \"../../utils\"\nimport { useCallback, useId, useRef } from \"react\"\nimport { mergeProps, useSplitProps } from \"../../core\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport { useEventListener } from \"../../hooks/use-event-listener\"\nimport { useOutsideClick } from \"../../hooks/use-outside-click\"\nimport { popperProps, usePopper, usePopperProps } from \"../../hooks/use-popper\"\nimport {\n dataAttr,\n getDocument,\n getWindow,\n handlerAll,\n isComposing,\n useUnmountEffect,\n} from \"../../utils\"\n\nexport interface UseTooltipProps\n extends Omit<UseDisclosureProps, \"timing\">, UsePopperProps<\"button\"> {\n /**\n * The delay before hiding the tooltip.\n *\n * @default 100\n */\n closeDelay?: number\n /**\n * If `true`, the tooltip will hide on click.\n *\n * @default true\n */\n closeOnClick?: boolean\n /**\n * If `true`, the tooltip will hide on pressing Esc key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the tooltip will hide on scroll.\n *\n * @default false\n */\n closeOnScroll?: boolean\n /**\n * If `true`, the tooltip will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The delay before showing the tooltip.\n *\n * @default 400\n */\n openDelay?: number\n}\n\nexport const useTooltip = (props: UseTooltipProps = {}) => {\n const [\n popperProps,\n {\n closeDelay = 0,\n closeOnClick = true,\n closeOnEsc = true,\n closeOnScroll,\n defaultOpen,\n disabled,\n open: openProp,\n openDelay = 0,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n },\n ] = usePopperProps(props, [\"open\"])\n const describedbyId = useId()\n const triggerRef = useRef<HTMLButtonElement>(null)\n const openTimeout = useRef<NodeJS.Timeout>(undefined)\n const closeTimeout = useRef<NodeJS.Timeout>(undefined)\n const { open, onClose, onOpen } = useDisclosure({\n defaultOpen,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const { getPopperProps, getReferenceProps } = usePopper({\n open,\n ...popperProps,\n })\n\n const onForceClose = useCallback(() => {\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n\n closeTimeout.current = undefined\n }\n\n onClose()\n }, [onClose])\n\n const onDelayOpen = useCallback(() => {\n if (!disabled && !openTimeout.current) {\n if (open) onForceClose()\n\n openTimeout.current = getWindow(triggerRef.current).setTimeout(\n onOpen,\n openDelay,\n )\n }\n }, [disabled, open, onForceClose, onOpen, openDelay])\n\n const onDelayClose = useCallback(() => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = getWindow(triggerRef.current).setTimeout(() => {\n onForceClose()\n }, closeDelay)\n }, [closeDelay, onForceClose])\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"keydown\",\n (ev) => {\n if (isComposing(ev)) return\n\n if (closeOnEsc && ev.key === \"Escape\") onDelayClose()\n },\n )\n\n useEventListener(\n () => getDocument(triggerRef.current),\n \"scroll\",\n () => {\n if (open && closeOnScroll) onForceClose()\n },\n )\n\n useOutsideClick({\n ref: triggerRef,\n enabled: open,\n handler: () => {\n onDelayClose()\n },\n })\n\n useUnmountEffect(() => {\n clearTimeout(openTimeout.current)\n clearTimeout(closeTimeout.current)\n })\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => {\n return getReferenceProps(\n mergeProps(\n props,\n {\n ref: triggerRef,\n \"aria-describedby\": open ? describedbyId : undefined,\n },\n {\n onBlur: onDelayClose,\n onClick: closeOnClick ? onDelayClose : undefined,\n onFocus: onDelayOpen,\n onPointerEnter: (ev: PointerEvent<HTMLButtonElement>) => {\n if (ev.pointerType !== \"touch\") onDelayOpen()\n },\n onPointerLeave: (ev: PointerEvent<HTMLButtonElement>) => {\n if (ev.pointerType !== \"touch\") onDelayClose()\n },\n },\n )(),\n )\n },\n [\n getReferenceProps,\n describedbyId,\n onDelayOpen,\n open,\n closeOnClick,\n onDelayClose,\n ],\n )\n\n const getPositionerProps: PropGetter = useCallback(\n (props) => {\n return getPopperProps(props)\n },\n [getPopperProps],\n )\n\n const getContentProps: PropGetter = useCallback(\n (props = {}) => ({\n id: describedbyId,\n \"data-close\": dataAttr(!open),\n \"data-open\": dataAttr(open),\n role: \"tooltip\",\n onPointerLeave: handlerAll(props.onPointerLeave, onDelayClose),\n ...props,\n }),\n [describedbyId, onDelayClose, open],\n )\n\n return {\n open,\n getContentProps,\n getPositionerProps,\n getTriggerProps,\n onClose: onForceClose,\n onDelayClose,\n onDelayOpen,\n onOpen,\n }\n}\n\nexport type UseTooltipReturn = ReturnType<typeof useTooltip>\n\nexport const tooltipProps: (keyof UseTooltipProps)[] = [\n ...popperProps,\n \"open\",\n \"defaultOpen\",\n \"onOpen\",\n \"onClose\",\n \"closeDelay\",\n \"closeOnClick\",\n \"closeOnEsc\",\n \"closeOnScroll\",\n \"disabled\",\n \"openDelay\",\n]\n\nexport const useTooltipProps = <\n Y extends Dict = Dict,\n M extends keyof UseTooltipProps = keyof UseTooltipProps,\n>(\n props: Y,\n omitKeys?: M[],\n) => {\n return useSplitProps(\n props,\n tooltipProps.filter((key) => !omitKeys?.includes(key as M)),\n ) as unknown as [\n keyof UseTooltipProps extends M\n ? UseTooltipProps\n : Omit<UseTooltipProps, M>,\n Omit<\n Y,\n keyof UseTooltipProps extends M\n ? keyof UseTooltipProps\n : Exclude<keyof UseTooltipProps, M>\n >,\n ]\n}\n"],"mappings":";;;;;;;;;;AA8DA,MAAa,cAAc,QAAyB,CAAC,MAAM;CACzD,MAAM,CACJ,aACA,EACE,aAAa,GACb,eAAe,MACf,aAAa,MACb,eACA,a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 -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 accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "
|
|
4
|
+
export declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
|
|
5
5
|
panel: {
|
|
6
6
|
button: {
|
|
7
7
|
rounded: "l2";
|
|
@@ -21,7 +21,7 @@ export interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, U
|
|
|
21
21
|
*/
|
|
22
22
|
imageProps?: AvatarImageProps;
|
|
23
23
|
}
|
|
24
|
-
declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "
|
|
24
|
+
declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
|
|
25
25
|
shape: {
|
|
26
26
|
circle: {
|
|
27
27
|
root: {
|
|
@@ -140,7 +140,7 @@ declare const component: <H extends "fragment" | As = "div", R extends import("@
|
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
-
}>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: import("react").Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "
|
|
143
|
+
}>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: import("react").Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
|
|
144
144
|
shape: {
|
|
145
145
|
circle: {
|
|
146
146
|
root: {
|
|
@@ -259,7 +259,7 @@ declare const component: <H extends "fragment" | As = "div", R extends import("@
|
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
|
-
}>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, import("@yamada-ui/utils").Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "
|
|
262
|
+
}>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, import("@yamada-ui/utils").Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
|
|
263
263
|
shape: {
|
|
264
264
|
circle: {
|
|
265
265
|
root: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const avatarStyle: ComponentSlotStyle<"image" | "group" | "
|
|
3
|
+
export declare const avatarStyle: ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
|
|
4
4
|
/**
|
|
5
5
|
* The shape of the component
|
|
6
6
|
*
|
|
@@ -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 breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "
|
|
4
|
+
export declare const breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "item" | "root", CSSPropObject<CSSSlotObject<"link" | "list" | "separator" | "ellipsis" | "item" | "root">>, {
|
|
5
5
|
sm: {
|
|
6
6
|
list: {
|
|
7
7
|
fontSize: "sm";
|
|
@@ -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 bubbleStyle: ComponentSlotStyle<"content" | "group" | "
|
|
4
|
+
export declare const bubbleStyle: ComponentSlotStyle<"content" | "group" | "item" | "root" | "reactions", CSSPropObject<CSSSlotObject<"content" | "group" | "item" | "root" | "reactions">>, {
|
|
5
5
|
sm: {
|
|
6
6
|
content: {
|
|
7
7
|
"--space-y": "spaces.2";
|
|
@@ -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" | "root" | "month" | "week" | "weekday" | "day" | "months" | "years" | "weeks" | "control"
|
|
4
|
+
export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "weekday" | "day" | "months" | "years" | "weeks" | "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" | "root" | "month" | "week" | "weekday" | "day" | "months" | "years" | "weeks" | "control"
|
|
76
|
+
}, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "weekday" | "day" | "months" | "years" | "weeks" | "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" | "
|
|
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" | "root"
|
|
|
17
17
|
h: "lg";
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
}, CSSModifierObject<CSSSlotObject<"list" | "next" | "
|
|
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 polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "
|
|
4
|
+
export declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "labelList" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "labelList" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "labelList" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "labelList" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
|
|
5
5
|
export type PolarChartStyle = typeof polarChartStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const dataListStyle: ComponentSlotStyle<"term" | "
|
|
3
|
+
export declare const dataListStyle: ComponentSlotStyle<"term" | "item" | "root" | "description", {
|
|
4
4
|
/**
|
|
5
5
|
* The orientation of the data list.
|
|
6
6
|
*
|
|
@@ -67,5 +67,5 @@ declare const FlipPropsContext: import("react").Context<Partial<FlipProps> | und
|
|
|
67
67
|
*
|
|
68
68
|
* @see https://yamada-ui.com/docs/components/flip
|
|
69
69
|
*/
|
|
70
|
-
export declare const Flip: Component<({ defaultValue, delay, disabled, duration, from, orientation, readOnly, to, transition, value: valueProp, onChange, onClick: onClickProp, ...rest }: WithoutThemeProps<FlipProps, ComponentSlotStyle<"from" | "to" | "
|
|
70
|
+
export declare const Flip: Component<({ defaultValue, delay, disabled, duration, from, orientation, readOnly, to, transition, value: valueProp, onChange, onClick: onClickProp, ...rest }: WithoutThemeProps<FlipProps, ComponentSlotStyle<"from" | "to" | "item" | "root", CSSPropObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>>, keyof FlipProps>) => import("react").JSX.Element, FlipProps>;
|
|
71
71
|
export { FlipPropsContext, useFlipPropsContext };
|
|
@@ -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 flipStyle: ComponentSlotStyle<"from" | "to" | "
|
|
4
|
+
export declare const flipStyle: ComponentSlotStyle<"from" | "to" | "item" | "root", CSSPropObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>>;
|
|
5
5
|
export type FlipStyle = typeof flipStyle;
|
|
@@ -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 listStyle: ComponentSlotStyle<"icon" | "
|
|
4
|
+
export declare const listStyle: ComponentSlotStyle<"icon" | "item" | "root", {
|
|
5
5
|
styleType: {
|
|
6
6
|
circle: {
|
|
7
7
|
root: {
|
|
@@ -35,5 +35,5 @@ export declare const listStyle: ComponentSlotStyle<"icon" | "root" | "item", {
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
}, CSSModifierObject<CSSSlotObject<"icon" | "
|
|
38
|
+
}, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root">>>;
|
|
39
39
|
export type ListStyle = typeof listStyle;
|
|
@@ -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 marqueeStyle: ComponentSlotStyle<"content" | "group" | "
|
|
4
|
+
export declare const marqueeStyle: ComponentSlotStyle<"content" | "group" | "item" | "root" | "edge", CSSPropObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>>;
|
|
5
5
|
export type MarqueeStyle = typeof marqueeStyle;
|
|
@@ -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 nativeAccordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "
|
|
4
|
+
export declare const nativeAccordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", {
|
|
5
5
|
/**
|
|
6
6
|
* If `true`, animate the accordion items when they are expanded or collapsed.
|
|
7
7
|
*
|
|
@@ -31,7 +31,7 @@ export declare const nativeAccordionStyle: ComponentSlotStyle<"button" | "panel"
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
}, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "
|
|
34
|
+
}, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
|
|
35
35
|
panel: {
|
|
36
36
|
button: {
|
|
37
37
|
rounded: "l2";
|
|
@@ -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 noticeStyle: ComponentSlotStyle<"content" | "
|
|
4
|
+
export declare const noticeStyle: ComponentSlotStyle<"content" | "item" | "root" | "closeButton", CSSPropObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>, CSSModifierObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>, CSSModifierObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>>;
|
|
5
5
|
export type NoticeStyle = typeof noticeStyle;
|
|
@@ -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 numberInputStyle: ComponentSlotStyle<"button" | "root" | "field" | "
|
|
4
|
+
export declare const numberInputStyle: ComponentSlotStyle<"button" | "root" | "field" | "control" | "decrement" | "increment", CSSPropObject<CSSSlotObject<"button" | "root" | "field" | "control" | "decrement" | "increment">>, {
|
|
5
5
|
xs: {
|
|
6
6
|
control: {
|
|
7
7
|
boxSize: "calc({--height} - {spaces.2})";
|
|
@@ -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 paginationStyle: ComponentSlotStyle<"text" | "
|
|
4
|
+
export declare const paginationStyle: ComponentSlotStyle<"text" | "item" | "root", CSSPropObject<CSSSlotObject<"text" | "item" | "root">>, {
|
|
5
5
|
xs: {
|
|
6
6
|
item: {
|
|
7
7
|
fontSize: "{font-size}";
|
|
@@ -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 ratingStyle: ComponentSlotStyle<"group" | "icon" | "
|
|
4
|
+
export declare const ratingStyle: ComponentSlotStyle<"group" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"group" | "icon" | "item" | "root">>, {
|
|
5
5
|
xs: {
|
|
6
6
|
icon: {
|
|
7
7
|
fontSize: "md";
|
|
@@ -27,5 +27,5 @@ export declare const ratingStyle: ComponentSlotStyle<"group" | "icon" | "root" |
|
|
|
27
27
|
fontSize: "3xl";
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
}, CSSModifierObject<CSSSlotObject<"group" | "icon" | "
|
|
30
|
+
}, CSSModifierObject<CSSSlotObject<"group" | "icon" | "item" | "root">>>;
|
|
31
31
|
export type RatingStyle = typeof ratingStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const reorderStyle: ComponentSlotStyle<"
|
|
3
|
+
export declare const reorderStyle: ComponentSlotStyle<"item" | "root" | "trigger", {
|
|
4
4
|
/**
|
|
5
5
|
* The orientation of the reorder.
|
|
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 resizableStyle: ComponentSlotStyle<"icon" | "
|
|
4
|
+
export declare const resizableStyle: ComponentSlotStyle<"icon" | "item" | "root" | "trigger", {
|
|
5
5
|
/**
|
|
6
6
|
* The orientation of the resizable.
|
|
7
7
|
*
|
|
@@ -19,7 +19,7 @@ export declare const resizableStyle: ComponentSlotStyle<"icon" | "root" | "item"
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
}, CSSModifierObject<CSSSlotObject<"icon" | "
|
|
22
|
+
}, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root" | "trigger">>, {
|
|
23
23
|
border: {
|
|
24
24
|
icon: {
|
|
25
25
|
bg: "colorScheme.muted";
|
|
@@ -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 segmentedControlStyle: ComponentSlotStyle<"
|
|
4
|
+
export declare const segmentedControlStyle: ComponentSlotStyle<"item" | "root" | "indicator", {
|
|
5
5
|
/**
|
|
6
6
|
* If `true`, the segmented control will be full rounded.
|
|
7
7
|
*
|
|
@@ -113,5 +113,5 @@ export declare const segmentedControlStyle: ComponentSlotStyle<"root" | "item" |
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
-
}, CSSModifierObject<CSSSlotObject<"
|
|
116
|
+
}, CSSModifierObject<CSSSlotObject<"item" | "root" | "indicator">>>;
|
|
117
117
|
export type SegmentedControlStyle = typeof segmentedControlStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const stepsStyle: ComponentSlotStyle<"title" | "list" | "separator" | "
|
|
3
|
+
export declare const stepsStyle: ComponentSlotStyle<"title" | "list" | "separator" | "item" | "root" | "description" | "indicator", {
|
|
4
4
|
/**
|
|
5
5
|
* The orientation of the steps.
|
|
6
6
|
*
|
|
@@ -61,7 +61,7 @@ declare const TimelinePropsContext: import("react").Context<Partial<TimelineRoot
|
|
|
61
61
|
*
|
|
62
62
|
* @see https://yamada-ui.com/docs/components/timeline
|
|
63
63
|
*/
|
|
64
|
-
export declare const TimelineRoot: Component<({ variant: variantProp, children, index, items, ...rest }: WithoutThemeProps<TimelineRootProps, ComponentSlotStyle<"title" | "content" | "
|
|
64
|
+
export declare const TimelineRoot: Component<({ variant: variantProp, children, index, items, ...rest }: WithoutThemeProps<TimelineRootProps, ComponentSlotStyle<"title" | "content" | "item" | "root" | "description" | "indicator" | "connector", {
|
|
65
65
|
align: {
|
|
66
66
|
center: {
|
|
67
67
|
content: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const timelineStyle: ComponentSlotStyle<"title" | "content" | "
|
|
3
|
+
export declare const timelineStyle: ComponentSlotStyle<"title" | "content" | "item" | "root" | "description" | "indicator" | "connector", {
|
|
4
4
|
/**
|
|
5
5
|
* The alignment of the timeline.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentSlotStyle } from "../../core/system/index.type.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
export declare const treeStyle: ComponentSlotStyle<"label" | "checkbox" | "group" | "end" | "start" | "element" | "
|
|
3
|
+
export declare const treeStyle: ComponentSlotStyle<"label" | "checkbox" | "group" | "end" | "start" | "element" | "item" | "root" | "indicator", {
|
|
4
4
|
/**
|
|
5
5
|
* The shape of the component
|
|
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-20261125051717",
|
|
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",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"@emotion/utils": "^1.4.2",
|
|
127
127
|
"@floating-ui/react-dom": "^2.1.9",
|
|
128
128
|
"@tanstack/react-table": "^8.21.3",
|
|
129
|
-
"@yamada-ui/utils": "2.4.0-dev-
|
|
129
|
+
"@yamada-ui/utils": "2.4.0-dev-20261125051717",
|
|
130
130
|
"copy-to-clipboard": "3.3.3",
|
|
131
131
|
"csstype": "^3.2.3",
|
|
132
132
|
"dayjs": "^1.11.23",
|