@taiv/ui 1.0.2 → 1.2.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.
Files changed (93) hide show
  1. package/README.md +23 -1
  2. package/dist/components/Data/Chart.d.ts +32 -0
  3. package/dist/components/Data/Chart.d.ts.map +1 -0
  4. package/dist/components/Data/Chart.js +97 -0
  5. package/dist/components/Data/CheckboxTable.js +2 -2
  6. package/dist/components/Data/PieChart.d.ts +24 -0
  7. package/dist/components/Data/PieChart.d.ts.map +1 -0
  8. package/dist/components/Data/PieChart.js +61 -0
  9. package/dist/components/Data/StatsCard.d.ts +17 -0
  10. package/dist/components/Data/StatsCard.d.ts.map +1 -0
  11. package/dist/components/Data/StatsCard.js +38 -0
  12. package/dist/components/Data/shared/dataFormats.d.ts +35 -0
  13. package/dist/components/Data/shared/dataFormats.d.ts.map +1 -0
  14. package/dist/components/Data/shared/dataFormats.js +25 -0
  15. package/dist/components/Info/Badge.d.ts +1 -0
  16. package/dist/components/Info/Badge.d.ts.map +1 -0
  17. package/dist/components/Info/Badge.js +1 -0
  18. package/dist/components/Info/InfoCard.d.ts +9 -0
  19. package/dist/components/Info/InfoCard.d.ts.map +1 -0
  20. package/dist/components/Info/InfoCard.js +18 -0
  21. package/dist/components/Info/Notifications/NotificationProvider.js +2 -2
  22. package/dist/components/Info/Tooltips/InfoTooltip.d.ts +4 -2
  23. package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -1
  24. package/dist/components/Info/Tooltips/InfoTooltip.js +2 -2
  25. package/dist/components/Info/Tooltips/Tooltip.d.ts +1 -1
  26. package/dist/components/Info/Tooltips/Tooltip.d.ts.map +1 -1
  27. package/dist/components/Info/Tooltips/Tooltip.js +1 -1
  28. package/dist/components/Inputs/Buttons/Button.d.ts +2 -1
  29. package/dist/components/Inputs/Buttons/Button.d.ts.map +1 -1
  30. package/dist/components/Inputs/Buttons/Button.js +12 -2
  31. package/dist/components/Inputs/Buttons/shared/variants.d.ts +50 -0
  32. package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
  33. package/dist/components/Inputs/Buttons/shared/variants.js +50 -0
  34. package/dist/components/Inputs/DatePickers/DatePicker.d.ts +12 -0
  35. package/dist/components/Inputs/DatePickers/DatePicker.d.ts.map +1 -0
  36. package/dist/components/Inputs/DatePickers/DatePicker.js +35 -0
  37. package/dist/components/Layout/AutoGrid.d.ts +8 -0
  38. package/dist/components/Layout/AutoGrid.d.ts.map +1 -0
  39. package/dist/components/Layout/AutoGrid.js +6 -0
  40. package/dist/components/Layout/Card.d.ts +8 -0
  41. package/dist/components/Layout/Card.d.ts.map +1 -0
  42. package/dist/components/Layout/Card.js +16 -0
  43. package/dist/components/Layout/Grid.d.ts +10 -0
  44. package/dist/components/Layout/Grid.d.ts.map +1 -0
  45. package/dist/components/Layout/Grid.js +9 -0
  46. package/dist/components/Layout/SectionCard.d.ts +11 -0
  47. package/dist/components/Layout/SectionCard.d.ts.map +1 -0
  48. package/dist/components/Layout/SectionCard.js +12 -0
  49. package/dist/components/Layout/Tabs.d.ts +17 -0
  50. package/dist/components/Layout/Tabs.d.ts.map +1 -0
  51. package/dist/components/Layout/Tabs.js +48 -0
  52. package/dist/components/Misc/IconBadge.d.ts +8 -0
  53. package/dist/components/Misc/IconBadge.d.ts.map +1 -0
  54. package/dist/components/Misc/IconBadge.js +29 -0
  55. package/dist/components/Typography/Fraction.d.ts +10 -0
  56. package/dist/components/Typography/Fraction.d.ts.map +1 -0
  57. package/dist/components/Typography/Fraction.js +7 -0
  58. package/dist/components/Typography/Text.d.ts.map +1 -1
  59. package/dist/components/Typography/Text.js +10 -2
  60. package/dist/components/index.d.ts +44 -32
  61. package/dist/components/index.d.ts.map +1 -1
  62. package/dist/components/index.js +44 -32
  63. package/dist/constants/breakpoints.d.ts +8 -0
  64. package/dist/constants/breakpoints.d.ts.map +1 -0
  65. package/dist/constants/breakpoints.js +8 -0
  66. package/dist/constants/colors.d.ts +97 -11
  67. package/dist/constants/colors.d.ts.map +1 -1
  68. package/dist/constants/colors.js +35 -19
  69. package/dist/constants/index.d.ts +1 -0
  70. package/dist/constants/index.d.ts.map +1 -1
  71. package/dist/constants/index.js +1 -0
  72. package/dist/hooks/index.d.ts +1 -1
  73. package/dist/hooks/index.d.ts.map +1 -1
  74. package/dist/hooks/index.js +1 -1
  75. package/dist/hooks/useMediaQuery.d.ts +7 -0
  76. package/dist/hooks/useMediaQuery.d.ts.map +1 -1
  77. package/dist/hooks/useMediaQuery.js +21 -0
  78. package/package.json +20 -4
  79. package/dist/components/Info/Modals/ConfirmationModal.d.ts +0 -18
  80. package/dist/components/Info/Modals/ConfirmationModal.d.ts.map +0 -1
  81. package/dist/components/Info/Modals/ConfirmationModal.js +0 -76
  82. package/dist/components/Info/Modals/InfoModal.d.ts +0 -15
  83. package/dist/components/Info/Modals/InfoModal.d.ts.map +0 -1
  84. package/dist/components/Info/Modals/InfoModal.js +0 -70
  85. package/dist/components/Info/Notifications/Notifications.d.ts +0 -16
  86. package/dist/components/Info/Notifications/Notifications.d.ts.map +0 -1
  87. package/dist/components/Info/Notifications/Notifications.js +0 -41
  88. package/dist/components/Misc/Copy.d.ts +0 -10
  89. package/dist/components/Misc/Copy.d.ts.map +0 -1
  90. package/dist/components/Misc/Copy.js +0 -18
  91. package/dist/components/Misc/MediaQuery.d.ts +0 -3
  92. package/dist/components/Misc/MediaQuery.d.ts.map +0 -1
  93. package/dist/components/Misc/MediaQuery.js +0 -2
