@vritti/quantum-ui 0.6.0 → 0.6.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.
Files changed (109) hide show
  1. package/dist/Alert.js +1 -1
  2. package/dist/Avatar.js +5 -5
  3. package/dist/Badge2.js +2 -2
  4. package/dist/Breadcrumb.js +1 -1
  5. package/dist/Button2.js +2 -2
  6. package/dist/Checkbox2.js +5 -5
  7. package/dist/DateTimePicker.js +1 -1
  8. package/dist/Dialog.js +1 -1
  9. package/dist/IconSelect.js +1 -1
  10. package/dist/Label.js +1 -1
  11. package/dist/Progress.js +2 -2
  12. package/dist/RadioGroup.js +7 -7
  13. package/dist/Select.js +1 -1
  14. package/dist/Sidebar.js +3 -3
  15. package/dist/Sonner.js +1 -1
  16. package/dist/Switch.js +5 -5
  17. package/dist/TabsSkeleton.js +2 -2
  18. package/dist/Toggle.js +2 -2
  19. package/dist/components/FormattedDate.js +1 -1
  20. package/dist/components/RichTextEditor.js +1 -1
  21. package/dist/components/TreeView.js +5 -5
  22. package/dist/dropdown-menu.js +9 -9
  23. package/dist/field.js +1 -1
  24. package/dist/image-component.js +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/index10.js +1499 -102
  27. package/dist/index10.js.map +1 -1
  28. package/dist/index11.js +37 -1499
  29. package/dist/index11.js.map +1 -1
  30. package/dist/index12.js +503 -28
  31. package/dist/index12.js.map +1 -1
  32. package/dist/index13.js +229 -454
  33. package/dist/index13.js.map +1 -1
  34. package/dist/index14.js +22 -281
  35. package/dist/index14.js.map +1 -1
  36. package/dist/index15.js +1139 -20
  37. package/dist/index15.js.map +1 -1
  38. package/dist/index16.js +14 -1139
  39. package/dist/index16.js.map +1 -1
  40. package/dist/index17.js +173 -19
  41. package/dist/index17.js.map +1 -1
  42. package/dist/index18.js +173 -168
  43. package/dist/index18.js.map +1 -1
  44. package/dist/index19.js +201 -171
  45. package/dist/index19.js.map +1 -1
  46. package/dist/index20.js +190 -186
  47. package/dist/index20.js.map +1 -1
  48. package/dist/index21.js +204 -202
  49. package/dist/index21.js.map +1 -1
  50. package/dist/index22.js +68 -209
  51. package/dist/index22.js.map +1 -1
  52. package/dist/index23.js +1128 -70
  53. package/dist/index23.js.map +1 -1
  54. package/dist/index24.js +4 -1133
  55. package/dist/index24.js.map +1 -1
  56. package/dist/index25.js +232 -4
  57. package/dist/index25.js.map +1 -1
  58. package/dist/index26.js +1100 -207
  59. package/dist/index26.js.map +1 -1
  60. package/dist/index27.js +2469 -1023
  61. package/dist/index27.js.map +1 -1
  62. package/dist/index28.js +35 -2569
  63. package/dist/index28.js.map +1 -1
  64. package/dist/index29.js +308 -36
  65. package/dist/index29.js.map +1 -1
  66. package/dist/index30.js +7 -307
  67. package/dist/index30.js.map +1 -1
  68. package/dist/index31.js +30 -8
  69. package/dist/index31.js.map +1 -1
  70. package/dist/index32.js +59 -29
  71. package/dist/index32.js.map +1 -1
  72. package/dist/index33.js +10 -59
  73. package/dist/index33.js.map +1 -1
  74. package/dist/index34.js +35347 -9
  75. package/dist/index34.js.map +1 -1
  76. package/dist/index35.js +72 -35342
  77. package/dist/index35.js.map +1 -1
  78. package/dist/index36.js +187 -72
  79. package/dist/index36.js.map +1 -1
  80. package/dist/index5.js +4 -4
  81. package/dist/index7.js +99 -13
  82. package/dist/index7.js.map +1 -1
  83. package/dist/index8.js +43 -99
  84. package/dist/index8.js.map +1 -1
  85. package/dist/index9.js +102 -42
  86. package/dist/index9.js.map +1 -1
  87. package/dist/lib/utils/timezone.d.ts +1 -0
  88. package/dist/lib/utils/timezone.d.ts.map +1 -1
  89. package/dist/popover.js +1 -1
  90. package/dist/select2.js +1 -1
  91. package/dist/separator2.js +1 -1
  92. package/dist/timezone.js +68 -0
  93. package/dist/timezone.js.map +1 -0
  94. package/dist/tooltip2.js +1 -1
  95. package/dist/useDataTable.js +1 -1
  96. package/dist/useTimer.js +1 -1
  97. package/dist/useWorkspaceTimeZone.js +1 -1
  98. package/dist/utils/axios.js +1 -1
  99. package/dist/utils/currency.js +2 -2
  100. package/dist/utils/format.js +1 -2
  101. package/dist/utils/format.js.map +1 -1
  102. package/dist/utils/money.js +1 -1
  103. package/dist/utils/motion.js +2 -2
  104. package/dist/utils/timezone.js +4 -51
  105. package/dist/utils/timezone.js.map +1 -1
  106. package/dist/value.js +1 -1
  107. package/package.json +1 -1
  108. package/dist/index37.js +0 -199
  109. package/dist/index37.js.map +0 -1
