@frontile/theme 0.18.0-alpha.2 → 0.18.0-alpha.20

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 (106) hide show
  1. package/README.md +22 -23
  2. package/declarations/colors/config.d.ts +18 -36
  3. package/declarations/colors/palette-absolute.d.ts +2 -2
  4. package/declarations/colors/palette.d.ts +1 -1
  5. package/declarations/colors/semantic.d.ts +4 -0
  6. package/declarations/colors/types.d.ts +190 -134
  7. package/declarations/colors/util.d.ts +2 -1
  8. package/declarations/colors.d.ts +1 -0
  9. package/declarations/components/accordion.d.ts +308 -0
  10. package/declarations/components/alert.d.ts +294 -0
  11. package/declarations/components/avatar.d.ts +9 -7
  12. package/declarations/components/button.d.ts +131 -48
  13. package/declarations/components/calendar.d.ts +382 -0
  14. package/declarations/components/chip.d.ts +79 -42
  15. package/declarations/components/close-button.d.ts +9 -7
  16. package/declarations/components/command.d.ts +281 -0
  17. package/declarations/components/divider.d.ts +9 -7
  18. package/declarations/components/dropdown.d.ts +11 -9
  19. package/declarations/components/external-link.d.ts +160 -0
  20. package/declarations/components/forms/forms-legacy.d.ts +108 -84
  21. package/declarations/components/forms/forms.d.ts +1040 -159
  22. package/declarations/components/index.d.ts +11 -0
  23. package/declarations/components/kbd.d.ts +315 -0
  24. package/declarations/components/listbox.d.ts +122 -18
  25. package/declarations/components/notification-card.d.ts +182 -111
  26. package/declarations/components/notifications-container.d.ts +111 -40
  27. package/declarations/components/overlays.d.ts +429 -29
  28. package/declarations/components/pagination.d.ts +359 -0
  29. package/declarations/components/popover.d.ts +11 -9
  30. package/declarations/components/progress-bar.d.ts +39 -7
  31. package/declarations/components/segmented-control.d.ts +463 -0
  32. package/declarations/components/shared.d.ts +9 -0
  33. package/declarations/components/skeleton.d.ts +151 -0
  34. package/declarations/components/spinner.d.ts +19 -7
  35. package/declarations/components/table.d.ts +17 -9
  36. package/declarations/components/tabs.d.ts +463 -0
  37. package/declarations/components/tooltip.d.ts +270 -0
  38. package/declarations/plugin/default-config.d.ts +18 -36
  39. package/declarations/tw.d.ts +9 -7
  40. package/declarations/types.d.ts +18 -1
  41. package/dist/colors.js +2 -1
  42. package/dist/colors.js.map +1 -1
  43. package/dist/index.js +3825 -5
  44. package/dist/index.js.map +1 -1
  45. package/dist/overlays-DIZlPzFH.js +654 -0
  46. package/dist/overlays-DIZlPzFH.js.map +1 -0
  47. package/dist/plugin.js +60 -85
  48. package/dist/plugin.js.map +1 -1
  49. package/dist/util-Dp_dlOPq.js +482 -0
  50. package/dist/util-Dp_dlOPq.js.map +1 -0
  51. package/package.json +17 -14
  52. package/public/fonts/domine-variable.woff2 +0 -0
  53. package/public/fonts/open-sans-italic-variable.woff2 +0 -0
  54. package/public/fonts/open-sans-variable.woff2 +0 -0
  55. package/public/fonts/source-code-pro-italic-variable.woff2 +0 -0
  56. package/public/fonts/source-code-pro-variable.woff2 +0 -0
  57. package/src/index.css +64 -15
  58. package/src/styles/font-faces.css +70 -8
  59. package/src/styles/theme.css +18 -7
  60. package/src/styles/typography.css +229 -126
  61. package/declarations/colors/contrast.d.ts +0 -16
  62. package/declarations/colors/defaults.d.ts +0 -66
  63. package/declarations/colors/palette-dark.d.ts +0 -123
  64. package/declarations/colors/palette-light.d.ts +0 -123
  65. package/dist/config-4CswsBlg.js +0 -342
  66. package/dist/config-4CswsBlg.js.map +0 -1
  67. package/dist/config-B3XkEtHW.js +0 -377
  68. package/dist/config-B3XkEtHW.js.map +0 -1
  69. package/dist/config-BpWBpuzR.js +0 -335
  70. package/dist/config-BpWBpuzR.js.map +0 -1
  71. package/dist/config-Cle59Y4k.js +0 -523
  72. package/dist/config-Cle59Y4k.js.map +0 -1
  73. package/dist/config-D0EoeVzn.js +0 -388
  74. package/dist/config-D0EoeVzn.js.map +0 -1
  75. package/dist/config-DBAavoE2.js +0 -336
  76. package/dist/config-DBAavoE2.js.map +0 -1
  77. package/dist/config-Oysuq2Z9.js +0 -341
  78. package/dist/config-Oysuq2Z9.js.map +0 -1
  79. package/dist/config-PYki2g7N.js +0 -335
  80. package/dist/config-PYki2g7N.js.map +0 -1
  81. package/dist/forms-legacy-15iy0KmK.js +0 -1851
  82. package/dist/forms-legacy-15iy0KmK.js.map +0 -1
  83. package/dist/forms-legacy-B-L2HELt.js +0 -1881
  84. package/dist/forms-legacy-B-L2HELt.js.map +0 -1
  85. package/dist/forms-legacy-BMIAioRi.js +0 -1807
  86. package/dist/forms-legacy-BMIAioRi.js.map +0 -1
  87. package/dist/forms-legacy-B_EygtyK.js +0 -1763
  88. package/dist/forms-legacy-B_EygtyK.js.map +0 -1
  89. package/dist/forms-legacy-Bg_UoLDR.js +0 -1763
  90. package/dist/forms-legacy-Bg_UoLDR.js.map +0 -1
  91. package/dist/forms-legacy-CVLZ-9BG.js +0 -1804
  92. package/dist/forms-legacy-CVLZ-9BG.js.map +0 -1
  93. package/dist/forms-legacy-CuFc3hcn.js +0 -1807
  94. package/dist/forms-legacy-CuFc3hcn.js.map +0 -1
  95. package/dist/forms-legacy-DiKImAli.js +0 -1809
  96. package/dist/forms-legacy-DiKImAli.js.map +0 -1
  97. package/dist/forms-legacy-edWQVbZP.js +0 -1809
  98. package/dist/forms-legacy-edWQVbZP.js.map +0 -1
  99. package/dist/index.css +0 -63
  100. package/dist/semantic-DUv6Lpqq.js +0 -218
  101. package/dist/semantic-DUv6Lpqq.js.map +0 -1
  102. package/dist/styles/font-faces.css +0 -26
  103. package/dist/styles/theme.css +0 -48
  104. package/dist/styles/typography.css +0 -291
  105. package/public/fonts/stix-two-text-italic-variable.woff2 +0 -0
  106. package/public/fonts/stix-two-text-variable.woff2 +0 -0
