twenty-ui 2.48.0 → 2.49.0
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 +27 -2
- package/dist/Avatar-C6WxBgjS.cjs +1 -0
- package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
- package/dist/{Button-D5enZ0Qz.js → Button-DIw804CX.js} +1 -1
- package/dist/{Button-Dbi5P05r.cjs → Button-DTm1WDzp.cjs} +1 -1
- package/dist/Dropdown-1OAJvS1f.js +1000 -0
- package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
- package/dist/{ListItem-CjnrSbka.js → ListItem-DizNUBT8.js} +1 -1
- package/dist/{ListItem-CHTR-GLd.cjs → ListItem-DwBb-I1D.cjs} +1 -1
- package/dist/{ProgressBar-BvT1dyFo.js → ProgressBar-B3xACTV2.js} +1 -1
- package/dist/{ProgressBar-DfFz0fFB.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
- package/dist/{Radio-DMI1B7o5.js → Radio-BEAztmPu.js} +1 -1
- package/dist/{Radio-xmHgGHQO.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
- package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
- package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
- package/dist/Shortcut-Bp9iDdQg.js +73 -0
- package/dist/Shortcut-N8TELGPI.cjs +1 -0
- package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
- package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +52 -51
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +2 -2
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
- package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
- package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
- package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
- package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
- package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
- package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
- package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
- package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +13 -13
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
- package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +2 -1
- package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
- package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
- package/dist/components/navigation/index.d.ts +5 -0
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +2 -2
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +22 -22
- package/dist/data-display-BSKGlijb.cjs +1 -0
- package/dist/{data-display-KyZbLLy-.js → data-display-BtXCGOGw.js} +81 -80
- package/dist/{data-display-0QO_WDSs.js → data-display-DtXIhJ4B.js} +45 -44
- package/dist/data-display-XV3ht1rC.cjs +2 -0
- package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
- package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
- package/dist/feedback-Cs-38OH4.cjs +1 -0
- package/dist/{feedback-CM6fatE8.js → feedback-DTyVVcTb.js} +198 -197
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +42 -42
- package/dist/{input-CJDYNwoO.cjs → input-B_rBplmn.cjs} +1 -1
- package/dist/input-BrjD91wv.js +785 -0
- package/dist/input-ChlFcqIS.cjs +1 -0
- package/dist/{input-DRpDiMRi.js → input-D1oyk0tD.js} +2 -2
- package/dist/layout-CthYckvl.cjs +1 -0
- package/dist/layout-DQcjBu08.js +439 -0
- package/dist/{navigation-B1SRvzKK.js → navigation-B6nka3bW.js} +125 -128
- package/dist/navigation-CIVYqPc5.js +132 -0
- package/dist/navigation-CflGBYv-.cjs +1 -0
- package/dist/navigation-DoInK0Sp.cjs +1 -0
- package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
- package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +2 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +3 -3
- package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +1 -1
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +2 -2
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +11 -11
- package/dist/{settings-BjEZiHXE.js → settings-BgVuLpg9.js} +1 -1
- package/dist/{settings-BAYsnlZJ.cjs → settings-CPXhrmbK.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/testing/GroupedCatalog.d.ts +14 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +96 -66
- package/dist/{typography-fOTFr0jS.js → typography-DT2eKLvd.js} +1 -1
- package/dist/{typography-B5QEuPaL.cjs → typography-bKeSMuJd.cjs} +1 -1
- package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
- package/dist/useIsMobile-D1ImfQnE.js +38 -0
- package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
- package/dist/utilities-BKCMZyqZ.js +53 -0
- package/dist/utilities-xZh8D2gd.cjs +1 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +3 -3
- package/package.json +3 -3
- package/dist/Avatar-CQhIEazb.cjs +0 -1
- package/dist/Dropdown-BKjAaZS0.cjs +0 -1
- package/dist/Dropdown-C2hXrjvD.js +0 -820
- package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
- package/dist/Shortcut-BvWUZ3pb.js +0 -72
- package/dist/Shortcut-CgrdLv_L.cjs +0 -1
- package/dist/data-display-CPmTJAWJ.cjs +0 -1
- package/dist/data-display-DjhAHvj1.cjs +0 -2
- package/dist/feedback-ybO4n69s.cjs +0 -1
- package/dist/input-3D2lXywH.cjs +0 -1
- package/dist/input-TM3nUdu6.js +0 -554
- package/dist/layout-BszCDxAO.js +0 -441
- package/dist/layout-VaIq7Sjr.cjs +0 -1
- package/dist/navigation-CYAs2LnR.js +0 -131
- package/dist/navigation-CthkGHJ8.cjs +0 -1
- package/dist/navigation-DrOV5E67.cjs +0 -1
- package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
- package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
- package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
- package/dist/useIsMobile-nrufFzMb.js +0 -37
- package/dist/utilities-BeLfNQ0Q.cjs +0 -1
- package/dist/utilities-CEi9I09B.js +0 -52
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { t as d } from "../isDefined-fMi6eQ4r.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { t as rr } from "../doNotTranslate-BSVT8Xyd.js";
|
|
3
|
+
import { n as er, r as or } from "../theme-B2EaXhye.js";
|
|
4
|
+
import { t as tr } from "../Loader-DtHWQH8w.js";
|
|
5
|
+
import { n as B, t as nr } from "../ResizeHandle-B30OYZxS.js";
|
|
6
|
+
import { useRender as ir } from "@base-ui/react/use-render";
|
|
6
7
|
import { isNumber as H } from "@sniptt/guards";
|
|
7
8
|
import { clsx as $ } from "clsx";
|
|
8
|
-
import { useEffect as p, useId as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { clamp as
|
|
11
|
-
import
|
|
12
|
-
var
|
|
9
|
+
import { useEffect as p, useId as ar, useState as g } from "react";
|
|
10
|
+
import { Fragment as dr, jsx as s, jsxs as S } from "react/jsx-runtime";
|
|
11
|
+
import { clamp as sr } from "@base-ui/utils/clamp";
|
|
12
|
+
import lr, { loader as ur } from "@monaco-editor/react";
|
|
13
|
+
var cr = "baseCodeEditorTheme", fr = ({ shouldAutoHeight: r, editor: e, setContentHeight: o }) => (p(() => {
|
|
13
14
|
if (!r || !d(e)) {
|
|
14
15
|
o(void 0);
|
|
15
16
|
return;
|
|
@@ -25,7 +26,7 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
25
26
|
e,
|
|
26
27
|
r,
|
|
27
28
|
o
|
|
28
|
-
]), null),
|
|
29
|
+
]), null), gr = ({ editor: r, setEditor: e, setMonaco: o, setIsEditorFocused: t }) => (p(() => {
|
|
29
30
|
if (!d(r)) {
|
|
30
31
|
t(!1);
|
|
31
32
|
return;
|
|
@@ -46,14 +47,14 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
46
47
|
e,
|
|
47
48
|
o,
|
|
48
49
|
t
|
|
49
|
-
]), null),
|
|
50
|
+
]), null), pr = ({ configureMonacoLoader: r, setIsMonacoLoaderConfigured: e }) => (p(() => {
|
|
50
51
|
let o = !0;
|
|
51
52
|
return r().then(() => {
|
|
52
53
|
o && e(!0);
|
|
53
54
|
}), () => {
|
|
54
55
|
o = !1;
|
|
55
56
|
};
|
|
56
|
-
}, [r, e]), null),
|
|
57
|
+
}, [r, e]), null), mr = ({ editor: r, monaco: e, setMarkers: o }) => (p(() => {
|
|
57
58
|
if (!d(r) || !d(e) || !d(o)) return;
|
|
58
59
|
const t = () => {
|
|
59
60
|
const a = r.getModel();
|
|
@@ -68,7 +69,7 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
68
69
|
r,
|
|
69
70
|
e,
|
|
70
71
|
o
|
|
71
|
-
]), null), j = (r) =>
|
|
72
|
+
]), null), j = (r) => sr(r, B.min, B.max), vr = ({ height: r, resizable: e, editor: o, setResizedHeight: t }) => (p(() => {
|
|
72
73
|
if (!e || !d(o)) return;
|
|
73
74
|
const i = o.getContainerDomNode().parentElement?.getBoundingClientRect().height;
|
|
74
75
|
!d(i) || i <= 0 || t({
|
|
@@ -90,7 +91,7 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
90
91
|
return d(a) ? `#${l}${u}${f}${Math.round(parseFloat(a) * 255).toString(16).padStart(2, "0")}` : `#${l}${u}${f}`;
|
|
91
92
|
}
|
|
92
93
|
return r;
|
|
93
|
-
},
|
|
94
|
+
}, kr = ({ theme: r, colorScheme: e }) => ({
|
|
94
95
|
base: e === "dark" ? "vs-dark" : "vs",
|
|
95
96
|
inherit: !0,
|
|
96
97
|
rules: [
|
|
@@ -175,11 +176,11 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
175
176
|
"editorBracketMatch.border": n(r.border.color.medium)
|
|
176
177
|
}
|
|
177
178
|
}), W = ({ monaco: r, theme: e, colorScheme: o }) => {
|
|
178
|
-
r.editor.defineTheme(
|
|
179
|
+
r.editor.defineTheme(cr, kr({
|
|
179
180
|
theme: e,
|
|
180
181
|
colorScheme: o
|
|
181
182
|
}));
|
|
182
|
-
},
|
|
183
|
+
}, br = ({ monaco: r, theme: e, colorScheme: o, editorTheme: t }) => (p(() => {
|
|
183
184
|
d(r) && (W({
|
|
184
185
|
monaco: r,
|
|
185
186
|
theme: e,
|
|
@@ -190,13 +191,13 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
190
191
|
t,
|
|
191
192
|
r,
|
|
192
193
|
e
|
|
193
|
-
]), null),
|
|
194
|
-
const [t, i] = g(), [a, l] = g(), u = o && !e, f = t?.sourceHeight === r, C = e && (f || H(r)), m =
|
|
194
|
+
]), null), Cr = ({ height: r, resizableHeight: e, contentHeight: o, shouldUseResizableHeight: t, shouldAutoHeight: i }) => t ? e : i ? o ?? r : r, hr = ({ height: r, resizedHeight: e }) => e?.sourceHeight === r ? e.value : H(r) ? j(r) : 450, Hr = ({ height: r, resizable: e, autoHeight: o }) => {
|
|
195
|
+
const [t, i] = g(), [a, l] = g(), u = o && !e, f = t?.sourceHeight === r, C = e && (f || H(r)), m = hr({
|
|
195
196
|
height: r,
|
|
196
197
|
resizedHeight: t
|
|
197
198
|
});
|
|
198
199
|
return {
|
|
199
|
-
currentHeight:
|
|
200
|
+
currentHeight: Cr({
|
|
200
201
|
height: r,
|
|
201
202
|
resizableHeight: m,
|
|
202
203
|
contentHeight: a,
|
|
@@ -214,14 +215,14 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
214
215
|
setContentHeight: l,
|
|
215
216
|
shouldAutoHeight: u
|
|
216
217
|
};
|
|
217
|
-
},
|
|
218
|
-
editorWrapper:
|
|
219
|
-
editorLoader:
|
|
220
|
-
container:
|
|
221
|
-
}, F,
|
|
222
|
-
|
|
223
|
-
}), F),
|
|
224
|
-
const k =
|
|
218
|
+
}, Er = "_editorWrapper_zilk9_24", _r = "_editorLoader_zilk9_1", yr = "_container_zilk9_20", M = {
|
|
219
|
+
editorWrapper: Er,
|
|
220
|
+
editorLoader: _r,
|
|
221
|
+
container: yr
|
|
222
|
+
}, F, Mr = () => (F ??= import("monaco-editor").then((r) => {
|
|
223
|
+
ur.config({ monaco: r });
|
|
224
|
+
}), F), Ar = ({ onMount: r, beforeMount: e, setMarkers: o, height: t = 450, width: i = "100%", theme: a, loading: l = /* @__PURE__ */ s(tr, {}), variant: u = "default", transparentBackground: f, isLoading: C = !1, options: m, resizable: v = !1, resizeLabel: w = rr("Resize editor"), contentPadding: A = "default", autoHeight: I = !1, containerProps: E, ref: O, ...K }) => {
|
|
225
|
+
const k = or(), L = er(), [T, N] = g(), [b, R] = g(), [P, q] = g(!1), [G, U] = g(!1), x = ar(), _ = a ?? m?.theme ?? "baseCodeEditorTheme", { currentHeight: h, resizableHeight: V, setResizableHeight: Z, setResizedHeight: J, setContentHeight: Q, shouldAutoHeight: X } = Hr({
|
|
225
226
|
height: t,
|
|
226
227
|
resizable: v,
|
|
227
228
|
autoHeight: I
|
|
@@ -235,34 +236,34 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
235
236
|
className: $(M.container, E?.className),
|
|
236
237
|
onKeyDown: Y,
|
|
237
238
|
children: [
|
|
238
|
-
/* @__PURE__ */ s(
|
|
239
|
-
configureMonacoLoader:
|
|
239
|
+
/* @__PURE__ */ s(pr, {
|
|
240
|
+
configureMonacoLoader: Mr,
|
|
240
241
|
setIsMonacoLoaderConfigured: q
|
|
241
242
|
}),
|
|
242
|
-
/* @__PURE__ */ s(
|
|
243
|
+
/* @__PURE__ */ s(vr, {
|
|
243
244
|
height: t,
|
|
244
245
|
resizable: v,
|
|
245
246
|
editor: b,
|
|
246
247
|
setResizedHeight: J
|
|
247
248
|
}),
|
|
248
|
-
/* @__PURE__ */ s(
|
|
249
|
+
/* @__PURE__ */ s(fr, {
|
|
249
250
|
shouldAutoHeight: X,
|
|
250
251
|
editor: b,
|
|
251
252
|
setContentHeight: Q
|
|
252
253
|
}),
|
|
253
|
-
/* @__PURE__ */ s(
|
|
254
|
+
/* @__PURE__ */ s(gr, {
|
|
254
255
|
editor: b,
|
|
255
|
-
setEditor:
|
|
256
|
-
setMonaco:
|
|
256
|
+
setEditor: R,
|
|
257
|
+
setMonaco: N,
|
|
257
258
|
setIsEditorFocused: U
|
|
258
259
|
}),
|
|
259
|
-
/* @__PURE__ */ s(
|
|
260
|
+
/* @__PURE__ */ s(mr, {
|
|
260
261
|
editor: b,
|
|
261
|
-
monaco:
|
|
262
|
+
monaco: T,
|
|
262
263
|
setMarkers: o
|
|
263
264
|
}),
|
|
264
|
-
/* @__PURE__ */ s(
|
|
265
|
-
monaco:
|
|
265
|
+
/* @__PURE__ */ s(br, {
|
|
266
|
+
monaco: T,
|
|
266
267
|
theme: k,
|
|
267
268
|
colorScheme: L,
|
|
268
269
|
editorTheme: _
|
|
@@ -276,11 +277,11 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
276
277
|
},
|
|
277
278
|
children: l
|
|
278
279
|
}) : /* @__PURE__ */ s("div", {
|
|
279
|
-
id:
|
|
280
|
+
id: x,
|
|
280
281
|
className: M.editorWrapper,
|
|
281
282
|
"data-variant": u,
|
|
282
283
|
"data-transparent-background": f || void 0,
|
|
283
|
-
children: /* @__PURE__ */ s(
|
|
284
|
+
children: /* @__PURE__ */ s(lr, {
|
|
284
285
|
...K,
|
|
285
286
|
height: h,
|
|
286
287
|
width: i,
|
|
@@ -293,8 +294,8 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
293
294
|
colorScheme: L
|
|
294
295
|
}), e?.(c);
|
|
295
296
|
},
|
|
296
|
-
onMount: (c,
|
|
297
|
-
|
|
297
|
+
onMount: (c, z) => {
|
|
298
|
+
N(z), R(c), r?.(c, z);
|
|
298
299
|
},
|
|
299
300
|
options: {
|
|
300
301
|
formatOnPaste: !0,
|
|
@@ -318,24 +319,24 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
318
319
|
}
|
|
319
320
|
})
|
|
320
321
|
}),
|
|
321
|
-
v && !C && d(b) && /* @__PURE__ */ s(
|
|
322
|
+
v && !C && d(b) && /* @__PURE__ */ s(nr, {
|
|
322
323
|
"aria-label": w,
|
|
323
|
-
"aria-controls":
|
|
324
|
+
"aria-controls": x,
|
|
324
325
|
value: V,
|
|
325
326
|
onValueChange: Z
|
|
326
327
|
})
|
|
327
328
|
]
|
|
328
329
|
});
|
|
329
|
-
},
|
|
330
|
-
editorHeader:
|
|
331
|
-
elementContainer:
|
|
332
|
-
},
|
|
330
|
+
}, Dr = "_editorHeader_19qlo_1", Sr = "_elementContainer_19qlo_15", D = {
|
|
331
|
+
editorHeader: Dr,
|
|
332
|
+
elementContainer: Sr
|
|
333
|
+
}, Ir = ({ title: r, startElement: e, endElement: o, className: t, render: i, ref: a, ...l }) => ir({
|
|
333
334
|
render: i,
|
|
334
335
|
ref: a,
|
|
335
336
|
props: {
|
|
336
337
|
...l,
|
|
337
338
|
className: $(D.editorHeader, t),
|
|
338
|
-
children: /* @__PURE__ */ S(
|
|
339
|
+
children: /* @__PURE__ */ S(dr, { children: [/* @__PURE__ */ S("div", {
|
|
339
340
|
className: D.elementContainer,
|
|
340
341
|
children: [e, r]
|
|
341
342
|
}), /* @__PURE__ */ s("div", {
|
|
@@ -345,6 +346,6 @@ var ur = "baseCodeEditorTheme", cr = ({ shouldAutoHeight: r, editor: e, setConte
|
|
|
345
346
|
}
|
|
346
347
|
});
|
|
347
348
|
export {
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
Ar as CodeEditor,
|
|
350
|
+
Ir as CodeEditorHeader
|
|
350
351
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../data-display-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../data-display-XV3ht1rC.cjs"),o=require("../TintedIconTile-DO1XJXCQ.cjs");exports.AvatarGroup=e.AvatarGroup;exports.CommandBlock=e.CommandBlock;exports.JsonTree=e.JsonTree;exports.MetricRow=e.MetricRow;exports.StackIcon=e.StackIcon;exports.TintedIconTile=o.TintedIconTile;exports.getIconTileColorShades=o.getIconTileColorShades;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, i as r, n as t, r as e, t as s } from "../data-display-
|
|
2
|
-
import { n as i, t as c } from "../TintedIconTile-
|
|
1
|
+
import { a, i as r, n as t, r as e, t as s } from "../data-display-BtXCGOGw.js";
|
|
2
|
+
import { n as i, t as c } from "../TintedIconTile-B1XDtGrF.js";
|
|
3
3
|
export {
|
|
4
4
|
a as AvatarGroup,
|
|
5
5
|
r as CommandBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../feedback-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../feedback-Cs-38OH4.cjs");exports.Callout=e.Callout;exports.InlineBanner=e.InlineBanner;exports.Toast=e.Toast;exports.ToastProvider=e.ToastProvider;exports.Toaster=e.Toaster;exports.useToast=e.useToast;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const CountrySelect: (({ countries, value, defaultValue, onValueChange, disabled, noCountryLabel, ...props }: import('..').CountrySelectProps) => import("react").JSX.Element) & {
|
|
2
|
+
Root: ({ countries, value: controlledValue, defaultValue, onValueChange, disabled, noCountryLabel, children, }: import('..').CountrySelectRootProps) => import("react").JSX.Element;
|
|
3
|
+
Trigger: ({ label, wrapperProps, children, className, style, render, onClick, onMouseDown, onPointerDown, onKeyDown, onKeyUp, openOnHover, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: import('..').CountrySelectTriggerProps) => import("react").JSX.Element;
|
|
4
|
+
Options: (props: import('..').CountrySelectOptionsProps) => import("react").JSX.Element;
|
|
5
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CountrySelectProps } from '../types/CountrySelectProps';
|
|
2
|
+
type CountrySelectPartsExampleProps = Pick<CountrySelectProps, 'onValueChange' | 'onOpenChange'> & {
|
|
3
|
+
compound?: boolean;
|
|
4
|
+
controlled?: boolean;
|
|
5
|
+
cancelSelection?: boolean;
|
|
6
|
+
closeOnSelect?: boolean;
|
|
7
|
+
keepMounted?: boolean;
|
|
8
|
+
openOnHover?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const CountrySelectPartsExample: ({ compound, controlled, cancelSelection, closeOnSelect, keepMounted, openOnHover, onValueChange, onOpenChange, }: CountrySelectPartsExampleProps) => import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CountrySelectRootProps } from '../types/CountrySelectRootProps';
|
|
2
|
+
import { PreparedCountryChoice } from './PreparedCountryChoice';
|
|
3
|
+
export type CountrySelectContextValue = {
|
|
4
|
+
countries: readonly PreparedCountryChoice[];
|
|
5
|
+
selectedCountry: PreparedCountryChoice | undefined;
|
|
6
|
+
value: string | null;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
noCountryLabel: string;
|
|
9
|
+
selectionGroupId: string;
|
|
10
|
+
changeValue: NonNullable<CountrySelectRootProps['onValueChange']>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CountrySelectProps } from '../types/CountrySelectProps';
|
|
2
|
+
type CountrySelectDropdownProps = Omit<CountrySelectProps, 'countries' | 'value' | 'defaultValue' | 'onValueChange' | 'disabled' | 'noCountryLabel'>;
|
|
3
|
+
export declare const CountrySelectDropdown: ({ open: controlledOpen, defaultOpen, onOpenChange, onEscapeKeyDown, onInteractOutside, defaultPage, popupProps, optionsProps, searchLabel, noResultsLabel, searchProps, closeOnSelect, ...triggerProps }: CountrySelectDropdownProps) => import("react").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
countries: readonly CountryChoice[];
|
|
4
|
-
value: string;
|
|
5
|
-
onValueChange: (value: string) => void;
|
|
6
|
-
searchLabel: string;
|
|
7
|
-
noCountryLabel: string;
|
|
8
|
-
noResultsLabel: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const CountrySelectOptions: ({ countries, value, onValueChange, searchLabel, noCountryLabel, noResultsLabel, }: CountrySelectOptionsProps) => import("react").JSX.Element;
|
|
11
|
-
export {};
|
|
1
|
+
import { CountrySelectOptionsProps } from '../types/CountrySelectOptionsProps';
|
|
2
|
+
export declare const CountrySelectOptions: (props: CountrySelectOptionsProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CountrySelectTriggerProps } from '../types/CountrySelectTriggerProps';
|
|
2
|
+
export declare const CountrySelectTrigger: ({ label, wrapperProps, children, className, style, render, onClick, onMouseDown, onPointerDown, onKeyDown, onKeyUp, openOnHover, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: CountrySelectTriggerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NO_COUNTRY_SELECTION_VALUE = "no-country";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCountrySelectionValue: (value: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCountrySelectContextOrThrow: () => import('./CountrySelectContextValue').CountrySelectContextValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { DropdownSearchProps } from '../../../navigation/Dropdown/types/DropdownSearchProps';
|
|
3
|
+
import { DropdownSelectionGroupProps } from '../../../navigation/Dropdown/types/DropdownSelectionGroupProps';
|
|
4
|
+
import { CountrySelectOptionsState } from './CountrySelectOptionsState';
|
|
5
|
+
export type CountrySelectOptionsProps = Omit<DropdownSelectionGroupProps, 'id' | 'children' | 'multiple' | 'value' | 'defaultValue' | 'onValueChange' | 'render'> & {
|
|
6
|
+
render?: useRender.ComponentProps<'div', CountrySelectOptionsState>['render'];
|
|
7
|
+
searchLabel?: string;
|
|
8
|
+
noResultsLabel?: string;
|
|
9
|
+
searchProps?: Omit<DropdownSearchProps, 'value' | 'defaultValue' | 'onValueChange'>;
|
|
10
|
+
};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { DropdownContentProps } from '../../../navigation/Dropdown/types/DropdownContentProps';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
searchLabel?: string;
|
|
10
|
-
noCountryLabel?: string;
|
|
11
|
-
noResultsLabel?: string;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
onOpenChange?: (open: boolean) => void;
|
|
14
|
-
popupProps?: Omit<DropdownContentProps, 'children' | 'aria-label' | 'aria-labelledby' | 'keepMounted'>;
|
|
2
|
+
import { DropdownRootProps } from '../../../navigation/Dropdown/types/DropdownRootProps';
|
|
3
|
+
import { CountrySelectRootProps } from './CountrySelectRootProps';
|
|
4
|
+
import { CountrySelectTriggerProps } from './CountrySelectTriggerProps';
|
|
5
|
+
import { CountrySelectOptionsProps } from './CountrySelectOptionsProps';
|
|
6
|
+
export type CountrySelectProps = Omit<CountrySelectRootProps, 'children'> & CountrySelectTriggerProps & Omit<DropdownRootProps, 'children' | 'type' | 'multiple'> & Pick<CountrySelectOptionsProps, 'searchLabel' | 'noResultsLabel' | 'searchProps' | 'closeOnSelect'> & {
|
|
7
|
+
popupProps?: Omit<DropdownContentProps, 'children'>;
|
|
8
|
+
optionsProps?: Omit<CountrySelectOptionsProps, 'searchLabel' | 'noResultsLabel' | 'searchProps' | 'closeOnSelect'>;
|
|
15
9
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../../../navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails';
|
|
3
|
+
import { CountryChoice } from './CountryChoice';
|
|
4
|
+
export type CountrySelectRootProps = {
|
|
5
|
+
countries: readonly CountryChoice[];
|
|
6
|
+
value?: string | null;
|
|
7
|
+
defaultValue?: string | null;
|
|
8
|
+
onValueChange?: (value: string | null, eventDetails: DropdownSelectionGroupChangeEventDetails) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
noCountryLabel?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { DropdownTriggerProps } from '../../../navigation/Dropdown/types/DropdownTriggerProps';
|
|
3
|
+
export type CountrySelectTriggerProps = Omit<DropdownTriggerProps, 'value' | 'defaultValue' | 'onChange' | 'disabled'> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
wrapperProps?: Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
6
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const CurrencyPicker: {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const CurrencyPicker: (({ currencies, value, defaultValue, onValueChange, closeOnSelect, disabled, selectedFirst, getOptionLabel, getSearchText, renderValue, open, defaultOpen, onOpenChange, onEscapeKeyDown, onInteractOutside, triggerProps, contentProps, optionsProps, ...props }: import('..').CurrencyPickerProps) => import("react").JSX.Element) & {
|
|
2
|
+
Root: ({ currencies, value: controlledValue, defaultValue, onValueChange, closeOnSelect, disabled, selectedFirst, getOptionLabel, getSearchText, renderValue, children, }: import('..').CurrencyPickerRootProps) => import("react").JSX.Element;
|
|
3
|
+
Trigger: ({ children, placeholder, disabled, className, ...props }: import('..').CurrencyPickerTriggerProps) => import("react").JSX.Element;
|
|
4
|
+
Options: ({ disabled, searchable, searchLabel, listLabel, emptyLabel, searchProps, className, render, ref, ...props }: import('..').CurrencyPickerOptionsProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
4
5
|
};
|
package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CurrencyPickerExample } from './CurrencyPickerExample';
|
|
3
|
+
type CurrencyPickerChangingDefaultExampleProps = Pick<ComponentProps<typeof CurrencyPickerExample>, 'onValueChange' | 'composition'>;
|
|
4
|
+
export declare const CurrencyPickerChangingDefaultExample: ({ onValueChange, composition, }: CurrencyPickerChangingDefaultExampleProps) => import("react").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CurrencyPickerExample } from './CurrencyPickerExample';
|
|
3
|
+
type CurrencyPickerControlledExampleProps = Pick<ComponentProps<typeof CurrencyPickerExample>, 'onValueChange' | 'composition'>;
|
|
4
|
+
export declare const CurrencyPickerControlledExample: ({ onValueChange, composition, }: CurrencyPickerControlledExampleProps) => import("react").JSX.Element;
|
|
5
|
+
export {};
|
package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CurrencyPickerExample } from './CurrencyPickerExample';
|
|
3
|
+
type CurrencyPickerControlledSearchExampleProps = Pick<ComponentProps<typeof CurrencyPickerExample>, 'onValueChange' | 'composition'>;
|
|
4
|
+
export declare const CurrencyPickerControlledSearchExample: ({ onValueChange, composition, }: CurrencyPickerControlledSearchExampleProps) => import("react").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { CurrencyPicker } from '../CurrencyPicker';
|
|
3
|
-
type CurrencyPickerExampleProps = Pick<ComponentProps<typeof CurrencyPicker
|
|
4
|
-
|
|
5
|
-
disabled?: boolean;
|
|
3
|
+
type CurrencyPickerExampleProps = Pick<ComponentProps<typeof CurrencyPicker>, 'currencies' | 'value' | 'defaultValue' | 'onValueChange' | 'disabled' | 'closeOnSelect' | 'selectedFirst' | 'getOptionLabel' | 'getSearchText' | 'renderValue'> & Pick<ComponentProps<typeof CurrencyPicker.Options>, 'searchLabel' | 'emptyLabel' | 'searchable' | 'searchProps' | 'dir'> & {
|
|
4
|
+
composition?: 'shorthand' | 'compound';
|
|
6
5
|
optionsDisabled?: boolean;
|
|
7
6
|
defaultOpen?: boolean;
|
|
8
7
|
triggerLabel?: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const CurrencyPickerExample: ({ currencies, defaultValue, disabled, optionsDisabled, defaultOpen, triggerLabel, searchLabel, emptyLabel, onValueChange, dir, }: Partial<CurrencyPickerExampleProps>) => import("react").JSX.Element;
|
|
9
|
+
export declare const CurrencyPickerExample: ({ currencies, value, defaultValue, disabled, optionsDisabled, defaultOpen, triggerLabel, composition, selectedFirst, closeOnSelect, getOptionLabel, getSearchText, renderValue, searchLabel, searchProps, emptyLabel, searchable, onValueChange, dir, }: Partial<CurrencyPickerExampleProps>) => import("react").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CurrencyPickerListLabelExample: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CurrencyPickerRootStateExample: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CurrencyPickerRootProps } from '../types/CurrencyPickerRootProps';
|
|
3
|
+
import { CurrencyPickerState } from '../types/CurrencyPickerState';
|
|
4
|
+
import { PreparedCurrencyPickerOption } from './PreparedCurrencyPickerOption';
|
|
5
|
+
export declare const CurrencyPickerContext: import('react').Context<{
|
|
6
|
+
state: CurrencyPickerState;
|
|
7
|
+
groupId: string;
|
|
8
|
+
options: PreparedCurrencyPickerOption[];
|
|
9
|
+
selectionProps: Pick<CurrencyPickerRootProps, "value" | "defaultValue" | "onValueChange" | "closeOnSelect">;
|
|
10
|
+
renderValue?: (state: CurrencyPickerState) => ReactNode;
|
|
11
|
+
} | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CurrencyPickerOptionsProps } from '../types/CurrencyPickerOptionsProps';
|
|
2
|
-
export declare const CurrencyPickerOptions: ({
|
|
2
|
+
export declare const CurrencyPickerOptions: ({ disabled, searchable, searchLabel, listLabel, emptyLabel, searchProps, className, render, ref, ...props }: CurrencyPickerOptionsProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CurrencyPickerRootProps } from '../types/CurrencyPickerRootProps';
|
|
2
|
+
export declare const CurrencyPickerRoot: ({ currencies, value: controlledValue, defaultValue, onValueChange, closeOnSelect, disabled, selectedFirst, getOptionLabel, getSearchText, renderValue, children, }: CurrencyPickerRootProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CurrencyPickerProps } from '../types/CurrencyPickerProps';
|
|
2
|
+
export declare const CurrencyPickerShorthand: ({ currencies, value, defaultValue, onValueChange, closeOnSelect, disabled, selectedFirst, getOptionLabel, getSearchText, renderValue, open, defaultOpen, onOpenChange, onEscapeKeyDown, onInteractOutside, triggerProps, contentProps, optionsProps, ...props }: CurrencyPickerProps) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CurrencyPickerTriggerProps } from '../types/CurrencyPickerTriggerProps';
|
|
2
|
-
export declare const CurrencyPickerTrigger: ({
|
|
2
|
+
export declare const CurrencyPickerTrigger: ({ children, placeholder, disabled, className, ...props }: CurrencyPickerTriggerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const useCurrencyPickerContextOrThrow: () => {
|
|
2
|
+
state: import('../..').CurrencyPickerState;
|
|
3
|
+
groupId: string;
|
|
4
|
+
options: import('./PreparedCurrencyPickerOption').PreparedCurrencyPickerOption[];
|
|
5
|
+
selectionProps: Pick<import('../..').CurrencyPickerRootProps, "value" | "defaultValue" | "onValueChange" | "closeOnSelect">;
|
|
6
|
+
renderValue?: (state: import('../..').CurrencyPickerState) => import('react').ReactNode;
|
|
7
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DropdownSearchProps } from '../../../navigation/Dropdown/types/DropdownSearchProps';
|
|
3
4
|
export type CurrencyPickerOptionsProps = Omit<useRender.ComponentProps<'div'>, 'children'> & {
|
|
4
|
-
currencies: readonly CurrencyPickerOption[];
|
|
5
|
-
value?: string;
|
|
6
|
-
onValueChange: (code: string) => void;
|
|
7
5
|
disabled?: boolean;
|
|
6
|
+
searchable?: boolean;
|
|
8
7
|
searchLabel?: string;
|
|
9
|
-
|
|
8
|
+
listLabel?: string;
|
|
9
|
+
emptyLabel?: ReactNode;
|
|
10
|
+
searchProps?: DropdownSearchProps;
|
|
10
11
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DropdownContentProps } from '../../../navigation/Dropdown/types/DropdownContentProps';
|
|
2
|
+
import { DropdownRootProps } from '../../../navigation/Dropdown/types/DropdownRootProps';
|
|
3
|
+
import { CurrencyPickerOptionsProps } from './CurrencyPickerOptionsProps';
|
|
4
|
+
import { CurrencyPickerRootProps } from './CurrencyPickerRootProps';
|
|
5
|
+
import { CurrencyPickerTriggerProps } from './CurrencyPickerTriggerProps';
|
|
6
|
+
export type CurrencyPickerProps = Omit<CurrencyPickerRootProps, 'children'> & CurrencyPickerTriggerProps & Pick<DropdownRootProps, 'open' | 'defaultOpen' | 'onOpenChange' | 'onEscapeKeyDown' | 'onInteractOutside'> & {
|
|
7
|
+
triggerProps?: CurrencyPickerTriggerProps;
|
|
8
|
+
contentProps?: Omit<DropdownContentProps, 'children'>;
|
|
9
|
+
optionsProps?: CurrencyPickerOptionsProps;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CurrencyPickerChangeEventDetails } from './CurrencyPickerChangeEventDetails';
|
|
3
|
+
import { CurrencyPickerOption } from './CurrencyPickerOption';
|
|
4
|
+
import { CurrencyPickerState } from './CurrencyPickerState';
|
|
5
|
+
export type CurrencyPickerRootProps = {
|
|
6
|
+
currencies: readonly CurrencyPickerOption[];
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
onValueChange?: (value: string | null, eventDetails: CurrencyPickerChangeEventDetails) => void;
|
|
10
|
+
closeOnSelect?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
selectedFirst?: boolean;
|
|
13
|
+
getOptionLabel?: (currency: CurrencyPickerOption) => ReactNode;
|
|
14
|
+
getSearchText?: (currency: CurrencyPickerOption) => string;
|
|
15
|
+
renderValue?: (state: CurrencyPickerState) => ReactNode;
|
|
16
|
+
children: ReactNode | ((state: CurrencyPickerState) => ReactNode);
|
|
17
|
+
};
|