package/dist/index36.js CHANGED
@@ -1,84 +1,199 @@
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';
1
+ import React__default from 'react';
4
2
 
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
- }
3
+ var shim = {exports: {}};
4
+
5
+ var useSyncExternalStoreShim_production = {};
27
6
 
28
7
  /**
29
- * Note: Still used by components generated by old versions of Framer
8
+ * @license React
9
+ * use-sync-external-store-shim.production.js
30
10
  *
31
- * @deprecated
11
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
32
15
  */
33
- const DeprecatedLayoutGroupContext = createContext(null);
34
16
 
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;
17
+ var hasRequiredUseSyncExternalStoreShim_production;
18
+
19
+ function requireUseSyncExternalStoreShim_production () {
20
+ if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
21
+ hasRequiredUseSyncExternalStoreShim_production = 1;
22
+ var React = React__default;
23
+ function is(x, y) {
24
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
25
+ }
26
+ var objectIs = "function" === typeof Object.is ? Object.is : is,
27
+ useState = React.useState,
28
+ useEffect = React.useEffect,
29
+ useLayoutEffect = React.useLayoutEffect,
30
+ useDebugValue = React.useDebugValue;
31
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
32
+ var value = getSnapshot(),
33
+ _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
34
+ inst = _useState[0].inst,
35
+ forceUpdate = _useState[1];
36
+ useLayoutEffect(
37
+ function () {
38
+ inst.value = value;
39
+ inst.getSnapshot = getSnapshot;
40
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
41
+ },
42
+ [subscribe, value, getSnapshot]
43
+ );
44
+ useEffect(
45
+ function () {
46
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
47
+ return subscribe(function () {
48
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
49
+ });
50
+ },
51
+ [subscribe]
52
+ );
53
+ useDebugValue(value);
54
+ return value;
55
+ }
56
+ function checkIfSnapshotChanged(inst) {
57
+ var latestGetSnapshot = inst.getSnapshot;
58
+ inst = inst.value;
59
+ try {
60
+ var nextValue = latestGetSnapshot();
61
+ return !objectIs(inst, nextValue);
62
+ } catch (error) {
63
+ return true;
64
+ }
65
+ }
66
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
67
+ return getSnapshot();
68
+ }
69
+ var shim =
70
+ "undefined" === typeof window ||
71
+ "undefined" === typeof window.document ||
72
+ "undefined" === typeof window.document.createElement
73
+ ? useSyncExternalStore$1
74
+ : useSyncExternalStore$2;
75
+ useSyncExternalStoreShim_production.useSyncExternalStore =
76
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
77
+ return useSyncExternalStoreShim_production;
44
78
  }
