@easypost/easy-ui 1.0.0-alpha.64 → 1.0.0-alpha.66
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/Badge/index.js +14 -14
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +5 -5
- package/Banner/index.mjs +5 -5
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/CHANGELOG.md +14 -0
- package/Calendar/index.js +1 -1
- package/Calendar/index.mjs +1 -1
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/index.js +13 -13
- package/CodeBlock/index.mjs +13 -13
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/DataGrid/index.js +57 -57
- package/DataGrid/index.mjs +58 -58
- package/DatePicker/index.js +3 -3
- package/DatePicker/index.mjs +5 -5
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/index.mjs +5 -5
- package/Drawer/index.js +18 -18
- package/Drawer/index.mjs +22 -22
- package/DropdownButton/index.js +12 -12
- package/DropdownButton/index.mjs +12 -12
- package/EmptyStateCard/index.js +8 -8
- package/EmptyStateCard/index.mjs +8 -8
- package/FocusedProductLayout/index.js +23 -23
- package/FocusedProductLayout/index.mjs +23 -23
- package/ForgeLayout/index.js +41 -231
- package/ForgeLayout/index.mjs +40 -230
- package/FormLayout/index.js +5 -5
- package/FormLayout/index.mjs +5 -5
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.mjs +1 -1
- package/IconButton/index.js +12 -12
- package/IconButton/index.mjs +12 -12
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/KebabButton/index.js +1 -1
- package/KebabButton/index.mjs +1 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Menu/utilities.d.ts +3 -0
- package/Menu/utilities.d.ts.map +1 -1
- package/Modal/index.js +19 -19
- package/Modal/index.mjs +23 -23
- package/MultiSelect/MultiSelect.d.ts +123 -0
- package/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.test.d.ts +2 -0
- package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
- package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
- package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
- package/MultiSelect/index.d.ts +2 -0
- package/MultiSelect/index.d.ts.map +1 -0
- package/MultiSelect/index.js +1989 -0
- package/MultiSelect/index.mjs +1974 -0
- package/MultiSelect/utilities.d.ts +3 -0
- package/MultiSelect/utilities.d.ts.map +1 -0
- package/NexusLayout/index.js +28 -28
- package/NexusLayout/index.mjs +28 -28
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +7 -7
- package/Pagination/index.mjs +7 -7
- package/PillGroup/index.js +3 -1681
- package/PillGroup/index.mjs +3 -1681
- package/ProductLayout/index.js +21 -21
- package/ProductLayout/index.mjs +25 -25
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +1 -1
- package/RadioButtonGroup/index.js +3 -3
- package/RadioButtonGroup/index.mjs +3 -3
- package/RadioGroup/index.js +1 -1
- package/RadioGroup/index.mjs +1 -1
- package/RangeCalendar/index.js +1 -1
- package/RangeCalendar/index.mjs +1 -1
- package/SearchNav/index.js +29 -29
- package/SearchNav/index.mjs +29 -29
- package/SectionCard/index.js +7 -7
- package/SectionCard/index.mjs +7 -7
- package/Select/index.js +5 -5
- package/Select/index.mjs +5 -5
- package/SelectorErrorTooltip/index.js +1 -1
- package/SelectorErrorTooltip/index.mjs +1 -1
- package/Spinner/index.js +1 -1
- package/Spinner/index.mjs +1 -1
- package/SplitToggleCard/index.js +4 -4
- package/SplitToggleCard/index.mjs +4 -4
- package/Stepper/index.js +1 -1
- package/Stepper/index.mjs +1 -1
- package/TabNav/index.js +1 -1
- package/TabNav/index.mjs +1 -1
- package/TabPanels/index.js +1 -1
- package/TabPanels/index.mjs +2 -2
- package/Tabs/index.js +1 -1
- package/Tabs/index.mjs +1 -1
- package/Text/index.js +1 -1
- package/Text/index.mjs +1 -1
- package/TextField/index.js +1 -1
- package/TextField/index.mjs +1 -1
- package/Textarea/index.js +1 -1
- package/Textarea/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +2 -2
- package/ToggleCard/index.mjs +2 -2
- package/Tooltip/index.js +1 -1
- package/Tooltip/index.mjs +1 -1
- package/VerticalNav/index.js +24 -24
- package/VerticalNav/index.mjs +24 -24
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
- package/__chunks__/{Button-SuH-KkYi.js → Button-CVaEK94Q.js} +18 -18
- package/__chunks__/{Button-DfkicQp7.mjs → Button-CVbi-24J.mjs} +18 -18
- package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
- package/__chunks__/{Calendar-CB3kTGpr.mjs → Calendar-C2JlXaSY.mjs} +1 -1
- package/__chunks__/{Calendar-D5V31Ypy.js → Calendar-CmF_v-Dn.js} +1 -1
- package/__chunks__/{CalendarBase-CIkCiMYk.js → CalendarBase-Cavy4k_H.js} +18 -18
- package/__chunks__/{CalendarBase-Cq-ReOPx.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
- package/__chunks__/{Card-BKC3iEwF.mjs → Card-B5c1vM8E.mjs} +12 -12
- package/__chunks__/{Card-BGmLybqD.js → Card-BHZOcCVB.js} +12 -12
- package/__chunks__/{Checkbox-B-c8_oGX.js → Checkbox-BmtLwm3J.js} +19 -19
- package/__chunks__/{Checkbox-AbvJCEnW.mjs → Checkbox-IhSMESiF.mjs} +20 -20
- package/__chunks__/{CodeSnippet-CzP6GP8p.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
- package/__chunks__/{CodeSnippet-D9Gfaozc.js → CodeSnippet-HAojQDBb.js} +2 -2
- package/__chunks__/{DatePickerBase-DVe9Z17z.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
- package/__chunks__/{DatePickerBase-BW867uS-.js → DatePickerBase-PqJZhPW5.js} +18 -62
- package/__chunks__/Dialog-CFyC5TFs.js +232 -0
- package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
- package/__chunks__/{HelpMenu-BikR3il4.js → HelpMenu-DttT1pkc.js} +6 -6
- package/__chunks__/{HelpMenu-ylsZtQ2y.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
- package/__chunks__/{HorizontalGrid-7W4Y5Vah.js → HorizontalGrid-BFqXCljf.js} +1 -1
- package/__chunks__/{HorizontalGrid-B399c2dw.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
- package/__chunks__/{HorizontalStack-Bz49rrqk.js → HorizontalStack-BG-lZii5.js} +1 -1
- package/__chunks__/{HorizontalStack-9tVfFqP2.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
- package/__chunks__/{Icon-AWZqgFkO.js → Icon-BHbBKuGB.js} +2 -2
- package/__chunks__/{Icon-tvIiMl4h.mjs → Icon-ZRjQkfey.mjs} +2 -2
- package/__chunks__/{InputCaption-DMwqCmEY.js → InputCaption-BQw7pLl1.js} +2 -2
- package/__chunks__/{InputCaption-BPHL8W55.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
- package/__chunks__/{InputField-LUuwaWK6.mjs → InputField-1toY1X94.mjs} +6 -89
- package/__chunks__/{InputField-BBG9VjEM.js → InputField-e2dBsTrQ.js} +6 -89
- package/__chunks__/{InputIcon-C6fRUjFn.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
- package/__chunks__/{InputIcon-BOj4dVSh.js → InputIcon-DM19rdNu.js} +31 -31
- package/__chunks__/{KebabButton-DXxpDShY.js → KebabButton-3APOVOtc.js} +4 -4
- package/__chunks__/{KebabButton-DdERbhKc.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
- package/__chunks__/{Menu-BtQxi784.js → Menu-90Db_wYM.js} +22 -62
- package/__chunks__/{Menu-CGSgffvA.mjs → Menu-D7JiGJt4.mjs} +22 -62
- package/__chunks__/{Notification-sLPjuMls.mjs → Notification-C4gEE6IM.mjs} +14 -14
- package/__chunks__/{Notification-CTV7jwBV.js → Notification-DZ0uDsoT.js} +14 -14
- package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
- package/__chunks__/PillGroup-BetDOSFz.js +2061 -0
- package/__chunks__/PillGroup-Bp5vfk6Z.mjs +2062 -0
- package/__chunks__/{RadioGroup-jGUuixrB.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
- package/__chunks__/{RadioGroup-CN_RSlFy.js → RadioGroup-Qn2c29rT.js} +15 -15
- package/__chunks__/{RangeCalendar-D5fz339R.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
- package/__chunks__/{RangeCalendar-odwkDlEn.js → RangeCalendar-lhIzCnWl.js} +1 -1
- package/__chunks__/{SelectOverlay-BegZKkp1.js → SelectOverlay-CoOED545.js} +28 -188
- package/__chunks__/{SelectOverlay-CoSQv1a0.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
- package/__chunks__/{SelectorErrorTooltip-DT7rcGh6.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
- package/__chunks__/{SelectorErrorTooltip-By-GwbSg.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
- package/__chunks__/{Spinner-dtD1VQqy.mjs → Spinner-Co64ezt-.mjs} +5 -5
- package/__chunks__/{Spinner-nHnby3-R.js → Spinner-DTH0xdij.js} +5 -5
- package/__chunks__/{Stepper-vfWux5uh.js → Stepper-DqcfNOrn.js} +25 -25
- package/__chunks__/{Stepper-DCWfT6Sx.mjs → Stepper-OFWKfhi3.mjs} +25 -25
- package/__chunks__/{TabNav-BRBhGNv8.mjs → TabNav-B44TuB70.mjs} +1 -1
- package/__chunks__/{TabNav-BJUikM9a.js → TabNav-DzF57oTN.js} +1 -1
- package/__chunks__/{Tabs-Do2OPQch.mjs → Tabs-ClOwavjv.mjs} +17 -17
- package/__chunks__/{Tabs-DX6oanPk.js → Tabs-CsxDAl1X.js} +17 -17
- package/__chunks__/{Text-DM6H1mZu.js → Text-BwXTDw77.js} +34 -34
- package/__chunks__/{Text-DLBOW0Eu.mjs → Text-DYLBjpe-.mjs} +34 -34
- package/__chunks__/{TextField-BmHD0Ts_.mjs → TextField-DVWDMYaM.mjs} +1 -1
- package/__chunks__/{TextField-DN6oGeBc.js → TextField-YD_1oSnk.js} +1 -1
- package/__chunks__/{Toggle-CDwSjy-c.mjs → Toggle-DiK1wHdG.mjs} +11 -11
- package/__chunks__/{Toggle-CkJcayVz.js → Toggle-gPKUf7QS.js} +11 -11
- package/__chunks__/{Tooltip-CSsijgRV.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
- package/__chunks__/{Tooltip-U0vMQeot.js → Tooltip-DPZMv6Ia.js} +8 -8
- package/__chunks__/{VerticalStack-1CrrssEd.mjs → VerticalStack-C466n8W1.mjs} +3 -3
- package/__chunks__/{VerticalStack-D25ZR-UD.js → VerticalStack-DIpmkisq.js} +3 -3
- package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
- package/__chunks__/{useEdgeInterceptors-DM6DGJVL.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
- package/__chunks__/{useEdgeInterceptors-g_iE4uY5.js → useEdgeInterceptors-DU8I_hQ1.js} +5 -5
- package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
- package/__chunks__/useFilter-DpnZ54nd.js +64 -0
- package/__chunks__/{useFormValidation-v2O6VL2V.mjs → useFormValidation-B3euLzzR.mjs} +4 -4
- package/__chunks__/useListBoxSection-BlFRlBZy.js +192 -0
- package/__chunks__/useListBoxSection-BsSdeGKp.mjs +193 -0
- package/__chunks__/{useTriggerWidth-CRz8zSDa.mjs → useMenuTrigger-D4pQ727R.mjs} +3 -130
- package/__chunks__/{useTriggerWidth-Dj7C0lza.js → useMenuTrigger-qbIPy-fg.js} +0 -127
- package/__chunks__/useMenuTriggerState-Cf_X36NC.mjs +67 -0
- package/__chunks__/useMenuTriggerState-Dai3rheB.js +66 -0
- package/__chunks__/{useModalOverlay-S0R2uVTX.mjs → useModalOverlay-CkOujl0G.mjs} +1 -1
- package/__chunks__/{useOverlayPosition-BjK7cu6U.mjs → useOverlayPosition-dua8TTSS.mjs} +1 -1
- package/__chunks__/{useOverlayTrigger-DDcXdZOM.mjs → useOverlayTrigger-BS8c6XEz.mjs} +1 -1
- package/__chunks__/{useSelectableItem-D61t76J1.mjs → useSelectableItem-B8l2VAQ8.mjs} +2 -2
- package/__chunks__/{useSelectableList-UkBCcTuC.js → useSelectableList-CzTJAukw.js} +15 -0
- package/__chunks__/{useSelectableList-BdG5I7cy.mjs → useSelectableList-DsUuWr0P.mjs} +18 -3
- package/__chunks__/useTextField-CErFc3WZ.js +106 -0
- package/__chunks__/useTextField-Dd-YTxI4.mjs +107 -0
- package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
- package/__chunks__/useTriggerWidth-CAYuGPNq.mjs +133 -0
- package/__chunks__/{utilities-CaBPUKEB.js → utilities-BDABIMDb.js} +4 -0
- package/__chunks__/{utilities-DASknbaa.mjs → utilities-DpKIaDkW.mjs} +5 -1
- package/__chunks__/{utils-D4ddhsBL.mjs → utils-Dt6xdGol.mjs} +10 -2
- package/__chunks__/{utils-DIF5XAA2.js → utils-eHk7b-OB.js} +8 -0
- package/package.json +2 -2
- package/style.css +1609 -1444
- package/utilities/storybook.d.ts +1 -0
- package/utilities/storybook.d.ts.map +1 -1
package/FormLayout/index.js
CHANGED
|
@@ -30,8 +30,8 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31
31
|
const React = require("react");
|
|
32
32
|
const utilities_css = require("../utilities/css.js");
|
|
33
|
-
const HorizontalGrid = require("../__chunks__/HorizontalGrid-
|
|
34
|
-
const Text = require("../__chunks__/Text-
|
|
33
|
+
const HorizontalGrid = require("../__chunks__/HorizontalGrid-BFqXCljf.js");
|
|
34
|
+
const Text = require("../__chunks__/Text-BwXTDw77.js");
|
|
35
35
|
const utilities_react = require("../utilities/react.js");
|
|
36
36
|
function Grid(props) {
|
|
37
37
|
const { children, columns } = props;
|
|
@@ -40,7 +40,7 @@ function Grid(props) {
|
|
|
40
40
|
gap: "2"
|
|
41
41
|
}, children);
|
|
42
42
|
}
|
|
43
|
-
const Header$1 = "
|
|
43
|
+
const Header$1 = "_Header_z2fhf_5";
|
|
44
44
|
const styles$2 = {
|
|
45
45
|
Header: Header$1
|
|
46
46
|
};
|
|
@@ -58,7 +58,7 @@ function HelperText(props) {
|
|
|
58
58
|
}, children);
|
|
59
59
|
}
|
|
60
60
|
const WithinSectionContext = React.createContext(false);
|
|
61
|
-
const Section$1 = "
|
|
61
|
+
const Section$1 = "_Section_18izm_5";
|
|
62
62
|
const styles$1 = {
|
|
63
63
|
Section: Section$1
|
|
64
64
|
};
|
|
@@ -107,7 +107,7 @@ function Title(props) {
|
|
|
107
107
|
}, restProps), textProps), children);
|
|
108
108
|
}
|
|
109
109
|
Title.displayName = "FormLayout.Title";
|
|
110
|
-
const FormLayout$1 = "
|
|
110
|
+
const FormLayout$1 = "_FormLayout_g4scu_5";
|
|
111
111
|
const styles = {
|
|
112
112
|
FormLayout: FormLayout$1
|
|
113
113
|
};
|
package/FormLayout/index.mjs
CHANGED
|
@@ -28,8 +28,8 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import React__default, { createContext, useMemo, isValidElement, useContext } from "react";
|
|
30
30
|
import { classNames } from "../utilities/css.mjs";
|
|
31
|
-
import { H as HorizontalGrid } from "../__chunks__/HorizontalGrid-
|
|
32
|
-
import { T as Text } from "../__chunks__/Text-
|
|
31
|
+
import { H as HorizontalGrid } from "../__chunks__/HorizontalGrid-CyBrrh6k.mjs";
|
|
32
|
+
import { T as Text } from "../__chunks__/Text-DYLBjpe-.mjs";
|
|
33
33
|
import { deepFind } from "../utilities/react.mjs";
|
|
34
34
|
function Grid(props) {
|
|
35
35
|
const { children, columns } = props;
|
|
@@ -38,7 +38,7 @@ function Grid(props) {
|
|
|
38
38
|
gap: "2"
|
|
39
39
|
}, children);
|
|
40
40
|
}
|
|
41
|
-
const Header$1 = "
|
|
41
|
+
const Header$1 = "_Header_z2fhf_5";
|
|
42
42
|
const styles$2 = {
|
|
43
43
|
Header: Header$1
|
|
44
44
|
};
|
|
@@ -56,7 +56,7 @@ function HelperText(props) {
|
|
|
56
56
|
}, children);
|
|
57
57
|
}
|
|
58
58
|
const WithinSectionContext = createContext(false);
|
|
59
|
-
const Section$1 = "
|
|
59
|
+
const Section$1 = "_Section_18izm_5";
|
|
60
60
|
const styles$1 = {
|
|
61
61
|
Section: Section$1
|
|
62
62
|
};
|
|
@@ -105,7 +105,7 @@ function Title(props) {
|
|
|
105
105
|
}, restProps), textProps), children);
|
|
106
106
|
}
|
|
107
107
|
Title.displayName = "FormLayout.Title";
|
|
108
|
-
const FormLayout$1 = "
|
|
108
|
+
const FormLayout$1 = "_FormLayout_g4scu_5";
|
|
109
109
|
const styles = {
|
|
110
110
|
FormLayout: FormLayout$1
|
|
111
111
|
};
|
package/HorizontalGrid/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const HorizontalGrid = require("../__chunks__/HorizontalGrid-
|
|
3
|
+
const HorizontalGrid = require("../__chunks__/HorizontalGrid-BFqXCljf.js");
|
|
4
4
|
exports.HorizontalGrid = HorizontalGrid.HorizontalGrid;
|
package/HorizontalGrid/index.mjs
CHANGED
package/HorizontalStack/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const HorizontalStack = require("../__chunks__/HorizontalStack-
|
|
3
|
+
const HorizontalStack = require("../__chunks__/HorizontalStack-BG-lZii5.js");
|
|
4
4
|
exports.HorizontalStack = HorizontalStack.HorizontalStack;
|
package/Icon/index.js
CHANGED
package/Icon/index.mjs
CHANGED
package/IconButton/index.js
CHANGED
|
@@ -30,19 +30,19 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31
31
|
const React = require("react");
|
|
32
32
|
const UnstyledButton = require("../__chunks__/UnstyledButton-Dmq9K7Jv.js");
|
|
33
|
-
const Icon = require("../__chunks__/Icon-
|
|
34
|
-
const Text = require("../__chunks__/Text-
|
|
33
|
+
const Icon = require("../__chunks__/Icon-BHbBKuGB.js");
|
|
34
|
+
const Text = require("../__chunks__/Text-BwXTDw77.js");
|
|
35
35
|
const utilities_css = require("../utilities/css.js");
|
|
36
|
-
const IconButton$1 = "
|
|
37
|
-
const colorPrimary = "
|
|
38
|
-
const colorSecondary = "
|
|
39
|
-
const colorSuccess = "
|
|
40
|
-
const colorWarning = "
|
|
41
|
-
const colorNeutral = "
|
|
42
|
-
const colorSupport = "
|
|
43
|
-
const colorInverse = "
|
|
44
|
-
const variantOutlined = "
|
|
45
|
-
const variantFilled = "
|
|
36
|
+
const IconButton$1 = "_IconButton_1pl3h_5";
|
|
37
|
+
const colorPrimary = "_colorPrimary_1pl3h_20";
|
|
38
|
+
const colorSecondary = "_colorSecondary_1pl3h_28";
|
|
39
|
+
const colorSuccess = "_colorSuccess_1pl3h_36";
|
|
40
|
+
const colorWarning = "_colorWarning_1pl3h_44";
|
|
41
|
+
const colorNeutral = "_colorNeutral_1pl3h_52";
|
|
42
|
+
const colorSupport = "_colorSupport_1pl3h_60";
|
|
43
|
+
const colorInverse = "_colorInverse_1pl3h_66";
|
|
44
|
+
const variantOutlined = "_variantOutlined_1pl3h_72";
|
|
45
|
+
const variantFilled = "_variantFilled_1pl3h_101";
|
|
46
46
|
const styles = {
|
|
47
47
|
IconButton: IconButton$1,
|
|
48
48
|
colorPrimary,
|
package/IconButton/index.mjs
CHANGED
|
@@ -28,19 +28,19 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import React__default, { forwardRef } from "react";
|
|
30
30
|
import { l as logWarningIfInvalidColorVariantCombination, U as UnstyledButton } from "../__chunks__/UnstyledButton-Ctqv-3bt.mjs";
|
|
31
|
-
import { I as Icon } from "../__chunks__/Icon-
|
|
32
|
-
import { T as Text } from "../__chunks__/Text-
|
|
31
|
+
import { I as Icon } from "../__chunks__/Icon-ZRjQkfey.mjs";
|
|
32
|
+
import { T as Text } from "../__chunks__/Text-DYLBjpe-.mjs";
|
|
33
33
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
34
|
-
const IconButton$1 = "
|
|
35
|
-
const colorPrimary = "
|
|
36
|
-
const colorSecondary = "
|
|
37
|
-
const colorSuccess = "
|
|
38
|
-
const colorWarning = "
|
|
39
|
-
const colorNeutral = "
|
|
40
|
-
const colorSupport = "
|
|
41
|
-
const colorInverse = "
|
|
42
|
-
const variantOutlined = "
|
|
43
|
-
const variantFilled = "
|
|
34
|
+
const IconButton$1 = "_IconButton_1pl3h_5";
|
|
35
|
+
const colorPrimary = "_colorPrimary_1pl3h_20";
|
|
36
|
+
const colorSecondary = "_colorSecondary_1pl3h_28";
|
|
37
|
+
const colorSuccess = "_colorSuccess_1pl3h_36";
|
|
38
|
+
const colorWarning = "_colorWarning_1pl3h_44";
|
|
39
|
+
const colorNeutral = "_colorNeutral_1pl3h_52";
|
|
40
|
+
const colorSupport = "_colorSupport_1pl3h_60";
|
|
41
|
+
const colorInverse = "_colorInverse_1pl3h_66";
|
|
42
|
+
const variantOutlined = "_variantOutlined_1pl3h_72";
|
|
43
|
+
const variantFilled = "_variantFilled_1pl3h_101";
|
|
44
44
|
const styles = {
|
|
45
45
|
IconButton: IconButton$1,
|
|
46
46
|
colorPrimary,
|
package/InputField/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const InputField = require("../__chunks__/InputField-
|
|
3
|
+
const InputField = require("../__chunks__/InputField-e2dBsTrQ.js");
|
|
4
4
|
exports.InputField = InputField.InputField;
|
package/InputField/index.mjs
CHANGED
package/KebabButton/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const KebabButton = require("../__chunks__/KebabButton-
|
|
3
|
+
const KebabButton = require("../__chunks__/KebabButton-3APOVOtc.js");
|
|
4
4
|
exports.KebabButton = KebabButton.KebabButton;
|
package/KebabButton/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuOverlay.d.ts","sourceRoot":"","sources":["../../src/Menu/MenuOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,GAAG,EACH,SAAS,EACT,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAGL,SAAS,EAIV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuOverlay.d.ts","sourceRoot":"","sources":["../../src/Menu/MenuOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,GAAG,EACH,SAAS,EACT,aAAa,EACd,M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@@ export declare const Y_PADDING_INSIDE_OVERLAY = 8;
|
|
|
10
10
|
export declare const OVERLAY_OFFSET = 8;
|
|
11
11
|
export declare const OVERLAY_PADDING_FROM_CONTAINER = 12;
|
|
12
12
|
export declare const SELECT_ALL_KEY = "all";
|
|
13
|
+
export declare function getMenuPopoverMaxHeight({ maxItemsUntilScroll, }: {
|
|
14
|
+
maxItemsUntilScroll: number;
|
|
15
|
+
}): number;
|
|
13
16
|
export declare function getUnmergedPopoverStyles(width: MenuOverlayWidth, triggerWidth: number | null): React.CSSProperties;
|
|
14
17
|
export declare function getAllSelectableItems<T>(state: TreeState<T>): Set<Key>;
|
|
15
18
|
export declare function filterSelectedKeys(keys: Set<Key>): Set<Key>;
|
package/Menu/utilities.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/Menu/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,MAAM,GAAG,IAAI,GAC1B,KAAK,CAAC,aAAa,CAmBrB;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE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BAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAkBtE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,YAEhD;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,YAE7D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,WAKzD;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,WAE9D;AAED,wBAAgB,mBAAmB;;;;EAiClC"}
|
package/Modal/index.js
CHANGED
|
@@ -34,12 +34,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
34
34
|
const React = require("react");
|
|
35
35
|
const utilities_css = require("../utilities/css.js");
|
|
36
36
|
const utilities_useScrollbar = require("../utilities/useScrollbar.js");
|
|
37
|
-
const Button = require("../__chunks__/Button-
|
|
37
|
+
const Button = require("../__chunks__/Button-CVaEK94Q.js");
|
|
38
38
|
const Close = require("../__chunks__/Close-BQ2IlPyf.js");
|
|
39
|
-
const HorizontalStack = require("../__chunks__/HorizontalStack-
|
|
40
|
-
const Icon = require("../__chunks__/Icon-
|
|
41
|
-
const Text = require("../__chunks__/Text-
|
|
42
|
-
const VerticalStack = require("../__chunks__/VerticalStack-
|
|
39
|
+
const HorizontalStack = require("../__chunks__/HorizontalStack-BG-lZii5.js");
|
|
40
|
+
const Icon = require("../__chunks__/Icon-BHbBKuGB.js");
|
|
41
|
+
const Text = require("../__chunks__/Text-BwXTDw77.js");
|
|
42
|
+
const VerticalStack = require("../__chunks__/VerticalStack-DIpmkisq.js");
|
|
43
43
|
const useModalOverlay = require("../__chunks__/useModalOverlay-BljLSPJ0.js");
|
|
44
44
|
const Overlay = require("../__chunks__/Overlay-Dmwy9VjC.js");
|
|
45
45
|
const useOverlayTrigger = require("../__chunks__/useOverlayTrigger-Dp7RXQ9B.js");
|
|
@@ -65,20 +65,20 @@ const useModalTrigger = () => {
|
|
|
65
65
|
const modalTriggerContext = useModalTriggerContext();
|
|
66
66
|
return modalTriggerContext.state;
|
|
67
67
|
};
|
|
68
|
-
const underlayBg = "
|
|
69
|
-
const underlayBox = "
|
|
70
|
-
const underlayEdge = "
|
|
71
|
-
const Modal$1 = "
|
|
72
|
-
const header = "
|
|
73
|
-
const stuck = "
|
|
74
|
-
const body = "
|
|
75
|
-
const content = "
|
|
76
|
-
const footer = "
|
|
77
|
-
const closeBtn = "
|
|
78
|
-
const iconAtEnd = "
|
|
79
|
-
const sizeSm = "
|
|
80
|
-
const sizeMd = "
|
|
81
|
-
const sizeLg = "
|
|
68
|
+
const underlayBg = "_underlayBg_jn42y_5";
|
|
69
|
+
const underlayBox = "_underlayBox_jn42y_28";
|
|
70
|
+
const underlayEdge = "_underlayEdge_jn42y_36";
|
|
71
|
+
const Modal$1 = "_Modal_jn42y_42";
|
|
72
|
+
const header = "_header_jn42y_60";
|
|
73
|
+
const stuck = "_stuck_jn42y_66";
|
|
74
|
+
const body = "_body_jn42y_70";
|
|
75
|
+
const content = "_content_jn42y_77";
|
|
76
|
+
const footer = "_footer_jn42y_94";
|
|
77
|
+
const closeBtn = "_closeBtn_jn42y_111";
|
|
78
|
+
const iconAtEnd = "_iconAtEnd_jn42y_125";
|
|
79
|
+
const sizeSm = "_sizeSm_jn42y_131";
|
|
80
|
+
const sizeMd = "_sizeMd_jn42y_135";
|
|
81
|
+
const sizeLg = "_sizeLg_jn42y_139";
|
|
82
82
|
const styles = {
|
|
83
83
|
underlayBg,
|
|
84
84
|
underlayBox,
|
package/Modal/index.mjs
CHANGED
|
@@ -32,17 +32,17 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
import React__default, { createContext, useContext, useMemo, cloneElement, useState, useRef } from "react";
|
|
33
33
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
34
34
|
import { useScrollbar } from "../utilities/useScrollbar.mjs";
|
|
35
|
-
import { B as Button } from "../__chunks__/Button-
|
|
35
|
+
import { B as Button } from "../__chunks__/Button-CVbi-24J.mjs";
|
|
36
36
|
import { C as Close } from "../__chunks__/Close-Cq6Q6MN6.mjs";
|
|
37
|
-
import { H as HorizontalStack } from "../__chunks__/HorizontalStack-
|
|
38
|
-
import { I as Icon } from "../__chunks__/Icon-
|
|
39
|
-
import { T as Text } from "../__chunks__/Text-
|
|
40
|
-
import { V as VerticalStack } from "../__chunks__/VerticalStack-
|
|
41
|
-
import { $ as $8ac8429251c45e4b$export$dbc0f175b25fb0fb } from "../__chunks__/useModalOverlay-
|
|
42
|
-
import { d as $337b884510726a0d$export$c6fdb837b070b4ff,
|
|
43
|
-
import { $ as $628037886ba31236$export$f9d5c8beee7d008d } from "../__chunks__/useOverlayTrigger-
|
|
37
|
+
import { H as HorizontalStack } from "../__chunks__/HorizontalStack-p9m9muAJ.mjs";
|
|
38
|
+
import { I as Icon } from "../__chunks__/Icon-ZRjQkfey.mjs";
|
|
39
|
+
import { T as Text } from "../__chunks__/Text-DYLBjpe-.mjs";
|
|
40
|
+
import { V as VerticalStack } from "../__chunks__/VerticalStack-C466n8W1.mjs";
|
|
41
|
+
import { $ as $8ac8429251c45e4b$export$dbc0f175b25fb0fb } from "../__chunks__/useModalOverlay-CkOujl0G.mjs";
|
|
42
|
+
import { d as $337b884510726a0d$export$c6fdb837b070b4ff, a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../__chunks__/Overlay-BEmOdNIB.mjs";
|
|
43
|
+
import { $ as $628037886ba31236$export$f9d5c8beee7d008d } from "../__chunks__/useOverlayTrigger-BS8c6XEz.mjs";
|
|
44
44
|
import { u as useIntersectionDetection } from "../__chunks__/useIntersectionDetection-BvUmtDgl.mjs";
|
|
45
|
-
import { $ as $40df3f8667284809$export$d55e7ee900f34e93 } from "../__chunks__/useDialog-
|
|
45
|
+
import { $ as $40df3f8667284809$export$d55e7ee900f34e93 } from "../__chunks__/useDialog-h-MPfyGr.mjs";
|
|
46
46
|
const ModalContext = createContext(null);
|
|
47
47
|
const useModalContext = () => {
|
|
48
48
|
const modalContext = useContext(ModalContext);
|
|
@@ -63,20 +63,20 @@ const useModalTrigger = () => {
|
|
|
63
63
|
const modalTriggerContext = useModalTriggerContext();
|
|
64
64
|
return modalTriggerContext.state;
|
|
65
65
|
};
|
|
66
|
-
const underlayBg = "
|
|
67
|
-
const underlayBox = "
|
|
68
|
-
const underlayEdge = "
|
|
69
|
-
const Modal$1 = "
|
|
70
|
-
const header = "
|
|
71
|
-
const stuck = "
|
|
72
|
-
const body = "
|
|
73
|
-
const content = "
|
|
74
|
-
const footer = "
|
|
75
|
-
const closeBtn = "
|
|
76
|
-
const iconAtEnd = "
|
|
77
|
-
const sizeSm = "
|
|
78
|
-
const sizeMd = "
|
|
79
|
-
const sizeLg = "
|
|
66
|
+
const underlayBg = "_underlayBg_jn42y_5";
|
|
67
|
+
const underlayBox = "_underlayBox_jn42y_28";
|
|
68
|
+
const underlayEdge = "_underlayEdge_jn42y_36";
|
|
69
|
+
const Modal$1 = "_Modal_jn42y_42";
|
|
70
|
+
const header = "_header_jn42y_60";
|
|
71
|
+
const stuck = "_stuck_jn42y_66";
|
|
72
|
+
const body = "_body_jn42y_70";
|
|
73
|
+
const content = "_content_jn42y_77";
|
|
74
|
+
const footer = "_footer_jn42y_94";
|
|
75
|
+
const closeBtn = "_closeBtn_jn42y_111";
|
|
76
|
+
const iconAtEnd = "_iconAtEnd_jn42y_125";
|
|
77
|
+
const sizeSm = "_sizeSm_jn42y_131";
|
|
78
|
+
const sizeMd = "_sizeMd_jn42y_135";
|
|
79
|
+
const sizeLg = "_sizeLg_jn42y_139";
|
|
80
80
|
const styles = {
|
|
81
81
|
underlayBg,
|
|
82
82
|
underlayBox,
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Key, useFilter } from "react-aria";
|
|
3
|
+
import { ComboBoxProps } from "react-aria-components";
|
|
4
|
+
import { AsyncListData, useAsyncList, useListData } from "react-stately";
|
|
5
|
+
import { MenuOverlayProps } from "../Menu/MenuOverlay";
|
|
6
|
+
import { PillProps } from "../PillGroup";
|
|
7
|
+
import { MultiSelectDropdownOption, MultiSelectDropdownOptionText } from "./MultiSelectDropdown";
|
|
8
|
+
export type Item = {
|
|
9
|
+
key: Key;
|
|
10
|
+
} & PillProps;
|
|
11
|
+
export type MultiSelectProps<T extends object> = {
|
|
12
|
+
/**
|
|
13
|
+
* The children to render inside the multi-select component. This can either be a direct
|
|
14
|
+
* React node or a function that takes an item from the provided collection and returns a React node.
|
|
15
|
+
*/
|
|
16
|
+
children: React.ReactNode | ((item: T) => React.ReactNode);
|
|
17
|
+
/**
|
|
18
|
+
* A list of keys representing disabled items in the dropdown. These items will be
|
|
19
|
+
* non-selectable in the multi-select input.
|
|
20
|
+
*/
|
|
21
|
+
disabledKeys?: ComboBoxProps<T>["disabledKeys"];
|
|
22
|
+
/**
|
|
23
|
+
* The list of items to display in the dropdown. These items are typically passed down
|
|
24
|
+
* from a ComboBox component and represent the available options for selection.
|
|
25
|
+
*/
|
|
26
|
+
dropdownItems: ComboBoxProps<T>["items"];
|
|
27
|
+
/**
|
|
28
|
+
* The current input value in the multi-select input field. This is used to filter or search
|
|
29
|
+
* for items within the dropdown list.
|
|
30
|
+
*/
|
|
31
|
+
inputValue: ComboBoxProps<T>["inputValue"];
|
|
32
|
+
/**
|
|
33
|
+
* A boolean flag that indicates whether the dropdown is in a loading state.
|
|
34
|
+
* When true, the dropdown will display a loading spinner or indicator.
|
|
35
|
+
*/
|
|
36
|
+
isLoading?: AsyncListData<T>["isLoading"];
|
|
37
|
+
/**
|
|
38
|
+
* The maximum number of items to show before the dropdown becomes scrollable.
|
|
39
|
+
* This value is passed down from the MenuOverlay component and controls the
|
|
40
|
+
* appearance of the dropdown when there are too many items to display.
|
|
41
|
+
*/
|
|
42
|
+
maxItemsUntilScroll?: MenuOverlayProps<T>["maxItemsUntilScroll"];
|
|
43
|
+
/**
|
|
44
|
+
* Handler that is triggered whenever the input value changes. It is typically used to
|
|
45
|
+
* filter or update the available dropdown items based on the input.
|
|
46
|
+
*/
|
|
47
|
+
onInputChange: ComboBoxProps<T>["onInputChange"];
|
|
48
|
+
/**
|
|
49
|
+
* A callback handler that is invoked when the selection changes. It receives the updated
|
|
50
|
+
* list of selected items and is typically used to manage state or trigger other side effects.
|
|
51
|
+
*/
|
|
52
|
+
onSelectionChange: (items: T[]) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Placeholder text that appears when no items are selected in the multi-select input.
|
|
55
|
+
*/
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Function that renders a "pill" or tag-like element for each selected item in the multi-select.
|
|
59
|
+
* This is useful for custom rendering of selected items.
|
|
60
|
+
*/
|
|
61
|
+
renderPill: (item: T) => React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* The currently selected items in the collection. This is a controlled value that reflects
|
|
64
|
+
* the currently selected items.
|
|
65
|
+
*/
|
|
66
|
+
selectedItems: T[];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* An input and dropdown that allows users to select multiple options from a list.
|
|
70
|
+
*
|
|
71
|
+
* @privateRemarks
|
|
72
|
+
* Some inspiration from
|
|
73
|
+
* https://github.com/irsyadadl/justd/blob/2.x/components/ui/multiple-select.tsx
|
|
74
|
+
* Note that there are some limitations to this component until React Aria
|
|
75
|
+
* builds a dedicated component:
|
|
76
|
+
* https://github.com/adobe/react-spectrum/issues/2140
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* _Sync list:_
|
|
80
|
+
* ```tsx
|
|
81
|
+
* const [selectedItems, setSelectedItems] = React.useState<Item[]>([]);
|
|
82
|
+
* const { contains } = useFilter({ sensitivity: "base" });
|
|
83
|
+
* const filter = useCallback(
|
|
84
|
+
* (item: Item, filterText: string) => contains(item.label, filterText),
|
|
85
|
+
* [contains],
|
|
86
|
+
* );
|
|
87
|
+
* const list = useListData<Item>({
|
|
88
|
+
* initialSelectedKeys: [],
|
|
89
|
+
* initialItems: [{ key: 1, label: "Apple" }, { key: 2, label: "Banana" }],
|
|
90
|
+
* filter,
|
|
91
|
+
* });
|
|
92
|
+
*
|
|
93
|
+
* <MultiSelect
|
|
94
|
+
* isLoading={list.isLoading}
|
|
95
|
+
* dropdownItems={list.items}
|
|
96
|
+
* inputValue={list.filterText}
|
|
97
|
+
* onInputChange={list.setFilterText}
|
|
98
|
+
* disabledKeys={selectedItems.map((item) => item.key)}
|
|
99
|
+
* selectedItems={selectedItems}
|
|
100
|
+
* onSelectionChange={setSelectedItems}
|
|
101
|
+
* placeholder="Select a fruit"
|
|
102
|
+
* maxItemsUntilScroll={10}
|
|
103
|
+
* renderPill={(item) => (
|
|
104
|
+
* <MultiSelect.Pill label={item.label} />
|
|
105
|
+
* )}
|
|
106
|
+
* >
|
|
107
|
+
* {(item) => (
|
|
108
|
+
* <MultiSelect.Option textValue={item.label}>
|
|
109
|
+
* <MultiSelect.OptionText>{item.label}</MultiSelect.OptionText>
|
|
110
|
+
* </MultiSelect.Option>
|
|
111
|
+
* )}
|
|
112
|
+
* </MultiSelect>
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export declare function MultiSelect<T extends Item>(props: MultiSelectProps<T>): React.JSX.Element;
|
|
116
|
+
export declare namespace MultiSelect {
|
|
117
|
+
var Pill: (props: PillProps) => React.JSX.Element;
|
|
118
|
+
var Option: typeof MultiSelectDropdownOption;
|
|
119
|
+
var OptionText: typeof MultiSelectDropdownOptionText;
|
|
120
|
+
}
|
|
121
|
+
export { useAsyncList, useFilter, useListData };
|
|
122
|
+
export type { Key };
|
|
123
|
+
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../src/MultiSelect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EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEzC;;;OAGG;IACH,aAAa,EAAE,CAAC,EAAE,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,qBAmJrE;yBAnJe,WAAW;;;;;AAoK3B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AAChD,YAAY,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { MultiSelect } from "./MultiSelect";
|
|
3
|
+
type Story = StoryObj<typeof MultiSelect>;
|
|
4
|
+
declare const meta: Meta<typeof MultiSelect>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const StandardDropdown: Story;
|
|
7
|
+
export declare const AsyncDropdown: Story;
|
|
8
|
+
export declare const WithIcons: Story;
|
|
9
|
+
export declare const DisabledKeys: Story;
|
|
10
|
+
export declare const MaxItemsUntilScroll: Story;
|
|
11
|
+
//# sourceMappingURL=MultiSelect.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.stories.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/MultiSelect.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AASlD,OAAO,EAEL,WAAW,EAIZ,MAAM,eAAe,CAAC;AAyBvB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAYlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,gBAAgB,EAAE,KAoC9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAqC3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA2CvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAwC1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAwCjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.test.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/MultiSelect.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { RefObject } from "react";
|
|
2
|
+
import { ListBoxItemProps } from "react-aria-components";
|
|
3
|
+
import { AsyncListData } from "react-stately";
|
|
4
|
+
import { MenuOverlayProps } from "../Menu/MenuOverlay";
|
|
5
|
+
import { TextProps } from "../Text";
|
|
6
|
+
import { Item } from "./MultiSelect";
|
|
7
|
+
type MultiSelectDropdownProps<T extends object> = {
|
|
8
|
+
children: React.ReactNode | ((item: T) => React.ReactNode);
|
|
9
|
+
isLoading?: AsyncListData<T>["isLoading"];
|
|
10
|
+
maxItemsUntilScroll?: MenuOverlayProps<T>["maxItemsUntilScroll"];
|
|
11
|
+
menuRef: RefObject<HTMLDivElement>;
|
|
12
|
+
triggerRef: RefObject<HTMLDivElement>;
|
|
13
|
+
width: number;
|
|
14
|
+
};
|
|
15
|
+
type MultiSelectDropdownOptionProps = {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
} & ListBoxItemProps;
|
|
18
|
+
export declare function MultiSelectDropdown<T extends Item>(props: MultiSelectDropdownProps<T>): React.JSX.Element;
|
|
19
|
+
export declare function MultiSelectDropdownOption(props: MultiSelectDropdownOptionProps): React.JSX.Element;
|
|
20
|
+
export declare function MultiSelectDropdownOptionText(props: TextProps): React.JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=MultiSelectDropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectDropdown.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/MultiSelectDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAGL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAIrC,KAAK,wBAAwB,CAAC,CAAC,SAAS,MAAM,IAAI;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC1C,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACjE,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACnC,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,8BAA8B,GAAG;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,gBAAgB,CAAC;AAErB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,IAAI,EAChD,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,qBAuDnC;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE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