tonkean-tcltext 1.0.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 (67) hide show
  1. package/README.md +114 -0
  2. package/dist/components/ButtonToken.d.ts +17 -0
  3. package/dist/components/ButtonToken.d.ts.map +1 -0
  4. package/dist/components/ButtonToken.js +234 -0
  5. package/dist/components/ButtonToken.js.map +1 -0
  6. package/dist/components/ColorSelectToken.d.ts +17 -0
  7. package/dist/components/ColorSelectToken.d.ts.map +1 -0
  8. package/dist/components/ColorSelectToken.js +499 -0
  9. package/dist/components/ColorSelectToken.js.map +1 -0
  10. package/dist/components/ColorSwatch.d.ts +9 -0
  11. package/dist/components/ColorSwatch.d.ts.map +1 -0
  12. package/dist/components/ColorSwatch.js +12 -0
  13. package/dist/components/ColorSwatch.js.map +1 -0
  14. package/dist/components/IconItem.d.ts +17 -0
  15. package/dist/components/IconItem.d.ts.map +1 -0
  16. package/dist/components/IconItem.js +64 -0
  17. package/dist/components/IconItem.js.map +1 -0
  18. package/dist/components/InputToken.d.ts +15 -0
  19. package/dist/components/InputToken.d.ts.map +1 -0
  20. package/dist/components/InputToken.js +203 -0
  21. package/dist/components/InputToken.js.map +1 -0
  22. package/dist/components/MultiSelectToken.d.ts +18 -0
  23. package/dist/components/MultiSelectToken.d.ts.map +1 -0
  24. package/dist/components/MultiSelectToken.js +568 -0
  25. package/dist/components/MultiSelectToken.js.map +1 -0
  26. package/dist/components/NumericInputToken.d.ts +16 -0
  27. package/dist/components/NumericInputToken.d.ts.map +1 -0
  28. package/dist/components/NumericInputToken.js +322 -0
  29. package/dist/components/NumericInputToken.js.map +1 -0
  30. package/dist/components/SelectToken.d.ts +18 -0
  31. package/dist/components/SelectToken.d.ts.map +1 -0
  32. package/dist/components/SelectToken.js +357 -0
  33. package/dist/components/SelectToken.js.map +1 -0
  34. package/dist/components/TCLText.d.ts +28 -0
  35. package/dist/components/TCLText.d.ts.map +1 -0
  36. package/dist/components/TCLText.js +89 -0
  37. package/dist/components/TCLText.js.map +1 -0
  38. package/dist/components/hooks/useTooltipOnTruncation.d.ts +20 -0
  39. package/dist/components/hooks/useTooltipOnTruncation.d.ts.map +1 -0
  40. package/dist/components/hooks/useTooltipOnTruncation.js +62 -0
  41. package/dist/components/hooks/useTooltipOnTruncation.js.map +1 -0
  42. package/dist/components/iconLibrary.d.ts +3 -0
  43. package/dist/components/iconLibrary.d.ts.map +1 -0
  44. package/dist/components/iconLibrary.js +58 -0
  45. package/dist/components/iconLibrary.js.map +1 -0
  46. package/dist/components/iconLoader.d.ts +5 -0
  47. package/dist/components/iconLoader.d.ts.map +1 -0
  48. package/dist/components/iconLoader.js +113 -0
  49. package/dist/components/iconLoader.js.map +1 -0
  50. package/dist/index.d.ts +5 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +7 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/tokens/buttons.json +198 -0
  55. package/dist/tokens/colors.json +93 -0
  56. package/dist/tokens/index.d.ts +7 -0
  57. package/dist/tokens/index.d.ts.map +1 -0
  58. package/dist/tokens/index.js +6 -0
  59. package/dist/tokens/index.js.map +1 -0
  60. package/dist/tokens/inputs.json +304 -0
  61. package/dist/tokens/types.d.ts +9 -0
  62. package/dist/tokens/types.d.ts.map +1 -0
  63. package/dist/tokens/types.js +2 -0
  64. package/dist/tokens/types.js.map +1 -0
  65. package/dist/tokens/typography.json +37 -0
  66. package/package.json +59 -0
  67. package/src/styles/tokens.css +274 -0