@@ -1,38 +1,50 @@
1
1
  //Data
2
- export { CheckboxTable } from "./Data/CheckboxTable";
3
- export { RemovableItemList } from "./Data/RemovableItemList";
2
+ export { CheckboxTable } from './Data/CheckboxTable';
3
+ export { Chart } from './Data/Chart';
4
+ export { PieChart } from './Data/PieChart';
5
+ export { RemovableItemList } from './Data/RemovableItemList';
6
+ export { StatsCard } from './Data/StatsCard';
4
7
  //Info
5
- export { ModalProvider } from "./Info/Modals/ModalProvider";
6
- export { Modal } from "./Info/Modals/Modal";
7
- export { NotificationProvider } from "./Info/Notifications/NotificationProvider";
8
- export { InfoTooltip } from "./Info/Tooltips/InfoTooltip";
9
- export { Tooltip } from "./Info/Tooltips/Tooltip";
8
+ export { Modal } from './Info/Modals/Modal';
9
+ export { ModalProvider } from './Info/Modals/ModalProvider';
10
+ export { NotificationProvider } from './Info/Notifications/NotificationProvider';
11
+ export { Tooltip } from './Info/Tooltips/Tooltip';
12
+ export { InfoTooltip } from './Info/Tooltips/InfoTooltip';
13
+ export { InfoCard } from './Info/InfoCard';
10
14
  //Inputs
