@dito-uai/components 5.1.0-alpha.5 → 5.1.0-alpha.51

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 (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -1
  3. package/dist/global.css +1 -1
  4. package/dist/index.cjs +78 -42
  5. package/dist/index.d.cts +1133 -858
  6. package/dist/index.d.ts +60 -2240
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +21 -14
  9. package/dist/ui/alert.d.ts +22 -32
  10. package/dist/ui/alert.d.ts.map +1 -1
  11. package/dist/ui/avatar.d.ts +4 -124
  12. package/dist/ui/avatar.d.ts.map +1 -1
  13. package/dist/ui/badge.d.ts +4 -148
  14. package/dist/ui/badge.d.ts.map +1 -1
  15. package/dist/ui/button.d.ts +166 -316
  16. package/dist/ui/button.d.ts.map +1 -1
  17. package/dist/ui/card.d.ts +2 -66
  18. package/dist/ui/card.d.ts.map +1 -1
  19. package/dist/ui/checkbox.d.ts +2 -0
  20. package/dist/ui/checkbox.d.ts.map +1 -1
  21. package/dist/ui/chips.d.ts +24 -280
  22. package/dist/ui/chips.d.ts.map +1 -1
  23. package/dist/ui/collapsible.d.ts +5 -0
  24. package/dist/ui/collapsible.d.ts.map +1 -1
  25. package/dist/ui/dropdown-menu.d.ts +131 -0
  26. package/dist/ui/dropdown-menu.d.ts.map +1 -0
  27. package/dist/ui/indicator.d.ts +15 -15
  28. package/dist/ui/indicator.d.ts.map +1 -1
  29. package/dist/ui/input-description.d.ts +2 -26
  30. package/dist/ui/input-description.d.ts.map +1 -1
  31. package/dist/ui/input.d.ts +129 -255
  32. package/dist/ui/input.d.ts.map +1 -1
  33. package/dist/ui/internal/dropdown-content.d.ts.map +1 -1
  34. package/dist/ui/label.d.ts +2 -18
  35. package/dist/ui/label.d.ts.map +1 -1
  36. package/dist/ui/loading.d.ts +9 -0
  37. package/dist/ui/loading.d.ts.map +1 -0
  38. package/dist/ui/message.d.ts +56 -0
  39. package/dist/ui/message.d.ts.map +1 -0
  40. package/dist/ui/popover.d.ts +7 -0
  41. package/dist/ui/popover.d.ts.map +1 -0
  42. package/dist/ui/progress-bar.d.ts +1 -1
  43. package/dist/ui/progress-bar.d.ts.map +1 -1
  44. package/dist/ui/progress.d.ts +9 -27
  45. package/dist/ui/progress.d.ts.map +1 -1
  46. package/dist/ui/radio.d.ts +98 -4
  47. package/dist/ui/radio.d.ts.map +1 -1
  48. package/dist/ui/scope.d.ts +4 -108
  49. package/dist/ui/scope.d.ts.map +1 -1
  50. package/dist/ui/search.d.ts +60 -124
  51. package/dist/ui/search.d.ts.map +1 -1
  52. package/dist/ui/sheets.d.ts +2 -2
  53. package/dist/ui/sheets.d.ts.map +1 -1
  54. package/dist/ui/skeleton.d.ts +42 -0
  55. package/dist/ui/skeleton.d.ts.map +1 -0
  56. package/dist/ui/status.d.ts +7 -38
  57. package/dist/ui/status.d.ts.map +1 -1
  58. package/dist/ui/switch.d.ts +15 -0
  59. package/dist/ui/switch.d.ts.map +1 -0
  60. package/dist/ui/tabs.d.ts +4 -5
  61. package/dist/ui/tabs.d.ts.map +1 -1
  62. package/dist/ui/text.d.ts +3 -63
  63. package/dist/ui/text.d.ts.map +1 -1
  64. package/dist/ui/tip-card.d.ts +77 -0
  65. package/dist/ui/tip-card.d.ts.map +1 -0
  66. package/dist/ui/toggle-group.d.ts +11 -0
  67. package/dist/ui/toggle-group.d.ts.map +1 -0
  68. package/dist/ui/toggle.d.ts +48 -12
  69. package/dist/ui/toggle.d.ts.map +1 -1
  70. package/dist/ui/tooltip.d.ts +10 -0
  71. package/dist/ui/tooltip.d.ts.map +1 -0
  72. package/package.json +99 -40
  73. package/tailwind-preset.ts +275 -0
  74. package/tailwind.config.ts +12 -262
  75. package/dist/ui/form-item.d.ts +0 -16
  76. package/dist/ui/form-item.d.ts.map +0 -1
  77. package/dist/ui/form.d.ts +0 -1
  78. package/dist/ui/form.d.ts.map +0 -1
@@ -1,267 +1,17 @@
1
- import TailwindsForms from '@tailwindcss/forms';
2
- import TailwindsTypography from '@tailwindcss/typography';
3
- import TailwindsAnimate from 'tailwindcss-animate';
1
+ import preset from './tailwind-preset';
4
2
 
5
- export const COLORS = {
6
- neutral: {
7
- white: '#ffffff',
8
- black: '#000000',
9
- neutral_900: '#21242b',
10
- neutral_700: '#343841',
11
- neutral_600: '#484d59',
12
- neutral_500: '#6a7486',
13
- neutral_400: '#8d95a7',
14
- neutral_300: '#bdc2cc',
15
- neutral_200: '#d7dae0',
16
- neutral_100: '#eff0f2',
17
- },
18
- brand: {
19
- navy_900: '#223154',
20
- navy_600: '#364b74',
21
- navy_100: '#e6e8ed',
22
- green_900: '#006a31',
23
- green_600: '#00bd6a',
24
- green_100: '#e5f7ed',
25
- },
26
- secondary: {
27
- indigo_900: '#353877',
28
- indigo_600: '#4b5398',
29
- indigo_100: '#e8eaf2',
30
- purple_900: '#541f8e',
31
- purple_600: '#852ca5',
32
- purple_100: '#f7e7fc',
33
- blue_900: '#4a58d5',
34
- blue_600: '#549eff',
35
- blue_100: '#e4f1ff',
36
- pink_900: '#a50a54',
37
- pink_600: '#f1167f',
38
- pink_100: '#fee6f1',
39
- green_900: '#127a6e',
40
- green_600: '#06c5ae',
41
- green_100: '#e6f9f7',
42
- platform_background: '#f3f4f8',
43
- },
44
- chart: {
45
- midnight_blue_900: '#0a0259',
46
- midnight_blue_600: '#271bae',
47
- midnight_blue_100: '#ebf0ff',
48
- green_900: '#005b42',
49
- green_600: '#0bcc96',
50
- green_100: '#e5fff4',
51
- purple_900: '#4c178e',
52
- purple_600: '#8929ff',
53
- purple_100: '#f6eeff',
54
- pink_900: '#b91d70',
55
- pink_600: '#ff00b8',
56
- pink_100: '#fff1fb',
57
- light_blue_900: '#094170',
58
- light_blue_600: '#00beff',
59
- light_blue_100: '#ebf9ff',
60
- orange_900: '#b84300',
61
- orange_600: '#ff7a00',
62
- orange_100: '#fff0df',
63
- red_900: '#8b0c23',
64
- red_600: '#db0028',
65
- red_100: '#ffecef',
66
- blue_900: '#09006d',
67
- blue_600: '#1456ff',
68
- blue_100: '#e6f2ff',
69
- yellow_900: '#9d670b',
70
- yellow_600: '#f1c40f',
71
- yellow_100: '#fff9e7',
72
- },
73
- notification: {
74
- critical_900: '#9e0505',
75
- critical_600: '#d31d26',
76
- critical_300: '#ffadb0',
77
- critical_100: '#ffebeb',
78
- warning_900: '#8a4900',
79
- warning_600: '#ffca42',
80
- warning_300: '#ffe8a9',
81
- warning_100: '#fff6ce',
82
- success_900: '#074a1b',
83
- success_600: '#228000',
84
- success_300: '#80e09c',
85
- success_100: '#defce7',
86
- information_900: '#1e4664',
87
- information_600: '#0d74a0',
88
- information_300: '#b0e7ff',
89
- information_100: '#e0f8ff',
90
- },
91
- };
3
+ export { COLORS } from './tailwind-preset';
4
+
5
+ const includeStorybook = process.env.INCLUDE_STORYBOOK === 'true';
6
+
7
+ const contentPaths = ['./src/ui/**/*.{ts,tsx}'];
8
+
9
+ if (includeStorybook) {
10
+ contentPaths.push('./src/storybook/stories/*.stories.@(js|jsx|mjs|ts|tsx)');
11
+ }
92
12
 
93
13
  /** @type {import('tailwindcss').Config} */
94
14
  export default {
95
- mode: 'jit',
96
- content: ['./src/**/*.{ts,tsx}'],
97
- theme: {
98
- screens: {
99
- sm: '480px',
100
- md: '768px',
101
- lg: '976px',
102
- xl: '1440px',
103
- },
104
- fontFamily: {
105
- sans: ['Poppins', 'sans-serif'],
106
- },
107
- extend: {
108
- backgroundImage: {
109
- 'gradient-radial': 'radial-gradient(var(--gradient-color-stops))',
110
- },
111
- colors: () => ({
112
- primary: COLORS.brand.green_600,
113
- 'primary-foreground': '#ffffff',
114
- accent: COLORS.brand.navy_600,
115
- 'accent-foreground': '#ffffff',
116
- 'neutral-100': COLORS.neutral.neutral_100,
117
- 'neutral-200': COLORS.neutral.neutral_200,
118
- 'neutral-300': COLORS.neutral.neutral_300,
119
- 'neutral-400': COLORS.neutral.neutral_400,
120
- 'neutral-500': COLORS.neutral.neutral_500,
121
- 'neutral-600': COLORS.neutral.neutral_600,
122
- 'neutral-700': COLORS.neutral.neutral_700,
123
- 'neutral-900': COLORS.neutral.neutral_900,
124
- 'midnight-blue-900': COLORS.chart.midnight_blue_900,
125
- 'midnight-blue-600': COLORS.chart.midnight_blue_600,
126
- 'midnight-blue-100': COLORS.chart.midnight_blue_100,
127
- 'red-100': COLORS.chart.red_100,
128
- 'red-600': COLORS.chart.red_600,
129
- 'red-900': COLORS.chart.red_900,
130
- 'orange-100': COLORS.chart.orange_100,
131
- 'orange-600': COLORS.chart.orange_600,
132
- 'orange-900': COLORS.chart.orange_900,
133
- 'yellow-100': COLORS.chart.yellow_100,
134
- 'yellow-600': COLORS.chart.yellow_600,
135
- 'yellow-900': COLORS.chart.yellow_900,
136
- 'green-100': COLORS.brand.green_100,
137
- 'green-600': COLORS.brand.green_600,
138
- 'green-900': COLORS.brand.green_900,
139
- 'blue-100': COLORS.secondary.blue_100,
140
- 'blue-600': COLORS.secondary.blue_600,
141
- 'blue-900': COLORS.secondary.blue_900,
142
- 'light-blue-100': COLORS.chart.light_blue_100,
143
- 'light-blue-600': COLORS.chart.light_blue_600,
144
- 'light-blue-900': COLORS.chart.light_blue_900,
145
- 'indigo-100': COLORS.brand.navy_100,
146
- 'indigo-600': COLORS.brand.navy_600,
147
- 'indigo-900': COLORS.brand.navy_900,
148
- 'navy-100': COLORS.brand.navy_100,
149
- 'navy-600': COLORS.brand.navy_600,
150
- 'navy-900': COLORS.brand.navy_900,
151
- 'purple-100': COLORS.chart.purple_100,
152
- 'purple-600': COLORS.chart.purple_600,
153
- 'purple-900': COLORS.chart.purple_900,
154
- 'pink-100': COLORS.chart.pink_100,
155
- 'pink-600': COLORS.chart.pink_600,
156
- 'pink-900': COLORS.chart.pink_900,
157
- notification: {
158
- 'critical-100': COLORS.notification.critical_100,
159
- 'critical-300': COLORS.notification.critical_300,
160
- 'critical-600': COLORS.notification.critical_600,
161
- 'critical-900': COLORS.notification.critical_900,
162
- 'warning-100': COLORS.notification.warning_100,
163
- 'warning-300': COLORS.notification.warning_300,
164
- 'warning-600': COLORS.notification.warning_600,
165
- 'warning-900': COLORS.notification.warning_900,
166
- 'success-100': COLORS.notification.success_100,
167
- 'success-300': COLORS.notification.success_300,
168
- 'success-600': COLORS.notification.success_600,
169
- 'success-900': COLORS.notification.success_900,
170
- 'information-100': COLORS.notification.information_100,
171
- 'information-300': COLORS.notification.information_300,
172
- 'information-600': COLORS.notification.information_600,
173
- 'information-900': COLORS.notification.information_900,
174
- },
175
- secondary: {
176
- 'indigo-100': COLORS.secondary.indigo_100,
177
- 'indigo-600': COLORS.secondary.indigo_600,
178
- 'indigo-900': COLORS.secondary.indigo_900,
179
- },
180
- }),
181
- height: {
182
- 1: '8px',
183
- 2: '16px',
184
- 3: '24px',
185
- 4: '32px',
186
- 5: '40px',
187
- 6: '48px',
188
- 7: '56px',
189
- },
190
- gap: {
191
- 1: '8px',
192
- 2: '16px',
193
- 3: '32px',
194
- 4: '48px',
195
- },
196
- spacing: {
197
- 0.25: '2px',
198
- 0.5: '4px',
199
- 0.75: '6px',
200
- 1: '8px',
201
- 2: '16px',
202
- 3: '24px',
203
- 4: '32px',
204
- 5: '40px',
205
- 6: '48px',
206
- 7: '56px',
207
- 8: '64px',
208
- 9: '72px',
209
- 10: '128px',
210
- },
211
- maxWidth: {
212
- '1/4': '25%',
213
- '1/2': '50%',
214
- '3/4': '75%',
215
- },
216
- borderRadius: {
217
- sm: '4px',
218
- m: '8px',
219
- x: '16px',
220
- xl: '32px',
221
- },
222
- boxShadow: {
223
- down: '0px 4px 8px 0px #00000014',
224
- },
225
- fontSize: {
226
- xs: ['10px', { lineHeight: '16px' }],
227
- sm: ['12px', { lineHeight: '18px' }],
228
- base: ['14px', { lineHeight: '20px' }],
229
- lg: ['16px', { lineHeight: '24px' }],
230
- xl: ['22px', { lineHeight: '32px' }],
231
- '2xl': ['28px', { lineHeight: '40px' }],
232
- '3xl': ['30px', { lineHeight: '44px' }],
233
- },
234
- keyframes: {
235
- 'accordion-down': {
236
- from: { height: '0' },
237
- to: { height: 'var(--radix-accordion-content-height)' },
238
- },
239
- 'accordion-up': {
240
- from: { height: 'var(--radix-accordion-content-height)' },
241
- to: { height: '0' },
242
- },
243
- },
244
- animation: {
245
- 'accordion-down': 'accordion-down 0.2s ease-out',
246
- 'accordion-up': 'accordion-up 0.2s ease-out',
247
- },
248
- },
249
- },
250
- plugins: [
251
- TailwindsAnimate,
252
- TailwindsTypography,
253
- TailwindsForms({ strategy: 'class' }),
254
- ],
255
- safelist: [
256
- {
257
- pattern: /bg-/,
258
- },
259
- {
260
- pattern: /text-/,
261
- },
262
- {
263
- pattern:
264
- /m-|mx-|my-|mr-|mt-|mb-|ml–|p-|px–|py-|pr-|pt-|pb-|pl-|rounded|gap|w|h/,
265
- },
266
- ],
15
+ presets: [preset],
16
+ content: contentPaths,
267
17
  };
@@ -1,16 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { LabelProps } from './label';
3
- import { InputDescriptionProps } from './input-description';
4
- export type FormItem = HTMLAttributes<HTMLDivElement> & {
5
- label: LabelProps;
6
- description: InputDescriptionProps;
7
- invalid?: boolean;
8
- errorMessage?: string;
9
- disabled?: boolean;
10
- value?: string;
11
- maxLength?: number;
12
- id: string;
13
- };
14
- declare const FormItem: ({ id, className, label, description, errorMessage, invalid, children, disabled, value, maxLength, ...props }: FormItem) => import("react/jsx-runtime").JSX.Element;
15
- export default FormItem;
16
- //# sourceMappingURL=form-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-item.d.ts","sourceRoot":"","sources":["../../src/ui/form-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAyB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACtD,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,QAAA,MAAM,QAAQ,iHAYX,QAAQ,4CAqBV,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/dist/ui/form.d.ts DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":""}