@konstructio/ui 0.0.12-alpha.9 → 0.0.13-alpha.1
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/{Modal-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
- package/dist/components/Alert/Alert.js +24 -29
- package/dist/components/Alert/Alert.variants.js +9 -15
- package/dist/components/AlertDialog/AlertDialog.js +59 -46
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +76 -72
- package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
- package/dist/components/Autocomplete/components/List/List.js +28 -30
- package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
- package/dist/components/Breadcrumb/Breadcrumb.js +47 -56
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
- package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
- package/dist/components/Button/Button.js +33 -37
- package/dist/components/Button/Button.variants.js +138 -195
- package/dist/components/Card/Card.js +32 -37
- package/dist/components/Card/Card.variants.js +18 -53
- package/dist/components/Checkbox/Checkbox.js +65 -68
- package/dist/components/Checkbox/Checkbox.variants.js +11 -35
- package/dist/components/Command/Command.js +33 -25
- package/dist/components/Command/Command.variants.js +47 -94
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +8 -8
- package/dist/components/Divider/Divider.js +3 -2
- package/dist/components/Divider/Divider.variants.js +12 -9
- package/dist/components/Dropdown/Dropdown.js +6 -6
- package/dist/components/Dropdown/Dropdown.variants.js +31 -38
- package/dist/components/Dropdown/components/List/List.js +17 -15
- package/dist/components/Dropdown/components/List/List.variants.js +22 -32
- package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
- package/dist/components/Dropdown/components/Wrapper.js +127 -90
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
- package/dist/components/Input/Input.js +37 -37
- package/dist/components/Input/Input.variants.js +8 -13
- package/dist/components/Loading/Loading.js +60 -58
- package/dist/components/Loading/Loading.variants.js +9 -15
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +2 -2
- package/dist/components/Modal/components/Header/Header.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +93 -111
- package/dist/components/NumberInput/NumberInput.variants.js +30 -51
- package/dist/components/ProgressBar/ProgressBar.js +25 -29
- package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
- package/dist/components/Radio/Radio.js +45 -46
- package/dist/components/Radio/Radio.variants.js +4 -13
- package/dist/components/RadioCard/RadioCard.js +31 -37
- package/dist/components/RadioCard/RadioCard.variants.js +8 -17
- package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
- package/dist/components/RadioGroup/RadioGroup.js +30 -31
- package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
- package/dist/components/Range/Range.js +28 -34
- package/dist/components/Range/Range.variants.js +21 -53
- package/dist/components/Sidebar/Sidebar.js +12 -13
- package/dist/components/Sidebar/Sidebar.variants.js +30 -56
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
- package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
- package/dist/components/Slider/Slider.js +26 -27
- package/dist/components/Slider/Slider.variants.js +22 -34
- package/dist/components/Switch/Switch.js +103 -106
- package/dist/components/Switch/Switch.variants.js +28 -53
- package/dist/components/Table/Table.js +27 -0
- package/dist/components/Table/Table.variants.js +40 -0
- package/dist/components/Table/components/Body.js +18 -0
- package/dist/components/Table/components/Filter.js +9 -0
- package/dist/components/Table/components/Head.js +18 -0
- package/dist/components/Table/components/Row.js +28 -0
- package/dist/components/Table/components/index.js +10 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +23 -55
- package/dist/components/TagSelect/components/Item/Item.js +12 -14
- package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
- package/dist/components/TagSelect/components/List/List.js +9 -10
- package/dist/components/TagSelect/components/List/List.variants.js +21 -35
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
- package/dist/components/TextArea/TextArea.js +20 -23
- package/dist/components/TextArea/TextArea.variants.js +19 -31
- package/dist/components/Toast/Toast.js +110 -116
- package/dist/components/Toast/Toast.variants.js +42 -70
- package/dist/components/Tooltip/Tooltip.js +21 -27
- package/dist/components/Tooltip/Tooltip.variants.js +61 -62
- package/dist/components/Typography/Typography.js +23 -19
- package/dist/components/Typography/Typography.variants.js +1 -7
- package/dist/components/index.js +22 -20
- package/dist/contexts/theme.provider.js +37 -39
- package/dist/domain/theme.js +0 -0
- package/dist/index-AM3avohj.js +133 -0
- package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
- package/dist/index-Bk324h27.js +82 -0
- package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
- package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
- package/dist/index-D9BbbgUq.js +47 -0
- package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
- package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
- package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
- package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
- package/dist/index-dRxIWVBr.js +313 -0
- package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
- package/dist/index.d.ts +115 -98
- package/dist/index.js +30 -30
- package/dist/package.json +37 -36
- package/dist/styles.css +1 -1
- package/dist/ui/kubefirst-theme.css +296 -0
- package/dist/ui/theme.css +6 -0
- package/dist/ui/utilities.css +165 -0
- package/dist/utils/index.js +675 -424
- package/package.json +37 -36
- package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
- package/dist/index-B_6_jmOO.js +0 -68
- package/dist/index-BbsJ0VIJ.js +0 -47
- package/dist/index-CzSBQN5S.js +0 -432
- package/dist/index-DUA6Y_AE.js +0 -126
- package/dist/plugins/index.js +0 -4
- package/dist/plugins/konstruct.js +0 -118
- package/dist/plugins/utils/animation.styles.js +0 -162
- package/dist/plugins/utils/colors.js +0 -331
- package/dist/plugins/utils/index.js +0 -7
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@konstructio/ui",
|
|
3
3
|
"description": "A set of reusable and customizable React components built for konstruct.io",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.13-alpha.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://konstructio.github.io/konstruct-ui",
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "rimraf ./dist & tsc --p ./tsconfig.build.json && vite build &&
|
|
42
|
+
"build": "rimraf ./dist & tsc --p ./tsconfig.build.json && vite build && chmod +x scripts/copy.sh && ./scripts/copy.sh",
|
|
43
43
|
"build:storybook": "storybook build -o storybook-static && cp -r public/* storybook-static",
|
|
44
44
|
"check:prettier": "prettier lib --check --config ./.prettierrc",
|
|
45
45
|
"check:types": "tsc -p tsconfig.json",
|
|
@@ -55,23 +55,23 @@
|
|
|
55
55
|
"test:watch": "vitest dev"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
59
|
-
"@radix-ui/react-checkbox": "^1.1.
|
|
60
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
61
|
-
"@radix-ui/react-slider": "^1.2.
|
|
62
|
-
"@radix-ui/react-slot": "^1.
|
|
63
|
-
"@radix-ui/react-switch": "^1.1.
|
|
64
|
-
"@radix-ui/react-toast": "^1.2.
|
|
65
|
-
"@radix-ui/react-visually-hidden": "^1.1.
|
|
58
|
+
"@radix-ui/react-alert-dialog": "^1.1.7",
|
|
59
|
+
"@radix-ui/react-checkbox": "^1.1.5",
|
|
60
|
+
"@radix-ui/react-dialog": "^1.1.7",
|
|
61
|
+
"@radix-ui/react-slider": "^1.2.4",
|
|
62
|
+
"@radix-ui/react-slot": "^1.2.0",
|
|
63
|
+
"@radix-ui/react-switch": "^1.1.4",
|
|
64
|
+
"@radix-ui/react-toast": "^1.2.7",
|
|
65
|
+
"@radix-ui/react-visually-hidden": "^1.1.3",
|
|
66
66
|
"class-variance-authority": "^0.7.1",
|
|
67
67
|
"clsx": "^2.1.1",
|
|
68
|
-
"cmdk": "^1.
|
|
68
|
+
"cmdk": "^1.1.1",
|
|
69
69
|
"js-cookie": "^3.0.5",
|
|
70
|
-
"lucide-react": "^0.
|
|
70
|
+
"lucide-react": "^0.488.0",
|
|
71
71
|
"react-feather": "^2.0.10",
|
|
72
72
|
"react-focus-lock": "^2.13.6",
|
|
73
73
|
"react-remove-scroll": "^2.6.3",
|
|
74
|
-
"tailwind-merge": "^3.0
|
|
74
|
+
"tailwind-merge": "^3.2.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@types/react": "*",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
|
|
80
80
|
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0",
|
|
81
81
|
"react-router-dom": "^7",
|
|
82
|
-
"tailwindcss": "^
|
|
82
|
+
"tailwindcss": "^4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"react": {
|
|
@@ -103,28 +103,29 @@
|
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@rollup/plugin-alias": "^5.1.1",
|
|
106
|
-
"@storybook/addon-docs": "^8.6.
|
|
107
|
-
"@storybook/addon-essentials": "^8.6.
|
|
108
|
-
"@storybook/addon-interactions": "^8.6.
|
|
109
|
-
"@storybook/addon-links": "^8.6.
|
|
106
|
+
"@storybook/addon-docs": "^8.6.12",
|
|
107
|
+
"@storybook/addon-essentials": "^8.6.12",
|
|
108
|
+
"@storybook/addon-interactions": "^8.6.12",
|
|
109
|
+
"@storybook/addon-links": "^8.6.12",
|
|
110
110
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
111
|
-
"@storybook/blocks": "^8.6.
|
|
112
|
-
"@storybook/react": "^8.6.
|
|
113
|
-
"@storybook/react-vite": "^8.6.
|
|
114
|
-
"@storybook/test": "^8.6.
|
|
111
|
+
"@storybook/blocks": "^8.6.12",
|
|
112
|
+
"@storybook/react": "^8.6.12",
|
|
113
|
+
"@storybook/react-vite": "^8.6.12",
|
|
114
|
+
"@storybook/test": "^8.6.12",
|
|
115
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
115
116
|
"@testing-library/jest-dom": "^6.6.3",
|
|
116
|
-
"@testing-library/react": "^16.
|
|
117
|
+
"@testing-library/react": "^16.3.0",
|
|
117
118
|
"@testing-library/user-event": "^14.6.1",
|
|
118
119
|
"@types/jest-axe": "^3.5.9",
|
|
119
120
|
"@types/js-cookie": "^3.0.6",
|
|
120
121
|
"@types/lodash": "^4.17.16",
|
|
121
|
-
"@types/react": "^19.
|
|
122
|
-
"@types/react-dom": "^19.
|
|
123
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
124
|
-
"@typescript-eslint/parser": "^8.
|
|
122
|
+
"@types/react": "^19.1.2",
|
|
123
|
+
"@types/react-dom": "^19.1.2",
|
|
124
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
125
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
125
126
|
"@vitejs/plugin-react": "^4.3.4",
|
|
126
|
-
"@vitest/coverage-v8": "^3.
|
|
127
|
-
"autoprefixer": "^10.4.
|
|
127
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
128
|
+
"autoprefixer": "^10.4.21",
|
|
128
129
|
"eslint": "^8.57.0",
|
|
129
130
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
130
131
|
"eslint-plugin-react-refresh": "^0.4.7",
|
|
@@ -132,20 +133,20 @@
|
|
|
132
133
|
"glob": "^11.0.1",
|
|
133
134
|
"husky": "^9.1.7",
|
|
134
135
|
"jest-axe": "^10.0.0",
|
|
135
|
-
"jsdom": "^26.
|
|
136
|
+
"jsdom": "^26.1.0",
|
|
136
137
|
"lodash": "^4.17.21",
|
|
137
138
|
"postcss": "^8.5.3",
|
|
138
139
|
"prettier": "^3.5.3",
|
|
139
140
|
"rimraf": "^6.0.1",
|
|
140
|
-
"storybook": "^8.6.
|
|
141
|
-
"tailwindcss": "^
|
|
141
|
+
"storybook": "^8.6.12",
|
|
142
|
+
"tailwindcss": "^4.1.4",
|
|
142
143
|
"ts-node": "^10.9.2",
|
|
143
|
-
"typescript": "^5.8.
|
|
144
|
-
"vite": "^6.2.
|
|
144
|
+
"typescript": "^5.8.3",
|
|
145
|
+
"vite": "^6.2.6",
|
|
145
146
|
"vite-plugin-dts": "^4.5.3",
|
|
146
|
-
"vite-plugin-lib-inject-css": "^2.2.
|
|
147
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
147
148
|
"vite-plugin-svgr": "^4.3.0",
|
|
148
149
|
"vite-tsconfig-paths": "^5.1.4",
|
|
149
|
-
"vitest": "^3.
|
|
150
|
+
"vitest": "^3.1.1"
|
|
150
151
|
}
|
|
151
152
|
}
|
package/dist/index-B_6_jmOO.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { jsx as c, Fragment as m } from "react/jsx-runtime";
|
|
3
|
-
function p(e, r) {
|
|
4
|
-
if (typeof e == "function")
|
|
5
|
-
return e(r);
|
|
6
|
-
e != null && (e.current = r);
|
|
7
|
-
}
|
|
8
|
-
function d(...e) {
|
|
9
|
-
return (r) => {
|
|
10
|
-
let n = !1;
|
|
11
|
-
const o = e.map((t) => {
|
|
12
|
-
const l = p(t, r);
|
|
13
|
-
return !n && typeof l == "function" && (n = !0), l;
|
|
14
|
-
});
|
|
15
|
-
if (n)
|
|
16
|
-
return () => {
|
|
17
|
-
for (let t = 0; t < o.length; t++) {
|
|
18
|
-
const l = o[t];
|
|
19
|
-
typeof l == "function" ? l() : p(e[t], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function S(...e) {
|
|
25
|
-
return i.useCallback(d(...e), e);
|
|
26
|
-
}
|
|
27
|
-
var y = i.forwardRef((e, r) => {
|
|
28
|
-
const { children: n, ...o } = e, t = i.Children.toArray(n), l = t.find(h);
|
|
29
|
-
if (l) {
|
|
30
|
-
const s = l.props.children, a = t.map((f) => f === l ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : f);
|
|
31
|
-
return /* @__PURE__ */ c(u, { ...o, ref: r, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
|
|
32
|
-
}
|
|
33
|
-
return /* @__PURE__ */ c(u, { ...o, ref: r, children: n });
|
|
34
|
-
});
|
|
35
|
-
y.displayName = "Slot";
|
|
36
|
-
var u = i.forwardRef((e, r) => {
|
|
37
|
-
const { children: n, ...o } = e;
|
|
38
|
-
if (i.isValidElement(n)) {
|
|
39
|
-
const t = R(n), l = C(o, n.props);
|
|
40
|
-
return n.type !== i.Fragment && (l.ref = r ? d(r, t) : t), i.cloneElement(n, l);
|
|
41
|
-
}
|
|
42
|
-
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
43
|
-
});
|
|
44
|
-
u.displayName = "SlotClone";
|
|
45
|
-
var g = ({ children: e }) => /* @__PURE__ */ c(m, { children: e });
|
|
46
|
-
function h(e) {
|
|
47
|
-
return i.isValidElement(e) && e.type === g;
|
|
48
|
-
}
|
|
49
|
-
function C(e, r) {
|
|
50
|
-
const n = { ...r };
|
|
51
|
-
for (const o in r) {
|
|
52
|
-
const t = e[o], l = r[o];
|
|
53
|
-
/^on[A-Z]/.test(o) ? t && l ? n[o] = (...a) => {
|
|
54
|
-
l(...a), t(...a);
|
|
55
|
-
} : t && (n[o] = t) : o === "style" ? n[o] = { ...t, ...l } : o === "className" && (n[o] = [t, l].filter(Boolean).join(" "));
|
|
56
|
-
}
|
|
57
|
-
return { ...e, ...n };
|
|
58
|
-
}
|
|
59
|
-
function R(e) {
|
|
60
|
-
var o, t;
|
|
61
|
-
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = r && "isReactWarning" in r && r.isReactWarning;
|
|
62
|
-
return n ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
y as S,
|
|
66
|
-
g as a,
|
|
67
|
-
S as u
|
|
68
|
-
};
|
package/dist/index-BbsJ0VIJ.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import n from "react";
|
|
2
|
-
import { c as O } from "./index-Cva-e5M4.js";
|
|
3
|
-
import { u as I, S as x } from "./index-B_6_jmOO.js";
|
|
4
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
5
|
-
function L(s) {
|
|
6
|
-
const f = s + "CollectionProvider", [A, N] = O(f), [_, a] = A(
|
|
7
|
-
f,
|
|
8
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
9
|
-
), u = (c) => {
|
|
10
|
-
const { scope: e, children: l } = c, o = n.useRef(null), t = n.useRef(/* @__PURE__ */ new Map()).current;
|
|
11
|
-
return /* @__PURE__ */ m(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
12
|
-
};
|
|
13
|
-
u.displayName = f;
|
|
14
|
-
const d = s + "CollectionSlot", p = n.forwardRef(
|
|
15
|
-
(c, e) => {
|
|
16
|
-
const { scope: l, children: o } = c, t = a(d, l), r = I(e, t.collectionRef);
|
|
17
|
-
return /* @__PURE__ */ m(x, { ref: r, children: o });
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
p.displayName = d;
|
|
21
|
-
const C = s + "CollectionItemSlot", R = "data-radix-collection-item", M = n.forwardRef(
|
|
22
|
-
(c, e) => {
|
|
23
|
-
const { scope: l, children: o, ...t } = c, r = n.useRef(null), S = I(e, r), i = a(C, l);
|
|
24
|
-
return n.useEffect(() => (i.itemMap.set(r, { ref: r, ...t }), () => void i.itemMap.delete(r))), /* @__PURE__ */ m(x, { [R]: "", ref: S, children: o });
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
M.displayName = C;
|
|
28
|
-
function E(c) {
|
|
29
|
-
const e = a(s + "CollectionConsumer", c);
|
|
30
|
-
return n.useCallback(() => {
|
|
31
|
-
const o = e.collectionRef.current;
|
|
32
|
-
if (!o) return [];
|
|
33
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
34
|
-
return Array.from(e.itemMap.values()).sort(
|
|
35
|
-
(i, T) => t.indexOf(i.ref.current) - t.indexOf(T.ref.current)
|
|
36
|
-
);
|
|
37
|
-
}, [e.collectionRef, e.itemMap]);
|
|
38
|
-
}
|
|
39
|
-
return [
|
|
40
|
-
{ Provider: u, Slot: p, ItemSlot: M },
|
|
41
|
-
E,
|
|
42
|
-
N
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
L as c
|
|
47
|
-
};
|