norma-library 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.json +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierignore +11 -0
- package/.prettierrc.json +20 -0
- package/CHANGELOG.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/README.md +42 -0
- package/commitlint.config.js +1 -0
- package/dist/Button/index.d.ts +9 -0
- package/dist/Button/types.d.ts +18 -0
- package/dist/Card/Card.d.ts +3 -0
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/index.d.ts +4 -0
- package/dist/Card/styles.d.ts +546 -0
- package/dist/Card/types.d.ts +8 -0
- package/dist/esm/components/Accordion.d.ts +2 -2
- package/dist/esm/components/Accordion.js +8 -8
- package/dist/esm/components/Accordion.js.map +1 -1
- package/dist/esm/components/Avatar.d.ts +2 -2
- package/dist/esm/components/Avatar.js +7 -7
- package/dist/esm/components/Avatar.js.map +1 -1
- package/dist/esm/components/Badge.d.ts +2 -2
- package/dist/esm/components/Badge.js +5 -5
- package/dist/esm/components/Badge.js.map +1 -1
- package/dist/esm/components/Button.d.ts +2 -2
- package/dist/esm/components/Button.js +10 -10
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/Card.d.ts +3 -3
- package/dist/esm/components/Card.js +8 -8
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/ChatMessage.d.ts +2 -2
- package/dist/esm/components/ChatMessage.js +35 -35
- package/dist/esm/components/ChatMessage.js.map +1 -1
- package/dist/esm/components/CheckBox.d.ts +2 -2
- package/dist/esm/components/CheckBox.js +5 -5
- package/dist/esm/components/CheckBox.js.map +1 -1
- package/dist/esm/components/DataGrid/base/dropdown.d.ts +4 -0
- package/dist/esm/components/DataGrid/base/dropdown.js +126 -0
- package/dist/esm/components/DataGrid/base/dropdown.js.map +1 -0
- package/dist/esm/components/DataGrid/base/number-filter.d.ts +4 -0
- package/dist/esm/components/DataGrid/base/number-filter.js +30 -0
- package/dist/esm/components/DataGrid/base/number-filter.js.map +1 -0
- package/dist/esm/components/DataGrid/base/sorting.d.ts +5 -0
- package/dist/esm/components/DataGrid/base/sorting.js +15 -0
- package/dist/esm/components/DataGrid/base/sorting.js.map +1 -0
- package/dist/esm/components/DataGrid/icons.d.ts +4 -0
- package/dist/esm/components/DataGrid/icons.js +15 -0
- package/dist/esm/components/DataGrid/icons.js.map +1 -0
- package/dist/esm/components/DataGrid/index.d.ts +5 -0
- package/dist/esm/components/DataGrid/index.js +137 -0
- package/dist/esm/components/DataGrid/index.js.map +1 -0
- package/dist/esm/components/DataGrid/shared.d.ts +20 -0
- package/dist/esm/components/DataGrid/shared.js +128 -0
- package/dist/esm/components/DataGrid/shared.js.map +1 -0
- package/dist/esm/components/DataGrid/styled.d.ts +10 -0
- package/dist/esm/components/DataGrid/styled.js +73 -0
- package/dist/esm/components/DataGrid/styled.js.map +1 -0
- package/dist/esm/components/DatePicker.d.ts +5 -5
- package/dist/esm/components/DatePicker.js +37 -37
- package/dist/esm/components/DatePicker.js.map +1 -1
- package/dist/esm/components/DropDown.d.ts +2 -2
- package/dist/esm/components/DropDown.js +6 -6
- package/dist/esm/components/DropDown.js.map +1 -1
- package/dist/esm/components/IconButton.d.ts +2 -2
- package/dist/esm/components/IconButton.js +7 -7
- package/dist/esm/components/IconButton.js.map +1 -1
- package/dist/esm/components/Icons.d.ts +2 -2
- package/dist/esm/components/Icons.js +10 -10
- package/dist/esm/components/Icons.js.map +1 -1
- package/dist/esm/components/Modal.d.ts +2 -2
- package/dist/esm/components/Modal.js +8 -8
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Paper.d.ts +2 -2
- package/dist/esm/components/Paper.js +5 -5
- package/dist/esm/components/Paper.js.map +1 -1
- package/dist/esm/components/ProgressBar.d.ts +2 -2
- package/dist/esm/components/ProgressBar.js +11 -11
- package/dist/esm/components/ProgressBar.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +2 -2
- package/dist/esm/components/RadioGroup.js +7 -7
- package/dist/esm/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/RangerSlider.d.ts +2 -2
- package/dist/esm/components/RangerSlider.js +31 -31
- package/dist/esm/components/RangerSlider.js.map +1 -1
- package/dist/esm/components/Select.d.ts +2 -2
- package/dist/esm/components/Select.js +14 -14
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/Svgs.d.ts +1 -1
- package/dist/esm/components/Svgs.js +1 -1
- package/dist/esm/components/Svgs.js.map +1 -1
- package/dist/esm/components/Tabs.d.ts +2 -2
- package/dist/esm/components/Tabs.js +25 -26
- package/dist/esm/components/Tabs.js.map +1 -1
- package/dist/esm/components/Tag.d.ts +2 -2
- package/dist/esm/components/Tag.js +8 -8
- package/dist/esm/components/Tag.js.map +1 -1
- package/dist/esm/components/TextField.d.ts +2 -2
- package/dist/esm/components/TextField.js +8 -8
- package/dist/esm/components/TextField.js.map +1 -1
- package/dist/esm/components/TimeLine.d.ts +2 -2
- package/dist/esm/components/TimeLine.js +20 -20
- package/dist/esm/components/TimeLine.js.map +1 -1
- package/dist/esm/components/TimePicker.d.ts +8 -8
- package/dist/esm/components/TimePicker.js +43 -43
- package/dist/esm/components/TimePicker.js.map +1 -1
- package/dist/esm/components/index.d.ts +23 -22
- package/dist/esm/components/index.js +23 -22
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/helpers/alignments.js +7 -7
- package/dist/esm/helpers/borders.js +11 -11
- package/dist/esm/helpers/colors.js +41 -41
- package/dist/esm/helpers/index.d.ts +5 -5
- package/dist/esm/helpers/index.js +5 -5
- package/dist/esm/helpers/sizes.d.ts +1 -1
- package/dist/esm/helpers/sizes.js +39 -39
- package/dist/esm/helpers/sizes.js.map +1 -1
- package/dist/esm/index.d.ts +17 -17
- package/dist/esm/index.js +17 -17
- package/dist/esm/interfaces/Accordion.d.ts +3 -3
- package/dist/esm/interfaces/Avatar.d.ts +6 -6
- package/dist/esm/interfaces/Badge.d.ts +7 -7
- package/dist/esm/interfaces/Button.d.ts +5 -5
- package/dist/esm/interfaces/Card.d.ts +3 -3
- package/dist/esm/interfaces/ChatMessage.d.ts +1 -1
- package/dist/esm/interfaces/CheckBox.d.ts +10 -10
- package/dist/esm/interfaces/DataGrid.d.ts +40 -0
- package/dist/esm/interfaces/DataGrid.js +2 -0
- package/dist/esm/interfaces/DataGrid.js.map +1 -0
- package/dist/esm/interfaces/DatePicker.d.ts +3 -3
- package/dist/esm/interfaces/DropDown.d.ts +4 -4
- package/dist/esm/interfaces/IconButton.d.ts +5 -5
- package/dist/esm/interfaces/Icons.d.ts +3 -3
- package/dist/esm/interfaces/Modal.d.ts +3 -3
- package/dist/esm/interfaces/Paper.d.ts +4 -4
- package/dist/esm/interfaces/ProgressBar.d.ts +5 -5
- package/dist/esm/interfaces/RadioGroup.d.ts +4 -4
- package/dist/esm/interfaces/RangerSlider.d.ts +8 -8
- package/dist/esm/interfaces/Select.d.ts +3 -3
- package/dist/esm/interfaces/Tabs.d.ts +3 -3
- package/dist/esm/interfaces/Tag.d.ts +5 -5
- package/dist/esm/interfaces/TextField.d.ts +12 -12
- package/dist/esm/interfaces/TimeLine.d.ts +3 -3
- package/dist/esm/interfaces/TimePicker.d.ts +3 -3
- package/dist/esm/interfaces/index.d.ts +23 -22
- package/dist/esm/interfaces/index.js +23 -22
- package/dist/esm/interfaces/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +41 -40
- package/dist/esm/types/index.js +2 -2
- package/dist/esm/types/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +6992 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +266 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/docs/index.md +118 -0
- package/package.json +65 -9
- package/src/components/Accordion.tsx +47 -64
- package/src/components/Avatar.tsx +22 -29
- package/src/components/Badge.tsx +19 -22
- package/src/components/Button.tsx +12 -19
- package/src/components/Card.tsx +44 -47
- package/src/components/ChatMessage.tsx +87 -89
- package/src/components/CheckBox.tsx +8 -19
- package/src/components/DataGrid/allData.json +2918 -0
- package/src/components/DataGrid/base/dropdown.tsx +212 -0
- package/src/components/DataGrid/base/number-filter.tsx +43 -0
- package/src/components/DataGrid/base/sorting.tsx +29 -0
- package/src/components/DataGrid/icons.tsx +53 -0
- package/src/components/DataGrid/index.tsx +254 -0
- package/src/components/DataGrid/shared.ts +154 -0
- package/src/components/DataGrid/styled.ts +96 -0
- package/src/components/DataGrid/styles/dropdown.module.css +86 -0
- package/src/components/DataGrid/styles/number-filter.module.css +16 -0
- package/src/components/DataGrid/styles/styles.module.css +107 -0
- package/src/components/DatePicker.tsx +73 -84
- package/src/components/DropDown.tsx +31 -38
- package/src/components/IconButton.tsx +12 -29
- package/src/components/Icons.tsx +82 -87
- package/src/components/Modal.tsx +114 -123
- package/src/components/Paper.tsx +19 -22
- package/src/components/ProgressBar.tsx +54 -63
- package/src/components/RadioGroup.tsx +47 -55
- package/src/components/RangerSlider.tsx +70 -81
- package/src/components/Select.tsx +82 -98
- package/src/components/Svgs.tsx +498 -522
- package/src/components/Tabs.tsx +111 -140
- package/src/components/Tag.tsx +37 -45
- package/src/components/TextField.tsx +11 -22
- package/src/components/TimeLine.tsx +93 -103
- package/src/components/TimePicker.tsx +84 -95
- package/src/components/index.ts +23 -22
- package/src/helpers/alignments.ts +7 -7
- package/src/helpers/borders.ts +11 -11
- package/src/helpers/colors.ts +42 -42
- package/src/helpers/index.ts +5 -5
- package/src/helpers/sizes.ts +39 -46
- package/src/index.ts +17 -17
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -18
- package/src/interfaces/Badge.ts +19 -32
- package/src/interfaces/Button.ts +5 -10
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/CheckBox.ts +12 -18
- package/src/interfaces/DataGrid.ts +46 -0
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +5 -10
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +15 -15
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +18 -25
- package/src/interfaces/RadioGroup.ts +22 -28
- package/src/interfaces/RangerSlider.ts +21 -32
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -24
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +14 -34
- package/src/interfaces/TimeLine.ts +11 -16
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -22
- package/src/sample-data.json +178 -0
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -139
- package/src/stories/Badge.stories.tsx +39 -47
- package/src/stories/Button.stories.tsx +18 -26
- package/src/stories/Card.stories.tsx +40 -55
- package/src/stories/ChatMessage.stories.tsx +84 -85
- package/src/stories/CheckBox.stories.tsx +17 -23
- package/src/stories/DataGrid.stories.tsx +28 -0
- package/src/stories/DatePicker.stories.tsx +50 -77
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -114
- package/src/stories/Modal.stories.tsx +190 -190
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +95 -139
- package/src/stories/RadioGroup.stories.tsx +21 -28
- package/src/stories/RangerSlider.stories.tsx +58 -68
- package/src/stories/Select.stories.tsx +100 -128
- package/src/stories/Tabs.stories.tsx +62 -62
- package/src/stories/Tag.stories.tsx +56 -74
- package/src/stories/TextField.stories.tsx +54 -189
- package/src/stories/TimeLine.stories.tsx +35 -43
- package/src/stories/TimePicker.stories.tsx +87 -113
- package/src/types/index.ts +92 -154
- package/tsconfig.json +1 -1
- package/buildcache/front-end +0 -1
- package/norma-library.tar +0 -0
- package/postcss.config.js +0 -6
- package/tailwind.config.js +0 -58
|
@@ -1,113 +1,87 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { DemoContainer } from
|
|
3
|
-
import { AdapterDayjs } from
|
|
4
|
-
import { LocalizationProvider } from
|
|
5
|
-
import { TimePicker } from
|
|
6
|
-
import { MobileTimePicker } from
|
|
7
|
-
import { DesktopTimePicker } from
|
|
8
|
-
import type { Meta } from
|
|
9
|
-
import dayjs, { Dayjs } from
|
|
10
|
-
import utc from
|
|
11
|
-
import timezone from
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
dayjs.extend(utc);
|
|
18
|
-
dayjs.extend(timezone);
|
|
19
|
-
|
|
20
|
-
const meta = {
|
|
21
|
-
title:
|
|
22
|
-
component: TimePicker,
|
|
23
|
-
parameters: {
|
|
24
|
-
layout:
|
|
25
|
-
},
|
|
26
|
-
tags: [
|
|
27
|
-
argTypes: {},
|
|
28
|
-
} satisfies Meta<typeof TimePicker>;
|
|
29
|
-
|
|
30
|
-
export default meta;
|
|
31
|
-
|
|
32
|
-
export const BasicDatePicker = () => (
|
|
33
|
-
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
34
|
-
<DemoContainer components={[
|
|
35
|
-
<TimePicker label="TimePicker" />
|
|
36
|
-
</DemoContainer>
|
|
37
|
-
</LocalizationProvider>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
BasicDatePicker.storyName =
|
|
41
|
-
|
|
42
|
-
export const TimePickerVariants = () => (
|
|
43
|
-
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
44
|
-
<DemoContainer
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
timezone="America/Sao_Paulo"
|
|
66
|
-
|
|
67
|
-
</
|
|
68
|
-
</
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<div style={{ width: "480px", marginBottom: 30 }}>
|
|
89
|
-
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={"en"}>
|
|
90
|
-
<DemoContainer components={["TimePicker"]}>
|
|
91
|
-
<TimePicker
|
|
92
|
-
sx={{ minWidth: 275 }}
|
|
93
|
-
label="TimePicker English"
|
|
94
|
-
timezone="America/Sao_Paulo"
|
|
95
|
-
/>
|
|
96
|
-
</DemoContainer>
|
|
97
|
-
</LocalizationProvider>
|
|
98
|
-
</div>
|
|
99
|
-
<div style={{ width: "480px", marginBottom: 30 }}>
|
|
100
|
-
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={"es"}>
|
|
101
|
-
<DemoContainer components={["TimePicker"]}>
|
|
102
|
-
<TimePicker
|
|
103
|
-
sx={{ minWidth: 275 }}
|
|
104
|
-
label="TimePicker Spain"
|
|
105
|
-
timezone="America/Sao_Paulo"
|
|
106
|
-
/>
|
|
107
|
-
</DemoContainer>
|
|
108
|
-
</LocalizationProvider>
|
|
109
|
-
</div>
|
|
110
|
-
</>
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
TimePickerLanguage.storyName = "TimePicker Languages";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
|
|
3
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
4
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
5
|
+
import { TimePicker } from '@mui/x-date-pickers/TimePicker';
|
|
6
|
+
import { MobileTimePicker } from '@mui/x-date-pickers/MobileTimePicker';
|
|
7
|
+
import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker';
|
|
8
|
+
import type { Meta } from '@storybook/react';
|
|
9
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
10
|
+
import utc from 'dayjs/plugin/utc';
|
|
11
|
+
import timezone from 'dayjs/plugin/timezone';
|
|
12
|
+
|
|
13
|
+
import 'dayjs/locale/pt-br';
|
|
14
|
+
import 'dayjs/locale/en';
|
|
15
|
+
import 'dayjs/locale/es';
|
|
16
|
+
|
|
17
|
+
dayjs.extend(utc);
|
|
18
|
+
dayjs.extend(timezone);
|
|
19
|
+
|
|
20
|
+
const meta = {
|
|
21
|
+
title: 'Form/TimePicker',
|
|
22
|
+
component: TimePicker,
|
|
23
|
+
parameters: {
|
|
24
|
+
layout: 'centered',
|
|
25
|
+
},
|
|
26
|
+
tags: ['autodocs'],
|
|
27
|
+
argTypes: {},
|
|
28
|
+
} satisfies Meta<typeof TimePicker>;
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
|
|
32
|
+
export const BasicDatePicker = () => (
|
|
33
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
34
|
+
<DemoContainer components={['TimePicker']}>
|
|
35
|
+
<TimePicker label="TimePicker" />
|
|
36
|
+
</DemoContainer>
|
|
37
|
+
</LocalizationProvider>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
BasicDatePicker.storyName = 'TimePicker Basic';
|
|
41
|
+
|
|
42
|
+
export const TimePickerVariants = () => (
|
|
43
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
44
|
+
<DemoContainer components={['TimePicker', 'MobileTimePicker', 'DesktopTimePicker']}>
|
|
45
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
46
|
+
<TimePicker sx={{ minWidth: 275 }} label="TimePicker Responsive" timezone="America/Sao_Paulo" />
|
|
47
|
+
</div>
|
|
48
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
49
|
+
<MobileTimePicker sx={{ minWidth: 275 }} label="TimePicker Mobile" timezone="America/Sao_Paulo" />
|
|
50
|
+
</div>
|
|
51
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
52
|
+
<DesktopTimePicker sx={{ minWidth: 275 }} label="TimePicker Desktop" timezone="America/Sao_Paulo" />
|
|
53
|
+
</div>
|
|
54
|
+
</DemoContainer>
|
|
55
|
+
</LocalizationProvider>
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
TimePickerVariants.storyName = 'TimePicker Variants';
|
|
59
|
+
|
|
60
|
+
export const TimePickerLanguage = () => (
|
|
61
|
+
<>
|
|
62
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
63
|
+
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'pt-br'}>
|
|
64
|
+
<DemoContainer components={['TimePicker']}>
|
|
65
|
+
<TimePicker sx={{ minWidth: 275 }} label="TimePicker Brazil" timezone="America/Sao_Paulo" />
|
|
66
|
+
</DemoContainer>
|
|
67
|
+
</LocalizationProvider>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
71
|
+
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'en'}>
|
|
72
|
+
<DemoContainer components={['TimePicker']}>
|
|
73
|
+
<TimePicker sx={{ minWidth: 275 }} label="TimePicker English" timezone="America/Sao_Paulo" />
|
|
74
|
+
</DemoContainer>
|
|
75
|
+
</LocalizationProvider>
|
|
76
|
+
</div>
|
|
77
|
+
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
78
|
+
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'es'}>
|
|
79
|
+
<DemoContainer components={['TimePicker']}>
|
|
80
|
+
<TimePicker sx={{ minWidth: 275 }} label="TimePicker Spain" timezone="America/Sao_Paulo" />
|
|
81
|
+
</DemoContainer>
|
|
82
|
+
</LocalizationProvider>
|
|
83
|
+
</div>
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
TimePickerLanguage.storyName = 'TimePicker Languages';
|
package/src/types/index.ts
CHANGED
|
@@ -16,107 +16,74 @@ import {
|
|
|
16
16
|
SvgIconProps,
|
|
17
17
|
ModalProps,
|
|
18
18
|
CardProps as MuiCardProps,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import { TimelineProps as MuiTimeLineProps } from "@mui/lab";
|
|
22
|
-
|
|
23
|
-
import { SwitchBaseProps as MuiSwitchBaseProps } from "@mui/material/internal/SwitchBase";
|
|
24
|
-
|
|
25
|
-
import { iconsSVG } from "../components/Svgs";
|
|
26
|
-
|
|
27
|
-
export type ColorVariant =
|
|
28
|
-
| "inherit"
|
|
29
|
-
| "primary"
|
|
30
|
-
| "secondary"
|
|
31
|
-
| "success"
|
|
32
|
-
| "error"
|
|
33
|
-
| "info"
|
|
34
|
-
| "warning";
|
|
35
|
-
|
|
36
|
-
export type TextFieldColorVariant =
|
|
37
|
-
| "primary"
|
|
38
|
-
| "secondary"
|
|
39
|
-
| "error"
|
|
40
|
-
| "info"
|
|
41
|
-
| "success"
|
|
42
|
-
| "warning";
|
|
43
|
-
|
|
44
|
-
export type CheckBoxColorVariant =
|
|
45
|
-
| "primary"
|
|
46
|
-
| "secondary"
|
|
47
|
-
| "error"
|
|
48
|
-
| "info"
|
|
49
|
-
| "success"
|
|
50
|
-
| "warning"
|
|
51
|
-
| "default";
|
|
52
|
-
|
|
53
|
-
export type SizeVariant = "small" | "medium" | "large";
|
|
54
|
-
export type ButtonVariant = "text" | "outlined" | "contained";
|
|
55
|
-
export type DropVariant = "menu" | "selectedMenu";
|
|
56
|
-
export type TagVariant = "outlined" | "contained";
|
|
57
|
-
export type TabsVariant = "standard" | "scrollable" | "fullWidth";
|
|
58
|
-
export type DatePickVariant = "responsive" | "desktop" | "mobile";
|
|
59
|
-
export type ProgressVariant =
|
|
60
|
-
| "determinate"
|
|
61
|
-
| "indeterminate"
|
|
62
|
-
| "buffer"
|
|
63
|
-
| "query";
|
|
64
|
-
|
|
65
|
-
export type MuiButtonBaseProps = Omit<
|
|
66
|
-
MuiButtonProps,
|
|
67
|
-
"sx" | "color" | "size" | "variant"
|
|
68
|
-
>;
|
|
19
|
+
TableProps as MuiTableProps,
|
|
20
|
+
} from '@mui/material';
|
|
69
21
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
22
|
+
import { TimelineProps as MuiTimeLineProps } from '@mui/lab';
|
|
23
|
+
|
|
24
|
+
import { SwitchBaseProps as MuiSwitchBaseProps } from '@mui/material/internal/SwitchBase';
|
|
25
|
+
|
|
26
|
+
import { iconsSVG } from '../components/Svgs';
|
|
27
|
+
|
|
28
|
+
export type ColorVariant = 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
29
|
+
|
|
30
|
+
export type TextFieldColorVariant = 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
31
|
+
|
|
32
|
+
export type CheckBoxColorVariant = 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default';
|
|
33
|
+
|
|
34
|
+
export type SizeVariant = 'small' | 'medium' | 'large';
|
|
35
|
+
export type ButtonVariant = 'text' | 'outlined' | 'contained';
|
|
36
|
+
export type DropVariant = 'menu' | 'selectedMenu';
|
|
37
|
+
export type TagVariant = 'outlined' | 'contained';
|
|
38
|
+
export type TabsVariant = 'standard' | 'scrollable' | 'fullWidth';
|
|
39
|
+
export type DatePickVariant = 'responsive' | 'desktop' | 'mobile';
|
|
40
|
+
export type ProgressVariant = 'determinate' | 'indeterminate' | 'buffer' | 'query';
|
|
41
|
+
|
|
42
|
+
export type MuiButtonBaseProps = Omit<MuiButtonProps, 'sx' | 'color' | 'size' | 'variant'>;
|
|
43
|
+
|
|
44
|
+
export type MuiIconButtonBaseProps = Omit<MuiIconButtonProps, 'sx' | 'color' | 'size' | 'variant'>;
|
|
74
45
|
|
|
75
46
|
export type TextFieldValue = string | number;
|
|
76
|
-
export type TextFieldVariant =
|
|
77
|
-
export type TextFieldSizeVariant =
|
|
78
|
-
export type DirectionVariant =
|
|
79
|
-
export type PaperVariant =
|
|
80
|
-
export type PositionVariant =
|
|
81
|
-
| "left"
|
|
82
|
-
| "right"
|
|
83
|
-
| "alternate"
|
|
84
|
-
| "alternate-reverse";
|
|
47
|
+
export type TextFieldVariant = 'standard' | 'outlined' | 'filled';
|
|
48
|
+
export type TextFieldSizeVariant = 'small' | 'medium';
|
|
49
|
+
export type DirectionVariant = 'vertical' | 'horizontal';
|
|
50
|
+
export type PaperVariant = 'elevation' | 'outlined';
|
|
51
|
+
export type PositionVariant = 'left' | 'right' | 'alternate' | 'alternate-reverse';
|
|
85
52
|
|
|
86
53
|
export type MuiTextFieldBaseProps = Omit<
|
|
87
54
|
MuiTextFieldProps,
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
55
|
+
| 'onChange'
|
|
56
|
+
| 'onBlur'
|
|
57
|
+
| 'onFocus'
|
|
58
|
+
| 'defaultValue'
|
|
59
|
+
| 'size'
|
|
60
|
+
| 'value'
|
|
61
|
+
| 'id'
|
|
62
|
+
| 'fullWidth'
|
|
63
|
+
| 'helperText'
|
|
64
|
+
| 'type'
|
|
65
|
+
| 'InputProps'
|
|
66
|
+
| 'InputLabelProps'
|
|
67
|
+
| 'autoComplete'
|
|
68
|
+
| 'label'
|
|
69
|
+
| 'helperText'
|
|
70
|
+
| 'InputLabelProps'
|
|
71
|
+
| 'margin'
|
|
72
|
+
| 'maxRows'
|
|
73
|
+
| 'minRows'
|
|
74
|
+
| 'multiline'
|
|
75
|
+
| 'name'
|
|
76
|
+
| 'placeholder'
|
|
77
|
+
| 'rows'
|
|
78
|
+
| 'select'
|
|
79
|
+
| 'SelectProps'
|
|
80
|
+
| 'sx'
|
|
81
|
+
| 'autoFocus'
|
|
82
|
+
| 'error'
|
|
83
|
+
| 'classes'
|
|
84
|
+
| 'children'
|
|
85
|
+
| 'color'
|
|
86
|
+
| 'variant'
|
|
120
87
|
>;
|
|
121
88
|
|
|
122
89
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -125,73 +92,44 @@ export interface CheckboxPropsSizeOverrides {}
|
|
|
125
92
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
126
93
|
export interface CheckboxPropsColorOverrides {}
|
|
127
94
|
|
|
128
|
-
export type MuiCheckBoxBaseProps = Omit<MuiCheckBoxProps,
|
|
129
|
-
export type MuiModalBaseProps = Omit<ModalProps,
|
|
130
|
-
export type MuiCardBaseProps = Omit<MuiCardProps,
|
|
131
|
-
export type MuiDropDownBaseProps = Omit<MuiDropDownProps,
|
|
132
|
-
export type MuiTagBaseProps = Omit<MuiChipProps,
|
|
133
|
-
export type MuiRangerSliderBaseProps = Omit<MuiSliderProps,
|
|
134
|
-
export type MuiProgressBarBaseProps = Omit<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
>;
|
|
138
|
-
export type MuiTabsBaseProps = Omit<
|
|
139
|
-
MuiTabsProps,
|
|
140
|
-
"sx" | "children" | "onChange" | "variant" | "value"
|
|
141
|
-
>;
|
|
142
|
-
export type MuiAccordionBaseProps = Omit<
|
|
143
|
-
MuiAccordionProps,
|
|
144
|
-
"sx" | "children" | "defaultExpanded" | "onChange"
|
|
145
|
-
>;
|
|
146
|
-
export type MuiSelectBaseProps = Omit<
|
|
147
|
-
MuiSelectProps,
|
|
148
|
-
"sx" | "value" | "onClose" | "onOpen" | "input" | "label"
|
|
149
|
-
>;
|
|
95
|
+
export type MuiCheckBoxBaseProps = Omit<MuiCheckBoxProps, 'sx'>;
|
|
96
|
+
export type MuiModalBaseProps = Omit<ModalProps, 'sx'>;
|
|
97
|
+
export type MuiCardBaseProps = Omit<MuiCardProps, 'sx'>;
|
|
98
|
+
export type MuiDropDownBaseProps = Omit<MuiDropDownProps, 'sx' | 'variant'>;
|
|
99
|
+
export type MuiTagBaseProps = Omit<MuiChipProps, 'sx' | 'color'>;
|
|
100
|
+
export type MuiRangerSliderBaseProps = Omit<MuiSliderProps, 'sx' | 'color'>;
|
|
101
|
+
export type MuiProgressBarBaseProps = Omit<MuiLinearProgressProps, 'sx' | 'ref'>;
|
|
102
|
+
export type MuiTabsBaseProps = Omit<MuiTabsProps, 'sx' | 'children' | 'onChange' | 'variant' | 'value'>;
|
|
103
|
+
export type MuiAccordionBaseProps = Omit<MuiAccordionProps, 'sx' | 'children' | 'defaultExpanded' | 'onChange'>;
|
|
104
|
+
export type MuiSelectBaseProps = Omit<MuiSelectProps, 'sx' | 'value' | 'onClose' | 'onOpen' | 'input' | 'label'>;
|
|
150
105
|
|
|
151
|
-
export type MuiPaperBaseProps = Omit<MuiPaperProps,
|
|
106
|
+
export type MuiPaperBaseProps = Omit<MuiPaperProps, 'sx'>;
|
|
152
107
|
|
|
153
|
-
export type MuiDatePickerBaseProps = Omit<MuiTextFieldProps,
|
|
108
|
+
export type MuiDatePickerBaseProps = Omit<MuiTextFieldProps, 'sx'>;
|
|
154
109
|
|
|
155
|
-
export type
|
|
156
|
-
MuiAvatarProps,
|
|
157
|
-
"sx" | "src" | "children" | "variant" | "sizes"
|
|
158
|
-
>;
|
|
110
|
+
export type MuiDataGridBaseProps = Omit<MuiTableProps, 'sx'>;
|
|
159
111
|
|
|
160
|
-
export type
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
>;
|
|
112
|
+
export type MuiAvatarBaseProps = Omit<MuiAvatarProps, 'sx' | 'src' | 'children' | 'variant' | 'sizes'>;
|
|
113
|
+
|
|
114
|
+
export type MuiTimeLineBaseProps = Omit<MuiTimeLineProps, 'sx' | 'position' | 'children' | 'ref'>;
|
|
164
115
|
|
|
165
116
|
export type MuiBadgeBaseProps = Omit<
|
|
166
117
|
MuiBadgeProps,
|
|
167
|
-
|
|
|
168
|
-
| "color"
|
|
169
|
-
| "children"
|
|
170
|
-
| "invisible"
|
|
171
|
-
| "variant"
|
|
172
|
-
| "className"
|
|
173
|
-
| "badgeContent"
|
|
118
|
+
'sx' | 'color' | 'children' | 'invisible' | 'variant' | 'className' | 'badgeContent'
|
|
174
119
|
>;
|
|
175
120
|
|
|
176
|
-
export type IconScale =
|
|
177
|
-
| "xsmall"
|
|
178
|
-
| "small"
|
|
179
|
-
| "medium"
|
|
180
|
-
| "large"
|
|
181
|
-
| "xlarge"
|
|
182
|
-
| "2xlarge"
|
|
183
|
-
| "3xlarge";
|
|
121
|
+
export type IconScale = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | '3xlarge';
|
|
184
122
|
|
|
185
123
|
export type IconColors =
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
124
|
+
| 'inherit'
|
|
125
|
+
| 'primary'
|
|
126
|
+
| 'secondary'
|
|
127
|
+
| 'error'
|
|
128
|
+
| 'info'
|
|
129
|
+
| 'success'
|
|
130
|
+
| 'warning'
|
|
131
|
+
| 'white'
|
|
132
|
+
| 'black';
|
|
195
133
|
|
|
196
134
|
export const scaleSize: Record<IconScale, number> = {
|
|
197
135
|
xsmall: 14,
|
|
@@ -199,8 +137,8 @@ export const scaleSize: Record<IconScale, number> = {
|
|
|
199
137
|
medium: 24,
|
|
200
138
|
large: 28,
|
|
201
139
|
xlarge: 32,
|
|
202
|
-
|
|
203
|
-
|
|
140
|
+
'2xlarge': 36,
|
|
141
|
+
'3xlarge': 40,
|
|
204
142
|
};
|
|
205
143
|
|
|
206
144
|
export type SVGIconProps = {
|
|
@@ -212,7 +150,7 @@ export type IconKey = keyof typeof iconsSVG;
|
|
|
212
150
|
|
|
213
151
|
export type MuiRadioBaseProps = Omit<
|
|
214
152
|
MuiSwitchBaseProps,
|
|
215
|
-
|
|
153
|
+
'checkedIcon' | 'color' | 'icon' | 'type' | 'checked' | 'size'
|
|
216
154
|
>;
|
|
217
155
|
|
|
218
156
|
export type OptionsRadios = {
|