@vritti/quantum-ui 0.2.8 → 0.2.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/README.md +7 -7
- package/dist/Alert.js +110 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Avatar.js +1 -1
- package/dist/Chart.js +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/Combination.js +3 -15
- package/dist/Combination.js.map +1 -1
- package/dist/DatePicker.js +5 -14
- package/dist/DatePicker.js.map +1 -1
- package/dist/DropdownMenu.js +5 -74
- package/dist/DropdownMenu.js.map +1 -1
- package/dist/Form.js +29 -21
- package/dist/Form.js.map +1 -1
- package/dist/SelectField.js +1351 -0
- package/dist/SelectField.js.map +1 -0
- package/dist/Sonner.js +3 -38
- package/dist/Sonner.js.map +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Toggle.js +1 -1
- package/dist/chevron-down.js +15 -0
- package/dist/chevron-down.js.map +1 -0
- package/dist/chevron-right.js +15 -0
- package/dist/chevron-right.js.map +1 -0
- package/dist/components/Alert.js +2 -0
- package/dist/components/Alert.js.map +1 -0
- package/dist/components/SelectField.js +2 -0
- package/dist/components/SelectField.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index11.js +69 -91
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +86 -190
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +196 -190
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +199 -0
- package/dist/index14.js.map +1 -0
- package/dist/lib/components/Alert/Alert.d.ts +10 -0
- package/dist/lib/components/Alert/Alert.d.ts.map +1 -0
- package/dist/lib/components/Alert/index.d.ts +2 -0
- package/dist/lib/components/Alert/index.d.ts.map +1 -0
- package/dist/lib/components/Form/Form.d.ts +1 -1
- package/dist/lib/components/Form/Form.d.ts.map +1 -1
- package/dist/lib/components/SelectField/SelectField.d.ts +24 -0
- package/dist/lib/components/SelectField/SelectField.d.ts.map +1 -0
- package/dist/lib/components/SelectField/index.d.ts +3 -0
- package/dist/lib/components/SelectField/index.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/utils/formHelpers.d.ts +7 -3
- package/dist/lib/utils/formHelpers.d.ts.map +1 -1
- package/dist/shadcn/shadcnAlert/alert.d.ts +11 -0
- package/dist/shadcn/shadcnAlert/alert.d.ts.map +1 -0
- package/dist/shadcn/shadcnAlert/index.d.ts +2 -0
- package/dist/shadcn/shadcnAlert/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnBadge/Badge.d.ts +1 -1
- package/dist/shadcn/shadcnButton/Button.d.ts +2 -2
- package/dist/triangle-alert.js +40 -0
- package/dist/triangle-alert.js.map +1 -0
- package/package.json +15 -6
package/dist/DropdownMenu.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default from 'react';
|
|
4
3
|
import { B as Button } from './Button.js';
|
|
5
|
-
import {
|
|
4
|
+
import { P as Primitive, a as composeEventHandlers, u as useControllableState, d as dispatchDiscreteCustomEvent, c as createSlot } from './index13.js';
|
|
6
5
|
import { u as useComposedRefs, c as composeRefs } from './index5.js';
|
|
7
|
-
import { c as createContextScope } from './
|
|
8
|
-
import {
|
|
6
|
+
import { c as createContextScope } from './index12.js';
|
|
7
|
+
import { c as createCollection, u as useDirection } from './index11.js';
|
|
8
|
+
import { u as useId, c as createPopperScope, R as Root2$1, P as Portal$1, A as Anchor, h as hideOthers, a as useFocusGuards, b as ReactRemoveScroll, F as FocusScope, D as DismissableLayer, C as Content, d as Arrow } from './Combination.js';
|
|
9
9
|
import { P as Presence } from './index4.js';
|
|
10
10
|
import { u as useCallbackRef } from './index3.js';
|
|
11
11
|
import { c as cn } from './utils.js';
|
|
12
12
|
import { C as Check } from './check.js';
|
|
13
13
|
import { c as createLucideIcon } from './createLucideIcon.js';
|
|
14
|
+
import { C as ChevronRight } from './chevron-right.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -23,76 +24,6 @@ import { c as createLucideIcon } from './createLucideIcon.js';
|
|
|
23
24
|
const __iconNode = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
24
25
|
const Circle = createLucideIcon("circle", __iconNode);
|
|
25
26
|
|
|
26
|
-
function createCollection(name) {
|
|
27
|
-
const PROVIDER_NAME = name + "CollectionProvider";
|
|
28
|
-
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
29
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
30
|
-
PROVIDER_NAME,
|
|
31
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
32
|
-
);
|
|
33
|
-
const CollectionProvider = (props) => {
|
|
34
|
-
const { scope, children } = props;
|
|
35
|
-
const ref = React__default.useRef(null);
|
|
36
|
-
const itemMap = React__default.useRef(/* @__PURE__ */ new Map()).current;
|
|
37
|
-
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
38
|
-
};
|
|
39
|
-
CollectionProvider.displayName = PROVIDER_NAME;
|
|
40
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
41
|
-
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
42
|
-
const CollectionSlot = React__default.forwardRef(
|
|
43
|
-
(props, forwardedRef) => {
|
|
44
|
-
const { scope, children } = props;
|
|
45
|
-
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
46
|
-
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
47
|
-
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
51
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
52
|
-
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
53
|
-
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
54
|
-
const CollectionItemSlot = React__default.forwardRef(
|
|
55
|
-
(props, forwardedRef) => {
|
|
56
|
-
const { scope, children, ...itemData } = props;
|
|
57
|
-
const ref = React__default.useRef(null);
|
|
58
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
59
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
60
|
-
React__default.useEffect(() => {
|
|
61
|
-
context.itemMap.set(ref, { ref, ...itemData });
|
|
62
|
-
return () => void context.itemMap.delete(ref);
|
|
63
|
-
});
|
|
64
|
-
return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
68
|
-
function useCollection(scope) {
|
|
69
|
-
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
70
|
-
const getItems = React__default.useCallback(() => {
|
|
71
|
-
const collectionNode = context.collectionRef.current;
|
|
72
|
-
if (!collectionNode) return [];
|
|
73
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
74
|
-
const items = Array.from(context.itemMap.values());
|
|
75
|
-
const orderedItems = items.sort(
|
|
76
|
-
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
77
|
-
);
|
|
78
|
-
return orderedItems;
|
|
79
|
-
}, [context.collectionRef, context.itemMap]);
|
|
80
|
-
return getItems;
|
|
81
|
-
}
|
|
82
|
-
return [
|
|
83
|
-
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
84
|
-
useCollection,
|
|
85
|
-
createCollectionScope
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// packages/react/direction/src/direction.tsx
|
|
90
|
-
var DirectionContext = React.createContext(void 0);
|
|
91
|
-
function useDirection(localDir) {
|
|
92
|
-
const globalDir = React.useContext(DirectionContext);
|
|
93
|
-
return localDir || globalDir || "ltr";
|
|
94
|
-
}
|
|
95
|
-
|
|
96
27
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
97
28
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
98
29
|
var GROUP_NAME$2 = "RovingFocusGroup";
|