@frontile/theme 0.18.0-beta.2 → 0.18.0-beta.3

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 (108) hide show
  1. package/declarations/colors/config.d.ts +1 -0
  2. package/declarations/colors/config.d.ts.map +1 -0
  3. package/declarations/colors/palette-absolute.d.ts +1 -0
  4. package/declarations/colors/palette-absolute.d.ts.map +1 -0
  5. package/declarations/colors/palette.d.ts +1 -0
  6. package/declarations/colors/palette.d.ts.map +1 -0
  7. package/declarations/colors/semantic.d.ts +1 -0
  8. package/declarations/colors/semantic.d.ts.map +1 -0
  9. package/declarations/colors/types.d.ts +1 -0
  10. package/declarations/colors/types.d.ts.map +1 -0
  11. package/declarations/colors/util.d.ts +1 -0
  12. package/declarations/colors/util.d.ts.map +1 -0
  13. package/declarations/colors.d.ts +1 -0
  14. package/declarations/colors.d.ts.map +1 -0
  15. package/declarations/components/accordion.d.ts +3 -137
  16. package/declarations/components/accordion.d.ts.map +1 -0
  17. package/declarations/components/alert.d.ts +3 -137
  18. package/declarations/components/alert.d.ts.map +1 -0
  19. package/declarations/components/avatar.d.ts +9 -98
  20. package/declarations/components/avatar.d.ts.map +1 -0
  21. package/declarations/components/button.d.ts +128 -503
  22. package/declarations/components/button.d.ts.map +1 -0
  23. package/declarations/components/calendar.d.ts +3 -151
  24. package/declarations/components/calendar.d.ts.map +1 -0
  25. package/declarations/components/chip.d.ts +27 -205
  26. package/declarations/components/chip.d.ts.map +1 -0
  27. package/declarations/components/close-button.d.ts +3 -100
  28. package/declarations/components/close-button.d.ts.map +1 -0
  29. package/declarations/components/command.d.ts +5 -146
  30. package/declarations/components/command.d.ts.map +1 -0
  31. package/declarations/components/divider.d.ts +19 -61
  32. package/declarations/components/divider.d.ts.map +1 -0
  33. package/declarations/components/dropdown.d.ts +2 -44
  34. package/declarations/components/dropdown.d.ts.map +1 -0
  35. package/declarations/components/external-link.d.ts +3 -88
  36. package/declarations/components/external-link.d.ts.map +1 -0
  37. package/declarations/components/forms/forms-legacy.d.ts +61 -704
  38. package/declarations/components/forms/forms-legacy.d.ts.map +1 -0
  39. package/declarations/components/forms/forms.d.ts +164 -2201
  40. package/declarations/components/forms/forms.d.ts.map +1 -0
  41. package/declarations/components/forms/index.d.ts +1 -0
  42. package/declarations/components/forms/index.d.ts.map +1 -0
  43. package/declarations/components/index.d.ts +1 -0
  44. package/declarations/components/index.d.ts.map +1 -0
  45. package/declarations/components/kbd.d.ts +3 -150
  46. package/declarations/components/kbd.d.ts.map +1 -0
  47. package/declarations/components/listbox.d.ts +30 -278
  48. package/declarations/components/listbox.d.ts.map +1 -0
  49. package/declarations/components/notification-card.d.ts +3 -130
  50. package/declarations/components/notification-card.d.ts.map +1 -0
  51. package/declarations/components/notifications-container.d.ts +3 -89
  52. package/declarations/components/notifications-container.d.ts.map +1 -0
  53. package/declarations/components/overlays.d.ts +82 -454
  54. package/declarations/components/overlays.d.ts.map +1 -0
  55. package/declarations/components/pagination.d.ts +3 -161
  56. package/declarations/components/pagination.d.ts.map +1 -0
  57. package/declarations/components/popover.d.ts +21 -83
  58. package/declarations/components/popover.d.ts.map +1 -0
  59. package/declarations/components/progress-bar.d.ts +15 -180
  60. package/declarations/components/progress-bar.d.ts.map +1 -0
  61. package/declarations/components/segmented-control.d.ts +3 -211
  62. package/declarations/components/segmented-control.d.ts.map +1 -0
  63. package/declarations/components/shared.d.ts +1 -0
  64. package/declarations/components/shared.d.ts.map +1 -0
  65. package/declarations/components/skeleton.d.ts +33 -119
  66. package/declarations/components/skeleton.d.ts.map +1 -0
  67. package/declarations/components/spinner.d.ts +41 -120
  68. package/declarations/components/spinner.d.ts.map +1 -0
  69. package/declarations/components/table.d.ts +3 -191
  70. package/declarations/components/table.d.ts.map +1 -0
  71. package/declarations/components/tabs.d.ts +3 -208
  72. package/declarations/components/tabs.d.ts.map +1 -0
  73. package/declarations/components/tooltip.d.ts +3 -132
  74. package/declarations/components/tooltip.d.ts.map +1 -0
  75. package/declarations/index.d.ts +1 -0
  76. package/declarations/index.d.ts.map +1 -0
  77. package/declarations/plugin/default-config.d.ts +1 -0
  78. package/declarations/plugin/default-config.d.ts.map +1 -0
  79. package/declarations/plugin/default.d.ts +2 -4
  80. package/declarations/plugin/default.d.ts.map +1 -0
  81. package/declarations/plugin/overlays.d.ts +2 -1
  82. package/declarations/plugin/overlays.d.ts.map +1 -0
  83. package/declarations/plugin/power-select.d.ts +2 -1
  84. package/declarations/plugin/power-select.d.ts.map +1 -0
  85. package/declarations/plugin/resolve.d.ts +4 -3
  86. package/declarations/plugin/resolve.d.ts.map +1 -0
  87. package/declarations/plugin/safelist.d.ts +1 -0
  88. package/declarations/plugin/safelist.d.ts.map +1 -0
  89. package/declarations/plugin/transitions.d.ts +2 -1
  90. package/declarations/plugin/transitions.d.ts.map +1 -0
  91. package/declarations/plugin/types.d.ts +11 -0
  92. package/declarations/plugin/types.d.ts.map +1 -0
  93. package/declarations/plugin.d.ts +1 -0
  94. package/declarations/plugin.d.ts.map +1 -0
  95. package/declarations/tw.d.ts +2 -42
  96. package/declarations/tw.d.ts.map +1 -0
  97. package/declarations/types.d.ts +1 -0
  98. package/declarations/types.d.ts.map +1 -0
  99. package/dist/index.js +39 -2
  100. package/dist/index.js.map +1 -1
  101. package/dist/overlays-DD7muPLd.js.map +1 -1
  102. package/dist/plugin/default.js.map +1 -1
  103. package/dist/plugin.js +18 -4
  104. package/dist/plugin.js.map +1 -1
  105. package/dist/util-Dp_dlOPq.js.map +1 -1
  106. package/package.json +17 -19
  107. package/dist/template-registry.js +0 -2
  108. package/dist/template-registry.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import type { ConfigThemes, DefaultThemeType, PluginConfig } from '../types';