45
79
 
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];
80
+ var useSyncExternalStoreShim_development = {};
81
+
82
+ /**
83
+ * @license React
84
+ * use-sync-external-store-shim.development.js
85
+ *
86
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
87
+ *
88
+ * This source code is licensed under the MIT license found in the
89
+ * LICENSE file in the root directory of this source tree.
90
+ */
91
+
92
+ var hasRequiredUseSyncExternalStoreShim_development;
93
+
94
+ function requireUseSyncExternalStoreShim_development () {
95
+ if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
96
+ hasRequiredUseSyncExternalStoreShim_development = 1;
97
+ "production" !== process.env.NODE_ENV &&
98
+ (function () {
99
+ function is(x, y) {
100
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
101
+ }
102
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
103
+ didWarnOld18Alpha ||
104
+ void 0 === React.startTransition ||
105
+ ((didWarnOld18Alpha = true),
106
+ console.error(
107
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
108
+ ));
109
+ var value = getSnapshot();
110
+ if (!didWarnUncachedGetSnapshot) {
111
+ var cachedValue = getSnapshot();
112
+ objectIs(value, cachedValue) ||
113
+ (console.error(
114
+ "The result of getSnapshot should be cached to avoid an infinite loop"
115
+ ),
116
+ (didWarnUncachedGetSnapshot = true));
117
+ }
118
+ cachedValue = useState({
119
+ inst: { value: value, getSnapshot: getSnapshot }
120
+ });
121
+ var inst = cachedValue[0].inst,
122
+ forceUpdate = cachedValue[1];
123
+ useLayoutEffect(
124
+ function () {
125
+ inst.value = value;
126
+ inst.getSnapshot = getSnapshot;
127
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
128
+ },
129
+ [subscribe, value, getSnapshot]
130
+ );
131
+ useEffect(
132
+ function () {
133
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
134
+ return subscribe(function () {
135
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
136
+ });
137
+ },
138
+ [subscribe]
139
+ );
140
+ useDebugValue(value);
141
+ return value;
142
+ }
143
+ function checkIfSnapshotChanged(inst) {
144
+ var latestGetSnapshot = inst.getSnapshot;
145
+ inst = inst.value;
146
+ try {
147
+ var nextValue = latestGetSnapshot();
148
+ return !objectIs(inst, nextValue);
149
+ } catch (error) {
150
+ return true;
151
+ }
152
+ }
153
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
154
+ return getSnapshot();
155
+ }
156
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
157
+ "function" ===
158
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
159
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
160
+ var React = React__default,
161
+ objectIs = "function" === typeof Object.is ? Object.is : is,
162
+ useState = React.useState,
163
+ useEffect = React.useEffect,
164
+ useLayoutEffect = React.useLayoutEffect,
165
+ useDebugValue = React.useDebugValue,
166
+ didWarnOld18Alpha = false,
167
+ didWarnUncachedGetSnapshot = false,
168
+ shim =
169
+ "undefined" === typeof window ||
170
+ "undefined" === typeof window.document ||
171
+ "undefined" === typeof window.document.createElement
172
+ ? useSyncExternalStore$1
173
+ : useSyncExternalStore$2;
174
+ useSyncExternalStoreShim_development.useSyncExternalStore =
175
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
176
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
177
+ "function" ===
178
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
179
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
180
+ })();
181
+ return useSyncExternalStoreShim_development;
58
182
  }
59
183
 
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;
71
- }
72
- context.current = {
73
- id,
74
- group: shouldInheritGroup(inherit)
75
- ? layoutGroupContext.group || nodeGroup()
76
- : nodeGroup(),
77
- };
78
- }
79
- const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]);
80
- return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children }));
81
- };
184
+ var hasRequiredShim;
185
+
186
+ function requireShim () {
187
+ if (hasRequiredShim) return shim.exports;
188
+ hasRequiredShim = 1;
189
+
190
+ if (process.env.NODE_ENV === 'production') {
191
+ shim.exports = requireUseSyncExternalStoreShim_production();
192
+ } else {
193
+ shim.exports = requireUseSyncExternalStoreShim_development();
194
+ }
195
+ return shim.exports;
196
+ }
82
197
 
