@cdx-ui/primitives 0.0.1-alpha.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/README.md +17 -0
- package/lib/commonjs/button/context.js +11 -0
- package/lib/commonjs/button/context.js.map +1 -0
- package/lib/commonjs/button/createButtonGroup.js +80 -0
- package/lib/commonjs/button/createButtonGroup.js.map +1 -0
- package/lib/commonjs/button/createButtonIcon.js +18 -0
- package/lib/commonjs/button/createButtonIcon.js.map +1 -0
- package/lib/commonjs/button/createButtonRoot.js +81 -0
- package/lib/commonjs/button/createButtonRoot.js.map +1 -0
- package/lib/commonjs/button/createButtonSpinner.js +34 -0
- package/lib/commonjs/button/createButtonSpinner.js.map +1 -0
- package/lib/commonjs/button/createButtonText.js +38 -0
- package/lib/commonjs/button/createButtonText.js.map +1 -0
- package/lib/commonjs/button/index.js +31 -0
- package/lib/commonjs/button/index.js.map +1 -0
- package/lib/commonjs/button/types.js +6 -0
- package/lib/commonjs/button/types.js.map +1 -0
- package/lib/commonjs/index.js +52 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/input/context.js +11 -0
- package/lib/commonjs/input/context.js.map +1 -0
- package/lib/commonjs/input/createInputField.js +90 -0
- package/lib/commonjs/input/createInputField.js.map +1 -0
- package/lib/commonjs/input/createInputIcon.js +20 -0
- package/lib/commonjs/input/createInputIcon.js.map +1 -0
- package/lib/commonjs/input/createInputRoot.js +82 -0
- package/lib/commonjs/input/createInputRoot.js.map +1 -0
- package/lib/commonjs/input/createInputSlot.js +44 -0
- package/lib/commonjs/input/createInputSlot.js.map +1 -0
- package/lib/commonjs/input/index.js +28 -0
- package/lib/commonjs/input/index.js.map +1 -0
- package/lib/commonjs/input/types.js +6 -0
- package/lib/commonjs/input/types.js.map +1 -0
- package/lib/commonjs/overlay/OverlayContainer.js +67 -0
- package/lib/commonjs/overlay/OverlayContainer.js.map +1 -0
- package/lib/commonjs/overlay/index.js +40 -0
- package/lib/commonjs/overlay/index.js.map +1 -0
- package/lib/commonjs/overlay/useAnchorPosition.js +68 -0
- package/lib/commonjs/overlay/useAnchorPosition.js.map +1 -0
- package/lib/commonjs/overlay/useDismissOverlay.js +14 -0
- package/lib/commonjs/overlay/useDismissOverlay.js.map +1 -0
- package/lib/commonjs/overlay/useDismissOverlay.web.js +46 -0
- package/lib/commonjs/overlay/useDismissOverlay.web.js.map +1 -0
- package/lib/commonjs/overlay/useOverlayPosition.js +93 -0
- package/lib/commonjs/overlay/useOverlayPosition.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/select/context.js +63 -0
- package/lib/commonjs/select/context.js.map +1 -0
- package/lib/commonjs/select/createSelectContent.js +102 -0
- package/lib/commonjs/select/createSelectContent.js.map +1 -0
- package/lib/commonjs/select/createSelectIcon.js +41 -0
- package/lib/commonjs/select/createSelectIcon.js.map +1 -0
- package/lib/commonjs/select/createSelectItem.js +101 -0
- package/lib/commonjs/select/createSelectItem.js.map +1 -0
- package/lib/commonjs/select/createSelectItemLabel.js +41 -0
- package/lib/commonjs/select/createSelectItemLabel.js.map +1 -0
- package/lib/commonjs/select/createSelectRoot.js +99 -0
- package/lib/commonjs/select/createSelectRoot.js.map +1 -0
- package/lib/commonjs/select/createSelectTrigger.js +138 -0
- package/lib/commonjs/select/createSelectTrigger.js.map +1 -0
- package/lib/commonjs/select/createSelectValue.js +53 -0
- package/lib/commonjs/select/createSelectValue.js.map +1 -0
- package/lib/commonjs/select/index.js +38 -0
- package/lib/commonjs/select/index.js.map +1 -0
- package/lib/commonjs/select/types.js +6 -0
- package/lib/commonjs/select/types.js.map +1 -0
- package/lib/commonjs/select/useContentFocus.js +47 -0
- package/lib/commonjs/select/useContentFocus.js.map +1 -0
- package/lib/commonjs/select/useListboxNavigation.js +83 -0
- package/lib/commonjs/select/useListboxNavigation.js.map +1 -0
- package/lib/commonjs/uniwind.d.js +2 -0
- package/lib/commonjs/uniwind.d.js.map +1 -0
- package/lib/commonjs/utils/dataAttributes.js +32 -0
- package/lib/commonjs/utils/dataAttributes.js.map +1 -0
- package/lib/commonjs/utils/dataAttributes.web.js +31 -0
- package/lib/commonjs/utils/dataAttributes.web.js.map +1 -0
- package/lib/module/button/context.js +5 -0
- package/lib/module/button/context.js.map +1 -0
- package/lib/module/button/createButtonGroup.js +74 -0
- package/lib/module/button/createButtonGroup.js.map +1 -0
- package/lib/module/button/createButtonIcon.js +13 -0
- package/lib/module/button/createButtonIcon.js.map +1 -0
- package/lib/module/button/createButtonRoot.js +76 -0
- package/lib/module/button/createButtonRoot.js.map +1 -0
- package/lib/module/button/createButtonSpinner.js +29 -0
- package/lib/module/button/createButtonSpinner.js.map +1 -0
- package/lib/module/button/createButtonText.js +33 -0
- package/lib/module/button/createButtonText.js.map +1 -0
- package/lib/module/button/index.js +27 -0
- package/lib/module/button/index.js.map +1 -0
- package/lib/module/button/types.js +4 -0
- package/lib/module/button/types.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/input/context.js +5 -0
- package/lib/module/input/context.js.map +1 -0
- package/lib/module/input/createInputField.js +85 -0
- package/lib/module/input/createInputField.js.map +1 -0
- package/lib/module/input/createInputIcon.js +15 -0
- package/lib/module/input/createInputIcon.js.map +1 -0
- package/lib/module/input/createInputRoot.js +76 -0
- package/lib/module/input/createInputRoot.js.map +1 -0
- package/lib/module/input/createInputSlot.js +39 -0
- package/lib/module/input/createInputSlot.js.map +1 -0
- package/lib/module/input/index.js +23 -0
- package/lib/module/input/index.js.map +1 -0
- package/lib/module/input/types.js +4 -0
- package/lib/module/input/types.js.map +1 -0
- package/lib/module/overlay/OverlayContainer.js +62 -0
- package/lib/module/overlay/OverlayContainer.js.map +1 -0
- package/lib/module/overlay/index.js +7 -0
- package/lib/module/overlay/index.js.map +1 -0
- package/lib/module/overlay/useAnchorPosition.js +64 -0
- package/lib/module/overlay/useAnchorPosition.js.map +1 -0
- package/lib/module/overlay/useDismissOverlay.js +10 -0
- package/lib/module/overlay/useDismissOverlay.js.map +1 -0
- package/lib/module/overlay/useDismissOverlay.web.js +43 -0
- package/lib/module/overlay/useDismissOverlay.web.js.map +1 -0
- package/lib/module/overlay/useOverlayPosition.js +88 -0
- package/lib/module/overlay/useOverlayPosition.js.map +1 -0
- package/lib/module/select/context.js +56 -0
- package/lib/module/select/context.js.map +1 -0
- package/lib/module/select/createSelectContent.js +97 -0
- package/lib/module/select/createSelectContent.js.map +1 -0
- package/lib/module/select/createSelectIcon.js +36 -0
- package/lib/module/select/createSelectIcon.js.map +1 -0
- package/lib/module/select/createSelectItem.js +96 -0
- package/lib/module/select/createSelectItem.js.map +1 -0
- package/lib/module/select/createSelectItemLabel.js +36 -0
- package/lib/module/select/createSelectItemLabel.js.map +1 -0
- package/lib/module/select/createSelectRoot.js +94 -0
- package/lib/module/select/createSelectRoot.js.map +1 -0
- package/lib/module/select/createSelectTrigger.js +133 -0
- package/lib/module/select/createSelectTrigger.js.map +1 -0
- package/lib/module/select/createSelectValue.js +48 -0
- package/lib/module/select/createSelectValue.js.map +1 -0
- package/lib/module/select/index.js +34 -0
- package/lib/module/select/index.js.map +1 -0
- package/lib/module/select/types.js +4 -0
- package/lib/module/select/types.js.map +1 -0
- package/lib/module/select/useContentFocus.js +44 -0
- package/lib/module/select/useContentFocus.js.map +1 -0
- package/lib/module/select/useListboxNavigation.js +80 -0
- package/lib/module/select/useListboxNavigation.js.map +1 -0
- package/lib/module/uniwind.d.js +2 -0
- package/lib/module/uniwind.d.js.map +1 -0
- package/lib/module/utils/dataAttributes.js +28 -0
- package/lib/module/utils/dataAttributes.js.map +1 -0
- package/lib/module/utils/dataAttributes.web.js +27 -0
- package/lib/module/utils/dataAttributes.web.js.map +1 -0
- package/lib/typescript/button/context.d.ts +6 -0
- package/lib/typescript/button/context.d.ts.map +1 -0
- package/lib/typescript/button/createButtonGroup.d.ts +4 -0
- package/lib/typescript/button/createButtonGroup.d.ts.map +1 -0
- package/lib/typescript/button/createButtonIcon.d.ts +2 -0
- package/lib/typescript/button/createButtonIcon.d.ts.map +1 -0
- package/lib/typescript/button/createButtonRoot.d.ts +6 -0
- package/lib/typescript/button/createButtonRoot.d.ts.map +1 -0
- package/lib/typescript/button/createButtonSpinner.d.ts +4 -0
- package/lib/typescript/button/createButtonSpinner.d.ts.map +1 -0
- package/lib/typescript/button/createButtonText.d.ts +4 -0
- package/lib/typescript/button/createButtonText.d.ts.map +1 -0
- package/lib/typescript/button/index.d.ts +11 -0
- package/lib/typescript/button/index.d.ts.map +1 -0
- package/lib/typescript/button/types.d.ts +65 -0
- package/lib/typescript/button/types.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/input/context.d.ts +6 -0
- package/lib/typescript/input/context.d.ts.map +1 -0
- package/lib/typescript/input/createInputField.d.ts +4 -0
- package/lib/typescript/input/createInputField.d.ts.map +1 -0
- package/lib/typescript/input/createInputIcon.d.ts +4 -0
- package/lib/typescript/input/createInputIcon.d.ts.map +1 -0
- package/lib/typescript/input/createInputRoot.d.ts +4 -0
- package/lib/typescript/input/createInputRoot.d.ts.map +1 -0
- package/lib/typescript/input/createInputSlot.d.ts +4 -0
- package/lib/typescript/input/createInputSlot.d.ts.map +1 -0
- package/lib/typescript/input/index.d.ts +9 -0
- package/lib/typescript/input/index.d.ts.map +1 -0
- package/lib/typescript/input/types.d.ts +91 -0
- package/lib/typescript/input/types.d.ts.map +1 -0
- package/lib/typescript/overlay/OverlayContainer.d.ts +23 -0
- package/lib/typescript/overlay/OverlayContainer.d.ts.map +1 -0
- package/lib/typescript/overlay/index.d.ts +6 -0
- package/lib/typescript/overlay/index.d.ts.map +1 -0
- package/lib/typescript/overlay/useAnchorPosition.d.ts +15 -0
- package/lib/typescript/overlay/useAnchorPosition.d.ts.map +1 -0
- package/lib/typescript/overlay/useDismissOverlay.d.ts +7 -0
- package/lib/typescript/overlay/useDismissOverlay.d.ts.map +1 -0
- package/lib/typescript/overlay/useDismissOverlay.web.d.ts +8 -0
- package/lib/typescript/overlay/useDismissOverlay.web.d.ts.map +1 -0
- package/lib/typescript/overlay/useOverlayPosition.d.ts +45 -0
- package/lib/typescript/overlay/useOverlayPosition.d.ts.map +1 -0
- package/lib/typescript/select/context.d.ts +17 -0
- package/lib/typescript/select/context.d.ts.map +1 -0
- package/lib/typescript/select/createSelectContent.d.ts +4 -0
- package/lib/typescript/select/createSelectContent.d.ts.map +1 -0
- package/lib/typescript/select/createSelectIcon.d.ts +2 -0
- package/lib/typescript/select/createSelectIcon.d.ts.map +1 -0
- package/lib/typescript/select/createSelectItem.d.ts +6 -0
- package/lib/typescript/select/createSelectItem.d.ts.map +1 -0
- package/lib/typescript/select/createSelectItemLabel.d.ts +4 -0
- package/lib/typescript/select/createSelectItemLabel.d.ts.map +1 -0
- package/lib/typescript/select/createSelectRoot.d.ts +4 -0
- package/lib/typescript/select/createSelectRoot.d.ts.map +1 -0
- package/lib/typescript/select/createSelectTrigger.d.ts +12 -0
- package/lib/typescript/select/createSelectTrigger.d.ts.map +1 -0
- package/lib/typescript/select/createSelectValue.d.ts +4 -0
- package/lib/typescript/select/createSelectValue.d.ts.map +1 -0
- package/lib/typescript/select/index.d.ts +13 -0
- package/lib/typescript/select/index.d.ts.map +1 -0
- package/lib/typescript/select/types.d.ts +96 -0
- package/lib/typescript/select/types.d.ts.map +1 -0
- package/lib/typescript/select/useContentFocus.d.ts +19 -0
- package/lib/typescript/select/useContentFocus.d.ts.map +1 -0
- package/lib/typescript/select/useListboxNavigation.d.ts +13 -0
- package/lib/typescript/select/useListboxNavigation.d.ts.map +1 -0
- package/lib/typescript/utils/dataAttributes.d.ts +14 -0
- package/lib/typescript/utils/dataAttributes.d.ts.map +1 -0
- package/lib/typescript/utils/dataAttributes.web.d.ts +16 -0
- package/lib/typescript/utils/dataAttributes.web.d.ts.map +1 -0
- package/package.json +78 -0
- package/src/button/context.tsx +4 -0
- package/src/button/createButtonGroup.tsx +88 -0
- package/src/button/createButtonIcon.tsx +8 -0
- package/src/button/createButtonRoot.tsx +101 -0
- package/src/button/createButtonSpinner.tsx +20 -0
- package/src/button/createButtonText.tsx +22 -0
- package/src/button/index.tsx +53 -0
- package/src/button/types.ts +85 -0
- package/src/index.ts +4 -0
- package/src/input/context.tsx +4 -0
- package/src/input/createInputField.tsx +104 -0
- package/src/input/createInputIcon.tsx +12 -0
- package/src/input/createInputRoot.tsx +92 -0
- package/src/input/createInputSlot.tsx +39 -0
- package/src/input/index.tsx +51 -0
- package/src/input/types.ts +113 -0
- package/src/overlay/OverlayContainer.tsx +77 -0
- package/src/overlay/index.ts +10 -0
- package/src/overlay/useAnchorPosition.ts +72 -0
- package/src/overlay/useDismissOverlay.ts +14 -0
- package/src/overlay/useDismissOverlay.web.ts +51 -0
- package/src/overlay/useOverlayPosition.ts +96 -0
- package/src/select/context.tsx +56 -0
- package/src/select/createSelectContent.tsx +115 -0
- package/src/select/createSelectIcon.tsx +27 -0
- package/src/select/createSelectItem.tsx +121 -0
- package/src/select/createSelectItemLabel.tsx +30 -0
- package/src/select/createSelectRoot.tsx +130 -0
- package/src/select/createSelectTrigger.tsx +192 -0
- package/src/select/createSelectValue.tsx +38 -0
- package/src/select/index.tsx +73 -0
- package/src/select/types.ts +131 -0
- package/src/select/useContentFocus.ts +54 -0
- package/src/select/useListboxNavigation.ts +85 -0
- package/src/uniwind.d.ts +3 -0
- package/src/utils/dataAttributes.ts +28 -0
- package/src/utils/dataAttributes.web.ts +26 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createSelect = createSelect;
|
|
7
|
+
var _createSelectContent = require("./createSelectContent");
|
|
8
|
+
var _createSelectIcon = require("./createSelectIcon");
|
|
9
|
+
var _createSelectItem = require("./createSelectItem");
|
|
10
|
+
var _createSelectItemLabel = require("./createSelectItemLabel");
|
|
11
|
+
var _createSelectRoot = require("./createSelectRoot");
|
|
12
|
+
var _createSelectTrigger = require("./createSelectTrigger");
|
|
13
|
+
var _createSelectValue = require("./createSelectValue");
|
|
14
|
+
function createSelect(BaseComponents) {
|
|
15
|
+
const Select = (0, _createSelectRoot.createSelectRoot)(BaseComponents.Root);
|
|
16
|
+
const Trigger = (0, _createSelectTrigger.createSelectTrigger)(BaseComponents.Trigger);
|
|
17
|
+
const Value = (0, _createSelectValue.createSelectValue)(BaseComponents.Value);
|
|
18
|
+
const Icon = (0, _createSelectIcon.createSelectIcon)(BaseComponents.Icon);
|
|
19
|
+
const Content = (0, _createSelectContent.createSelectContent)(BaseComponents.Content);
|
|
20
|
+
const Item = (0, _createSelectItem.createSelectItem)(BaseComponents.Item);
|
|
21
|
+
const ItemLabel = (0, _createSelectItemLabel.createSelectItemLabel)(BaseComponents.ItemLabel);
|
|
22
|
+
Select.displayName = 'SelectPrimitive';
|
|
23
|
+
Trigger.displayName = 'SelectPrimitive.Trigger';
|
|
24
|
+
Value.displayName = 'SelectPrimitive.Value';
|
|
25
|
+
Icon.displayName = 'SelectPrimitive.Icon';
|
|
26
|
+
Content.displayName = 'SelectPrimitive.Content';
|
|
27
|
+
Item.displayName = 'SelectPrimitive.Item';
|
|
28
|
+
ItemLabel.displayName = 'SelectPrimitive.ItemLabel';
|
|
29
|
+
return Object.assign(Select, {
|
|
30
|
+
Trigger,
|
|
31
|
+
Value,
|
|
32
|
+
Icon,
|
|
33
|
+
Content,
|
|
34
|
+
Item,
|
|
35
|
+
ItemLabel
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_createSelectContent","require","_createSelectIcon","_createSelectItem","_createSelectItemLabel","_createSelectRoot","_createSelectTrigger","_createSelectValue","createSelect","BaseComponents","Select","createSelectRoot","Root","Trigger","createSelectTrigger","Value","createSelectValue","Icon","createSelectIcon","Content","createSelectContent","Item","createSelectItem","ItemLabel","createSelectItemLabel","displayName","Object","assign"],"sourceRoot":"../../../src","sources":["select/index.tsx"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAYO,SAASO,YAAYA,CAU1BC,cAQD,EAAE;EACD,MAAMC,MAAM,GAAG,IAAAC,kCAAgB,EAACF,cAAc,CAACG,IAAI,CAAC;EACpD,MAAMC,OAAO,GAAG,IAAAC,wCAAmB,EAACL,cAAc,CAACI,OAAO,CAAC;EAC3D,MAAME,KAAK,GAAG,IAAAC,oCAAiB,EAACP,cAAc,CAACM,KAAK,CAAC;EACrD,MAAME,IAAI,GAAG,IAAAC,kCAAgB,EAACT,cAAc,CAACQ,IAAI,CAAC;EAClD,MAAME,OAAO,GAAG,IAAAC,wCAAmB,EAACX,cAAc,CAACU,OAAO,CAAC;EAC3D,MAAME,IAAI,GAAG,IAAAC,kCAAgB,EAACb,cAAc,CAACY,IAAI,CAAC;EAClD,MAAME,SAAS,GAAG,IAAAC,4CAAqB,EAACf,cAAc,CAACc,SAAS,CAAC;EAEjEb,MAAM,CAACe,WAAW,GAAG,iBAAiB;EACtCZ,OAAO,CAACY,WAAW,GAAG,yBAAyB;EAC/CV,KAAK,CAACU,WAAW,GAAG,uBAAuB;EAC3CR,IAAI,CAACQ,WAAW,GAAG,sBAAsB;EACzCN,OAAO,CAACM,WAAW,GAAG,yBAAyB;EAC/CJ,IAAI,CAACI,WAAW,GAAG,sBAAsB;EACzCF,SAAS,CAACE,WAAW,GAAG,2BAA2B;EAEnD,OAAOC,MAAM,CAACC,MAAM,CAACjB,MAAM,EAAE;IAC3BG,OAAO;IACPE,KAAK;IACLE,IAAI;IACJE,OAAO;IACPE,IAAI;IACJE;EACF,CAAC,CAAC;AAWJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["select/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useContentFocus = useContentFocus;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
// TODO: Split into web and native versions?
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Manages focus lifecycle for overlay content:
|
|
13
|
+
* - Restores focus to the trigger when the overlay closes (web)
|
|
14
|
+
* - Initializes `activeValue` to the current value or first enabled item
|
|
15
|
+
*
|
|
16
|
+
* Initial focus on open is handled via a ref callback in createSelectContent
|
|
17
|
+
* to avoid timing issues with deferred portal rendering.
|
|
18
|
+
*/
|
|
19
|
+
function useContentFocus({
|
|
20
|
+
open,
|
|
21
|
+
triggerRef,
|
|
22
|
+
items,
|
|
23
|
+
value,
|
|
24
|
+
setActiveValue
|
|
25
|
+
}) {
|
|
26
|
+
const prevOpenRef = (0, _react.useRef)(open);
|
|
27
|
+
const getEnabledItems = (0, _react.useCallback)(() => items.filter(item => !item.disabled), [items]);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (prevOpenRef.current && !open && _reactNative.Platform.OS === 'web') {
|
|
30
|
+
triggerRef.current?.focus?.();
|
|
31
|
+
}
|
|
32
|
+
prevOpenRef.current = open;
|
|
33
|
+
}, [open, triggerRef]);
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
35
|
+
if (open) {
|
|
36
|
+
const enabled = getEnabledItems();
|
|
37
|
+
if (value && enabled.some(i => i.value === value)) {
|
|
38
|
+
setActiveValue(value);
|
|
39
|
+
} else if (enabled.length > 0) {
|
|
40
|
+
setActiveValue(enabled[0].value);
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
setActiveValue(undefined);
|
|
44
|
+
}
|
|
45
|
+
}, [open, getEnabledItems, setActiveValue, value]);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=useContentFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","useContentFocus","open","triggerRef","items","value","setActiveValue","prevOpenRef","useRef","getEnabledItems","useCallback","filter","item","disabled","useEffect","current","Platform","OS","focus","enabled","some","i","length","undefined"],"sourceRoot":"../../../src","sources":["select/useContentFocus.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAAC;EAC9BC,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC,KAAK;EACLC;AACsB,CAAC,EAAE;EACzB,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACN,IAAI,CAAC;EAEhC,MAAMO,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAMN,KAAK,CAACO,MAAM,CAAEC,IAAI,IAAK,CAACA,IAAI,CAACC,QAAQ,CAAC,EAAE,CAACT,KAAK,CAAC,CAAC;EAE1F,IAAAU,gBAAS,EAAC,MAAM;IACd,IAAIP,WAAW,CAACQ,OAAO,IAAI,CAACb,IAAI,IAAIc,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzDd,UAAU,CAACY,OAAO,EAAEG,KAAK,GAAG,CAAC;IAC/B;IACAX,WAAW,CAACQ,OAAO,GAAGb,IAAI;EAC5B,CAAC,EAAE,CAACA,IAAI,EAAEC,UAAU,CAAC,CAAC;EAEtB,IAAAW,gBAAS,EAAC,MAAM;IACd,IAAIZ,IAAI,EAAE;MACR,MAAMiB,OAAO,GAAGV,eAAe,CAAC,CAAC;MACjC,IAAIJ,KAAK,IAAIc,OAAO,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAAChB,KAAK,KAAKA,KAAK,CAAC,EAAE;QACnDC,cAAc,CAACD,KAAK,CAAC;MACvB,CAAC,MAAM,IAAIc,OAAO,CAACG,MAAM,GAAG,CAAC,EAAE;QAC7BhB,cAAc,CAACa,OAAO,CAAC,CAAC,CAAC,CAACd,KAAK,CAAC;MAClC;IACF,CAAC,MAAM;MACLC,cAAc,CAACiB,SAAS,CAAC;IAC3B;EACF,CAAC,EAAE,CAACrB,IAAI,EAAEO,eAAe,EAAEH,cAAc,EAAED,KAAK,CAAC,CAAC;AACpD","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useListboxNavigation = useListboxNavigation;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
// TODO: Split into web and native versions?
|
|
9
|
+
|
|
10
|
+
function useListboxNavigation({
|
|
11
|
+
items,
|
|
12
|
+
activeValue,
|
|
13
|
+
setActiveValue,
|
|
14
|
+
onSelect,
|
|
15
|
+
onDismiss
|
|
16
|
+
}) {
|
|
17
|
+
const onSelectRef = (0, _react.useRef)(onSelect);
|
|
18
|
+
onSelectRef.current = onSelect;
|
|
19
|
+
const onDismissRef = (0, _react.useRef)(onDismiss);
|
|
20
|
+
onDismissRef.current = onDismiss;
|
|
21
|
+
const getEnabledItems = (0, _react.useCallback)(() => items.filter(item => !item.disabled), [items]);
|
|
22
|
+
const handleKeyDown = (0, _react.useCallback)(e => {
|
|
23
|
+
const enabledItems = getEnabledItems();
|
|
24
|
+
if (enabledItems.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const idx = enabledItems.findIndex(i => i.value === activeValue);
|
|
28
|
+
switch (e.key) {
|
|
29
|
+
case 'ArrowDown':
|
|
30
|
+
{
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
setActiveValue(enabledItems[idx < enabledItems.length - 1 ? idx + 1 : 0].value);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
case 'ArrowUp':
|
|
36
|
+
{
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
setActiveValue(enabledItems[idx > 0 ? idx - 1 : enabledItems.length - 1].value);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case 'Home':
|
|
42
|
+
{
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
setActiveValue(enabledItems[0].value);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 'End':
|
|
48
|
+
{
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
const last = enabledItems.at(-1);
|
|
51
|
+
if (last) {
|
|
52
|
+
setActiveValue(last.value);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case 'Enter':
|
|
57
|
+
case ' ':
|
|
58
|
+
{
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
if (activeValue) {
|
|
61
|
+
onSelectRef.current(activeValue);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case 'Escape':
|
|
66
|
+
{
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
onDismissRef.current();
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case 'Tab':
|
|
72
|
+
{
|
|
73
|
+
onDismissRef.current();
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, [activeValue, getEnabledItems, setActiveValue]);
|
|
78
|
+
return {
|
|
79
|
+
handleKeyDown,
|
|
80
|
+
getEnabledItems
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=useListboxNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","useListboxNavigation","items","activeValue","setActiveValue","onSelect","onDismiss","onSelectRef","useRef","current","onDismissRef","getEnabledItems","useCallback","filter","item","disabled","handleKeyDown","e","enabledItems","length","idx","findIndex","i","value","key","preventDefault","last","at"],"sourceRoot":"../../../src","sources":["select/useListboxNavigation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA;;AAUO,SAASC,oBAAoBA,CAAC;EACnCC,KAAK;EACLC,WAAW;EACXC,cAAc;EACdC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACH,QAAQ,CAAC;EACpCE,WAAW,CAACE,OAAO,GAAGJ,QAAQ;EAE9B,MAAMK,YAAY,GAAG,IAAAF,aAAM,EAACF,SAAS,CAAC;EACtCI,YAAY,CAACD,OAAO,GAAGH,SAAS;EAEhC,MAAMK,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAMV,KAAK,CAACW,MAAM,CAAEC,IAAI,IAAK,CAACA,IAAI,CAACC,QAAQ,CAAC,EAAE,CAACb,KAAK,CAAC,CAAC;EAE1F,MAAMc,aAAa,GAAG,IAAAJ,kBAAW,EAC9BK,CAAM,IAAK;IACV,MAAMC,YAAY,GAAGP,eAAe,CAAC,CAAC;IACtC,IAAIO,YAAY,CAACC,MAAM,KAAK,CAAC,EAAE;MAC7B;IACF;IAEA,MAAMC,GAAG,GAAGF,YAAY,CAACG,SAAS,CAAEC,CAAC,IAAKA,CAAC,CAACC,KAAK,KAAKpB,WAAW,CAAC;IAElE,QAAQc,CAAC,CAACO,GAAG;MACX,KAAK,WAAW;QAAE;UAChBP,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClBrB,cAAc,CAACc,YAAY,CAACE,GAAG,GAAGF,YAAY,CAACC,MAAM,GAAG,CAAC,GAAGC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAACG,KAAK,CAAC;UAC/E;QACF;MACA,KAAK,SAAS;QAAE;UACdN,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClBrB,cAAc,CAACc,YAAY,CAACE,GAAG,GAAG,CAAC,GAAGA,GAAG,GAAG,CAAC,GAAGF,YAAY,CAACC,MAAM,GAAG,CAAC,CAAC,CAACI,KAAK,CAAC;UAC/E;QACF;MACA,KAAK,MAAM;QAAE;UACXN,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClBrB,cAAc,CAACc,YAAY,CAAC,CAAC,CAAC,CAACK,KAAK,CAAC;UACrC;QACF;MACA,KAAK,KAAK;QAAE;UACVN,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClB,MAAMC,IAAI,GAAGR,YAAY,CAACS,EAAE,CAAC,CAAC,CAAC,CAAC;UAChC,IAAID,IAAI,EAAE;YACRtB,cAAc,CAACsB,IAAI,CAACH,KAAK,CAAC;UAC5B;UACA;QACF;MACA,KAAK,OAAO;MACZ,KAAK,GAAG;QAAE;UACRN,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClB,IAAItB,WAAW,EAAE;YACfI,WAAW,CAACE,OAAO,CAACN,WAAW,CAAC;UAClC;UACA;QACF;MACA,KAAK,QAAQ;QAAE;UACbc,CAAC,CAACQ,cAAc,CAAC,CAAC;UAClBf,YAAY,CAACD,OAAO,CAAC,CAAC;UACtB;QACF;MACA,KAAK,KAAK;QAAE;UACVC,YAAY,CAACD,OAAO,CAAC,CAAC;UACtB;QACF;IACF;EACF,CAAC,EACD,CAACN,WAAW,EAAEQ,eAAe,EAAEP,cAAc,CAC/C,CAAC;EAED,OAAO;IAAEY,aAAa;IAAEL;EAAgB,CAAC;AAC3C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["uniwind.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dataAttributes = dataAttributes;
|
|
7
|
+
/**
|
|
8
|
+
* Produces platform-specific props for data attributes.
|
|
9
|
+
*
|
|
10
|
+
* Native: individual `data-*` props consumed by Uniwind.
|
|
11
|
+
* Web (.web.ts): a `dataSet` object consumed by React Native Web.
|
|
12
|
+
*
|
|
13
|
+
* Boolean values serialize to `"true"` / `"false"` strings.
|
|
14
|
+
* String values pass through as-is.
|
|
15
|
+
* Undefined values are omitted.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function camelToKebab(str) {
|
|
19
|
+
return str.replaceAll(/[A-Z]/g, ch => `-${ch.toLowerCase()}`);
|
|
20
|
+
}
|
|
21
|
+
function dataAttributes(attrs) {
|
|
22
|
+
const result = {};
|
|
23
|
+
for (const key in attrs) {
|
|
24
|
+
const value = attrs[key];
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
result[`data-${camelToKebab(key)}`] = typeof value === 'boolean' ? String(value) : value;
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=dataAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["camelToKebab","str","replaceAll","ch","toLowerCase","dataAttributes","attrs","result","key","value","undefined","String"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,YAAYA,CAACC,GAAW,EAAU;EACzC,OAAOA,GAAG,CAACC,UAAU,CAAC,QAAQ,EAAGC,EAAE,IAAK,IAAIA,EAAE,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC;AACjE;AAEO,SAASC,cAAcA,CAACC,KAAyC,EAA0B;EAChG,MAAMC,MAA8B,GAAG,CAAC,CAAC;EACzC,KAAK,MAAMC,GAAG,IAAIF,KAAK,EAAE;IACvB,MAAMG,KAAK,GAAGH,KAAK,CAACE,GAAG,CAAC;IACxB,IAAIC,KAAK,KAAKC,SAAS,EAAE;MACvB;IACF;IACAH,MAAM,CAAC,QAAQP,YAAY,CAACQ,GAAG,CAAC,EAAE,CAAC,GAAG,OAAOC,KAAK,KAAK,SAAS,GAAGE,MAAM,CAACF,KAAK,CAAC,GAAGA,KAAK;EAC1F;EACA,OAAOF,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dataAttributes = dataAttributes;
|
|
7
|
+
/**
|
|
8
|
+
* Produces platform-specific props for data attributes.
|
|
9
|
+
*
|
|
10
|
+
* Web: a `dataSet` object consumed by React Native Web, which translates
|
|
11
|
+
* camelCase keys to `data-kebab-case` DOM attributes automatically.
|
|
12
|
+
* Native (.ts): individual `data-*` props consumed by Uniwind.
|
|
13
|
+
*
|
|
14
|
+
* Values pass through to `dataSet` as-is (RNW handles serialization).
|
|
15
|
+
* Undefined values are omitted.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function dataAttributes(attrs) {
|
|
19
|
+
const dataSet = {};
|
|
20
|
+
for (const key in attrs) {
|
|
21
|
+
const value = attrs[key];
|
|
22
|
+
if (value === undefined) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
dataSet[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
dataSet
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=dataAttributes.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dataAttributes","attrs","dataSet","key","value","undefined"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.web.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,SAASA,cAAcA,CAACC,KAAyC,EAEtE;EACA,MAAMC,OAAyC,GAAG,CAAC,CAAC;EACpD,KAAK,MAAMC,GAAG,IAAIF,KAAK,EAAE;IACvB,MAAMG,KAAK,GAAGH,KAAK,CAACE,GAAG,CAAC;IACxB,IAAIC,KAAK,KAAKC,SAAS,EAAE;MACvB;IACF;IACAH,OAAO,CAACC,GAAG,CAAC,GAAGC,KAAK;EACtB;EACA,OAAO;IAAEF;EAAQ,CAAC;AACpB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","ButtonProvider","useButtonContext"],"sourceRoot":"../../../src","sources":["button/context.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,eAAe;AAG7C,OAAO,MAAM,CAACC,cAAc,EAAEC,gBAAgB,CAAC,GAAGF,aAAa,CAAmB,eAAe,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { flattenChildren } from '@cdx-ui/utils';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const createButtonGroup = BaseButtonGroup => /*#__PURE__*/forwardRef(({
|
|
7
|
+
flexDirection = 'row',
|
|
8
|
+
isAttached,
|
|
9
|
+
isDisabled,
|
|
10
|
+
children,
|
|
11
|
+
isReversed,
|
|
12
|
+
reversed,
|
|
13
|
+
...props
|
|
14
|
+
}, ref) => {
|
|
15
|
+
const direction = flexDirection.includes('reverse') ? flexDirection === 'column-reverse' ? 'column' : 'row' : flexDirection;
|
|
16
|
+
let computedChildren;
|
|
17
|
+
let childrenArray = React.Children.toArray(flattenChildren(children));
|
|
18
|
+
childrenArray = isReversed || reversed ? [...childrenArray].reverse() : childrenArray;
|
|
19
|
+
if (childrenArray) {
|
|
20
|
+
computedChildren = childrenArray.map((child, index) => {
|
|
21
|
+
if (typeof child === 'string' || typeof child === 'number') {
|
|
22
|
+
return child;
|
|
23
|
+
}
|
|
24
|
+
const attachedStyles = {};
|
|
25
|
+
if (index === 0) {
|
|
26
|
+
if (direction === 'column') {
|
|
27
|
+
attachedStyles.borderBottomLeftRadius = 0;
|
|
28
|
+
attachedStyles.borderBottomRightRadius = 0;
|
|
29
|
+
} else {
|
|
30
|
+
attachedStyles.borderTopRightRadius = 0;
|
|
31
|
+
attachedStyles.borderBottomRightRadius = 0;
|
|
32
|
+
}
|
|
33
|
+
} else if (index === childrenArray.length - 1) {
|
|
34
|
+
if (direction === 'column') {
|
|
35
|
+
attachedStyles.borderTopLeftRadius = 0;
|
|
36
|
+
attachedStyles.borderTopRightRadius = 0;
|
|
37
|
+
} else {
|
|
38
|
+
attachedStyles.borderTopLeftRadius = 0;
|
|
39
|
+
attachedStyles.borderBottomLeftRadius = 0;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
attachedStyles.borderRadius = 0;
|
|
43
|
+
}
|
|
44
|
+
const childProps = {
|
|
45
|
+
isDisabled,
|
|
46
|
+
...child.props,
|
|
47
|
+
style: {
|
|
48
|
+
...(isAttached ? attachedStyles : {}),
|
|
49
|
+
...child.props.style
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const clonedChild = /*#__PURE__*/React.cloneElement(child, {
|
|
53
|
+
...childProps
|
|
54
|
+
});
|
|
55
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
56
|
+
children: clonedChild
|
|
57
|
+
}, child.key ?? `spaced-child-${index.toString()}`);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const gapProp = isAttached ? {
|
|
61
|
+
gap: 0
|
|
62
|
+
} : {};
|
|
63
|
+
if (computedChildren) {
|
|
64
|
+
return /*#__PURE__*/_jsx(BaseButtonGroup, {
|
|
65
|
+
flexDirection,
|
|
66
|
+
...props,
|
|
67
|
+
ref,
|
|
68
|
+
...gapProp,
|
|
69
|
+
children: computedChildren
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=createButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","flattenChildren","jsx","_jsx","createButtonGroup","BaseButtonGroup","flexDirection","isAttached","isDisabled","children","isReversed","reversed","props","ref","direction","includes","computedChildren","childrenArray","Children","toArray","reverse","map","child","index","attachedStyles","borderBottomLeftRadius","borderBottomRightRadius","borderTopRightRadius","length","borderTopLeftRadius","borderRadius","childProps","style","clonedChild","cloneElement","Fragment","key","toString","gapProp","gap"],"sourceRoot":"../../../src","sources":["button/createButtonGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,eAAe,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhD,OAAO,MAAMC,iBAAiB,GAAQC,eAAuC,iBAC3EL,UAAU,CACR,CACE;EACEM,aAAa,GAAG,KAAK;EACrBC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACR,GAAGC;AACc,CAAC,EACpBC,GAAkB,KACf;EACH,MAAMC,SAAS,GAAGR,aAAa,CAACS,QAAQ,CAAC,SAAS,CAAC,GAC/CT,aAAa,KAAK,gBAAgB,GAChC,QAAQ,GACR,KAAK,GACPA,aAAa;EACjB,IAAIU,gBAA6C;EACjD,IAAIC,aAAa,GAAGlB,KAAK,CAACmB,QAAQ,CAACC,OAAO,CAAClB,eAAe,CAACQ,QAAQ,CAAC,CAAC;EACrEQ,aAAa,GAAGP,UAAU,IAAIC,QAAQ,GAAG,CAAC,GAAGM,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,GAAGH,aAAa;EAErF,IAAIA,aAAa,EAAE;IACjBD,gBAAgB,GAAGC,aAAa,CAACI,GAAG,CAAC,CAACC,KAAU,EAAEC,KAAa,KAAK;MAClE,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QAC1D,OAAOA,KAAK;MACd;MAEA,MAAME,cAAmB,GAAG,CAAC,CAAC;MAE9B,IAAID,KAAK,KAAK,CAAC,EAAE;QACf,IAAIT,SAAS,KAAK,QAAQ,EAAE;UAC1BU,cAAc,CAACC,sBAAsB,GAAG,CAAC;UACzCD,cAAc,CAACE,uBAAuB,GAAG,CAAC;QAC5C,CAAC,MAAM;UACLF,cAAc,CAACG,oBAAoB,GAAG,CAAC;UACvCH,cAAc,CAACE,uBAAuB,GAAG,CAAC;QAC5C;MACF,CAAC,MAAM,IAAIH,KAAK,KAAKN,aAAa,CAACW,MAAM,GAAG,CAAC,EAAE;QAC7C,IAAId,SAAS,KAAK,QAAQ,EAAE;UAC1BU,cAAc,CAACK,mBAAmB,GAAG,CAAC;UACtCL,cAAc,CAACG,oBAAoB,GAAG,CAAC;QACzC,CAAC,MAAM;UACLH,cAAc,CAACK,mBAAmB,GAAG,CAAC;UACtCL,cAAc,CAACC,sBAAsB,GAAG,CAAC;QAC3C;MACF,CAAC,MAAM;QACLD,cAAc,CAACM,YAAY,GAAG,CAAC;MACjC;MAEA,MAAMC,UAAU,GAAG;QACjBvB,UAAU;QACV,GAAGc,KAAK,CAACV,KAAK;QACdoB,KAAK,EAAE;UACL,IAAIzB,UAAU,GAAGiB,cAAc,GAAG,CAAC,CAAC,CAAC;UACrC,GAAGF,KAAK,CAACV,KAAK,CAACoB;QACjB;MACF,CAAC;MAED,MAAMC,WAAW,gBAAGlC,KAAK,CAACmC,YAAY,CAACZ,KAAK,EAAE;QAC5C,GAAGS;MACL,CAAC,CAAC;MAEF,oBACE5B,IAAA,CAACJ,KAAK,CAACoC,QAAQ;QAAA1B,QAAA,EACZwB;MAAW,GADOX,KAAK,CAACc,GAAG,IAAI,gBAAgBb,KAAK,CAACc,QAAQ,CAAC,CAAC,EAElD,CAAC;IAErB,CAAC,CAAC;EACJ;EAEA,MAAMC,OAAO,GAAG/B,UAAU,GAAG;IAAEgC,GAAG,EAAE;EAAE,CAAC,GAAG,CAAC,CAAC;EAE5C,IAAIvB,gBAAgB,EAAE;IACpB,oBACEb,IAAA,CAACE,eAAe;MAAQC,aAAa;MAAE,GAAGM,KAAK;MAAEC,GAAG;MAAE,GAAGyB,OAAO;MAAA7B,QAAA,EAC7DO;IAAgB,CACF,CAAC;EAEtB;EACA,OAAO,IAAI;AACb,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
// TODO: Does this need data-attributes?
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const createButtonIcon = BaseButtonIcon => /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
+
return /*#__PURE__*/_jsx(BaseButtonIcon, {
|
|
9
|
+
...props,
|
|
10
|
+
ref: ref
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=createButtonIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","jsx","_jsx","createButtonIcon","BaseButtonIcon","props","ref"],"sourceRoot":"../../../src","sources":["button/createButtonIcon.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;;AAElC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEA,OAAO,MAAMC,gBAAgB,GAAQC,cAAsC,iBACzEJ,UAAU,CAAC,CAACK,KAAU,EAAEC,GAAkB,KAAK;EAC7C,oBAAOJ,IAAA,CAACE,cAAc;IAAA,GAAKC,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AAChD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { composeEventHandlers } from '@cdx-ui/utils';
|
|
5
|
+
import { useFocus, useFocusRing } from '@react-native-aria/focus';
|
|
6
|
+
import { useHover, usePress } from '@react-native-aria/interactions';
|
|
7
|
+
import { dataAttributes } from '../utils/dataAttributes';
|
|
8
|
+
import { ButtonProvider } from './context';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export const createButtonRoot = BaseButton => /*#__PURE__*/forwardRef(({
|
|
11
|
+
children,
|
|
12
|
+
isDisabled,
|
|
13
|
+
isHovered: isHoveredProp,
|
|
14
|
+
isActive: isActiveProp,
|
|
15
|
+
isFocused: isFocusedProp,
|
|
16
|
+
isFocusVisible: isFocusVisibleProp,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const {
|
|
20
|
+
isFocused,
|
|
21
|
+
focusProps
|
|
22
|
+
} = useFocus();
|
|
23
|
+
const {
|
|
24
|
+
isFocusVisible,
|
|
25
|
+
focusProps: focusRingProps
|
|
26
|
+
} = useFocusRing();
|
|
27
|
+
const {
|
|
28
|
+
pressProps: pressableProps,
|
|
29
|
+
isPressed: isActive
|
|
30
|
+
} = usePress({
|
|
31
|
+
isDisabled
|
|
32
|
+
});
|
|
33
|
+
const {
|
|
34
|
+
isHovered,
|
|
35
|
+
hoverProps
|
|
36
|
+
} = useHover();
|
|
37
|
+
const contextValue = useMemo(() => {
|
|
38
|
+
return {
|
|
39
|
+
hover: isHoveredProp || isHovered,
|
|
40
|
+
focus: isFocusedProp || isFocused,
|
|
41
|
+
active: isActiveProp || isActive,
|
|
42
|
+
disabled: isDisabled,
|
|
43
|
+
focusVisible: isFocusVisibleProp || isFocusVisible
|
|
44
|
+
};
|
|
45
|
+
}, [isHovered, isHoveredProp, isFocused, isFocusedProp, isActive, isActiveProp, isDisabled, isFocusVisible, isFocusVisibleProp]);
|
|
46
|
+
return /*#__PURE__*/_jsx(ButtonProvider, {
|
|
47
|
+
value: contextValue,
|
|
48
|
+
children: /*#__PURE__*/_jsx(BaseButton, {
|
|
49
|
+
ref: ref,
|
|
50
|
+
role: props?.role || 'button',
|
|
51
|
+
...dataAttributes({
|
|
52
|
+
hover: isHoveredProp || isHovered,
|
|
53
|
+
focus: isFocusedProp || isFocused,
|
|
54
|
+
active: isActiveProp || isActive,
|
|
55
|
+
disabled: isDisabled,
|
|
56
|
+
focusVisible: isFocusVisibleProp || isFocusVisible
|
|
57
|
+
}),
|
|
58
|
+
disabled: isDisabled,
|
|
59
|
+
...props,
|
|
60
|
+
onPressIn: composeEventHandlers(props?.onPressIn, pressableProps.onPressIn),
|
|
61
|
+
onPressOut: composeEventHandlers(props?.onPressOut, pressableProps.onPressOut),
|
|
62
|
+
onHoverIn: composeEventHandlers(props?.onHoverIn, hoverProps.onHoverIn),
|
|
63
|
+
onHoverOut: composeEventHandlers(props?.onHoverOut, hoverProps.onHoverOut),
|
|
64
|
+
onFocus: composeEventHandlers(composeEventHandlers(props?.onFocus, focusProps.onFocus), focusRingProps.onFocus),
|
|
65
|
+
onBlur: composeEventHandlers(composeEventHandlers(props?.onBlur, focusProps.onBlur), focusRingProps.onBlur),
|
|
66
|
+
children: typeof children === 'function' ? children({
|
|
67
|
+
hover: isHoveredProp || isHovered,
|
|
68
|
+
focus: isFocusedProp || isFocused,
|
|
69
|
+
active: isActiveProp || isActive,
|
|
70
|
+
disabled: isDisabled,
|
|
71
|
+
focusVisible: isFocusVisibleProp || isFocusVisible
|
|
72
|
+
}) : children
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=createButtonRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","composeEventHandlers","useFocus","useFocusRing","useHover","usePress","dataAttributes","ButtonProvider","jsx","_jsx","createButtonRoot","BaseButton","children","isDisabled","isHovered","isHoveredProp","isActive","isActiveProp","isFocused","isFocusedProp","isFocusVisible","isFocusVisibleProp","props","ref","focusProps","focusRingProps","pressProps","pressableProps","isPressed","hoverProps","contextValue","hover","focus","active","disabled","focusVisible","value","role","onPressIn","onPressOut","onHoverIn","onHoverOut","onFocus","onBlur"],"sourceRoot":"../../../src","sources":["button/createButtonRoot.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { dataAttributes } from '../utils/dataAttributes';
|
|
5
|
+
import { useButtonContext } from './context';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const createButtonSpinner = BaseButtonSpinner => /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
+
const {
|
|
9
|
+
hover,
|
|
10
|
+
focus,
|
|
11
|
+
active,
|
|
12
|
+
disabled,
|
|
13
|
+
focusVisible
|
|
14
|
+
} = useButtonContext();
|
|
15
|
+
return /*#__PURE__*/_jsx(BaseButtonSpinner, {
|
|
16
|
+
...props,
|
|
17
|
+
tabIndex: 0,
|
|
18
|
+
"aria-label": "loading",
|
|
19
|
+
ref: ref,
|
|
20
|
+
...dataAttributes({
|
|
21
|
+
hover,
|
|
22
|
+
focus,
|
|
23
|
+
active,
|
|
24
|
+
disabled,
|
|
25
|
+
focusVisible
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=createButtonSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","dataAttributes","useButtonContext","jsx","_jsx","createButtonSpinner","BaseButtonSpinner","props","ref","hover","focus","active","disabled","focusVisible","tabIndex"],"sourceRoot":"../../../src","sources":["button/createButtonSpinner.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,gBAAgB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG7C,OAAO,MAAMC,mBAAmB,GAAQC,iBAAyC,iBAC/EN,UAAU,CAA+B,CAACO,KAAK,EAAEC,GAAG,KAAK;EACvD,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAGX,gBAAgB,CAAC,CAAC;EAE3E,oBACEE,IAAA,CAACE,iBAAiB;IAAA,GACXC,KAAK;IACVO,QAAQ,EAAE,CAAE;IACZ,cAAW,SAAS;IACpBN,GAAG,EAAEA,GAAI;IAAA,GACLP,cAAc,CAAC;MAAEQ,KAAK;MAAEC,KAAK;MAAEC,MAAM;MAAEC,QAAQ;MAAEC;IAAa,CAAC;EAAC,CACrE,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { dataAttributes } from '../utils/dataAttributes';
|
|
5
|
+
import { useButtonContext } from './context';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
// TODO: Rename to ButtonLabel
|
|
8
|
+
|
|
9
|
+
export const createButtonText = BaseButtonText => /*#__PURE__*/forwardRef(({
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}, ref) => {
|
|
13
|
+
const {
|
|
14
|
+
hover,
|
|
15
|
+
focus,
|
|
16
|
+
active,
|
|
17
|
+
disabled,
|
|
18
|
+
focusVisible
|
|
19
|
+
} = useButtonContext();
|
|
20
|
+
return /*#__PURE__*/_jsx(BaseButtonText, {
|
|
21
|
+
ref: ref,
|
|
22
|
+
...props,
|
|
23
|
+
...dataAttributes({
|
|
24
|
+
hover,
|
|
25
|
+
focus,
|
|
26
|
+
active,
|
|
27
|
+
disabled,
|
|
28
|
+
focusVisible
|
|
29
|
+
}),
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=createButtonText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","dataAttributes","useButtonContext","jsx","_jsx","createButtonText","BaseButtonText","children","props","ref","hover","focus","active","disabled","focusVisible"],"sourceRoot":"../../../src","sources":["button/createButtonText.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,gBAAgB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG7C;;AAEA,OAAO,MAAMC,gBAAgB,GAAQC,cAAsC,iBACzEN,UAAU,CAA4B,CAAC;EAAEO,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrE,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAGZ,gBAAgB,CAAC,CAAC;EAE3E,oBACEE,IAAA,CAACE,cAAc;IACbG,GAAG,EAAEA,GAAI;IAAA,GACJD,KAAK;IAAA,GACNP,cAAc,CAAC;MAAES,KAAK;MAAEC,KAAK;MAAEC,MAAM;MAAEC,QAAQ;MAAEC;IAAa,CAAC,CAAC;IAAAP,QAAA,EAEnEA;EAAQ,CACK,CAAC;AAErB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createButtonRoot } from './createButtonRoot';
|
|
4
|
+
import { createButtonGroup } from './createButtonGroup';
|
|
5
|
+
import { createButtonIcon } from './createButtonIcon';
|
|
6
|
+
import { createButtonSpinner } from './createButtonSpinner';
|
|
7
|
+
import { createButtonText } from './createButtonText';
|
|
8
|
+
export function createButton({
|
|
9
|
+
Root,
|
|
10
|
+
Text,
|
|
11
|
+
Group,
|
|
12
|
+
Spinner,
|
|
13
|
+
Icon
|
|
14
|
+
}) {
|
|
15
|
+
const Button = createButtonRoot(Root);
|
|
16
|
+
Button.Text = createButtonText(Text);
|
|
17
|
+
Button.Group = createButtonGroup(Group);
|
|
18
|
+
Button.Spinner = createButtonSpinner(Spinner);
|
|
19
|
+
Button.Icon = createButtonIcon(Icon);
|
|
20
|
+
Button.displayName = 'Button';
|
|
21
|
+
Button.Text.displayName = 'Button.Text';
|
|
22
|
+
Button.Group.displayName = 'Button.Group';
|
|
23
|
+
Button.Spinner.displayName = 'Button.Spinner';
|
|
24
|
+
Button.Icon.displayName = 'Button.Icon';
|
|
25
|
+
return Button;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createButtonRoot","createButtonGroup","createButtonIcon","createButtonSpinner","createButtonText","createButton","Root","Text","Group","Spinner","Icon","Button","displayName"],"sourceRoot":"../../../src","sources":["button/index.tsx"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,gBAAgB,QAAQ,oBAAoB;AAKrD,OAAO,SAASC,YAAYA,CAQ1B;EACAC,IAAI;EACJC,IAAI;EACJC,KAAK;EACLC,OAAO;EACPC;AAOF,CAAC,EAAE;EACD,MAAMC,MAAM,GAAGX,gBAAgB,CAACM,IAAI,CAAQ;EAC5CK,MAAM,CAACJ,IAAI,GAAGH,gBAAgB,CAACG,IAAI,CAAC;EACpCI,MAAM,CAACH,KAAK,GAAGP,iBAAiB,CAACO,KAAK,CAAC;EACvCG,MAAM,CAACF,OAAO,GAAGN,mBAAmB,CAACM,OAAO,CAAC;EAC7CE,MAAM,CAACD,IAAI,GAAGR,gBAAgB,CAACQ,IAAI,CAAC;EAEpCC,MAAM,CAACC,WAAW,GAAG,QAAQ;EAC7BD,MAAM,CAACJ,IAAI,CAACK,WAAW,GAAG,aAAa;EACvCD,MAAM,CAACH,KAAK,CAACI,WAAW,GAAG,cAAc;EACzCD,MAAM,CAACF,OAAO,CAACG,WAAW,GAAG,gBAAgB;EAC7CD,MAAM,CAACD,IAAI,CAACE,WAAW,GAAG,aAAa;EAEvC,OAAOD,MAAM;AASf","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["button/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OverlayInsetsProvider"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,SAASA,qBAAqB,QAAyB,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","InputProvider","useInputContext"],"sourceRoot":"../../../src","sources":["input/context.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,eAAe;AAG7C,OAAO,MAAM,CAACC,aAAa,EAAEC,eAAe,CAAC,GAAGF,aAAa,CAAe,cAAc,CAAC","ignoreList":[]}
|