2
- import type { CSSRuleObject } from 'tailwindcss/types/config';
2
+ import type { CSSRuleObject } from './types';
3
3
  interface ResolvedConfig {
4
4
  variants: {
5
5
  name: string;
6
6
  definition: string[];
7
7
  }[];
8
- utilities: CSSRuleObject | CSSRuleObject[];
9
- base: CSSRuleObject | CSSRuleObject[];
8
+ utilities: Record<string, CSSRuleObject>;
9
+ base: CSSRuleObject;
10
10
  colors: Record<string, string>;
11
11
  }
12
12
  declare function resolveThemes(themes: ConfigThemes | undefined, defaultTheme: DefaultThemeType): ResolvedConfig;
@@ -16,3 +16,4 @@ declare function resolveConfig(userConfig?: PluginConfig): {
16
16
  defaultTheme: DefaultThemeType;
17
17
  };
18
18
  export { resolveThemes, resolveConfig };
19
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/plugin/resolve.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EAEb,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C,UAAU,cAAc;IACtB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAKnD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAyED,iBAAS,aAAa,CACpB,MAAM,EAAE,YAAY,YAAK,EACzB,YAAY,EAAE,gBAAgB,GAC7B,cAAc,CAgIhB;AA2BD,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,OACL,CAAC;AAExC,iBAAS,aAAa,CAAC,UAAU,GAAE,YAAiB,GAAG;IACrD,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,gBAAgB,CAAC;CAChC,CAiCA;AAED,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare const safelist: string[];
2
+ //# sourceMappingURL=safelist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safelist.d.ts","sourceRoot":"","sources":["../../src/plugin/safelist.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,UA+FpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CSSRuleObject, PluginAPI } from 'tailwindcss/types/config';
1
+ import type { CSSRuleObject, PluginAPI } from './types';
2
2
  type Transition = {
3
3
  enter: CSSRuleObject;
4
4
  leave: CSSRuleObject;
@@ -11,3 +11,4 @@ declare function addTransitions(addComponents: PluginAPI['addComponents'], baseS
11
11
  [key: string]: Transition;
12
12
  }): void;
13
13
  export { addTransitions };
14
+ //# sourceMappingURL=transitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/plugin/transitions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAExD,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC;AAEF,iBAAS,cAAc,CACrB,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,EACzC,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,GAC1C,IAAI,CAkCN;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type { PluginAPI } from 'tailwindcss/plugin';
2
+ /**
3
+ * Tailwind v4 no longer exports this shape (the v3 `CSSRuleObject` name is
4
+ * gone; internally it's an unexported `CssInJs`), but `addComponents`/
5
+ * `addUtilities` still take it. Kept as our own name since every plugin/*
6
+ * file in this package already references it.
7
+ */
8
+ export type CSSRuleObject = {
9
+ [key: string]: string | string[] | CSSRuleObject | CSSRuleObject[];
10
+ };
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,aAAa,GAAG,aAAa,EAAE,CAAC;CACpE,CAAC"}
@@ -4,3 +4,4 @@ export { swapColorValues } from './colors/util';
4
4
  export { safelist } from './plugin/safelist';