83
- export { DeprecatedLayoutGroupContext as D, LayoutGroup as L, nodeGroup as n, useForceUpdate as u };
198
+ export { requireShim as r };
84
199
  //# sourceMappingURL=index36.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index36.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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AE;AAClC,QAAQ,IAAI,eAAe,CAAC,OAAO,CAAC,IAAI,UAAU,EAAE;AACpD,YAAY,EAAE,GAAG,EAAE,GAAG,UAAU,GAAG,GAAG,GAAG,EAAE,GAAG,UAAU;AACxD,QAAQ;AACR,QAAQ,OAAO,CAAC,OAAO,GAAG;AAC1B,YAAY,EAAE;AACd,YAAY,KAAK,EAAE,kBAAkB,CAAC,OAAO;AAC7C,kBAAkB,kBAAkB,CAAC,KAAK,IAAI,SAAS;AACvD,kBAAkB,SAAS,EAAE;AAC7B,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACvF,IAAI,QAAQ,GAAG,CAAC,kBAAkB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC5F;;;;","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"index36.js","sources":["../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["require$$0","shimModule","require$$1"],"mappings":";;;;;;;;;;;;;;;;;;;;;CAWA,IAAI,KAAK,GAAGA,cAAgB;AAC5B,CAAA,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;GAChB,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAA;AACA,CAAA,IAAI,QAAQ,GAAG,UAAU,KAAK,OAAO,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,EAAE;AAC/D,GAAE,QAAQ,GAAG,KAAK,CAAC,QAAQ;AAC3B,GAAE,SAAS,GAAG,KAAK,CAAC,SAAS;AAC7B,GAAE,eAAe,GAAG,KAAK,CAAC,eAAe;AACzC,GAAE,aAAa,GAAG,KAAK,CAAC,aAAa;AACrC,CAAA,SAAS,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE;AACxD,GAAE,IAAI,KAAK,GAAG,WAAW,EAAE;AAC3B,KAAI,SAAS,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,CAAC;AAC9E,KAAI,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;AAC5B,KAAI,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC;AAC9B,GAAE,eAAe;AACjB,KAAI,YAAY;AAChB,OAAM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M,CAAC,EAAE,GAAG,EAAE;AACjE,OAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ;AAC/B,OAAM,SAAS,GAAG,KAAK,CAAC,SAAS;AACjC,OAAM,eAAe,GAAG,KAAK,CAAC,eAAe;AAC7C,OAAM,aAAa,GAAG,KAAK,CAAC,aAAa;OACnC,iBAAiB,GAAG,KAAE;OACtB,0BAA0B,GAAG,KAAE;AACrC,OAAM,IAAI;SACF,WAAW,KAAK,OAAO,MAAM;AACrC,SAAQ,WAAW,KAAK,OAAO,MAAM,CAAC,QAAQ;AAC9C,SAAQ,WAAW,KAAK,OAAO,MAAM,CAAC,QAAQ,CAAC;aACnC;AACZ,aAAY,sBAAsB;AAClC,KAAI,oCAAA,CAAA,oBAA4B;OAC1B,MAAM,KAAK,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,GAAG,IAAI;KAC3E,WAAW,KAAK,OAAO,8BAA8B;AACzD,OAAM,UAAU;SACR,OAAO,8BAA8B,CAAC,0BAA0B;AACxE,OAAM,8BAA8B,CAAC,0BAA0B,CAAC,KAAK,EAAE,CAAC;AACxE,GAAA,CAAG,GAAG;;;;;;;;;;AC5FN,CAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;GACzCC,IAAA,CAAA,OAAc,GAAGD,0CAAA,EAA4D;AAC/E,CAAA,CAAC,MAAM;GACLC,IAAA,CAAA,OAAc,GAAGC,2CAAA,EAA6D;AAChF,CAAA;;;;;;","x_google_ignoreList":[0,1,2]}
