@transferwise/components 0.0.0-experimental-bcfa03a → 0.0.0-experimental-3cdcd93
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 +3 -6
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +2 -5
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +3 -5
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +1 -3
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/index.js +3 -5
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -3
- package/build/index.mjs.map +1 -1
- package/build/inputs/SelectInput.js +821 -0
- package/build/inputs/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput.mjs +813 -0
- package/build/inputs/SelectInput.mjs.map +1 -0
- package/build/main.css +70 -65
- package/build/moneyInput/MoneyInput.js +2 -5
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +1 -4
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +2 -5
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -4
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/styles/inputs/{SelectInput/SelectInput.css → SelectInput.css} +70 -65
- package/build/styles/main.css +70 -65
- package/build/tabs/Tabs.js +14 -171
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +16 -173
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tabs/utils.js +0 -18
- package/build/tabs/utils.js.map +1 -1
- package/build/tabs/utils.mjs +1 -17
- package/build/tabs/utils.mjs.map +1 -1
- package/build/types/inputs/{SelectInput/SelectInput.types.d.ts → SelectInput.d.ts} +7 -10
- package/build/types/inputs/SelectInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput.messages.d.ts.map +1 -0
- package/build/types/tabs/Tabs.d.ts +2 -24
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/tabs/utils.d.ts +0 -2
- package/build/types/tabs/utils.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/inputs/{SelectInput/SelectInput.css → SelectInput.css} +70 -65
- package/src/inputs/{SelectInput/SelectInput.docs.mdx → SelectInput.docs.mdx} +1 -0
- package/src/inputs/SelectInput.less +219 -0
- package/src/inputs/{SelectInput/SelectInput.story.tsx → SelectInput.story.tsx} +7 -7
- package/src/inputs/SelectInput.tsx +1190 -0
- package/src/main.css +70 -65
- package/src/main.less +1 -1
- package/src/tabs/Tabs.story.tsx +1 -45
- package/src/tabs/Tabs.test.tsx +0 -22
- package/src/tabs/Tabs.tsx +23 -240
- package/src/tabs/utils.test.ts +0 -58
- package/src/tabs/utils.ts +0 -20
- package/build/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.js +0 -26
- package/build/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.js.map +0 -1
- package/build/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.mjs +0 -24
- package/build/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.mjs.map +0 -1
- package/build/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.js +0 -54
- package/build/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.js.map +0 -1
- package/build/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.mjs +0 -52
- package/build/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.mjs.map +0 -1
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +0 -41
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +0 -1
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +0 -38
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.js +0 -50
- package/build/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.js.map +0 -1
- package/build/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.mjs +0 -48
- package/build/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.js +0 -45
- package/build/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.js.map +0 -1
- package/build/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.mjs +0 -41
- package/build/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/ItemView/SelectInputItemView.js +0 -50
- package/build/inputs/SelectInput/Options/ItemView/SelectInputItemView.js.map +0 -1
- package/build/inputs/SelectInput/Options/ItemView/SelectInputItemView.mjs +0 -48
- package/build/inputs/SelectInput/Options/ItemView/SelectInputItemView.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +0 -48
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +0 -1
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +0 -46
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/SelectInputOptions.js +0 -270
- package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +0 -1
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +0 -268
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.constants.js +0 -6
- package/build/inputs/SelectInput/SelectInput.constants.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.constants.mjs +0 -4
- package/build/inputs/SelectInput/SelectInput.constants.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.helpers.js +0 -115
- package/build/inputs/SelectInput/SelectInput.helpers.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.helpers.mjs +0 -109
- package/build/inputs/SelectInput/SelectInput.helpers.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.js +0 -216
- package/build/inputs/SelectInput/SelectInput.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.messages.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.messages.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.mjs +0 -210
- package/build/inputs/SelectInput/SelectInput.mjs.map +0 -1
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +0 -41
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +0 -1
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +0 -34
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +0 -1
- package/build/styles/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.css +0 -17
- package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
- package/build/styles/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.css +0 -33
- package/build/styles/inputs/SelectInput/Options/ItemView/SelectInputItemView.css +0 -44
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +0 -125
- package/build/types/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.d.ts +0 -5
- package/build/types/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/DefaultTrigger/ClearButton/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/DefaultTrigger/ClearButton/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.d.ts +0 -9
- package/build/types/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/DefaultTrigger/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/DefaultTrigger/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +0 -9
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.d.ts +0 -3
- package/build/types/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/GroupItemView/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/Options/GroupItemView/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.d.ts +0 -10
- package/build/types/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/ItemView/Option/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/Options/ItemView/Option/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/ItemView/SelectInputItemView.d.ts +0 -3
- package/build/types/inputs/SelectInput/Options/ItemView/SelectInputItemView.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/ItemView/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/Options/ItemView/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +0 -6
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +0 -15
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/Options/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.constants.d.ts +0 -2
- package/build/types/inputs/SelectInput/SelectInput.constants.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.d.ts +0 -3
- package/build/types/inputs/SelectInput/SelectInput.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.helpers.d.ts +0 -28
- package/build/types/inputs/SelectInput/SelectInput.helpers.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +0 -15
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/index.d.ts +0 -5
- package/build/types/inputs/SelectInput/index.d.ts.map +0 -1
- package/src/inputs/SelectInput/DefaultTrigger/ClearButton/SelectInputClearButton.tsx +0 -25
- package/src/inputs/SelectInput/DefaultTrigger/ClearButton/index.ts +0 -1
- package/src/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.css +0 -17
- package/src/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.less +0 -15
- package/src/inputs/SelectInput/DefaultTrigger/SelectInputDefaultTrigger.tsx +0 -56
- package/src/inputs/SelectInput/DefaultTrigger/index.ts +0 -1
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +0 -38
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +0 -67
- package/src/inputs/SelectInput/OptionContent/index.ts +0 -5
- package/src/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.tsx +0 -53
- package/src/inputs/SelectInput/Options/GroupItemView/index.ts +0 -1
- package/src/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.css +0 -33
- package/src/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.less +0 -32
- package/src/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.tsx +0 -51
- package/src/inputs/SelectInput/Options/ItemView/Option/index.ts +0 -5
- package/src/inputs/SelectInput/Options/ItemView/SelectInputItemView.css +0 -44
- package/src/inputs/SelectInput/Options/ItemView/SelectInputItemView.less +0 -14
- package/src/inputs/SelectInput/Options/ItemView/SelectInputItemView.tsx +0 -37
- package/src/inputs/SelectInput/Options/ItemView/index.ts +0 -1
- package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +0 -55
- package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +0 -1
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +0 -125
- package/src/inputs/SelectInput/Options/SelectInputOptions.less +0 -78
- package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +0 -372
- package/src/inputs/SelectInput/Options/index.ts +0 -1
- package/src/inputs/SelectInput/SelectInput.constants.ts +0 -1
- package/src/inputs/SelectInput/SelectInput.helpers.ts +0 -152
- package/src/inputs/SelectInput/SelectInput.less +0 -40
- package/src/inputs/SelectInput/SelectInput.test.tsx +0 -606
- package/src/inputs/SelectInput/SelectInput.tsx +0 -247
- package/src/inputs/SelectInput/SelectInput.types.ts +0 -127
- package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +0 -39
- package/src/inputs/SelectInput/TriggerButton/index.ts +0 -5
- package/src/inputs/SelectInput/index.ts +0 -13
- /package/build/inputs/{SelectInput/SelectInput.messages.js → SelectInput.messages.js} +0 -0
- /package/build/inputs/{SelectInput/SelectInput.messages.mjs → SelectInput.messages.mjs} +0 -0
- /package/build/types/inputs/{SelectInput/SelectInput.messages.d.ts → SelectInput.messages.d.ts} +0 -0
- /package/src/inputs/{SelectInput/SelectInput.messages.ts → SelectInput.messages.ts} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectInputGroupItemViewProps } from '../../SelectInput.types';
|
|
2
|
-
export declare function SelectInputGroupItemView<T = string>({ item, renderValue, needle, }: SelectInputGroupItemViewProps<T>): import("react").JSX.Element;
|
|
3
|
-
//# sourceMappingURL=SelectInputGroupItemView.d.ts.map
|
package/build/types/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputGroupItemView.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/GroupItemView/SelectInputGroupItemView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAG7E,wBAAgB,wBAAwB,CAAC,CAAC,GAAG,MAAM,EAAE,EACnD,IAAI,EACJ,WAAW,EACX,MAAM,GACP,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAyClC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/GroupItemView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const SelectInputItemsCountContext: import("react").Context<number | undefined>;
|
|
2
|
-
export declare const SelectInputItemPositionContext: import("react").Context<number | undefined>;
|
|
3
|
-
interface SelectInputOptionProps<T = string> {
|
|
4
|
-
value: T;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare function SelectInputOption<T = string>({ value, disabled, children, }: SelectInputOptionProps<T>): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=SelectInputOption.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/inputs/SelectInput/Options/ItemView/Option/SelectInputOption.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B,6CAA+C,CAAC;AACzF,eAAO,MAAM,8BAA8B,6CAA+C,CAAC;AAE3F,UAAU,sBAAsB,CAAC,CAAC,GAAG,MAAM;IACzC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAAE,EAC5C,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,sBAAsB,CAAC,CAAC,CAAC,+BAgC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/inputs/SelectInput/Options/ItemView/Option/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectInputItemViewProps } from '../../SelectInput.types';
|
|
2
|
-
export declare function SelectInputItemView<T = string>({ item, renderValue, needle, }: SelectInputItemViewProps<T>): import("react").JSX.Element | null;
|
|
3
|
-
//# sourceMappingURL=SelectInputItemView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputItemView.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/ItemView/SelectInputItemView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAIxE,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,MAAM,EAAE,EAC9C,IAAI,EACJ,WAAW,EACX,MAAM,GACP,EAAE,wBAAwB,CAAC,CAAC,CAAC,sCA0B7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/ItemView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
interface SelectInputOptionsContainerProps extends React.ComponentPropsWithRef<'div'> {
|
|
2
|
-
onAriaActiveDescendantChange: (value: React.AriaAttributes['aria-activedescendant']) => void;
|
|
3
|
-
}
|
|
4
|
-
export declare const SelectInputOptionsContainer: import("react").ForwardRefExoticComponent<Omit<SelectInputOptionsContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=SelectInputOptionsContainer.d.ts.map
|
package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputOptionsContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx"],"names":[],"mappings":"AAGA,UAAU,gCAAiC,SAAQ,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC;IACnF,4BAA4B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;CAC9F;AAED,eAAO,MAAM,2BAA2B,iJA+CtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SelectInputProps } from '../SelectInput.types';
|
|
2
|
-
interface SelectInputOptionsProps<T = string> extends Pick<SelectInputProps<T>, 'items' | 'renderValue' | 'renderFooter' | 'filterable' | 'filterPlaceholder' | 'id' | 'parentId' | 'compareValues' | 'sortFilteredOptions'> {
|
|
3
|
-
searchInputRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
4
|
-
listboxRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
5
|
-
filterQuery: string;
|
|
6
|
-
onFilterChange: (query: string) => void;
|
|
7
|
-
listBoxLabel?: string;
|
|
8
|
-
listBoxLabelledBy?: string;
|
|
9
|
-
autocomplete?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
onAutocompleteSelect?: (value: T) => void;
|
|
12
|
-
}
|
|
13
|
-
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;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=SelectInputOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputOptions.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/Options/SelectInputOptions.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,sBAAsB,CAAC;AAc9B,UAAU,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,IAAI,CACxD,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,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,+BA8S5B"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.constants.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6CAA6C,KAAK,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectInputProps } from './SelectInput.types';
|
|
2
|
-
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;
|
|
3
|
-
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,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,aAAyC,EACzC,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,+BAuMxB"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { SelectInputOptionItem, SelectInputItem } from './SelectInput.types';
|
|
2
|
-
/**
|
|
3
|
-
* Normalises a string for searching by trimming, normalising whitespace,
|
|
4
|
-
* removing diacritics, and converting to lowercase.
|
|
5
|
-
*/
|
|
6
|
-
export declare function searchableString(value: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Checks if a select input option item matches the search needle.
|
|
9
|
-
*/
|
|
10
|
-
export declare function selectInputOptionItemIncludesNeedle<T>(item: SelectInputOptionItem<T>, needle: string): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Sets the `value` of duplicate option items to `undefined`, hiding them when
|
|
13
|
-
* rendered. Indexes are kept intact within groups to preserve the active item
|
|
14
|
-
* between filter changes when possible.
|
|
15
|
-
*/
|
|
16
|
-
export declare function dedupeSelectInputItems<T>(items: readonly SelectInputItem<T>[], compareValues?: (a: T, b: T) => boolean): SelectInputItem<T | undefined>[];
|
|
17
|
-
/**
|
|
18
|
-
* Filters select input items based on a predicate function.
|
|
19
|
-
* Groups are included if at least one option matches the predicate.
|
|
20
|
-
*/
|
|
21
|
-
export declare function filterSelectInputItems<T>(items: readonly SelectInputItem<T>[], predicate: (item: SelectInputOptionItem<T>) => boolean): SelectInputItem<T>[];
|
|
22
|
-
/**
|
|
23
|
-
* Flattens and sorts filtered options using the provided comparator.
|
|
24
|
-
* Extracts all options from groups, filters out undefined values (deduplicated items),
|
|
25
|
-
* sorts them, and returns as a flat list of option items.
|
|
26
|
-
*/
|
|
27
|
-
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>>[];
|
|
28
|
-
//# sourceMappingURL=SelectInput.helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.helpers.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAW7C;AAoBD;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,EACnD,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,MAAM,WAKf;AAsBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,EACpC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GACtC,eAAe,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAoBlC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,EACpC,SAAS,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,OAAO,wBAcvD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,KAAK,EAAE,SAAS,eAAe,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,EAChD,SAAS,EAAE,CACT,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACxC,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACxC,WAAW,EAAE,MAAM,KAChB,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAiBnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.messages.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.messages.ts"],"names":[],"mappings":";;;;;;;AAEA,wBAMG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.types.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/SelectInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAA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ACvC,CAAC,GAAG,MAAM,EACV,CAAC,SAAS,eAAe,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,eAAe,CAAC,CAAC,GAAG,SAAS,CAAC,CACzE,SAAQ,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAC1D,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,wBAAwB,CACzF,CAAC,EACD,oBAAoB,CAAC,CAAC,GAAG,SAAS,CAAC,CACpC;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Merge } from '../../../utils';
|
|
2
|
-
export declare const SelectInputTriggerButtonPropsContext: import("react").Context<{
|
|
3
|
-
[key: string]: unknown;
|
|
4
|
-
ref?: React.ForwardedRef<HTMLButtonElement | null>;
|
|
5
|
-
id?: string;
|
|
6
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
7
|
-
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
8
|
-
}>;
|
|
9
|
-
type SelectInputTriggerButtonElementType = 'button' | React.ComponentType;
|
|
10
|
-
export type SelectInputTriggerButtonProps<T extends SelectInputTriggerButtonElementType = 'button'> = Merge<React.ComponentPropsWithoutRef<T>, {
|
|
11
|
-
as?: T;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function SelectInputTriggerButton<T extends SelectInputTriggerButtonElementType = 'button'>({ as, ...restProps }: SelectInputTriggerButtonProps<T>): import("react").JSX.Element;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=SelectInputTriggerButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputTriggerButton.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,eAAO,MAAM,oCAAoC;;UACzC,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,IAAI,CAAC;SAC7C,MAAM;cACD,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI;gBAC/B,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI;EAE5C,CAAC;AAEP,KAAK,mCAAmC,GAAG,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC;AAE1E,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,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,EAAE,EACjG,EAAkB,EAClB,GAAG,SAAS,EACb,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAclC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/inputs/SelectInput/TriggerButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,oCAAoC,GACrC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { SelectInput } from './SelectInput';
|
|
2
|
-
export { SelectInputOptionContent } from './OptionContent';
|
|
3
|
-
export { SelectInputTriggerButton } from './TriggerButton';
|
|
4
|
-
export type { SelectInputGroupItem, SelectInputItem, SelectInputOptionContentProps, SelectInputOptionItem, SelectInputProps, SelectInputSeparatorItem, SelectInputTriggerButtonProps, } from './SelectInput.types';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/inputs/SelectInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Cross } from '@transferwise/icons';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
|
-
|
|
5
|
-
import dateTriggerMessages from '../../../../dateLookup/dateTrigger/DateTrigger.messages';
|
|
6
|
-
|
|
7
|
-
interface SelectInputClearButtonProps extends Pick<
|
|
8
|
-
React.ComponentPropsWithoutRef<'button'>,
|
|
9
|
-
'className' | 'onClick'
|
|
10
|
-
> {}
|
|
11
|
-
|
|
12
|
-
export function SelectInputClearButton({ className, onClick }: SelectInputClearButtonProps) {
|
|
13
|
-
const intl = useIntl();
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<button
|
|
17
|
-
type="button"
|
|
18
|
-
aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}
|
|
19
|
-
className={clsx(className, 'np-select-input-addon np-select-input-addon--interactive')}
|
|
20
|
-
onClick={onClick}
|
|
21
|
-
>
|
|
22
|
-
<Cross size={16} />
|
|
23
|
-
</button>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SelectInputClearButton } from './SelectInputClearButton';
|
|
@@ -1,17 +0,0 @@
|
|
|
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-separator {
|
|
13
|
-
height: 24px;
|
|
14
|
-
height: var(--size-24);
|
|
15
|
-
border-inline-start: 1px solid rgba(0,0,0,0.10196);
|
|
16
|
-
border-inline-start: 1px solid var(--color-border-neutral);
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.np-select-input-addon-container {
|
|
2
|
-
pointer-events: none;
|
|
3
|
-
margin-inline-start: var(--size-4);
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
|
|
7
|
-
& > :not([hidden]) ~ :not([hidden]) {
|
|
8
|
-
margin-inline-start: var(--size-4);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.np-select-input-addon-separator {
|
|
13
|
-
height: var(--size-24);
|
|
14
|
-
border-inline-start: 1px solid var(--color-border-neutral);
|
|
15
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ChevronDown } from '@transferwise/icons';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
|
|
4
|
-
import { ButtonInput } from '../../_ButtonInput';
|
|
5
|
-
import { InputGroup } from '../../InputGroup';
|
|
6
|
-
import { SelectInputTriggerButton } from '../TriggerButton';
|
|
7
|
-
import type { SelectInputProps } from '../SelectInput.types';
|
|
8
|
-
import { SelectInputClearButton } from './ClearButton';
|
|
9
|
-
|
|
10
|
-
export const SelectInputDefaultTrigger = (({
|
|
11
|
-
content,
|
|
12
|
-
placeholderShown,
|
|
13
|
-
clear,
|
|
14
|
-
disabled,
|
|
15
|
-
size,
|
|
16
|
-
className,
|
|
17
|
-
}) => (
|
|
18
|
-
<InputGroup
|
|
19
|
-
addonEnd={{
|
|
20
|
-
content: (
|
|
21
|
-
<span className={clsx('np-select-input-addon-container', disabled && 'disabled')}>
|
|
22
|
-
{clear != null && !placeholderShown ? (
|
|
23
|
-
<>
|
|
24
|
-
<SelectInputClearButton
|
|
25
|
-
onClick={(event) => {
|
|
26
|
-
event.preventDefault();
|
|
27
|
-
clear();
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
<span className="np-select-input-addon-separator" />
|
|
31
|
-
</>
|
|
32
|
-
) : null}
|
|
33
|
-
|
|
34
|
-
<span className="np-select-input-addon">
|
|
35
|
-
<ChevronDown size={16} />
|
|
36
|
-
</span>
|
|
37
|
-
</span>
|
|
38
|
-
),
|
|
39
|
-
initialContentWidth: 24 + 4,
|
|
40
|
-
padding: 'sm',
|
|
41
|
-
}}
|
|
42
|
-
disabled={disabled}
|
|
43
|
-
className={className}
|
|
44
|
-
>
|
|
45
|
-
<SelectInputTriggerButton as={ButtonInput} size={size}>
|
|
46
|
-
<span
|
|
47
|
-
className={clsx(
|
|
48
|
-
'np-select-input-content',
|
|
49
|
-
placeholderShown && 'np-select-input-placeholder',
|
|
50
|
-
)}
|
|
51
|
-
>
|
|
52
|
-
{content}
|
|
53
|
-
</span>
|
|
54
|
-
</SelectInputTriggerButton>
|
|
55
|
-
</InputGroup>
|
|
56
|
-
)) satisfies SelectInputProps['renderTrigger'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SelectInputDefaultTrigger } from './SelectInputDefaultTrigger';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.np-select-input-option-content-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
-moz-column-gap: 8px;
|
|
5
|
-
column-gap: 8px;
|
|
6
|
-
-moz-column-gap: var(--size-8);
|
|
7
|
-
column-gap: var(--size-8);
|
|
8
|
-
color: #37517e;
|
|
9
|
-
color: var(--color-content-primary);
|
|
10
|
-
}
|
|
11
|
-
.np-select-input-option-content-icon {
|
|
12
|
-
display: flex;
|
|
13
|
-
}
|
|
14
|
-
.np-select-input-option-content-icon--not-within-trigger {
|
|
15
|
-
align-self: flex-start;
|
|
16
|
-
}
|
|
17
|
-
.np-select-input-option-content-text {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex: 1;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
.np-select-input-option-content-text-secondary {
|
|
24
|
-
color: #5d7079;
|
|
25
|
-
color: var(--color-content-secondary);
|
|
26
|
-
}
|
|
27
|
-
.np-select-input-option-content-text-within-trigger {
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
}
|
|
32
|
-
.np-select-input-option-content-text-line-1 > :not([hidden]) ~ :not([hidden]) {
|
|
33
|
-
margin-right: 8px;
|
|
34
|
-
margin-right: var(--size-8);
|
|
35
|
-
margin-left: 8px;
|
|
36
|
-
margin-left: var(--size-8);
|
|
37
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.np-select-input-option-content-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
column-gap: var(--size-8);
|
|
5
|
-
color: var(--color-content-primary);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.np-select-input-option-content-icon {
|
|
9
|
-
display: flex;
|
|
10
|
-
|
|
11
|
-
&--not-within-trigger {
|
|
12
|
-
align-self: flex-start;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.np-select-input-option-content-text {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex: 1;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.np-select-input-option-content-text-secondary {
|
|
24
|
-
color: var(--color-content-secondary);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.np-select-input-option-content-text-within-trigger {
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.np-select-input-option-content-text-line-1 {
|
|
34
|
-
> :not([hidden]) ~ :not([hidden]) {
|
|
35
|
-
margin-right: var(--size-8);
|
|
36
|
-
margin-left: var(--size-8);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { useContext, createContext } from 'react';
|
|
3
|
-
|
|
4
|
-
export const SelectInputOptionContentWithinTriggerContext = createContext(false);
|
|
5
|
-
|
|
6
|
-
export interface SelectInputOptionContentProps {
|
|
7
|
-
title: string;
|
|
8
|
-
note?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
icon?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function SelectInputOptionContent({
|
|
14
|
-
title,
|
|
15
|
-
note,
|
|
16
|
-
description,
|
|
17
|
-
icon,
|
|
18
|
-
}: SelectInputOptionContentProps) {
|
|
19
|
-
const withinTrigger = useContext(SelectInputOptionContentWithinTriggerContext);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className={clsx(
|
|
24
|
-
'np-select-input-option-content-container',
|
|
25
|
-
(note || description) && 'np-text-body-large',
|
|
26
|
-
)}
|
|
27
|
-
>
|
|
28
|
-
{icon ? (
|
|
29
|
-
<div
|
|
30
|
-
className={clsx(
|
|
31
|
-
'np-select-input-option-content-icon',
|
|
32
|
-
!withinTrigger && 'np-select-input-option-content-icon--not-within-trigger',
|
|
33
|
-
)}
|
|
34
|
-
>
|
|
35
|
-
{icon}
|
|
36
|
-
</div>
|
|
37
|
-
) : null}
|
|
38
|
-
|
|
39
|
-
<div className="np-select-input-option-content-text">
|
|
40
|
-
<div
|
|
41
|
-
className={clsx(
|
|
42
|
-
'np-select-input-option-content-text-line-1',
|
|
43
|
-
withinTrigger && 'np-select-input-option-content-text-within-trigger',
|
|
44
|
-
)}
|
|
45
|
-
>
|
|
46
|
-
<div className="d-inline">{title}</div>
|
|
47
|
-
{note ? (
|
|
48
|
-
<span className="np-select-input-option-content-text-secondary np-text-body-default">
|
|
49
|
-
{note}
|
|
50
|
-
</span>
|
|
51
|
-
) : null}
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
{description ? (
|
|
55
|
-
<div
|
|
56
|
-
className={clsx(
|
|
57
|
-
'np-select-input-option-content-text-secondary np-text-body-default',
|
|
58
|
-
withinTrigger && 'np-select-input-option-content-text-within-trigger',
|
|
59
|
-
)}
|
|
60
|
-
>
|
|
61
|
-
{description}
|
|
62
|
-
</div>
|
|
63
|
-
) : null}
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { useId } from 'react';
|
|
3
|
-
import Header from '../../../../header';
|
|
4
|
-
import Section from '../../../../section';
|
|
5
|
-
import type { SelectInputGroupItemViewProps } from '../../SelectInput.types';
|
|
6
|
-
import { SelectInputItemView } from '../ItemView';
|
|
7
|
-
|
|
8
|
-
export function SelectInputGroupItemView<T = string>({
|
|
9
|
-
item,
|
|
10
|
-
renderValue,
|
|
11
|
-
needle,
|
|
12
|
-
}: SelectInputGroupItemViewProps<T>) {
|
|
13
|
-
const headerId = useId();
|
|
14
|
-
|
|
15
|
-
const header = (
|
|
16
|
-
<Header
|
|
17
|
-
as="header"
|
|
18
|
-
role="none"
|
|
19
|
-
id={headerId}
|
|
20
|
-
title={item.label}
|
|
21
|
-
// @ts-expect-error when we migrate ActionButton to new Button this should be sorted
|
|
22
|
-
action={
|
|
23
|
-
item.action && {
|
|
24
|
-
text: item.action.label,
|
|
25
|
-
onClick: item.action.onClick,
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
className="np-select-input-group-item-header p-x-1"
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
// An empty container may be rendered when no options match `needle`
|
|
34
|
-
// However, pre-filtering would result in worse performance overall
|
|
35
|
-
<Section
|
|
36
|
-
as="section"
|
|
37
|
-
role="group"
|
|
38
|
-
aria-labelledby={headerId}
|
|
39
|
-
className={clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle')}
|
|
40
|
-
>
|
|
41
|
-
{needle == null ? header : null}
|
|
42
|
-
{item.options.map((option, index) => (
|
|
43
|
-
<SelectInputItemView
|
|
44
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
45
|
-
key={index}
|
|
46
|
-
item={option}
|
|
47
|
-
renderValue={renderValue}
|
|
48
|
-
needle={needle}
|
|
49
|
-
/>
|
|
50
|
-
))}
|
|
51
|
-
</Section>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SelectInputGroupItemView } from './SelectInputGroupItemView';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.np-select-input-option-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
cursor: default;
|
|
4
|
-
-webkit-user-select: none;
|
|
5
|
-
-moz-user-select: none;
|
|
6
|
-
user-select: none;
|
|
7
|
-
align-items: center;
|
|
8
|
-
-moz-column-gap: 8px;
|
|
9
|
-
column-gap: 8px;
|
|
10
|
-
-moz-column-gap: var(--size-8);
|
|
11
|
-
column-gap: var(--size-8);
|
|
12
|
-
border-radius: 10px;
|
|
13
|
-
border-radius: var(--radius-small);
|
|
14
|
-
padding: 12px 16px;
|
|
15
|
-
padding: var(--size-12) var(--size-16);
|
|
16
|
-
color: var(--color-interactive-primary);
|
|
17
|
-
}
|
|
18
|
-
.np-select-input-option-container:focus {
|
|
19
|
-
outline: none;
|
|
20
|
-
}
|
|
21
|
-
.np-select-input-option-container--active {
|
|
22
|
-
box-shadow: inset 0 0 0 1px #c9cbce;
|
|
23
|
-
box-shadow: inset 0 0 0 1px var(--color-interactive-secondary);
|
|
24
|
-
}
|
|
25
|
-
.np-select-input-option-container--disabled {
|
|
26
|
-
opacity: 0.45;
|
|
27
|
-
}
|
|
28
|
-
.np-select-input-option {
|
|
29
|
-
flex: 1;
|
|
30
|
-
}
|
|
31
|
-
.np-select-input-option-check--not-selected {
|
|
32
|
-
visibility: hidden;
|
|
33
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.np-select-input-option-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
cursor: default;
|
|
4
|
-
user-select: none;
|
|
5
|
-
align-items: center;
|
|
6
|
-
column-gap: var(--size-8);
|
|
7
|
-
border-radius: var(--radius-small);
|
|
8
|
-
padding: var(--size-12) var(--size-16);
|
|
9
|
-
color: var(--color-interactive-primary);
|
|
10
|
-
|
|
11
|
-
&:focus {
|
|
12
|
-
outline: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&--active {
|
|
16
|
-
box-shadow: inset 0 0 0 1px var(--color-interactive-secondary);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&--disabled {
|
|
20
|
-
opacity: 0.45;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.np-select-input-option {
|
|
25
|
-
flex: 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.np-select-input-option-check {
|
|
29
|
-
&--not-selected {
|
|
30
|
-
visibility: hidden;
|
|
31
|
-
}
|
|
32
|
-
}
|