@vritti/quantum-ui 0.3.7 → 0.3.9
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 +4 -4
- package/dist/Checkbox2.js +2 -2
- package/dist/ConfirmHost.js +109 -0
- package/dist/ConfirmHost.js.map +1 -0
- package/dist/Dialog.js +74 -42
- package/dist/Dialog.js.map +1 -1
- package/dist/DropdownMenu.js +1 -2
- package/dist/DropdownMenu.js.map +1 -1
- package/dist/Form.js +50 -26
- package/dist/Form.js.map +1 -1
- package/dist/Progress.js +2 -2
- package/dist/RadioGroup.js +2 -2
- package/dist/Sidebar.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/TabsSkeleton.js +48 -22
- package/dist/TabsSkeleton.js.map +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/assets/quantum-ui.css +43 -5
- package/dist/cells.js +46 -43
- package/dist/cells.js.map +1 -1
- package/dist/components/ConfirmHost.js +2 -0
- package/dist/components/ConfirmHost.js.map +1 -0
- package/dist/components/RichTextEditor.js +1 -1
- package/dist/context/index.js +0 -1
- package/dist/context/index.js.map +1 -1
- package/dist/dropdown-menu.js +2 -2
- package/dist/image-component.js +1 -1
- package/dist/index.js +2 -2
- package/dist/index13.js +1 -1
- package/dist/index14.js +3 -3
- package/dist/index15.js +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.js +1 -1
- package/dist/index20.js +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.js +2 -2
- package/dist/index29.js +1123 -35
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +36 -310
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +309 -7
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +8 -30
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +29 -59
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +59 -10
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +10 -35
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +27 -36809
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +36809 -70
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +72 -187
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +199 -0
- package/dist/index39.js.map +1 -0
- package/dist/lib/components/ConfirmHost/ConfirmHost.d.ts +39 -0
- package/dist/lib/components/ConfirmHost/ConfirmHost.d.ts.map +1 -0
- package/dist/lib/components/ConfirmHost/index.d.ts +2 -0
- package/dist/lib/components/ConfirmHost/index.d.ts.map +1 -0
- package/dist/lib/components/Dialog/Dialog.d.ts +2 -3
- package/dist/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/lib/components/DropdownMenu/types.d.ts +0 -1
- package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -1
- package/dist/lib/components/Form/Form.d.ts.map +1 -1
- package/dist/lib/components/Tabs/Tabs.d.ts +2 -1
- package/dist/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/context/index.d.ts +0 -1
- package/dist/lib/context/index.d.ts.map +1 -1
- package/dist/lib/hooks/useConfirm.d.ts +3 -3
- package/dist/lib/hooks/useConfirm.d.ts.map +1 -1
- package/dist/useConfirm.js +3 -7
- package/dist/useConfirm.js.map +1 -1
- package/dist/utils/motion.js +2 -2
- package/dist/value.js +1 -1
- package/package.json +5 -1
- package/dist/Combination.js +0 -1129
- package/dist/Combination.js.map +0 -1
- package/dist/ConfirmContext.js +0 -96
- package/dist/ConfirmContext.js.map +0 -1
- package/dist/lib/context/ConfirmContext.d.ts +0 -26
- package/dist/lib/context/ConfirmContext.d.ts.map +0 -1
package/dist/index34.js
CHANGED
|
@@ -1,16 +1,65 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
|
-
//
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
// src/create-context.tsx
|
|
5
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
6
|
+
let defaultContexts = [];
|
|
7
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
8
|
+
const BaseContext = React.createContext(defaultContext);
|
|
9
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
10
|
+
const index = defaultContexts.length;
|
|
11
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
12
|
+
const Provider = (props) => {
|
|
13
|
+
const { scope, children, ...context } = props;
|
|
14
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
15
|
+
const value = React.useMemo(() => context, Object.values(context));
|
|
16
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
17
|
+
};
|
|
18
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
19
|
+
function useContext2(consumerName, scope) {
|
|
20
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
21
|
+
const context = React.useContext(Context);
|
|
22
|
+
if (context) return context;
|
|
23
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
24
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
10
25
|
}
|
|
11
|
-
return
|
|
12
|
-
}
|
|
26
|
+
return [Provider, useContext2];
|
|
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;
|
|
13
62
|
}
|
|
14
63
|
|
|
15
|
-
export {
|
|
64
|
+
export { createContextScope as c };
|
|
16
65
|
//# sourceMappingURL=index34.js.map
|
package/dist/index34.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index34.js","sources":["../node_modules/.pnpm/@radix-ui+react-
|
|
1
|
+
{"version":3,"file":"index34.js","sources":["../node_modules/.pnpm/@radix-ui+react-context@1.1.3_@types+react@19.2.14_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;AAAA;AAoBA,SAAS,kBAAkB,CAAC,SAAS,EAAE,sBAAsB,GAAG,EAAE,EAAE;AACpE,EAAE,IAAI,eAAe,GAAG,EAAE;AAC1B,EAAE,SAAS,cAAc,CAAC,iBAAiB,EAAE,cAAc,EAAE;AAC7D,IAAI,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;AAC3D,IAAI,WAAW,CAAC,WAAW,GAAG,iBAAiB,GAAG,SAAS;AAC3D,IAAI,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM;AACxC,IAAI,eAAe,GAAG,CAAC,GAAG,eAAe,EAAE,cAAc,CAAC;AAC1D,IAAI,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAChC,MAAM,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK;AACnD,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG,KAAK,CAAC,IAAI,WAAW;AAChE,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACxE,MAAM,uBAAuB,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvE,IAAI,CAAC;AACL,IAAI,QAAQ,CAAC,WAAW,GAAG,iBAAiB,GAAG,UAAU;AACzD,IAAI,SAAS,WAAW,CAAC,YAAY,EAAE,KAAK,EAAE;AAC9C,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG,KAAK,CAAC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AC3C,EAAE,MAAM,WAAW,GAAG,MAAM;AAC5B,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,MAAM;AACrD,MAAM,QAAQ,EAAE,YAAY,EAAE;AAC9B,MAAM,SAAS,EAAE,YAAY,CAAC;AAC9B,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,SAAS,iBAAiB,CAAC,cAAc,EAAE;AACtD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK;AACrF,QAAQ,MAAM,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC;AACnD,QAAQ,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAC9D,QAAQ,OAAO,EAAE,GAAG,WAAW,EAAE,GAAG,YAAY,EAAE;AAClD,MAAM,CAAC,EAAE,EAAE,CAAC;AACZ,MAAM,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;AACnG,IAAI,CAAC;AACL,EAAE,CAAC;AACH,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS;AAC7C,EAAE,OAAO,WAAW;AACpB;;;;","x_google_ignoreList":[0]}
|
package/dist/index35.js
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { u as useLayoutEffect2 } from './index28.js';
|
|
3
2
|
|
|
4
|
-
// packages/react/use-
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
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);
|
|
3
|
+
// packages/react/use-previous/src/use-previous.tsx
|
|
4
|
+
function usePrevious(value) {
|
|
5
|
+
const ref = React.useRef({ value, previous: value });
|
|
6
|
+
return React.useMemo(() => {
|
|
7
|
+
if (ref.current.value !== value) {
|
|
8
|
+
ref.current.previous = ref.current.value;
|
|
9
|
+
ref.current.value = value;
|
|
35
10
|
}
|
|
36
|
-
|
|
37
|
-
|
|
11
|
+
return ref.current.previous;
|
|
12
|
+
}, [value]);
|
|
38
13
|
}
|
|
39
14
|
|
|
40
|
-
export {
|
|
15
|
+
export { usePrevious as u };
|
|
41
16
|
//# 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-use-
|
|
1
|
+
{"version":3,"file":"index35.js","sources":["../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.14_react@19.2.3/node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;AAAA;AAEA,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B,EAAE,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACtD,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM;AAC7B,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,KAAK,EAAE;AACrC,MAAM,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK;AAC9C,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK;AAC/B,IAAI;AACJ,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ;AAC/B,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AACb;;;;","x_google_ignoreList":[0]}
|