@yamada-ui/react 2.3.0-dev-20261026051151 → 2.3.0-dev-20261026083634
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/hooks/use-focus/index.cjs +7 -14
- package/dist/cjs/hooks/use-focus/index.cjs.map +1 -1
- package/dist/esm/hooks/use-focus/index.js +8 -15
- package/dist/esm/hooks/use-focus/index.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/chart/polar-chart.style.d.ts +1 -1
- package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
- package/dist/types/components/editable/editable.d.ts +1 -1
- package/dist/types/components/editable/editable.style.d.ts +1 -1
- package/dist/types/components/number-input/number-input.style.d.ts +1 -1
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
17
17
|
}) => {
|
|
18
18
|
const trulyShouldFocus = shouldFocus && visible;
|
|
19
19
|
const focused = (0, react.useRef)(false);
|
|
20
|
+
const focusFrame = (0, react.useRef)(0);
|
|
20
21
|
const getTarget = (0, react.useCallback)(() => {
|
|
21
22
|
return require_ref.isRefObject(refOrEl) ? refOrEl.current : refOrEl;
|
|
22
23
|
}, [refOrEl]);
|
|
@@ -29,22 +30,12 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
29
30
|
const rootNode = target.getRootNode();
|
|
30
31
|
const root = (0, require_utils_index.utils_exports.isShadowRoot)(rootNode) ? rootNode : (0, require_utils_index.utils_exports.getDocument)(target);
|
|
31
32
|
if ((0, require_utils_index.utils_exports.contains)(target, (0, require_utils_index.utils_exports.getActiveElement)(root))) return;
|
|
32
|
-
const focusTarget = getFocusTarget();
|
|
33
|
-
|
|
33
|
+
const focusTarget = getFocusTarget() ?? (0, require_utils_index.utils_exports.getFirstFocusableElement)(target) ?? target;
|
|
34
|
+
cancelAnimationFrame(focusFrame.current);
|
|
35
|
+
focusFrame.current = requestAnimationFrame(() => {
|
|
34
36
|
focusTarget.focus({ preventScroll });
|
|
35
37
|
focused.current = true;
|
|
36
38
|
});
|
|
37
|
-
else {
|
|
38
|
-
const firstFocusable = (0, require_utils_index.utils_exports.getFirstFocusableElement)(target);
|
|
39
|
-
if (firstFocusable) requestAnimationFrame(() => {
|
|
40
|
-
firstFocusable.focus({ preventScroll });
|
|
41
|
-
focused.current = true;
|
|
42
|
-
});
|
|
43
|
-
else requestAnimationFrame(() => {
|
|
44
|
-
target.focus({ preventScroll });
|
|
45
|
-
focused.current = true;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
39
|
}, [
|
|
49
40
|
getTarget,
|
|
50
41
|
trulyShouldFocus,
|
|
@@ -55,8 +46,10 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
55
46
|
focused.current = !trulyShouldFocus;
|
|
56
47
|
}, [trulyShouldFocus]);
|
|
57
48
|
require_effect.useUpdateEffect(() => {
|
|
58
|
-
requestAnimationFrame(onFocus);
|
|
49
|
+
const frame = requestAnimationFrame(onFocus);
|
|
50
|
+
return () => cancelAnimationFrame(frame);
|
|
59
51
|
}, [onFocus]);
|
|
52
|
+
(0, react.useEffect)(() => () => cancelAnimationFrame(focusFrame.current), [onFocus]);
|
|
60
53
|
require_hooks_use_event_listener_index.useEventListener(getTarget, "transitionend", onFocus);
|
|
61
54
|
};
|
|
62
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["useRef","useCallback","isRefObject"],"sources":["../../../../src/hooks/use-focus/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport { useCallback, useRef } from \"react\"\nimport {\n contains,\n getActiveElement,\n getDocument,\n getFirstFocusableElement,\n isRefObject,\n isSafari,\n isShadowRoot,\n useUpdateEffect,\n} from \"../../utils\"\nimport { useEventListener } from \"../use-event-listener\"\n\nexport interface UseFocusOnShowProps {\n focusTarget?: HTMLElement | null | RefObject<HTMLElement | null>\n preventScroll?: boolean\n shouldFocus?: boolean\n visible?: boolean\n}\n\n/**\n * `useFocusOnShow` is a custom hook that focuses on the target element when it is shown.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-show\n */\nexport const useFocusOnShow = <Y extends HTMLElement>(\n refOrEl: RefObject<null | Y> | Y,\n {\n focusTarget: focusRefOrEl,\n preventScroll,\n shouldFocus,\n visible,\n }: UseFocusOnShowProps = {\n preventScroll: true,\n shouldFocus: false,\n },\n) => {\n const trulyShouldFocus = shouldFocus && visible\n const focused = useRef(false)\n\n const getTarget = useCallback(() => {\n return isRefObject(refOrEl) ? refOrEl.current : refOrEl\n }, [refOrEl])\n\n const getFocusTarget = useCallback(() => {\n return isRefObject(focusRefOrEl) ? focusRefOrEl.current : focusRefOrEl\n }, [focusRefOrEl])\n\n const onFocus = useCallback(() => {\n const target = getTarget()\n\n if (!target || !trulyShouldFocus || focused.current) return\n const rootNode = target.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(target)\n if (contains(target, getActiveElement(root))) return\n\n const focusTarget
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["useRef","useCallback","isRefObject"],"sources":["../../../../src/hooks/use-focus/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport { useCallback, useEffect, useRef } from \"react\"\nimport {\n contains,\n getActiveElement,\n getDocument,\n getFirstFocusableElement,\n isRefObject,\n isSafari,\n isShadowRoot,\n useUpdateEffect,\n} from \"../../utils\"\nimport { useEventListener } from \"../use-event-listener\"\n\nexport interface UseFocusOnShowProps {\n focusTarget?: HTMLElement | null | RefObject<HTMLElement | null>\n preventScroll?: boolean\n shouldFocus?: boolean\n visible?: boolean\n}\n\n/**\n * `useFocusOnShow` is a custom hook that focuses on the target element when it is shown.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-show\n */\nexport const useFocusOnShow = <Y extends HTMLElement>(\n refOrEl: RefObject<null | Y> | Y,\n {\n focusTarget: focusRefOrEl,\n preventScroll,\n shouldFocus,\n visible,\n }: UseFocusOnShowProps = {\n preventScroll: true,\n shouldFocus: false,\n },\n) => {\n const trulyShouldFocus = shouldFocus && visible\n const focused = useRef(false)\n const focusFrame = useRef(0)\n\n const getTarget = useCallback(() => {\n return isRefObject(refOrEl) ? refOrEl.current : refOrEl\n }, [refOrEl])\n\n const getFocusTarget = useCallback(() => {\n return isRefObject(focusRefOrEl) ? focusRefOrEl.current : focusRefOrEl\n }, [focusRefOrEl])\n\n const onFocus = useCallback(() => {\n const target = getTarget()\n\n if (!target || !trulyShouldFocus || focused.current) return\n const rootNode = target.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(target)\n if (contains(target, getActiveElement(root))) return\n\n const focusTarget =\n getFocusTarget() ?? getFirstFocusableElement(target) ?? target\n\n cancelAnimationFrame(focusFrame.current)\n focusFrame.current = requestAnimationFrame(() => {\n focusTarget.focus({ preventScroll })\n\n focused.current = true\n })\n }, [getTarget, trulyShouldFocus, getFocusTarget, preventScroll])\n\n useUpdateEffect(() => {\n focused.current = !trulyShouldFocus\n }, [trulyShouldFocus])\n\n useUpdateEffect(() => {\n const frame = requestAnimationFrame(onFocus)\n\n return () => cancelAnimationFrame(frame)\n }, [onFocus])\n\n useEffect(() => () => cancelAnimationFrame(focusFrame.current), [onFocus])\n\n useEventListener(getTarget, \"transitionend\", onFocus)\n}\n\nexport interface UseFocusOnMouseDownProps {\n ref: RefObject<HTMLElement | null>\n elements?: (HTMLElement | null | RefObject<HTMLElement | null>)[]\n enabled?: boolean\n}\n\n/**\n * `useFocusOnPointerDown` is a custom hook that focuses on the target element when it is clicked.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-pointer-down\n */\nexport const useFocusOnPointerDown = ({\n ref,\n elements,\n enabled,\n}: UseFocusOnMouseDownProps) => {\n useEventListener(\n () => ref.current?.getRootNode() ?? getDocument(ref.current),\n \"pointerdown\",\n (ev) => {\n if (!isSafari() || !enabled) return\n\n const target = ev.target as HTMLElement\n const els = elements ?? [ref]\n const rootNode = ref.current?.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(ref.current)\n const validTarget = els.some((elOrRef) => {\n const el = isRefObject(elOrRef) ? elOrRef.current : elOrRef\n\n return el?.contains(target) || el === target\n })\n\n if (getActiveElement(root) !== target && validTarget) {\n ev.preventDefault()\n\n target.focus()\n }\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAa,kBACX,SACA,EACE,aAAa,cACb,eACA,aACA,YACuB;CACvB,eAAe;CACf,aAAa;AACf,MACG;CACH,MAAM,mBAAmB,eAAe;CACxC,MAAM,WAAA,GAAUA,MAAAA,OAAAA,CAAO,KAAK;CAC5B,MAAM,cAAA,GAAaA,MAAAA,OAAAA,CAAO,CAAC;CAE3B,MAAM,aAAA,GAAYC,MAAAA,YAAAA,OAAkB;EAClC,OAAOC,YAAAA,YAAY,OAAO,IAAI,QAAQ,UAAU;CAClD,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,kBAAA,GAAiBD,MAAAA,YAAAA,OAAkB;EACvC,OAAOC,YAAAA,YAAY,YAAY,IAAI,aAAa,UAAU;CAC5D,GAAG,CAAC,YAAY,CAAC;CAEjB,MAAM,WAAA,GAAUD,MAAAA,YAAAA,OAAkB;EAChC,MAAM,SAAS,UAAU;EAEzB,IAAI,CAAC,UAAU,CAAC,oBAAoB,QAAQ,SAAS;EACrD,MAAM,WAAW,OAAO,YAAY;EACpC,MAAM,QAAA,GAAA,oBAAA,cAAO,aAAA,CAAa,QAAQ,IAAI,YAAA,GAAA,oBAAA,cAAW,YAAA,CAAY,MAAM;EACnE,KAAA,GAAA,oBAAA,cAAI,SAAA,CAAS,SAAA,GAAA,oBAAA,cAAQ,iBAAA,CAAiB,IAAI,CAAC,GAAG;EAE9C,MAAM,cACJ,eAAe,MAAA,GAAA,oBAAA,cAAK,yBAAA,CAAyB,MAAM,KAAK;EAE1D,qBAAqB,WAAW,OAAO;EACvC,WAAW,UAAU,4BAA4B;GAC/C,YAAY,MAAM,EAAE,cAAc,CAAC;GAEnC,QAAQ,UAAU;EACpB,CAAC;CACH,GAAG;EAAC;EAAW;EAAkB;EAAgB;CAAa,CAAC;CAE/D,eAAA,sBAAsB;EACpB,QAAQ,UAAU,CAAC;CACrB,GAAG,CAAC,gBAAgB,CAAC;CAErB,eAAA,sBAAsB;EACpB,MAAM,QAAQ,sBAAsB,OAAO;EAE3C,aAAa,qBAAqB,KAAK;CACzC,GAAG,CAAC,OAAO,CAAC;CAEZ,CAAA,GAAA,MAAA,UAAA,aAAsB,qBAAqB,WAAW,OAAO,GAAG,CAAC,OAAO,CAAC;CAEzE,uCAAA,iBAAiB,WAAW,iBAAiB,OAAO;AACtD;;;;;;AAaA,MAAa,yBAAyB,EACpC,KACA,UACA,cAC8B;CAC9B,uCAAA,uBACQ,IAAI,SAAS,YAAY,MAAA,GAAA,oBAAA,cAAK,YAAA,CAAY,IAAI,OAAO,GAC3D,gBACC,OAAO;EACN,IAAI,EAAA,GAAA,oBAAA,cAAC,SAAA,CAAS,KAAK,CAAC,SAAS;EAE7B,MAAM,SAAS,GAAG;EAClB,MAAM,MAAM,YAAY,CAAC,GAAG;EAC5B,MAAM,WAAW,IAAI,SAAS,YAAY;EAC1C,MAAM,QAAA,GAAA,oBAAA,cAAO,aAAA,CAAa,QAAQ,IAAI,YAAA,GAAA,oBAAA,cAAW,YAAA,CAAY,IAAI,OAAO;EACxE,MAAM,cAAc,IAAI,MAAM,YAAY;GACxC,MAAM,KAAKC,YAAAA,YAAY,OAAO,IAAI,QAAQ,UAAU;GAEpD,OAAO,IAAI,SAAS,MAAM,KAAK,OAAO;EACxC,CAAC;EAED,KAAA,GAAA,oBAAA,cAAI,iBAAA,CAAiB,IAAI,MAAM,UAAU,aAAa;GACpD,GAAG,eAAe;GAElB,OAAO,MAAM;EACf;CACF,CACF;AACF"}
|
|
@@ -3,7 +3,7 @@ import { useUpdateEffect } from "../../utils/effect.js";
|
|
|
3
3
|
import { isRefObject } from "../../utils/ref.js";
|
|
4
4
|
import { utils_exports } from "../../utils/index.js";
|
|
5
5
|
import { useEventListener } from "../use-event-listener/index.js";
|
|
6
|
-
import { useCallback, useRef } from "react";
|
|
6
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
7
7
|
//#region src/hooks/use-focus/index.ts
|
|
8
8
|
/**
|
|
9
9
|
* `useFocusOnShow` is a custom hook that focuses on the target element when it is shown.
|
|
@@ -16,6 +16,7 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
16
16
|
}) => {
|
|
17
17
|
const trulyShouldFocus = shouldFocus && visible;
|
|
18
18
|
const focused = useRef(false);
|
|
19
|
+
const focusFrame = useRef(0);
|
|
19
20
|
const getTarget = useCallback(() => {
|
|
20
21
|
return isRefObject(refOrEl) ? refOrEl.current : refOrEl;
|
|
21
22
|
}, [refOrEl]);
|
|
@@ -28,22 +29,12 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
28
29
|
const rootNode = target.getRootNode();
|
|
29
30
|
const root = (0, utils_exports.isShadowRoot)(rootNode) ? rootNode : (0, utils_exports.getDocument)(target);
|
|
30
31
|
if ((0, utils_exports.contains)(target, (0, utils_exports.getActiveElement)(root))) return;
|
|
31
|
-
const focusTarget = getFocusTarget();
|
|
32
|
-
|
|
32
|
+
const focusTarget = getFocusTarget() ?? (0, utils_exports.getFirstFocusableElement)(target) ?? target;
|
|
33
|
+
cancelAnimationFrame(focusFrame.current);
|
|
34
|
+
focusFrame.current = requestAnimationFrame(() => {
|
|
33
35
|
focusTarget.focus({ preventScroll });
|
|
34
36
|
focused.current = true;
|
|
35
37
|
});
|
|
36
|
-
else {
|
|
37
|
-
const firstFocusable = (0, utils_exports.getFirstFocusableElement)(target);
|
|
38
|
-
if (firstFocusable) requestAnimationFrame(() => {
|
|
39
|
-
firstFocusable.focus({ preventScroll });
|
|
40
|
-
focused.current = true;
|
|
41
|
-
});
|
|
42
|
-
else requestAnimationFrame(() => {
|
|
43
|
-
target.focus({ preventScroll });
|
|
44
|
-
focused.current = true;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
38
|
}, [
|
|
48
39
|
getTarget,
|
|
49
40
|
trulyShouldFocus,
|
|
@@ -54,8 +45,10 @@ const useFocusOnShow = (refOrEl, { focusTarget: focusRefOrEl, preventScroll, sho
|
|
|
54
45
|
focused.current = !trulyShouldFocus;
|
|
55
46
|
}, [trulyShouldFocus]);
|
|
56
47
|
useUpdateEffect(() => {
|
|
57
|
-
requestAnimationFrame(onFocus);
|
|
48
|
+
const frame = requestAnimationFrame(onFocus);
|
|
49
|
+
return () => cancelAnimationFrame(frame);
|
|
58
50
|
}, [onFocus]);
|
|
51
|
+
useEffect(() => () => cancelAnimationFrame(focusFrame.current), [onFocus]);
|
|
59
52
|
useEventListener(getTarget, "transitionend", onFocus);
|
|
60
53
|
};
|
|
61
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isShadowRoot","getDocument","contains","getActiveElement","getFirstFocusableElement","isSafari"],"sources":["../../../../src/hooks/use-focus/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport { useCallback, useRef } from \"react\"\nimport {\n contains,\n getActiveElement,\n getDocument,\n getFirstFocusableElement,\n isRefObject,\n isSafari,\n isShadowRoot,\n useUpdateEffect,\n} from \"../../utils\"\nimport { useEventListener } from \"../use-event-listener\"\n\nexport interface UseFocusOnShowProps {\n focusTarget?: HTMLElement | null | RefObject<HTMLElement | null>\n preventScroll?: boolean\n shouldFocus?: boolean\n visible?: boolean\n}\n\n/**\n * `useFocusOnShow` is a custom hook that focuses on the target element when it is shown.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-show\n */\nexport const useFocusOnShow = <Y extends HTMLElement>(\n refOrEl: RefObject<null | Y> | Y,\n {\n focusTarget: focusRefOrEl,\n preventScroll,\n shouldFocus,\n visible,\n }: UseFocusOnShowProps = {\n preventScroll: true,\n shouldFocus: false,\n },\n) => {\n const trulyShouldFocus = shouldFocus && visible\n const focused = useRef(false)\n\n const getTarget = useCallback(() => {\n return isRefObject(refOrEl) ? refOrEl.current : refOrEl\n }, [refOrEl])\n\n const getFocusTarget = useCallback(() => {\n return isRefObject(focusRefOrEl) ? focusRefOrEl.current : focusRefOrEl\n }, [focusRefOrEl])\n\n const onFocus = useCallback(() => {\n const target = getTarget()\n\n if (!target || !trulyShouldFocus || focused.current) return\n const rootNode = target.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(target)\n if (contains(target, getActiveElement(root))) return\n\n const focusTarget
|
|
1
|
+
{"version":3,"file":"index.js","names":["isShadowRoot","getDocument","contains","getActiveElement","getFirstFocusableElement","isSafari"],"sources":["../../../../src/hooks/use-focus/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { RefObject } from \"react\"\nimport { useCallback, useEffect, useRef } from \"react\"\nimport {\n contains,\n getActiveElement,\n getDocument,\n getFirstFocusableElement,\n isRefObject,\n isSafari,\n isShadowRoot,\n useUpdateEffect,\n} from \"../../utils\"\nimport { useEventListener } from \"../use-event-listener\"\n\nexport interface UseFocusOnShowProps {\n focusTarget?: HTMLElement | null | RefObject<HTMLElement | null>\n preventScroll?: boolean\n shouldFocus?: boolean\n visible?: boolean\n}\n\n/**\n * `useFocusOnShow` is a custom hook that focuses on the target element when it is shown.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-show\n */\nexport const useFocusOnShow = <Y extends HTMLElement>(\n refOrEl: RefObject<null | Y> | Y,\n {\n focusTarget: focusRefOrEl,\n preventScroll,\n shouldFocus,\n visible,\n }: UseFocusOnShowProps = {\n preventScroll: true,\n shouldFocus: false,\n },\n) => {\n const trulyShouldFocus = shouldFocus && visible\n const focused = useRef(false)\n const focusFrame = useRef(0)\n\n const getTarget = useCallback(() => {\n return isRefObject(refOrEl) ? refOrEl.current : refOrEl\n }, [refOrEl])\n\n const getFocusTarget = useCallback(() => {\n return isRefObject(focusRefOrEl) ? focusRefOrEl.current : focusRefOrEl\n }, [focusRefOrEl])\n\n const onFocus = useCallback(() => {\n const target = getTarget()\n\n if (!target || !trulyShouldFocus || focused.current) return\n const rootNode = target.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(target)\n if (contains(target, getActiveElement(root))) return\n\n const focusTarget =\n getFocusTarget() ?? getFirstFocusableElement(target) ?? target\n\n cancelAnimationFrame(focusFrame.current)\n focusFrame.current = requestAnimationFrame(() => {\n focusTarget.focus({ preventScroll })\n\n focused.current = true\n })\n }, [getTarget, trulyShouldFocus, getFocusTarget, preventScroll])\n\n useUpdateEffect(() => {\n focused.current = !trulyShouldFocus\n }, [trulyShouldFocus])\n\n useUpdateEffect(() => {\n const frame = requestAnimationFrame(onFocus)\n\n return () => cancelAnimationFrame(frame)\n }, [onFocus])\n\n useEffect(() => () => cancelAnimationFrame(focusFrame.current), [onFocus])\n\n useEventListener(getTarget, \"transitionend\", onFocus)\n}\n\nexport interface UseFocusOnMouseDownProps {\n ref: RefObject<HTMLElement | null>\n elements?: (HTMLElement | null | RefObject<HTMLElement | null>)[]\n enabled?: boolean\n}\n\n/**\n * `useFocusOnPointerDown` is a custom hook that focuses on the target element when it is clicked.\n *\n * @see https://yamada-ui.com/docs/hooks/use-focus-on-pointer-down\n */\nexport const useFocusOnPointerDown = ({\n ref,\n elements,\n enabled,\n}: UseFocusOnMouseDownProps) => {\n useEventListener(\n () => ref.current?.getRootNode() ?? getDocument(ref.current),\n \"pointerdown\",\n (ev) => {\n if (!isSafari() || !enabled) return\n\n const target = ev.target as HTMLElement\n const els = elements ?? [ref]\n const rootNode = ref.current?.getRootNode()\n const root = isShadowRoot(rootNode) ? rootNode : getDocument(ref.current)\n const validTarget = els.some((elOrRef) => {\n const el = isRefObject(elOrRef) ? elOrRef.current : elOrRef\n\n return el?.contains(target) || el === target\n })\n\n if (getActiveElement(root) !== target && validTarget) {\n ev.preventDefault()\n\n target.focus()\n }\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,MAAa,kBACX,SACA,EACE,aAAa,cACb,eACA,aACA,YACuB;CACvB,eAAe;CACf,aAAa;AACf,MACG;CACH,MAAM,mBAAmB,eAAe;CACxC,MAAM,UAAU,OAAO,KAAK;CAC5B,MAAM,aAAa,OAAO,CAAC;CAE3B,MAAM,YAAY,kBAAkB;EAClC,OAAO,YAAY,OAAO,IAAI,QAAQ,UAAU;CAClD,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,iBAAiB,kBAAkB;EACvC,OAAO,YAAY,YAAY,IAAI,aAAa,UAAU;CAC5D,GAAG,CAAC,YAAY,CAAC;CAEjB,MAAM,UAAU,kBAAkB;EAChC,MAAM,SAAS,UAAU;EAEzB,IAAI,CAAC,UAAU,CAAC,oBAAoB,QAAQ,SAAS;EACrD,MAAM,WAAW,OAAO,YAAY;EACpC,MAAM,QAAA,GAAOA,cAAAA,aAAAA,CAAa,QAAQ,IAAI,YAAA,GAAWC,cAAAA,YAAAA,CAAY,MAAM;EACnE,KAAA,GAAIC,cAAAA,SAAAA,CAAS,SAAA,GAAQC,cAAAA,iBAAAA,CAAiB,IAAI,CAAC,GAAG;EAE9C,MAAM,cACJ,eAAe,MAAA,GAAKC,cAAAA,yBAAAA,CAAyB,MAAM,KAAK;EAE1D,qBAAqB,WAAW,OAAO;EACvC,WAAW,UAAU,4BAA4B;GAC/C,YAAY,MAAM,EAAE,cAAc,CAAC;GAEnC,QAAQ,UAAU;EACpB,CAAC;CACH,GAAG;EAAC;EAAW;EAAkB;EAAgB;CAAa,CAAC;CAE/D,sBAAsB;EACpB,QAAQ,UAAU,CAAC;CACrB,GAAG,CAAC,gBAAgB,CAAC;CAErB,sBAAsB;EACpB,MAAM,QAAQ,sBAAsB,OAAO;EAE3C,aAAa,qBAAqB,KAAK;CACzC,GAAG,CAAC,OAAO,CAAC;CAEZ,sBAAsB,qBAAqB,WAAW,OAAO,GAAG,CAAC,OAAO,CAAC;CAEzE,iBAAiB,WAAW,iBAAiB,OAAO;AACtD;;;;;;AAaA,MAAa,yBAAyB,EACpC,KACA,UACA,cAC8B;CAC9B,uBACQ,IAAI,SAAS,YAAY,MAAA,GAAKH,cAAAA,YAAAA,CAAY,IAAI,OAAO,GAC3D,gBACC,OAAO;EACN,IAAI,EAAA,GAACI,cAAAA,SAAAA,CAAS,KAAK,CAAC,SAAS;EAE7B,MAAM,SAAS,GAAG;EAClB,MAAM,MAAM,YAAY,CAAC,GAAG;EAC5B,MAAM,WAAW,IAAI,SAAS,YAAY;EAC1C,MAAM,QAAA,GAAOL,cAAAA,aAAAA,CAAa,QAAQ,IAAI,YAAA,GAAWC,cAAAA,YAAAA,CAAY,IAAI,OAAO;EACxE,MAAM,cAAc,IAAI,MAAM,YAAY;GACxC,MAAM,KAAK,YAAY,OAAO,IAAI,QAAQ,UAAU;GAEpD,OAAO,IAAI,SAAS,MAAM,KAAK,OAAO;EACxC,CAAC;EAED,KAAA,GAAIE,cAAAA,iBAAAA,CAAiB,IAAI,MAAM,UAAU,aAAa;GACpD,GAAG,eAAe;GAElB,OAAO,MAAM;EACf;CACF,CACF;AACF"}
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/autocomplete/autocomplete.style.d.ts
|
|
5
|
-
export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "
|
|
5
|
+
export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText" | "empty", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText" | "empty">>, {
|
|
6
6
|
xs: {
|
|
7
7
|
empty: {
|
|
8
8
|
gap: "1.5";
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/calendar/calendar.style.d.ts
|
|
5
|
-
export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "control" | "weekday" | "day" | "months" | "years" | "weeks"
|
|
5
|
+
export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "prev" | "control" | "weekday" | "day" | "months" | "years" | "weeks", {
|
|
6
6
|
/**
|
|
7
7
|
* If `true`, the calendar will be fixed rows.
|
|
8
8
|
*
|
|
@@ -74,7 +74,7 @@ export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "ce
|
|
|
74
74
|
"--font-size": "fontSizes.xl";
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
}, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "control" | "weekday" | "day" | "months" | "years" | "weeks"
|
|
77
|
+
}, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "prev" | "control" | "weekday" | "day" | "months" | "years" | "weeks">>>;
|
|
78
78
|
export type CalendarStyle = typeof calendarStyle;
|
|
79
79
|
//#endregion
|
|
80
80
|
//# sourceMappingURL=calendar.style.d.ts.map
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/chart/polar-chart.style.d.ts
|
|
5
|
-
export declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "
|
|
5
|
+
export declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
|
|
6
6
|
export type PolarChartStyle = typeof polarChartStyle;
|
|
7
7
|
//#endregion
|
|
8
8
|
//# sourceMappingURL=polar-chart.style.d.ts.map
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/color-selector/color-selector.style.d.ts
|
|
5
|
-
export declare const colorSelectorStyle: ComponentSlotStyle<"root" | "hueSlider" | "saturationSlider" | "eyeDropper" | "
|
|
5
|
+
export declare const colorSelectorStyle: ComponentSlotStyle<"root" | "hueSlider" | "saturationSlider" | "eyeDropper" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchGroupLabel" | "colorSwatchItem", {
|
|
6
6
|
/**
|
|
7
7
|
* The shape of the thumb and color swatch.
|
|
8
8
|
*
|
|
@@ -23,7 +23,7 @@ export declare const colorSelectorStyle: ComponentSlotStyle<"root" | "hueSlider"
|
|
|
23
23
|
md: {};
|
|
24
24
|
lg: {};
|
|
25
25
|
xl: {};
|
|
26
|
-
}, CSSModifierObject<CSSSlotObject<"root" | "hueSlider" | "saturationSlider" | "eyeDropper" | "
|
|
26
|
+
}, CSSModifierObject<CSSSlotObject<"root" | "hueSlider" | "saturationSlider" | "eyeDropper" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchGroupLabel" | "colorSwatchItem">>>;
|
|
27
27
|
export type ColorSelectorStyle = typeof colorSelectorStyle;
|
|
28
28
|
//#endregion
|
|
29
29
|
//# sourceMappingURL=color-selector.style.d.ts.map
|
|
@@ -23,7 +23,7 @@ declare const EditablePropsContext: import("react").Context<Partial<EditableRoot
|
|
|
23
23
|
*
|
|
24
24
|
* @see https://yamada-ui.com/docs/components/editable
|
|
25
25
|
*/
|
|
26
|
-
export declare const EditableRoot: Component<({ children, errorBorderColor, focusBorderColor, ...props }: WithoutThemeProps<EditableRootProps, ComponentSlotStyle<"input" | "textarea" | "root" | "
|
|
26
|
+
export declare const EditableRoot: Component<({ children, errorBorderColor, focusBorderColor, ...props }: WithoutThemeProps<EditableRootProps, ComponentSlotStyle<"input" | "textarea" | "root" | "preview" | "control", CSSPropObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>, CSSModifierObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>, CSSModifierObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>>, keyof EditableRootProps>) => import("react").JSX.Element, EditableRootProps>;
|
|
27
27
|
export interface EditablePreviewProps extends HTMLStyledProps<"span"> {}
|
|
28
28
|
export declare const EditablePreview: Component<"span", EditablePreviewProps>;
|
|
29
29
|
export interface EditableInputProps extends HTMLStyledProps<"input"> {}
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/editable/editable.style.d.ts
|
|
5
|
-
export declare const editableStyle: ComponentSlotStyle<"input" | "textarea" | "root" | "
|
|
5
|
+
export declare const editableStyle: ComponentSlotStyle<"input" | "textarea" | "root" | "preview" | "control", CSSPropObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>, CSSModifierObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>, CSSModifierObject<CSSSlotObject<"input" | "textarea" | "root" | "preview" | "control">>>;
|
|
6
6
|
export type EditableStyle = typeof editableStyle;
|
|
7
7
|
//#endregion
|
|
8
8
|
//# sourceMappingURL=editable.style.d.ts.map
|
|
@@ -2,7 +2,7 @@ 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
4
|
//#region src/components/number-input/number-input.style.d.ts
|
|
5
|
-
export declare const numberInputStyle: ComponentSlotStyle<"button" | "root" | "
|
|
5
|
+
export declare const numberInputStyle: ComponentSlotStyle<"button" | "root" | "field" | "decrement" | "increment" | "control", CSSPropObject<CSSSlotObject<"button" | "root" | "field" | "decrement" | "increment" | "control">>, {
|
|
6
6
|
xs: {
|
|
7
7
|
control: {
|
|
8
8
|
boxSize: "calc({--height} - {spaces.2})";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.0-dev-
|
|
4
|
+
"version": "2.3.0-dev-20261026083634",
|
|
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.1.8-dev-
|
|
129
|
+
"@yamada-ui/utils": "2.1.8-dev-20261026083634",
|
|
130
130
|
"copy-to-clipboard": "3.3.3",
|
|
131
131
|
"csstype": "^3.2.3",
|
|
132
132
|
"dayjs": "^1.11.23",
|