@transferwise/components 46.130.2 → 46.130.3
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/build/dateInput/DateInput.js +12 -5
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +11 -4
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +16 -8
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +14 -6
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/index.js +12 -7
- package/build/index.js.map +1 -1
- package/build/index.mjs +9 -3
- package/build/index.mjs.map +1 -1
- package/build/inputs/{_BottomSheet.js → SelectInput/BottomSheet/SelectInputBottomSheet.js} +7 -7
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +1 -0
- package/build/inputs/{_BottomSheet.mjs → SelectInput/BottomSheet/SelectInputBottomSheet.mjs} +7 -7
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +1 -0
- package/build/inputs/{_ButtonInput.js → SelectInput/ButtonInput/SelectInputButtonInput.js} +5 -5
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +1 -0
- package/build/inputs/{_ButtonInput.mjs → SelectInput/ButtonInput/SelectInputButtonInput.mjs} +5 -5
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +1 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +26 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +1 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +24 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +1 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +59 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +1 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +56 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +1 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +50 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +1 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +48 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +1 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +47 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +1 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +45 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +1 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.js +42 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.js.map +1 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs +40 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +1 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +40 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +38 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +48 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +1 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +46 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +1 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.js +300 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +1 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +298 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +1 -0
- package/build/inputs/{_Popover.js → SelectInput/Popover/SelectInputPopover.js} +7 -7
- package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +1 -0
- package/build/inputs/{_Popover.mjs → SelectInput/Popover/SelectInputPopover.mjs} +7 -7
- package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.contexts.js +29 -0
- package/build/inputs/SelectInput/SelectInput.contexts.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.contexts.mjs +24 -0
- package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.js +222 -0
- package/build/inputs/SelectInput/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.mjs +216 -0
- package/build/inputs/SelectInput/SelectInput.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.utils.js +164 -0
- package/build/inputs/SelectInput/SelectInput.utils.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.utils.mjs +154 -0
- package/build/inputs/SelectInput/SelectInput.utils.mjs.map +1 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +42 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +1 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +36 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +1 -0
- package/build/main.css +90 -90
- package/build/moneyInput/MoneyInput.js +9 -2
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +8 -1
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +10 -3
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +9 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
- package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
- package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
- package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
- package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +33 -0
- package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
- package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
- package/build/styles/main.css +90 -90
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/{_BottomSheet.d.ts → SelectInput/BottomSheet/SelectInputBottomSheet.d.ts} +3 -3
- package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +5 -0
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +7 -0
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +16 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +2 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +9 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +11 -0
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/index.d.ts +4 -0
- package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +11 -0
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Option/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Option/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +13 -0
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +9 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +21 -0
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/index.d.ts +4 -0
- package/build/types/inputs/SelectInput/Options/index.d.ts.map +1 -0
- package/build/types/inputs/{_Popover.d.ts → SelectInput/Popover/SelectInputPopover.d.ts} +3 -3
- package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Popover/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Popover/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +33 -0
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.d.ts +10 -0
- package/build/types/inputs/SelectInput/SelectInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +1 -0
- package/build/types/inputs/{SelectInput.d.ts → SelectInput/SelectInput.types.d.ts} +12 -38
- package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +60 -0
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +12 -0
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/components.d.ts +10 -0
- package/build/types/inputs/SelectInput/components.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/index.d.ts +10 -0
- package/build/types/inputs/SelectInput/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
- package/src/inputs/{_BottomSheet.tsx → SelectInput/BottomSheet/SelectInputBottomSheet.tsx} +7 -7
- package/src/inputs/SelectInput/BottomSheet/index.ts +2 -0
- package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
- package/src/inputs/{_ButtonInput.tsx → SelectInput/ButtonInput/SelectInputButtonInput.tsx} +5 -5
- package/src/inputs/SelectInput/ButtonInput/index.ts +2 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +39 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +27 -0
- package/src/inputs/SelectInput/ClearButton/index.ts +2 -0
- package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +74 -0
- package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +5 -0
- package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +61 -0
- package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +2 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +17 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +48 -0
- package/src/inputs/SelectInput/ItemView/index.ts +3 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.css +33 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.less +32 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.tsx +57 -0
- package/src/inputs/SelectInput/Option/index.ts +2 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +38 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +72 -0
- package/src/inputs/SelectInput/OptionContent/index.ts +2 -0
- package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +59 -0
- package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +2 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.less +77 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +411 -0
- package/src/inputs/SelectInput/Options/index.ts +3 -0
- package/src/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
- package/src/inputs/{_Popover.tsx → SelectInput/Popover/SelectInputPopover.tsx} +7 -7
- package/src/inputs/SelectInput/Popover/index.ts +2 -0
- package/src/inputs/SelectInput/SelectInput.contexts.tsx +40 -0
- package/src/inputs/SelectInput/SelectInput.less +22 -0
- package/src/inputs/{SelectInput.test.tsx → SelectInput/SelectInput.test.tsx} +9 -11
- package/src/inputs/SelectInput/SelectInput.tsx +257 -0
- package/src/inputs/SelectInput/SelectInput.types.ts +113 -0
- package/src/inputs/SelectInput/SelectInput.utils.ts +205 -0
- package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +36 -0
- package/src/inputs/SelectInput/TriggerButton/index.ts +5 -0
- package/src/inputs/{SelectInput.docs.mdx → SelectInput/_stories/SelectInput.docs.mdx} +0 -1
- package/src/inputs/{SelectInput.story.tsx → SelectInput/_stories/SelectInput.story.tsx} +11 -8
- package/src/inputs/{SelectInput.test.story.tsx → SelectInput/_stories/SelectInput.test.story.tsx} +6 -10
- package/src/inputs/SelectInput/components.ts +10 -0
- package/src/inputs/SelectInput/index.ts +12 -0
- package/src/main.css +90 -90
- package/src/main.less +1 -1
- package/build/inputs/SelectInput.js +0 -890
- package/build/inputs/SelectInput.js.map +0 -1
- package/build/inputs/SelectInput.messages.js.map +0 -1
- package/build/inputs/SelectInput.messages.mjs.map +0 -1
- package/build/inputs/SelectInput.mjs +0 -881
- package/build/inputs/SelectInput.mjs.map +0 -1
- package/build/inputs/_BottomSheet.js.map +0 -1
- package/build/inputs/_BottomSheet.mjs.map +0 -1
- package/build/inputs/_ButtonInput.js.map +0 -1
- package/build/inputs/_ButtonInput.mjs.map +0 -1
- package/build/inputs/_Popover.js.map +0 -1
- package/build/inputs/_Popover.mjs.map +0 -1
- package/build/types/inputs/SelectInput.d.ts.map +0 -1
- package/build/types/inputs/SelectInput.messages.d.ts.map +0 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +0 -1
- package/build/types/inputs/_ButtonInput.d.ts +0 -5
- package/build/types/inputs/_ButtonInput.d.ts.map +0 -1
- package/build/types/inputs/_Popover.d.ts.map +0 -1
- package/src/inputs/SelectInput.less +0 -219
- package/src/inputs/SelectInput.tsx +0 -1269
- package/build/inputs/{SelectInput.messages.js → SelectInput/SelectInput.messages.js} +0 -0
- package/build/inputs/{SelectInput.messages.mjs → SelectInput/SelectInput.messages.mjs} +0 -0
- package/build/styles/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
- package/build/types/inputs/{SelectInput.messages.d.ts → SelectInput/SelectInput.messages.d.ts} +0 -0
- package/src/inputs/{_BottomSheet.less → SelectInput/BottomSheet/SelectInputBottomSheet.less} +0 -0
- package/src/inputs/{_ButtonInput.less → SelectInput/ButtonInput/SelectInputButtonInput.less} +0 -0
- package/src/inputs/{_Popover.less → SelectInput/Popover/SelectInputPopover.less} +0 -0
- package/src/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
- /package/src/inputs/{SelectInput.messages.ts → SelectInput/SelectInput.messages.ts} +0 -0
package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInputOptionsContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gCAAiC,SAAQ,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAC1F,4BAA4B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;CAC9F;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,iJA+CtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/OptionsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SelectInputProps } from '../SelectInput.types';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the SelectInputOptions component.
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectInputOptionsProps<T = string> extends Pick<SelectInputProps<T>, 'items' | 'renderValue' | 'renderFooter' | 'filterable' | 'filterPlaceholder' | 'id' | 'parentId' | 'compareValues' | 'sortFilteredOptions'> {
|
|
6
|
+
searchInputRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
7
|
+
listboxRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
8
|
+
filterQuery: string;
|
|
9
|
+
onFilterChange: (query: string) => void;
|
|
10
|
+
listBoxLabel?: string;
|
|
11
|
+
listBoxLabelledBy?: string;
|
|
12
|
+
autocomplete?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
onAutocompleteSelect?: (value: T) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The main options container component for SelectInput.
|
|
18
|
+
* Manages filtering, virtualisation, and rendering of options.
|
|
19
|
+
*/
|
|
20
|
+
export declare function SelectInputOptions<T = string>({ id, parentId, items, compareValues: compareValuesProp, renderValue, renderFooter, filterable, filterPlaceholder, sortFilteredOptions, searchInputRef, listboxRef, filterQuery, onFilterChange, listBoxLabel, listBoxLabelledBy, autocomplete, name, onAutocompleteSelect, }: SelectInputOptionsProps<T>): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=SelectInputOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInputOptions.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/Options/SelectInputOptions.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAyB,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AAMhG;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,IAAI,CAC/D,gBAAgB,CAAC,CAAC,CAAC,EACjB,OAAO,GACP,aAAa,GACb,cAAc,GACd,YAAY,GACZ,mBAAmB,GACnB,IAAI,GACJ,UAAU,GACV,eAAe,GACf,qBAAqB,CACxB;IACC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAChE,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,MAAM,EAAE,EAC7C,EAAE,EACF,QAAQ,EACR,KAAK,EACL,aAAa,EAAE,iBAAiB,EAChC,WAAoB,EACpB,YAAY,EACZ,UAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,IAAI,EACJ,oBAAoB,GACrB,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BA+U5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/Options/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Placement } from '@floating-ui/react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface SelectInputPopoverProps {
|
|
3
3
|
placement?: Placement;
|
|
4
4
|
open: boolean;
|
|
5
5
|
renderTrigger: (args: {
|
|
@@ -15,5 +15,5 @@ export interface PopoverProps {
|
|
|
15
15
|
onClose?: () => void;
|
|
16
16
|
onCloseEnd?: () => void;
|
|
17
17
|
}
|
|
18
|
-
export declare function
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
export declare function SelectInputPopover({ placement, open, renderTrigger, title, size, padding, children, onClose, onCloseEnd, }: SelectInputPopoverProps): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=SelectInputPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInputPopover.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/Popover/SelectInputPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EAOf,MAAM,oBAAoB,CAAC;AAS5B,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,CAAC,IAAI,EAAE;QACpB,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAChC,mBAAmB,EAAE,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;YACvE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,aAAa,EACb,KAAK,EACL,IAAW,EACX,OAAc,EACd,QAAQ,EACR,OAAO,EACP,UAAU,GACX,EAAE,uBAAuB,+BAmFzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/Popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Context for passing props to the SelectInputTriggerButton component.
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectInputTriggerButtonPropsContextValue {
|
|
6
|
+
ref?: React.ForwardedRef<HTMLButtonElement | null>;
|
|
7
|
+
id?: string;
|
|
8
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
9
|
+
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Context for passing props to the SelectInputTriggerButton component.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SelectInputTriggerButtonPropsContext: React.Context<SelectInputTriggerButtonPropsContextValue>;
|
|
17
|
+
/**
|
|
18
|
+
* Context for providing the total count of items in a SelectInput.
|
|
19
|
+
* Used for ARIA accessibility to inform screen readers about the total number of options.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SelectInputItemsCountContext: React.Context<number | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Context for providing the current item position in a SelectInput.
|
|
24
|
+
* Used for ARIA accessibility to inform screen readers about the position of the option.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SelectInputItemPositionContext: React.Context<number | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Context indicating whether an option's content is rendered within the trigger button.
|
|
29
|
+
* When true, certain styling adjustments are applied to make the content fit better in the trigger.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SelectInputOptionContentWithinTriggerContext: React.Context<boolean>;
|
|
32
|
+
export type { WithInputAttributesProps } from '../contexts';
|
|
33
|
+
//# sourceMappingURL=SelectInput.contexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.contexts.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.contexts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,oCAAoC,0DACa,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,4BAA4B,mCAA+C,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,mCAA+C,CAAC;AAE3F;;;GAGG;AACH,eAAO,MAAM,4CAA4C,wBAAuB,CAAC;AAGjF,YAAY,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SelectInputProps } from './SelectInput.types';
|
|
2
|
+
/**
|
|
3
|
+
* SelectInput component allows users to select an option from a dropdown list.
|
|
4
|
+
* Supports filtering, multiple selection, and customization.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SelectInput<T = string, M extends boolean = false>({ id: idProp, parentId, name, multiple, placeholder, autocomplete, items, defaultValue, value: controlledValue, compareValues, renderValue, renderFooter, renderTrigger, filterable, filterPlaceholder, sortFilteredOptions, disabled, size, className, UNSAFE_triggerButtonProps, triggerRef: externalTriggerRef, onFilterChange, onChange, onOpen, onClose, onClear, }: SelectInputProps<T, M>): import("react").JSX.Element;
|
|
7
|
+
export declare namespace SelectInput {
|
|
8
|
+
var sortByRelevance: typeof import("./SelectInput.utils").sortByRelevance;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,EAAE,EACjE,EAAE,EAAE,MAAM,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,WAAoB,EACpB,YAAY,EACZ,aAAoC,EACpC,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,IAAW,EACX,SAAS,EACT,yBAAyB,EACzB,UAAU,EAAE,kBAAkB,EAC9B,cAAqB,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,GACR,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,+BAwMxB;yBAnOe,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.messages.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.messages.ts"],"names":[],"mappings":";;;;;;;AAEA,wBAMG"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { WithInputAttributesProps } from './contexts';
|
|
4
|
-
import { ButtonProps } from '../button/Button.types';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../button/Button.types';
|
|
3
|
+
import { WithInputAttributesProps } from './SelectInput.contexts';
|
|
5
4
|
export interface SelectInputOptionItem<T = string> {
|
|
6
5
|
type: 'option';
|
|
7
6
|
value: T;
|
|
@@ -21,22 +20,6 @@ export interface SelectInputSeparatorItem {
|
|
|
21
20
|
type: 'separator';
|
|
22
21
|
}
|
|
23
22
|
export type SelectInputItem<T = string> = SelectInputOptionItem<T> | SelectInputGroupItem<T> | SelectInputSeparatorItem;
|
|
24
|
-
/**
|
|
25
|
-
* A prebuilt sort function for `sortFilteredOptions` that sorts options by relevance to the search query.
|
|
26
|
-
* Prioritizes: exact matches > starts with > contains > alphabetical.
|
|
27
|
-
*
|
|
28
|
-
* @param getLabel - Function to extract the label string from the option value. Defaults to using `title` property.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* <SelectInput
|
|
33
|
-
* filterable
|
|
34
|
-
* sortFilteredOptions={sortByRelevance((value) => value.name)}
|
|
35
|
-
* // ...
|
|
36
|
-
* />
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function sortByRelevance<T>(getLabel?: (value: T) => string): (a: SelectInputOptionItem<T>, b: SelectInputOptionItem<T>, searchQuery: string) => number;
|
|
40
23
|
export interface SelectInputProps<T = string, M extends boolean = false> {
|
|
41
24
|
id?: string;
|
|
42
25
|
/**
|
|
@@ -103,21 +86,12 @@ export interface SelectInputProps<T = string, M extends boolean = false> {
|
|
|
103
86
|
onClose?: () => void;
|
|
104
87
|
onClear?: () => void;
|
|
105
88
|
}
|
|
106
|
-
export
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
type
|
|
111
|
-
export type
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface SelectInputOptionContentProps {
|
|
116
|
-
title: React.ReactNode;
|
|
117
|
-
note?: string;
|
|
118
|
-
description?: string;
|
|
119
|
-
icon?: React.ReactNode;
|
|
120
|
-
}
|
|
121
|
-
export declare function SelectInputOptionContent({ title, note, description, icon, }: SelectInputOptionContentProps): import("react").JSX.Element;
|
|
122
|
-
export {};
|
|
123
|
-
//# sourceMappingURL=SelectInput.d.ts.map
|
|
89
|
+
export type { SelectInputTriggerButtonElementType, SelectInputTriggerButtonProps, } from './TriggerButton';
|
|
90
|
+
export type { SelectInputClearButtonProps } from './ClearButton';
|
|
91
|
+
export type { SelectInputOptionContentProps } from './OptionContent';
|
|
92
|
+
export type { SelectInputOptionProps } from './Option';
|
|
93
|
+
export type { SelectInputItemViewProps } from './ItemView';
|
|
94
|
+
export type { SelectInputGroupItemViewProps } from './ItemView/GroupItemView';
|
|
95
|
+
export type { SelectInputOptionsProps } from './Options';
|
|
96
|
+
export type { SelectInputOptionsContainerProps } from './Options/OptionsContainer';
|
|
97
|
+
//# sourceMappingURL=SelectInput.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.types.d.ts","sourceRoot":"","sources":["../../../../src/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AAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SelectInputItem, SelectInputOptionItem } from './SelectInput.types';
|
|
2
|
+
export declare const MAX_ITEMS_WITHOUT_VIRTUALIZATION = 50;
|
|
3
|
+
/**
|
|
4
|
+
* Converts a string to a normalized, searchable format by:
|
|
5
|
+
* - Trimming whitespace
|
|
6
|
+
* - Normalizing whitespace (convert multiple spaces to single space)
|
|
7
|
+
* - Converting to NFD normalization form to handle diacritics
|
|
8
|
+
* - Removing combining diacritical marks
|
|
9
|
+
* - Converting to lowercase
|
|
10
|
+
*/
|
|
11
|
+
export declare function searchableString(value: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Extracts searchable strings from a value.
|
|
14
|
+
* - If the value is a string, returns a normalized version.
|
|
15
|
+
* - If the value is an object, extracts all string values and normalizes them.
|
|
16
|
+
* - Otherwise returns an empty array.
|
|
17
|
+
*/
|
|
18
|
+
export declare function inferSearchableStrings(value: unknown): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Sets the value of a duplicate option item to undefined, effectively hiding it when rendered.
|
|
21
|
+
*/
|
|
22
|
+
export declare function dedupeSelectInputOptionItem<T>(item: SelectInputOptionItem<T>, existingValues: Set<T>, compareValues?: (a: T, b: T) => boolean): SelectInputOptionItem<T | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the `value` of duplicate option items to `undefined`, hiding them when
|
|
25
|
+
* rendered. Indexes are kept intact within groups to preserve the active item
|
|
26
|
+
* between filter changes when possible.
|
|
27
|
+
*/
|
|
28
|
+
export declare function dedupeSelectInputItems<T>(items: readonly SelectInputItem<T>[], compareValues?: (a: T, b: T) => boolean): SelectInputItem<T | undefined>[];
|
|
29
|
+
/**
|
|
30
|
+
* Checks if a SelectInputOptionItem matches the search needle.
|
|
31
|
+
*/
|
|
32
|
+
export declare function selectInputOptionItemIncludesNeedle<T>(item: SelectInputOptionItem<T>, needle: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Filters SelectInputItems based on the provided predicate function.
|
|
35
|
+
* For group items, it checks if any of their options match the predicate.
|
|
36
|
+
*/
|
|
37
|
+
export declare function filterSelectInputItems<T>(items: readonly SelectInputItem<T>[], predicate: (item: SelectInputOptionItem<T>) => boolean): SelectInputItem<T>[];
|
|
38
|
+
/**
|
|
39
|
+
* Flattens and sorts filtered options using the provided comparator.
|
|
40
|
+
* Extracts all options from groups, filters out undefined values (deduplicated items),
|
|
41
|
+
* sorts them, and returns as a flat list of option items.
|
|
42
|
+
*/
|
|
43
|
+
export declare function sortSelectInputItems<T>(items: readonly SelectInputItem<T | undefined>[], compareFn: (a: SelectInputOptionItem<NonNullable<T>>, b: SelectInputOptionItem<NonNullable<T>>, searchQuery: string) => number, searchQuery: string): SelectInputItem<NonNullable<T>>[];
|
|
44
|
+
/**
|
|
45
|
+
* A prebuilt sort function for `sortFilteredOptions` that sorts options by relevance to the search query.
|
|
46
|
+
* Prioritizes: exact matches > starts with > contains > alphabetical.
|
|
47
|
+
*
|
|
48
|
+
* @param getLabel - Function to extract the label string from the option value. Defaults to using `title` property.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <SelectInput
|
|
53
|
+
* filterable
|
|
54
|
+
* sortFilteredOptions={sortByRelevance((value) => value.name)}
|
|
55
|
+
* // ...
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function sortByRelevance<T>(getLabel?: (value: T) => string): (a: SelectInputOptionItem<T>, b: SelectInputOptionItem<T>, searchQuery: string) => number;
|
|
60
|
+
//# sourceMappingURL=SelectInput.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.utils.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE7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C,CAAC,CAAC,CAAC,EACxC,WAAW,EAAE,MAAM,KAChB,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAiBnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,QAAQ,GAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAsD,GAC7E,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,MAAM,CA2B3F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Merge } from '../../../utils';
|
|
2
|
+
export type SelectInputTriggerButtonElementType = 'button' | React.ComponentType;
|
|
3
|
+
export type SelectInputTriggerButtonProps<T extends SelectInputTriggerButtonElementType = 'button'> = Merge<React.ComponentPropsWithoutRef<T>, {
|
|
4
|
+
as?: T;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* The trigger button component for SelectInput.
|
|
8
|
+
* Uses Headless UI's ListboxButton with polymorphic support to allow
|
|
9
|
+
* rendering as different element types.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SelectInputTriggerButton<T extends SelectInputTriggerButtonElementType = 'button'>({ as, ...restProps }: SelectInputTriggerButtonProps<T>): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=SelectInputTriggerButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInputTriggerButton.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,MAAM,MAAM,mCAAmC,GAAG,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC;AAEjF,MAAM,MAAM,6BAA6B,CACvC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,IACtD,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,EAAE,EACjG,EAAkB,EAClB,GAAG,SAAS,EACb,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAclC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/TriggerButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EACV,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './ClearButton';
|
|
2
|
+
export * from './Option';
|
|
3
|
+
export * from './OptionContent';
|
|
4
|
+
export * from './TriggerButton';
|
|
5
|
+
export * from './ItemView';
|
|
6
|
+
export * from './Options';
|
|
7
|
+
export * from './BottomSheet';
|
|
8
|
+
export * from './Popover';
|
|
9
|
+
export * from './ButtonInput';
|
|
10
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/components.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './SelectInput';
|
|
2
|
+
export * from './SelectInput.types';
|
|
3
|
+
export * from './ClearButton';
|
|
4
|
+
export * from './Option';
|
|
5
|
+
export * from './OptionContent';
|
|
6
|
+
export * from './TriggerButton';
|
|
7
|
+
export * from './DefaultRenderTrigger';
|
|
8
|
+
export * from './ItemView';
|
|
9
|
+
export * from './Options';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -182,7 +182,6 @@ export {
|
|
|
182
182
|
SelectInput,
|
|
183
183
|
SelectInputOptionContent,
|
|
184
184
|
SelectInputTriggerButton,
|
|
185
|
-
sortByRelevance,
|
|
186
185
|
} from './inputs/SelectInput';
|
|
187
186
|
export { TextArea } from './inputs/TextArea';
|
|
188
187
|
export { default as InstructionsList } from './instructionsList';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.np-bottom-sheet-v2-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 1060;
|
|
4
|
+
}
|
|
5
|
+
.np-bottom-sheet-v2-backdrop {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0px;
|
|
8
|
+
background-color: #37517e;
|
|
9
|
+
background-color: var(--color-content-primary);
|
|
10
|
+
opacity: 0.4;
|
|
11
|
+
transition-property: opacity;
|
|
12
|
+
transition-timing-function: ease-out;
|
|
13
|
+
transition-duration: 300ms;
|
|
14
|
+
}
|
|
15
|
+
.np-bottom-sheet-v2-backdrop--closed {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
}
|
|
18
|
+
.np-bottom-sheet-v2 {
|
|
19
|
+
position: fixed;
|
|
20
|
+
inset: 0px;
|
|
21
|
+
bottom: env(keyboard-inset-height, 0px);
|
|
22
|
+
margin-left: 8px;
|
|
23
|
+
margin-left: var(--size-8);
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
margin-right: var(--size-8);
|
|
26
|
+
margin-top: 64px;
|
|
27
|
+
margin-top: var(--size-64);
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
}
|
|
32
|
+
.np-bottom-sheet-v2-content {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
border-top-left-radius: 32px;
|
|
37
|
+
/* TODO: Tokenize */
|
|
38
|
+
border-top-right-radius: 32px;
|
|
39
|
+
/* TODO: Tokenize */
|
|
40
|
+
background-color: #ffffff;
|
|
41
|
+
background-color: var(--color-background-elevated);
|
|
42
|
+
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
43
|
+
}
|
|
44
|
+
.np-bottom-sheet-v2-content:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
}
|
|
47
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
48
|
+
.np-bottom-sheet-v2-content {
|
|
49
|
+
transition-property: transform;
|
|
50
|
+
transition-timing-function: ease-out;
|
|
51
|
+
transition-duration: 300ms;
|
|
52
|
+
}
|
|
53
|
+
.np-bottom-sheet-v2-content--closed {
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.np-bottom-sheet-v2-content {
|
|
59
|
+
transition-property: opacity;
|
|
60
|
+
transition-timing-function: ease-out;
|
|
61
|
+
transition-duration: 300ms;
|
|
62
|
+
}
|
|
63
|
+
.np-bottom-sheet-v2-content--closed {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.np-bottom-sheet-v2-header {
|
|
68
|
+
align-self: flex-end;
|
|
69
|
+
padding: 16px;
|
|
70
|
+
padding: var(--size-16);
|
|
71
|
+
}
|
|
72
|
+
.np-bottom-sheet-v2-content-inner {
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-rows: minmax(0, 1fr);
|
|
75
|
+
grid-row-gap: 8px;
|
|
76
|
+
grid-row-gap: var(--size-8);
|
|
77
|
+
row-gap: 8px;
|
|
78
|
+
row-gap: var(--size-8);
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
.np-bottom-sheet-v2-content-inner--has-title {
|
|
82
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
83
|
+
}
|
|
84
|
+
.np-bottom-sheet-v2-content-inner--padding-md {
|
|
85
|
+
padding: 16px;
|
|
86
|
+
padding: var(--size-16);
|
|
87
|
+
padding-top: 0px;
|
|
88
|
+
}
|
|
89
|
+
.np-bottom-sheet-v2-title {
|
|
90
|
+
color: #37517e;
|
|
91
|
+
color: var(--color-content-primary);
|
|
92
|
+
}
|
|
93
|
+
.np-bottom-sheet-v2-body {
|
|
94
|
+
color: #5d7079;
|
|
95
|
+
color: var(--color-content-secondary);
|
|
96
|
+
}
|
|
@@ -12,12 +12,12 @@ import { ThemeProvider, useTheme } from '@wise/components-theming';
|
|
|
12
12
|
import { clsx } from 'clsx';
|
|
13
13
|
import { Fragment, useState } from 'react';
|
|
14
14
|
|
|
15
|
-
import { CloseButton } from '
|
|
16
|
-
import { useVirtualKeyboard } from '
|
|
17
|
-
import { PreventScroll } from '
|
|
18
|
-
import { Size } from '
|
|
15
|
+
import { CloseButton } from '../../../common/closeButton';
|
|
16
|
+
import { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';
|
|
17
|
+
import { PreventScroll } from '../../../common/preventScroll/PreventScroll';
|
|
18
|
+
import { Size } from '../../../common/propsValues/size';
|
|
19
19
|
|
|
20
|
-
export interface
|
|
20
|
+
export interface SelectInputBottomSheetProps {
|
|
21
21
|
open: boolean;
|
|
22
22
|
renderTrigger?: (args: {
|
|
23
23
|
ref: React.RefCallback<Element>;
|
|
@@ -33,7 +33,7 @@ export interface BottomSheetProps {
|
|
|
33
33
|
onCloseEnd?: () => void;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function
|
|
36
|
+
export function SelectInputBottomSheet({
|
|
37
37
|
open,
|
|
38
38
|
renderTrigger,
|
|
39
39
|
title,
|
|
@@ -42,7 +42,7 @@ export function BottomSheet({
|
|
|
42
42
|
children,
|
|
43
43
|
onClose,
|
|
44
44
|
onCloseEnd,
|
|
45
|
-
}:
|
|
45
|
+
}: SelectInputBottomSheetProps) {
|
|
46
46
|
useVirtualKeyboard(open);
|
|
47
47
|
|
|
48
48
|
const { refs, context } = useFloating<Element>({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.np-button-input {
|
|
2
|
+
display: inline-grid;
|
|
3
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
4
|
+
align-content: center;
|
|
5
|
+
border-radius: 10px;
|
|
6
|
+
border-radius: var(--size-10);
|
|
7
|
+
text-align: start;
|
|
8
|
+
}
|
|
9
|
+
.np-button-input:has(.np-select-input-option-description-in-trigger) {
|
|
10
|
+
height: auto !important;
|
|
11
|
+
align-content: start;
|
|
12
|
+
padding-top: 12px !important;
|
|
13
|
+
padding-top: var(--size-12) !important;
|
|
14
|
+
padding-bottom: 12px !important;
|
|
15
|
+
padding-bottom: var(--size-12) !important;
|
|
16
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
|
|
4
|
-
import { useInputPaddings } from '
|
|
5
|
-
import { inputClassNameBase } from '
|
|
4
|
+
import { useInputPaddings } from '../../InputGroup';
|
|
5
|
+
import { inputClassNameBase } from '../../_common';
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {
|
|
8
8
|
size?: 'sm' | 'md' | 'lg';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
12
|
-
{ size = 'md', className, style, ...restProps }:
|
|
11
|
+
export const SelectInputButtonInput = forwardRef(function ButtonInput(
|
|
12
|
+
{ size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,
|
|
13
13
|
ref: React.ForwardedRef<HTMLButtonElement | null>,
|
|
14
14
|
) {
|
|
15
15
|
const inputPaddings = useInputPaddings();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.np-select-input-addon-container {
|
|
2
|
+
pointer-events: none;
|
|
3
|
+
margin-inline-start: 4px;
|
|
4
|
+
margin-inline-start: var(--size-4);
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
.np-select-input-addon-container > :not([hidden]) ~ :not([hidden]) {
|
|
9
|
+
margin-inline-start: 4px;
|
|
10
|
+
margin-inline-start: var(--size-4);
|
|
11
|
+
}
|
|
12
|
+
.np-select-input-addon {
|
|
13
|
+
border-width: 0;
|
|
14
|
+
background: none;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
height: 24px;
|
|
17
|
+
height: var(--size-24);
|
|
18
|
+
width: 24px;
|
|
19
|
+
width: var(--size-24);
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border-radius: 0.125rem /* 2px */;
|
|
23
|
+
/* TODO: Tokenize */
|
|
24
|
+
}
|
|
25
|
+
.np-select-input-addon--interactive {
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
color: #c9cbce;
|
|
28
|
+
color: var(--color-interactive-secondary);
|
|
29
|
+
}
|
|
30
|
+
.np-select-input-addon--interactive:hover {
|
|
31
|
+
color: #b5b7ba;
|
|
32
|
+
color: var(--color-interactive-secondary-hover);
|
|
33
|
+
}
|
|
34
|
+
.np-select-input-addon--interactive:focus {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
.np-select-input-addon--interactive:focus-visible {
|
|
38
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
39
|
+
outline-offset: var(--ring-outline-offset);
|
|
40
|
+
}
|
|
41
|
+
.np-select-input-addon-separator {
|
|
42
|
+
height: 24px;
|
|
43
|
+
height: var(--size-24);
|
|
44
|
+
border-inline-start: 1px solid rgba(0,0,0,0.10196);
|
|
45
|
+
border-inline-start: 1px solid var(--color-border-neutral);
|
|
46
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import (reference) "../../../../node_modules/@transferwise/neptune-css/src/less/ring.less";
|
|
2
|
+
|
|
3
|
+
.np-select-input-addon-container {
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
margin-inline-start: var(--size-4);
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
& > :not([hidden]) ~ :not([hidden]) {
|
|
10
|
+
margin-inline-start: var(--size-4);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.np-select-input-addon {
|
|
15
|
+
border-width: 0;
|
|
16
|
+
background: none;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
height: var(--size-24);
|
|
19
|
+
width: var(--size-24);
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border-radius: 0.125rem /* 2px */; /* TODO: Tokenize */
|
|
23
|
+
|
|
24
|
+
&--interactive {
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
color: var(--color-interactive-secondary);
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
color: var(--color-interactive-secondary-hover);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.focus-ring();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.np-select-input-addon-separator {
|
|
37
|
+
height: var(--size-24);
|
|
38
|
+
border-inline-start: 1px solid var(--color-border-neutral);
|
|
39
|
+
}
|