package/dist/index5.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { u as useControllableState, P as Primitive, c as composeEventHandlers } from './index20.js';
3
- import { u as useId, P as Presence, c as createContextScope } from './index21.js';
4
- import { u as useLayoutEffect2 } from './index25.js';
5
- import { u as useComposedRefs } from './index12.js';
2
+ import { u as useControllableState, P as Primitive, c as composeEventHandlers } from './index19.js';
3
+ import { u as useId, P as Presence, c as createContextScope } from './index20.js';
4
+ import { u as useLayoutEffect2 } from './index24.js';
5
+ import { u as useComposedRefs } from './index11.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  var COLLAPSIBLE_NAME = "Collapsible";
package/dist/index7.js CHANGED
@@ -1,15 +1,101 @@
1
- import { T as TZDate } from './index6.js';
1
+ const defaultConfig = {
2
+ csrf: {
3
+ endpoint: "csrf/token",
4
+ enabled: true,
5
+ headerName: "x-csrf-token"
6
+ },
7
+ axios: {
8
+ baseURL: "/api",
9
+ timeout: 3e4,
10
+ withCredentials: true,
11
+ headers: {
12
+ "Content-Type": "application/json",
13
+ Accept: "application/json"
14
+ }
15
+ },
16
+ auth: {
17
+ tokenHeaderName: "Authorization",
18
+ tokenPrefix: "Bearer",
19
+ tokenEndpoint: "auth/access-token",
20
+ refreshEndpoint: "auth/refresh-tokens",
21
+ sessionRecoveryEnabled: true
22
+ },
23
+ timeZone: {
24
+ resolveTimeZone: void 0
25
+ },
26
+ currency: {
27
+ resolveCurrency: void 0
28
+ },
29
+ sse: {
30
+ onRequest: void 0
31
+ },
32
+ views: {
33
+ viewsEndpoint: "table-views",
34
+ statesEndpoint: "table-states"
35
+ }
36
+ };
37
+ const GLOBAL_CONFIG_KEY = "__QUANTUM_UI_CONFIG__";
38
+ function getGlobalConfig() {
39
+ if (typeof window !== "undefined") {
40
+ const globalWindow = window;
41
+ if (!globalWindow[GLOBAL_CONFIG_KEY]) {
42
+ globalWindow[GLOBAL_CONFIG_KEY] = { ...defaultConfig };
43
+ }
44
+ return globalWindow[GLOBAL_CONFIG_KEY] ?? { ...defaultConfig };
45
+ }
46
+ return { ...defaultConfig };
47
+ }
48
+ function setGlobalConfig(config) {
49
+ if (typeof window !== "undefined") {
50
+ window[GLOBAL_CONFIG_KEY] = config;
51
+ }
52
+ }
53
+ function defineConfig(config) {
54
+ return config;
55
+ }
56
+ function configureQuantumUI(userConfig) {
57
+ const newConfig = {
58
+ csrf: {
59
+ ...defaultConfig.csrf,
60
+ ...userConfig.csrf || {}
61
+ },
62
+ axios: {
63
+ ...defaultConfig.axios,
64
+ ...userConfig.axios || {},
65
+ headers: {
66
+ ...defaultConfig.axios.headers,
67
+ ...userConfig.axios?.headers || {}
68
+ }
69
+ },
70
+ auth: {
71
+ ...defaultConfig.auth,
72
+ ...userConfig.auth || {}
73
+ },
74
+ timeZone: {
75
+ ...defaultConfig.timeZone,
76
+ ...userConfig.timeZone || {}
77
+ },
78
+ currency: {
79
+ ...defaultConfig.currency,
80
+ ...userConfig.currency || {}
81
+ },
82
+ sse: {
83
+ ...defaultConfig.sse,
84
+ ...userConfig.sse || {}
85
+ },
86
+ views: {
87
+ ...defaultConfig.views,
88
+ ...userConfig.views || {}
89
+ }
90
+ };
91
+ setGlobalConfig(newConfig);
92
+ }
93
+ function getConfig() {
94
+ return getGlobalConfig();
95
+ }
96
+ function resetConfig() {
97
+ setGlobalConfig({ ...defaultConfig });
98
+ }
2
99
 
