@frontile/theme 0.17.1 → 0.18.0-alpha.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 (81) hide show
  1. package/README.md +139 -0
  2. package/declarations/colors/config.d.ts +64 -0
  3. package/declarations/colors/contrast.d.ts +16 -0
  4. package/declarations/colors/palette-absolute.d.ts +8 -0
  5. package/declarations/colors/palette-dark.d.ts +123 -0
  6. package/declarations/colors/palette-light.d.ts +123 -0
  7. package/declarations/colors/palette.d.ts +123 -0
  8. package/declarations/colors/semantic.d.ts +7 -1
  9. package/declarations/colors/types.d.ts +321 -15
  10. package/declarations/colors/util.d.ts +6 -1
  11. package/declarations/colors.d.ts +2 -2
  12. package/declarations/components/avatar.d.ts +42 -42
  13. package/declarations/components/button.d.ts +254 -152
  14. package/declarations/components/chip.d.ts +62 -103
  15. package/declarations/components/close-button.d.ts +42 -50
  16. package/declarations/components/divider.d.ts +43 -10
  17. package/declarations/components/dropdown.d.ts +42 -1
  18. package/declarations/components/forms/forms-legacy.d.ts +496 -178
  19. package/declarations/components/forms/forms.d.ts +891 -822
  20. package/declarations/components/listbox.d.ts +88 -79
  21. package/declarations/components/notification-card.d.ts +41 -84
  22. package/declarations/components/notifications-container.d.ts +42 -17
  23. package/declarations/components/overlays.d.ts +172 -84
  24. package/declarations/components/popover.d.ts +43 -16
  25. package/declarations/components/progress-bar.d.ts +44 -104
  26. package/declarations/components/spinner.d.ts +44 -30
  27. package/declarations/components/table.d.ts +51 -132
  28. package/declarations/plugin/default-config.d.ts +63 -9
  29. package/declarations/plugin/overlays.d.ts +2 -6
  30. package/declarations/plugin/power-select.d.ts +1 -1
  31. package/declarations/plugin/resolve.d.ts +1 -2
  32. package/declarations/tw.d.ts +40 -1
  33. package/declarations/types.d.ts +29 -12
  34. package/dist/colors.js +1 -1
  35. package/dist/config-4CswsBlg.js +342 -0
  36. package/dist/config-4CswsBlg.js.map +1 -0
  37. package/dist/config-B3XkEtHW.js +377 -0
  38. package/dist/config-B3XkEtHW.js.map +1 -0
  39. package/dist/config-BpWBpuzR.js +335 -0
  40. package/dist/config-BpWBpuzR.js.map +1 -0
  41. package/dist/config-Cle59Y4k.js +523 -0
  42. package/dist/config-Cle59Y4k.js.map +1 -0
  43. package/dist/config-D0EoeVzn.js +388 -0
  44. package/dist/config-D0EoeVzn.js.map +1 -0
  45. package/dist/config-DBAavoE2.js +336 -0
  46. package/dist/config-DBAavoE2.js.map +1 -0
  47. package/dist/config-Oysuq2Z9.js +341 -0
  48. package/dist/config-Oysuq2Z9.js.map +1 -0
  49. package/dist/config-PYki2g7N.js +335 -0
  50. package/dist/config-PYki2g7N.js.map +1 -0
  51. package/dist/forms-legacy-15iy0KmK.js +1851 -0
  52. package/dist/forms-legacy-15iy0KmK.js.map +1 -0
  53. package/dist/forms-legacy-B-L2HELt.js +1881 -0
  54. package/dist/forms-legacy-B-L2HELt.js.map +1 -0
  55. package/dist/forms-legacy-BMIAioRi.js +1807 -0
  56. package/dist/forms-legacy-BMIAioRi.js.map +1 -0
  57. package/dist/forms-legacy-B_EygtyK.js +1763 -0
  58. package/dist/forms-legacy-B_EygtyK.js.map +1 -0
  59. package/dist/forms-legacy-CVLZ-9BG.js +1804 -0
  60. package/dist/forms-legacy-CVLZ-9BG.js.map +1 -0
  61. package/dist/forms-legacy-CuFc3hcn.js +1807 -0
  62. package/dist/forms-legacy-CuFc3hcn.js.map +1 -0
  63. package/dist/forms-legacy-DiKImAli.js +1809 -0
  64. package/dist/forms-legacy-DiKImAli.js.map +1 -0
  65. package/dist/forms-legacy-edWQVbZP.js +1809 -0
  66. package/dist/forms-legacy-edWQVbZP.js.map +1 -0
  67. package/dist/index.css +63 -0
  68. package/dist/index.js +2 -3
  69. package/dist/index.js.map +1 -1
  70. package/dist/plugin.js +184 -128
  71. package/dist/plugin.js.map +1 -1
  72. package/dist/styles/font-faces.css +26 -0
  73. package/dist/styles/theme.css +48 -0
  74. package/dist/styles/typography.css +291 -0
  75. package/package.json +28 -23
  76. package/public/fonts/stix-two-text-italic-variable.woff2 +0 -0
  77. package/public/fonts/stix-two-text-variable.woff2 +0 -0
  78. package/src/index.css +63 -0
  79. package/src/styles/font-faces.css +26 -0
  80. package/src/styles/theme.css +48 -0
  81. package/src/styles/typography.css +291 -0
