@dito-uai/components 5.0.0-alpha9 → 5.1.0-alpha.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dito-uai/components",
3
- "version": "5.0.0-alpha9",
3
+ "version": "5.1.0-alpha.5",
4
4
  "descriptin": "Dito's design system component library, made in TSX",
5
5
  "repository": "git+https://github.com/ditointernet/dito-uai.git",
6
6
  "publishConfig": {
@@ -12,7 +12,9 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "sideEffects": false,
14
14
  "files": [
15
- "dist/"
15
+ "dist/",
16
+ "./tailwind.config.ts",
17
+ "./lib/colors-utils.ts"
16
18
  ],
17
19
  "exports": {
18
20
  ".": {
@@ -25,19 +27,34 @@
25
27
  "default": "./dist/index.mjs"
26
28
  }
27
29
  },
28
- "./global.css": "./dist/global.css"
30
+ "./global.css": "./dist/global.css",
31
+ "./tailwind.config": {
32
+ "import": {
33
+ "types": "./tailwind.config.ts",
34
+ "default": "./tailwind.config.ts"
35
+ },
36
+ "require": {
37
+ "types": "./tailwind.config.ts",
38
+ "default": "./tailwind.config.ts"
39
+ }
40
+ }
29
41
  },
30
42
  "scripts": {
31
- "dev": "yarn build",
43
+ "dev": "yarn build --watch",
32
44
  "semantic-release": "semantic-release",
33
- "bundle": "yarn build:js && yarn build:types & yarn build:css",
34
- "build": "yarn build:css & yarn build:js --watch",
45
+ "build": "yarn bundle",
46
+ "bundle": "yarn build:js & yarn build:types & yarn build:css",
35
47
  "build:js": "tsup",
36
48
  "build:types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
37
- "build:css": "tailwindcss -i ./src/global.css -o ./dist/global.css --minify"
49
+ "build:css": "tailwindcss -i ./src/global.css -o ./dist/global.css --minify -v"
38
50
  },
39
51
  "packageManager": "yarn@4.1.1",
40
52
  "devDependencies": {
53
+ "@semantic-release/commit-analyzer": "^13.0.0",
54
+ "@semantic-release/exec": "6.0.3",
55
+ "@semantic-release/git": "9.0.0",
56
+ "@semantic-release/github": "^10.1.3",
57
+ "@semantic-release/release-notes-generator": "^14.0.1",
41
58
  "@types/react": "^18.3.3",
42
59
  "autoprefixer": "^10.4.19",
43
60
  "esbuild": "^0.23.0",
@@ -45,28 +62,30 @@
45
62
  "esbuild-plugin-tsc": "^0.4.0",
46
63
  "esbuild-ts-paths": "^1.1.3",
47
64
  "postcss": "^8.4.38",
65
+ "semantic-release": "17",
48
66
  "supports-color": "^9.4.0",
49
67
  "tailwind-variants": "^0.2.1",
50
- "tailwindcss": "^3.4.7",
51
- "tailwindcss-scoped-preflight": "^3.4.5",
68
+ "tailwindcss": "^3.4.13",
52
69
  "tsup": "^8.2.3",
53
70
  "typescript": "^5.5.4",
54
71
  "vite": "^5.3.5"
55
72
  },
56
73
  "dependencies": {
57
- "@dito-uai/icons": "^1.0.5",
74
+ "@dito-uai/icons": "^1.8.0",
58
75
  "@hookform/resolvers": "^3.9.0",
59
76
  "@radix-ui/react-accordion": "^1.2.0",
60
77
  "@radix-ui/react-avatar": "^1.0.4",
61
78
  "@radix-ui/react-checkbox": "^1.0.4",
79
+ "@radix-ui/react-collapsible": "^1.1.1",
62
80
  "@radix-ui/react-dialog": "^1.0.5",
63
81
  "@radix-ui/react-dropdown-menu": "^2.1.1",
64
82
  "@radix-ui/react-progress": "^1.1.0",
65
83
  "@radix-ui/react-radio-group": "^1.2.0",
66
84
  "@radix-ui/react-slot": "^1.1.0",
85
+ "@radix-ui/react-tabs": "^1.1.12",
67
86
  "@radix-ui/react-toggle-group": "^1.1.0",
68
- "@tailwindcss/forms": "^0.5.7",
69
- "@tailwindcss/typography": "^0.5.13",
87
+ "@tailwindcss/forms": "^0.5.9",
88
+ "@tailwindcss/typography": "^0.5.15",
70
89
  "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.15",
71
90
  "class-variance-authority": "^0.7.0",
72
91
  "clsx": "^2.1.1",
@@ -88,5 +107,6 @@
88
107
  "react-dom": "^18.3.1",
89
108
  "react-hook-form": "^7.52.1",
90
109
  "zod": "^3.23.8"
91
- }
92
- }
110
+ },
111
+ "stableVersion": "5.0.0-alpha31"
112
+ }
@@ -0,0 +1,267 @@
1
+ import TailwindsForms from '@tailwindcss/forms';
2
+ import TailwindsTypography from '@tailwindcss/typography';
3
+ import TailwindsAnimate from 'tailwindcss-animate';
4
+
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
+ };
92
+
93
+ /** @type {import('tailwindcss').Config} */
94
+ 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
+ ],
267
+ };