3
- /**
4
- * The function creates accepts a time zone and returns a function that creates
5
- * a new `TZDate` instance in the time zone from the provided value. Use it to
6
- * provide the context for the date-fns functions, via the `in` option.
7
- *
8
- * @param timeZone - Time zone name (IANA or UTC offset)
9
- *
10
- * @returns Function that creates a new `TZDate` instance in the time zone
11
- */
12
- const tz = timeZone => value => TZDate.tz(timeZone, +new Date(value));
13
-
14
- export { tz as t };
100
+ export { configureQuantumUI as c, defineConfig as d, getConfig as g, resetConfig as r };
15
101
  //# sourceMappingURL=index7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index7.js","sources":["../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/tz/index.js"],"sourcesContent":["import { TZDate } from \"../date/index.js\";\n\n/**\n * The function creates accepts a time zone and returns a function that creates\n * a new `TZDate` instance in the time zone from the provided value. Use it to\n * provide the context for the date-fns functions, via the `in` option.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n *\n * @returns Function that creates a new `TZDate` instance in the time zone\n */\nexport const tz = timeZone => value => TZDate.tz(timeZone, +new Date(value));"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,EAAE,GAAG,QAAQ,IAAI,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index7.js","sources":["../lib/config/index.ts"],"sourcesContent":["export interface CsrfConfig {\n endpoint: string;\n\n enabled: boolean;\n\n headerName: string;\n}\n\nexport interface AxiosConfig {\n baseURL: string;\n\n timeout: number;\n\n withCredentials: boolean;\n\n headers?: Record<string, string>;\n\n onRequest?: (config: import('axios').InternalAxiosRequestConfig) => void | Promise<void>;\n}\n\nexport interface AuthConfig {\n tokenHeaderName: string;\n\n tokenPrefix: string;\n\n tokenEndpoint: string;\n\n refreshEndpoint: string;\n\n sessionRecoveryEnabled: boolean;\n}\n\nexport interface ViewsConfig {\n viewsEndpoint: string;\n\n statesEndpoint: string;\n}\n\nexport interface TimeZoneConfig {\n resolveTimeZone?: () => string | null | undefined;\n}\n\nexport interface CurrencyConfig {\n resolveCurrency?: () => string | null | undefined;\n}\n\nexport interface SseConfig {\n // Rewrites an SSE URL before the EventSource opens — the counterpart to axios.onRequest. EventSource\n // cannot set request headers, so whatever an HTTP call carries in a header (workspace/tenant context)\n // has to ride the query string here instead. Returns the URL to connect to.\n onRequest?: (url: string) => string;\n}\n\nexport interface QuantumUIConfig {\n csrf?: Partial<CsrfConfig>;\n\n axios?: Partial<AxiosConfig>;\n\n auth?: Partial<AuthConfig>;\n\n timeZone?: TimeZoneConfig;\n\n currency?: CurrencyConfig;\n\n sse?: SseConfig;\n\n views: ViewsConfig;\n}\n\nconst defaultConfig: {\n csrf: CsrfConfig;\n axios: AxiosConfig;\n auth: AuthConfig;\n views: Required<ViewsConfig>;\n timeZone: TimeZoneConfig;\n currency: CurrencyConfig;\n sse: SseConfig;\n} = {\n csrf: {\n endpoint: 'csrf/token',\n enabled: true,\n headerName: 'x-csrf-token',\n },\n axios: {\n baseURL: '/api',\n timeout: 30000,\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n },\n auth: {\n tokenHeaderName: 'Authorization',\n tokenPrefix: 'Bearer',\n tokenEndpoint: 'auth/access-token',\n refreshEndpoint: 'auth/refresh-tokens',\n sessionRecoveryEnabled: true,\n },\n timeZone: {\n resolveTimeZone: undefined,\n },\n currency: {\n resolveCurrency: undefined,\n },\n sse: {\n onRequest: undefined,\n },\n views: {\n viewsEndpoint: 'table-views',\n statesEndpoint: 'table-states',\n },\n};\n\nconst GLOBAL_CONFIG_KEY = '__QUANTUM_UI_CONFIG__';\n\ntype GlobalWindow = Window & typeof globalThis & { [GLOBAL_CONFIG_KEY]?: typeof defaultConfig };\n\n// Get the current config from global storage or initialize with defaults\nfunction getGlobalConfig(): typeof defaultConfig {\n if (typeof window !== 'undefined') {\n const globalWindow = window as GlobalWindow;\n if (!globalWindow[GLOBAL_CONFIG_KEY]) {\n globalWindow[GLOBAL_CONFIG_KEY] = { ...defaultConfig };\n }\n return globalWindow[GLOBAL_CONFIG_KEY] ?? { ...defaultConfig };\n }\n return { ...defaultConfig };\n}\n\n// Set the global config\nfunction setGlobalConfig(config: typeof defaultConfig): void {\n if (typeof window !== 'undefined') {\n (window as GlobalWindow)[GLOBAL_CONFIG_KEY] = config;\n }\n}\n\n// Helper function to define configuration with type safety.\nexport function defineConfig(config: QuantumUIConfig): QuantumUIConfig {\n return config;\n}\n\n// Configure quantum-ui with user settings; call once in the application entry point.\nexport function configureQuantumUI(userConfig: QuantumUIConfig): void {\n const newConfig = {\n csrf: {\n ...defaultConfig.csrf,\n ...(userConfig.csrf || {}),\n },\n axios: {\n ...defaultConfig.axios,\n ...(userConfig.axios || {}),\n headers: {\n ...defaultConfig.axios.headers,\n ...(userConfig.axios?.headers || {}),\n },\n },\n auth: {\n ...defaultConfig.auth,\n ...(userConfig.auth || {}),\n },\n timeZone: {\n ...defaultConfig.timeZone,\n ...(userConfig.timeZone || {}),\n },\n currency: {\n ...defaultConfig.currency,\n ...(userConfig.currency || {}),\n },\n sse: {\n ...defaultConfig.sse,\n ...(userConfig.sse || {}),\n },\n views: {\n ...defaultConfig.views,\n ...(userConfig.views || {}),\n },\n };\n setGlobalConfig(newConfig);\n}\n\n// Get the current configuration.\nexport function getConfig(): typeof defaultConfig {\n return getGlobalConfig();\n}\n\n// Reset configuration to defaults; mainly useful for testing.\nexport function resetConfig(): void {\n setGlobalConfig({ ...defaultConfig });\n}\n"],"names":[],"mappings":"AAqEA,MAAM,aAAA,GAQF;AAAA,EACF,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,YAAA;AAAA,IACV,OAAA,EAAS,IAAA;AAAA,IACT,UAAA,EAAY;AAAA,GACd;AAAA,EACA,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,MAAA;AAAA,IACT,OAAA,EAAS,GAAA;AAAA,IACT,eAAA,EAAiB,IAAA;AAAA,IACjB,OAAA,EAAS;AAAA,MACP,cAAA,EAAgB,kBAAA;AAAA,MAChB,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,eAAA;AAAA,IACjB,WAAA,EAAa,QAAA;AAAA,IACb,aAAA,EAAe,mBAAA;AAAA,IACf,eAAA,EAAiB,qBAAA;AAAA,IACjB,sBAAA,EAAwB;AAAA,GAC1B;AAAA,EACA,QAAA,EAAU;AAAA,IACR,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,QAAA,EAAU;AAAA,IACR,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,GAAA,EAAK;AAAA,IACH,SAAA,EAAW;AAAA,GACb;AAAA,EACA,KAAA,EAAO;AAAA,IACL,aAAA,EAAe,aAAA;AAAA,IACf,cAAA,EAAgB;AAAA;AAEpB,CAAA;AAEA,MAAM,iBAAA,GAAoB,uBAAA;AAK1B,SAAS,eA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AA,EAAU;AAAA,MACR,GAAG,aAAA,CAAc,QAAA;AAAA,MACjB,GAAI,UAAA,CAAW,QAAA,IAAY;AAAC,KAC9B;AAAA,IACA,GAAA,EAAK;AAAA,MACH,GAAG,aAAA,CAAc,GAAA;AAAA,MACjB,GAAI,UAAA,CAAW,GAAA,IAAO;AAAC,KACzB;AAAA,IACA,KAAA,EAAO;AAAA,MACL,GAAG,aAAA,CAAc,KAAA;AAAA,MACjB,GAAI,UAAA,CAAW,KAAA,IAAS;AAAC;AAC3B,GACF;AACA,EAAA,eAAA,CAAgB,SAAS,CAAA;AAC3B;AAGO,SAAS,SAAA,GAAkC;AAChD,EAAA,OAAO,eAAA,EAAgB;AACzB;AAGO,SAAS,WAAA,GAAoB;AAClC,EAAA,eAAA,CAAgB,EAAE,GAAG,aAAA,EAAe,CAAA;AACtC;;;;"}
