@taiv/ui 1.4.5 → 1.5.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 → ChartCard/ChartCard.d.ts} +2 -2
- package/dist/components/Data/Cards/ChartCard/ChartCard.d.ts.map +1 -0
- package/dist/components/Data/Cards/{ChartCard.js → ChartCard/ChartCard.js} +6 -6
- package/dist/components/Data/Cards/{PieChartCard.d.ts → PieChartCard/PieChartCard.d.ts} +2 -2
- package/dist/components/Data/Cards/PieChartCard/PieChartCard.d.ts.map +1 -0
- package/dist/components/Data/Cards/{PieChartCard.js → PieChartCard/PieChartCard.js} +6 -6
- package/dist/components/Data/Cards/{StatsCard.d.ts → StatsCard/StatsCard.d.ts} +3 -3
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts.map +1 -0
- package/dist/components/Data/Cards/{StatsCard.js → StatsCard/StatsCard.js} +9 -9
- package/dist/components/Data/{Chart.d.ts → Chart/Chart.d.ts} +2 -2
- package/dist/components/Data/Chart/Chart.d.ts.map +1 -0
- package/dist/components/Data/{Chart.js → Chart/Chart.js} +8 -8
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts.map +1 -0
- package/dist/components/Data/{CheckboxTable.js → CheckboxTable/CheckboxTable.js} +9 -9
- package/dist/components/Data/{PieChart.d.ts → PieChart/PieChart.d.ts} +2 -2
- package/dist/components/Data/PieChart/PieChart.d.ts.map +1 -0
- package/dist/components/Data/{PieChart.js → PieChart/PieChart.js} +9 -9
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts.map +1 -0
- package/dist/components/Data/{RemovableItemList.js → RemovableItemList/RemovableItemList.js} +3 -3
- package/dist/components/Data/{StatsBadge.d.ts → StatsBadge/StatsBadge.d.ts} +2 -2
- package/dist/components/Data/StatsBadge/StatsBadge.d.ts.map +1 -0
- package/dist/components/Data/{StatsBadge.js → StatsBadge/StatsBadge.js} +2 -2
- package/dist/components/Info/{Badge.d.ts → Badge/Badge.d.ts} +1 -1
- package/dist/components/Info/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Info/{Badge.js → Badge/Badge.js} +2 -2
- package/dist/components/Info/{InfoCard.d.ts → InfoCard/InfoCard.d.ts} +2 -2
- package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -0
- package/dist/components/Info/{InfoCard.js → InfoCard/InfoCard.js} +3 -3
- package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Info/Modals/{Modal.js → Modal/Modal.js} +4 -4
- package/dist/components/Info/Modals/ModalProvider/ModalProvider.d.ts.map +1 -0
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts.map +1 -0
- package/dist/components/Info/Notifications/{NotificationProvider.js → NotificationProvider/NotificationProvider.js} +2 -2
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/{FormulaTooltip.js → FormulaTooltip/FormulaTooltip.js} +6 -6
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/{InfoTooltip.js → InfoTooltip/InfoTooltip.js} +2 -2
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/{Tooltip.js → Tooltip/Tooltip.js} +2 -2
- package/dist/components/Inputs/Buttons/Button/Button.d.ts +2 -1
- package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.js +2 -1
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +1 -1
- package/dist/components/Layout/Box/Box.stories.js +1 -1
- package/dist/components/Layout/Frame/Frame.js +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.js +1 -1
- package/dist/components/Layout/Stack/Stack.stories.js +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/Typography/{CollapsibleText.d.ts → CollapsibleText/CollapsibleText.d.ts} +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts.map +1 -0
- package/dist/components/Typography/{CollapsibleText.js → CollapsibleText/CollapsibleText.js} +6 -6
- package/dist/components/Typography/{Formula.d.ts → Formula/Formula.d.ts} +1 -1
- package/dist/components/Typography/Formula/Formula.d.ts.map +1 -0
- package/dist/components/Typography/{Formula.js → Formula/Formula.js} +3 -3
- package/dist/components/Typography/{Fraction.d.ts → Fraction/Fraction.d.ts} +1 -1
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -0
- package/dist/components/Typography/{Fraction.js → Fraction/Fraction.js} +4 -4
- package/dist/components/Typography/{Text.d.ts → Text/Text.d.ts} +1 -1
- package/dist/components/Typography/Text/Text.d.ts.map +1 -0
- package/dist/components/Typography/{Text.js → Text/Text.js} +1 -1
- package/dist/components/Typography/{Title.d.ts → Title/Title.d.ts} +1 -1
- package/dist/components/Typography/Title/Title.d.ts.map +1 -0
- package/dist/components/Typography/{Title.js → Title/Title.js} +1 -1
- package/dist/components/index.d.ts +22 -21
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +22 -21
- package/dist/hooks/useConfirmationModal.js +1 -1
- package/dist/hooks/useInfoModal.js +1 -1
- package/package.json +1 -1
- package/dist/components/Data/Cards/ChartCard.d.ts.map +0 -1
- package/dist/components/Data/Cards/PieChartCard.d.ts.map +0 -1
- package/dist/components/Data/Cards/StatsCard.d.ts.map +0 -1
- package/dist/components/Data/Chart.d.ts.map +0 -1
- package/dist/components/Data/CheckboxTable.d.ts.map +0 -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/PieChart.d.ts.map +0 -1
- package/dist/components/Data/RemovableItemList.d.ts.map +0 -1
- package/dist/components/Data/StatsBadge.d.ts.map +0 -1
- 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/Info/Badge.d.ts.map +0 -1
- package/dist/components/Info/InfoCard.d.ts.map +0 -1
- package/dist/components/Info/Modals/Modal.d.ts.map +0 -1
- package/dist/components/Info/Modals/ModalProvider.d.ts.map +0 -1
- package/dist/components/Info/Notifications/NotificationProvider.d.ts.map +0 -1
- package/dist/components/Info/Tooltips/FormulaTooltip.d.ts.map +0 -1
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +0 -1
- package/dist/components/Info/Tooltips/Tooltip.d.ts.map +0 -1
- 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/components/Typography/CollapsibleText.d.ts.map +0 -1
- package/dist/components/Typography/Formula.d.ts.map +0 -1
- package/dist/components/Typography/Fraction.d.ts.map +0 -1
- package/dist/components/Typography/Text.d.ts.map +0 -1
- package/dist/components/Typography/Title.d.ts.map +0 -1
- package/dist/hooks/useDropdowns.d.ts +0 -9
- package/dist/hooks/useDropdowns.d.ts.map +0 -1
- package/dist/hooks/useDropdowns.js +0 -12
- /package/dist/components/Data/{CheckboxTable.d.ts → CheckboxTable/CheckboxTable.d.ts} +0 -0
- /package/dist/components/Data/{RemovableItemList.d.ts → RemovableItemList/RemovableItemList.d.ts} +0 -0
- /package/dist/components/Info/Modals/{Modal.d.ts → Modal/Modal.d.ts} +0 -0
- /package/dist/components/Info/Modals/{ModalProvider.d.ts → ModalProvider/ModalProvider.d.ts} +0 -0
- /package/dist/components/Info/Modals/{ModalProvider.js → ModalProvider/ModalProvider.js} +0 -0
- /package/dist/components/Info/Notifications/{NotificationProvider.d.ts → NotificationProvider/NotificationProvider.d.ts} +0 -0
- /package/dist/components/Info/Tooltips/{FormulaTooltip.d.ts → FormulaTooltip/FormulaTooltip.d.ts} +0 -0
- /package/dist/components/Info/Tooltips/{InfoTooltip.d.ts → InfoTooltip/InfoTooltip.d.ts} +0 -0
- /package/dist/components/Info/Tooltips/{Tooltip.d.ts → Tooltip/Tooltip.d.ts} +0 -0
|
@@ -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"}
|
|
@@ -1,65 +0,0 @@
|
|
|
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 };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { SliderProps as MantineSliderProps } from '@mantine/core';
|
|
3
|
-
import { componentSizes } from './shared/sizes';
|
|
4
|
-
export interface SliderProps extends MantineSliderProps {
|
|
5
|
-
width?: string | number;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
size?: keyof typeof componentSizes;
|
|
8
|
-
setValue: (value: number) => void;
|
|
9
|
-
animate?: boolean;
|
|
10
|
-
label?: React.ReactNode;
|
|
11
|
-
compact?: boolean;
|
|
12
|
-
styles?: Record<string, CSSProperties>;
|
|
13
|
-
}
|
|
14
|
-
declare const Slider: ({ width, size, value, setValue, disabled, styles, animate, label, fullWidth, compact, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export { Slider };
|
|
16
|
-
//# sourceMappingURL=Slider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Sliders/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAa,MAAM,eAAe,CAAC;AAItG,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,MAAM,GAAI,kGAYb,WAAW,4CAuGb,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Slider as MantineSlider } from '@mantine/core';
|
|
3
|
-
import { useHover } from '@mantine/hooks';
|
|
4
|
-
import { neutral, primary } from '../../../constants/colors';
|
|
5
|
-
import { fontBase, textStyle } from '../../../constants/font';
|
|
6
|
-
import { componentSizes } from './shared/sizes';
|
|
7
|
-
const Slider = ({ width, size = 'md', value, setValue, disabled = false, styles, animate = false, label, fullWidth = false, compact = false, ...props }) => {
|
|
8
|
-
const { hovered, ref } = useHover();
|
|
9
|
-
const sliderColor = disabled ? neutral[100] : primary[200];
|
|
10
|
-
const selectedSize = componentSizes[size];
|
|
11
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
|
|
12
|
-
const wrapperStyle = {
|
|
13
|
-
container: {
|
|
14
|
-
width: fullWidth ? '100%' : 'auto',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
gap: '1rem',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
},
|
|
19
|
-
label: {
|
|
20
|
-
...fontBase,
|
|
21
|
-
...selectedSize.labelFontSize,
|
|
22
|
-
color: disabled ? neutral[100] : neutral[200],
|
|
23
|
-
whiteSpace: 'nowrap',
|
|
24
|
-
flexShrink: 0,
|
|
25
|
-
},
|
|
26
|
-
valueLabel: {
|
|
27
|
-
...fontBase,
|
|
28
|
-
...selectedSize.valueFontSize,
|
|
29
|
-
color: disabled ? neutral[100] : neutral[200],
|
|
30
|
-
whiteSpace: 'nowrap',
|
|
31
|
-
flexShrink: 0,
|
|
32
|
-
textAlign: 'right',
|
|
33
|
-
minWidth: '2rem',
|
|
34
|
-
},
|
|
35
|
-
sliderContainer: {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
gap: '1rem',
|
|
39
|
-
flex: fullWidth ? 1 : 'none',
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
const sliderStyle = {
|
|
43
|
-
root: {
|
|
44
|
-
flex: 1,
|
|
45
|
-
minWidth: '10rem',
|
|
46
|
-
},
|
|
47
|
-
thumb: {
|
|
48
|
-
width: `${selectedSize.thumbSize}rem`,
|
|
49
|
-
height: `${selectedSize.thumbSize}rem`,
|
|
50
|
-
backgroundColor: sliderColor,
|
|
51
|
-
borderColor: sliderColor,
|
|
52
|
-
boxShadow: '0 2px 2px rgba(0,0,0,0.2)',
|
|
53
|
-
transition: 'opacity 150ms ease',
|
|
54
|
-
opacity: animate ? (hovered ? 1 : 0) : 1,
|
|
55
|
-
},
|
|
56
|
-
trackContainer: {
|
|
57
|
-
cursor: disabled ? 'default' : 'pointer',
|
|
58
|
-
},
|
|
59
|
-
track: {
|
|
60
|
-
height: `${selectedSize.trackHeight}rem`,
|
|
61
|
-
backgroundColor: sliderColor,
|
|
62
|
-
},
|
|
63
|
-
bar: {
|
|
64
|
-
height: `${selectedSize.trackHeight}rem`,
|
|
65
|
-
backgroundColor: sliderColor,
|
|
66
|
-
},
|
|
67
|
-
marksContainer: {
|
|
68
|
-
height: `${selectedSize.trackHeight}rem`,
|
|
69
|
-
},
|
|
70
|
-
mark: {
|
|
71
|
-
width: '0.7rem',
|
|
72
|
-
height: '0.7rem',
|
|
73
|
-
borderColor: neutral[50],
|
|
74
|
-
backgroundColor: neutral[50],
|
|
75
|
-
transform: 'translateY(-0.15rem) translateX(-0.2rem)',
|
|
76
|
-
},
|
|
77
|
-
markFilled: {
|
|
78
|
-
borderColor: sliderColor,
|
|
79
|
-
backgroundColor: 'white',
|
|
80
|
-
},
|
|
81
|
-
markLabel: {
|
|
82
|
-
...textStyle['caption'],
|
|
83
|
-
color: disabled ? neutral[100] : neutral[200],
|
|
84
|
-
marginTop: '0.4rem',
|
|
85
|
-
textAlign: 'center',
|
|
86
|
-
},
|
|
87
|
-
...styles,
|
|
88
|
-
};
|
|
89
|
-
return (_jsxs("div", { style: wrapperStyle.container, children: [!compact && label && _jsx("div", { style: wrapperStyle.label, children: label }), _jsxs("div", { style: wrapperStyle.sliderContainer, children: [_jsx(MantineSlider, { value: value, onChange: setValue, w: computedWidth, showLabelOnHover: false, disabled: disabled, ref: ref, styles: sliderStyle, ...props }), !compact && _jsx("div", { style: wrapperStyle.valueLabel, children: value })] })] }));
|
|
90
|
-
};
|
|
91
|
-
export { Slider };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SliderProps } from './Slider';
|
|
2
|
-
interface VolumeSliderProps extends Omit<SliderProps, 'label'> {
|
|
3
|
-
}
|
|
4
|
-
declare const VolumeSlider: ({ compact, size, fullWidth, ...props }: VolumeSliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export { VolumeSlider };
|
|
6
|
-
//# sourceMappingURL=VolumeSlider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Sliders/VolumeSlider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/C,UAAU,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;CAAG;AAEjE,QAAA,MAAM,YAAY,GAAI,wCAA+D,iBAAiB,4CAmCrG,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { IconVolume, IconVolume2, IconVolume3 } from '@tabler/icons-react';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { Slider } from './Slider';
|
|
5
|
-
import { componentSizes } from './shared/sizes';
|
|
6
|
-
const VolumeSlider = ({ compact = false, size = 'md', fullWidth = false, ...props }) => {
|
|
7
|
-
const selectedSize = componentSizes[size];
|
|
8
|
-
const getIcon = () => {
|
|
9
|
-
var _a;
|
|
10
|
-
const iconColor = props.disabled ? neutral[100] : neutral[200];
|
|
11
|
-
const currentValue = (_a = props.value) !== null && _a !== void 0 ? _a : 0;
|
|
12
|
-
if (currentValue === 0)
|
|
13
|
-
return _jsx(IconVolume3, { size: selectedSize.iconSize, color: iconColor });
|
|
14
|
-
if (currentValue <= 50)
|
|
15
|
-
return _jsx(IconVolume2, { size: selectedSize.iconSize, color: iconColor });
|
|
16
|
-
return _jsx(IconVolume, { size: selectedSize.iconSize, color: iconColor });
|
|
17
|
-
};
|
|
18
|
-
const style = {
|
|
19
|
-
container: {
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
gap: '1rem',
|
|
23
|
-
width: fullWidth ? '100%' : 'auto',
|
|
24
|
-
padding: '0.5rem 0',
|
|
25
|
-
},
|
|
26
|
-
iconContainer: {
|
|
27
|
-
display: 'flex',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
width: `${selectedSize.iconSize / 10}rem`, // Based on 10px root font
|
|
31
|
-
height: `${selectedSize.iconSize / 10}rem`,
|
|
32
|
-
flexShrink: 0,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
return (_jsxs("div", { style: style.container, children: [!compact && _jsx("div", { style: style.iconContainer, children: getIcon() }), _jsx(Slider, { ...props, compact: compact, size: size, fullWidth: fullWidth })] }));
|
|
36
|
-
};
|
|
37
|
-
export { VolumeSlider };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AutocompleteProps as MantineAutocompleteProps } from '@mantine/core';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
|
-
import { componentSizes } from '../Dropdowns/shared/sizes';
|
|
4
|
-
export interface AutoCompleteProps extends MantineAutocompleteProps {
|
|
5
|
-
size?: keyof typeof componentSizes;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
styles?: Record<string, CSSObject>;
|
|
9
|
-
}
|
|
10
|
-
export declare const AutoComplete: ({ size, width, fullWidth, placeholder, styles, ...props }: AutoCompleteProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/TextInputs/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuC,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,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,YAAY,GAAI,2DAO1B,iBAAiB,4CA8DnB,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Autocomplete as MantineAutocomplete } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { fontBase } from '../../../constants/font';
|
|
5
|
-
import { componentSizes } from '../Dropdowns/shared/sizes';
|
|
6
|
-
export const AutoComplete = ({ size = 'md', width, fullWidth = false, placeholder = 'Select an option', styles, ...props }) => {
|
|
7
|
-
const selectedSize = componentSizes[size];
|
|
8
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`;
|
|
9
|
-
const style = {
|
|
10
|
-
input: {
|
|
11
|
-
height: `${selectedSize.height}rem`,
|
|
12
|
-
fontSize: selectedSize.fontSize,
|
|
13
|
-
padding: selectedSize.inputPadding,
|
|
14
|
-
...fontBase,
|
|
15
|
-
color: neutral[300],
|
|
16
|
-
transition: 'all 200ms ease-in-out',
|
|
17
|
-
borderRadius: '8px',
|
|
18
|
-
},
|
|
19
|
-
label: {
|
|
20
|
-
...fontBase,
|
|
21
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
22
|
-
color: neutral[200],
|
|
23
|
-
},
|
|
24
|
-
dropdown: {
|
|
25
|
-
border: 'none',
|
|
26
|
-
borderRadius: '8px',
|
|
27
|
-
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
|
28
|
-
},
|
|
29
|
-
item: {
|
|
30
|
-
padding: selectedSize.dropdownPadding,
|
|
31
|
-
marginBottom: '0.5rem',
|
|
32
|
-
...fontBase,
|
|
33
|
-
fontSize: selectedSize.fontSize,
|
|
34
|
-
color: neutral[200],
|
|
35
|
-
borderRadius: '8px',
|
|
36
|
-
backgroundColor: 'white',
|
|
37
|
-
'&[data-selected]': {
|
|
38
|
-
backgroundColor: neutral[50],
|
|
39
|
-
color: neutral[200],
|
|
40
|
-
'&:hover': {
|
|
41
|
-
backgroundColor: neutral[50],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
'&:hover': {
|
|
45
|
-
backgroundColor: neutral[50],
|
|
46
|
-
},
|
|
47
|
-
'&:not(:hover):not([data-selected])': {
|
|
48
|
-
backgroundColor: 'white',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
rightSection: {
|
|
52
|
-
color: neutral[200],
|
|
53
|
-
},
|
|
54
|
-
...styles,
|
|
55
|
-
};
|
|
56
|
-
return (_jsx(MantineAutocomplete, { w: computedWidth, size: size, styles: style, placeholder: placeholder, maxDropdownHeight: selectedSize.dropdownHeight, ...props }));
|
|
57
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PasswordInputProps as MantinePasswordInputProps } from '@mantine/core';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
|
-
import { componentSizes } from './shared/sizes';
|
|
4
|
-
type PasswordInputProps = MantinePasswordInputProps & {
|
|
5
|
-
size?: keyof typeof componentSizes;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
styles?: Record<string, CSSObject>;
|
|
9
|
-
};
|
|
10
|
-
declare const PasswordInput: ({ size, width, fullWidth, styles, placeholder, ...props }: PasswordInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { PasswordInput };
|
|
12
|
-
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/TextInputs/PasswordInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyC,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAShD,KAAK,kBAAkB,GAAG,yBAAyB,GAAG;IACpD,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,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,2DAOpB,kBAAkB,4CAiDpB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PasswordInput as MantinePasswordInput } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { fontBase } from '../../../constants/font';
|
|
5
|
-
import { componentSizes } from './shared/sizes';
|
|
6
|
-
// Workaround for Icon sizing since we dont have a Provider setup
|
|
7
|
-
const mantineSize = {
|
|
8
|
-
sm: 'lg',
|
|
9
|
-
md: 'xl',
|
|
10
|
-
lg: 'xl',
|
|
11
|
-
};
|
|
12
|
-
const PasswordInput = ({ size = 'md', width, fullWidth = false, styles, placeholder = 'Enter password', ...props }) => {
|
|
13
|
-
const selectedSize = componentSizes[size];
|
|
14
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
|
|
15
|
-
const style = {
|
|
16
|
-
input: {
|
|
17
|
-
...fontBase,
|
|
18
|
-
color: neutral[200],
|
|
19
|
-
transition: 'all 200ms ease-in-out',
|
|
20
|
-
borderRadius: '8px',
|
|
21
|
-
height: `${selectedSize.height}rem`,
|
|
22
|
-
fontSize: selectedSize.fontSize,
|
|
23
|
-
padding: '0 1rem',
|
|
24
|
-
},
|
|
25
|
-
label: {
|
|
26
|
-
...fontBase,
|
|
27
|
-
color: neutral[200],
|
|
28
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
29
|
-
},
|
|
30
|
-
error: {
|
|
31
|
-
...fontBase,
|
|
32
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
33
|
-
},
|
|
34
|
-
innerInput: {
|
|
35
|
-
...fontBase,
|
|
36
|
-
color: neutral[200],
|
|
37
|
-
height: `${selectedSize.height}rem`,
|
|
38
|
-
fontSize: selectedSize.fontSize,
|
|
39
|
-
padding: '0 1rem',
|
|
40
|
-
},
|
|
41
|
-
visibilityToggle: {
|
|
42
|
-
color: neutral[200],
|
|
43
|
-
marginRight: '1.25rem',
|
|
44
|
-
'&:hover': {
|
|
45
|
-
backgroundColor: 'transparent',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
...styles,
|
|
49
|
-
};
|
|
50
|
-
return (_jsx(MantinePasswordInput, { w: computedWidth, ...props, placeholder: placeholder, size: mantineSize[size], styles: style }));
|
|
51
|
-
};
|
|
52
|
-
export { PasswordInput };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TextInputProps } from '@mantine/core';
|
|
2
|
-
interface SearchBarProps extends TextInputProps {
|
|
3
|
-
fullWidth?: boolean;
|
|
4
|
-
}
|
|
5
|
-
declare const SearchBar: ({ width, fullWidth, size, styles, ...props }: SearchBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export { SearchBar };
|
|
7
|
-
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/TextInputs/SearchBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAM/C,UAAU,cAAe,SAAQ,cAAc;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,GAAI,8CAA6D,cAAc,4CA4B7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TextInput } from './TextInput';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { fontBase } from '../../../constants/font';
|
|
5
|
-
import { componentSizes } from './shared/sizes';
|
|
6
|
-
const SearchBar = ({ width, fullWidth = false, size = 'md', styles, ...props }) => {
|
|
7
|
-
const selectedSize = componentSizes[size || 'md'];
|
|
8
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
|
|
9
|
-
const style = {
|
|
10
|
-
input: {
|
|
11
|
-
...fontBase,
|
|
12
|
-
fontSize: selectedSize.fontSize,
|
|
13
|
-
color: neutral[200],
|
|
14
|
-
border: `1px solid ${neutral[100]}`,
|
|
15
|
-
borderRadius: '8px',
|
|
16
|
-
height: `${selectedSize.height}rem`,
|
|
17
|
-
transition: 'all 200ms ease-in-out',
|
|
18
|
-
},
|
|
19
|
-
...styles,
|
|
20
|
-
};
|
|
21
|
-
return (_jsx(TextInput, { placeholder: "Search", width: computedWidth, styles: style, icon: _jsx("i", { className: "fas fa-search", style: { fontSize: 14, marginLeft: '0.25rem' } }), size: 'lg', fullWidth: fullWidth, ...props }));
|
|
22
|
-
};
|
|
23
|
-
export { SearchBar };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextareaProps as MantineTextareaProps } from '@mantine/core';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
|
-
import { componentSizes } from './shared/sizes';
|
|
4
|
-
type TextAreaProps = MantineTextareaProps & {
|
|
5
|
-
size?: keyof typeof componentSizes;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
styles?: Record<string, CSSObject>;
|
|
9
|
-
};
|
|
10
|
-
declare const TextArea: ({ size, width, fullWidth, styles, ...props }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { TextArea };
|
|
12
|
-
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/TextInputs/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+B,aAAa,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,KAAK,aAAa,GAAG,oBAAoB,GAAG;IAC1C,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,CAAC;AAEF,QAAA,MAAM,QAAQ,GAAI,8CAA6D,aAAa,4CAqC3F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Textarea as MantineTextarea } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../constants/colors';
|
|
4
|
-
import { fontBase } from '../../../constants/font';
|
|
5
|
-
import { componentSizes } from './shared/sizes';
|
|
6
|
-
const TextArea = ({ size = 'md', width, fullWidth = false, styles, ...props }) => {
|
|
7
|
-
const selectedSize = componentSizes[size];
|
|
8
|
-
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
|
|
9
|
-
const style = {
|
|
10
|
-
input: {
|
|
11
|
-
minHeight: `${selectedSize.height}rem`,
|
|
12
|
-
fontSize: selectedSize.fontSize,
|
|
13
|
-
padding: '0.75rem 1rem',
|
|
14
|
-
...fontBase,
|
|
15
|
-
color: neutral[200],
|
|
16
|
-
transition: 'all 200ms ease-in-out',
|
|
17
|
-
borderRadius: '8px',
|
|
18
|
-
resize: 'vertical',
|
|
19
|
-
},
|
|
20
|
-
label: {
|
|
21
|
-
...fontBase,
|
|
22
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
23
|
-
color: neutral[200],
|
|
24
|
-
},
|
|
25
|
-
error: {
|
|
26
|
-
...fontBase,
|
|
27
|
-
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
28
|
-
},
|
|
29
|
-
...styles,
|
|
30
|
-
};
|
|
31
|
-
return (_jsx(MantineTextarea, { ...props, size: size, styles: style, w: computedWidth, minRows: props.minRows || selectedSize.minRows, maxRows: props.maxRows || selectedSize.maxRows }));
|
|
32
|
-
};
|
|
33
|
-
export { TextArea };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextInputProps as MantineTextInputProps } from '@mantine/core';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
|
-
import { componentSizes } from './shared/sizes';
|
|
4
|
-
type TextInputProps = MantineTextInputProps & {
|
|
5
|
-
size?: keyof typeof componentSizes;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
styles?: Record<string, CSSObject>;
|
|
9
|
-
};
|
|
10
|
-
declare const TextInput: ({ size, width, fullWidth, styles, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { TextInput };
|
|
12
|
-
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/TextInputs/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,cAAc,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,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,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,8CAA6D,cAAc,4CA2B7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|