@akinon/ui-theme 0.6.0 → 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.
@@ -0,0 +1,565 @@
1
+ import { ComponentToken as AntdAlertToken } from 'antd/lib/alert/style';
2
+ import { ComponentToken as AntdBadgeToken } from 'antd/lib/badge/style';
3
+ import { ComponentToken as AntdBreadcrumbToken } from 'antd/lib/breadcrumb/style';
4
+ import { ComponentToken as AntdButtonToken } from 'antd/lib/button/style';
5
+ import { ComponentToken as AntdCheckboxToken } from 'antd/lib/checkbox/style';
6
+ import { ComponentToken as AntdDatePickerToken } from 'antd/lib/date-picker/style';
7
+ import { ComponentToken as AntdFlexToken } from 'antd/lib/flex/style';
8
+ import { ComponentToken as AntdGridToken } from 'antd/lib/grid/style';
9
+ import { ComponentToken as AntdInputToken } from 'antd/lib/input/style';
10
+ import { ComponentToken as AntdLayoutToken } from 'antd/lib/layout/style';
11
+ import { ComponentToken as AntdMenuToken } from 'antd/lib/modal/style';
12
+ import { ComponentToken as AntdModalToken } from 'antd/lib/modal/style';
13
+ import { ComponentToken as AntdPaginationToken } from 'antd/lib/progress/style';
14
+ import { ComponentToken as AntdProgressToken } from 'antd/lib/progress/style';
15
+ import { ComponentToken as AntdRadioToken } from 'antd/lib/radio/style';
16
+ import { ComponentToken as AntdSelectToken } from 'antd/lib/select/style';
17
+ import { ComponentToken as AntdSpinToken } from 'antd/lib/spin/style';
18
+ import { ComponentToken as AntdStepsToken } from 'antd/lib/steps/style';
19
+ import { ComponentToken as AntdTableToken } from 'antd/lib/table/style';
20
+ import { ComponentToken as AntdTagToken } from 'antd/lib/tag/style';
21
+ import { GlobalToken as AntdGlobalToken } from 'antd/lib/theme/interface';
22
+ import { AliasToken } from 'antd/lib/theme/internal';
23
+ import { ComponentToken as AntdTooltipToken } from 'antd/lib/tooltip/style';
24
+
25
+ type PositionTypes = 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
26
+
27
+ export type ButtonToken = AntdButtonToken<
28
+ Omit<AntdButtonToken, 'contentLineHeight'>
29
+ > &
30
+ AliasToken & {
31
+ colorText: string;
32
+ colorTextHover: string;
33
+ defaultBgSm: string;
34
+ defaultBgSmHover: string;
35
+ colorErrorBgSM: string;
36
+ colorErrorBgSMHover: string;
37
+ colorErrorSMHover: string;
38
+ contentLineHeight: number | string;
39
+ };
40
+
41
+ export type CheckboxToken = AntdCheckboxToken &
42
+ AliasToken & {
43
+ colorChecked: string;
44
+ };
45
+
46
+ export type RadioToken = AntdRadioToken &
47
+ AliasToken & {
48
+ colorChecked: string;
49
+ buttonSolidCheckedBorder: string;
50
+ };
51
+
52
+ export type BadgeToken = AntdBadgeToken &
53
+ AliasToken & {
54
+ colorText: string;
55
+ };
56
+
57
+ export type InputToken = AntdInputToken &
58
+ AliasToken & {
59
+ fontWeight: number;
60
+ };
61
+
62
+ export type BreadcrumbToken = AntdBreadcrumbToken &
63
+ AliasToken & {
64
+ paddingBottom: number;
65
+ borderBottom: string;
66
+ paddingLeft: number;
67
+ paddingRight: number;
68
+ marginLeft: number;
69
+ marginRight: number;
70
+ fontWeight: number;
71
+ letterSpacing: number;
72
+ borderBottom: string;
73
+ marginInline: number;
74
+ height: number | string;
75
+ };
76
+
77
+ export type TagToken = AntdTagToken &
78
+ AliasToken & {
79
+ defaultColorSuccess: string;
80
+ defaultBorderColorSuccess: string;
81
+ defaultBgSuccess: string;
82
+ defaultColorWaiting1: string;
83
+ defaultBorderColorWaiting1: string;
84
+ defaultBgWaiting1: string;
85
+ defaultColorWaiting2: string;
86
+ defaultBorderColorWaiting2: string;
87
+ defaultBgWaiting2: string;
88
+ defaultColorWaiting3: string;
89
+ defaultBorderColorWaiting3: string;
90
+ defaultBgWaiting3: string;
91
+ defaultColorFailed: string;
92
+ defaultBorderColorFailed: string;
93
+ defaultBgFailed: string;
94
+ defaultColorEmpty: string;
95
+ defaultBorderColorEmpty: string;
96
+ defaultBgEmpty: string;
97
+ fontSize: number;
98
+ paddingLeft: number;
99
+ paddingRight: number;
100
+ paddingTop: number;
101
+ paddingBottom: number;
102
+ fontSizeClose: number;
103
+ fontWeight: number;
104
+ };
105
+
106
+ export type TooltipToken = AntdTooltipToken &
107
+ AliasToken & {
108
+ bgColor: string;
109
+ };
110
+
111
+ export type FlexToken = AntdFlexToken & AliasToken;
112
+
113
+ export type GridToken = AntdGridToken &
114
+ AliasToken & {
115
+ rowMaxWidth: number;
116
+ gutter: number;
117
+ };
118
+
119
+ export type LayoutToken = AntdLayoutToken &
120
+ AliasToken & {
121
+ mainBorder: string;
122
+ };
123
+
124
+ export type SpinToken = AntdSpinToken & AliasToken;
125
+
126
+ export type ModalToken = AntdModalToken &
127
+ AliasToken & {
128
+ padding: number | string;
129
+ fontWeight: number;
130
+ borderBottom: string;
131
+ footerPadding: string;
132
+ closeIconColor: string;
133
+ contentPadding: string;
134
+ footerMarginTop: string;
135
+ closeTop: string;
136
+ closeRight: string;
137
+ headerMarginBottom: number;
138
+ badgeColorContent: string;
139
+ badgeColorTop: number;
140
+ badgeColorLeft: number;
141
+ badgeColorWidth: number;
142
+ badgeColorHeight: number;
143
+ badgeColorPosition: PositionTypes;
144
+ badgeColorBackgroundColor: string;
145
+ };
146
+
147
+ export type AlertToken = AntdAlertToken &
148
+ AliasToken & {
149
+ defaultColorSuccess: string;
150
+ defaultBorderColorSuccess: string;
151
+ defaultBgSuccess: string;
152
+ defaultColorWaiting1: string;
153
+ defaultBorderColorWaiting1: string;
154
+ defaultBgWaiting1: string;
155
+ defaultColorWaiting2: string;
156
+ defaultBorderColorWaiting2: string;
157
+ defaultBgWaiting2: string;
158
+ defaultColorWaiting3: string;
159
+ defaultBorderColorWaiting3: string;
160
+ defaultBgWaiting3: string;
161
+ defaultColorFailed: string;
162
+ defaultBorderColorFailed: string;
163
+ defaultBgFailed: string;
164
+ };
165
+
166
+ export type ProgressToken = AntdProgressToken &
167
+ AliasToken & {
168
+ strokeColor: string;
169
+ trailColor: string;
170
+ borderRadius: string;
171
+ height: string;
172
+ successBgColor: string;
173
+ };
174
+
175
+ export type StepsToken = AntdStepsToken &
176
+ AliasToken & {
177
+ zero?: string;
178
+ auto?: string;
179
+ none?: string;
180
+ full?: string;
181
+ flex?: string;
182
+ rowGap?: string;
183
+ iconWidthHeight?: string;
184
+ iconSize?: string;
185
+ paddingInlineEnd?: string;
186
+ tailTop?: string;
187
+ tailHeight?: string;
188
+ titleFontSize?: string;
189
+ iconColor?: string;
190
+ tailColor?: string;
191
+ tailLastChildColor?: string;
192
+ tailFirstChildColor?: string;
193
+ tailProcessFirstChildColor?: string;
194
+ tailProcessColor?: string;
195
+ tailWaitLastChildColor?: string;
196
+ tailWaitMiddleChildColor?: string;
197
+ tailErrorChildColor?: string;
198
+ finishIconBgColor?: string;
199
+ finishTailColor?: string;
200
+ processIconBgColor?: string;
201
+ waitIconBgColor?: string;
202
+ waitIconColor?: string;
203
+ waitTitleColor?: string;
204
+ waitTailColor?: string;
205
+ errorIconBgColor?: string;
206
+ manyItemsTransform?: string;
207
+ manyItemsWidth?: string;
208
+ manyItemsHeight?: string;
209
+ manyItemsWhiteSpace?: string;
210
+ manyItemsMarginInlineStart?: string;
211
+ manyItemsIconWidthHeight?: string;
212
+ manyItemsTailHeight?: string;
213
+ manyItemsTailBottom?: string;
214
+ };
215
+
216
+ export type FormToken = AntdFormToken &
217
+ AliasToken & {
218
+ lineHeight: number | string;
219
+ fontWeight: number;
220
+ verticalErrorPadding: string;
221
+ };
222
+
223
+ export type MenuToken = AntdMenuToken &
224
+ AliasToken & {
225
+ minWidth: string;
226
+ lightItemBg: string;
227
+ lightItemMainIconColor: string;
228
+ lightItemMainTitle: string;
229
+ LightSubItemBg: string;
230
+ lightSubTitleColor: string;
231
+ lightSubIconColor: string;
232
+ lightchildItemBg: string;
233
+ lightChildItemColor: string;
234
+ lightSubTitleColor: string;
235
+ none: string;
236
+ unset: string;
237
+ iconPosition: string;
238
+ mainBorder: string;
239
+ mainMenuExpandIconSize: string;
240
+ mainMenuIconSize: string;
241
+ mainMenuColor: string;
242
+ mainMenuFontWeight: string;
243
+ subMenuTitleColor: string;
244
+ subMenuTitleIconMargin: string;
245
+ subMenuItemSelectedChildColor: string;
246
+ subMenufontWeigth: string;
247
+ subMenuOnlyChildSize: string;
248
+ subMenuOnlyChildRadius: string;
249
+ subMenuOnlyChildBgColor: string;
250
+ subMenuOnlyChildMargin: string;
251
+ subMenuOnlyChildOpacity: string;
252
+ subMenuIconSize: string;
253
+ childMenuItemSelectedChildWidth: string;
254
+ childMenuItemSelectedChildHeight: string;
255
+ childMenuItemSelectedChildRadius: string;
256
+ childMenuItemSelectedChildMargin: string;
257
+ childMenuItemSelectedChildOpacity: string;
258
+ childMenuItemSelectedChildBgColor: string;
259
+ };
260
+
261
+ export type DatePickerToken = AntdDatePickerToken &
262
+ AliasToken & {
263
+ general: {
264
+ fontSize: string;
265
+ fontWeight: string;
266
+ fontColor: string;
267
+ bgDarkBlue: string;
268
+ wideBorder: string;
269
+ itemCenter: string;
270
+ inputMarginBottom: string;
271
+ inputPadding: string;
272
+ lightThemeBorder: string;
273
+ };
274
+ title: {
275
+ lightColor: string;
276
+ };
277
+ pickerTriangle: {
278
+ transform: string;
279
+ beforeTop: string;
280
+ beforeBorderX: string;
281
+ beforeBorderBottom: string;
282
+ beforeZIndex: string;
283
+ afterTop: string;
284
+ afterBorderX: string;
285
+ afterBorderBottom: string;
286
+ afterZIndex: string;
287
+ };
288
+ pickerPanel: {
289
+ shadow: string;
290
+ width: string;
291
+ header: {
292
+ marginY: string;
293
+ padding: string;
294
+ textSize: string;
295
+ textColor: string;
296
+ arrawWidth: string;
297
+ arrowPaddingLeft: string;
298
+ arrowPaddingRight: string;
299
+ datePickerarrowPadding: string;
300
+ };
301
+ body: {
302
+ padding: string;
303
+ };
304
+ content: {
305
+ tableHeaderBorder: string;
306
+ tableHeaderFontSize: string;
307
+ tableHeaderFontColor: string;
308
+ tableHeaderWidth: string;
309
+ tableHeaderPaddingBottom: string;
310
+ };
311
+ row: {
312
+ marginY: string;
313
+ previousCellWidth: string;
314
+ cellLineHeight: string;
315
+ cellFontWeight: string;
316
+ cellTextColor: string;
317
+ cellBg: string;
318
+ cellBorder: string;
319
+ cellBorderRadius: string;
320
+ };
321
+ separator: {
322
+ width: string;
323
+ height: string;
324
+ backgroundColor: string;
325
+ };
326
+ range: {
327
+ iconPosition: string;
328
+ iconTransform: string;
329
+ inputPadding: string;
330
+ inputRadius: string;
331
+ };
332
+ footer: {
333
+ margin: string;
334
+ lineHeight: string;
335
+ fontSize: string;
336
+ padding: string;
337
+ border: string;
338
+ borderRadius: string;
339
+ datePickerBorderTop: string;
340
+ datePickerPadding: string;
341
+ rangeDirection: string;
342
+ rangeColGap: string;
343
+ rangeBorder: string;
344
+ rangePadding: string;
345
+ rangeCol: string;
346
+ rangeInputPadding: string;
347
+ rangeInputRadius: string;
348
+ };
349
+ };
350
+ };
351
+
352
+ export type DividerToken = AntdDividerToken &
353
+ AliasToken & {
354
+ fontWeight: number;
355
+ };
356
+
357
+ export type UploadToken = AntdUploadToken & AliasToken;
358
+
359
+ export type CustomTokens = {
360
+ layout: {
361
+ displayFlex: string;
362
+ displayGrid: string;
363
+ displayBlock: string;
364
+ displayInline: string;
365
+ displayInlineBlock: string;
366
+ displayNone: string;
367
+ positionAbsolute: string;
368
+ positionRelative: string;
369
+ positionFixed: string;
370
+ positionSticky: string;
371
+ positionStatic: string;
372
+ };
373
+ typography: {
374
+ textTransformUppercase: string;
375
+ textTransformLowercase: string;
376
+ textTransformCapitalize: string;
377
+ textAlignLeft: string;
378
+ textAlignCenter: string;
379
+ textAlignRight: string;
380
+ textAlignJustify: string;
381
+ whiteSpaceNormal: string;
382
+ whiteSpaceNoWrap: string;
383
+ whiteSpacePre: string;
384
+ whiteSpacePreLine: string;
385
+ whiteSpacePreWrap: string;
386
+ textDecorationUnderline: string;
387
+ textDecorationOverline: string;
388
+ textDecorationLineThrough: string;
389
+ };
390
+ sizing: {
391
+ sizeMaxContent: string;
392
+ sizeMinContent: string;
393
+ sizeFitContent: string;
394
+ valueFull: string;
395
+ valueThreeQuarter: string;
396
+ valueHalf: string;
397
+ valueQuarter: string;
398
+ valueZero: string;
399
+ valueAuto: string;
400
+ };
401
+ others: {
402
+ colorTransparent: string;
403
+ valueHidden: string;
404
+ valueUnset: string;
405
+ emptyContent: string;
406
+ lineHeightShort: string;
407
+ lineHeightTall: string;
408
+ };
409
+ border: {
410
+ borderNone: string;
411
+ borderSolid: string;
412
+ borderDashed: string;
413
+ borderDotted: string;
414
+ borderWidthThin: string;
415
+ borderWidthThick: string;
416
+ };
417
+ overflow: {
418
+ overflowVisible: string;
419
+ overflowHidden: string;
420
+ overflowScroll: string;
421
+ };
422
+ };
423
+
424
+ export type PaginationToken = AntdPaginationToken &
425
+ AliasToken & {
426
+ zero: string;
427
+ none: string;
428
+ unset: string;
429
+ maxContent: string;
430
+ fontSize: string;
431
+ transparent: string;
432
+ displayFlex: string;
433
+ displayFlexRow: string;
434
+ displayContents: string;
435
+ displayGrid: string;
436
+ center: string;
437
+ full: string;
438
+ lineHeight: string;
439
+ auto: string;
440
+ hidden: string;
441
+ Simple: {
442
+ minWidth: string;
443
+ fontWeight: string;
444
+ color: string;
445
+ input: {
446
+ textColor: string;
447
+ fontWeight: string;
448
+ };
449
+ prevNextButton: {
450
+ svgWidth: string;
451
+ svgHeight: string;
452
+ svgFill: string;
453
+ };
454
+ slashPadding: string;
455
+ lightInputTextColor: string;
456
+ darkInputTextColor: string;
457
+ };
458
+ Table: {
459
+ totalText: {
460
+ width: string;
461
+ fontWeight: string;
462
+ color: string;
463
+ margin: string;
464
+ };
465
+ prevNextButton: {
466
+ svgWidth: string;
467
+ svgFill: string;
468
+ svgPadding: string;
469
+ svgBorder: string;
470
+ prevSvgBorderRadius: string;
471
+ nextSvgBorderRadius: string;
472
+ };
473
+ pageInfo: {
474
+ border: string;
475
+ padding: string;
476
+ currentPageBgColor: string;
477
+ currentPageMinWidth: string;
478
+ currentPageTextColor: string;
479
+ currentPageFontWeight: string;
480
+ totalPageBgColor: string;
481
+ totalPageTextColor: string;
482
+ };
483
+ sizeChanger: {
484
+ bgColor: string;
485
+ textColor: string;
486
+ width: string;
487
+ colGap: string;
488
+ border: string;
489
+ borderRadius: string;
490
+ item1: {
491
+ bgColor: string;
492
+ textColor: string;
493
+ padding: string;
494
+ };
495
+ item2: {
496
+ textColor: string;
497
+ fontWeight: string;
498
+ };
499
+ icon: {
500
+ bgColor: string;
501
+ textColor: string;
502
+ width: string;
503
+ position: string;
504
+ fontWeight: string;
505
+ };
506
+ };
507
+ };
508
+ Jumper: {
509
+ border: string;
510
+ bgColor: string;
511
+ textColor: string;
512
+ fontWeight: string;
513
+ minWidth: string;
514
+ height: string;
515
+ spanVisibility: string;
516
+ spanWhiteSpace: string;
517
+ spanPosition: string;
518
+ };
519
+ };
520
+
521
+ export type SelectToken = AntdSelectToken &
522
+ AliasToken & {
523
+ selectedOptionColor: string;
524
+ selectItemBorderShadowColor: string;
525
+ selectItemBgColor: string;
526
+ selectItemHoverBgColor: string;
527
+ };
528
+
529
+ export type TableToken = AntdTableToken & AliasToken & {};
530
+
531
+ export type GlobalToken = AntdGlobalToken & {
532
+ Button: ButtonToken;
533
+ Checkbox: CheckboxToken;
534
+ Radio: RadioToken;
535
+ Input: InputToken;
536
+ Breadcrumb: BreadcrumbToken;
537
+ Tag: TagToken;
538
+ Tooltip: TooltipToken;
539
+ Flex: FlexToken;
540
+ Grid: GridToken;
541
+ Layout: LayoutToken;
542
+ Spin: SpinToken;
543
+ Modal: ModalToken;
544
+ Alert: AlertToken;
545
+ Badge: BadgeToken;
546
+ Progress: ProgressToken;
547
+ Steps: StepsToken;
548
+ Form: FormToken;
549
+ Divider: DividerToken;
550
+ DatePicker: DatePickerToken;
551
+ Menu: MenuToken;
552
+ Pagination: PaginationToken;
553
+ Upload: UploadToken;
554
+ CustomTokens: CustomTokens;
555
+ Select: SelectToken;
556
+ Table: TableToken;
557
+ };
558
+
559
+ /**
560
+ * This is a type that is used to prevent the use of custom styles.
561
+ * Type name joke is stolen from React's internal props.
562
+ */
563
+ export type DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE = {
564
+ [key: string]: never;
565
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-theme",
3
- "version": "0.6.0",
3
+ "version": "1.0.0",
4
4
  "private": false,
5
5
  "description": "Akinon UI's default theme values.",
6
6
  "type": "module",
@@ -10,14 +10,14 @@
10
10
  "dist"
11
11
  ],
12
12
  "dependencies": {
13
- "antd": "5.17.0"
13
+ "antd": "5.22.6"
14
14
  },
15
15
  "devDependencies": {
16
16
  "clean-package": "2.2.0",
17
17
  "copyfiles": "^2.4.1",
18
18
  "rimraf": "^5.0.5",
19
- "typescript": "^5.2.2",
20
- "@akinon/typescript-config": "0.3.0"
19
+ "typescript": "*",
20
+ "@akinon/typescript-config": "1.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=18",
@@ -37,7 +37,7 @@
37
37
  "build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
38
38
  "build:esm": "tsc --outDir dist/esm",
39
39
  "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
40
- "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
40
+ "copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
41
41
  "clean": "rimraf dist/",
42
42
  "typecheck": "tsc --noEmit"
43
43
  }