11
- export { AutoComplete } from "./Inputs/TextInputs/AutoComplete";
12
- export { Button } from "./Inputs/Buttons/Button";
13
- export { UnstyledButton } from "./Inputs/Buttons/UnstyledButton";
14
- export { Checkbox } from "./Inputs/Controls/Checkbox";
15
- export { Toggle } from "./Inputs/Controls/Toggle";
16
- export { FontSelect } from "./Inputs/Dropdowns/FontSelect";
17
- export { MultiSelect } from "./Inputs/Dropdowns/MultiSelect";
18
- export { SearchBar } from "./Inputs/TextInputs/SearchBar";
19
- export { Select } from "./Inputs/Dropdowns/Select";
20
- export { Slider } from "./Inputs/Sliders/Slider";
21
- export { VolumeSlider } from "./Inputs/Sliders/VolumeSlider";
22
- export { TextArea } from "./Inputs/TextInputs/TextArea";
23
- export { TextInput } from "./Inputs/TextInputs/TextInput";
24
- export { PasswordInput } from "./Inputs/TextInputs/PasswordInput";
15
+ export { AutoComplete } from './Inputs/TextInputs/AutoComplete';
16
+ export { Button } from './Inputs/Buttons/Button';
17
+ export { UnstyledButton } from './Inputs/Buttons/UnstyledButton';
18
+ export { Checkbox } from './Inputs/Controls/Checkbox';
19
+ export { Toggle } from './Inputs/Controls/Toggle';
20
+ export { FontSelect } from './Inputs/Dropdowns/FontSelect';
21
+ export { MultiSelect } from './Inputs/Dropdowns/MultiSelect';
22
+ export { SearchBar } from './Inputs/TextInputs/SearchBar';
23
+ export { Select } from './Inputs/Dropdowns/Select';
24
+ export { Slider } from './Inputs/Sliders/Slider';
25
+ export { VolumeSlider } from './Inputs/Sliders/VolumeSlider';
26
+ export { TextArea } from './Inputs/TextInputs/TextArea';
27
+ export { TextInput } from './Inputs/TextInputs/TextInput';
28
+ export { PasswordInput } from './Inputs/TextInputs/PasswordInput';
29
+ export { DatePicker } from './Inputs/DatePickers/DatePicker';
25
30
  //Layout
26
- export { Box } from "./Layout/Box";
27
- export { Center } from "./Layout/Center";
28
- export { Divider } from "./Layout/Divider";
29
- export { Frame } from "./Layout/Frame";
30
- export { Group } from "./Layout/Group";
31
- export { Loader } from "./Layout/Loader";
32
- export { Stack } from "./Layout/Stack";
31
+ export { AutoGrid } from './Layout/AutoGrid';
32
+ export { Grid } from './Layout/Grid';
33
+ export { Box } from './Layout/Box';
34
+ export { Center } from './Layout/Center';
35
+ export { Divider } from './Layout/Divider';
36
+ export { Frame } from './Layout/Frame';
37
+ export { Group } from './Layout/Group';
38
+ export { Loader } from './Layout/Loader';
39
+ export { Stack } from './Layout/Stack';
40
+ export { Card } from './Layout/Card';
41
+ export { SectionCard } from './Layout/SectionCard';
42
+ export { Tabs } from './Layout/Tabs';
33
43
  //Typography
34
- export { CollapsibleText } from "./Typography/CollapsibleText";
35
- export { Text } from "./Typography/Text";
36
- export { Title } from "./Typography/Title";
44
+ export { CollapsibleText } from './Typography/CollapsibleText';
45
+ export { Text } from './Typography/Text';
46
+ export { Title } from './Typography/Title';
47
+ export { Fraction } from './Typography/Fraction';
37
48
  //Misc
