@taiv/ui 1.3.2 → 1.4.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/dist/components/Data/Cards/ChartCard.d.ts +2 -1
- package/dist/components/Data/Cards/ChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/ChartCard.js +6 -4
- package/dist/components/Data/Cards/PieChartCard.d.ts +2 -1
- package/dist/components/Data/Cards/PieChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/PieChartCard.js +6 -4
- package/dist/components/Data/Cards/StatsCard.d.ts +1 -1
- package/dist/components/Data/Cards/StatsCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/StatsCard.js +4 -4
- package/dist/components/Data/Chart.js +4 -4
- package/dist/components/Data/CheckboxTable.d.ts +1 -1
- package/dist/components/Data/CheckboxTable.d.ts.map +1 -1
- package/dist/components/Data/CheckboxTable.js +6 -6
- package/dist/components/Data/PieChart.js +4 -4
- package/dist/components/Info/InfoCard.d.ts +1 -1
- package/dist/components/Info/InfoCard.d.ts.map +1 -1
- package/dist/components/Info/InfoCard.js +2 -2
- package/dist/components/Info/Modals/Modal.js +2 -2
- package/dist/components/Info/Notifications/variants.js +1 -1
- package/dist/components/Info/Tooltips/FormulaTooltip.js +3 -3
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts +16 -1
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip.js +18 -4
- package/dist/components/Inputs/Buttons/Button/Button.d.ts +12 -0
- package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.js +37 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +11 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +176 -0
- package/dist/components/Inputs/Buttons/Button/sizes.d.ts +25 -0
- package/dist/components/Inputs/Buttons/Button/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/sizes.js +7 -0
- package/dist/components/Inputs/Buttons/Button/variants.d.ts +191 -0
- package/dist/components/Inputs/Buttons/Button/variants.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/variants.js +191 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts +10 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.js +6 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts +8 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.js +97 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts +27 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.js +55 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts +10 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.js +154 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts +8 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Radio/Radio.js +43 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts +10 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.js +143 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts +16 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.js +24 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts +11 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.js +138 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +29 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.js +40 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +11 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +179 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts +12 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +74 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts +12 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.js +203 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts +17 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +70 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts +14 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.js +362 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts +11 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +48 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.js +215 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts +9 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.js +65 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +94 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.js +260 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts +11 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.js +62 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.js +242 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts +16 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.js +91 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts +6 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.js +37 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts +11 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +57 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.js +218 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +52 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.js +235 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts +7 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +23 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.js +202 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +33 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.js +231 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +32 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.js +219 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +8 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.js +6 -0
- package/dist/components/Layout/Box/Box.d.ts +10 -0
- package/dist/components/Layout/Box/Box.d.ts.map +1 -0
- package/dist/components/Layout/Box/Box.js +6 -0
- package/dist/components/Layout/Box/Box.stories.d.ts +9 -0
- package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -0
- package/dist/components/Layout/Box/Box.stories.js +121 -0
- package/dist/components/Layout/Card/Card.d.ts +8 -0
- package/dist/components/Layout/Card/Card.d.ts.map +1 -0
- package/dist/components/Layout/Card/Card.js +16 -0
- package/dist/components/Layout/Center/Center.d.ts +9 -0
- package/dist/components/Layout/Center/Center.d.ts.map +1 -0
- package/dist/components/Layout/Center/Center.js +6 -0
- package/dist/components/Layout/Divider/Divider.d.ts +10 -0
- package/dist/components/Layout/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Layout/Divider/Divider.js +7 -0
- package/dist/components/Layout/Frame/Frame.d.ts +12 -0
- package/dist/components/Layout/Frame/Frame.d.ts.map +1 -0
- package/dist/components/Layout/Frame/Frame.js +7 -0
- package/dist/components/Layout/Grid/Grid.d.ts +10 -0
- package/dist/components/Layout/Grid/Grid.d.ts.map +1 -0
- package/dist/components/Layout/Grid/Grid.js +9 -0
- package/dist/components/Layout/Group/Group.d.ts +10 -0
- package/dist/components/Layout/Group/Group.d.ts.map +1 -0
- package/dist/components/Layout/Group/Group.js +6 -0
- package/dist/components/Layout/Loader/Loader.d.ts +8 -0
- package/dist/components/Layout/Loader/Loader.d.ts.map +1 -0
- package/dist/components/Layout/Loader/Loader.js +6 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +11 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -0
- package/dist/components/Layout/SectionCard/SectionCard.js +13 -0
- package/dist/components/Layout/Stack/Stack.d.ts +10 -0
- package/dist/components/Layout/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Layout/Stack/Stack.js +6 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts +9 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -0
- package/dist/components/Layout/Stack/Stack.stories.js +108 -0
- package/dist/components/Layout/Tabs/Tabs.d.ts +17 -0
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Layout/Tabs/Tabs.js +48 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts +8 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -0
- package/dist/components/Misc/IconBadge/IconBadge.js +28 -0
- package/dist/components/Misc/Transition/Transition.d.ts +4 -0
- package/dist/components/Misc/Transition/Transition.d.ts.map +1 -0
- package/dist/components/Misc/Transition/Transition.js +6 -0
- package/dist/components/Typography/CollapsibleText.js +4 -4
- package/dist/components/Typography/Formula.d.ts.map +1 -1
- package/dist/components/Typography/Formula.js +2 -6
- package/dist/components/Typography/Fraction.js +2 -2
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text.js +0 -2
- package/dist/components/index.d.ts +32 -32
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +32 -32
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
- package/dist/hooks/useConfirmationModal.js +6 -6
- package/dist/hooks/useInfoModal.d.ts.map +1 -1
- package/dist/hooks/useInfoModal.js +4 -4
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/select.d.ts +1 -0
- package/dist/utils/select.d.ts.map +1 -1
- package/dist/utils/select.js +18 -0
- package/package.json +10 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export const FONTS = [
|
|
2
|
+
{ value: 'Poppins', label: 'Poppins' },
|
|
3
|
+
{ value: 'Insanibu', label: 'Insanibu' },
|
|
4
|
+
{ value: 'MINI_Serif', label: 'MINI_Serif' },
|
|
5
|
+
{ value: 'CHEESEPIZZA', label: 'CHEESEPIZZA' },
|
|
6
|
+
{ value: 'BMW', label: 'BMW' },
|
|
7
|
+
{ value: 'Abrakatebra', label: 'Abrakatebra' },
|
|
8
|
+
{ value: 'Aramisi', label: 'Aramisi' },
|
|
9
|
+
{ value: 'Facebook', label: 'Facebook' },
|
|
10
|
+
{ value: 'Merriweather', label: 'Merriweather' },
|
|
11
|
+
{ value: 'MINI_Sans', label: 'MINI_Sans' },
|
|
12
|
+
{ value: 'Arvo', label: 'Arvo' },
|
|
13
|
+
{ value: 'Dolce_Vita', label: 'Dolce_Vita' },
|
|
14
|
+
{ value: 'Spectral', label: 'Spectral' },
|
|
15
|
+
{ value: 'Twitter', label: 'Twitter' },
|
|
16
|
+
{ value: 'CaviarDreams', label: 'CaviarDreams' },
|
|
17
|
+
{ value: 'Freestyle_Script', label: 'Freestyle_Script' },
|
|
18
|
+
{ value: 'Roboto', label: 'Roboto' },
|
|
19
|
+
{ value: 'Cardo', label: 'Cardo' },
|
|
20
|
+
{ value: 'Oswald', label: 'Oswald' },
|
|
21
|
+
{ value: 'Nunito', label: 'Nunito' },
|
|
22
|
+
{ value: 'Oxygen', label: 'Oxygen' },
|
|
23
|
+
{ value: 'arial', label: 'arial' },
|
|
24
|
+
{ value: 'Lora', label: 'Lora' },
|
|
25
|
+
{ value: 'Montserrat', label: 'Montserrat' },
|
|
26
|
+
{ value: 'College_Block', label: 'College_Block' },
|
|
27
|
+
{ value: 'Karla', label: 'Karla' },
|
|
28
|
+
{ value: 'Raleway', label: 'Raleway' },
|
|
29
|
+
{ value: 'Rubik', label: 'Rubik' },
|
|
30
|
+
{ value: 'Underground', label: 'Underground' },
|
|
31
|
+
{ value: 'SS_Nickson_One', label: 'SS_Nickson_One' },
|
|
32
|
+
{ value: 'Instagram', label: 'Instagram' },
|
|
33
|
+
{ value: 'Cormorant', label: 'Cormorant' },
|
|
34
|
+
{ value: 'Hamburger_Heaven', label: 'Hamburger_Heaven' },
|
|
35
|
+
{ value: 'Coquette_Regular', label: 'Coquette_Regular' },
|
|
36
|
+
{ value: 'Lato', label: 'Lato' },
|
|
37
|
+
];
|
|
38
|
+
export const FONT_SIZES = [
|
|
39
|
+
{ value: '5', label: '5' },
|
|
40
|
+
{ value: '5.5', label: '5.5' },
|
|
41
|
+
{ value: '6.5', label: '6.5' },
|
|
42
|
+
{ value: '7.5', label: '7.5' },
|
|
43
|
+
{ value: '8', label: '8' },
|
|
44
|
+
{ value: '9', label: '9' },
|
|
45
|
+
{ value: '10', label: '10' },
|
|
46
|
+
{ value: '10.5', label: '10.5' },
|
|
47
|
+
{ value: '11', label: '11' },
|
|
48
|
+
{ value: '12', label: '12' },
|
|
49
|
+
{ value: '14', label: '14' },
|
|
50
|
+
{ value: '16', label: '16' },
|
|
51
|
+
{ value: '18', label: '18' },
|
|
52
|
+
{ value: '20', label: '20' },
|
|
53
|
+
{ value: '22', label: '22' },
|
|
54
|
+
{ value: '24', label: '24' },
|
|
55
|
+
{ value: '26', label: '26' },
|
|
56
|
+
{ value: '28', label: '28' },
|
|
57
|
+
{ value: '36', label: '36' },
|
|
58
|
+
{ value: '40', label: '40' },
|
|
59
|
+
{ value: '44', label: '44' },
|
|
60
|
+
{ value: '48', label: '48' },
|
|
61
|
+
{ value: '58', label: '58' },
|
|
62
|
+
{ value: '64', label: '64' },
|
|
63
|
+
{ value: '72', label: '72' },
|
|
64
|
+
];
|
|
65
|
+
export default { FONTS, FONT_SIZES };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MultiSelectProps as MantineMultiSelectProps } from '@mantine/core';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
import { componentSizes } from '../shared/sizes';
|
|
4
|
+
interface MultiSelectProps extends MantineMultiSelectProps {
|
|
5
|
+
size?: keyof typeof componentSizes;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
styles?: Record<string, CSSObject>;
|
|
9
|
+
}
|
|
10
|
+
export declare const MultiSelect: ({ size, width, fullWidth, placeholder, styles, ...props }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,UAAU,gBAAiB,SAAQ,uBAAuB;IACxD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,WAAW,GAAI,2DAA6F,gBAAgB,4CA0FxI,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MultiSelect as MantineMultiSelect } from '@mantine/core';
|
|
3
|
+
import { neutral, primary } from '../../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../../constants/font';
|
|
5
|
+
import { componentSizes } from '../shared/sizes';
|
|
6
|
+
export const MultiSelect = ({ size = 'md', width, fullWidth = false, placeholder = 'Select options', styles, ...props }) => {
|
|
7
|
+
const selectedSize = componentSizes[size];
|
|
8
|
+
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.maxWidth}rem`;
|
|
9
|
+
const style = {
|
|
10
|
+
input: {
|
|
11
|
+
height: 'auto',
|
|
12
|
+
minHeight: `${selectedSize.height}rem`,
|
|
13
|
+
padding: selectedSize.inputPadding,
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
...fontBase,
|
|
18
|
+
fontSize: selectedSize.fontSize,
|
|
19
|
+
color: neutral[200],
|
|
20
|
+
border: `1px solid ${neutral[100]}`,
|
|
21
|
+
borderRadius: '8px',
|
|
22
|
+
backgroundColor: 'white',
|
|
23
|
+
transition: 'all 200ms ease-in-out',
|
|
24
|
+
'&:hover': {
|
|
25
|
+
backgroundColor: 'white',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
dropdown: {
|
|
29
|
+
border: 'none',
|
|
30
|
+
borderRadius: '8px',
|
|
31
|
+
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
|
32
|
+
},
|
|
33
|
+
item: {
|
|
34
|
+
padding: selectedSize.dropdownPadding,
|
|
35
|
+
marginBottom: '0.5rem',
|
|
36
|
+
borderRadius: '8px',
|
|
37
|
+
...fontBase,
|
|
38
|
+
fontSize: selectedSize.fontSize,
|
|
39
|
+
color: neutral[200],
|
|
40
|
+
backgroundColor: 'white',
|
|
41
|
+
'&[data-selected]': {
|
|
42
|
+
backgroundColor: neutral[50],
|
|
43
|
+
color: neutral[200],
|
|
44
|
+
'&:hover': {
|
|
45
|
+
backgroundColor: neutral[50],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'&:hover': {
|
|
49
|
+
backgroundColor: neutral[50],
|
|
50
|
+
},
|
|
51
|
+
'&:not(:hover):not([data-selected])': {
|
|
52
|
+
backgroundColor: 'white',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
value: {
|
|
56
|
+
padding: selectedSize.valuePadding,
|
|
57
|
+
borderRadius: '25px',
|
|
58
|
+
...fontBase,
|
|
59
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.125rem)`,
|
|
60
|
+
color: primary[300],
|
|
61
|
+
backgroundColor: primary[50],
|
|
62
|
+
'&:hover': {
|
|
63
|
+
backgroundColor: primary[50],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultValueRemove: {
|
|
67
|
+
marginLeft: '0.75rem',
|
|
68
|
+
borderRadius: '50%',
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
color: primary[300],
|
|
73
|
+
backgroundColor: primary[25],
|
|
74
|
+
'&:hover': {
|
|
75
|
+
backgroundColor: primary[25],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
label: {
|
|
79
|
+
...fontBase,
|
|
80
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
81
|
+
color: neutral[200],
|
|
82
|
+
},
|
|
83
|
+
defaultValueLabel: {
|
|
84
|
+
...fontBase,
|
|
85
|
+
},
|
|
86
|
+
searchInput: {
|
|
87
|
+
...fontBase,
|
|
88
|
+
fontSize: selectedSize.fontSize,
|
|
89
|
+
color: neutral[200],
|
|
90
|
+
},
|
|
91
|
+
...styles,
|
|
92
|
+
};
|
|
93
|
+
return _jsx(MantineMultiSelect, { placeholder: placeholder, size: size, w: computedWidth, styles: style, maxDropdownHeight: selectedSize.dropdownHeight, searchable: true, ...props });
|
|
94
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { MultiSelect } from './MultiSelect';
|
|
3
|
+
declare const meta: Meta<typeof MultiSelect>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Variants: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
9
|
+
export declare const States: Story;
|
|
10
|
+
export declare const AdditionalFunctionality: Story;
|
|
11
|
+
export declare const CustomStyling: Story;
|
|
12
|
+
//# sourceMappingURL=MultiSelect.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAkHlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAmCrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KActB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAsBrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAuD3B,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MultiSelect } from './MultiSelect';
|
|
3
|
+
import { Group } from '../../../Layout/Group/Group';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Inputs/Dropdowns/MultiSelect',
|
|
6
|
+
component: MultiSelect,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
size: {
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
options: ['sm', 'md', 'lg'],
|
|
14
|
+
description: 'Controls the multi select size',
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: "'sm' | 'md' | 'lg'" },
|
|
17
|
+
defaultValue: { summary: "'md'" },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
placeholder: {
|
|
21
|
+
control: { type: 'text' },
|
|
22
|
+
description: 'Placeholder text',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'string' },
|
|
25
|
+
defaultValue: { summary: "'Select options'" },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
control: { type: 'text' },
|
|
30
|
+
description: 'Multi select label',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: 'string' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
description: {
|
|
36
|
+
control: { type: 'text' },
|
|
37
|
+
description: 'Description text',
|
|
38
|
+
table: {
|
|
39
|
+
type: { summary: 'string' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
control: { type: 'text' },
|
|
44
|
+
description: 'Error message',
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: 'string' },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
control: { type: 'boolean' },
|
|
51
|
+
description: 'Disabled state',
|
|
52
|
+
table: {
|
|
53
|
+
type: { summary: 'boolean' },
|
|
54
|
+
defaultValue: { summary: 'false' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: {
|
|
58
|
+
control: { type: 'boolean' },
|
|
59
|
+
description: 'Required field',
|
|
60
|
+
table: {
|
|
61
|
+
type: { summary: 'boolean' },
|
|
62
|
+
defaultValue: { summary: 'false' },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
fullWidth: {
|
|
66
|
+
control: { type: 'boolean' },
|
|
67
|
+
description: 'Full width of container',
|
|
68
|
+
table: {
|
|
69
|
+
type: { summary: 'boolean' },
|
|
70
|
+
defaultValue: { summary: 'false' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
width: {
|
|
74
|
+
control: { type: 'text' },
|
|
75
|
+
description: 'Custom width',
|
|
76
|
+
table: {
|
|
77
|
+
type: { summary: 'string | number' },
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
clearable: {
|
|
81
|
+
control: { type: 'boolean' },
|
|
82
|
+
description: 'Allow clearing all selections',
|
|
83
|
+
table: {
|
|
84
|
+
type: { summary: 'boolean' },
|
|
85
|
+
defaultValue: { summary: 'false' },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
searchable: {
|
|
89
|
+
control: { type: 'boolean' },
|
|
90
|
+
description: 'Allow searching options',
|
|
91
|
+
table: {
|
|
92
|
+
type: { summary: 'boolean' },
|
|
93
|
+
defaultValue: { summary: 'true' },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
maxSelectedValues: {
|
|
97
|
+
control: { type: 'number' },
|
|
98
|
+
description: 'Maximum number of selected values',
|
|
99
|
+
table: {
|
|
100
|
+
type: { summary: 'number' },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
styles: {
|
|
104
|
+
control: { type: 'object' },
|
|
105
|
+
description: 'Custom styles object',
|
|
106
|
+
table: {
|
|
107
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
onChange: {
|
|
111
|
+
action: 'changed',
|
|
112
|
+
description: 'Change handler function',
|
|
113
|
+
table: {
|
|
114
|
+
type: { summary: '(value: string[]) => void' },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
export default meta;
|
|
120
|
+
const basicOptions = [
|
|
121
|
+
{ value: 'option1', label: 'Option 1' },
|
|
122
|
+
{ value: 'option2', label: 'Option 2' },
|
|
123
|
+
{ value: 'option3', label: 'Option 3' },
|
|
124
|
+
{ value: 'option4', label: 'Option 4' },
|
|
125
|
+
{ value: 'option5', label: 'Option 5' },
|
|
126
|
+
];
|
|
127
|
+
const tagOptions = [
|
|
128
|
+
{ value: 'react', label: 'React' },
|
|
129
|
+
{ value: 'vue', label: 'Vue' },
|
|
130
|
+
{ value: 'angular', label: 'Angular' },
|
|
131
|
+
{ value: 'svelte', label: 'Svelte' },
|
|
132
|
+
{ value: 'typescript', label: 'TypeScript' },
|
|
133
|
+
{ value: 'javascript', label: 'JavaScript' },
|
|
134
|
+
{ value: 'python', label: 'Python' },
|
|
135
|
+
{ value: 'java', label: 'Java' },
|
|
136
|
+
];
|
|
137
|
+
export const Default = {
|
|
138
|
+
args: {
|
|
139
|
+
label: 'Choose multiple options',
|
|
140
|
+
data: basicOptions,
|
|
141
|
+
size: 'md',
|
|
142
|
+
disabled: false,
|
|
143
|
+
required: false,
|
|
144
|
+
fullWidth: false,
|
|
145
|
+
clearable: false,
|
|
146
|
+
searchable: true,
|
|
147
|
+
},
|
|
148
|
+
decorators: [
|
|
149
|
+
(Story) => (_jsx("div", { style: { height: '220px' }, children: _jsx(Story, {}) })),
|
|
150
|
+
],
|
|
151
|
+
parameters: {
|
|
152
|
+
docs: {
|
|
153
|
+
source: {
|
|
154
|
+
code: `<MultiSelect
|
|
155
|
+
label="Choose multiple options"
|
|
156
|
+
value={selectedValues}
|
|
157
|
+
onChange={setSelectedValues}
|
|
158
|
+
data={[
|
|
159
|
+
{ value: '1', label: 'Option 1' },
|
|
160
|
+
{ value: '2', label: 'Option 2' },
|
|
161
|
+
{ value: '3', label: 'Option 3' },
|
|
162
|
+
{ value: '4', label: 'Option 4' },
|
|
163
|
+
]}
|
|
164
|
+
/>`,
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
export const Variants = {
|
|
170
|
+
render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(MultiSelect, { label: "Basic Multi Select", data: basicOptions }), _jsx(MultiSelect, { label: "Tag Selection", data: tagOptions, placeholder: "Select technologies" })] })),
|
|
171
|
+
parameters: {
|
|
172
|
+
docs: {
|
|
173
|
+
source: {
|
|
174
|
+
code: false,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
export const Sizes = {
|
|
180
|
+
render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(MultiSelect, { size: "sm", label: "Small MultiSelect", data: basicOptions }), _jsx(MultiSelect, { size: "md", label: "Medium MultiSelect (Default)", data: basicOptions }), _jsx(MultiSelect, { size: "lg", label: "Large MultiSelect", data: basicOptions })] })),
|
|
181
|
+
parameters: {
|
|
182
|
+
docs: {
|
|
183
|
+
source: {
|
|
184
|
+
code: `<MultiSelect size="sm" label="Small MultiSelect" value={values} onChange={setValues} data={options} />
|
|
185
|
+
<MultiSelect size="lg" label="Large MultiSelect" value={values} onChange={setValues} data={options} />`,
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
export const States = {
|
|
191
|
+
render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(MultiSelect, { label: "Normal Multi Select", data: basicOptions }), _jsx(MultiSelect, { label: "Disabled Multi Select", data: basicOptions, disabled: true }), _jsx(MultiSelect, { label: "Required Multi Select", data: basicOptions, required: true }), _jsx(MultiSelect, { label: "Multi Select with Description", description: "Select multiple options", data: basicOptions }), _jsx(MultiSelect, { label: "Multi Select with Error", error: "Please select at least one option", data: basicOptions })] })),
|
|
192
|
+
parameters: {
|
|
193
|
+
docs: {
|
|
194
|
+
source: {
|
|
195
|
+
code: false,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
export const AdditionalFunctionality = {
|
|
201
|
+
render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(MultiSelect, { label: "Tags", placeholder: "Add or select tags", creatable: true, clearable: true, data: tagOptions }), _jsx(MultiSelect, { label: "Limited Selection", data: basicOptions, maxSelectedValues: 3, placeholder: "Max 3 selections" })] })),
|
|
202
|
+
parameters: {
|
|
203
|
+
docs: {
|
|
204
|
+
source: {
|
|
205
|
+
code: `<MultiSelect
|
|
206
|
+
label="Tags"
|
|
207
|
+
placeholder="Add or select tags"
|
|
208
|
+
creatable
|
|
209
|
+
clearable
|
|
210
|
+
value={tags}
|
|
211
|
+
onChange={setTags}
|
|
212
|
+
data={existingTags}
|
|
213
|
+
/>`,
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
export const CustomStyling = {
|
|
219
|
+
render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(MultiSelect, { label: "Custom Styled Multi Select", data: basicOptions, styles: {
|
|
220
|
+
input: {
|
|
221
|
+
borderColor: '#ff6b6b',
|
|
222
|
+
'&:focus': {
|
|
223
|
+
borderColor: '#ff6b6b',
|
|
224
|
+
boxShadow: '0 0 0 2px rgba(255, 107, 107, 0.2)',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
label: {
|
|
228
|
+
color: '#ff6b6b',
|
|
229
|
+
fontWeight: 600,
|
|
230
|
+
},
|
|
231
|
+
value: {
|
|
232
|
+
backgroundColor: '#ff6b6b',
|
|
233
|
+
color: 'white',
|
|
234
|
+
},
|
|
235
|
+
} }), _jsx(MultiSelect, { label: "Another Custom Style", data: basicOptions, styles: {
|
|
236
|
+
input: {
|
|
237
|
+
backgroundColor: '#f8f9fa',
|
|
238
|
+
borderColor: '#4CAF50',
|
|
239
|
+
'&:focus': {
|
|
240
|
+
borderColor: '#4CAF50',
|
|
241
|
+
boxShadow: '0 0 0 2px rgba(76, 175, 80, 0.2)',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
label: {
|
|
245
|
+
color: '#4CAF50',
|
|
246
|
+
fontSize: '16px',
|
|
247
|
+
},
|
|
248
|
+
value: {
|
|
249
|
+
backgroundColor: '#4CAF50',
|
|
250
|
+
color: 'white',
|
|
251
|
+
},
|
|
252
|
+
} })] })),
|
|
253
|
+
parameters: {
|
|
254
|
+
docs: {
|
|
255
|
+
source: {
|
|
256
|
+
code: false,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectProps as MantineSelectProps } from '@mantine/core';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
import { componentSizes } from '../shared/sizes';
|
|
4
|
+
export interface SelectProps extends MantineSelectProps {
|
|
5
|
+
size?: keyof typeof componentSizes;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
styles?: Record<string, CSSObject>;
|
|
9
|
+
}
|
|
10
|
+
export declare const Select: ({ size, width, fullWidth, placeholder, styles, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,MAAM,GAAI,2DAA+F,WAAW,4CA0DhI,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Select as MantineSelect } from '@mantine/core';
|
|
3
|
+
import { neutral } from '../../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../../constants/font';
|
|
5
|
+
import { componentSizes } from '../shared/sizes';
|
|
6
|
+
export const Select = ({ size = 'md', width, fullWidth = false, placeholder = 'Select an option', styles, ...props }) => {
|
|
7
|
+
const selectedSize = componentSizes[size];
|
|
8
|
+
const style = {
|
|
9
|
+
root: {
|
|
10
|
+
width: fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`,
|
|
11
|
+
},
|
|
12
|
+
input: {
|
|
13
|
+
height: `${selectedSize.height}rem`,
|
|
14
|
+
paddingRight: selectedSize.inputPadding,
|
|
15
|
+
...fontBase,
|
|
16
|
+
fontSize: selectedSize.fontSize,
|
|
17
|
+
color: neutral[300],
|
|
18
|
+
borderRadius: '8px',
|
|
19
|
+
border: `1px solid ${neutral[100]}`,
|
|
20
|
+
textOverflow: 'ellipsis',
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
transition: 'all 200ms ease-in-out',
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
...fontBase,
|
|
26
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
27
|
+
color: neutral[200],
|
|
28
|
+
},
|
|
29
|
+
dropdown: {
|
|
30
|
+
border: 'none',
|
|
31
|
+
borderRadius: '8px',
|
|
32
|
+
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
|
33
|
+
},
|
|
34
|
+
item: {
|
|
35
|
+
padding: selectedSize.dropdownPadding,
|
|
36
|
+
marginBottom: '0.2rem',
|
|
37
|
+
...fontBase,
|
|
38
|
+
fontSize: selectedSize.fontSize,
|
|
39
|
+
color: neutral[200],
|
|
40
|
+
borderRadius: '8px',
|
|
41
|
+
backgroundColor: 'white',
|
|
42
|
+
'&[data-selected]': {
|
|
43
|
+
backgroundColor: neutral[50],
|
|
44
|
+
color: neutral[200],
|
|
45
|
+
'&:hover': {
|
|
46
|
+
backgroundColor: neutral[50],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'&:hover': {
|
|
50
|
+
backgroundColor: neutral[50],
|
|
51
|
+
},
|
|
52
|
+
'&:not(:hover):not([data-selected])': {
|
|
53
|
+
backgroundColor: 'white',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
rightSection: {
|
|
57
|
+
color: neutral[200],
|
|
58
|
+
},
|
|
59
|
+
...styles,
|
|
60
|
+
};
|
|
61
|
+
return _jsx(MantineSelect, { radius: "md", size: size, styles: style, placeholder: placeholder, maxDropdownHeight: selectedSize.dropdownHeight, ...props });
|
|
62
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Select } from './Select';
|
|
3
|
+
declare const meta: Meta<typeof Select>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Sizes: Story;
|
|
8
|
+
export declare const States: Story;
|
|
9
|
+
export declare const WithFeatures: Story;
|
|
10
|
+
export declare const FullWidth: Story;
|
|
11
|
+
export declare const CustomStyles: Story;
|
|
12
|
+
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA2G7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmBnC,eAAO,MAAM,OAAO,EAAE,KAmCrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAqB1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAiD1B,CAAC"}
|