@vritti/quantum-ui 0.4.0 → 0.4.2
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/Avatar.js +5 -5
- package/dist/Checkbox.js +16 -11
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox2.js +4 -5
- package/dist/Checkbox2.js.map +1 -1
- package/dist/Combination.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Progress.js +2 -2
- package/dist/RadioGroup.js +4 -5
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/Sonner.js +1 -1
- package/dist/Switch.js +19 -14
- package/dist/Switch.js.map +1 -1
- package/dist/TabsSkeleton.js +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/assets/quantum-ui.css +1 -1
- package/dist/components/RichTextEditor.js +1 -1
- package/dist/components/TreeView.js +2 -3
- package/dist/components/TreeView.js.map +1 -1
- package/dist/disabledTip.js +13 -0
- package/dist/disabledTip.js.map +1 -0
- package/dist/dropdown-menu.js +5 -7
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/image-component.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index13.js +4 -6
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +3 -5
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +8 -9
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.js +1 -1
- package/dist/index19.js +2 -4
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.js +139 -1
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +3 -4
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +70 -122
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +1128 -70
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +231 -11
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +2509 -1106
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +23 -223
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +3 -2535
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +36 -31
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +308 -3
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +8 -36
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +25 -305
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +60 -8
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +11 -30
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +35 -59
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +35348 -9
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +79 -36
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +184 -35341
- package/dist/index38.js.map +1 -1
- package/dist/index5.js +2 -4
- package/dist/index5.js.map +1 -1
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/components/Switch/Switch.d.ts +4 -1
- package/dist/lib/components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/selects/permission-group/PermissionGroupSelector.d.ts +4 -0
- package/dist/lib/selects/permission-group/PermissionGroupSelector.d.ts.map +1 -0
- package/dist/lib/selects/permission-group/index.d.ts +2 -0
- package/dist/lib/selects/permission-group/index.d.ts.map +1 -0
- package/dist/lib/types/catalog-resolver.d.ts +19 -7
- package/dist/lib/types/catalog-resolver.d.ts.map +1 -1
- package/dist/lib/utils/disabledTip.d.ts +3 -0
- package/dist/lib/utils/disabledTip.d.ts.map +1 -0
- package/dist/selects/permission-group.js +21 -0
- package/dist/selects/permission-group.js.map +1 -0
- package/dist/types/catalog-resolver.js +1 -1
- package/dist/types/catalog-resolver.js.map +1 -1
- package/dist/utils/motion.js +2 -2
- package/dist/value.js +1 -1
- package/package.json +5 -1
- package/dist/index39.js +0 -84
- package/dist/index39.js.map +0 -1
- package/dist/index40.js +0 -199
- package/dist/index40.js.map +0 -1
package/dist/index35.js
CHANGED
|
@@ -1,65 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { u as useLayoutEffect2 } from './index28.js';
|
|
3
3
|
|
|
4
|
-
// src/
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
// packages/react/use-size/src/use-size.tsx
|
|
5
|
+
function useSize(element) {
|
|
6
|
+
const [size, setSize] = React.useState(void 0);
|
|
7
|
+
useLayoutEffect2(() => {
|
|
8
|
+
if (element) {
|
|
9
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
10
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
11
|
+
if (!Array.isArray(entries)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (!entries.length) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const entry = entries[0];
|
|
18
|
+
let width;
|
|
19
|
+
let height;
|
|
20
|
+
if ("borderBoxSize" in entry) {
|
|
21
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
22
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
23
|
+
width = borderSize["inlineSize"];
|
|
24
|
+
height = borderSize["blockSize"];
|
|
25
|
+
} else {
|
|
26
|
+
width = element.offsetWidth;
|
|
27
|
+
height = element.offsetHeight;
|
|
28
|
+
}
|
|
29
|
+
setSize({ width, height });
|
|
30
|
+
});
|
|
31
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
32
|
+
return () => resizeObserver.unobserve(element);
|
|
33
|
+
} else {
|
|
34
|
+
setSize(void 0);
|
|
25
35
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const createScope = () => {
|
|
29
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
30
|
-
return React.createContext(defaultContext);
|
|
31
|
-
});
|
|
32
|
-
return function useScope(scope) {
|
|
33
|
-
const contexts = scope?.[scopeName] || scopeContexts;
|
|
34
|
-
return React.useMemo(
|
|
35
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
36
|
-
[scope, contexts]
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
createScope.scopeName = scopeName;
|
|
41
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
42
|
-
}
|
|
43
|
-
function composeContextScopes(...scopes) {
|
|
44
|
-
const baseScope = scopes[0];
|
|
45
|
-
if (scopes.length === 1) return baseScope;
|
|
46
|
-
const createScope = () => {
|
|
47
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
48
|
-
useScope: createScope2(),
|
|
49
|
-
scopeName: createScope2.scopeName
|
|
50
|
-
}));
|
|
51
|
-
return function useComposedScopes(overrideScopes) {
|
|
52
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
53
|
-
const scopeProps = useScope(overrideScopes);
|
|
54
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
55
|
-
return { ...nextScopes2, ...currentScope };
|
|
56
|
-
}, {});
|
|
57
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
createScope.scopeName = baseScope.scopeName;
|
|
61
|
-
return createScope;
|
|
36
|
+
}, [element]);
|
|
37
|
+
return size;
|
|
62
38
|
}
|
|
63
39
|
|
|
64
|
-
export {
|
|
40
|
+
export { useSize as u };
|
|
65
41
|
//# sourceMappingURL=index35.js.map
|
package/dist/index35.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index35.js","sources":["../node_modules/.pnpm/@radix-ui+react-
|
|
1
|
+
{"version":3,"file":"index35.js","sources":["../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.14_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"],"mappings":";;;AAAA;AAGA,SAAS,OAAO,CAAC,OAAO,EAAE;AAC1B,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;AAChD,EAAEA,gBAAe,CAAC,MAAM;AACxB,IAAI,IAAI,OAAO,EAAE;AACjB,MAAM,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;AAC3E,MAAM,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAK;AAC7D,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