@@ -0,0 +1,304 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "inputs": {
4
+ "sizes": {
5
+ "small": {
6
+ "padding": {
7
+ "vertical": "6px",
8
+ "horizontal": "12px"
9
+ },
10
+ "fontSize": "12px",
11
+ "minHeight": "28px"
12
+ },
13
+ "regular": {
14
+ "padding": {
15
+ "vertical": "8px",
16
+ "horizontal": "16px"
17
+ },
18
+ "fontSize": "14px",
19
+ "minHeight": "36px"
20
+ },
21
+ "large": {
22
+ "padding": {
23
+ "vertical": "10px",
24
+ "horizontal": "20px"
25
+ },
26
+ "fontSize": "16px",
27
+ "minHeight": "44px"
28
+ }
29
+ },
30
+ "borderRadius": "4px",
31
+ "borderWidth": "1px",
32
+ "types": {
33
+ "basic": {
34
+ "default": {
35
+ "background": "basic.white",
36
+ "text": "gray.900",
37
+ "placeholder": "gray.400",
38
+ "border": "1px solid gray.300"
39
+ },
40
+ "active": {
41
+ "background": "basic.white",
42
+ "text": "gray.900",
43
+ "placeholder": "gray.400",
44
+ "border": "1px solid gray.600"
45
+ },
46
+ "disabledPlaceholder": {
47
+ "background": "gray.100",
48
+ "text": "gray.800",
49
+ "placeholder": "gray.800",
50
+ "border": "1px solid gray.300"
51
+ },
52
+ "error": {
53
+ "background": "basic.white",
54
+ "text": "gray.900",
55
+ "placeholder": "gray.400",
56
+ "border": "1px solid red.500",
57
+ "label": "red.500",
58
+ "errorMessage": "red.500"
59
+ }
60
+ },
61
+ "datePicker": {
62
+ "default": {
63
+ "background": "basic.white",
64
+ "text": "gray.900",
65
+ "placeholder": "gray.400",
66
+ "border": "1px solid gray.300",
67
+ "icon": "gray.500"
68
+ },
69
+ "withValue": {
70
+ "background": "basic.white",
71
+ "text": "gray.900",
72
+ "placeholder": "gray.400",
73
+ "border": "1px solid gray.300",
74
+ "icon": "gray.500"
75
+ },
76
+ "open": {
77
+ "background": "basic.white",
78
+ "text": "gray.900",
79
+ "placeholder": "gray.400",
80
+ "border": "1px solid gray.600",
81
+ "icon": "gray.500"
82
+ }
83
+ },
84
+ "singleSelector": {
85
+ "default": {
86
+ "background": "basic.white",
87
+ "text": "gray.900",
88
+ "placeholder": "gray.400",
89
+ "border": "1px solid gray.300",
90
+ "icon": "gray.500"
91
+ },
92
+ "selected": {
93
+ "background": "basic.white",
94
+ "text": "gray.900",
95
+ "placeholder": "gray.400",
96
+ "border": "1px solid gray.300",
97
+ "icon": "gray.500"
98
+ },
99
+ "search": {
100
+ "background": "basic.white",
101
+ "text": "gray.900",
102
+ "placeholder": "gray.400",
103
+ "border": "1px solid gray.300",
104
+ "icon": "gray.500"
105
+ },
106
+ "open": {
107
+ "background": "basic.white",
108
+ "text": "gray.900",
109
+ "placeholder": "gray.400",
110
+ "border": "1px solid gray.600",
111
+ "icon": "gray.500"
112
+ },
113
+ "disabled": {
114
+ "background": "gray.100",
115
+ "text": "gray.400",
116
+ "placeholder": "gray.400",
117
+ "border": "1px solid gray.300",
118
+ "icon": "gray.400"
119
+ },
120
+ "error": {
121
+ "background": "basic.white",
122
+ "text": "gray.900",
123
+ "placeholder": "gray.400",
124
+ "border": "1px solid red.500",
125
+ "icon": "gray.500",
126
+ "label": "red.500",
127
+ "errorMessage": "red.500"
128
+ }
129
+ },
130
+ "multipleSelector": {
131
+ "default": {
132
+ "background": "basic.white",
133
+ "text": "gray.900",
134
+ "placeholder": "gray.400",
135
+ "border": "1px solid gray.300",
136
+ "icon": "gray.500",
137
+ "tagBackground": "purple.100",
138
+ "tagText": "purple.700"
139
+ },
140
+ "selected": {
141
+ "background": "basic.white",
142
+ "text": "gray.900",
143
+ "placeholder": "gray.400",
144
+ "border": "1px solid gray.300",
145
+ "icon": "gray.500",
146
+ "tagBackground": "purple.100",
147
+ "tagText": "purple.700"
148
+ },
149
+ "search": {
150
+ "background": "basic.white",
151
+ "text": "gray.900",
152
+ "placeholder": "gray.400",
153
+ "border": "1px solid gray.300",
154
+ "icon": "gray.500",
155
+ "tagBackground": "purple.100",
156
+ "tagText": "purple.700"
157
+ },
158
+ "open": {
159
+ "background": "basic.white",
160
+ "text": "gray.900",
161
+ "placeholder": "gray.400",
162
+ "border": "1px solid gray.600",
163
+ "icon": "gray.500",
164
+ "tagBackground": "purple.100",
165
+ "tagText": "purple.700"
166
+ },
167
+ "disabled": {
168
+ "background": "gray.100",
169
+ "text": "gray.400",
170
+ "placeholder": "gray.400",
171
+ "border": "1px solid gray.300",
172
+ "icon": "gray.400",
173
+ "tagBackground": "gray.200",
174
+ "tagText": "gray.400"
175
+ },
176
+ "error": {
177
+ "background": "basic.white",
178
+ "text": "gray.900",
179
+ "placeholder": "gray.400",
180
+ "border": "1px solid red.500",
181
+ "icon": "gray.500",
182
+ "tagBackground": "purple.100",
183
+ "tagText": "purple.700",
184
+ "label": "red.500",
185
+ "errorMessage": "red.500"
186
+ }
187
+ },
188
+ "expressionSelector": {
189
+ "default": {
190
+ "background": "basic.white",
191
+ "text": "gray.900",
192
+ "placeholder": "gray.400",
193
+ "border": "1px solid gray.300",
194
+ "icon": "purple.600",
195
+ "tagBackground": "purple.100",
196
+ "tagText": "purple.700",
197
+ "tagOperatorBackground": "purple.600",
198
+ "tagOperatorText": "basic.white"
199
+ },
200
+ "withSelected": {
201
+ "background": "basic.white",
202
+ "text": "gray.900",
203
+ "placeholder": "gray.400",
204
+ "border": "1px solid gray.300",
205
+ "icon": "purple.600",
206
+ "tagBackground": "purple.100",
207
+ "tagText": "purple.700",
208
+ "tagOperatorBackground": "purple.600",
209
+ "tagOperatorText": "basic.white"
210
+ },
211
+ "open": {
212
+ "background": "basic.white",
213
+ "text": "gray.900",
214
+ "placeholder": "gray.400",
215
+ "border": "1px solid gray.600",
216
+ "icon": "purple.600",
217
+ "tagBackground": "purple.100",
218
+ "tagText": "purple.700",
219
+ "tagOperatorBackground": "purple.600",
220
+ "tagOperatorText": "basic.white"
221
+ }
222
+ },
223
+ "numberInput": {
224
+ "default": {
225
+ "background": "basic.white",
226
+ "text": "gray.900",
227
+ "placeholder": "gray.400",
228
+ "border": "1px solid gray.300",
229
+ "icon": "gray.500"
230
+ },
231
+ "active": {
232
+ "background": "basic.white",
233
+ "text": "gray.900",
234
+ "placeholder": "gray.400",
235
+ "border": "1px solid gray.600",
236
+ "icon": "gray.500"
237
+ },
238
+ "disabledPlaceholder": {
239
+ "background": "gray.100",
240
+ "text": "gray.800",
241
+ "placeholder": "gray.800",
242
+ "border": "1px solid gray.300",
243
+ "icon": "gray.400"
244
+ },
245
+ "error": {
246
+ "background": "basic.white",
247
+ "text": "gray.900",
248
+ "placeholder": "gray.400",
249
+ "border": "1px solid red.500",
250
+ "label": "red.500",
251
+ "errorMessage": "red.500",
252
+ "icon": "gray.500"
253
+ }
254
+ },
255
+ "statusInput": {
256
+ "default": {
257
+ "background": "basic.white",
258
+ "text": "gray.900",
259
+ "placeholder": "gray.400",
260
+ "border": "1px solid gray.300",
261
+ "icon": "gray.500"
262
+ },
263
+ "selected": {
264
+ "background": "basic.white",
265
+ "text": "gray.900",
266
+ "placeholder": "gray.400",
267
+ "border": "1px solid gray.300",
268
+ "icon": "gray.500"
269
+ },
270
+ "selectedStatus": {
271
+ "background": "green.500",
272
+ "text": "basic.white",
273
+ "placeholder": "gray.400",
274
+ "border": "1px solid green.500",
275
+ "icon": "basic.white",
276
+ "statusDot": "green.500"
277
+ },
278
+ "disabled": {
279
+ "background": "gray.100",
280
+ "text": "gray.400",
281
+ "placeholder": "gray.400",
282
+ "border": "1px solid gray.300",
283
+ "icon": "gray.400"
284
+ },
285
+ "error": {
286
+ "background": "basic.white",
287
+ "text": "gray.900",
288
+ "placeholder": "gray.400",
289
+ "border": "1px solid red.500",
290
+ "icon": "gray.500",
291
+ "label": "red.500",
292
+ "errorMessage": "red.500"
293
+ },
294
+ "open": {
295
+ "background": "basic.white",
296
+ "text": "gray.900",
297
+ "placeholder": "gray.400",
298
+ "border": "1px solid gray.600",
299
+ "icon": "gray.500"
300
+ }
301
+ }
302
+ }
303
+ }
304
+ }
@@ -0,0 +1,9 @@
1
+ import colors from './colors.json';
2
+ import typography from './typography.json';
3
+ import buttons from './buttons.json';
4
+ import inputs from './inputs.json';
5
+ export type Colors = typeof colors.colors;
6
+ export type Typography = typeof typography.typography;
7
+ export type Buttons = typeof buttons.buttons;
8
+ export type Inputs = typeof inputs.inputs;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,UAAU,CAAC;AACtD,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,OAAO,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tokens/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "typography": {
4
+ "fontFamilies": {
5
+ "lato": ["Lato", "system-ui", "sans-serif"],
6
+ "roboto": ["Roboto", "system-ui", "sans-serif"]
7
+ },
8
+ "fontSizes": {
9
+ "xs": "10px",
10
+ "sm": "12px",
11
+ "base": "14px",
12
+ "lg": "16px",
13
+ "xl": "20px",
14
+ "2xl": "24px"
15
+ },
16
+ "fontWeights": {
17
+ "regular": "400",
18
+ "medium": "500",
19
+ "bold": "700"
20
+ },
21
+ "lineHeights": {
22
+ "tight": "1.25",
23
+ "snug": "1.375",
24
+ "normal": "1.5",
25
+ "relaxed": "1.625",
26
+ "loose": "2"
27
+ },
28
+ "letterSpacing": {
29
+ "tighter": "-0.05em",
30
+ "tight": "-0.025em",
31
+ "normal": "0em",
32
+ "wide": "0.025em",
33
+ "wider": "0.05em",
34
+ "widest": "0.1em"
35
+ }
36
+ }
37
+ }
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "tonkean-tcltext",
3
+ "version": "1.0.0",
4
+ "description": "Design system components and tokens for Tonkean app, including TCLText component",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "src/styles/tokens.css"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./tokens.css": "./src/styles/tokens.css"
19
+ },
20
+ "scripts": {
21
+ "dev": "storybook dev -p 6006",
22
+ "build": "tsc -p tsconfig.build.json",
23
+ "build-storybook": "storybook build",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "keywords": [
27
+ "react",
28
+ "components",
29
+ "design-system",
30
+ "tokens",
31
+ "typography",
32
+ "ui"
33
+ ],
34
+ "author": "",
35
+ "license": "MIT",
36
+ "peerDependencies": {
37
+ "react": "^18.2.0",
38
+ "react-dom": "^18.2.0"
39
+ },
40
+ "dependencies": {
41
+ "@radix-ui/react-tooltip": "^1.2.8",
42
+ "clsx": "^2.1.1"
43
+ },
44
+ "devDependencies": {
45
+ "@storybook/addon-essentials": "^8.1.0",
46
+ "@storybook/addon-interactions": "^8.1.0",
47
+ "@storybook/addon-links": "^8.1.0",
48
+ "@storybook/blocks": "^8.1.0",
49
+ "@storybook/react": "^8.1.0",
50
+ "@storybook/react-vite": "^8.6.14",
51
+ "@storybook/test": "^8.1.0",
52
+ "@types/react": "^18.2.0",
53
+ "@types/react-dom": "^18.2.0",
54
+ "react": "^18.2.0",
55
+ "react-dom": "^18.2.0",
56
+ "storybook": "^8.1.0",
57
+ "typescript": "^5.3.0"
58
+ }
59
+ }