@@ -82,73 +82,59 @@ declare const table: import("tailwind-variants").TVReturnType<{
82
82
  columnVisibilityIcon: string[];
83
83
  td: string[];
84
84
  empty: string[];
85
- }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
86
- size: {
87
- sm: {
88
- th: string;
89
- td: string;
90
- };
91
- md: {
92
- th: string;
93
- td: string;
94
- };
95
- lg: {
96
- th: string;
97
- td: string;
98
- };
99
- };
100
- isLoading: {
101
- true: {
102
- thead: string[];
103
- };
104
- };
105
- loadingColor: {
106
- default: {};
107
- primary: {};
108
- success: {};
109
- warning: {};
110
- danger: {};
111
- };
112
- selectionColor: {
113
- default: {};
114
- primary: {};
115
- success: {};
116
- warning: {};
117
- danger: {};
118
- };
119
- layout: {
120
- auto: {
121
- table: string;
122
- };
123
- fixed: {
124
- table: string;
85
+ }, undefined, {
86
+ responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
87
+ size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
88
+ isSticky?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
89
+ stickyPosition?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
90
+ hasStickyHeader?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
91
+ isInStickyRow?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
92
+ isLoading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
93
+ loadingColor?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
94
+ selectionColor?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
95
+ layout?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
96
+ striped?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
97
+ isScrollable?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
98
+ } | undefined;
99
+ } & import("tailwind-variants/dist/config.js").TWMConfig & {
100
+ twMerge: true;
101
+ twMergeConfig: {
102
+ readonly extend: {
103
+ readonly classGroups: {
104
+ readonly 'icon-size': readonly [{
105
+ readonly 'size-icon': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
106
+ }];
107
+ readonly 'border-w': readonly [{
108
+ readonly border: readonly ["thin", "heavy", "aggressive"];
109
+ }];
110
+ readonly rounded: readonly [{
111
+ readonly rounded: readonly ["default", "pill"];
112
+ }];
113
+ readonly shadow: readonly [{
114
+ readonly 'shadow-elevation': string[];
115
+ }];
116
+ readonly opacity: readonly [{
117
+ readonly opacity: readonly ["hover", "disabled"];
118
+ }];
119
+ readonly 'font-size': readonly [{
120
+ readonly 'text-marquee': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
121
+ }, {
122
+ readonly 'text-header': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
123
+ }, {
124
+ readonly 'text-body': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
125
+ }, {
126
+ readonly 'text-code': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
127
+ }, {
128
+ readonly 'text-caption': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
129
+ }, {
130
+ readonly 'text-label': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
131
+ }];
132
+ };
133
+ readonly conflictingClassGroups: {
134
+ readonly 'icon-size': readonly ["w", "h", "size"];
135
+ };
125
136
  };
126
137
  };
127
- striped: {
128
- true: {
129
- tbody: string;
130
- };
131
- };
132
- isSticky: {
133
- true: {};
134
- };
135
- stickyPosition: {
136
- left: {};
137
- right: {};
138
- top: {};
139
- bottom: {};
140
- };
141
- isScrollable: {
142
- true: {
143
- wrapper: string[];
144
- };
145
- };
146
- hasStickyHeader: {
147
- true: {};
148
- };
149
- isInStickyRow: {
150
- true: {};
151
- };
152
138
  }, {
153
139
  size: {
154
140
  sm: {
@@ -216,73 +202,6 @@ declare const table: import("tailwind-variants").TVReturnType<{
216
202
  isInStickyRow: {
217
203
  true: {};
218
204
  };
219
- }>, {
220
- size: {
221
- sm: {
222
- th: string;
223
- td: string;
224
- };
225
- md: {
226
- th: string;
227
- td: string;
228
- };
229
- lg: {
230
- th: string;
231
- td: string;
232
- };
233
- };
234
- isLoading: {
235
- true: {
236
- thead: string[];
237
- };
238
- };
239
- loadingColor: {
240
- default: {};
241
- primary: {};
242
- success: {};
243
- warning: {};
244
- danger: {};
245
- };
246
- selectionColor: {
247
- default: {};
248
- primary: {};
249
- success: {};
250
- warning: {};
251
- danger: {};
252
- };
253
- layout: {
254
- auto: {
255
- table: string;
256
- };
257
- fixed: {
258
- table: string;
259
- };
260
- };
261
- striped: {
262
- true: {
263
- tbody: string;
264
- };
265
- };
266
- isSticky: {
267
- true: {};
268
- };
269
- stickyPosition: {
270
- left: {};
271
- right: {};
272
- top: {};
273
- bottom: {};
274
- };
275
- isScrollable: {
276
- true: {
277
- wrapper: string[];
278
- };
279
- };
280
- hasStickyHeader: {
281
- true: {};
282
- };
283
- isInStickyRow: {
284
- true: {};
285
- };
286
205
  }, {
287
206
  base: string[];
288
207
  wrapper: string[];
@@ -1,20 +1,74 @@
1
+ import type { LayoutTheme } from '../types';
1
2
  declare const defaultConfig: {
2
3
  defaultTheme: string;
3
- prefix: string;
4
4
  themes: {
5
5
  light: {
6
- colors: import("../colors").ThemeColors;
7
- layout: {
8
- hoverOpacity: string;
9
- disabledOpacity?: string | number;
6
+ colors: {
7
+ neutral: import("../colors").SemanticColorCategory;
8
+ brand: import("../colors").SemanticColorCategory;
9
+ accent: import("../colors").SemanticColorCategory;
10
+ success: import("../colors").SemanticColorCategory;
11
+ warning: import("../colors").SemanticColorCategory;
12
+ danger: import("../colors").SemanticColorCategory;
13
+ surface: import("../colors").SurfaceColors;
14
+ 'on-neutral'?: import("../colors").OnColorCategory;
15
+ 'on-brand'?: import("../colors").OnColorCategory;
16
+ 'on-accent'?: import("../colors").OnColorCategory;
17
+ 'on-success'?: import("../colors").OnColorCategory;
18
+ 'on-warning'?: import("../colors").OnColorCategory;
19
+ 'on-danger'?: import("../colors").OnColorCategory;
20
+ 'on-surface-solid'?: {
21
+ 0?: string;
22
+ 1?: string;
23
+ 2?: string;
24
+ 3?: string;
25
+ 4?: string;
26
+ 5?: string;
27
+ 6?: string;
28
+ 7?: string;
29
+ 8?: string;
30
+ 9?: string;
31
+ 10?: string;
32
+ 11?: string;
33
+ };
34
+ divider: import("../colors").ColorScale;
35
+ focus: import("../colors").ColorScale;
10
36
  };
37
+ layout: LayoutTheme;
11
38
  };
12
39
  dark: {
13
- colors: import("../colors").ThemeColors;
14
- layout: {
15
- hoverOpacity: string;
16
- disabledOpacity?: string | number;
40
+ colors: {
41
+ neutral: import("../colors").SemanticColorCategory;
42
+ brand: import("../colors").SemanticColorCategory;
43
+ accent: import("../colors").SemanticColorCategory;
44
+ success: import("../colors").SemanticColorCategory;
45
+ warning: import("../colors").SemanticColorCategory;
46
+ danger: import("../colors").SemanticColorCategory;
47
+ surface: import("../colors").SurfaceColors;
48
+ 'on-neutral'?: import("../colors").OnColorCategory;
49
+ 'on-brand'?: import("../colors").OnColorCategory;
50
+ 'on-accent'?: import("../colors").OnColorCategory;
51
+ 'on-success'?: import("../colors").OnColorCategory;
52
+ 'on-warning'?: import("../colors").OnColorCategory;
53
+ 'on-danger'?: import("../colors").OnColorCategory;
54
+ 'on-surface-solid'?: {
55
+ 0?: string;
56
+ 1?: string;
57
+ 2?: string;
58
+ 3?: string;
59
+ 4?: string;
60
+ 5?: string;
61
+ 6?: string;
62
+ 7?: string;
63
+ 8?: string;
64
+ 9?: string;
65
+ 10?: string;
66
+ 11?: string;
67
+ };
68
+ divider: import("../colors").ColorScale;
69
+ focus: import("../colors").ColorScale;
17
70
  };
71
+ layout: LayoutTheme;
18
72
  };
19
73
  };
20
74
  };
@@ -1,8 +1,4 @@
1
1
  import type { PluginAPI } from 'tailwindcss/types/config';
2
- declare function drawerSizes(addComponents: PluginAPI['addComponents'], sizes: {
3
- [key: string]: string;
4
- }, margin: string): void;
5
- declare function modalSizes(addComponents: PluginAPI['addComponents'], sizes: {
6
- [key: string]: string;
7
- }, margin: string): void;
2
+ declare function drawerSizes(addComponents: PluginAPI['addComponents'], margin: string): void;
3
+ declare function modalSizes(addComponents: PluginAPI['addComponents'], margin: string): void;
8
4
  export { modalSizes, drawerSizes };
@@ -1,3 +1,3 @@
1
1
  import type { PluginAPI } from 'tailwindcss/types/config';
2
- declare function registerPowerSelectComponents(addComponents: PluginAPI['addComponents'], prefix: string): void;
2
+ declare function registerPowerSelectComponents(addComponents: PluginAPI['addComponents']): void;
3
3
  export { registerPowerSelectComponents };
@@ -9,11 +9,10 @@ interface ResolvedConfig {
9
9
  base: CSSRuleObject | CSSRuleObject[];
10
10
  colors: Record<string, string>;
11
11
  }
12
- declare function resolveThemes(themes: ConfigThemes | undefined, defaultTheme: DefaultThemeType, prefix: string): ResolvedConfig;
12
+ declare function resolveThemes(themes: ConfigThemes | undefined, defaultTheme: DefaultThemeType): ResolvedConfig;
13
13
  export declare const isBaseTheme: (theme: string) => boolean;
14
14
  declare function resolveConfig(userConfig?: PluginConfig): {
15
15
  themes: ConfigThemes;
16
16
  defaultTheme: DefaultThemeType;
17
- prefix: string;
18
17
  };
19
18
  export { resolveThemes, resolveConfig };
@@ -1,4 +1,43 @@
1
1
  import type { ClassValue } from 'tailwind-variants';
2
- export { tv } from 'tailwind-variants';
3
2
  export type { VariantProps } from 'tailwind-variants';
4
3
  export declare function twMerge(defaultClass: ClassValue, overwrites: ClassValue): string | undefined;
4
+ export declare const tv: import("tailwind-variants").CreateTV<{
5
+ twMerge: true;
6
+ twMergeConfig: {
7
+ readonly extend: {
8
+ readonly classGroups: {
9
+ readonly 'icon-size': readonly [{
10
+ readonly 'size-icon': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
11
+ }];
12
+ readonly 'border-w': readonly [{
13
+ readonly border: readonly ["thin", "heavy", "aggressive"];
14
+ }];
15
+ readonly rounded: readonly [{
16
+ readonly rounded: readonly ["default", "pill"];
17
+ }];
18
+ readonly shadow: readonly [{
19
+ readonly 'shadow-elevation': string[];
20
+ }];
21
+ readonly opacity: readonly [{
22
+ readonly opacity: readonly ["hover", "disabled"];
23
+ }];
24
+ readonly 'font-size': readonly [{
25
+ readonly 'text-marquee': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
26
+ }, {
27
+ readonly 'text-header': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
28
+ }, {
29
+ readonly 'text-body': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
30
+ }, {
31
+ readonly 'text-code': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
32
+ }, {
33
+ readonly 'text-caption': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
34
+ }, {
35
+ readonly 'text-label': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
36
+ }];
37
+ };
38
+ readonly conflictingClassGroups: {
39
+ readonly 'icon-size': readonly ["w", "h", "size"];
40
+ };
41
+ };
42
+ };
43
+ }>;
@@ -1,14 +1,36 @@
1
1
  import type { ThemeColors } from './colors/types';
2
2
  export interface LayoutTheme {
3
3
  /**
4
- * A number between 0 and 1 that is applied as opacity: [value] when the component is hovered.
5
- *
6
- * format: ".[value]"
7
- *
8
- * @default .8
4
+ * Opacity configuration for components.
5
+ * Supports Tailwind's opacity-* naming convention.
9
6
  */
10
- hoverOpacity?: string | number;
11
- disabledOpacity?: string | number;
7
+ opacity?: {
8
+ /**
9
+ * A number between 0 and 1 that is applied as opacity when the component is hovered.
10
+ * @default .8
11
+ */
12
+ hover?: string | number;
13
+ /**
14
+ * A number between 0 and 1 that is applied as opacity when the component is disabled.
15
+ * @default .5
16
+ */
17
+ disabled?: string | number;
18
+ };
19
+ /**
20
+ * Border radius configuration for components.
21
+ * Values can be any valid CSS length unit (px, rem, em, etc.)
22
+ */
23
+ radius?: {
24
+ xs?: string;
25
+ sm?: string;
26
+ md?: string;
27
+ lg?: string;
28
+ DEFAULT?: string;
29
+ xl?: string;
30
+ '2xl'?: string;
31
+ full?: string;
32
+ pill?: string;
33
+ };
12
34
  }
13
35
  export type ConfigTheme = {
14
36
  extend?: 'light' | 'dark';
@@ -18,11 +40,6 @@ export type ConfigTheme = {
18
40
  export type ConfigThemes = Record<string, ConfigTheme>;
19
41
  export type DefaultThemeType = 'light' | 'dark';
20
42
  export type PluginConfig = {
21
- /**
22
- * The prefix for the css variables.
23
- * @default "frontile"
24
- */
25
- prefix?: string;
26
43
  themes?: ConfigThemes;
27
44
  layout?: LayoutTheme;
28
45
  defaultTheme?: DefaultThemeType;
package/dist/colors.js CHANGED
@@ -1,2 +1,2 @@
1
- export { b as blue, g as gray, a as green, r as red, s as semanticColors, y as yellow } from './semantic-DUv6Lpqq.js';
1
+ export { b as blue, g as gray, a as green, o as orange, p as pink, r as red, s as semanticColors, t as teal, v as violet, y as yellow } from './config-Cle59Y4k.js';
2
2
  //# sourceMappingURL=colors.js.map