package/dist/index8.js CHANGED
@@ -1,101 +1,45 @@
1
- const defaultConfig = {
2
- csrf: {
3
- endpoint: "csrf/token",
4
- enabled: true,
5
- headerName: "x-csrf-token"
6
- },
7
- axios: {
8
- baseURL: "/api",
9
- timeout: 3e4,
10
- withCredentials: true,
11
- headers: {
12
- "Content-Type": "application/json",
13
- Accept: "application/json"
14
- }
15
- },
16
- auth: {
17
- tokenHeaderName: "Authorization",
18
- tokenPrefix: "Bearer",
19
- tokenEndpoint: "auth/access-token",
20
- refreshEndpoint: "auth/refresh-tokens",
21
- sessionRecoveryEnabled: true
22
- },
23
- timeZone: {
24
- resolveTimeZone: void 0
25
- },
26
- currency: {
27
- resolveCurrency: void 0
28
- },
29
- sse: {
30
- onRequest: void 0
31
- },
32
- views: {
33
- viewsEndpoint: "table-views",
34
- statesEndpoint: "table-states"
35
- }
36
- };
37
- const GLOBAL_CONFIG_KEY = "__QUANTUM_UI_CONFIG__";
38
- function getGlobalConfig() {
39
- if (typeof window !== "undefined") {
40
- const globalWindow = window;
41
- if (!globalWindow[GLOBAL_CONFIG_KEY]) {
42
- globalWindow[GLOBAL_CONFIG_KEY] = { ...defaultConfig };
43
- }
44
- return globalWindow[GLOBAL_CONFIG_KEY] ?? { ...defaultConfig };
45
- }
46
- return { ...defaultConfig };
47
- }
48
- function setGlobalConfig(config) {
49
- if (typeof window !== "undefined") {
50
- window[GLOBAL_CONFIG_KEY] = config;
51
- }
52
- }
53
- function defineConfig(config) {
54
- return config;
55
- }
56
- function configureQuantumUI(userConfig) {
57
- const newConfig = {
58
- csrf: {
59
- ...defaultConfig.csrf,
60
- ...userConfig.csrf || {}
61
- },
62
- axios: {
63
- ...defaultConfig.axios,
64
- ...userConfig.axios || {},
65
- headers: {
66
- ...defaultConfig.axios.headers,
67
- ...userConfig.axios?.headers || {}
68
- }
69
- },
70
- auth: {
71
- ...defaultConfig.auth,
72
- ...userConfig.auth || {}
73
- },
74
- timeZone: {
75
- ...defaultConfig.timeZone,
76
- ...userConfig.timeZone || {}
77
- },
78
- currency: {
79
- ...defaultConfig.currency,
80
- ...userConfig.currency || {}
81
- },
82
- sse: {
83
- ...defaultConfig.sse,
84
- ...userConfig.sse || {}
85
- },
86
- views: {
87
- ...defaultConfig.views,
88
- ...userConfig.views || {}
89
- }
90
- };
91
- setGlobalConfig(newConfig);
92
- }
93
- function getConfig() {
94
- return getGlobalConfig();
95
- }
96
- function resetConfig() {
97
- setGlobalConfig({ ...defaultConfig });
98
- }
1
+ import { a as clsx } from './utils.js';
99
2
 
