@pautena/react-design-system 2.0.0-alpha.4 → 2.0.0-alpha.5
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/components/accordion/accordion.d.ts +55 -0
- package/dist/components/accordion/accordion.mjs +22 -0
- package/dist/components/accordion/accordion.mjs.map +1 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/card/card.d.ts +95 -0
- package/dist/components/card/card.mjs +34 -0
- package/dist/components/card/card.mjs.map +1 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +17 -0
- package/dist/components/separator/separator.mjs +13 -0
- package/dist/components/separator/separator.mjs.map +1 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +65 -0
- package/dist/components/tabs/tabs.mjs +22 -0
- package/dist/components/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/accordion.d.ts +6 -0
- package/dist/components/ui/accordion.mjs +94 -0
- package/dist/components/ui/accordion.mjs.map +1 -0
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/card.mjs +102 -0
- package/dist/components/ui/card.mjs.map +1 -0
- package/dist/components/ui/separator.mjs +25 -0
- package/dist/components/ui/separator.mjs.map +1 -0
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.mjs +32 -20
- package/dist/components/ui/tabs.mjs.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +158 -138
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/@base-ui/react/esm/accordion/header/AccordionHeader.mjs +24 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/header/AccordionHeader.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItem.mjs +79 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItem.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItemContext.mjs +15 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItemContext.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItemDataAttributes.mjs +7 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/AccordionItemDataAttributes.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/stateAttributesMapping.mjs +15 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/item/stateAttributesMapping.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/panel/AccordionPanel.mjs +113 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/panel/AccordionPanel.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/panel/AccordionPanelCssVars.mjs +7 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/panel/AccordionPanelCssVars.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/root/AccordionRoot.mjs +97 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/root/AccordionRoot.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/root/AccordionRootContext.mjs +15 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/root/AccordionRootContext.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/trigger/AccordionTrigger.mjs +111 -0
- package/dist/node_modules/@base-ui/react/esm/accordion/trigger/AccordionTrigger.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/tabs/panel/TabsPanel.mjs +78 -0
- package/dist/node_modules/@base-ui/react/esm/tabs/panel/TabsPanel.mjs.map +1 -0
- package/dist/node_modules/@base-ui/react/esm/tabs/panel/TabsPanelDataAttributes.mjs +7 -0
- package/dist/node_modules/@base-ui/react/esm/tabs/panel/TabsPanelDataAttributes.mjs.map +1 -0
- package/dist/tests/testing-library.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as R from "react";
|
|
2
|
+
import { useIsoLayoutEffect as t } from "../../../../utils/esm/useIsoLayoutEffect.mjs";
|
|
3
|
+
import { warn as K } from "../../../../utils/esm/warn.mjs";
|
|
4
|
+
import { useCollapsibleRootContext as T } from "../../collapsible/root/CollapsibleRootContext.mjs";
|
|
5
|
+
import { useCollapsiblePanel as _ } from "../../collapsible/panel/useCollapsiblePanel.mjs";
|
|
6
|
+
import { useAccordionRootContext as $ } from "../root/AccordionRootContext.mjs";
|
|
7
|
+
import { useAccordionItemContext as q } from "../item/AccordionItemContext.mjs";
|
|
8
|
+
import { accordionStateAttributesMapping as L } from "../item/stateAttributesMapping.mjs";
|
|
9
|
+
import { AccordionPanelCssVars as C } from "./AccordionPanelCssVars.mjs";
|
|
10
|
+
import { useOpenChangeComplete as W } from "../../utils/useOpenChangeComplete.mjs";
|
|
11
|
+
import { useRenderElement as j } from "../../utils/useRenderElement.mjs";
|
|
12
|
+
const z = /* @__PURE__ */ R.forwardRef(function(u, c) {
|
|
13
|
+
const {
|
|
14
|
+
className: G,
|
|
15
|
+
hiddenUntilFound: M,
|
|
16
|
+
keepMounted: i,
|
|
17
|
+
id: o,
|
|
18
|
+
render: J,
|
|
19
|
+
...b
|
|
20
|
+
} = u, {
|
|
21
|
+
hiddenUntilFound: x,
|
|
22
|
+
keepMounted: A
|
|
23
|
+
} = $(), {
|
|
24
|
+
abortControllerRef: F,
|
|
25
|
+
animationTypeRef: U,
|
|
26
|
+
height: r,
|
|
27
|
+
mounted: m,
|
|
28
|
+
onOpenChange: w,
|
|
29
|
+
open: d,
|
|
30
|
+
panelId: E,
|
|
31
|
+
panelRef: s,
|
|
32
|
+
runOnceAnimationsFinish: N,
|
|
33
|
+
setDimensions: f,
|
|
34
|
+
setHiddenUntilFound: h,
|
|
35
|
+
setKeepMounted: P,
|
|
36
|
+
setMounted: O,
|
|
37
|
+
setOpen: k,
|
|
38
|
+
setVisible: y,
|
|
39
|
+
transitionDimensionRef: I,
|
|
40
|
+
visible: v,
|
|
41
|
+
width: a,
|
|
42
|
+
setPanelIdState: l,
|
|
43
|
+
transitionStatus: p
|
|
44
|
+
} = T(), e = M ?? x, n = i ?? A;
|
|
45
|
+
process.env.NODE_ENV !== "production" && t(() => {
|
|
46
|
+
i === !1 && e && K("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.");
|
|
47
|
+
}, [e, i]), t(() => {
|
|
48
|
+
if (o)
|
|
49
|
+
return l(o), () => {
|
|
50
|
+
l(void 0);
|
|
51
|
+
};
|
|
52
|
+
}, [o, l]), t(() => {
|
|
53
|
+
h(e);
|
|
54
|
+
}, [h, e]), t(() => {
|
|
55
|
+
P(n);
|
|
56
|
+
}, [P, n]), W({
|
|
57
|
+
open: d && p === "idle",
|
|
58
|
+
ref: s,
|
|
59
|
+
onComplete() {
|
|
60
|
+
d && f({
|
|
61
|
+
width: void 0,
|
|
62
|
+
height: void 0
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const {
|
|
67
|
+
props: D
|
|
68
|
+
} = _({
|
|
69
|
+
abortControllerRef: F,
|
|
70
|
+
animationTypeRef: U,
|
|
71
|
+
externalRef: c,
|
|
72
|
+
height: r,
|
|
73
|
+
hiddenUntilFound: e,
|
|
74
|
+
id: o ?? E,
|
|
75
|
+
keepMounted: n,
|
|
76
|
+
mounted: m,
|
|
77
|
+
onOpenChange: w,
|
|
78
|
+
open: d,
|
|
79
|
+
panelRef: s,
|
|
80
|
+
runOnceAnimationsFinish: N,
|
|
81
|
+
setDimensions: f,
|
|
82
|
+
setMounted: O,
|
|
83
|
+
setOpen: k,
|
|
84
|
+
setVisible: y,
|
|
85
|
+
transitionDimensionRef: I,
|
|
86
|
+
visible: v,
|
|
87
|
+
width: a
|
|
88
|
+
}), {
|
|
89
|
+
state: g,
|
|
90
|
+
triggerId: H
|
|
91
|
+
} = q(), S = R.useMemo(() => ({
|
|
92
|
+
...g,
|
|
93
|
+
transitionStatus: p
|
|
94
|
+
}), [g, p]), V = j("div", u, {
|
|
95
|
+
state: S,
|
|
96
|
+
ref: [c, s],
|
|
97
|
+
props: [D, {
|
|
98
|
+
"aria-labelledby": H,
|
|
99
|
+
role: "region",
|
|
100
|
+
style: {
|
|
101
|
+
[C.accordionPanelHeight]: r === void 0 ? "auto" : `${r}px`,
|
|
102
|
+
[C.accordionPanelWidth]: a === void 0 ? "auto" : `${a}px`
|
|
103
|
+
}
|
|
104
|
+
}, b],
|
|
105
|
+
stateAttributesMapping: L
|
|
106
|
+
});
|
|
107
|
+
return n || e || !n && m ? V : null;
|
|
108
|
+
});
|
|
109
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "AccordionPanel");
|
|
110
|
+
export {
|
|
111
|
+
z as AccordionPanel
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=AccordionPanel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionPanel.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/accordion/panel/AccordionPanel.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { warn } from '@base-ui/utils/warn';\nimport { useCollapsibleRootContext } from \"../../collapsible/root/CollapsibleRootContext.js\";\nimport { useCollapsiblePanel } from \"../../collapsible/panel/useCollapsiblePanel.js\";\nimport { useAccordionRootContext } from \"../root/AccordionRootContext.js\";\nimport { useAccordionItemContext } from \"../item/AccordionItemContext.js\";\nimport { accordionStateAttributesMapping } from \"../item/stateAttributesMapping.js\";\nimport { AccordionPanelCssVars } from \"./AccordionPanelCssVars.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n/**\n * A collapsible panel with the accordion item contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionPanel = /*#__PURE__*/React.forwardRef(function AccordionPanel(componentProps, forwardedRef) {\n const {\n className,\n hiddenUntilFound: hiddenUntilFoundProp,\n keepMounted: keepMountedProp,\n id: idProp,\n render,\n ...elementProps\n } = componentProps;\n const {\n hiddenUntilFound: contextHiddenUntilFound,\n keepMounted: contextKeepMounted\n } = useAccordionRootContext();\n const {\n abortControllerRef,\n animationTypeRef,\n height,\n mounted,\n onOpenChange,\n open,\n panelId,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setHiddenUntilFound,\n setKeepMounted,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width,\n setPanelIdState,\n transitionStatus\n } = useCollapsibleRootContext();\n const hiddenUntilFound = hiddenUntilFoundProp ?? contextHiddenUntilFound;\n const keepMounted = keepMountedProp ?? contextKeepMounted;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useIsoLayoutEffect(() => {\n if (keepMountedProp === false && hiddenUntilFound) {\n warn('The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.');\n }\n }, [hiddenUntilFound, keepMountedProp]);\n }\n useIsoLayoutEffect(() => {\n if (idProp) {\n setPanelIdState(idProp);\n return () => {\n setPanelIdState(undefined);\n };\n }\n return undefined;\n }, [idProp, setPanelIdState]);\n useIsoLayoutEffect(() => {\n setHiddenUntilFound(hiddenUntilFound);\n }, [setHiddenUntilFound, hiddenUntilFound]);\n useIsoLayoutEffect(() => {\n setKeepMounted(keepMounted);\n }, [setKeepMounted, keepMounted]);\n useOpenChangeComplete({\n open: open && transitionStatus === 'idle',\n ref: panelRef,\n onComplete() {\n if (!open) {\n return;\n }\n setDimensions({\n width: undefined,\n height: undefined\n });\n }\n });\n const {\n props\n } = useCollapsiblePanel({\n abortControllerRef,\n animationTypeRef,\n externalRef: forwardedRef,\n height,\n hiddenUntilFound,\n id: idProp ?? panelId,\n keepMounted,\n mounted,\n onOpenChange,\n open,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width\n });\n const {\n state,\n triggerId\n } = useAccordionItemContext();\n const panelState = React.useMemo(() => ({\n ...state,\n transitionStatus\n }), [state, transitionStatus]);\n const element = useRenderElement('div', componentProps, {\n state: panelState,\n ref: [forwardedRef, panelRef],\n props: [props, {\n 'aria-labelledby': triggerId,\n role: 'region',\n style: {\n [AccordionPanelCssVars.accordionPanelHeight]: height === undefined ? 'auto' : `${height}px`,\n [AccordionPanelCssVars.accordionPanelWidth]: width === undefined ? 'auto' : `${width}px`\n }\n }, elementProps],\n stateAttributesMapping: accordionStateAttributesMapping\n });\n const shouldRender = keepMounted || hiddenUntilFound || !keepMounted && mounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") AccordionPanel.displayName = \"AccordionPanel\";"],"names":["AccordionPanel","React","componentProps","forwardedRef","className","hiddenUntilFoundProp","keepMountedProp","idProp","render","elementProps","contextHiddenUntilFound","contextKeepMounted","useAccordionRootContext","abortControllerRef","animationTypeRef","height","mounted","onOpenChange","open","panelId","panelRef","runOnceAnimationsFinish","setDimensions","setHiddenUntilFound","setKeepMounted","setMounted","setOpen","setVisible","transitionDimensionRef","visible","width","setPanelIdState","transitionStatus","useCollapsibleRootContext","hiddenUntilFound","keepMounted","useIsoLayoutEffect","warn","useOpenChangeComplete","props","useCollapsiblePanel","state","triggerId","useAccordionItemContext","panelState","element","useRenderElement","AccordionPanelCssVars","accordionStateAttributesMapping"],"mappings":";;;;;;;;;;;AAmBY,MAACA,IAA8B,gBAAAC,EAAM,WAAW,SAAwBC,GAAgBC,GAAc;AAChH,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,aAAaC;AAAA,IACb,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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionPanelCssVars.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/accordion/panel/AccordionPanelCssVars.js"],"sourcesContent":["export let AccordionPanelCssVars = /*#__PURE__*/function (AccordionPanelCssVars) {\n /**\n * The accordion panel's height.\n * @type {number}\n */\n AccordionPanelCssVars[\"accordionPanelHeight\"] = \"--accordion-panel-height\";\n /**\n * The accordion panel's width.\n * @type {number}\n */\n AccordionPanelCssVars[\"accordionPanelWidth\"] = \"--accordion-panel-width\";\n return AccordionPanelCssVars;\n}({});"],"names":["AccordionPanelCssVars"],"mappings":"AAAU,IAACA,IAAqC,0BAAUA,GAAuB;AAK/E,SAAAA,EAAsB,uBAA0B,4BAKhDA,EAAsB,sBAAyB,2BACxCA;AACT,GAAE,CAAA,CAAE;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useControlled as D } from "../../../../utils/esm/useControlled.mjs";
|
|
3
|
+
import { useStableCallback as V } from "../../../../utils/esm/useStableCallback.mjs";
|
|
4
|
+
import { useIsoLayoutEffect as O } from "../../../../utils/esm/useIsoLayoutEffect.mjs";
|
|
5
|
+
import { warn as U } from "../../../../utils/esm/warn.mjs";
|
|
6
|
+
import { CompositeList as w } from "../../composite/list/CompositeList.mjs";
|
|
7
|
+
import { useDirection as y } from "../../direction-provider/DirectionContext.mjs";
|
|
8
|
+
import { AccordionRootContext as I } from "./AccordionRootContext.mjs";
|
|
9
|
+
import { useRenderElement as L } from "../../utils/useRenderElement.mjs";
|
|
10
|
+
import { createChangeEventDetails as S } from "../../utils/createBaseUIEventDetails.mjs";
|
|
11
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
12
|
+
import { none as _ } from "../../utils/reason-parts.mjs";
|
|
13
|
+
const j = {
|
|
14
|
+
value: () => null
|
|
15
|
+
}, q = /* @__PURE__ */ n.forwardRef(function(m, M) {
|
|
16
|
+
const {
|
|
17
|
+
render: z,
|
|
18
|
+
className: B,
|
|
19
|
+
disabled: r = !1,
|
|
20
|
+
hiddenUntilFound: i,
|
|
21
|
+
keepMounted: s,
|
|
22
|
+
loopFocus: h = !0,
|
|
23
|
+
onValueChange: A,
|
|
24
|
+
multiple: x = !1,
|
|
25
|
+
orientation: l = "vertical",
|
|
26
|
+
value: u,
|
|
27
|
+
defaultValue: v,
|
|
28
|
+
...E
|
|
29
|
+
} = m, d = y();
|
|
30
|
+
process.env.NODE_ENV !== "production" && O(() => {
|
|
31
|
+
i && s === !1 && U("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.");
|
|
32
|
+
}, [i, s]);
|
|
33
|
+
const P = n.useMemo(() => {
|
|
34
|
+
if (u === void 0)
|
|
35
|
+
return v ?? [];
|
|
36
|
+
}, [u, v]), c = V(A), C = n.useRef([]), [o, f] = D({
|
|
37
|
+
controlled: u,
|
|
38
|
+
default: P,
|
|
39
|
+
name: "Accordion",
|
|
40
|
+
state: "value"
|
|
41
|
+
}), R = V((a, k) => {
|
|
42
|
+
const t = S(_);
|
|
43
|
+
if (x)
|
|
44
|
+
if (k) {
|
|
45
|
+
const e = o.slice();
|
|
46
|
+
if (e.push(a), c(e, t), t.isCanceled)
|
|
47
|
+
return;
|
|
48
|
+
f(e);
|
|
49
|
+
} else {
|
|
50
|
+
const e = o.filter((F) => F !== a);
|
|
51
|
+
if (c(e, t), t.isCanceled)
|
|
52
|
+
return;
|
|
53
|
+
f(e);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const e = o[0] === a ? [] : [a];
|
|
57
|
+
if (c(e, t), t.isCanceled)
|
|
58
|
+
return;
|
|
59
|
+
f(e);
|
|
60
|
+
}
|
|
61
|
+
}), p = n.useMemo(() => ({
|
|
62
|
+
value: o,
|
|
63
|
+
disabled: r,
|
|
64
|
+
orientation: l
|
|
65
|
+
}), [o, r, l]), b = n.useMemo(() => ({
|
|
66
|
+
accordionItemRefs: C,
|
|
67
|
+
direction: d,
|
|
68
|
+
disabled: r,
|
|
69
|
+
handleValueChange: R,
|
|
70
|
+
hiddenUntilFound: i ?? !1,
|
|
71
|
+
keepMounted: s ?? !1,
|
|
72
|
+
loopFocus: h,
|
|
73
|
+
orientation: l,
|
|
74
|
+
state: p,
|
|
75
|
+
value: o
|
|
76
|
+
}), [d, r, R, i, s, h, l, p, o]), N = L("div", m, {
|
|
77
|
+
state: p,
|
|
78
|
+
ref: M,
|
|
79
|
+
props: [{
|
|
80
|
+
dir: d,
|
|
81
|
+
role: "region"
|
|
82
|
+
}, E],
|
|
83
|
+
stateAttributesMapping: j
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ g(I.Provider, {
|
|
86
|
+
value: b,
|
|
87
|
+
children: /* @__PURE__ */ g(w, {
|
|
88
|
+
elementsRef: C,
|
|
89
|
+
children: N
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
process.env.NODE_ENV !== "production" && (q.displayName = "AccordionRoot");
|
|
94
|
+
export {
|
|
95
|
+
q as AccordionRoot
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=AccordionRoot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionRoot.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/accordion/root/AccordionRoot.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { warn } from '@base-ui/utils/warn';\nimport { CompositeList } from \"../../composite/list/CompositeList.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { AccordionRootContext } from \"./AccordionRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst rootStateAttributesMapping = {\n value: () => null\n};\n\n/**\n * Groups all parts of the accordion.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionRoot = /*#__PURE__*/React.forwardRef(function AccordionRoot(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n hiddenUntilFound: hiddenUntilFoundProp,\n keepMounted: keepMountedProp,\n loopFocus = true,\n onValueChange: onValueChangeProp,\n multiple = false,\n orientation = 'vertical',\n value: valueProp,\n defaultValue: defaultValueProp,\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useIsoLayoutEffect(() => {\n if (hiddenUntilFoundProp && keepMountedProp === false) {\n warn('The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.');\n }\n }, [hiddenUntilFoundProp, keepMountedProp]);\n }\n\n // memoized to allow omitting both defaultValue and value\n // which would otherwise trigger a warning in useControlled\n const defaultValue = React.useMemo(() => {\n if (valueProp === undefined) {\n return defaultValueProp ?? [];\n }\n return undefined;\n }, [valueProp, defaultValueProp]);\n const onValueChange = useStableCallback(onValueChangeProp);\n const accordionItemRefs = React.useRef([]);\n const [value, setValue] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Accordion',\n state: 'value'\n });\n const handleValueChange = useStableCallback((newValue, nextOpen) => {\n const details = createChangeEventDetails(REASONS.none);\n if (!multiple) {\n const nextValue = value[0] === newValue ? [] : [newValue];\n onValueChange(nextValue, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextValue);\n } else if (nextOpen) {\n const nextOpenValues = value.slice();\n nextOpenValues.push(newValue);\n onValueChange(nextOpenValues, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextOpenValues);\n } else {\n const nextOpenValues = value.filter(v => v !== newValue);\n onValueChange(nextOpenValues, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextOpenValues);\n }\n });\n const state = React.useMemo(() => ({\n value,\n disabled,\n orientation\n }), [value, disabled, orientation]);\n const contextValue = React.useMemo(() => ({\n accordionItemRefs,\n direction,\n disabled,\n handleValueChange,\n hiddenUntilFound: hiddenUntilFoundProp ?? false,\n keepMounted: keepMountedProp ?? false,\n loopFocus,\n orientation,\n state,\n value\n }), [direction, disabled, handleValueChange, hiddenUntilFoundProp, keepMountedProp, loopFocus, orientation, state, value]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n dir: direction,\n role: 'region'\n }, elementProps],\n stateAttributesMapping: rootStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(AccordionRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: accordionItemRefs,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") AccordionRoot.displayName = \"AccordionRoot\";"],"names":["rootStateAttributesMapping","AccordionRoot","React","componentProps","forwardedRef","render","className","disabled","hiddenUntilFoundProp","keepMountedProp","loopFocus","onValueChangeProp","multiple","orientation","valueProp","defaultValueProp","elementProps","direction","useDirection","useIsoLayoutEffect","warn","defaultValue","onValueChange","useStableCallback","accordionItemRefs","value","setValue","useControlled","handleValueChange","newValue","nextOpen","details","createChangeEventDetails","REASONS.none","nextOpenValues","v","nextValue","state","contextValue","element","useRenderElement","_jsx","AccordionRootContext","CompositeList"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,IAA6B;AAAA,EACjC,OAAO,MAAM;AACf,GAQaC,IAA6B,gBAAAC,EAAM,WAAW,SAAuBC,GAAgBC,GAAc;AAC9G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,kBAAkBC;AAAA,IAClB,aAAaC;AAAA,IACb,WAAAC,IAA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AAAA,IACpB;AAAA,EAgBF,CAAC,GACKC,IAAQnC,EAAM,QAAQ,OAAO;AAAA,IACjC,OAAAuB;AAAA,IACA,UAAAlB;AAAA,IACA,aAAAM;AAAA,EACJ,IAAM,CAACY,GAAOlB,GAAUM,CAAW,CAAC,GAC5ByB,IAAepC,EAAM,QAAQ,OAAO;AAAA,IACxC,mBAAAsB;AAAA,IACA,WAAAP;AAAA,IACA,UAAAV;AAAA,IACA,mBAAAqB;AAAA,IACA,kBAAkBpB,KAAwB;AAAA,IAC1C,aAAaC,KAAmB;AAAA,IAChC,WAAAC;AAAA,IACA,aAAAG;AAAA,IACA,OAAAwB;AAAA,IACA,OAAAZ;AAAA,EACJ,IAAM,CAACR,GAAWV,GAAUqB,GAAmBpB,GAAsBC,GAAiBC,GAAWG,GAAawB,GAAOZ,CAAK,CAAC,GACnHc,IAAUC,EAAiB,OAAOrC,GAAgB;AAAA,IACtD,OAAAkC;AAAA,IACA,KAAKjC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,KAAKa;AAAA,MACL,MAAM;AAAA,IACZ,GAAOD,CAAY;AAAA,IACf,wBAAwBhB;AAAA,EAC5B,CAAG;AACD,SAAoByC,gBAAAA,EAAKC,EAAqB,UAAU;AAAA,IACtD,OAAOJ;AAAA,IACP,UAAuBG,gBAAAA,EAAKE,GAAe;AAAA,MACzC,aAAanB;AAAA,MACb,UAAUe;AAAA,IAChB,CAAK;AAAA,EACL,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAActC,EAAc,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import n from "../../../../utils/esm/formatErrorMessage.mjs";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
const e = /* @__PURE__ */ t.createContext(void 0);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (e.displayName = "AccordionRootContext");
|
|
5
|
+
function c() {
|
|
6
|
+
const o = t.useContext(e);
|
|
7
|
+
if (o === void 0)
|
|
8
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>." : n(10));
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
e as AccordionRootContext,
|
|
13
|
+
c as useAccordionRootContext
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=AccordionRootContext.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionRootContext.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/accordion/root/AccordionRootContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const AccordionRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") AccordionRootContext.displayName = \"AccordionRootContext\";\nexport function useAccordionRootContext() {\n const context = React.useContext(AccordionRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.' : _formatErrorMessage(10));\n }\n return context;\n}"],"names":["AccordionRootContext","React","useAccordionRootContext","context","_formatErrorMessage"],"mappings":";;AAIY,MAACA,IAAoC,gBAAAC,EAAM,cAAc,MAAS;AAC1E,QAAQ,IAAI,aAAa,iBAAcD,EAAqB,cAAc;AACvE,SAASE,IAA0B;AACxC,QAAMC,IAAUF,EAAM,WAAWD,CAAoB;AACrD,MAAIG,MAAY;AACd,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,sGAAsGC,EAAoB,EAAE,CAAC;AAEvL,SAAOD;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as I from "react";
|
|
2
|
+
import { isElementDisabled as T } from "../../../../utils/esm/isElementDisabled.mjs";
|
|
3
|
+
import { useIsoLayoutEffect as B } from "../../../../utils/esm/useIsoLayoutEffect.mjs";
|
|
4
|
+
import { triggerOpenStateMapping as z } from "../../utils/collapsibleOpenStateMapping.mjs";
|
|
5
|
+
import { useCollapsibleRootContext as F } from "../../collapsible/root/CollapsibleRootContext.mjs";
|
|
6
|
+
import { ARROW_DOWN as h, ARROW_UP as k, ARROW_RIGHT as D, ARROW_LEFT as y, HOME as K, END as L } from "../../composite/composite.mjs";
|
|
7
|
+
import { useAccordionRootContext as U } from "../root/AccordionRootContext.mjs";
|
|
8
|
+
import { useAccordionItemContext as q } from "../item/AccordionItemContext.mjs";
|
|
9
|
+
import { useRenderElement as G } from "../../utils/useRenderElement.mjs";
|
|
10
|
+
import { useButton as V } from "../../use-button/useButton.mjs";
|
|
11
|
+
import { stopEvent as Y } from "../../floating-ui-react/utils/event.mjs";
|
|
12
|
+
const j = /* @__PURE__ */ new Set([h, k, D, y, K, L]);
|
|
13
|
+
function J(R) {
|
|
14
|
+
const {
|
|
15
|
+
current: r
|
|
16
|
+
} = R, s = [];
|
|
17
|
+
for (let n = 0; n < r.length; n += 1) {
|
|
18
|
+
const d = r[n];
|
|
19
|
+
if (!T(d)) {
|
|
20
|
+
const t = d?.querySelector('[type="button"], [role="button"]');
|
|
21
|
+
t && !T(t) && s.push(t);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
const Q = /* @__PURE__ */ I.forwardRef(function(r, s) {
|
|
27
|
+
const {
|
|
28
|
+
disabled: n,
|
|
29
|
+
className: d,
|
|
30
|
+
id: t,
|
|
31
|
+
render: X,
|
|
32
|
+
nativeButton: N = !0,
|
|
33
|
+
...P
|
|
34
|
+
} = r, {
|
|
35
|
+
panelId: E,
|
|
36
|
+
open: f,
|
|
37
|
+
handleTrigger: x,
|
|
38
|
+
disabled: W
|
|
39
|
+
} = F(), _ = n ?? W, {
|
|
40
|
+
getButtonProps: C,
|
|
41
|
+
buttonRef: M
|
|
42
|
+
} = V({
|
|
43
|
+
disabled: _,
|
|
44
|
+
focusableWhenDisabled: !0,
|
|
45
|
+
native: N
|
|
46
|
+
}), {
|
|
47
|
+
accordionItemRefs: O,
|
|
48
|
+
direction: S,
|
|
49
|
+
loopFocus: l,
|
|
50
|
+
orientation: w
|
|
51
|
+
} = U(), u = S === "rtl", i = w === "horizontal", {
|
|
52
|
+
state: H,
|
|
53
|
+
setTriggerId: m,
|
|
54
|
+
triggerId: A
|
|
55
|
+
} = q();
|
|
56
|
+
B(() => (t && m(t), () => {
|
|
57
|
+
m(void 0);
|
|
58
|
+
}), [t, m]);
|
|
59
|
+
const v = I.useMemo(() => ({
|
|
60
|
+
"aria-controls": f ? E : void 0,
|
|
61
|
+
"aria-expanded": f,
|
|
62
|
+
id: A,
|
|
63
|
+
onClick: x,
|
|
64
|
+
onKeyDown(c) {
|
|
65
|
+
if (!j.has(c.key))
|
|
66
|
+
return;
|
|
67
|
+
Y(c);
|
|
68
|
+
const p = J(O), a = p.length - 1;
|
|
69
|
+
let e = -1;
|
|
70
|
+
const o = p.indexOf(c.target);
|
|
71
|
+
function g() {
|
|
72
|
+
l ? e = o + 1 > a ? 0 : o + 1 : e = Math.min(o + 1, a);
|
|
73
|
+
}
|
|
74
|
+
function b() {
|
|
75
|
+
l ? e = o === 0 ? a : o - 1 : e = o - 1;
|
|
76
|
+
}
|
|
77
|
+
switch (c.key) {
|
|
78
|
+
case h:
|
|
79
|
+
i || g();
|
|
80
|
+
break;
|
|
81
|
+
case k:
|
|
82
|
+
i || b();
|
|
83
|
+
break;
|
|
84
|
+
case D:
|
|
85
|
+
i && (u ? b() : g());
|
|
86
|
+
break;
|
|
87
|
+
case y:
|
|
88
|
+
i && (u ? g() : b());
|
|
89
|
+
break;
|
|
90
|
+
case "Home":
|
|
91
|
+
e = 0;
|
|
92
|
+
break;
|
|
93
|
+
case "End":
|
|
94
|
+
e = a;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
e > -1 && p[e].focus();
|
|
98
|
+
}
|
|
99
|
+
}), [O, x, A, i, u, l, f, E]);
|
|
100
|
+
return G("button", r, {
|
|
101
|
+
state: H,
|
|
102
|
+
ref: [s, M],
|
|
103
|
+
props: [v, P, C],
|
|
104
|
+
stateAttributesMapping: z
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
process.env.NODE_ENV !== "production" && (Q.displayName = "AccordionTrigger");
|
|
108
|
+
export {
|
|
109
|
+
Q as AccordionTrigger
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=AccordionTrigger.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionTrigger.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/accordion/trigger/AccordionTrigger.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { triggerOpenStateMapping } from \"../../utils/collapsibleOpenStateMapping.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { useCollapsibleRootContext } from \"../../collapsible/root/CollapsibleRootContext.js\";\nimport { ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END, stopEvent } from \"../../composite/composite.js\";\nimport { useAccordionRootContext } from \"../root/AccordionRootContext.js\";\nimport { useAccordionItemContext } from \"../item/AccordionItemContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nconst SUPPORTED_KEYS = new Set([ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END]);\nfunction getActiveTriggers(accordionItemRefs) {\n const {\n current: accordionItemElements\n } = accordionItemRefs;\n const output = [];\n for (let i = 0; i < accordionItemElements.length; i += 1) {\n const section = accordionItemElements[i];\n if (!isElementDisabled(section)) {\n const trigger = section?.querySelector('[type=\"button\"], [role=\"button\"]');\n if (trigger && !isElementDisabled(trigger)) {\n output.push(trigger);\n }\n }\n }\n return output;\n}\n\n/**\n * A button that opens and closes the corresponding panel.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\n\nexport const AccordionTrigger = /*#__PURE__*/React.forwardRef(function AccordionTrigger(componentProps, forwardedRef) {\n const {\n disabled: disabledProp,\n className,\n id: idProp,\n render,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n panelId,\n open,\n handleTrigger,\n disabled: contextDisabled\n } = useCollapsibleRootContext();\n const disabled = disabledProp ?? contextDisabled;\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton\n });\n const {\n accordionItemRefs,\n direction,\n loopFocus,\n orientation\n } = useAccordionRootContext();\n const isRtl = direction === 'rtl';\n const isHorizontal = orientation === 'horizontal';\n const {\n state,\n setTriggerId,\n triggerId: id\n } = useAccordionItemContext();\n useIsoLayoutEffect(() => {\n if (idProp) {\n setTriggerId(idProp);\n }\n return () => {\n setTriggerId(undefined);\n };\n }, [idProp, setTriggerId]);\n const props = React.useMemo(() => ({\n 'aria-controls': open ? panelId : undefined,\n 'aria-expanded': open,\n id,\n onClick: handleTrigger,\n onKeyDown(event) {\n if (!SUPPORTED_KEYS.has(event.key)) {\n return;\n }\n stopEvent(event);\n const triggers = getActiveTriggers(accordionItemRefs);\n const numOfEnabledTriggers = triggers.length;\n const lastIndex = numOfEnabledTriggers - 1;\n let nextIndex = -1;\n const thisIndex = triggers.indexOf(event.target);\n function toNext() {\n if (loopFocus) {\n nextIndex = thisIndex + 1 > lastIndex ? 0 : thisIndex + 1;\n } else {\n nextIndex = Math.min(thisIndex + 1, lastIndex);\n }\n }\n function toPrev() {\n if (loopFocus) {\n nextIndex = thisIndex === 0 ? lastIndex : thisIndex - 1;\n } else {\n nextIndex = thisIndex - 1;\n }\n }\n switch (event.key) {\n case ARROW_DOWN:\n if (!isHorizontal) {\n toNext();\n }\n break;\n case ARROW_UP:\n if (!isHorizontal) {\n toPrev();\n }\n break;\n case ARROW_RIGHT:\n if (isHorizontal) {\n if (isRtl) {\n toPrev();\n } else {\n toNext();\n }\n }\n break;\n case ARROW_LEFT:\n if (isHorizontal) {\n if (isRtl) {\n toNext();\n } else {\n toPrev();\n }\n }\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = lastIndex;\n break;\n default:\n break;\n }\n if (nextIndex > -1) {\n triggers[nextIndex].focus();\n }\n }\n }), [accordionItemRefs, handleTrigger, id, isHorizontal, isRtl, loopFocus, open, panelId]);\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef],\n props: [props, elementProps, getButtonProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") AccordionTrigger.displayName = \"AccordionTrigger\";"],"names":["SUPPORTED_KEYS","ARROW_DOWN","ARROW_UP","ARROW_RIGHT","ARROW_LEFT","HOME","END","getActiveTriggers","accordionItemRefs","accordionItemElements","output","i","section","isElementDisabled","trigger","AccordionTrigger","React","componentProps","forwardedRef","disabledProp","className","idProp","render","nativeButton","elementProps","panelId","open","handleTrigger","contextDisabled","useCollapsibleRootContext","disabled","getButtonProps","buttonRef","useButton","direction","loopFocus","orientation","useAccordionRootContext","isRtl","isHorizontal","state","setTriggerId","id","useAccordionItemContext","useIsoLayoutEffect","props","event","stopEvent","triggers","lastIndex","nextIndex","thisIndex","toNext","toPrev","useRenderElement","triggerOpenStateMapping"],"mappings":";;;;;;;;;;;AAYA,MAAMA,IAAiB,oBAAI,IAAI,CAACC,GAAYC,GAAUC,GAAaC,GAAYC,GAAMC,CAAG,CAAC;AACzF,SAASC,EAAkBC,GAAmB;AAC5C,QAAM;AAAA,IACJ,SAASC;AAAA,EACb,IAAMD,GACEE,IAAS,CAAA;AACf,WAASC,IAAI,GAAGA,IAAIF,EAAsB,QAAQE,KAAK,GAAG;AACxD,UAAMC,IAAUH,EAAsBE,CAAC;AACvC,QAAI,CAACE,EAAkBD,CAAO,GAAG;AAC/B,YAAME,IAAUF,GAAS,cAAc,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AkBC,CAAiB,GAE9CyC,IADuBD,EAAS,SACG;AACzC,UAAIE,IAAY;AAChB,YAAMC,IAAYH,EAAS,QAAQF,EAAM,MAAM;AAC/C,eAASM,IAAS;AAChB,QAAIjB,IACFe,IAAYC,IAAY,IAAIF,IAAY,IAAIE,IAAY,IAExDD,IAAY,KAAK,IAAIC,IAAY,GAAGF,CAAS;AAAA,MAEjD;AACA,eAASI,IAAS;AAChB,QAAIlB,IACFe,IAAYC,MAAc,IAAIF,IAAYE,IAAY,IAEtDD,IAAYC,IAAY;AAAA,MAE5B;AACA,cAAQL,EAAM,KAAG;AAAA,QACf,KAAK7C;AACH,UAAKsC,KACHa,EAAM;AAER;AAAA,QACF,KAAKlD;AACH,UAAKqC,KACHc,EAAM;AAER;AAAA,QACF,KAAKlD;AACH,UAAIoC,MACED,IACFe,EAAM,IAEND,EAAM;AAGV;AAAA,QACF,KAAKhD;AACH,UAAImC,MACED,IACFc,EAAM,IAENC,EAAM;AAGV;AAAA,QACF,KAAK;AACH,UAAAH,IAAY;AACZ;AAAA,QACF,KAAK;AACH,UAAAA,IAAYD;AACZ;AAAA,MAGV;AACM,MAAIC,IAAY,MACdF,EAASE,CAAS,EAAE,MAAK;AAAA,IAE7B;AAAA,EACJ,IAAM,CAAC1C,GAAmBmB,GAAee,GAAIH,GAAcD,GAAOH,GAAWT,GAAMD,CAAO,CAAC;AAOzF,SANgB6B,EAAiB,UAAUrC,GAAgB;AAAA,IACzD,OAAAuB;AAAA,IACA,KAAK,CAACtB,GAAcc,CAAS;AAAA,IAC7B,OAAO,CAACa,GAAOrB,GAAcO,CAAc;AAAA,IAC3C,wBAAwBwB;AAAA,EAC5B,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcxC,EAAiB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { inertValue as h } from "../../../../utils/esm/inertValue.mjs";
|
|
3
|
+
import { useIsoLayoutEffect as y } from "../../../../utils/esm/useIsoLayoutEffect.mjs";
|
|
4
|
+
import { useBaseUiId as A } from "../../utils/useBaseUiId.mjs";
|
|
5
|
+
import { transitionStatusMapping as E } from "../../utils/stateAttributesMapping.mjs";
|
|
6
|
+
import { useOpenChangeComplete as N } from "../../utils/useOpenChangeComplete.mjs";
|
|
7
|
+
import { useTransitionStatus as S } from "../../utils/useTransitionStatus.mjs";
|
|
8
|
+
import { useRenderElement as V } from "../../utils/useRenderElement.mjs";
|
|
9
|
+
import { useCompositeListItem as D } from "../../composite/list/useCompositeListItem.mjs";
|
|
10
|
+
import { tabsStateAttributesMapping as B } from "../root/stateAttributesMapping.mjs";
|
|
11
|
+
import { useTabsRootContext as L } from "../root/TabsRootContext.mjs";
|
|
12
|
+
import { TabsPanelDataAttributes as O } from "./TabsPanelDataAttributes.mjs";
|
|
13
|
+
const k = {
|
|
14
|
+
...B,
|
|
15
|
+
...E
|
|
16
|
+
}, w = /* @__PURE__ */ a.forwardRef(function(s, d) {
|
|
17
|
+
const {
|
|
18
|
+
className: _,
|
|
19
|
+
value: e,
|
|
20
|
+
render: j,
|
|
21
|
+
keepMounted: r = !1,
|
|
22
|
+
...f
|
|
23
|
+
} = s, {
|
|
24
|
+
value: p,
|
|
25
|
+
getTabIdByPanelValue: c,
|
|
26
|
+
orientation: b,
|
|
27
|
+
tabActivationDirection: T,
|
|
28
|
+
registerMountedTabPanel: i,
|
|
29
|
+
unregisterMountedTabPanel: u
|
|
30
|
+
} = L(), t = A(), R = a.useMemo(() => ({
|
|
31
|
+
id: t,
|
|
32
|
+
value: e
|
|
33
|
+
}), [t, e]), {
|
|
34
|
+
ref: g,
|
|
35
|
+
index: M
|
|
36
|
+
} = D({
|
|
37
|
+
metadata: R
|
|
38
|
+
}), n = e === p, {
|
|
39
|
+
mounted: l,
|
|
40
|
+
transitionStatus: I,
|
|
41
|
+
setMounted: P
|
|
42
|
+
} = S(n), o = !l, v = c(e), x = {
|
|
43
|
+
hidden: o,
|
|
44
|
+
orientation: b,
|
|
45
|
+
tabActivationDirection: T,
|
|
46
|
+
transitionStatus: I
|
|
47
|
+
}, m = a.useRef(null), C = V("div", s, {
|
|
48
|
+
state: x,
|
|
49
|
+
ref: [d, g, m],
|
|
50
|
+
props: [{
|
|
51
|
+
"aria-labelledby": v,
|
|
52
|
+
hidden: o,
|
|
53
|
+
id: t,
|
|
54
|
+
role: "tabpanel",
|
|
55
|
+
tabIndex: n ? 0 : -1,
|
|
56
|
+
inert: h(!n),
|
|
57
|
+
[O.index]: M
|
|
58
|
+
}, f],
|
|
59
|
+
stateAttributesMapping: k
|
|
60
|
+
});
|
|
61
|
+
return N({
|
|
62
|
+
open: n,
|
|
63
|
+
ref: m,
|
|
64
|
+
onComplete() {
|
|
65
|
+
n || P(!1);
|
|
66
|
+
}
|
|
67
|
+
}), y(() => {
|
|
68
|
+
if (!(o && !r) && t != null)
|
|
69
|
+
return i(e, t), () => {
|
|
70
|
+
u(e, t);
|
|
71
|
+
};
|
|
72
|
+
}, [o, r, e, t, i, u]), r || l ? C : null;
|
|
73
|
+
});
|
|
74
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "TabsPanel");
|
|
75
|
+
export {
|
|
76
|
+
w as TabsPanel
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=TabsPanel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsPanel.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/tabs/panel/TabsPanel.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useCompositeListItem } from \"../../composite/list/useCompositeListItem.js\";\nimport { tabsStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\nimport { useTabsRootContext } from \"../root/TabsRootContext.js\";\nimport { TabsPanelDataAttributes } from \"./TabsPanelDataAttributes.js\";\nconst stateAttributesMapping = {\n ...tabsStateAttributesMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A panel displayed when the corresponding tab is active.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nexport const TabsPanel = /*#__PURE__*/React.forwardRef(function TabPanel(componentProps, forwardedRef) {\n const {\n className,\n value,\n render,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const {\n value: selectedValue,\n getTabIdByPanelValue,\n orientation,\n tabActivationDirection,\n registerMountedTabPanel,\n unregisterMountedTabPanel\n } = useTabsRootContext();\n const id = useBaseUiId();\n const metadata = React.useMemo(() => ({\n id,\n value\n }), [id, value]);\n const {\n ref: listItemRef,\n index\n } = useCompositeListItem({\n metadata\n });\n const open = value === selectedValue;\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(open);\n const hidden = !mounted;\n const correspondingTabId = getTabIdByPanelValue(value);\n const state = {\n hidden,\n orientation,\n tabActivationDirection,\n transitionStatus\n };\n const panelRef = React.useRef(null);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, listItemRef, panelRef],\n props: [{\n 'aria-labelledby': correspondingTabId,\n hidden,\n id,\n role: 'tabpanel',\n tabIndex: open ? 0 : -1,\n inert: inertValue(!open),\n [TabsPanelDataAttributes.index]: index\n }, elementProps],\n stateAttributesMapping\n });\n useOpenChangeComplete({\n open,\n ref: panelRef,\n onComplete() {\n if (!open) {\n setMounted(false);\n }\n }\n });\n useIsoLayoutEffect(() => {\n if (hidden && !keepMounted) {\n return undefined;\n }\n if (id == null) {\n return undefined;\n }\n registerMountedTabPanel(value, id);\n return () => {\n unregisterMountedTabPanel(value, id);\n };\n }, [hidden, keepMounted, value, id, registerMountedTabPanel, unregisterMountedTabPanel]);\n const shouldRender = keepMounted || mounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") TabsPanel.displayName = \"TabsPanel\";"],"names":["stateAttributesMapping","tabsStateAttributesMapping","transitionStatusMapping","TabsPanel","React","componentProps","forwardedRef","className","value","render","keepMounted","elementProps","selectedValue","getTabIdByPanelValue","orientation","tabActivationDirection","registerMountedTabPanel","unregisterMountedTabPanel","useTabsRootContext","id","useBaseUiId","metadata","listItemRef","index","useCompositeListItem","open","mounted","transitionStatus","setMounted","useTransitionStatus","hidden","correspondingTabId","state","panelRef","element","useRenderElement","inertValue","TabsPanelDataAttributes","useOpenChangeComplete","useIsoLayoutEffect"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,IAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AACL,GAQaC,IAAyB,gBAAAC,EAAM,WAAW,SAAkBC,GAAgBC,GAAc;AACrG,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,OAAOO;AAAA,IACP,sBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,2BAAAC;AAAA,EACJ,IAAMC,EAAkB,GAChBC,IAAKC,EAAW,GAChBC,IAAWjB,EAAM,QAAQ,OAAO;AAAA,IACpC,IAAAe;AAAA,IACA,OAAAX;AAAA,EACJ,IAAM,CAACW,GAAIX,CAAK,CAAC,GACT;AAAA,IACJ,KAAKc;AAAA,IACL,OAAAC;AAAA,EACJ,IAAMC,EAAqB;AAAA,IACvB,UAAAH;AAAA,EACJ,CAAG,GACKI,IAAOjB,MAAUI,GACjB;AAAA,IACJ,SAAAc;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,EACJ,IAAMC,EAAoBJ,CAAI,GACtBK,IAAS,CAACJ,GACVK,IAAqBlB,EAAqBL,CAAK,GAC/CwB,IAAQ;AAAA,IACZ,QAAAF;AAAA,IACA,aAAAhB;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAY;AAAA,EACJ,GACQM,IAAW7B,EAAM,OAAO,IAAI,GAC5B8B,IAAUC,EAAiB,OAAO9B,GAAgB;AAAA,IACtD,OAAA2B;AAAA,IACA,KAAK,CAAC1B,GAAcgB,GAAaW,CAAQ;AAAA,IACzC,OAAO,CAAC;AAAA,MACN,mBAAmBF;AAAA,MACnB,QAAAD;AAAA,MACA,IAAAX;AAAA,MACA,MAAM;AAAA,MACN,UAAUM,IAAO,IAAI;AAAA,MACrB,OAAOW,EAAW,CAACX,CAAI;AAAA,MACvB,CAACY,EAAwB,KAAK,GAAGd;AAAA,IACvC,GAAOZ,CAAY;AAAA,IACf,wBAAAX;AAAA,EACJ,CAAG;AAuBD,SAtBAsC,EAAsB;AAAA,IACpB,MAAAb;AAAA,IACA,KAAKQ;AAAA,IACL,aAAa;AACX,MAAKR,KACHG,EAAW,EAAK;AAAA,IAEpB;AAAA,EACJ,CAAG,GACDW,EAAmB,MAAM;AACvB,QAAI,EAAAT,KAAU,CAACpB,MAGXS,KAAM;AAGV,aAAAH,EAAwBR,GAAOW,CAAE,GAC1B,MAAM;AACX,QAAAF,EAA0BT,GAAOW,CAAE;AAAA,MACrC;AAAA,EACF,GAAG,CAACW,GAAQpB,GAAaF,GAAOW,GAAIH,GAAyBC,CAAyB,CAAC,GAClEP,KAAegB,IAI7BQ,IAFE;AAGX,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAc/B,EAAU,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
let n = /* @__PURE__ */ (function(i) {
|
|
2
|
+
return i.index = "data-index", i.activationDirection = "data-activation-direction", i.orientation = "data-orientation", i.hidden = "data-hidden", i;
|
|
3
|
+
})({});
|
|
4
|
+
export {
|
|
5
|
+
n as TabsPanelDataAttributes
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=TabsPanelDataAttributes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsPanelDataAttributes.mjs","sources":["../../../../../../../node_modules/@base-ui/react/esm/tabs/panel/TabsPanelDataAttributes.js"],"sourcesContent":["export let TabsPanelDataAttributes = /*#__PURE__*/function (TabsPanelDataAttributes) {\n /**\n * Indicates the index of the tab panel.\n */\n TabsPanelDataAttributes[\"index\"] = \"data-index\";\n /**\n * Indicates the direction of the activation (based on the previous active tab).\n * @type {'left' | 'right' | 'up' | 'down' | 'none'}\n */\n TabsPanelDataAttributes[\"activationDirection\"] = \"data-activation-direction\";\n /**\n * Indicates the orientation of the tabs.\n * @type {'horizontal' | 'vertical'}\n */\n TabsPanelDataAttributes[\"orientation\"] = \"data-orientation\";\n /**\n * Present when the panel is hidden.\n */\n TabsPanelDataAttributes[\"hidden\"] = \"data-hidden\";\n return TabsPanelDataAttributes;\n}({});"],"names":["TabsPanelDataAttributes"],"mappings":"AAAU,IAACA,IAAuC,0BAAUA,GAAyB;AAInF,SAAAA,EAAwB,QAAW,cAKnCA,EAAwB,sBAAyB,6BAKjDA,EAAwB,cAAiB,oBAIzCA,EAAwB,SAAY,eAC7BA;AACT,GAAE,CAAA,CAAE;","x_google_ignoreList":[0]}
|
|
@@ -11,9 +11,9 @@ declare const customFireEvent: {
|
|
|
11
11
|
select: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
12
12
|
contextMenu: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
13
13
|
copy: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
14
|
-
error: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
15
14
|
submit: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
16
15
|
reset: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
16
|
+
error: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
17
17
|
scroll: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
18
18
|
drag: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
|
19
19
|
change: (element: Document | Element | Window | Node, options?: {}) => boolean;
|
package/package.json
CHANGED