5
5
  declare function frontile(config?: PluginConfig): ReturnType<typeof plugin>;
6
6
  export { frontile };
7
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAQxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,iBAAS,QAAQ,CAAC,MAAM,GAAE,YAAiB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CA2DtE;AAeD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,45 +1,5 @@
1
1
  import type { ClassValue } from 'tailwind-variants';
2
2
  export type { VariantProps } from 'tailwind-variants';
3
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", "5xs", "4xs", "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", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
26
- }, {
27
- readonly 'text-header': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
28
- }, {
29
- readonly 'text-body': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
30
- }, {
31
- readonly 'text-strong': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
32
- }, {
33
- readonly 'text-code': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
34
- }, {
35
- readonly 'text-caption': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
36
- }, {
37
- readonly 'text-label': readonly ["pico", "nano", "micro", "5xs", "4xs", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
38
- }];
39
- };
40
- readonly conflictingClassGroups: {
41
- readonly 'icon-size': readonly ["w", "h", "size"];
42
- };
43
- };
44
- };
45
- }>;
4
+ export declare const tv: import("tailwind-variants").TV;
5
+ //# sourceMappingURL=tw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tw.d.ts","sourceRoot":"","sources":["../src/tw.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAsFtD,wBAAgB,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,sBAKvE;AAED,eAAO,MAAM,EAAE,gCAGb,CAAC"}
@@ -61,3 +61,4 @@ export type PluginConfig = {
61
61
  layout?: LayoutTheme;
62
62
  defaultTheme?: DefaultThemeType;
63
63
  };
64
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC5B,CAAC;IAEF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE;QACP,uEAAuE;QACvE,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC"}
package/dist/index.js CHANGED
@@ -1603,15 +1603,52 @@ const popover = tv({
1603
1603
  });
1604
1604
 
1605
1605
  const divider = tv({
1606
- base: 'shrink-0 bg-neutral-subtle border-none',
1606
+ // `divider` is the purpose-built token for rules, and unlike the solid
1607
+ // `neutral-*` fills it is translucent — 15% ink over whatever sits behind it
1608
+ // (near-black in light, white in dark). That is what makes one divider work on
1609
+ // a page, a card and a tinted panel alike: it darkens or lightens its own
1610
+ // background rather than trying to match a fixed surface colour. `bg-neutral-subtle`
1611
+ // was the wrong choice here — it resolves to near-white in light and near-black
1612
+ // in dark, so it vanished on exactly the surfaces a divider is drawn on.
1613
+ base: 'shrink-0 bg-divider border-none',
1607
1614
  variants: {
1608
1615
  orientation: {
1609
1616
  horizontal: 'w-full h-px',
1610
1617
  vertical: 'h-full w-px'
1618
+ },
1619
+ variant: {
1620
+ solid: '',
1621
+ // Intentionally empty. The sketch treatment is attached by the compound
1622
+ // variant below, so it can only ever apply to a horizontal divider —
1623
+ // see the comment there.
1624
+ sketch: ''
1611
1625
  }
1612
1626
  },
1627
+ compoundVariants: [
1628
+ // Horizontal only, deliberately. The artwork is a near-horizontal ribbon;
1629
+ // squashed into a 1px-wide column by `mask-size: 100% 100%` it renders as a
1630
+ // stub covering roughly the top 45% of the height, not a rule. Scoping it
1631
+ // here means `orientation="vertical" variant="sketch"` silently falls back
1632
+ // to an ordinary vertical line.
1633
+ //
1634
+ // `h-1` (4px) is the artwork's native height, and the rule is deliberately
1635
+ // subtle at that size. The mask is sized `100% 100%`, so the wobble
1636
+ // amplitude scales with the element's height -- a taller divider reads as
1637
+ // more obviously hand-drawn, but overstates a line the design intends to be
1638
+ // quiet. Raise this only with design's agreement.
1639
+ //
1640
+ // The height lives here rather than in the variant so it beats `h-px`
1641
+ // deterministically: tv() applies compound variants after variants, so
1642
+ // this does not depend on tailwind-merge resolving the conflict by
1643
+ // declaration order.
1644
+ {
1645
+ orientation: 'horizontal',
1646
+ variant: 'sketch',
1647
+ class: 'h-1 divider-sketch'
1648
+ }],
1613
1649
  defaultVariants: {
1614
- orientation: 'horizontal'
1650
+ orientation: 'horizontal',
1651
+ variant: 'solid'
1615
1652
  }
1616
1653
  });
1617
1654