@taiv/ui 1.4.4 → 1.4.6
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/Info/Tooltips/InfoTooltip.d.ts +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -1
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts +5 -0
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts.map +1 -0
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.js +9 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/package.json +1 -1
- package/dist/components/Data/JustChart.d.ts +0 -23
- package/dist/components/Data/JustChart.d.ts.map +0 -1
- package/dist/components/Data/JustChart.js +0 -70
- package/dist/components/Data/JustPieChart.d.ts +0 -20
- package/dist/components/Data/JustPieChart.d.ts.map +0 -1
- package/dist/components/Data/JustPieChart.js +0 -63
- package/dist/components/Data/StatsCard.d.ts +0 -17
- package/dist/components/Data/StatsCard.d.ts.map +0 -1
- package/dist/components/Data/StatsCard.js +0 -38
- package/dist/components/Data/shared/chartFormats.d.ts +0 -8
- package/dist/components/Data/shared/chartFormats.d.ts.map +0 -1
- package/dist/components/Data/shared/chartFormats.js +0 -29
- package/dist/components/Data/shared/dataFormats.d.ts +0 -9
- package/dist/components/Data/shared/dataFormats.d.ts.map +0 -1
- package/dist/components/Data/shared/dataFormats.js +0 -20
- package/dist/components/Inputs/Buttons/Button.d.ts +0 -12
- package/dist/components/Inputs/Buttons/Button.d.ts.map +0 -1
- package/dist/components/Inputs/Buttons/Button.js +0 -37
- package/dist/components/Inputs/Buttons/UnstyledButton.d.ts +0 -10
- package/dist/components/Inputs/Buttons/UnstyledButton.d.ts.map +0 -1
- package/dist/components/Inputs/Buttons/UnstyledButton.js +0 -6
- package/dist/components/Inputs/Buttons/shared/sizes.d.ts +0 -25
- package/dist/components/Inputs/Buttons/shared/sizes.d.ts.map +0 -1
- package/dist/components/Inputs/Buttons/shared/sizes.js +0 -7
- package/dist/components/Inputs/Buttons/shared/variants.d.ts +0 -191
- package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +0 -1
- package/dist/components/Inputs/Buttons/shared/variants.js +0 -191
- package/dist/components/Inputs/Controls/Checkbox.d.ts +0 -27
- package/dist/components/Inputs/Controls/Checkbox.d.ts.map +0 -1
- package/dist/components/Inputs/Controls/Checkbox.js +0 -55
- package/dist/components/Inputs/Controls/Radio.d.ts +0 -8
- package/dist/components/Inputs/Controls/Radio.d.ts.map +0 -1
- package/dist/components/Inputs/Controls/Radio.js +0 -43
- package/dist/components/Inputs/Controls/RadioList.d.ts +0 -16
- package/dist/components/Inputs/Controls/RadioList.d.ts.map +0 -1
- package/dist/components/Inputs/Controls/RadioList.js +0 -24
- package/dist/components/Inputs/Controls/Toggle.d.ts +0 -29
- package/dist/components/Inputs/Controls/Toggle.d.ts.map +0 -1
- package/dist/components/Inputs/Controls/Toggle.js +0 -42
- package/dist/components/Inputs/DatePickers/DatePicker.d.ts +0 -12
- package/dist/components/Inputs/DatePickers/DatePicker.d.ts.map +0 -1
- package/dist/components/Inputs/DatePickers/DatePicker.js +0 -71
- package/dist/components/Inputs/Dates/DatePicker.d.ts +0 -12
- package/dist/components/Inputs/Dates/DatePicker.d.ts.map +0 -1
- package/dist/components/Inputs/Dates/DatePicker.js +0 -71
- package/dist/components/Inputs/Dropdowns/CascadingSelect.d.ts +0 -17
- package/dist/components/Inputs/Dropdowns/CascadingSelect.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/CascadingSelect.js +0 -70
- package/dist/components/Inputs/Dropdowns/FontSelect.d.ts +0 -11
- package/dist/components/Inputs/Dropdowns/FontSelect.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/FontSelect.js +0 -48
- package/dist/components/Inputs/Dropdowns/MultiSelect.d.ts +0 -12
- package/dist/components/Inputs/Dropdowns/MultiSelect.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect.js +0 -94
- package/dist/components/Inputs/Dropdowns/NestedSelect.d.ts +0 -17
- package/dist/components/Inputs/Dropdowns/NestedSelect.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/NestedSelect.js +0 -70
- package/dist/components/Inputs/Dropdowns/Select.d.ts +0 -11
- package/dist/components/Inputs/Dropdowns/Select.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/Select.js +0 -62
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.d.ts +0 -9
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.d.ts.map +0 -1
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.js +0 -65
- package/dist/components/Inputs/Sliders/Slider.d.ts +0 -16
- package/dist/components/Inputs/Sliders/Slider.d.ts.map +0 -1
- package/dist/components/Inputs/Sliders/Slider.js +0 -91
- package/dist/components/Inputs/Sliders/VolumeSlider.d.ts +0 -6
- package/dist/components/Inputs/Sliders/VolumeSlider.d.ts.map +0 -1
- package/dist/components/Inputs/Sliders/VolumeSlider.js +0 -37
- package/dist/components/Inputs/TextInputs/AutoComplete.d.ts +0 -11
- package/dist/components/Inputs/TextInputs/AutoComplete.d.ts.map +0 -1
- package/dist/components/Inputs/TextInputs/AutoComplete.js +0 -57
- package/dist/components/Inputs/TextInputs/PasswordInput.d.ts +0 -12
- package/dist/components/Inputs/TextInputs/PasswordInput.d.ts.map +0 -1
- package/dist/components/Inputs/TextInputs/PasswordInput.js +0 -52
- package/dist/components/Inputs/TextInputs/SearchBar.d.ts +0 -7
- package/dist/components/Inputs/TextInputs/SearchBar.d.ts.map +0 -1
- package/dist/components/Inputs/TextInputs/SearchBar.js +0 -23
- package/dist/components/Inputs/TextInputs/TextArea.d.ts +0 -12
- package/dist/components/Inputs/TextInputs/TextArea.d.ts.map +0 -1
- package/dist/components/Inputs/TextInputs/TextArea.js +0 -33
- package/dist/components/Inputs/TextInputs/TextInput.d.ts +0 -12
- package/dist/components/Inputs/TextInputs/TextInput.d.ts.map +0 -1
- package/dist/components/Inputs/TextInputs/TextInput.js +0 -32
- package/dist/components/Layout/AutoGrid.d.ts +0 -8
- package/dist/components/Layout/AutoGrid.d.ts.map +0 -1
- package/dist/components/Layout/AutoGrid.js +0 -6
- package/dist/components/Layout/Box.d.ts +0 -10
- package/dist/components/Layout/Box.d.ts.map +0 -1
- package/dist/components/Layout/Box.js +0 -6
- package/dist/components/Layout/Card.d.ts +0 -8
- package/dist/components/Layout/Card.d.ts.map +0 -1
- package/dist/components/Layout/Card.js +0 -16
- package/dist/components/Layout/Center.d.ts +0 -9
- package/dist/components/Layout/Center.d.ts.map +0 -1
- package/dist/components/Layout/Center.js +0 -6
- package/dist/components/Layout/Divider.d.ts +0 -10
- package/dist/components/Layout/Divider.d.ts.map +0 -1
- package/dist/components/Layout/Divider.js +0 -7
- package/dist/components/Layout/Frame.d.ts +0 -12
- package/dist/components/Layout/Frame.d.ts.map +0 -1
- package/dist/components/Layout/Frame.js +0 -7
- package/dist/components/Layout/Grid.d.ts +0 -10
- package/dist/components/Layout/Grid.d.ts.map +0 -1
- package/dist/components/Layout/Grid.js +0 -9
- package/dist/components/Layout/Group.d.ts +0 -10
- package/dist/components/Layout/Group.d.ts.map +0 -1
- package/dist/components/Layout/Group.js +0 -6
- package/dist/components/Layout/Loader.d.ts +0 -8
- package/dist/components/Layout/Loader.d.ts.map +0 -1
- package/dist/components/Layout/Loader.js +0 -6
- package/dist/components/Layout/SectionCard.d.ts +0 -11
- package/dist/components/Layout/SectionCard.d.ts.map +0 -1
- package/dist/components/Layout/SectionCard.js +0 -13
- package/dist/components/Layout/Stack.d.ts +0 -10
- package/dist/components/Layout/Stack.d.ts.map +0 -1
- package/dist/components/Layout/Stack.js +0 -6
- package/dist/components/Layout/Tabs.d.ts +0 -17
- package/dist/components/Layout/Tabs.d.ts.map +0 -1
- package/dist/components/Layout/Tabs.js +0 -48
- package/dist/components/Misc/IconBadge.d.ts +0 -8
- package/dist/components/Misc/IconBadge.d.ts.map +0 -1
- package/dist/components/Misc/IconBadge.js +0 -28
- package/dist/components/Misc/Transition.d.ts +0 -4
- package/dist/components/Misc/Transition.d.ts.map +0 -1
- package/dist/components/Misc/Transition.js +0 -6
- package/dist/hooks/useDropdowns.d.ts +0 -9
- package/dist/hooks/useDropdowns.d.ts.map +0 -1
- package/dist/hooks/useDropdowns.js +0 -12
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DatePickerInput as MantineDatePickerInput } from '@mantine/dates';
|
|
3
|
-
import { createStyles } from '@mantine/core';
|
|
4
|
-
import { neutral } from '../../../constants/colors';
|
|
5
|
-
import { fontBase } from '../../../constants/font';
|
|
6
|
-
import { componentSizes } from '../Dropdowns/shared/sizes';
|
|
7
|
-
export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder = 'Pick Date', styles, showIcon = true, ...props }) => {
|
|
8
|
-
const selectedSize = componentSizes[size];
|
|
9
|
-
const { classes } = createStyles(() => ({
|
|
10
|
-
root: {
|
|
11
|
-
width: fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`,
|
|
12
|
-
},
|
|
13
|
-
input: {
|
|
14
|
-
height: `${selectedSize.height}rem`,
|
|
15
|
-
paddingRight: selectedSize.inputPadding,
|
|
16
|
-
...fontBase,
|
|
17
|
-
fontSize: selectedSize.fontSize,
|
|
18
|
-
color: neutral[300],
|
|
19
|
-
borderRadius: '8px',
|
|
20
|
-
border: `1px solid ${neutral[100]}`,
|
|
21
|
-
transition: 'all 200ms ease-in-out',
|
|
22
|
-
},
|
|
23
|
-
placeholder: {
|
|
24
|
-
...fontBase,
|
|
25
|
-
fontSize: selectedSize.fontSize,
|
|
26
|
-
color: neutral[200],
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
...fontBase,
|
|
30
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
31
|
-
color: neutral[200],
|
|
32
|
-
},
|
|
33
|
-
calendar: {
|
|
34
|
-
'& .mantine-UnstyledButton-root': {
|
|
35
|
-
borderRadius: '8px',
|
|
36
|
-
fontFamily: 'Poppins, sans-serif',
|
|
37
|
-
},
|
|
38
|
-
'& .mantine-Day-day': {
|
|
39
|
-
borderRadius: '50%',
|
|
40
|
-
},
|
|
41
|
-
'& .mantine-Day-day[data-selected="true"]': {
|
|
42
|
-
fontFamily: 'Poppins, sans-serif',
|
|
43
|
-
borderRadius: '50%',
|
|
44
|
-
},
|
|
45
|
-
'& .mantine-Day-day[data-in-range="true"]': {
|
|
46
|
-
fontFamily: 'Poppins, sans-serif',
|
|
47
|
-
borderRadius: '50%',
|
|
48
|
-
},
|
|
49
|
-
'& .mantine-Day-day[data-first-in-range="true"]': {
|
|
50
|
-
fontFamily: 'Poppins, sans-serif',
|
|
51
|
-
borderRadius: '50%',
|
|
52
|
-
},
|
|
53
|
-
'& .mantine-Day-day[data-last-in-range="true"]': {
|
|
54
|
-
fontFamily: 'Poppins, sans-serif',
|
|
55
|
-
borderRadius: '50%',
|
|
56
|
-
},
|
|
57
|
-
'& .mantine-WeekdaysRow-weekday': {
|
|
58
|
-
textAlign: 'center',
|
|
59
|
-
fontFamily: 'Poppins, sans-serif',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
...styles,
|
|
63
|
-
}))();
|
|
64
|
-
return (_jsx(MantineDatePickerInput, { icon: showIcon ? _jsx("i", { className: "far fa-calendar", style: { fontSize: 14, marginLeft: '0.25rem' } }) : undefined, radius: "lg", size: "xl", classNames: {
|
|
65
|
-
root: classes.root,
|
|
66
|
-
input: classes.input,
|
|
67
|
-
placeholder: classes.placeholder,
|
|
68
|
-
label: classes.label,
|
|
69
|
-
calendar: classes.calendar,
|
|
70
|
-
}, placeholder: placeholder, popoverProps: { radius: 'lg' }, ...props }));
|
|
71
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DatePickerInputProps as MantineDatePickerInputProps } from '@mantine/dates';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
|
-
import { componentSizes } from '../Dropdowns/shared/sizes';
|
|
4
|
-
export interface DatePickerProps<T extends 'default' | 'multiple' | 'range' = 'default'> extends Omit<MantineDatePickerInputProps<T>, 'styles'> {
|
|
5
|
-
size?: keyof typeof componentSizes;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
styles?: Record<string, CSSObject>;
|
|
9
|
-
showIcon?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const DatePicker: <T extends "default" | "multiple" | "range" = "default">({ size, width, fullWidth, placeholder, styles, showIcon, ...props }: DatePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dates/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEhI,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAE,SAAQ,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC7I,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;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,EAAE,qEAQhF,eAAe,CAAC,CAAC,CAAC,4CA4EpB,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DatePickerInput as MantineDatePickerInput } from '@mantine/dates';
|
|
3
|
-
import { createStyles } from '@mantine/core';
|
|
4
|
-
import { neutral } from '../../../constants/colors';
|
|
5
|
-
import { fontBase } from '../../../constants/font';
|
|
6
|
-
import { componentSizes } from '../Dropdowns/shared/sizes';
|
|
7
|
-
export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder = 'Pick Date', styles, showIcon = true, ...props }) => {
|
|
8
|
-
const selectedSize = componentSizes[size];
|
|
9
|
-
const { classes } = createStyles(() => ({
|
|
10
|
-
root: {
|
|
11
|
-
width: fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`,
|
|
12
|
-
},
|
|
13
|
-
input: {
|
|
14
|
-
height: `${selectedSize.height}rem`,
|
|
15
|
-
paddingRight: selectedSize.inputPadding,
|
|
16
|
-
...fontBase,
|
|
17
|
-
fontSize: selectedSize.fontSize,
|
|
18
|
-
color: neutral[300],
|
|
19
|
-
borderRadius: '8px',
|
|
20
|
-
border: `1px solid ${neutral[100]}`,
|
|
21
|
-
transition: 'all 200ms ease-in-out',
|
|
22
|
-
},
|
|
23
|
-
placeholder: {
|
|
24
|
-
...fontBase,
|
|
25
|
-
fontSize: selectedSize.fontSize,
|
|
26
|
-
color: neutral[200],
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
...fontBase,
|
|
30
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
31
|
-
color: neutral[200],
|
|
32
|
-
},
|
|
33
|
-
calendar: {
|
|
34
|
-
'& .mantine-UnstyledButton-root': {
|
|
35
|
-
borderRadius: '8px',
|
|
36
|
-
fontFamily: 'Poppins, sans-serif',
|
|
37
|
-
},
|
|
38
|
-
'& .mantine-Day-day': {
|
|
39
|
-
borderRadius: '50%',
|
|
40
|
-
},
|
|
41
|
-
'& .mantine-Day-day[data-selected="true"]': {
|
|
42
|
-
fontFamily: 'Poppins, sans-serif',
|
|
43
|
-
borderRadius: '50%',
|
|
44
|
-
},
|
|
45
|
-
'& .mantine-Day-day[data-in-range="true"]': {
|
|
46
|
-
fontFamily: 'Poppins, sans-serif',
|
|
47
|
-
borderRadius: '50%',
|
|
48
|
-
},
|
|
49
|
-
'& .mantine-Day-day[data-first-in-range="true"]': {
|
|
50
|
-
fontFamily: 'Poppins, sans-serif',
|
|
51
|
-
borderRadius: '50%',
|
|
52
|
-
},
|
|
53
|
-
'& .mantine-Day-day[data-last-in-range="true"]': {
|
|
54
|
-
fontFamily: 'Poppins, sans-serif',
|
|
55
|
-
borderRadius: '50%',
|
|
56
|
-
},
|
|
57
|
-
'& .mantine-WeekdaysRow-weekday': {
|
|
58
|
-
textAlign: 'center',
|
|
59
|
-
fontFamily: 'Poppins, sans-serif',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
...styles,
|
|
63
|
-
}))();
|
|
64
|
-
return (_jsx(MantineDatePickerInput, { icon: showIcon ? _jsx("i", { className: "far fa-calendar", style: { fontSize: 14, marginLeft: '0.25rem' } }) : undefined, radius: "lg", size: "xl", classNames: {
|
|
65
|
-
root: classes.root,
|
|
66
|
-
input: classes.input,
|
|
67
|
-
placeholder: classes.placeholder,
|
|
68
|
-
label: classes.label,
|
|
69
|
-
calendar: classes.calendar,
|
|
70
|
-
}, placeholder: placeholder, popoverProps: { radius: 'lg' }, ...props }));
|
|
71
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SelectProps } from './Select';
|
|
3
|
-
import { SelectOption } from '../../../utils/select';
|
|
4
|
-
export type CascadingSelectItemProps = {
|
|
5
|
-
option: SelectOption;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
children?: CascadingSelectItemProps[];
|
|
8
|
-
};
|
|
9
|
-
export interface NestedSelectProps extends Omit<SelectProps, 'value' | 'data'> {
|
|
10
|
-
data?: CascadingSelectItemProps[];
|
|
11
|
-
value?: string | null;
|
|
12
|
-
width?: string | number;
|
|
13
|
-
fullWidth?: boolean;
|
|
14
|
-
}
|
|
15
|
-
declare const NestedSelect: ({ data, value, placeholder, size, width, fullWidth, styles, ...props }: NestedSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export { NestedSelect as CascadingSelect };
|
|
17
|
-
//# sourceMappingURL=CascadingSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CascadingSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/CascadingSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5E,IAAI,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,GAAI,wEAAiH,iBAAiB,4CA+EvJ,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Group } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { componentSizes } from './shared/sizes';
|
|
5
|
-
import { Select } from './Select';
|
|
6
|
-
import { Text } from '../../Typography/Text';
|
|
7
|
-
import { fontBase } from '../../../constants/font';
|
|
8
|
-
const NestedSelect = ({ data = [], value, placeholder = 'Select an option', size = 'md', width, fullWidth = false, styles, ...props }) => {
|
|
9
|
-
const selectedSize = componentSizes[size];
|
|
10
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`;
|
|
11
|
-
// Flatten the hierarchy into a flat array with depth information
|
|
12
|
-
const flattenHierarchy = (items, depth = 0) => {
|
|
13
|
-
const result = [];
|
|
14
|
-
items.forEach((item) => {
|
|
15
|
-
result.push({ ...item.option, depth, icon: item.icon });
|
|
16
|
-
if (item.children && item.children.length > 0) {
|
|
17
|
-
result.push(...flattenHierarchy(item.children, depth + 1));
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
const flattenedData = flattenHierarchy(data);
|
|
23
|
-
const DropdownItem = ({ value, label, icon, depth, ...others }) => {
|
|
24
|
-
const indentLevel = depth * 0.8;
|
|
25
|
-
return (_jsx(Box, { sx: {
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
padding: selectedSize.dropdownPadding,
|
|
29
|
-
borderRadius: '8px',
|
|
30
|
-
transition: 'background-color 200ms ease-in-out',
|
|
31
|
-
cursor: 'pointer',
|
|
32
|
-
}, ...others, children: _jsxs(Group, { spacing: "0.5rem", sx: { marginLeft: `${indentLevel}rem` }, children: [icon && _jsx(Box, { sx: { display: 'flex', alignItems: 'center', color: neutral[200], fontSize: selectedSize.fontSize }, children: icon }), _jsx(Text, { style: { ...fontBase, color: neutral[200], fontSize: selectedSize.fontSize }, children: label })] }) }));
|
|
33
|
-
};
|
|
34
|
-
const style = {
|
|
35
|
-
input: {
|
|
36
|
-
color: neutral[300],
|
|
37
|
-
border: `1px solid ${neutral[100]}`,
|
|
38
|
-
borderRadius: '8px',
|
|
39
|
-
transition: 'all 200ms ease-in-out',
|
|
40
|
-
height: `${selectedSize.height}rem`,
|
|
41
|
-
...fontBase,
|
|
42
|
-
fontSize: selectedSize.fontSize,
|
|
43
|
-
padding: selectedSize.inputPadding,
|
|
44
|
-
},
|
|
45
|
-
item: {
|
|
46
|
-
color: neutral[200],
|
|
47
|
-
borderRadius: '8px',
|
|
48
|
-
transition: 'background-color 200ms ease-in-out',
|
|
49
|
-
padding: 0,
|
|
50
|
-
fontSize: selectedSize.fontSize,
|
|
51
|
-
marginBottom: '0.2rem',
|
|
52
|
-
'&[data-selected]': {
|
|
53
|
-
backgroundColor: neutral[50],
|
|
54
|
-
color: neutral[200],
|
|
55
|
-
},
|
|
56
|
-
'&[data-hovered]': {
|
|
57
|
-
backgroundColor: neutral[50],
|
|
58
|
-
},
|
|
59
|
-
'&:not(:hover):not([data-selected])': {
|
|
60
|
-
backgroundColor: 'white',
|
|
61
|
-
},
|
|
62
|
-
'&[data-selected]:hover': {
|
|
63
|
-
backgroundColor: neutral[50],
|
|
64
|
-
},
|
|
65
|
-
...styles,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
return _jsx(Select, { placeholder: placeholder, width: computedWidth, value: value, size: size, styles: style, itemComponent: DropdownItem, data: flattenedData, ...props });
|
|
69
|
-
};
|
|
70
|
-
export { NestedSelect as CascadingSelect };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from './Select';
|
|
2
|
-
import { SelectOption } from '../../../utils/select';
|
|
3
|
-
export interface FontSelectProps extends Omit<SelectProps, 'value' | 'data'> {
|
|
4
|
-
data?: SelectOption[];
|
|
5
|
-
value?: string | null;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const FontSelect: ({ data, value, placeholder, size, width, fullWidth, styles, ...props }: FontSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { FontSelect };
|
|
11
|
-
//# sourceMappingURL=FontSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FontSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/FontSelect.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1E,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,UAAU,GAAI,wEAAyG,eAAe,4CAoD3I,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { componentSizes } from './shared/sizes';
|
|
5
|
-
import { Select } from './Select';
|
|
6
|
-
import Fonts from './shared/fontSelectList';
|
|
7
|
-
const FontSelect = ({ data, value, placeholder = 'Select a font', size = 'md', width, fullWidth = false, styles, ...props }) => {
|
|
8
|
-
const selectedSize = componentSizes[size];
|
|
9
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`;
|
|
10
|
-
const DropdownItem = ({ value, label, ...others }) => (_jsx(Box, { title: label, children: _jsx("div", { style: {
|
|
11
|
-
fontFamily: value,
|
|
12
|
-
fontSize: selectedSize.fontSize,
|
|
13
|
-
color: neutral[200],
|
|
14
|
-
padding: selectedSize.dropdownPadding,
|
|
15
|
-
borderRadius: '0.5rem',
|
|
16
|
-
transition: 'background-color 200ms ease-in-out',
|
|
17
|
-
}, ...others, children: label }) }));
|
|
18
|
-
const style = {
|
|
19
|
-
input: {
|
|
20
|
-
fontFamily: value || 'Poppins, sans-serif',
|
|
21
|
-
color: neutral[200],
|
|
22
|
-
border: `1px solid ${neutral[100]}`,
|
|
23
|
-
borderRadius: '8px',
|
|
24
|
-
transition: 'all 200ms ease-in-out',
|
|
25
|
-
height: `${selectedSize.height}rem`,
|
|
26
|
-
fontSize: selectedSize.fontSize,
|
|
27
|
-
padding: selectedSize.inputPadding,
|
|
28
|
-
},
|
|
29
|
-
item: {
|
|
30
|
-
fontFamily: 'Poppins, sans-serif',
|
|
31
|
-
color: neutral[200],
|
|
32
|
-
borderRadius: '8px',
|
|
33
|
-
transition: 'background-color 200ms ease-in-out',
|
|
34
|
-
padding: selectedSize.dropdownPadding,
|
|
35
|
-
fontSize: selectedSize.fontSize,
|
|
36
|
-
'&[data-selected]': {
|
|
37
|
-
backgroundColor: neutral[50],
|
|
38
|
-
color: neutral[200],
|
|
39
|
-
},
|
|
40
|
-
'&[data-hovered]': {
|
|
41
|
-
backgroundColor: neutral[50],
|
|
42
|
-
},
|
|
43
|
-
...styles,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
return _jsx(Select, { placeholder: placeholder, width: computedWidth, value: value, size: size, styles: style, itemComponent: DropdownItem, data: data || Fonts.FONTS, ...props });
|
|
47
|
-
};
|
|
48
|
-
export { FontSelect };
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/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,gBAAgB,CAAC;AAEhD,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,2DAOzB,gBAAgB,4CAoGlB,CAAC"}
|
|
@@ -1,94 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SelectProps } from './Select';
|
|
3
|
-
export type NestedSelectItemProps = {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
children?: NestedSelectItemProps[];
|
|
8
|
-
};
|
|
9
|
-
export interface NestedSelectProps extends Omit<SelectProps, 'value' | 'data'> {
|
|
10
|
-
data?: NestedSelectItemProps[];
|
|
11
|
-
value?: string | null;
|
|
12
|
-
width?: string | number;
|
|
13
|
-
fullWidth?: boolean;
|
|
14
|
-
}
|
|
15
|
-
declare const NestedSelect: ({ data, value, placeholder, size, width, fullWidth, styles, ...props }: NestedSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export { NestedSelect };
|
|
17
|
-
//# sourceMappingURL=NestedSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NestedSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/NestedSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAI/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5E,IAAI,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,GAAI,wEAAiH,iBAAiB,4CA+EvJ,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Group } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { componentSizes } from './shared/sizes';
|
|
5
|
-
import { Select } from './Select';
|
|
6
|
-
import { Text } from '../../Typography/Text';
|
|
7
|
-
import { fontBase } from '../../..';
|
|
8
|
-
const NestedSelect = ({ data = [], value, placeholder = 'Select an option', size = 'md', width, fullWidth = false, styles, ...props }) => {
|
|
9
|
-
const selectedSize = componentSizes[size];
|
|
10
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`;
|
|
11
|
-
// Flatten the hierarchy into a flat array with depth information
|
|
12
|
-
const flattenHierarchy = (items, depth = 0) => {
|
|
13
|
-
const result = [];
|
|
14
|
-
items.forEach((item) => {
|
|
15
|
-
result.push({ ...item, depth });
|
|
16
|
-
if (item.children && item.children.length > 0) {
|
|
17
|
-
result.push(...flattenHierarchy(item.children, depth + 1));
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
const flattenedData = flattenHierarchy(data);
|
|
23
|
-
const DropdownItem = ({ value, label, icon, depth, ...others }) => {
|
|
24
|
-
const indentLevel = depth * 0.8;
|
|
25
|
-
return (_jsx(Box, { sx: {
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
padding: selectedSize.dropdownPadding,
|
|
29
|
-
borderRadius: '8px',
|
|
30
|
-
transition: 'background-color 200ms ease-in-out',
|
|
31
|
-
cursor: 'pointer',
|
|
32
|
-
}, ...others, children: _jsxs(Group, { spacing: "0.5rem", sx: { marginLeft: `${indentLevel}rem` }, children: [icon && _jsx(Box, { sx: { display: 'flex', alignItems: 'center', color: neutral[200], fontSize: selectedSize.fontSize }, children: icon }), _jsx(Text, { style: { ...fontBase, color: neutral[200], fontSize: selectedSize.fontSize }, children: label })] }) }));
|
|
33
|
-
};
|
|
34
|
-
const style = {
|
|
35
|
-
input: {
|
|
36
|
-
color: neutral[300],
|
|
37
|
-
border: `1px solid ${neutral[100]}`,
|
|
38
|
-
borderRadius: '8px',
|
|
39
|
-
transition: 'all 200ms ease-in-out',
|
|
40
|
-
height: `${selectedSize.height}rem`,
|
|
41
|
-
...fontBase,
|
|
42
|
-
fontSize: selectedSize.fontSize,
|
|
43
|
-
padding: selectedSize.inputPadding,
|
|
44
|
-
},
|
|
45
|
-
item: {
|
|
46
|
-
color: neutral[200],
|
|
47
|
-
borderRadius: '8px',
|
|
48
|
-
transition: 'background-color 200ms ease-in-out',
|
|
49
|
-
padding: 0,
|
|
50
|
-
fontSize: selectedSize.fontSize,
|
|
51
|
-
marginBottom: '0.2rem',
|
|
52
|
-
'&[data-selected]': {
|
|
53
|
-
backgroundColor: neutral[50],
|
|
54
|
-
color: neutral[200],
|
|
55
|
-
},
|
|
56
|
-
'&[data-hovered]': {
|
|
57
|
-
backgroundColor: neutral[50],
|
|
58
|
-
},
|
|
59
|
-
'&:not(:hover):not([data-selected])': {
|
|
60
|
-
backgroundColor: 'white',
|
|
61
|
-
},
|
|
62
|
-
'&[data-selected]:hover': {
|
|
63
|
-
backgroundColor: neutral[50],
|
|
64
|
-
},
|
|
65
|
-
...styles,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
return _jsx(Select, { placeholder: placeholder, width: computedWidth, value: value, size: size, styles: style, itemComponent: DropdownItem, data: flattenedData, ...props });
|
|
69
|
-
};
|
|
70
|
-
export { NestedSelect };
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/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,gBAAgB,CAAC;AAEhD,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"}
|
|
@@ -1,62 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SelectOption } from '../../../../utils/select';
|
|
2
|
-
export declare const FONTS: SelectOption[];
|
|
3
|
-
export declare const FONT_SIZES: SelectOption[];
|
|
4
|
-
declare const _default: {
|
|
5
|
-
FONTS: SelectOption[];
|
|
6
|
-
FONT_SIZES: SelectOption[];
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=fontSelectList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fontSelectList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/shared/fontSelectList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,eAAO,MAAM,KAAK,EAAE,YAAY,EAoC/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAAY,EA0BpC,CAAC;;;;;AAEF,wBAAqC"}
|