100
- export { configureQuantumUI as c, defineConfig as d, getConfig as g, resetConfig as r };
3
+ const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
4
+ const cx = clsx;
5
+ const cva = (base, config)=>(props)=>{
6
+ var _config_compoundVariants;
7
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
8
+ const { variants, defaultVariants } = config;
9
+ const getVariantClassNames = Object.keys(variants).map((variant)=>{
10
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
11
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
12
+ if (variantProp === null) return null;
13
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
14
+ return variants[variant][variantKey];
15
+ });
16
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
17
+ let [key, value] = param;
18
+ if (value === undefined) {
19
+ return acc;
20
+ }
21
+ acc[key] = value;
22
+ return acc;
23
+ }, {});
24
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
25
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
26
+ return Object.entries(compoundVariantOptions).every((param)=>{
27
+ let [key, value] = param;
28
+ return Array.isArray(value) ? value.includes({
29
+ ...defaultVariants,
30
+ ...propsWithoutUndefined
31
+ }[key]) : ({
32
+ ...defaultVariants,
33
+ ...propsWithoutUndefined
34
+ })[key] === value;
35
+ }) ? [
36
+ ...acc,
37
+ cvClass,
38
+ cvClassName
39
+ ] : acc;
40
+ }, []);
41
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
42
+ };
43
+
44
+ export { cva as c };
101
45
  //# sourceMappingURL=index8.js.map