38
- export { Transition } from "./Misc/Transition";
49
+ export { Transition } from './Misc/Transition';
50
+ export { IconBadge } from './Misc/IconBadge';
@@ -0,0 +1,8 @@
1
+ export declare const BREAKPOINTS: {
2
+ readonly MOBILE: 640;
3
+ readonly TABLET: 768;
4
+ readonly LAPTOP: 1024;
5
+ readonly DESKTOP: 1280;
6
+ readonly WIDE: 1536;
7
+ };
8
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/constants/breakpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC"}
@@ -0,0 +1,8 @@
1
+ // Breakpoints in px - from Tailwind CSS
2
+ export const BREAKPOINTS = {
3
+ MOBILE: 640,
4
+ TABLET: 768,
5
+ LAPTOP: 1024,
6
+ DESKTOP: 1280,
7
+ WIDE: 1536,
8
+ };
@@ -1,3 +1,10 @@
1
+ export declare const gray: {
2
+ readonly 25: "#F8FAFC";
3
+ readonly 50: "#EDEDED";
4
+ readonly 100: "#D9D9D9";
5
+ readonly 200: "#6D6D6D";
6
+ readonly 300: "#3F3F3F";
7
+ };
1
8
  export declare const neutral: {
2
9
  readonly 25: "#F8FAFC";
3
10
  readonly 50: "#EDEDED";
@@ -5,6 +12,13 @@ export declare const neutral: {
5
12
  readonly 200: "#6D6D6D";
6
13
  readonly 300: "#3F3F3F";
7
14
  };
15
+ export declare const blue: {
16
+ readonly 25: "#EEFAFF";
17
+ readonly 50: "#BDEAFF";
18
+ readonly 100: "#74D4FF";
19
+ readonly 200: "#00A6F4";
20
+ readonly 300: "#0081CE";
21
+ };
8
22
  export declare const primary: {
9
23
  readonly 25: "#EEFAFF";
10
24
  readonly 50: "#BDEAFF";
@@ -12,30 +26,58 @@ export declare const primary: {
12
26
  readonly 200: "#00A6F4";
13
27
  readonly 300: "#0081CE";
14
28
  };
15
- export declare const secondary: {
16
- readonly 50: "#E8F5E9";
17
- readonly 100: "#C8E6C9";
18
- readonly 200: "#81C784";
19
- readonly 300: "#4CAF50";
29
+ export declare const green: {
30
+ readonly 25: "#E6F4E7";
31
+ readonly 50: "#E6F4E7";
32
+ readonly 100: "#00C951";
33
+ readonly 200: "#00A63E";
34
+ readonly 300: "#008236";
20
35
  };
21
36
  export declare const success: {
37
+ readonly 25: "#E6F4E7";
22
38
  readonly 50: "#E6F4E7";
23
39
  readonly 100: "#00C951";
24
40
  readonly 200: "#00A63E";
25
41
  readonly 300: "#008236";
26
42
  };
43
+ export declare const yellow: {
44
+ readonly 25: "#FFF3E0";
45
+ readonly 50: "#FFE5B4";
46
+ readonly 100: "#FE9A00";
47
+ readonly 200: "#E17100";
48
+ readonly 300: "#973C00";
49
+ };
27
50
  export declare const warning: {
51
+ readonly 25: "#FFF3E0";
28
52
  readonly 50: "#FFE5B4";
29
53
  readonly 100: "#FE9A00";
30
54
  readonly 200: "#E17100";
31
55
  readonly 300: "#973C00";
32
56
  };
57
+ export declare const red: {
58
+ readonly 25: "#FFE5E6";
59
+ readonly 50: "#FFD7D9";
60
+ readonly 100: "#FB2C36";
61
+ readonly 200: "#C10007";
62
+ readonly 300: "#9F0712";
63
+ };
33
64
  export declare const error: {
65
+ readonly 25: "#FFE5E6";
34
66
  readonly 50: "#FFD7D9";
35
67
  readonly 100: "#FB2C36";
36
68
  readonly 200: "#C10007";
37
69
  readonly 300: "#9F0712";
38
70
  };
71
+ export declare const purple: {
72
+ readonly 50: "#EFEAFF";
73
+ readonly 100: "#D6C8FF";
74
+ readonly 200: "#7D63C8";
75
+ };
76
+ export declare const salmon: {
77
+ readonly 50: "#FFEAE6";
78
+ readonly 100: "#FFD1C7";
79
+ readonly 200: "#FF806F";
80
+ };
39
81
  export declare const colors: {
40
82
  readonly neutral: {
41
83
  readonly 25: "#F8FAFC";
@@ -51,29 +93,73 @@ export declare const colors: {
51
93
  readonly 200: "#00A6F4";
52
94
  readonly 300: "#0081CE";
53
95
  };
54
- readonly secondary: {
55
- readonly 50: "#E8F5E9";
56
- readonly 100: "#C8E6C9";
57
- readonly 200: "#81C784";
58
- readonly 300: "#4CAF50";
59
- };
60
96
  readonly success: {
97
+ readonly 25: "#E6F4E7";
61
98
  readonly 50: "#E6F4E7";
62
99
  readonly 100: "#00C951";
63
100
  readonly 200: "#00A63E";
64
101
  readonly 300: "#008236";
65
102
  };
66
103
  readonly warning: {
104
+ readonly 25: "#FFF3E0";
67
105
  readonly 50: "#FFE5B4";
68
106
  readonly 100: "#FE9A00";
69
107
  readonly 200: "#E17100";
70
108
  readonly 300: "#973C00";
71
109
  };
72
110
  readonly error: {
111
+ readonly 25: "#FFE5E6";
73
112
  readonly 50: "#FFD7D9";
74
113
  readonly 100: "#FB2C36";
75
114
  readonly 200: "#C10007";
76
115
  readonly 300: "#9F0712";
77
116
  };
78
117
  };
118
+ export declare const palettes: {
119
+ readonly blue: {
120
+ readonly 25: "#EEFAFF";
121
+ readonly 50: "#BDEAFF";
122
+ readonly 100: "#74D4FF";
123
+ readonly 200: "#00A6F4";
124
+ readonly 300: "#0081CE";
125
+ };
126
+ readonly green: {
127
+ readonly 25: "#E6F4E7";
128
+ readonly 50: "#E6F4E7";
129
+ readonly 100: "#00C951";
130
+ readonly 200: "#00A63E";
131
+ readonly 300: "#008236";
132
+ };
133
+ readonly yellow: {
134
+ readonly 25: "#FFF3E0";
135
+ readonly 50: "#FFE5B4";
136
+ readonly 100: "#FE9A00";
137
+ readonly 200: "#E17100";
138
+ readonly 300: "#973C00";
139
+ };
140
+ readonly red: {
141
+ readonly 25: "#FFE5E6";
142
+ readonly 50: "#FFD7D9";
143
+ readonly 100: "#FB2C36";
144
+ readonly 200: "#C10007";
145
+ readonly 300: "#9F0712";
146
+ };
147
+ readonly purple: {
148
+ readonly 50: "#EFEAFF";
149
+ readonly 100: "#D6C8FF";
150
+ readonly 200: "#7D63C8";
151
+ };
152
+ readonly salmon: {
153
+ readonly 50: "#FFEAE6";
154
+ readonly 100: "#FFD1C7";
155
+ readonly 200: "#FF806F";
156
+ };
157
+ readonly gray: {
158
+ readonly 25: "#F8FAFC";
159
+ readonly 50: "#EDEDED";
160
+ readonly 100: "#D9D9D9";
161
+ readonly 200: "#6D6D6D";
162
+ readonly 300: "#3F3F3F";
163
+ };
164
+ };
79
165
  //# sourceMappingURL=colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC;AAGX,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC;AAGX,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAGX,eAAO,MAAM,OAAO;;;;;CAKV,CAAC;AAGX,eAAO,MAAM,OAAO;;;;;CAKV,CAAC;AAGX,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOT,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAQ,CAAC;AAE7B,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAS,CAAC;AAE9B,eAAO,MAAM,GAAG;;;;;;CAMN,CAAC;AACX,eAAO,MAAM,KAAK;;;;;;CAAM,CAAC;AAGzB,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AAGX,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQX,CAAC"}
@@ -1,53 +1,69 @@
1
- // Neutral Colors - Grays
2
- export const neutral = {
1
+ export const gray = {
3
2
  25: '#F8FAFC',
4
3
  50: '#EDEDED',
5
4
  100: '#D9D9D9',
6
5
  200: '#6D6D6D',
7
6
  300: '#3F3F3F',
8
7
  };
9
- // Primary Colors - Blues
10
- export const primary = {
8
+ export const neutral = gray;
9
+ export const blue = {
11
10
  25: '#EEFAFF',
12
11
  50: '#BDEAFF',
13
12
  100: '#74D4FF',
14
13
  200: '#00A6F4',
15
14
  300: '#0081CE',
16
15
  };
17
- // Secondary Colors - Blues (temp)
18
- export const secondary = {
19
- 50: '#E8F5E9',
20
- 100: '#C8E6C9',
21
- 200: '#81C784',
22
- 300: '#4CAF50',
23
- };
24
- // Success Colors - Greens
25
- export const success = {
16
+ export const primary = blue;
17
+ export const green = {
18
+ 25: '#E6F4E7',
26
19
  50: '#E6F4E7',
27
20
  100: '#00C951',
28
21
  200: '#00A63E',
29
22
  300: '#008236',
30
23
  };
31
- // Warning Colors - Oranges
32
- export const warning = {
24
+ export const success = green;
25
+ export const yellow = {
26
+ 25: '#FFF3E0',
33
27
  50: '#FFE5B4',
34
28
  100: '#FE9A00',
35
29
  200: '#E17100',
36
30
  300: '#973C00',
37
31
  };
38
- // Error Colors - Reds
39
- export const error = {
32
+ export const warning = yellow;
33
+ export const red = {
34
+ 25: '#FFE5E6',
40
35
  50: '#FFD7D9',
41
36
  100: '#FB2C36',
42
37
  200: '#C10007',
43
38
  300: '#9F0712',
44
39
  };
45
- // Export for all colors
40
+ export const error = red;
41
+ // Purple Colors
42
+ export const purple = {
43
+ 50: '#EFEAFF',
44
+ 100: '#D6C8FF',
45
+ 200: '#7D63C8',
46
+ };
47
+ export const salmon = {
48
+ 50: '#FFEAE6',
49
+ 100: '#FFD1C7',
50
+ 200: '#FF806F',
51
+ };
52
+ // Semantic/functional color exports - for use in UI, actions, states, etc.
46
53
  export const colors = {
47
54
  neutral,
48
55
  primary,
49
- secondary,
50
56
  success,
51
57
  warning,
52
58
  error,
53
59
  };
60
+ // Color palette exports - for purely aesthetic purpose, i.e. icons, backgrounds, etc.
61
+ export const palettes = {
62
+ blue,
63
+ green,
64
+ yellow,
65
+ red,
66
+ purple,
67
+ salmon,
68
+ gray,
69
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './colors';
2
2
  export * from './font';
3
+ export * from './breakpoints';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
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,2 +1,3 @@
1
1
  export * from './colors';
2
2
  export * from './font';
3
+ export * from './breakpoints';
@@ -1,5 +1,5 @@
1
1
  export { useCopy } from './useCopy';
2
- export { useMediaQuery } from './useMediaQuery';
2
+ export { useMediaQuery, useScreenSize, useMobile, useTablet, useLaptop, useDesktop, useWide } from './useMediaQuery';
3
3
  export { useNotifications } from './useNotifications';
4
4
  export { useConfirmationModal } from './useConfirmationModal';
5
5
  export { useInfoModal } from './useInfoModal';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { useCopy } from './useCopy';
2
- export { useMediaQuery } from './useMediaQuery';
2
+ export { useMediaQuery, useScreenSize, useMobile, useTablet, useLaptop, useDesktop, useWide } from './useMediaQuery';
3
3
  export { useNotifications } from './useNotifications';
4
4
  export { useConfirmationModal } from './useConfirmationModal';
5
5
  export { useInfoModal } from './useInfoModal';
@@ -1,3 +1,10 @@
1
1
  import { useMediaQuery as useMantineMediaQuery } from '@mantine/hooks';
2
+ import { BREAKPOINTS } from '../constants/breakpoints';
2
3
  export declare const useMediaQuery: typeof useMantineMediaQuery;
4
+ export declare const useScreenSize: () => keyof typeof BREAKPOINTS;
5
+ export declare const useMobile: () => boolean;
6
+ export declare const useTablet: () => boolean;
7
+ export declare const useLaptop: () => boolean;
8
+ export declare const useDesktop: () => boolean;
9
+ export declare const useWide: () => boolean;
3
10
  //# sourceMappingURL=useMediaQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,eAAO,MAAM,aAAa,6BAAuB,CAAC"}
1
+ {"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,eAAO,MAAM,aAAa,6BAAuB,CAAC;AAElD,eAAO,MAAM,aAAa,QAAO,MAAM,OAAO,WAW7C,CAAC;AAEF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,UAAU,eAA+D,CAAC;AACvF,eAAO,MAAM,OAAO,eAA4D,CAAC"}
@@ -1,2 +1,23 @@
1
1
  import { useMediaQuery as useMantineMediaQuery } from '@mantine/hooks';
2
+ import { BREAKPOINTS } from '../constants/breakpoints';
2
3
  export const useMediaQuery = useMantineMediaQuery;
4
+ export const useScreenSize = () => {
5
+ const isMobile = useMobile();
6
+ const isTablet = useTablet();
7
+ const isLaptop = useLaptop();
8
+ const isDesktop = useDesktop();
9
+ if (isMobile)
10
+ return 'MOBILE';
11
+ if (isTablet)
12
+ return 'TABLET';
13
+ if (isLaptop)
14
+ return 'LAPTOP';
15
+ if (isDesktop)
16
+ return 'DESKTOP';
17
+ return 'WIDE';
18
+ };
19
+ export const useMobile = () => useMediaQuery(`(max-width: ${BREAKPOINTS.MOBILE}px)`);
20
+ export const useTablet = () => useMediaQuery(`(max-width: ${BREAKPOINTS.TABLET}px)`);
21
+ export const useLaptop = () => useMediaQuery(`(max-width: ${BREAKPOINTS.LAPTOP}px)`);
22
+ export const useDesktop = () => useMediaQuery(`(max-width: ${BREAKPOINTS.DESKTOP}px)`);
23
+ export const useWide = () => useMediaQuery(`(max-width: ${BREAKPOINTS.WIDE}px)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiv/ui",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "author": "Taiv",
5
5
  "description": "Taiv's web UI Toolkit built on Mantine v6",
6
6
  "main": "dist/index.js",
@@ -14,11 +14,15 @@
14
14
  "clean": "rm -rf dist"
15
15
  },
16
16
  "dependencies": {
17
- "@tabler/icons-react": "^2.47.0",
17
+ "@emotion/react": "^11.14.0",
18
18
  "@mantine/core": "^6.0.0",
19
+ "@mantine/dates": "^6.0.22",
19
20
  "@mantine/hooks": "^6.0.0",
20
21
  "@mantine/modals": "^6.0.0",
21
- "@mantine/notifications": "^6.0.0"
22
+ "@mantine/notifications": "^6.0.0",
23
+ "@tabler/icons-react": "^2.47.0",
24
+ "dayjs": "^1.11.18",
25
+ "recharts": "^3.1.2"
22
26
  },
23
27
  "peerDependencies": {
24
28
  "react": "^17.0.0",
@@ -33,5 +37,17 @@
33
37
  ".": "./dist/components/index.js",
34
38
  "./hooks": "./dist/hooks/index.js",
35
39
  "./constants": "./dist/constants/index.js"
40
+ },
41
+ "overrides": {
42
+ "@reduxjs/toolkit": {
43
+ ".": "^1.9.7",
44
+ "dependencies": {
45
+ "react": "17.0.2"
46
+ }
47
+ },
48
+ "react-redux": {
49
+ ".": "^8.1.3",
50
+ "react": "17.0.2"
51
+ }
36
52
  }
37
- }
53
+ }
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { modalVariants } from './variants';
3
- export declare const useConfirmationModal: () => {
4
- show: (options: {
5
- variant?: Exclude<keyof typeof modalVariants, "error">;
6
- title?: string;
7
- message?: string;
8
- confirmLabel?: string;
9
- cancelLabel?: string;
10
- icon?: React.ReactNode;
11
- onConfirm?: () => void;
12
- onCancel?: () => void;
13
- size?: string | number;
14
- }) => void;
15
- close: (modalId: string) => void;
16
- closeAll: () => void;
17
- };
18
- //# sourceMappingURL=ConfirmationModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfirmationModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Modals/ConfirmationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,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;qBAkGuB,MAAM;;CAa/B,CAAC"}
@@ -1,76 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { modals } from '@mantine/modals';
3
- import { neutral } from '../../../constants/colors';
4
- import { Title } from '../../Typography/Title';
5
- import { Stack } from '../../Layout/Stack';
6
- import { Center } from '../../Layout/Center';
7
- import { modalVariants } from './variants';
8
- import { Button } from '../../Inputs/Buttons/Button';
9
- import { Group } from '../../Layout/Group';
10
- export const useConfirmationModal = () => {
11
- const show = (options) => {
12
- const { variant = 'confirm', title, message, confirmLabel, cancelLabel, icon, onConfirm, onCancel, size = '40rem', } = options;
13
- const handleConfirm = () => {
14
- if (onConfirm)
15
- onConfirm();
16
- modals.closeAll();
17
- };
18
- const handleCancel = () => {
19
- if (onCancel)
20
- onCancel();
21
- modals.closeAll();
22
- };
23
- const selectedVariant = modalVariants[variant];
24
- const iconContainer = {
25
- width: '4.2rem',
26
- height: '4.2rem',
27
- borderRadius: '50%',
28
- backgroundColor: selectedVariant.iconBackgroundColor,
29
- border: `2px solid ${selectedVariant.iconColor}`,
30
- };
31
- const modalIcon = icon || (_jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: '2rem' } }));
32
- const ConfirmModalContent = () => {
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
- };
35
- modals.open({
36
- children: _jsx(ConfirmModalContent, {}),
37
- size,
38
- styles: {
39
- content: {
40
- borderRadius: '8px',
41
- border: `1px solid ${neutral[50]}`,
42
- boxShadow: '0px 0px 19px 0px #00000040',
43
- },
44
- header: {
45
- padding: '0.8rem',
46
- },
47
- close: {
48
- borderRadius: '16px',
49
- backgroundColor: neutral[50],
50
- width: '1.8rem',
51
- height: '1.8rem',
52
- '&:hover': {
53
- backgroundColor: neutral[50],
54
- },
55
- '&:active': {
56
- transform: 'none',
57
- },
58
- },
59
- body: {
60
- padding: '0 3.2rem 1.6rem 3.2rem',
61
- },
62
- },
63
- });
64
- };
65
- const close = (modalId) => {
66
- modals.close(modalId);
67
- };
68
- const closeAll = () => {
69
- modals.closeAll();
70
- };
71
- return {
72
- show,
73
- close,
74
- closeAll,
75
- };
76
- };
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { modalVariants } from './variants';
3
- export declare const useInfoModal: () => {
4
- show: (options: {
5
- variant?: keyof typeof modalVariants;
6
- title?: string;
7
- message?: string;
8
- icon?: React.ReactNode;
9
- onConfirm?: () => void;
10
- size?: string | number;
11
- }) => void;
12
- close: (modalId: string) => void;
13
- closeAll: () => void;
14
- };
15
- //# sourceMappingURL=InfoModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InfoModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Modals/InfoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,eAAO,MAAM,YAAY;oBACA;QACrB,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB;qBA8EuB,MAAM;;CAa/B,CAAC"}