@taiv/ui 1.0.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/README.md +1 -0
- package/dist/components/Data/CheckboxTable.d.ts +21 -0
- package/dist/components/Data/CheckboxTable.d.ts.map +1 -0
- package/dist/components/Data/CheckboxTable.js +85 -0
- package/dist/components/Data/RemovableItemList.d.ts +10 -0
- package/dist/components/Data/RemovableItemList.d.ts.map +1 -0
- package/dist/components/Data/RemovableItemList.js +44 -0
- package/dist/components/Info/Modals/ConfirmationModal.d.ts +18 -0
- package/dist/components/Info/Modals/ConfirmationModal.d.ts.map +1 -0
- package/dist/components/Info/Modals/ConfirmationModal.js +76 -0
- package/dist/components/Info/Modals/InfoModal.d.ts +15 -0
- package/dist/components/Info/Modals/InfoModal.d.ts.map +1 -0
- package/dist/components/Info/Modals/InfoModal.js +70 -0
- package/dist/components/Info/Modals/Modal.d.ts +13 -0
- package/dist/components/Info/Modals/Modal.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modal.js +42 -0
- package/dist/components/Info/Modals/ModalProvider.d.ts +5 -0
- package/dist/components/Info/Modals/ModalProvider.d.ts.map +1 -0
- package/dist/components/Info/Modals/ModalProvider.js +15 -0
- package/dist/components/Info/Modals/variants.d.ts +63 -0
- package/dist/components/Info/Modals/variants.d.ts.map +1 -0
- package/dist/components/Info/Modals/variants.js +63 -0
- package/dist/components/Info/Notifications/NotificationProvider.d.ts +2 -0
- package/dist/components/Info/Notifications/NotificationProvider.d.ts.map +1 -0
- package/dist/components/Info/Notifications/NotificationProvider.js +46 -0
- package/dist/components/Info/Notifications/Notifications.d.ts +16 -0
- package/dist/components/Info/Notifications/Notifications.d.ts.map +1 -0
- package/dist/components/Info/Notifications/Notifications.js +41 -0
- package/dist/components/Info/Notifications/variants.d.ts +39 -0
- package/dist/components/Info/Notifications/variants.d.ts.map +1 -0
- package/dist/components/Info/Notifications/variants.js +41 -0
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts +18 -0
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/InfoTooltip.js +20 -0
- package/dist/components/Info/Tooltips/Tooltip.d.ts +13 -0
- package/dist/components/Info/Tooltips/Tooltip.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/Tooltip.js +35 -0
- package/dist/components/Inputs/Buttons/Button.d.ts +11 -0
- package/dist/components/Inputs/Buttons/Button.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button.js +27 -0
- package/dist/components/Inputs/Buttons/UnstyledButton.d.ts +10 -0
- package/dist/components/Inputs/Buttons/UnstyledButton.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/UnstyledButton.js +6 -0
- package/dist/components/Inputs/Buttons/shared/sizes.d.ts +25 -0
- package/dist/components/Inputs/Buttons/shared/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/shared/sizes.js +7 -0
- package/dist/components/Inputs/Buttons/shared/variants.d.ts +141 -0
- package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/shared/variants.js +141 -0
- package/dist/components/Inputs/Controls/Checkbox.d.ts +27 -0
- package/dist/components/Inputs/Controls/Checkbox.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Checkbox.js +55 -0
- package/dist/components/Inputs/Controls/Toggle.d.ts +29 -0
- package/dist/components/Inputs/Controls/Toggle.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Toggle.js +42 -0
- package/dist/components/Inputs/Dropdowns/FontSelect.d.ts +14 -0
- package/dist/components/Inputs/Dropdowns/FontSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect.js +48 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect.js +94 -0
- package/dist/components/Inputs/Dropdowns/Select.d.ts +11 -0
- package/dist/components/Inputs/Dropdowns/Select.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/Select.js +62 -0
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/shared/fontSelectList.js +68 -0
- package/dist/components/Inputs/Dropdowns/shared/sizes.d.ts +36 -0
- package/dist/components/Inputs/Dropdowns/shared/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/shared/sizes.js +33 -0
- package/dist/components/Inputs/Sliders/Slider.d.ts +16 -0
- package/dist/components/Inputs/Sliders/Slider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/Slider.js +91 -0
- package/dist/components/Inputs/Sliders/VolumeSlider.d.ts +6 -0
- package/dist/components/Inputs/Sliders/VolumeSlider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/VolumeSlider.js +37 -0
- package/dist/components/Inputs/Sliders/shared/sizes.d.ts +45 -0
- package/dist/components/Inputs/Sliders/shared/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/shared/sizes.js +27 -0
- package/dist/components/Inputs/TextInputs/AutoComplete.d.ts +11 -0
- package/dist/components/Inputs/TextInputs/AutoComplete.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/AutoComplete.js +57 -0
- package/dist/components/Inputs/TextInputs/PasswordInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/PasswordInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/PasswordInput.js +52 -0
- package/dist/components/Inputs/TextInputs/SearchBar.d.ts +7 -0
- package/dist/components/Inputs/TextInputs/SearchBar.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/SearchBar.js +23 -0
- package/dist/components/Inputs/TextInputs/TextArea.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextArea.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextArea.js +33 -0
- package/dist/components/Inputs/TextInputs/TextInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextInput.js +32 -0
- package/dist/components/Inputs/TextInputs/shared/sizes.d.ts +27 -0
- package/dist/components/Inputs/TextInputs/shared/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/shared/sizes.js +6 -0
- package/dist/components/Layout/Box.d.ts +10 -0
- package/dist/components/Layout/Box.d.ts.map +1 -0
- package/dist/components/Layout/Box.js +6 -0
- package/dist/components/Layout/Center.d.ts +9 -0
- package/dist/components/Layout/Center.d.ts.map +1 -0
- package/dist/components/Layout/Center.js +6 -0
- package/dist/components/Layout/Divider.d.ts +9 -0
- package/dist/components/Layout/Divider.d.ts.map +1 -0
- package/dist/components/Layout/Divider.js +7 -0
- package/dist/components/Layout/Frame.d.ts +12 -0
- package/dist/components/Layout/Frame.d.ts.map +1 -0
- package/dist/components/Layout/Frame.js +7 -0
- package/dist/components/Layout/Group.d.ts +10 -0
- package/dist/components/Layout/Group.d.ts.map +1 -0
- package/dist/components/Layout/Group.js +6 -0
- package/dist/components/Layout/Loader.d.ts +8 -0
- package/dist/components/Layout/Loader.d.ts.map +1 -0
- package/dist/components/Layout/Loader.js +6 -0
- package/dist/components/Layout/Stack.d.ts +10 -0
- package/dist/components/Layout/Stack.d.ts.map +1 -0
- package/dist/components/Layout/Stack.js +6 -0
- package/dist/components/Misc/Copy.d.ts +10 -0
- package/dist/components/Misc/Copy.d.ts.map +1 -0
- package/dist/components/Misc/Copy.js +18 -0
- package/dist/components/Misc/MediaQuery.d.ts +3 -0
- package/dist/components/Misc/MediaQuery.d.ts.map +1 -0
- package/dist/components/Misc/MediaQuery.js +2 -0
- package/dist/components/Misc/Transition.d.ts +4 -0
- package/dist/components/Misc/Transition.d.ts.map +1 -0
- package/dist/components/Misc/Transition.js +6 -0
- package/dist/components/Typography/CollapsibleText.d.ts +14 -0
- package/dist/components/Typography/CollapsibleText.d.ts.map +1 -0
- package/dist/components/Typography/CollapsibleText.js +16 -0
- package/dist/components/Typography/Text.d.ts +14 -0
- package/dist/components/Typography/Text.d.ts.map +1 -0
- package/dist/components/Typography/Text.js +20 -0
- package/dist/components/Typography/Title.d.ts +22 -0
- package/dist/components/Typography/Title.d.ts.map +1 -0
- package/dist/components/Typography/Title.js +30 -0
- package/dist/components/index.d.ts +38 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +43 -0
- package/dist/constants/colors.d.ts +79 -0
- package/dist/constants/colors.d.ts.map +1 -0
- package/dist/constants/colors.js +53 -0
- package/dist/constants/font.d.ts +245 -0
- package/dist/constants/font.d.ts.map +1 -0
- package/dist/constants/font.js +114 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +2 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/package.json +50 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CheckboxProps as MantineCheckboxProps } from '@mantine/core';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
declare const componentSizes: {
|
|
4
|
+
readonly sm: {
|
|
5
|
+
readonly fontSize: string;
|
|
6
|
+
readonly lineHeight: string;
|
|
7
|
+
readonly mantineSize: "md";
|
|
8
|
+
};
|
|
9
|
+
readonly md: {
|
|
10
|
+
readonly fontSize: string;
|
|
11
|
+
readonly lineHeight: string;
|
|
12
|
+
readonly mantineSize: "lg";
|
|
13
|
+
};
|
|
14
|
+
readonly lg: {
|
|
15
|
+
readonly fontSize: string;
|
|
16
|
+
readonly lineHeight: string;
|
|
17
|
+
readonly mantineSize: "xl";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
interface CheckboxProps extends MantineCheckboxProps {
|
|
21
|
+
checked: boolean;
|
|
22
|
+
styles?: Record<string, CSSObject>;
|
|
23
|
+
size?: keyof typeof componentSizes;
|
|
24
|
+
}
|
|
25
|
+
declare const Checkbox: ({ checked, styles, size, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Checkbox };
|
|
27
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Controls/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+B,aAAa,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;CAIV,CAAC;AAEX,UAAU,aAAc,SAAQ,oBAAoB;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;CACpC;AAED,QAAA,MAAM,QAAQ,GAAI,qCAA4C,aAAa,4CA4C1E,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox as MantineCheckbox } from '@mantine/core';
|
|
3
|
+
import { primary, neutral } from '../../../constants/colors';
|
|
4
|
+
import { fontBase, fontSize } from '../../../constants/font';
|
|
5
|
+
// Size Presets - Maps to next larger Mantine size, workaround since we dont have a Provider setup
|
|
6
|
+
const componentSizes = {
|
|
7
|
+
sm: { mantineSize: 'md', ...fontSize['xs'] },
|
|
8
|
+
md: { mantineSize: 'lg', ...fontSize['sm'] },
|
|
9
|
+
lg: { mantineSize: 'xl', ...fontSize['md'] },
|
|
10
|
+
};
|
|
11
|
+
const Checkbox = ({ checked, styles, size = 'md', ...props }) => {
|
|
12
|
+
const selectedSize = componentSizes[size];
|
|
13
|
+
const style = {
|
|
14
|
+
root: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
'& input[type="checkbox"]': {
|
|
18
|
+
margin: 0,
|
|
19
|
+
marginTop: 0,
|
|
20
|
+
lineHeight: 'normal',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
input: {
|
|
24
|
+
cursor: props.disabled ? 'default' : 'pointer',
|
|
25
|
+
margin: 0,
|
|
26
|
+
marginTop: 0,
|
|
27
|
+
lineHeight: 'normal',
|
|
28
|
+
'&[type="checkbox"]': {
|
|
29
|
+
margin: 0,
|
|
30
|
+
marginTop: 0,
|
|
31
|
+
lineHeight: 'normal',
|
|
32
|
+
},
|
|
33
|
+
'&:checked': {
|
|
34
|
+
backgroundColor: primary[200],
|
|
35
|
+
borderColor: primary[200],
|
|
36
|
+
},
|
|
37
|
+
'&:hover': {
|
|
38
|
+
backgroundColor: checked ? primary[200] : neutral[50],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
color: 'white',
|
|
43
|
+
transform: 'translateY(0)',
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
cursor: props.disabled ? 'default' : 'pointer',
|
|
47
|
+
...fontBase,
|
|
48
|
+
fontSize: selectedSize.fontSize,
|
|
49
|
+
color: neutral[200],
|
|
50
|
+
},
|
|
51
|
+
...styles,
|
|
52
|
+
};
|
|
53
|
+
return _jsx(MantineCheckbox, { checked: checked, size: selectedSize.mantineSize, styles: style, ...props });
|
|
54
|
+
};
|
|
55
|
+
export { Checkbox };
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectProps } from './Select';
|
|
2
|
+
export type ItemProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export interface FontSelectProps extends Omit<SelectProps, 'value' | 'data'> {
|
|
7
|
+
data?: ItemProps[];
|
|
8
|
+
value?: string | null;
|
|
9
|
+
width?: string | number;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const FontSelect: ({ data, value, placeholder, size, width, fullWidth, styles, ...props }: FontSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { FontSelect };
|
|
14
|
+
//# sourceMappingURL=FontSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAG/C,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1E,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,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,wEASjB,eAAe,4CA+DjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MultiSelectProps as MantineMultiSelectProps } from '@mantine/core';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
import { componentSizes } from './shared/sizes';
|
|
4
|
+
interface MultiSelectProps extends MantineMultiSelectProps {
|
|
5
|
+
size?: keyof typeof componentSizes;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
styles?: Record<string, CSSObject>;
|
|
9
|
+
}
|
|
10
|
+
export declare const MultiSelect: ({ size, width, fullWidth, placeholder, styles, ...props }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/MultiSelect.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"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MultiSelect as MantineMultiSelect } from '@mantine/core';
|
|
3
|
+
import { neutral, primary } from '../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../constants/font';
|
|
5
|
+
import { componentSizes } from './shared/sizes';
|
|
6
|
+
export const MultiSelect = ({ size = 'md', width, fullWidth = false, placeholder = 'Select options', styles, ...props }) => {
|
|
7
|
+
const selectedSize = componentSizes[size];
|
|
8
|
+
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.maxWidth}rem`;
|
|
9
|
+
const style = {
|
|
10
|
+
input: {
|
|
11
|
+
height: 'auto',
|
|
12
|
+
minHeight: `${selectedSize.height}rem`,
|
|
13
|
+
padding: selectedSize.inputPadding,
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
...fontBase,
|
|
18
|
+
fontSize: selectedSize.fontSize,
|
|
19
|
+
color: neutral[200],
|
|
20
|
+
border: `1px solid ${neutral[100]}`,
|
|
21
|
+
borderRadius: '8px',
|
|
22
|
+
backgroundColor: 'white',
|
|
23
|
+
transition: 'all 200ms ease-in-out',
|
|
24
|
+
'&:hover': {
|
|
25
|
+
backgroundColor: 'white',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
dropdown: {
|
|
29
|
+
border: 'none',
|
|
30
|
+
borderRadius: '8px',
|
|
31
|
+
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
|
32
|
+
},
|
|
33
|
+
item: {
|
|
34
|
+
padding: selectedSize.dropdownPadding,
|
|
35
|
+
marginBottom: '0.5rem',
|
|
36
|
+
borderRadius: '8px',
|
|
37
|
+
...fontBase,
|
|
38
|
+
fontSize: selectedSize.fontSize,
|
|
39
|
+
color: neutral[200],
|
|
40
|
+
backgroundColor: 'white',
|
|
41
|
+
'&[data-selected]': {
|
|
42
|
+
backgroundColor: neutral[50],
|
|
43
|
+
color: neutral[200],
|
|
44
|
+
'&:hover': {
|
|
45
|
+
backgroundColor: neutral[50],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'&:hover': {
|
|
49
|
+
backgroundColor: neutral[50],
|
|
50
|
+
},
|
|
51
|
+
'&:not(:hover):not([data-selected])': {
|
|
52
|
+
backgroundColor: 'white',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
value: {
|
|
56
|
+
padding: selectedSize.valuePadding,
|
|
57
|
+
borderRadius: '25px',
|
|
58
|
+
...fontBase,
|
|
59
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.125rem)`,
|
|
60
|
+
color: primary[300],
|
|
61
|
+
backgroundColor: primary[50],
|
|
62
|
+
'&:hover': {
|
|
63
|
+
backgroundColor: primary[50],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultValueRemove: {
|
|
67
|
+
marginLeft: '0.75rem',
|
|
68
|
+
borderRadius: '50%',
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
color: primary[300],
|
|
73
|
+
backgroundColor: primary[25],
|
|
74
|
+
'&:hover': {
|
|
75
|
+
backgroundColor: primary[25],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
label: {
|
|
79
|
+
...fontBase,
|
|
80
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
81
|
+
color: neutral[200],
|
|
82
|
+
},
|
|
83
|
+
defaultValueLabel: {
|
|
84
|
+
...fontBase,
|
|
85
|
+
},
|
|
86
|
+
searchInput: {
|
|
87
|
+
...fontBase,
|
|
88
|
+
fontSize: selectedSize.fontSize,
|
|
89
|
+
color: neutral[200],
|
|
90
|
+
},
|
|
91
|
+
...styles,
|
|
92
|
+
};
|
|
93
|
+
return (_jsx(MantineMultiSelect, { placeholder: placeholder, size: size, w: computedWidth, styles: style, maxDropdownHeight: selectedSize.dropdownHeight, searchable: true, ...props }));
|
|
94
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectProps as MantineSelectProps } from '@mantine/core';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
import { componentSizes } from './shared/sizes';
|
|
4
|
+
export interface SelectProps extends MantineSelectProps {
|
|
5
|
+
size?: keyof typeof componentSizes;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
styles?: Record<string, CSSObject>;
|
|
9
|
+
}
|
|
10
|
+
export declare const Select: ({ size, width, fullWidth, placeholder, styles, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropdowns/Select.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,2DAOpB,WAAW,4CAmEb,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Select as MantineSelect } from '@mantine/core';
|
|
3
|
+
import { neutral } from '../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../constants/font';
|
|
5
|
+
import { componentSizes } from './shared/sizes';
|
|
6
|
+
export const Select = ({ size = 'md', width, fullWidth = false, placeholder = 'Select an option', styles, ...props }) => {
|
|
7
|
+
const selectedSize = componentSizes[size];
|
|
8
|
+
const style = {
|
|
9
|
+
root: {
|
|
10
|
+
width: fullWidth ? '100%' : width || `${selectedSize.minWidth}rem`,
|
|
11
|
+
},
|
|
12
|
+
input: {
|
|
13
|
+
height: `${selectedSize.height}rem`,
|
|
14
|
+
paddingRight: selectedSize.inputPadding,
|
|
15
|
+
...fontBase,
|
|
16
|
+
fontSize: selectedSize.fontSize,
|
|
17
|
+
color: neutral[300],
|
|
18
|
+
borderRadius: '8px',
|
|
19
|
+
border: `1px solid ${neutral[100]}`,
|
|
20
|
+
textOverflow: 'ellipsis',
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
transition: 'all 200ms ease-in-out',
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
...fontBase,
|
|
26
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.1rem)`,
|
|
27
|
+
color: neutral[200],
|
|
28
|
+
},
|
|
29
|
+
dropdown: {
|
|
30
|
+
border: 'none',
|
|
31
|
+
borderRadius: '8px',
|
|
32
|
+
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
|
33
|
+
},
|
|
34
|
+
item: {
|
|
35
|
+
padding: selectedSize.dropdownPadding,
|
|
36
|
+
marginBottom: '0.5rem',
|
|
37
|
+
...fontBase,
|
|
38
|
+
fontSize: selectedSize.fontSize,
|
|
39
|
+
color: neutral[200],
|
|
40
|
+
borderRadius: '8px',
|
|
41
|
+
backgroundColor: 'white',
|
|
42
|
+
'&[data-selected]': {
|
|
43
|
+
backgroundColor: neutral[50],
|
|
44
|
+
color: neutral[200],
|
|
45
|
+
'&:hover': {
|
|
46
|
+
backgroundColor: neutral[50],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'&:hover': {
|
|
50
|
+
backgroundColor: neutral[50],
|
|
51
|
+
},
|
|
52
|
+
'&:not(:hover):not([data-selected])': {
|
|
53
|
+
backgroundColor: 'white',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
rightSection: {
|
|
57
|
+
color: neutral[200],
|
|
58
|
+
},
|
|
59
|
+
...styles,
|
|
60
|
+
};
|
|
61
|
+
return (_jsx(MantineSelect, { radius: "md", size: size, styles: style, placeholder: placeholder, maxDropdownHeight: selectedSize.dropdownHeight, ...props }));
|
|
62
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface SelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const FONTS: SelectOption[];
|
|
6
|
+
export declare const FONT_SIZES: SelectOption[];
|
|
7
|
+
declare const _default: {
|
|
8
|
+
FONTS: SelectOption[];
|
|
9
|
+
FONT_SIZES: SelectOption[];
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=fontSelectList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontSelectList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/shared/fontSelectList.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,KAAK,EAAE,YAAY,EAoC/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAAY,EA0BpC,CAAC;;;;;AAEF,wBAGE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 {
|
|
66
|
+
FONTS,
|
|
67
|
+
FONT_SIZES,
|
|
68
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const componentSizes: {
|
|
2
|
+
sm: {
|
|
3
|
+
inputPadding: string;
|
|
4
|
+
dropdownPadding: string;
|
|
5
|
+
valuePadding: string;
|
|
6
|
+
minWidth: number;
|
|
7
|
+
maxWidth: number;
|
|
8
|
+
dropdownHeight: number;
|
|
9
|
+
fontSize: string;
|
|
10
|
+
lineHeight: string;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
md: {
|
|
14
|
+
inputPadding: string;
|
|
15
|
+
dropdownPadding: string;
|
|
16
|
+
valuePadding: string;
|
|
17
|
+
minWidth: number;
|
|
18
|
+
maxWidth: number;
|
|
19
|
+
dropdownHeight: number;
|
|
20
|
+
fontSize: string;
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
lg: {
|
|
25
|
+
inputPadding: string;
|
|
26
|
+
dropdownPadding: string;
|
|
27
|
+
valuePadding: string;
|
|
28
|
+
minWidth: number;
|
|
29
|
+
maxWidth: number;
|
|
30
|
+
dropdownHeight: number;
|
|
31
|
+
fontSize: string;
|
|
32
|
+
lineHeight: string;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=sizes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/shared/sizes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B1B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { inputFontSize } from '../../../../constants/font';
|
|
2
|
+
export const componentSizes = {
|
|
3
|
+
sm: {
|
|
4
|
+
height: 3.2,
|
|
5
|
+
...inputFontSize['sm'],
|
|
6
|
+
inputPadding: '0.25rem 2rem 0.25rem 1rem',
|
|
7
|
+
dropdownPadding: '0.5rem 1rem',
|
|
8
|
+
valuePadding: '1rem 0.8rem 1rem 1rem',
|
|
9
|
+
minWidth: 18,
|
|
10
|
+
maxWidth: 25,
|
|
11
|
+
dropdownHeight: 260,
|
|
12
|
+
},
|
|
13
|
+
md: {
|
|
14
|
+
height: 3.8,
|
|
15
|
+
...inputFontSize['md'],
|
|
16
|
+
inputPadding: '0.5rem 2.25rem 0.5rem 1rem',
|
|
17
|
+
dropdownPadding: '0.75rem 1.125rem',
|
|
18
|
+
valuePadding: '1.25rem 1rem 1.25rem 1.25rem',
|
|
19
|
+
minWidth: 22,
|
|
20
|
+
maxWidth: 32.8,
|
|
21
|
+
dropdownHeight: 330,
|
|
22
|
+
},
|
|
23
|
+
lg: {
|
|
24
|
+
height: 4.8,
|
|
25
|
+
...inputFontSize['lg'],
|
|
26
|
+
inputPadding: '0.75rem 2.5rem 0.75rem 1rem',
|
|
27
|
+
dropdownPadding: '1rem 1.5rem',
|
|
28
|
+
valuePadding: '1.25rem 1rem 1.25rem 1.25rem',
|
|
29
|
+
minWidth: 30,
|
|
30
|
+
maxWidth: 42,
|
|
31
|
+
dropdownHeight: 385,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|