@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,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface RadioListOption {
|
|
3
|
-
value: string;
|
|
4
|
-
label: string;
|
|
5
|
-
rightContent?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
interface RadioListProps {
|
|
8
|
-
data: RadioListOption[];
|
|
9
|
-
value?: string;
|
|
10
|
-
onChange?: (value: string) => void;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
width?: React.CSSProperties['width'];
|
|
13
|
-
}
|
|
14
|
-
declare const RadioList: ({ data, value, onChange, disabled, width }: RadioListProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export { RadioList };
|
|
16
|
-
//# sourceMappingURL=RadioList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Controls/RadioList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,SAAS,GAAI,4CAAoD,cAAc,4CAkCpF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Stack } from '../../Layout/Stack';
|
|
3
|
-
import { Radio } from './Radio';
|
|
4
|
-
import { neutral } from '../../../constants/colors';
|
|
5
|
-
import { Group } from '../../Layout/Group';
|
|
6
|
-
const RadioList = ({ data, value, onChange, disabled = false, width }) => {
|
|
7
|
-
const handleChange = (optionValue) => {
|
|
8
|
-
if (onChange) {
|
|
9
|
-
onChange(optionValue);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
return (_jsx(Stack, { gap: "0", style: {
|
|
13
|
-
border: `1px solid ${neutral[100]}`,
|
|
14
|
-
borderRadius: '16px',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
padding: '0.2rem 0 0.2rem 0',
|
|
17
|
-
width,
|
|
18
|
-
}, children: data.map((option, index) => (_jsxs(Group, { position: "apart", style: {
|
|
19
|
-
padding: '1rem 1.2rem 0.8rem 1.2rem',
|
|
20
|
-
borderBottom: index < data.length - 1 ? `1px solid ${neutral[100]}` : 'none',
|
|
21
|
-
backgroundColor: 'white',
|
|
22
|
-
}, children: [_jsx(Radio, { value: option.value, label: option.label, checked: value === option.value, onChange: () => handleChange(option.value), disabled: disabled }), option.rightContent && option.rightContent] }, option.value))) }));
|
|
23
|
-
};
|
|
24
|
-
export { RadioList };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { CSSObject, SwitchProps as MantineToggleProps } from '@mantine/core';
|
|
2
|
-
declare const componentSizes: {
|
|
3
|
-
readonly sm: {
|
|
4
|
-
readonly fontSize: string;
|
|
5
|
-
readonly lineHeight: string;
|
|
6
|
-
readonly width: 2.4;
|
|
7
|
-
readonly height: 1.8;
|
|
8
|
-
readonly mantineSize: "md";
|
|
9
|
-
readonly thumbScale: 1.3;
|
|
10
|
-
readonly thumbTranslate: 2;
|
|
11
|
-
};
|
|
12
|
-
readonly md: {
|
|
13
|
-
readonly fontSize: string;
|
|
14
|
-
readonly lineHeight: string;
|
|
15
|
-
readonly width: 4.8;
|
|
16
|
-
readonly height: 2.8;
|
|
17
|
-
readonly mantineSize: "xl";
|
|
18
|
-
readonly thumbScale: 1.3;
|
|
19
|
-
readonly thumbTranslate: 10;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
interface ToggleProps extends MantineToggleProps {
|
|
23
|
-
size?: keyof typeof componentSizes;
|
|
24
|
-
label?: string;
|
|
25
|
-
styles?: Record<string, CSSObject>;
|
|
26
|
-
}
|
|
27
|
-
declare const Toggle: ({ checked, onChange, styles, size, label, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export { Toggle };
|
|
29
|
-
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Controls/Toggle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAKtG,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CAGV,CAAC;AAEX,UAAU,WAAY,SAAQ,kBAAkB;IAC9C,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,QAAA,MAAM,MAAM,GAAI,sDAA6D,WAAW,4CA8CvF,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Switch as MantineToggle } from '@mantine/core';
|
|
3
|
-
import { neutral, primary } from '../../../constants/colors';
|
|
4
|
-
import { fontBase, fontSize } from '../../../constants/font';
|
|
5
|
-
// Size Presets
|
|
6
|
-
const componentSizes = {
|
|
7
|
-
sm: { width: 2.4, height: 1.8, mantineSize: 'md', thumbScale: 1.3, thumbTranslate: 2, ...fontSize['sm'] },
|
|
8
|
-
md: { width: 4.8, height: 2.8, mantineSize: 'xl', thumbScale: 1.3, thumbTranslate: 10, ...fontSize['md'] },
|
|
9
|
-
};
|
|
10
|
-
const Toggle = ({ checked, onChange, styles, size = 'md', label, ...props }) => {
|
|
11
|
-
const selectedSize = componentSizes[size];
|
|
12
|
-
const style = {
|
|
13
|
-
container: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
gap: '1rem',
|
|
17
|
-
},
|
|
18
|
-
track: {
|
|
19
|
-
width: `${selectedSize.width}rem`,
|
|
20
|
-
height: `${selectedSize.height}rem`,
|
|
21
|
-
transition: 'background-color 300ms ease-in-out',
|
|
22
|
-
cursor: 'pointer',
|
|
23
|
-
backgroundColor: checked ? primary[200] : neutral[50],
|
|
24
|
-
},
|
|
25
|
-
thumb: {
|
|
26
|
-
transform: `scale(${selectedSize.thumbScale}) translateX(${checked
|
|
27
|
-
? `-${selectedSize.thumbTranslate + selectedSize.thumbTranslate / 2}%`
|
|
28
|
-
: `${selectedSize.thumbTranslate}%`})`,
|
|
29
|
-
boxShadow: checked ? '0 2px 2px rgba(0,0,0,0.2)' : 'none',
|
|
30
|
-
transition: 'all 300ms ease-in-out',
|
|
31
|
-
border: checked ? `1px solid ${primary[200]}` : `1px solid ${neutral[50]}`,
|
|
32
|
-
},
|
|
33
|
-
label: {
|
|
34
|
-
...fontBase,
|
|
35
|
-
fontSize: selectedSize.fontSize,
|
|
36
|
-
color: neutral[200],
|
|
37
|
-
},
|
|
38
|
-
...styles,
|
|
39
|
-
};
|
|
40
|
-
return (_jsxs("div", { style: style.container, children: [_jsx(MantineToggle, { checked: checked, onChange: onChange, color: primary[200], size: selectedSize.mantineSize, styles: style, ...props }), label && _jsx("span", { style: style.label, children: label })] }));
|
|
41
|
-
};
|
|
42
|
-
export { Toggle };
|
|
@@ -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/DatePickers/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,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"}
|