@vritti/quantum-ui 0.4.0 → 0.4.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/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 +18 -6
- 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/index37.js
CHANGED
|
@@ -1,41 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useRef, useState, useCallback, useContext, useMemo } from 'react';
|
|
3
|
+
import { u as useIsomorphicLayoutEffect, f as frame, L as LayoutGroupContext } from './proxy.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
5
|
+
const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);
|
|
6
|
+
function nodeGroup() {
|
|
7
|
+
const nodes = new Set();
|
|
8
|
+
const subscriptions = new WeakMap();
|
|
9
|
+
const dirtyAll = () => nodes.forEach(notify);
|
|
10
|
+
return {
|
|
11
|
+
add: (node) => {
|
|
12
|
+
nodes.add(node);
|
|
13
|
+
subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
|
|
14
|
+
},
|
|
15
|
+
remove: (node) => {
|
|
16
|
+
nodes.delete(node);
|
|
17
|
+
const unsubscribe = subscriptions.get(node);
|
|
18
|
+
if (unsubscribe) {
|
|
19
|
+
unsubscribe();
|
|
20
|
+
subscriptions.delete(node);
|
|
21
|
+
}
|
|
22
|
+
dirtyAll();
|
|
23
|
+
},
|
|
24
|
+
dirty: dirtyAll,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Note: Still used by components generated by old versions of Framer
|
|
30
|
+
*
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
33
|
+
const DeprecatedLayoutGroupContext = createContext(null);
|
|
34
|
+
|
|
35
|
+
function useIsMounted() {
|
|
36
|
+
const isMounted = useRef(false);
|
|
37
|
+
useIsomorphicLayoutEffect(() => {
|
|
38
|
+
isMounted.current = true;
|
|
39
|
+
return () => {
|
|
40
|
+
isMounted.current = false;
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
return isMounted;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function useForceUpdate() {
|
|
47
|
+
const isMounted = useIsMounted();
|
|
48
|
+
const [forcedRenderCount, setForcedRenderCount] = useState(0);
|
|
49
|
+
const forceRender = useCallback(() => {
|
|
50
|
+
isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
|
|
51
|
+
}, [forcedRenderCount]);
|
|
52
|
+
/**
|
|
53
|
+
* Defer this to the end of the next animation frame in case there are multiple
|
|
54
|
+
* synchronous calls.
|
|
55
|
+
*/
|
|
56
|
+
const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);
|
|
57
|
+
return [deferredForceRender, forcedRenderCount];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const shouldInheritGroup = (inherit) => inherit === true;
|
|
61
|
+
const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id";
|
|
62
|
+
const LayoutGroup = ({ children, id, inherit = true }) => {
|
|
63
|
+
const layoutGroupContext = useContext(LayoutGroupContext);
|
|
64
|
+
const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);
|
|
65
|
+
const [forceRender, key] = useForceUpdate();
|
|
66
|
+
const context = useRef(null);
|
|
67
|
+
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
|
|
68
|
+
if (context.current === null) {
|
|
69
|
+
if (shouldInheritId(inherit) && upstreamId) {
|
|
70
|
+
id = id ? upstreamId + "-" + id : upstreamId;
|
|
28
71
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
72
|
+
context.current = {
|
|
73
|
+
id,
|
|
74
|
+
group: shouldInheritGroup(inherit)
|
|
75
|
+
? layoutGroupContext.group || nodeGroup()
|
|
76
|
+
: nodeGroup(),
|
|
77
|
+
};
|
|
35
78
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
79
|
+
const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]);
|
|
80
|
+
return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children }));
|
|
81
|
+
};
|
|
39
82
|
|
|
40
|
-
export {
|
|
83
|
+
export { DeprecatedLayoutGroupContext as D, LayoutGroup as L, nodeGroup as n, useForceUpdate as u };
|
|
41
84
|
//# sourceMappingURL=index37.js.map
|
package/dist/index37.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index37.js","sources":["../node_modules/.pnpm
|
|
1
|
+
{"version":3,"file":"index37.js","sources":["../node_modules/.pnpm/motion-dom@12.38.0/node_modules/motion-dom/dist/es/projection/node/group.mjs","../node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs","../node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs"],"sourcesContent":["const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);\nfunction nodeGroup() {\n const nodes = new Set();\n const subscriptions = new WeakMap();\n const dirtyAll = () => nodes.forEach(notify);\n return {\n add: (node) => {\n nodes.add(node);\n subscriptions.set(node, node.addEventListener(\"willUpdate\", dirtyAll));\n },\n remove: (node) => {\n nodes.delete(node);\n const unsubscribe = subscriptions.get(node);\n if (unsubscribe) {\n unsubscribe();\n subscriptions.delete(node);\n }\n dirtyAll();\n },\n dirty: dirtyAll,\n };\n}\n\nexport { nodeGroup };\n//# sourceMappingURL=group.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Note: Still used by components generated by old versions of Framer\n *\n * @deprecated\n */\nconst DeprecatedLayoutGroupContext = createContext(null);\n\nexport { DeprecatedLayoutGroupContext };\n//# sourceMappingURL=DeprecatedLayoutGroupContext.mjs.map\n","\"use client\";\nimport { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n//# sourceMappingURL=use-is-mounted.mjs.map\n","\"use client\";\nimport { frame } from 'motion-dom';\nimport { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n//# sourceMappingURL=use-force-update.mjs.map\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, useRef, useMemo } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { nodeGroup } from 'motion-dom';\n\nconst shouldInheritGroup = (inherit) => inherit === true;\nconst shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === \"id\";\nconst LayoutGroup = ({ children, id, inherit = true }) => {\n const layoutGroupContext = useContext(LayoutGroupContext);\n const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);\n const [forceRender, key] = useForceUpdate();\n const context = useRef(null);\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId;\n }\n context.current = {\n id,\n group: shouldInheritGroup(inherit)\n ? layoutGroupContext.group || nodeGroup()\n : nodeGroup(),\n };\n }\n const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]);\n return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children }));\n};\n\nexport { LayoutGroup };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;AAAA,MAAM,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AACtE,SAAS,SAAS,GAAG;AACrB,IAAI,MAAM,KAAK,GAAG,IAAI,GAAG,EAAE;AAC3B,IAAI,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE;AACvC,IAAI,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAChD,IAAI,OAAO;AACX,QAAQ,GAAG,EAAE,CAAC,IAAI,KAAK;AACvB,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AAC3B,YAAY,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AAClF,QAAQ,CAAC;AACT,QAAQ,MAAM,EAAE,CAAC,IAAI,KAAK;AAC1B,YAAY,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;AAC9B,YAAY,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,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