@taiv/ui 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Data/Cards/ChartCard.d.ts +2 -1
- package/dist/components/Data/Cards/ChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/ChartCard.js +6 -4
- package/dist/components/Data/Cards/PieChartCard.d.ts +2 -1
- package/dist/components/Data/Cards/PieChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/PieChartCard.js +6 -4
- package/dist/components/Data/Cards/StatsCard.d.ts +1 -1
- package/dist/components/Data/Cards/StatsCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/StatsCard.js +4 -4
- package/dist/components/Data/Chart.js +4 -4
- package/dist/components/Data/CheckboxTable.d.ts +1 -1
- package/dist/components/Data/CheckboxTable.d.ts.map +1 -1
- package/dist/components/Data/CheckboxTable.js +6 -6
- package/dist/components/Data/PieChart.js +4 -4
- package/dist/components/Info/InfoCard.d.ts +1 -1
- package/dist/components/Info/InfoCard.d.ts.map +1 -1
- package/dist/components/Info/InfoCard.js +2 -2
- package/dist/components/Info/Modals/Modal.js +2 -2
- package/dist/components/Info/Notifications/variants.js +1 -1
- package/dist/components/Info/Tooltips/FormulaTooltip.js +3 -3
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts +16 -1
- package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip.js +18 -4
- package/dist/components/Inputs/Buttons/Button/Button.d.ts +12 -0
- package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.js +37 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +11 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +176 -0
- package/dist/components/Inputs/Buttons/Button/sizes.d.ts +25 -0
- package/dist/components/Inputs/Buttons/Button/sizes.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/sizes.js +7 -0
- package/dist/components/Inputs/Buttons/Button/variants.d.ts +191 -0
- package/dist/components/Inputs/Buttons/Button/variants.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/Button/variants.js +191 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts +10 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.js +6 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts +8 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.js +97 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts +27 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.js +55 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts +10 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.js +154 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts +8 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Radio/Radio.js +43 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts +10 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Radio/Radio.stories.js +143 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts +16 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.js +24 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts +11 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.js +138 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +29 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.js +40 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +11 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +179 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts +12 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +74 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts +12 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.js +203 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts +17 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +70 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts +14 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.js +362 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts +11 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +48 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.js +215 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts +9 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/FontSelect/font-options.js +65 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +94 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.js +260 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts +11 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.js +62 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.js +242 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts +16 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.js +91 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts +6 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -0
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.js +37 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts +11 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +57 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.js +218 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +52 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.js +235 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts +7 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +23 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.js +202 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +33 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.js +231 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +32 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts +12 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.js +219 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +8 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.js +6 -0
- package/dist/components/Layout/Box/Box.d.ts +10 -0
- package/dist/components/Layout/Box/Box.d.ts.map +1 -0
- package/dist/components/Layout/Box/Box.js +6 -0
- package/dist/components/Layout/Box/Box.stories.d.ts +9 -0
- package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -0
- package/dist/components/Layout/Box/Box.stories.js +121 -0
- package/dist/components/Layout/Card/Card.d.ts +8 -0
- package/dist/components/Layout/Card/Card.d.ts.map +1 -0
- package/dist/components/Layout/Card/Card.js +16 -0
- package/dist/components/Layout/Center/Center.d.ts +9 -0
- package/dist/components/Layout/Center/Center.d.ts.map +1 -0
- package/dist/components/Layout/Center/Center.js +6 -0
- package/dist/components/Layout/Divider/Divider.d.ts +10 -0
- package/dist/components/Layout/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Layout/Divider/Divider.js +7 -0
- package/dist/components/Layout/Frame/Frame.d.ts +12 -0
- package/dist/components/Layout/Frame/Frame.d.ts.map +1 -0
- package/dist/components/Layout/Frame/Frame.js +7 -0
- package/dist/components/Layout/Grid/Grid.d.ts +10 -0
- package/dist/components/Layout/Grid/Grid.d.ts.map +1 -0
- package/dist/components/Layout/Grid/Grid.js +9 -0
- package/dist/components/Layout/Group/Group.d.ts +10 -0
- package/dist/components/Layout/Group/Group.d.ts.map +1 -0
- package/dist/components/Layout/Group/Group.js +6 -0
- package/dist/components/Layout/Loader/Loader.d.ts +8 -0
- package/dist/components/Layout/Loader/Loader.d.ts.map +1 -0
- package/dist/components/Layout/Loader/Loader.js +6 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +11 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -0
- package/dist/components/Layout/SectionCard/SectionCard.js +13 -0
- package/dist/components/Layout/Stack/Stack.d.ts +10 -0
- package/dist/components/Layout/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Layout/Stack/Stack.js +6 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts +9 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -0
- package/dist/components/Layout/Stack/Stack.stories.js +108 -0
- package/dist/components/Layout/Tabs/Tabs.d.ts +17 -0
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Layout/Tabs/Tabs.js +48 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts +8 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -0
- package/dist/components/Misc/IconBadge/IconBadge.js +28 -0
- package/dist/components/Misc/Transition/Transition.d.ts +4 -0
- package/dist/components/Misc/Transition/Transition.d.ts.map +1 -0
- package/dist/components/Misc/Transition/Transition.js +6 -0
- package/dist/components/Typography/CollapsibleText.js +4 -4
- package/dist/components/Typography/Formula.d.ts.map +1 -1
- package/dist/components/Typography/Formula.js +2 -6
- package/dist/components/Typography/Fraction.js +2 -2
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text.js +0 -2
- package/dist/components/index.d.ts +32 -32
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +32 -32
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
- package/dist/hooks/useConfirmationModal.js +6 -6
- package/dist/hooks/useInfoModal.d.ts.map +1 -1
- package/dist/hooks/useInfoModal.js +4 -4
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/select.d.ts +1 -0
- package/dist/utils/select.d.ts.map +1 -1
- package/dist/utils/select.js +18 -0
- package/package.json +10 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAkD5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAmEjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwFxB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from './Stack';
|
|
3
|
+
import { Box } from '../Box/Box';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Layout/Stack',
|
|
6
|
+
component: Stack,
|
|
7
|
+
argTypes: {
|
|
8
|
+
align: {
|
|
9
|
+
control: { type: 'select' },
|
|
10
|
+
options: ['stretch', 'center', 'flex-start', 'flex-end', 'baseline'],
|
|
11
|
+
description: 'align-items CSS property',
|
|
12
|
+
table: {
|
|
13
|
+
type: { summary: 'AlignItems' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
justify: {
|
|
17
|
+
control: { type: 'select' },
|
|
18
|
+
options: ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'],
|
|
19
|
+
description: 'justify-content CSS property',
|
|
20
|
+
table: {
|
|
21
|
+
type: { summary: 'JustifyContent' },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
spacing: {
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
27
|
+
description: 'Gap between items',
|
|
28
|
+
table: {
|
|
29
|
+
type: { summary: 'number | "xs" | "sm" | "md" | "lg" | "xl"' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
width: {
|
|
33
|
+
control: { type: 'text' },
|
|
34
|
+
description: 'Custom width',
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: 'string | number' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
gap: {
|
|
40
|
+
control: { type: 'text' },
|
|
41
|
+
description: 'Custom gap value',
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: 'string' },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
styles: {
|
|
47
|
+
control: { type: 'object' },
|
|
48
|
+
description: 'Custom styles object',
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export default meta;
|
|
56
|
+
const SampleBox = ({ children, color = 'blue' }) => (_jsx(Box, { sx: (theme) => ({
|
|
57
|
+
backgroundColor: theme.colors[color][0],
|
|
58
|
+
color: theme.colors[color][9],
|
|
59
|
+
padding: theme.spacing.md,
|
|
60
|
+
borderRadius: theme.radius.md,
|
|
61
|
+
border: `1px solid ${theme.colors[color][3]}`,
|
|
62
|
+
textAlign: 'center',
|
|
63
|
+
minHeight: '60px',
|
|
64
|
+
display: 'flex',
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
}), children: children }));
|
|
68
|
+
export const Default = {
|
|
69
|
+
args: {
|
|
70
|
+
align: 'stretch',
|
|
71
|
+
justify: 'flex-start',
|
|
72
|
+
spacing: 'md',
|
|
73
|
+
},
|
|
74
|
+
render: (args) => (_jsxs(Stack, { ...args, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })),
|
|
75
|
+
};
|
|
76
|
+
export const JustifyAlignContent = {
|
|
77
|
+
render: () => (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("h4", { children: "Justify Content" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "flex-start" }), _jsxs(Stack, { justify: "flex-start", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "center" }), _jsxs(Stack, { justify: "center", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "space-between" }), _jsxs(Stack, { justify: "space-between", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] })] })] }), _jsxs("div", { children: [_jsx("h4", { children: "Align Items" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "stretch" }), _jsxs(Stack, { align: "stretch", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "center" }), _jsxs(Stack, { align: "center", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "flex-end" }), _jsxs(Stack, { align: "flex-end", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] })] })] })] })),
|
|
78
|
+
parameters: {
|
|
79
|
+
docs: {
|
|
80
|
+
source: {
|
|
81
|
+
code: `<Stack justify="center" align="center" spacing="md">
|
|
82
|
+
<Box>Centered Item 1</Box>
|
|
83
|
+
<Box>Centered Item 2</Box>
|
|
84
|
+
</Stack>`,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
export const SpacingGap = {
|
|
90
|
+
render: () => (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("h4", { children: "Theme Spacing" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "xs" }), _jsxs(Stack, { spacing: "xs", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "sm" }), _jsxs(Stack, { spacing: "sm", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "md" }), _jsxs(Stack, { spacing: "md", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "lg" }), _jsxs(Stack, { spacing: "lg", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "xl" }), _jsxs(Stack, { spacing: "xl", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] })] })] }), _jsxs("div", { children: [_jsx("h4", { children: "Custom Gap" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "2rem" }), _jsxs(Stack, { gap: "2rem", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "20px" }), _jsxs(Stack, { gap: "20px", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] })] })] })] })),
|
|
91
|
+
parameters: {
|
|
92
|
+
docs: {
|
|
93
|
+
source: {
|
|
94
|
+
code: `<Stack spacing="lg">
|
|
95
|
+
<Box>Item 1</Box>
|
|
96
|
+
<Box>Item 2</Box>
|
|
97
|
+
<Box>Item 3</Box>
|
|
98
|
+
</Stack>
|
|
99
|
+
|
|
100
|
+
<Stack gap="2rem">
|
|
101
|
+
<Box>Item 1</Box>
|
|
102
|
+
<Box>Item 2</Box>
|
|
103
|
+
<Box>Item 3</Box>
|
|
104
|
+
</Stack>`,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps as MantineTabsProps } from '@mantine/core';
|
|
3
|
+
export interface TabsProps extends Omit<MantineTabsProps, 'children' | 'onChange' | 'placement'> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string | null) => void;
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
placement?: 'left' | 'right' | 'top' | 'bottom';
|
|
10
|
+
variant?: 'default' | 'outline' | 'pills';
|
|
11
|
+
}
|
|
12
|
+
export declare const Tabs: (({ children, defaultValue, value, onChange, orientation, placement, variant, styles, ...props }: TabsProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
|
+
List: React.ForwardRefExoticComponent<import("@mantine/core").TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Tab: React.ForwardRefExoticComponent<import("@mantine/core").TabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
Panel: React.ForwardRefExoticComponent<import("@mantine/core").TabsPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAInF,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;IAC9F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAChD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CAC3C;AA+CD,eAAO,MAAM,IAAI,oGA7CyI,SAAS;;;;CAiDjK,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs as MantineTabs } from '@mantine/core';
|
|
3
|
+
import { fontBase } from '../../../constants/font';
|
|
4
|
+
import { colors } from '../../../constants/colors';
|
|
5
|
+
const TabsComponent = ({ children, defaultValue, value, onChange, orientation = 'horizontal', placement = 'top', variant = 'default', styles, ...props }) => {
|
|
6
|
+
const style = {
|
|
7
|
+
root: {
|
|
8
|
+
width: '100%',
|
|
9
|
+
},
|
|
10
|
+
list: {
|
|
11
|
+
borderBottom: variant === 'default' ? `1px solid ${colors.neutral[100]}` : 'none',
|
|
12
|
+
gap: '0',
|
|
13
|
+
},
|
|
14
|
+
tab: {
|
|
15
|
+
padding: '0.8rem 2.8rem',
|
|
16
|
+
backgroundColor: 'transparent',
|
|
17
|
+
color: colors.neutral[300],
|
|
18
|
+
'&:hover': {
|
|
19
|
+
backgroundColor: variant === 'pills' ? colors.neutral[25] : 'transparent',
|
|
20
|
+
color: colors.primary[300],
|
|
21
|
+
},
|
|
22
|
+
'&[data-active]': {
|
|
23
|
+
backgroundColor: variant === 'pills' ? colors.primary[200] : 'transparent',
|
|
24
|
+
color: variant === 'pills' ? 'white' : colors.primary[300],
|
|
25
|
+
borderBottom: variant === 'default' ? `2px solid ${colors.primary[200]}` : 'none',
|
|
26
|
+
},
|
|
27
|
+
'&[data-active]:hover': {
|
|
28
|
+
backgroundColor: variant === 'pills' ? colors.primary[200] : 'transparent',
|
|
29
|
+
color: variant === 'pills' ? 'white' : colors.primary[300],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
tabLabel: {
|
|
33
|
+
...fontBase,
|
|
34
|
+
fontSize: '1.6rem',
|
|
35
|
+
lineHeight: '2.4rem',
|
|
36
|
+
},
|
|
37
|
+
panel: {
|
|
38
|
+
padding: '1.6rem 0.8rem',
|
|
39
|
+
},
|
|
40
|
+
...styles,
|
|
41
|
+
};
|
|
42
|
+
return (_jsx(MantineTabs, { styles: style, radius: "lg", defaultValue: defaultValue, value: value, orientation: orientation, variant: variant, ...props, children: children }));
|
|
43
|
+
};
|
|
44
|
+
export const Tabs = Object.assign(TabsComponent, {
|
|
45
|
+
List: MantineTabs.List,
|
|
46
|
+
Tab: MantineTabs.Tab,
|
|
47
|
+
Panel: MantineTabs.Panel,
|
|
48
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { primitives } from '../../../constants/colors';
|
|
3
|
+
export interface IconBadgeProps {
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
color: keyof typeof primitives;
|
|
6
|
+
}
|
|
7
|
+
export declare const IconBadge: ({ icon, color }: IconBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=IconBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/IconBadge/IconBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,OAAO,UAAU,CAAC;CAChC;AAED,eAAO,MAAM,SAAS,GAAI,iBAAiB,cAAc,4CAgCxD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { primitives } from '../../../constants/colors';
|
|
4
|
+
export const IconBadge = ({ icon, color }) => {
|
|
5
|
+
const getIconColors = () => {
|
|
6
|
+
return {
|
|
7
|
+
background: primitives[color][50],
|
|
8
|
+
icon: primitives[color][200],
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
const getIconSize = () => {
|
|
12
|
+
if (React.isValidElement(icon) && icon.props && typeof icon.props.size === 'number') {
|
|
13
|
+
const iconSize = icon.props.size;
|
|
14
|
+
const badgeSize = iconSize + 12;
|
|
15
|
+
return `${badgeSize / 10}rem`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (_jsx("div", { style: {
|
|
19
|
+
width: getIconSize(),
|
|
20
|
+
height: getIconSize(),
|
|
21
|
+
borderRadius: '50%',
|
|
22
|
+
backgroundColor: getIconColors().background,
|
|
23
|
+
color: getIconColors().icon,
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
}, children: icon }));
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transition.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/Transition/Transition.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmC,eAAe,IAAI,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3G,QAAA,MAAM,UAAU,GAAI,OAAO,sBAAsB,4CAEhD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { IconCaretDownFilled } from '@tabler/icons-react';
|
|
3
3
|
import { primary } from '../../constants/colors';
|
|
4
|
-
import { Box } from '../Layout/Box';
|
|
5
|
-
import { Group } from '../Layout/Group';
|
|
4
|
+
import { Box } from '../Layout/Box/Box';
|
|
5
|
+
import { Group } from '../Layout/Group/Group';
|
|
6
6
|
import { Text } from './Text';
|
|
7
|
-
import { Transition } from '../Misc/Transition';
|
|
8
|
-
import { UnstyledButton } from '../Inputs/Buttons/UnstyledButton';
|
|
7
|
+
import { Transition } from '../Misc/Transition/Transition';
|
|
8
|
+
import { UnstyledButton } from '../Inputs/Buttons/UnstyledButton/UnstyledButton';
|
|
9
9
|
const CollapsibleText = ({ text, variant = 'body', className, opened, setOpened, children }) => {
|
|
10
10
|
return (_jsxs(_Fragment, { children: [_jsx(UnstyledButton, { className: className, onClick: () => setOpened(!opened), children: _jsxs(Group, { gap: "0.4rem", align: "center", children: [_jsx(Text, { variant: variant, color: primary[200], children: text }), _jsx(IconCaretDownFilled, { size: 18, style: {
|
|
11
11
|
color: primary[200],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Formula.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Formula.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAK5D,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"Formula.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Formula.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAK5D,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqMD,QAAA,MAAM,OAAO,GAAI,qCAAqC,YAAY,4CAKjE,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from './Text';
|
|
3
3
|
import { Fraction } from './Fraction';
|
|
4
|
-
import { Group } from '../Layout/Group';
|
|
4
|
+
import { Group } from '../Layout/Group/Group';
|
|
5
5
|
class FormulaParser {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.tokens = [];
|
|
@@ -42,18 +42,14 @@ class FormulaParser {
|
|
|
42
42
|
}
|
|
43
43
|
// Strip whitespace from all tokens
|
|
44
44
|
const cleanedTokens = tokens.map((token) => token.trim()).filter((token) => token.length > 0);
|
|
45
|
-
console.log('Tokenized tokens:', cleanedTokens);
|
|
46
45
|
return cleanedTokens;
|
|
47
46
|
}
|
|
48
47
|
parseExpression() {
|
|
49
|
-
console.log('parseExpression - current token:', this.peek(), 'position:', this.current);
|
|
50
48
|
return this.parseAddition();
|
|
51
49
|
}
|
|
52
50
|
parseAddition() {
|
|
53
51
|
let left = this.parseMultiplication();
|
|
54
|
-
console.log('parseAddition - after parseMultiplication, current token:', this.peek(), 'position:', this.current);
|
|
55
52
|
while (this.current < this.tokens.length && (this.peek() === '+' || this.peek() === '-' || this.peek() === '=')) {
|
|
56
|
-
console.log('parseAddition - found operator:', this.peek());
|
|
57
53
|
const operator = this.advance();
|
|
58
54
|
const right = this.parseMultiplication();
|
|
59
55
|
left = [...left, { type: 'operator', value: operator }, ...right];
|
|
@@ -123,7 +119,7 @@ const FormulaRenderer = ({ nodes, weight, size, color }) => {
|
|
|
123
119
|
case 'default':
|
|
124
120
|
return (_jsx(Text, { weight: weight, size: size, color: color, children: node.value }, index));
|
|
125
121
|
case 'operator':
|
|
126
|
-
return (_jsx(Text, { weight: weight, size: size, color: color, children: node.value === '*' ? '×' : node.value }, index));
|
|
122
|
+
return (_jsx(Text, { weight: weight, size: size, color: color, mx: "0.25rem", children: node.value === '*' ? '×' : node.value }, index));
|
|
127
123
|
case 'subscript':
|
|
128
124
|
return (_jsxs(Text, { weight: weight, size: size, color: color, children: [node.value, _jsx("sub", { children: `(${node.subscript})` })] }, index));
|
|
129
125
|
case 'fraction':
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Divider } from '../Layout/Divider';
|
|
2
|
+
import { Divider } from '../Layout/Divider/Divider';
|
|
3
3
|
import { textStyle } from '../../constants';
|
|
4
4
|
import { Text } from './Text';
|
|
5
|
-
import { Stack } from '../Layout/Stack';
|
|
5
|
+
import { Stack } from '../Layout/Stack/Stack';
|
|
6
6
|
const Fraction = ({ numerator, denominator, variant = 'body', color, weight, size }) => {
|
|
7
7
|
const selectedVariant = textStyle[variant];
|
|
8
8
|
return (_jsxs(Stack, { sx: { display: 'inline-flex', alignItems: 'center', lineHeight: 1 }, gap: "0.25rem", children: [_jsx(Text, { variant: variant, color: color, weight: weight, size: size, sx: { display: 'block', textAlign: 'center' }, children: numerator }), _jsx(Divider, { color: color || selectedVariant.color, width: "100%" }), _jsx(Text, { variant: variant, color: color, weight: weight, size: size, sx: { display: 'block', textAlign: 'center' }, children: denominator })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvE,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,IAAI,GAAI,8DAAuE,SAAS,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvE,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,IAAI,GAAI,8DAAuE,SAAS,4CAsC7F,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -7,8 +7,6 @@ const Text = ({ variant = 'body', size, children, weight, color, styles, ...prop
|
|
|
7
7
|
const customWeight = weight ? { fontWeight: fontWeight[weight] } : {};
|
|
8
8
|
const customColor = color ? { color } : {};
|
|
9
9
|
const style = {
|
|
10
|
-
margin: 0,
|
|
11
|
-
padding: 0,
|
|
12
10
|
...styles,
|
|
13
11
|
...selectedVariant,
|
|
14
12
|
...customSize,
|
|
@@ -14,41 +14,41 @@ export { Tooltip } from './Info/Tooltips/Tooltip';
|
|
|
14
14
|
export { InfoTooltip } from './Info/Tooltips/InfoTooltip';
|
|
15
15
|
export { FormulaTooltip } from './Info/Tooltips/FormulaTooltip';
|
|
16
16
|
export { InfoCard } from './Info/InfoCard';
|
|
17
|
-
export { AutoComplete } from './Inputs/TextInputs/AutoComplete';
|
|
18
|
-
export { Button } from './Inputs/Buttons/Button';
|
|
19
|
-
export { UnstyledButton } from './Inputs/Buttons/UnstyledButton';
|
|
20
|
-
export { Checkbox } from './Inputs/Controls/Checkbox';
|
|
21
|
-
export { Radio } from './Inputs/Controls/Radio';
|
|
22
|
-
export { RadioList } from './Inputs/Controls/RadioList';
|
|
23
|
-
export { Toggle } from './Inputs/Controls/Toggle';
|
|
24
|
-
export { FontSelect } from './Inputs/Dropdowns/FontSelect';
|
|
25
|
-
export { MultiSelect } from './Inputs/Dropdowns/MultiSelect';
|
|
26
|
-
export { CascadingSelect } from './Inputs/Dropdowns/CascadingSelect';
|
|
27
|
-
export { SearchBar } from './Inputs/TextInputs/SearchBar';
|
|
28
|
-
export { Select } from './Inputs/Dropdowns/Select';
|
|
29
|
-
export { Slider } from './Inputs/Sliders/Slider';
|
|
30
|
-
export { VolumeSlider } from './Inputs/Sliders/VolumeSlider';
|
|
31
|
-
export { TextArea } from './Inputs/TextInputs/TextArea';
|
|
32
|
-
export { TextInput } from './Inputs/TextInputs/TextInput';
|
|
33
|
-
export { PasswordInput } from './Inputs/TextInputs/PasswordInput';
|
|
34
|
-
export { DatePicker } from './Inputs/Dates/DatePicker';
|
|
35
|
-
export { AutoGrid } from './Layout/AutoGrid';
|
|
36
|
-
export { Grid } from './Layout/Grid';
|
|
37
|
-
export { Box } from './Layout/Box';
|
|
38
|
-
export { Center } from './Layout/Center';
|
|
39
|
-
export { Divider } from './Layout/Divider';
|
|
40
|
-
export { Frame } from './Layout/Frame';
|
|
41
|
-
export { Group } from './Layout/Group';
|
|
42
|
-
export { Loader } from './Layout/Loader';
|
|
43
|
-
export { Stack } from './Layout/Stack';
|
|
44
|
-
export { Card } from './Layout/Card';
|
|
45
|
-
export { SectionCard } from './Layout/SectionCard';
|
|
46
|
-
export { Tabs } from './Layout/Tabs';
|
|
17
|
+
export { AutoComplete } from './Inputs/TextInputs/AutoComplete/AutoComplete';
|
|
18
|
+
export { Button } from './Inputs/Buttons/Button/Button';
|
|
19
|
+
export { UnstyledButton } from './Inputs/Buttons/UnstyledButton/UnstyledButton';
|
|
20
|
+
export { Checkbox } from './Inputs/Controls/Checkbox/Checkbox';
|
|
21
|
+
export { Radio } from './Inputs/Controls/Radio/Radio';
|
|
22
|
+
export { RadioList } from './Inputs/Controls/RadioList/RadioList';
|
|
23
|
+
export { Toggle } from './Inputs/Controls/Toggle/Toggle';
|
|
24
|
+
export { FontSelect } from './Inputs/Dropdowns/FontSelect/FontSelect';
|
|
25
|
+
export { MultiSelect } from './Inputs/Dropdowns/MultiSelect/MultiSelect';
|
|
26
|
+
export { CascadingSelect } from './Inputs/Dropdowns/CascadingSelect/CascadingSelect';
|
|
27
|
+
export { SearchBar } from './Inputs/TextInputs/SearchBar/SearchBar';
|
|
28
|
+
export { Select } from './Inputs/Dropdowns/Select/Select';
|
|
29
|
+
export { Slider } from './Inputs/Sliders/Slider/Slider';
|
|
30
|
+
export { VolumeSlider } from './Inputs/Sliders/VolumeSlider/VolumeSlider';
|
|
31
|
+
export { TextArea } from './Inputs/TextInputs/TextArea/TextArea';
|
|
32
|
+
export { TextInput } from './Inputs/TextInputs/TextInput/TextInput';
|
|
33
|
+
export { PasswordInput } from './Inputs/TextInputs/PasswordInput/PasswordInput';
|
|
34
|
+
export { DatePicker } from './Inputs/Dates/DatePicker/DatePicker';
|
|
35
|
+
export { AutoGrid } from './Layout/AutoGrid/AutoGrid';
|
|
36
|
+
export { Grid } from './Layout/Grid/Grid';
|
|
37
|
+
export { Box } from './Layout/Box/Box';
|
|
38
|
+
export { Center } from './Layout/Center/Center';
|
|
39
|
+
export { Divider } from './Layout/Divider/Divider';
|
|
40
|
+
export { Frame } from './Layout/Frame/Frame';
|
|
41
|
+
export { Group } from './Layout/Group/Group';
|
|
42
|
+
export { Loader } from './Layout/Loader/Loader';
|
|
43
|
+
export { Stack } from './Layout/Stack/Stack';
|
|
44
|
+
export { Card } from './Layout/Card/Card';
|
|
45
|
+
export { SectionCard } from './Layout/SectionCard/SectionCard';
|
|
46
|
+
export { Tabs } from './Layout/Tabs/Tabs';
|
|
47
47
|
export { CollapsibleText } from './Typography/CollapsibleText';
|
|
48
48
|
export { Text } from './Typography/Text';
|
|
49
49
|
export { Title } from './Typography/Title';
|
|
50
50
|
export { Fraction } from './Typography/Fraction';
|
|
51
51
|
export { Formula } from './Typography/Formula';
|
|
52
|
-
export { Transition } from './Misc/Transition';
|
|
53
|
-
export { IconBadge } from './Misc/IconBadge';
|
|
52
|
+
export { Transition } from './Misc/Transition/Transition';
|
|
53
|
+
export { IconBadge } from './Misc/IconBadge/IconBadge';
|
|
54
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAGlE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -17,37 +17,37 @@ export { InfoTooltip } from './Info/Tooltips/InfoTooltip';
|
|
|
17
17
|
export { FormulaTooltip } from './Info/Tooltips/FormulaTooltip';
|
|
18
18
|
export { InfoCard } from './Info/InfoCard';
|
|
19
19
|
//Inputs
|
|
20
|
-
export { AutoComplete } from './Inputs/TextInputs/AutoComplete';
|
|
21
|
-
export { Button } from './Inputs/Buttons/Button';
|
|
22
|
-
export { UnstyledButton } from './Inputs/Buttons/UnstyledButton';
|
|
23
|
-
export { Checkbox } from './Inputs/Controls/Checkbox';
|
|
24
|
-
export { Radio } from './Inputs/Controls/Radio';
|
|
25
|
-
export { RadioList } from './Inputs/Controls/RadioList';
|
|
26
|
-
export { Toggle } from './Inputs/Controls/Toggle';
|
|
27
|
-
export { FontSelect } from './Inputs/Dropdowns/FontSelect';
|
|
28
|
-
export { MultiSelect } from './Inputs/Dropdowns/MultiSelect';
|
|
29
|
-
export { CascadingSelect } from './Inputs/Dropdowns/CascadingSelect';
|
|
30
|
-
export { SearchBar } from './Inputs/TextInputs/SearchBar';
|
|
31
|
-
export { Select } from './Inputs/Dropdowns/Select';
|
|
32
|
-
export { Slider } from './Inputs/Sliders/Slider';
|
|
33
|
-
export { VolumeSlider } from './Inputs/Sliders/VolumeSlider';
|
|
34
|
-
export { TextArea } from './Inputs/TextInputs/TextArea';
|
|
35
|
-
export { TextInput } from './Inputs/TextInputs/TextInput';
|
|
36
|
-
export { PasswordInput } from './Inputs/TextInputs/PasswordInput';
|
|
37
|
-
export { DatePicker } from './Inputs/Dates/DatePicker';
|
|
20
|
+
export { AutoComplete } from './Inputs/TextInputs/AutoComplete/AutoComplete';
|
|
21
|
+
export { Button } from './Inputs/Buttons/Button/Button';
|
|
22
|
+
export { UnstyledButton } from './Inputs/Buttons/UnstyledButton/UnstyledButton';
|
|
23
|
+
export { Checkbox } from './Inputs/Controls/Checkbox/Checkbox';
|
|
24
|
+
export { Radio } from './Inputs/Controls/Radio/Radio';
|
|
25
|
+
export { RadioList } from './Inputs/Controls/RadioList/RadioList';
|
|
26
|
+
export { Toggle } from './Inputs/Controls/Toggle/Toggle';
|
|
27
|
+
export { FontSelect } from './Inputs/Dropdowns/FontSelect/FontSelect';
|
|
28
|
+
export { MultiSelect } from './Inputs/Dropdowns/MultiSelect/MultiSelect';
|
|
29
|
+
export { CascadingSelect } from './Inputs/Dropdowns/CascadingSelect/CascadingSelect';
|
|
30
|
+
export { SearchBar } from './Inputs/TextInputs/SearchBar/SearchBar';
|
|
31
|
+
export { Select } from './Inputs/Dropdowns/Select/Select';
|
|
32
|
+
export { Slider } from './Inputs/Sliders/Slider/Slider';
|
|
33
|
+
export { VolumeSlider } from './Inputs/Sliders/VolumeSlider/VolumeSlider';
|
|
34
|
+
export { TextArea } from './Inputs/TextInputs/TextArea/TextArea';
|
|
35
|
+
export { TextInput } from './Inputs/TextInputs/TextInput/TextInput';
|
|
36
|
+
export { PasswordInput } from './Inputs/TextInputs/PasswordInput/PasswordInput';
|
|
37
|
+
export { DatePicker } from './Inputs/Dates/DatePicker/DatePicker';
|
|
38
38
|
//Layout
|
|
39
|
-
export { AutoGrid } from './Layout/AutoGrid';
|
|
40
|
-
export { Grid } from './Layout/Grid';
|
|
41
|
-
export { Box } from './Layout/Box';
|
|
42
|
-
export { Center } from './Layout/Center';
|
|
43
|
-
export { Divider } from './Layout/Divider';
|
|
44
|
-
export { Frame } from './Layout/Frame';
|
|
45
|
-
export { Group } from './Layout/Group';
|
|
46
|
-
export { Loader } from './Layout/Loader';
|
|
47
|
-
export { Stack } from './Layout/Stack';
|
|
48
|
-
export { Card } from './Layout/Card';
|
|
49
|
-
export { SectionCard } from './Layout/SectionCard';
|
|
50
|
-
export { Tabs } from './Layout/Tabs';
|
|
39
|
+
export { AutoGrid } from './Layout/AutoGrid/AutoGrid';
|
|
40
|
+
export { Grid } from './Layout/Grid/Grid';
|
|
41
|
+
export { Box } from './Layout/Box/Box';
|
|
42
|
+
export { Center } from './Layout/Center/Center';
|
|
43
|
+
export { Divider } from './Layout/Divider/Divider';
|
|
44
|
+
export { Frame } from './Layout/Frame/Frame';
|
|
45
|
+
export { Group } from './Layout/Group/Group';
|
|
46
|
+
export { Loader } from './Layout/Loader/Loader';
|
|
47
|
+
export { Stack } from './Layout/Stack/Stack';
|
|
48
|
+
export { Card } from './Layout/Card/Card';
|
|
49
|
+
export { SectionCard } from './Layout/SectionCard/SectionCard';
|
|
50
|
+
export { Tabs } from './Layout/Tabs/Tabs';
|
|
51
51
|
//Typography
|
|
52
52
|
export { CollapsibleText } from './Typography/CollapsibleText';
|
|
53
53
|
export { Text } from './Typography/Text';
|
|
@@ -55,5 +55,5 @@ export { Title } from './Typography/Title';
|
|
|
55
55
|
export { Fraction } from './Typography/Fraction';
|
|
56
56
|
export { Formula } from './Typography/Formula';
|
|
57
57
|
//Misc
|
|
58
|
-
export { Transition } from './Misc/Transition';
|
|
59
|
-
export { IconBadge } from './Misc/IconBadge';
|
|
58
|
+
export { Transition } from './Misc/Transition/Transition';
|
|
59
|
+
export { IconBadge } from './Misc/IconBadge/IconBadge';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfirmationModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfirmationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE,eAAO,MAAM,oBAAoB;oBACR;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,aAAa,EAAE,OAAO,CAAC,CAAC;QACvD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB;
|
|
1
|
+
{"version":3,"file":"useConfirmationModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfirmationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE,eAAO,MAAM,oBAAoB;oBACR;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,aAAa,EAAE,OAAO,CAAC,CAAC;QACvD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB;qBAsFuB,MAAM;;CAa/B,CAAC"}
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { modals } from '@mantine/modals';
|
|
3
3
|
import { neutral } from '../constants/colors';
|
|
4
4
|
import { Title } from '../components/Typography/Title';
|
|
5
|
-
import { Stack } from '../components/Layout/Stack';
|
|
6
|
-
import { Center } from '../components/Layout/Center';
|
|
5
|
+
import { Stack } from '../components/Layout/Stack/Stack';
|
|
6
|
+
import { Center } from '../components/Layout/Center/Center';
|
|
7
7
|
import { modalVariants } from '../components/Info/Modals/variants';
|
|
8
|
-
import { Button } from '../components/Inputs/Buttons/Button';
|
|
9
|
-
import { Group } from '../components/Layout/Group';
|
|
8
|
+
import { Button } from '../components/Inputs/Buttons/Button/Button';
|
|
9
|
+
import { Group } from '../components/Layout/Group/Group';
|
|
10
10
|
export const useConfirmationModal = () => {
|
|
11
11
|
const show = (options) => {
|
|
12
|
-
const { variant = 'confirm', title, message, confirmLabel, cancelLabel, icon, onConfirm, onCancel, size = '40rem'
|
|
12
|
+
const { variant = 'confirm', title, message, confirmLabel, cancelLabel, icon, onConfirm, onCancel, size = '40rem' } = options;
|
|
13
13
|
const handleConfirm = () => {
|
|
14
14
|
if (onConfirm)
|
|
15
15
|
onConfirm();
|
|
@@ -28,7 +28,7 @@ export const useConfirmationModal = () => {
|
|
|
28
28
|
backgroundColor: selectedVariant.iconBackgroundColor,
|
|
29
29
|
border: `2px solid ${selectedVariant.iconColor}`,
|
|
30
30
|
};
|
|
31
|
-
const modalIcon = icon ||
|
|
31
|
+
const modalIcon = icon || _jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: '2rem' } });
|
|
32
32
|
const ConfirmModalContent = () => {
|
|
33
33
|
return (_jsx(Center, { h: "100%", w: "100%", children: _jsxs(Stack, { gap: "2rem", h: "100%", w: "100%", align: "center", children: [_jsxs(Stack, { gap: "1.5rem", align: "center", children: [_jsx(Center, { style: iconContainer, children: modalIcon }), _jsxs(Stack, { gap: "0.25rem", align: "center", children: [_jsx(Title, { variant: "cardHeader", align: "center", children: title || selectedVariant.title }), _jsx(Title, { variant: "cardSubheader", align: "center", children: message || selectedVariant.message })] })] }), _jsx(Center, { h: "100%", w: "100%", children: _jsxs(Group, { gap: "1rem", align: "center", children: [_jsx(Button, { onClick: handleCancel, variant: "secondary", children: cancelLabel || selectedVariant.cancelLabel }), _jsx(Button, { onClick: handleConfirm, variant: selectedVariant.buttonVariant, children: confirmLabel || selectedVariant.confirmLabel })] }) })] }) }));
|
|
34
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfoModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useInfoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,eAAO,MAAM,YAAY;oBACA;
|
|
1
|
+
{"version":3,"file":"useInfoModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useInfoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,eAAO,MAAM,YAAY;oBACA;QAAE,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;qBA4EjJ,MAAM;;CAa/B,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { modals } from '@mantine/modals';
|
|
3
3
|
import { neutral } from '../constants/colors';
|
|
4
4
|
import { Title } from '../components/Typography/Title';
|
|
5
|
-
import { Stack } from '../components/Layout/Stack';
|
|
6
|
-
import { Center } from '../components/Layout/Center';
|
|
5
|
+
import { Stack } from '../components/Layout/Stack/Stack';
|
|
6
|
+
import { Center } from '../components/Layout/Center/Center';
|
|
7
7
|
import { modalVariants } from '../components/Info/Modals/variants';
|
|
8
|
-
import { Button } from '../components/Inputs/Buttons/Button';
|
|
8
|
+
import { Button } from '../components/Inputs/Buttons/Button/Button';
|
|
9
9
|
export const useInfoModal = () => {
|
|
10
10
|
const show = (options) => {
|
|
11
11
|
const { variant = 'info', title, message, icon, onConfirm, size = '35rem' } = options;
|
|
@@ -22,7 +22,7 @@ export const useInfoModal = () => {
|
|
|
22
22
|
backgroundColor: selectedVariant.iconBackgroundColor,
|
|
23
23
|
border: `2px solid ${selectedVariant.iconColor}`,
|
|
24
24
|
};
|
|
25
|
-
const modalIcon = icon ||
|
|
25
|
+
const modalIcon = icon || _jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: '2rem' } });
|
|
26
26
|
const InfoModalContent = () => {
|
|
27
27
|
return (_jsx(Center, { h: "100%", w: "100%", children: _jsxs(Stack, { gap: "2rem", h: "100%", w: "100%", align: "center", children: [_jsxs(Stack, { gap: "1.5rem", align: "center", children: [_jsx(Center, { style: iconContainer, children: modalIcon }), _jsxs(Stack, { gap: "0.25rem", align: "center", children: [_jsx(Title, { variant: "cardHeader", align: "center", children: title || selectedVariant.title }), _jsx(Title, { variant: "cardSubheader", align: "center", children: message || selectedVariant.message })] })] }), _jsx(Center, { h: "100%", w: "100%", children: _jsx(Button, { onClick: handleConfirm, variant: selectedVariant.buttonVariant, children: "OK" }) })] }) }));
|
|
28
28
|
};
|
package/dist/utils/index.d.ts
CHANGED