@rainersoft/design-tokens 1.0.3 → 1.0.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/dist/index.d.ts CHANGED
@@ -566,7 +566,7 @@ var darkColors = {
566
566
  colors: colors
567
567
  };
568
568
 
569
- var typography$1 = {
569
+ var typography = {
570
570
  fontFamily: {
571
571
  sans: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
572
572
  serif: "ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif",
@@ -826,11 +826,11 @@ var typography$1 = {
826
826
  }
827
827
  }
828
828
  };
829
- var typography = {
830
- typography: typography$1
829
+ var typography$1 = {
830
+ typography: typography
831
831
  };
832
832
 
833
- var spacing$1 = {
833
+ var spacing = {
834
834
  "0": "0px",
835
835
  "1": "0.25rem",
836
836
  "2": "0.5rem",
@@ -867,11 +867,11 @@ var spacing$1 = {
867
867
  "2.5": "0.625rem",
868
868
  "3.5": "0.875rem"
869
869
  };
870
- var spacing = {
871
- spacing: spacing$1
870
+ var spacing$1 = {
871
+ spacing: spacing
872
872
  };
873
873
 
874
- var radius$1 = {
874
+ var radius = {
875
875
  none: "0px",
876
876
  sm: "0.125rem",
877
877
  base: "0.25rem",
@@ -882,11 +882,11 @@ var radius$1 = {
882
882
  "3xl": "1.5rem",
883
883
  full: "9999px"
884
884
  };
885
- var radius = {
886
- radius: radius$1
885
+ var radius$1 = {
886
+ radius: radius
887
887
  };
888
888
 
889
- var shadows$1 = {
889
+ var shadows = {
890
890
  light: {
891
891
  xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
892
892
  sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)",
@@ -914,8 +914,68 @@ var shadows$1 = {
914
914
  }
915
915
  }
916
916
  };
917
- var shadows = {
918
- shadows: shadows$1
917
+ var shadows$1 = {
918
+ shadows: shadows
919
+ };
920
+
921
+ var animations = {
922
+ "accordion-down": {
923
+ name: "accordion-down",
924
+ duration: "0.2s",
925
+ timingFunction: "ease-out",
926
+ keyframes: {
927
+ from: {
928
+ height: "0"
929
+ },
930
+ to: {
931
+ height: "var(--radix-accordion-content-height)"
932
+ }
933
+ }
934
+ },
935
+ "accordion-up": {
936
+ name: "accordion-up",
937
+ duration: "0.2s",
938
+ timingFunction: "ease-out",
939
+ keyframes: {
940
+ from: {
941
+ height: "var(--radix-accordion-content-height)"
942
+ },
943
+ to: {
944
+ height: "0"
945
+ }
946
+ }
947
+ },
948
+ "slide-in": {
949
+ name: "slide-in",
950
+ duration: "0.3s",
951
+ timingFunction: "ease-out",
952
+ keyframes: {
953
+ "0%": {
954
+ transform: "translateY(-10px)",
955
+ opacity: "0"
956
+ },
957
+ "100%": {
958
+ transform: "translateY(0)",
959
+ opacity: "1"
960
+ }
961
+ }
962
+ },
963
+ "fade-in": {
964
+ name: "fade-in",
965
+ duration: "0.5s",
966
+ timingFunction: "ease-in",
967
+ keyframes: {
968
+ "0%": {
969
+ opacity: "0"
970
+ },
971
+ "100%": {
972
+ opacity: "1"
973
+ }
974
+ }
975
+ }
976
+ };
977
+ var animations$1 = {
978
+ animations: animations
919
979
  };
920
980
 
921
981
  /**
@@ -960,14 +1020,14 @@ var shadows = {
960
1020
  * ```
961
1021
  */
962
1022
  declare const GRADIENT_DIRECTIONS: {
963
- readonly TO_TOP: "bg-gradient-to-t";
964
- readonly TO_BOTTOM: "bg-gradient-to-b";
965
- readonly TO_LEFT: "bg-gradient-to-l";
966
- readonly TO_RIGHT: "bg-gradient-to-r";
967
- readonly TO_TL: "bg-gradient-to-tl";
968
- readonly TO_TR: "bg-gradient-to-tr";
969
- readonly TO_BL: "bg-gradient-to-bl";
970
- readonly TO_BR: "bg-gradient-to-br";
1023
+ readonly TO_TOP: "bg-linear-to-t";
1024
+ readonly TO_BOTTOM: "bg-linear-to-b";
1025
+ readonly TO_LEFT: "bg-linear-to-l";
1026
+ readonly TO_RIGHT: "bg-linear-to-r";
1027
+ readonly TO_TL: "bg-linear-to-tl";
1028
+ readonly TO_TR: "bg-linear-to-tr";
1029
+ readonly TO_BL: "bg-linear-to-bl";
1030
+ readonly TO_BR: "bg-linear-to-br";
971
1031
  };
972
1032
  /**
973
1033
  * Gradientes decorativos e utilitários como classes Tailwind CSS
@@ -1041,6 +1101,80 @@ declare const GRADIENTS: {
1041
1101
  * </div>
1042
1102
  * ```
1043
1103
  */
1104
+ /**
1105
+ * Gradientes compostos - Direção + Cores (Padrão Enterprise)
1106
+ *
1107
+ * @description
1108
+ * Combina direção e cores em um único token para uso direto.
1109
+ * Elimina necessidade de concatenar strings manualmente.
1110
+ * Padrão usado por grandes empresas (Google Material, Microsoft Fluent, Shopify Polaris).
1111
+ *
1112
+ * @type {Object}
1113
+ * @property {string} HORIZONTAL_PRIMARY - Gradiente horizontal com cores primárias
1114
+ * @property {string} HORIZONTAL_SECONDARY - Gradiente horizontal com cores secundárias
1115
+ * @property {string} HORIZONTAL_DECORATIVE - Gradiente horizontal decorativo
1116
+ * @property {string} VERTICAL_PRIMARY - Gradiente vertical com cores primárias
1117
+ * @property {string} VERTICAL_SECONDARY - Gradiente vertical com cores secundárias
1118
+ * @property {string} DIAGONAL_PRIMARY - Gradiente diagonal com cores primárias
1119
+ * @property {string} DIAGONAL_SECONDARY - Gradiente diagonal com cores secundárias
1120
+ *
1121
+ * @constant
1122
+ * @readonly
1123
+ *
1124
+ * @example
1125
+ * ```typescript
1126
+ * import { GRADIENT_COMPOSITES } from '@rainersoft/design-tokens';
1127
+ *
1128
+ * // Usar diretamente sem concatenar
1129
+ * <div className={GRADIENT_COMPOSITES.HORIZONTAL_PRIMARY}>
1130
+ * Conteúdo
1131
+ * </div>
1132
+ * ```
1133
+ */
1134
+ declare const GRADIENT_COMPOSITES: {
1135
+ readonly HORIZONTAL_PRIMARY: "bg-linear-to-r bg-linear-to-r from-[var(--color-primary-base)] to-[var(--color-primary-hover)]";
1136
+ readonly HORIZONTAL_SECONDARY: "bg-linear-to-r bg-linear-to-r from-[var(--color-secondary-base)] to-[var(--color-accent-base)]";
1137
+ readonly HORIZONTAL_DECORATIVE: "bg-linear-to-r bg-linear-to-br from-[var(--color-primary-base)] via-[var(--color-secondary-base)] to-[var(--color-accent-base)]";
1138
+ readonly HORIZONTAL_CYAN_PURPLE: "bg-linear-to-r bg-linear-to-r from-[var(--color-primary-base)] to-[var(--color-secondary-base)]";
1139
+ readonly VERTICAL_PRIMARY: "bg-linear-to-b bg-linear-to-r from-[var(--color-primary-base)] to-[var(--color-primary-hover)]";
1140
+ readonly VERTICAL_SECONDARY: "bg-linear-to-b bg-linear-to-r from-[var(--color-secondary-base)] to-[var(--color-accent-base)]";
1141
+ readonly VERTICAL_DECORATIVE: "bg-linear-to-b bg-linear-to-br from-[var(--color-primary-base)] via-[var(--color-secondary-base)] to-[var(--color-accent-base)]";
1142
+ readonly DIAGONAL_PRIMARY: "bg-linear-to-br bg-linear-to-br from-[var(--color-primary-base)] via-[var(--color-secondary-base)] to-[var(--color-accent-base)]";
1143
+ readonly DIAGONAL_SECONDARY: "bg-linear-to-br bg-linear-to-r from-[var(--color-primary-base)] to-[var(--color-secondary-base)]";
1144
+ readonly DIAGONAL_GREEN_EMERALD: "bg-linear-to-br bg-linear-to-br from-[var(--color-status-success)] to-[var(--color-accent-base)]";
1145
+ };
1146
+ /**
1147
+ * Gradientes de cores específicas usando tokens de cor
1148
+ *
1149
+ * @description
1150
+ * Elimina valores hardcoded como "from-gray-500". Todos os gradientes
1151
+ * usam tokens de cor do sistema para garantir consistência.
1152
+ *
1153
+ * @type {Object}
1154
+ * @property {string} GRAY_SCALE - Gradiente em escala de cinza usando tokens
1155
+ * @property {string} BLUE_SCALE - Gradiente em escala de azul usando tokens primários
1156
+ * @property {string} SUCCESS_SCALE - Gradiente em escala de verde (sucesso) usando tokens
1157
+ * @property {string} TEXT_MUTED - Gradiente para texto muted usando tokens
1158
+ *
1159
+ * @constant
1160
+ * @readonly
1161
+ *
1162
+ * @example
1163
+ * ```typescript
1164
+ * import { GRADIENT_COLORS } from '@rainersoft/design-tokens';
1165
+ *
1166
+ * // Usar gradiente de cinza sem valores hardcoded
1167
+ * <div className={GRADIENT_COLORS.GRAY_SCALE}>
1168
+ * Conteúdo
1169
+ * </div>
1170
+ * ```
1171
+ */
1172
+ declare const GRADIENT_COLORS: {
1173
+ readonly GRAY_SCALE: "bg-linear-to-r from-[var(--color-text-tertiary)] to-[var(--color-text-secondary)]";
1174
+ readonly BLUE_SCALE: "bg-linear-to-r from-[var(--color-primary-base)] to-[var(--color-primary-hover)]";
1175
+ readonly SUCCESS_SCALE: "bg-linear-to-r from-[var(--color-status-success)] to-[var(--color-status-success-hover)]";
1176
+ readonly TEXT_MUTED: "bg-linear-to-r from-[var(--color-text-tertiary)] to-[var(--color-text-secondary)]";
1177
+ };
1044
1178
  declare const BACKGROUND: {
1045
1179
  readonly FULL: "bg-[var(--color-background-primary)]";
1046
1180
  readonly GRADIENT_OVERLAY: "bg-linear-to-br from-[var(--color-primary-base)]/10 via-[var(--color-secondary-base)]/10 to-[var(--color-accent-base)]/10";
@@ -1068,6 +1202,22 @@ type GradientDirections = typeof GRADIENT_DIRECTIONS;
1068
1202
  * Tipo que representa todos os gradientes pré-configurados disponíveis.
1069
1203
  */
1070
1204
  type Gradients = typeof GRADIENTS;
1205
+ /**
1206
+ * Tipo TypeScript para gradientes compostos
1207
+ *
1208
+ * @typedef {Object} GradientComposites
1209
+ * @description
1210
+ * Tipo que representa todos os gradientes compostos (direção + cores).
1211
+ */
1212
+ type GradientComposites = typeof GRADIENT_COMPOSITES;
1213
+ /**
1214
+ * Tipo TypeScript para gradientes de cores
1215
+ *
1216
+ * @typedef {Object} GradientColors
1217
+ * @description
1218
+ * Tipo que representa todos os gradientes de cores específicas.
1219
+ */
1220
+ type GradientColors = typeof GRADIENT_COLORS;
1071
1221
  /**
1072
1222
  * Tipo TypeScript para backgrounds
1073
1223
  *
@@ -1281,6 +1431,7 @@ declare function validateContrast(foreground: string, background: string, option
1281
1431
  * @property {Object} spacing - Tokens de espaçamento (margens, paddings)
1282
1432
  * @property {Object} radius - Tokens de raio de borda
1283
1433
  * @property {Object} shadows - Tokens de sombras para ambos os temas
1434
+ * @property {Object} animations - Tokens de animações (keyframes e durações)
1284
1435
  *
1285
1436
  * @constant
1286
1437
  * @readonly
@@ -2195,6 +2346,62 @@ declare const tokens: {
2195
2346
  };
2196
2347
  };
2197
2348
  };
2349
+ readonly animations: {
2350
+ "accordion-down": {
2351
+ name: string;
2352
+ duration: string;
2353
+ timingFunction: string;
2354
+ keyframes: {
2355
+ from: {
2356
+ height: string;
2357
+ };
2358
+ to: {
2359
+ height: string;
2360
+ };
2361
+ };
2362
+ };
2363
+ "accordion-up": {
2364
+ name: string;
2365
+ duration: string;
2366
+ timingFunction: string;
2367
+ keyframes: {
2368
+ from: {
2369
+ height: string;
2370
+ };
2371
+ to: {
2372
+ height: string;
2373
+ };
2374
+ };
2375
+ };
2376
+ "slide-in": {
2377
+ name: string;
2378
+ duration: string;
2379
+ timingFunction: string;
2380
+ keyframes: {
2381
+ "0%": {
2382
+ transform: string;
2383
+ opacity: string;
2384
+ };
2385
+ "100%": {
2386
+ transform: string;
2387
+ opacity: string;
2388
+ };
2389
+ };
2390
+ };
2391
+ "fade-in": {
2392
+ name: string;
2393
+ duration: string;
2394
+ timingFunction: string;
2395
+ keyframes: {
2396
+ "0%": {
2397
+ opacity: string;
2398
+ };
2399
+ "100%": {
2400
+ opacity: string;
2401
+ };
2402
+ };
2403
+ };
2404
+ };
2198
2405
  };
2199
2406
  /**
2200
2407
  * Cores do tema claro
@@ -3200,6 +3407,81 @@ declare const shadowTokens: {
3200
3407
  };
3201
3408
  };
3202
3409
  };
3410
+ /**
3411
+ * Tokens de animações
3412
+ *
3413
+ * @description
3414
+ * Exporta todos os tokens de animações, incluindo keyframes, durações
3415
+ * e funções de timing para transições e animações do sistema.
3416
+ *
3417
+ * @type {Object}
3418
+ * @constant
3419
+ * @readonly
3420
+ *
3421
+ * @example
3422
+ * ```typescript
3423
+ * import { animationTokens } from 'rainer-design-tokens';
3424
+ *
3425
+ * const slideIn = animationTokens['slide-in'];
3426
+ * const fadeIn = animationTokens['fade-in'];
3427
+ * ```
3428
+ */
3429
+ declare const animationTokens: {
3430
+ "accordion-down": {
3431
+ name: string;
3432
+ duration: string;
3433
+ timingFunction: string;
3434
+ keyframes: {
3435
+ from: {
3436
+ height: string;
3437
+ };
3438
+ to: {
3439
+ height: string;
3440
+ };
3441
+ };
3442
+ };
3443
+ "accordion-up": {
3444
+ name: string;
3445
+ duration: string;
3446
+ timingFunction: string;
3447
+ keyframes: {
3448
+ from: {
3449
+ height: string;
3450
+ };
3451
+ to: {
3452
+ height: string;
3453
+ };
3454
+ };
3455
+ };
3456
+ "slide-in": {
3457
+ name: string;
3458
+ duration: string;
3459
+ timingFunction: string;
3460
+ keyframes: {
3461
+ "0%": {
3462
+ transform: string;
3463
+ opacity: string;
3464
+ };
3465
+ "100%": {
3466
+ transform: string;
3467
+ opacity: string;
3468
+ };
3469
+ };
3470
+ };
3471
+ "fade-in": {
3472
+ name: string;
3473
+ duration: string;
3474
+ timingFunction: string;
3475
+ keyframes: {
3476
+ "0%": {
3477
+ opacity: string;
3478
+ };
3479
+ "100%": {
3480
+ opacity: string;
3481
+ };
3482
+ };
3483
+ };
3484
+ };
3203
3485
  /**
3204
3486
  * Tipo TypeScript para todos os tokens
3205
3487
  *
@@ -3232,7 +3514,7 @@ type DarkColors = typeof darkColors.colors;
3232
3514
  * @description
3233
3515
  * Tipo que representa todos os tokens de tipografia.
3234
3516
  */
3235
- type Typography = typeof typography.typography;
3517
+ type Typography = typeof typography$1.typography;
3236
3518
  /**
3237
3519
  * Tipo TypeScript para tokens de espaçamento
3238
3520
  *
@@ -3240,7 +3522,7 @@ type Typography = typeof typography.typography;
3240
3522
  * @description
3241
3523
  * Tipo que representa todos os tokens de espaçamento.
3242
3524
  */
3243
- type Spacing = typeof spacing.spacing;
3525
+ type Spacing = typeof spacing$1.spacing;
3244
3526
  /**
3245
3527
  * Tipo TypeScript para tokens de raio de borda
3246
3528
  *
@@ -3248,7 +3530,7 @@ type Spacing = typeof spacing.spacing;
3248
3530
  * @description
3249
3531
  * Tipo que representa todos os tokens de raio de borda.
3250
3532
  */
3251
- type Radius = typeof radius.radius;
3533
+ type Radius = typeof radius$1.radius;
3252
3534
  /**
3253
3535
  * Tipo TypeScript para tokens de sombras
3254
3536
  *
@@ -3256,7 +3538,15 @@ type Radius = typeof radius.radius;
3256
3538
  * @description
3257
3539
  * Tipo que representa todos os tokens de sombras.
3258
3540
  */
3259
- type Shadows = typeof shadows.shadows;
3541
+ type Shadows = typeof shadows$1.shadows;
3542
+ /**
3543
+ * Tipo TypeScript para tokens de animações
3544
+ *
3545
+ * @typedef {Object} Animations
3546
+ * @description
3547
+ * Tipo que representa todos os tokens de animações.
3548
+ */
3549
+ type Animations = typeof animations$1.animations;
3260
3550
 
3261
3551
  /**
3262
3552
  * @fileoverview Tema Claro - Rainer Design System
@@ -5850,4 +6140,4 @@ declare const themes: {
5850
6140
  */
5851
6141
  type Themes = typeof themes;
5852
6142
 
5853
- export { BACKGROUND, type Background, type DarkColors, type DarkTheme, GRADIENTS, GRADIENT_DIRECTIONS, type GradientDirections, type Gradients, type LightColors, type LightTheme, type Radius, type Shadows, type Spacing, type Themes, type Tokens, type Typography, darkTheme, darkThemeColors, getContrast, getContrastInfo, getLuminance, hexToRgb, lightTheme, lightThemeColors, meetsWCAGAA, meetsWCAGAAA, radiusTokens, shadowTokens, spacingTokens, themes, tokens, typographyTokens, validateContrast };
6143
+ export { type Animations, BACKGROUND, type Background, type DarkColors, type DarkTheme, GRADIENTS, GRADIENT_COLORS, GRADIENT_COMPOSITES, GRADIENT_DIRECTIONS, type GradientColors, type GradientComposites, type GradientDirections, type Gradients, type LightColors, type LightTheme, type Radius, type Shadows, type Spacing, type Themes, type Tokens, type Typography, animationTokens, darkTheme, darkThemeColors, getContrast, getContrastInfo, getLuminance, hexToRgb, lightTheme, lightThemeColors, meetsWCAGAA, meetsWCAGAAA, radiusTokens, shadowTokens, spacingTokens, themes, tokens, typographyTokens, validateContrast };