package/README.md CHANGED
@@ -85,18 +85,18 @@ module.exports = frontile({
85
85
  themes: {
86
86
  light: {
87
87
  colors: {
88
- brand: {
88
+ primary: {
89
89
  subtle: '#3b82f6',
90
- medium: '#2563eb',
90
+ DEFAULT: '#2563eb',
91
91
  strong: '#1d4ed8',
92
92
  }
93
93
  }
94
94
  },
95
95
  dark: {
96
96
  colors: {
97
- brand: {
97
+ primary: {
98
98
  subtle: '#60a5fa',
99
- medium: '#3b82f6',
99
+ DEFAULT: '#3b82f6',
100
100
  strong: '#2563eb',
101
101
  }
102
102
  }
@@ -114,7 +114,7 @@ module.exports = frontile({
114
114
  themes: {
115
115
  light: {
116
116
  colors: {
117
- brand: {
117
+ primary: {
118
118
  subtle: 'var(--color-surface-solid-6)',
119
119
  }
120
120
  }
@@ -127,7 +127,7 @@ module.exports = frontile({
127
127
 
128
128
  ### Customizing On-Colors
129
129
 
130
- The theme system automatically generates "on-color" variants (e.g., `on-brand`, `on-success`) for semantic colors to ensure optimal text contrast. These colors are used as text/foreground colors on semantic backgrounds.
130
+ The theme system automatically generates "on-color" variants (e.g., `on-primary`, `on-success`) for semantic colors to ensure optimal text contrast. These colors are used as text/foreground colors on semantic backgrounds.
131
131
 
132
132
  By default, on-colors are calculated using WCAG contrast guidelines and will be either pure white or pure black. However, you can override these auto-generated colors to match your brand or design requirements:
133
133
 
@@ -139,18 +139,16 @@ module.exports = frontile({
139
139
  light: {
140
140
  colors: {
141
141
  // Define background colors as usual
142
- brand: {
142
+ primary: {
143
143
  subtle: '#3b82f6',
144
144
  soft: '#2563eb',
145
- medium: '#1e40af',
146
145
  strong: '#1e3a8a',
147
146
  DEFAULT: '#1e40af'
148
147
  },
149
148
  // Override on-colors to use custom values
150
- 'on-brand': {
149
+ 'on-primary': {
151
150
  subtle: '#ffffff', // Pure white
152
151
  soft: '#e0f2ff', // Light blue tint instead of pure white
153
- medium: '#ffffff', // Pure white
154
152
  strong: '#bfdbfe', // Lighter blue
155
153
  DEFAULT: '#ffffff' // Pure white
156
154
  }
@@ -167,13 +165,13 @@ module.exports = frontile({
167
165
  themes: {
168
166
  light: {
169
167
  colors: {
170
- brand: {
168
+ primary: {
171
169
  subtle: '#3b82f6',
172
- medium: '#1e40af',
170
+ DEFAULT: '#1e40af',
173
171
  strong: '#1e3a8a',
174
172
  },
175
- 'on-brand': {
176
- medium: '#e0f2ff', // Only override medium, others auto-generate
173
+ 'on-primary': {
174
+ DEFAULT: '#e0f2ff', // Only override the DEFAULT level, others auto-generate
177
175
  }
178
176
  }
179
177
  }
@@ -182,8 +180,9 @@ module.exports = frontile({
182
180
  ```
183
181
 
184
182
  You can override on-colors for any semantic color category:
185
- - `on-neutral`, `on-brand`, `on-accent`, `on-success`, `on-warning`, `on-danger`
186
- - `on-surface-solid` (with numeric keys 0-11)
183
+ - `on-neutral`, `on-primary`, `on-secondary`, `on-tertiary`, `on-success`,
184
+ `on-warning`, `on-danger`
185
+ - `on-surface-modal`
187
186
 
188
187
  #### Option 2: Via CSS Variables
189
188
 
@@ -195,15 +194,15 @@ Override colors directly in your CSS:
195
194
  @source '../../node_modules/@frontile';
196
195
 
197
196
  @theme {
198
- /* Override brand colors */
199
- --color-brand-subtle: #3b82f6;
200
- --color-brand-medium: #2563eb;
201
- --color-brand-strong: #1d4ed8;
197
+ /* Override primary colors */
198
+ --color-primary-subtle: #3b82f6;
199
+ --color-primary: #2563eb;
200
+ --color-primary-strong: #1d4ed8;
202
201
 
203
202
  /* Manually define "on-" colors for text contrast */
204
- --color-on-brand-subtle: #ffffff;
205
- --color-on-brand-medium: #ffffff;
206
- --color-on-brand-strong: #ffffff;
203
+ --color-on-primary-subtle: #ffffff;
204
+ --color-on-primary: #ffffff;
205
+ --color-on-primary-strong: #ffffff;
207
206
  }
208
207
  ```
209
208
 
@@ -1,63 +1,45 @@
1
1
  export declare const semanticColors: {
2
2
  light: {
3
3
  neutral: import("./types").SemanticColorCategory;
4
- brand: import("./types").SemanticColorCategory;
5
- accent: import("./types").SemanticColorCategory;
4
+ primary: import("./types").SemanticColorCategory;
5
+ secondary: import("./types").SemanticColorCategory;
6
+ tertiary: import("./types").SemanticColorCategory;
6
7
  success: import("./types").SemanticColorCategory;
7
8
  warning: import("./types").SemanticColorCategory;
8
9
  danger: import("./types").SemanticColorCategory;
9
10
  surface: import("./types").SurfaceColors;
10
11
  'on-neutral'?: import("./types").OnColorCategory;
11
- 'on-brand'?: import("./types").OnColorCategory;
12
- 'on-accent'?: import("./types").OnColorCategory;
12
+ 'on-primary'?: import("./types").OnColorCategory;
13
+ 'on-secondary'?: import("./types").OnColorCategory;
14
+ 'on-tertiary'?: import("./types").OnColorCategory;
13
15
  'on-success'?: import("./types").OnColorCategory;
14
16
  'on-warning'?: import("./types").OnColorCategory;
15
17
  'on-danger'?: import("./types").OnColorCategory;
16
- 'on-surface-solid'?: {
17
- 0?: string;
18
- 1?: string;
19
- 2?: string;
20
- 3?: string;
21
- 4?: string;
22
- 5?: string;
23
- 6?: string;
24
- 7?: string;
25
- 8?: string;
26
- 9?: string;
27
- 10?: string;
28
- 11?: string;
29
- };
18
+ 'on-surface-input'?: string;
19
+ 'on-surface-modal'?: string;
20
+ background: import("./types").ColorScale;
30
21
  divider: import("./types").ColorScale;
31
22
  focus: import("./types").ColorScale;
32
23
  };
33
24
  dark: {
34
25
  neutral: import("./types").SemanticColorCategory;
35
- brand: import("./types").SemanticColorCategory;
36
- accent: import("./types").SemanticColorCategory;
26
+ primary: import("./types").SemanticColorCategory;
27
+ secondary: import("./types").SemanticColorCategory;
28
+ tertiary: import("./types").SemanticColorCategory;
37
29
  success: import("./types").SemanticColorCategory;
38
30
  warning: import("./types").SemanticColorCategory;
39
31
  danger: import("./types").SemanticColorCategory;
40
32
  surface: import("./types").SurfaceColors;
41
33
  'on-neutral'?: import("./types").OnColorCategory;
42
- 'on-brand'?: import("./types").OnColorCategory;
43
- 'on-accent'?: import("./types").OnColorCategory;
34
+ 'on-primary'?: import("./types").OnColorCategory;
35
+ 'on-secondary'?: import("./types").OnColorCategory;
36
+ 'on-tertiary'?: import("./types").OnColorCategory;
44
37
  'on-success'?: import("./types").OnColorCategory;
45
38
  'on-warning'?: import("./types").OnColorCategory;
46
39
  'on-danger'?: import("./types").OnColorCategory;
47
- 'on-surface-solid'?: {
48
- 0?: string;
49
- 1?: string;
50
- 2?: string;
51
- 3?: string;
52
- 4?: string;
53
- 5?: string;
54
- 6?: string;
55
- 7?: string;
56
- 8?: string;
57
- 9?: string;
58
- 10?: string;
59
- 11?: string;
60
- };
40
+ 'on-surface-input'?: string;
41
+ 'on-surface-modal'?: string;
42
+ background: import("./types").ColorScale;
61
43
  divider: import("./types").ColorScale;
62
44
  focus: import("./types").ColorScale;
63
45
  };
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * Absolute OKLCH colors that remain constant across light/dark themes.
5
5
  */
6
- declare const black = "oklch(0 0 none)";
7
- declare const white = "oklch(1.0000000000000002 0 none)";
6
+ declare const black = "#000000";
7
+ declare const white = "#ffffff";
8
8
  export { black, white };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Frontile Color Palette
3
3
  *
4
- * Theme-independent OKLCH color scales extracted from Tokens Studio palette definitions.
4
+ * Theme-independent color scales.
5
5
  */
6
6
  declare const gray: {
7
7
  '50': string;
@@ -2,6 +2,10 @@
2
2
  * Frontile Semantic Colors
3
3
  *
4
4
  * Semantic color mappings for light and dark themes.
5
+ *
6
+ * Values are transcribed from the Beacon design tokens (Figma), where alpha is
7
+ * expressed as a 0–1 float. Here it is folded into the color as a two-digit
8
+ * hex suffix — e.g. 20% becomes `33` (round(0.2 * 255) = 51 = 0x33).
5
9
  */
6
10
  import type { ThemeColors } from './types';
7
11
  declare const _default: {