tfy-web-components 0.0.33 → 0.0.35

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 (226) hide show
  1. package/README.md +49 -58
  2. package/dist/Button-C77b7jpW.js +284 -0
  3. package/dist/Button-C77b7jpW.js.map +1 -0
  4. package/dist/CompositeItem-BGwD51jI.js +33 -0
  5. package/dist/CompositeItem-BGwD51jI.js.map +1 -0
  6. package/dist/CompositeList-D4xmSZ5V.js +291 -0
  7. package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
  8. package/dist/CompositeRoot-BxrPc7F6.js +351 -0
  9. package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
  10. package/dist/DirectionContext-Pb9yafF5.js +11 -0
  11. package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
  12. package/dist/FieldItemContext-DRVgx-D1.js +13 -0
  13. package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
  14. package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
  15. package/dist/Input-Dhmo6L2n.js.map +1 -0
  16. package/dist/Modal-C4MUy9GD.js +696 -0
  17. package/dist/Modal-C4MUy9GD.js.map +1 -0
  18. package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
  19. package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
  20. package/dist/Popover-eC_vX5By.js +1074 -0
  21. package/dist/Popover-eC_vX5By.js.map +1 -0
  22. package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
  23. package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
  24. package/dist/Tooltip-BuGLP-PU.js +4096 -0
  25. package/dist/Tooltip-BuGLP-PU.js.map +1 -0
  26. package/dist/classNames-B1XpQHle.js +44 -0
  27. package/dist/classNames-B1XpQHle.js.map +1 -0
  28. package/dist/components/atoms/Accordion.d.ts +19 -37
  29. package/dist/components/atoms/Accordion.es.js +847 -78
  30. package/dist/components/atoms/Accordion.es.js.map +1 -1
  31. package/dist/components/atoms/AudioPlayer.es.js +9 -9
  32. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  33. package/dist/components/atoms/Avatar.d.ts +42 -9
  34. package/dist/components/atoms/Avatar.es.js +491 -36
  35. package/dist/components/atoms/Avatar.es.js.map +1 -1
  36. package/dist/components/atoms/Badge.d.ts +40 -35
  37. package/dist/components/atoms/Badge.es.js +163 -53
  38. package/dist/components/atoms/Badge.es.js.map +1 -1
  39. package/dist/components/atoms/Button.d.ts +37 -16
  40. package/dist/components/atoms/Button.es.js +16 -221
  41. package/dist/components/atoms/Button.es.js.map +1 -1
  42. package/dist/components/atoms/ButtonGroup.d.ts +53 -0
  43. package/dist/components/atoms/ButtonGroup.es.js +349 -0
  44. package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +23 -9
  46. package/dist/components/atoms/IconButton.es.js +82 -16
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.d.ts +1 -1
  49. package/dist/components/atoms/IconProvider.es.js +48 -7
  50. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  51. package/dist/components/atoms/Modal.d.ts +27 -3
  52. package/dist/components/atoms/Modal.es.js +15 -16
  53. package/dist/components/atoms/Modal.es.js.map +1 -1
  54. package/dist/components/atoms/Notification.d.ts +1 -1
  55. package/dist/components/atoms/Notification.es.js +26 -3
  56. package/dist/components/atoms/Notification.es.js.map +1 -1
  57. package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
  58. package/dist/components/atoms/OutlinedRadio.es.js +12 -25
  59. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  60. package/dist/components/atoms/Progress.d.ts +48 -0
  61. package/dist/components/atoms/Progress.es.js +279 -0
  62. package/dist/components/atoms/Progress.es.js.map +1 -0
  63. package/dist/components/atoms/Skeleton.d.ts +9 -3
  64. package/dist/components/atoms/Skeleton.es.js +33 -3
  65. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  66. package/dist/components/atoms/Spinner.d.ts +15 -4
  67. package/dist/components/atoms/Spinner.es.js +86 -22
  68. package/dist/components/atoms/Spinner.es.js.map +1 -1
  69. package/dist/components/atoms/Switch.d.ts +19 -7
  70. package/dist/components/atoms/Switch.es.js +288 -50
  71. package/dist/components/atoms/Switch.es.js.map +1 -1
  72. package/dist/components/atoms/TabButton.d.ts +17 -3
  73. package/dist/components/atoms/TabButton.es.js +647 -25
  74. package/dist/components/atoms/TabButton.es.js.map +1 -1
  75. package/dist/components/atoms/TabPanel.es.js +1 -1
  76. package/dist/components/atoms/Tag.d.ts +43 -0
  77. package/dist/components/atoms/Tag.es.js +219 -0
  78. package/dist/components/atoms/Tag.es.js.map +1 -0
  79. package/dist/components/atoms/Tooltip.d.ts +36 -14
  80. package/dist/components/atoms/Tooltip.es.js +7 -114
  81. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  82. package/dist/components/molecules/Alert.d.ts +1 -1
  83. package/dist/components/molecules/Alert.es.js +13 -9
  84. package/dist/components/molecules/Alert.es.js.map +1 -1
  85. package/dist/components/molecules/CopyField.d.ts +2 -2
  86. package/dist/components/molecules/CopyField.es.js +3 -4
  87. package/dist/components/molecules/CopyField.es.js.map +1 -1
  88. package/dist/components/molecules/CustomDrawer.d.ts +5 -4
  89. package/dist/components/molecules/CustomDrawer.es.js +141 -82
  90. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  91. package/dist/components/molecules/Dialog.d.ts +16 -8
  92. package/dist/components/molecules/Dialog.es.js +33 -31
  93. package/dist/components/molecules/Dialog.es.js.map +1 -1
  94. package/dist/components/molecules/ImagesPreview.es.js +15 -11
  95. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  96. package/dist/components/molecules/Input.d.ts +1 -1
  97. package/dist/components/molecules/Input.es.js +3 -5
  98. package/dist/components/molecules/Input.es.js.map +1 -1
  99. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
  100. package/dist/components/molecules/Markdown/components.d.ts +12 -11
  101. package/dist/components/molecules/Markdown.es.js +26 -49
  102. package/dist/components/molecules/Markdown.es.js.map +1 -1
  103. package/dist/components/molecules/Notify.d.ts +30 -1
  104. package/dist/components/molecules/Notify.es.js +91 -36
  105. package/dist/components/molecules/Notify.es.js.map +1 -1
  106. package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
  107. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  108. package/dist/components/molecules/ToggleButton.d.ts +3 -2
  109. package/dist/components/molecules/ToggleButton.es.js +155 -57
  110. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  111. package/dist/components/molecules/agent-chat/AgentStepsCard.d.ts +2 -2
  112. package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
  113. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  114. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
  115. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  116. package/dist/components/molecules/agent-chat/index.d.ts +0 -6
  117. package/dist/components/molecules/agent-chat.es.js +78 -410
  118. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  119. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
  120. package/dist/components/theme/colors.d.ts +17 -53
  121. package/dist/components/theme/colors.es.js +384 -180
  122. package/dist/components/theme/colors.es.js.map +1 -1
  123. package/dist/components/theme/theme.d.ts +14 -11
  124. package/dist/components/theme/theme.es.js +3 -64
  125. package/dist/components/theme/theme.es.js.map +1 -1
  126. package/dist/components/theme/useTheme.es.js +1 -4
  127. package/dist/components/theme/useTheme.es.js.map +1 -1
  128. package/dist/composite-CrCQWAKA.js +108 -0
  129. package/dist/composite-CrCQWAKA.js.map +1 -0
  130. package/dist/composite-DCpXNxz9.js +66 -0
  131. package/dist/composite-DCpXNxz9.js.map +1 -0
  132. package/dist/conversions-CbWPvHRE.js +14 -0
  133. package/dist/conversions-CbWPvHRE.js.map +1 -0
  134. package/dist/error-FX4R42W-.js +6 -0
  135. package/dist/error-FX4R42W-.js.map +1 -0
  136. package/dist/fonts.css +7 -0
  137. package/dist/hooks/useContainerDimensions.d.ts +1 -1
  138. package/dist/index-B806bfA-.js +257 -0
  139. package/dist/index-B806bfA-.js.map +1 -0
  140. package/dist/index-DSVg79g-.js +45 -0
  141. package/dist/index-DSVg79g-.js.map +1 -0
  142. package/dist/index.d.ts +19 -4
  143. package/dist/index.es.js +56 -9
  144. package/dist/index.es.js.map +1 -1
  145. package/dist/inertValue-IJM5NA30.js +11 -0
  146. package/dist/inertValue-IJM5NA30.js.map +1 -0
  147. package/dist/lib/utils.d.ts +1 -0
  148. package/dist/markdown.css +13 -14
  149. package/dist/new-components/atoms/Checkbox.d.ts +6 -0
  150. package/dist/new-components/atoms/Checkbox.es.js +423 -0
  151. package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
  152. package/dist/new-components/atoms/Chip.d.ts +38 -0
  153. package/dist/new-components/atoms/Chip.es.js +269 -0
  154. package/dist/new-components/atoms/Chip.es.js.map +1 -0
  155. package/dist/new-components/atoms/Popover.d.ts +87 -0
  156. package/dist/new-components/atoms/Popover.es.js +21 -0
  157. package/dist/new-components/atoms/Popover.es.js.map +1 -0
  158. package/dist/new-components/atoms/Radio.d.ts +14 -0
  159. package/dist/new-components/atoms/Radio.es.js +536 -0
  160. package/dist/new-components/atoms/Radio.es.js.map +1 -0
  161. package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
  162. package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
  163. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
  164. package/dist/new-components/atoms/Slider.d.ts +8 -0
  165. package/dist/new-components/atoms/Slider.es.js +1415 -0
  166. package/dist/new-components/atoms/Slider.es.js.map +1 -0
  167. package/dist/new-components/atoms/Toggletip.d.ts +43 -0
  168. package/dist/new-components/atoms/Toggletip.es.js +216 -0
  169. package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
  170. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
  171. package/dist/shadowDom-Bq4g0Qeu.js +52 -0
  172. package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
  173. package/dist/style.css +1 -1
  174. package/dist/theme.css +9 -154
  175. package/dist/tokens.css +1136 -0
  176. package/dist/useAnimationFrame-DwhymJoW.js +108 -0
  177. package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
  178. package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
  179. package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
  180. package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
  181. package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
  182. package/dist/useButton-PUBhT4Vo.js +235 -0
  183. package/dist/useButton-PUBhT4Vo.js.map +1 -0
  184. package/dist/useControlled-BSyYkg5C.js +65 -0
  185. package/dist/useControlled-BSyYkg5C.js.map +1 -0
  186. package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
  187. package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
  188. package/dist/useLabelableId-DCLzrdD-.js +241 -0
  189. package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
  190. package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
  191. package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
  192. package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
  193. package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
  194. package/dist/useTimeout-BXf1hDIL.js +46 -0
  195. package/dist/useTimeout-BXf1hDIL.js.map +1 -0
  196. package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
  197. package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
  198. package/dist/useValueAsRef-BfFRcMg6.js +28 -0
  199. package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
  200. package/dist/utils/classNames.d.ts +3 -2
  201. package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
  202. package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
  203. package/dist/vite-env.d.ts +18 -0
  204. package/package.json +30 -22
  205. package/dist/Input-BvwIpntS.js.map +0 -1
  206. package/dist/Notification-BT4CZ69U.js +0 -39
  207. package/dist/Notification-BT4CZ69U.js.map +0 -1
  208. package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
  209. package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
  210. package/dist/classNames-Dy-RXSjS.js +0 -9
  211. package/dist/classNames-Dy-RXSjS.js.map +0 -1
  212. package/dist/components/molecules/DropdownMenu.d.ts +0 -18
  213. package/dist/components/molecules/DropdownMenu.es.js +0 -104
  214. package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
  215. package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
  216. package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
  217. package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
  218. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
  219. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
  220. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
  221. package/dist/components/theme/lightColorPlugin.d.ts +0 -1
  222. package/dist/components/theme/lightColorPlugin.es.js +0 -92
  223. package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
  224. package/dist/tailwindPreset.d.ts +0 -144
  225. package/dist/tailwindPreset.es.js +0 -100
  226. package/dist/tailwindPreset.es.js.map +0 -1
@@ -1,144 +0,0 @@
1
- import { tailwindContentPaths } from './components/theme';
2
- /**
3
- * Tailwind v3 preset for consumers of tfy-web-components.
4
- *
5
- * ── For Tailwind v3 apps ─────────────────────────────────────────────
6
- *
7
- * Spread this preset into your own tailwind.config.js so tfy's colour
8
- * palette, custom scrollbar utilities, and `bg-light-*` / `text-light-*`
9
- * utilities are available without manually redefining them:
10
- *
11
- * import tfyPreset, { tailwindContentPaths } from 'tfy-web-components/tailwind-preset'
12
- *
13
- * export default {
14
- * presets: [tfyPreset],
15
- * content: ['./src/​**​/*.{ts,tsx}', ...tailwindContentPaths],
16
- * }
17
- *
18
- * `tailwindContentPaths` points at this package's compiled `dist/`
19
- * directory so Tailwind scans tfy-web-components' own files for
20
- * utility class usage and generates them in the consumer's build.
21
- *
22
- * ── For Tailwind v4 apps ─────────────────────────────────────────────
23
- *
24
- * You do NOT need this preset. Use the generated CSS entry instead:
25
- *
26
- * @ *
27
- * That gives you the same palette via CSS variables + `@theme inline`
28
- * registrations + `@source` scanning — the Tailwind v4 equivalents
29
- * of everything this preset provides.
30
- *
31
- * ── What this preset provides ────────────────────────────────────────
32
- *
33
- * • `colors` — maps every palette key (e.g. `gray.250`, `indigo.500`)
34
- * to `var(--color-gray-250)` / `var(--color-indigo-500)`, so
35
- * utility classes resolve to the CSS variable rather than a
36
- * hard-coded hex value. The actual hex values are set at runtime by
37
- * `ThemeProvider` / `initializeTheme()` or statically by
38
- * `tokens.css`.
39
- *
40
- * • `createLightColorPlugin` — generates `bg-light-*` / `text-light-*`
41
- * utilities that always resolve to the light-mode palette value
42
- * regardless of the current `.dark` state.
43
- *
44
- * • `scrollbar` — custom scrollbar utilities.
45
- *
46
- * • `fontFamily.lab` — the Lab Grotesque font stack used across the
47
- * TrueFoundry platform UI.
48
- */
49
- export declare const tailwindPreset: {
50
- darkMode: string;
51
- theme: {
52
- extend: {
53
- colors: any;
54
- fontFamily: {
55
- lab: string[];
56
- };
57
- fontSize: {
58
- 'base-lg': string;
59
- 'sm-base': string;
60
- '2xs': string;
61
- '3xs': string;
62
- };
63
- screens: {
64
- '2xl': string;
65
- '3xl': string;
66
- '4xl': string;
67
- '5xl': string;
68
- };
69
- borderWidth: {
70
- DEFAULT: string;
71
- 1: string;
72
- };
73
- dropShadow: (theme: (path: string) => string | undefined) => {
74
- xl: string[];
75
- };
76
- backgroundImage: (theme: (path: string) => string | undefined) => {
77
- 'blue-red-gradient': string;
78
- 'white-indigo-gradient': string;
79
- 'chat-template': string;
80
- 'blue-linear-gradient': string;
81
- 'new-deployment-gradient': string;
82
- 'new-deployment-gradient-text': string;
83
- };
84
- backgroundColor: (theme: (path: string) => string | undefined) => {
85
- app: string | undefined;
86
- };
87
- zIndex: {
88
- '-1': string;
89
- };
90
- flexGrow: {
91
- 5: string;
92
- };
93
- height: {
94
- 'screen-50': string;
95
- 'screen-60': string;
96
- 'screen-70': string;
97
- 'screen-75': string;
98
- };
99
- maxHeight: {
100
- 'screen-menu': string;
101
- modal: string;
102
- };
103
- transitionProperty: {
104
- position: string;
105
- textColor: string;
106
- };
107
- keyframes: {
108
- fadeOut: {
109
- from: {
110
- opacity: string;
111
- };
112
- to: {
113
- opacity: string;
114
- };
115
- };
116
- fadeIn: {
117
- from: {
118
- opacity: string;
119
- };
120
- to: {
121
- opacity: string;
122
- };
123
- };
124
- };
125
- animation: {
126
- fadeOut: string;
127
- fadeIn: string;
128
- };
129
- cursor: {
130
- drag: string;
131
- };
132
- };
133
- };
134
- plugins: any[];
135
- };
136
- /**
137
- * Content paths pointing at this package's compiled output. Spread
138
- * these into your Tailwind config's `content` array so the build scans
139
- * tfy-web-components' components for utility class usage:
140
- *
141
- * content: ['./src/​**​/*.{ts,tsx}', ...tailwindContentPaths],
142
- */
143
- export { tailwindContentPaths };
144
- export default tailwindPreset;
@@ -1,100 +0,0 @@
1
- import plugin from "tailwindcss/plugin.js";
2
- import { defaultTheme } from "./components/theme/index.es.js";
3
- import { tailwindContentPaths } from "./components/theme/index.es.js";
4
- import { createLightColorPlugin } from "./components/theme/lightColorPlugin.es.js";
5
- import { colors } from "./components/theme/theme.es.js";
6
- const scrollbar = plugin(function({ addUtilities, matchUtilities, theme }) {
7
- const scrollbarTrackColorValue = (value) => ({
8
- "--scrollbar-track": value,
9
- "&::-webkit-scrollbar-track": {
10
- "background-color": value
11
- }
12
- });
13
- const scrollbarTrackRoundedValue = (value) => ({
14
- "&::-webkit-scrollbar-track": {
15
- "border-radius": value
16
- }
17
- });
18
- const scrollbarThumbColorValue = (value) => ({
19
- "--scrollbar-thumb": value,
20
- "&::-webkit-scrollbar-thumb": {
21
- "background-color": value
22
- }
23
- });
24
- const scrollbarThumbRoundedValue = (value) => ({
25
- "&::-webkit-scrollbar-thumb": {
26
- "border-radius": value
27
- }
28
- });
29
- addUtilities({
30
- ".scrollbar": {
31
- "--scrollbar-thumb": "#cdcdcd",
32
- "--scrollbar-track": "#f0f0f0",
33
- "--scrollbar-width": "17px",
34
- "scrollbar-color": "var(--scrollbar-thumb) var(--scrollbar-track)",
35
- "&::-webkit-scrollbar": {
36
- width: "var(--scrollbar-width)",
37
- height: "var(--scrollbar-width)"
38
- }
39
- },
40
- ".scrollbar-thin": {
41
- "--scrollbar-width": "0.5rem",
42
- "scrollbar-width": "thin"
43
- }
44
- });
45
- Object.entries(theme("colors")).forEach(([colorName, color]) => {
46
- switch (typeof color) {
47
- case "object":
48
- matchUtilities(
49
- {
50
- [`scrollbar-track-${colorName}`]: (value) => scrollbarTrackColorValue(value),
51
- [`scrollbar-thumb-${colorName}`]: (value) => scrollbarThumbColorValue(value)
52
- },
53
- {
54
- values: color
55
- }
56
- );
57
- break;
58
- case "function":
59
- addUtilities({
60
- [`.scrollbar-track-${colorName}`]: scrollbarTrackColorValue(color({})),
61
- [`.scrollbar-thumb-${colorName}`]: scrollbarThumbColorValue(color({}))
62
- });
63
- break;
64
- case "string":
65
- addUtilities({
66
- [`.scrollbar-track-${colorName}`]: scrollbarTrackColorValue(color),
67
- [`.scrollbar-thumb-${colorName}`]: scrollbarThumbColorValue(color)
68
- });
69
- break;
70
- }
71
- });
72
- matchUtilities(
73
- {
74
- "scrollbar-track-rounded": (value) => scrollbarTrackRoundedValue(value),
75
- "scrollbar-thumb-rounded": (value) => scrollbarThumbRoundedValue(value)
76
- },
77
- {
78
- values: theme("borderRadius")
79
- }
80
- );
81
- });
82
- const tailwindPreset = {
83
- darkMode: "class",
84
- theme: {
85
- extend: {
86
- ...defaultTheme,
87
- colors,
88
- fontFamily: {
89
- lab: ["Lab Grotesque", "system-ui", "sans-serif"]
90
- }
91
- }
92
- },
93
- plugins: [createLightColorPlugin(plugin), scrollbar]
94
- };
95
- export {
96
- tailwindPreset as default,
97
- tailwindContentPaths,
98
- tailwindPreset
99
- };
100
- //# sourceMappingURL=tailwindPreset.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tailwindPreset.es.js","sources":["../src/components/theme/tailwindScrollbar.js","../src/tailwindPreset.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin.js'\n\nexport default plugin(function ({ addUtilities, matchUtilities, theme }) {\n const scrollbarTrackColorValue = (value) => ({\n '--scrollbar-track': value,\n '&::-webkit-scrollbar-track': {\n 'background-color': value,\n },\n })\n\n const scrollbarTrackRoundedValue = (value) => ({\n '&::-webkit-scrollbar-track': {\n 'border-radius': value,\n },\n })\n\n const scrollbarThumbColorValue = (value) => ({\n '--scrollbar-thumb': value,\n '&::-webkit-scrollbar-thumb': {\n 'background-color': value,\n },\n })\n\n const scrollbarThumbRoundedValue = (value) => ({\n '&::-webkit-scrollbar-thumb': {\n 'border-radius': value,\n },\n })\n\n addUtilities({\n '.scrollbar': {\n '--scrollbar-thumb': '#cdcdcd',\n '--scrollbar-track': '#f0f0f0',\n '--scrollbar-width': '17px',\n 'scrollbar-color': 'var(--scrollbar-thumb) var(--scrollbar-track)',\n '&::-webkit-scrollbar': {\n width: 'var(--scrollbar-width)',\n height: 'var(--scrollbar-width)',\n },\n },\n '.scrollbar-thin': {\n '--scrollbar-width': '0.5rem',\n 'scrollbar-width': 'thin',\n },\n })\n\n Object.entries(theme('colors')).forEach(([colorName, color]) => {\n switch (typeof color) {\n case 'object':\n matchUtilities(\n {\n [`scrollbar-track-${colorName}`]: (value) => scrollbarTrackColorValue(value),\n [`scrollbar-thumb-${colorName}`]: (value) => scrollbarThumbColorValue(value),\n },\n {\n values: color,\n },\n )\n break\n case 'function':\n addUtilities({\n [`.scrollbar-track-${colorName}`]: scrollbarTrackColorValue(color({})),\n [`.scrollbar-thumb-${colorName}`]: scrollbarThumbColorValue(color({})),\n })\n break\n case 'string':\n addUtilities({\n [`.scrollbar-track-${colorName}`]: scrollbarTrackColorValue(color),\n [`.scrollbar-thumb-${colorName}`]: scrollbarThumbColorValue(color),\n })\n break\n }\n })\n\n matchUtilities(\n {\n 'scrollbar-track-rounded': (value) => scrollbarTrackRoundedValue(value),\n 'scrollbar-thumb-rounded': (value) => scrollbarThumbRoundedValue(value),\n },\n {\n values: theme('borderRadius'),\n },\n )\n})\n","import plugin from 'tailwindcss/plugin.js'\n\nimport { defaultTheme, tailwindContentPaths } from './components/theme'\nimport { createLightColorPlugin } from './components/theme/lightColorPlugin'\n// @ts-ignore -- plain JS module, no declaration file (see tsconfig `allowJs: false`)\nimport scrollbar from './components/theme/tailwindScrollbar.js'\nimport { colors } from './components/theme/theme'\n\n/**\n * Tailwind v3 preset for consumers of tfy-web-components.\n *\n * ── For Tailwind v3 apps ─────────────────────────────────────────────\n *\n * Spread this preset into your own tailwind.config.js so tfy's colour\n * palette, custom scrollbar utilities, and `bg-light-*` / `text-light-*`\n * utilities are available without manually redefining them:\n *\n * import tfyPreset, { tailwindContentPaths } from 'tfy-web-components/tailwind-preset'\n *\n * export default {\n * presets: [tfyPreset],\n * content: ['./src/​**​/*.{ts,tsx}', ...tailwindContentPaths],\n * }\n *\n * `tailwindContentPaths` points at this package's compiled `dist/`\n * directory so Tailwind scans tfy-web-components' own files for\n * utility class usage and generates them in the consumer's build.\n *\n * ── For Tailwind v4 apps ─────────────────────────────────────────────\n *\n * You do NOT need this preset. Use the generated CSS entry instead:\n *\n * @import \"tfy-web-components/theme.css\";\n *\n * That gives you the same palette via CSS variables + `@theme inline`\n * registrations + `@source` scanning — the Tailwind v4 equivalents\n * of everything this preset provides.\n *\n * ── What this preset provides ────────────────────────────────────────\n *\n * • `colors` — maps every palette key (e.g. `gray.250`, `indigo.500`)\n * to `var(--color-gray-250)` / `var(--color-indigo-500)`, so\n * utility classes resolve to the CSS variable rather than a\n * hard-coded hex value. The actual hex values are set at runtime by\n * `ThemeProvider` / `initializeTheme()` or statically by\n * `tokens.css`.\n *\n * • `createLightColorPlugin` — generates `bg-light-*` / `text-light-*`\n * utilities that always resolve to the light-mode palette value\n * regardless of the current `.dark` state.\n *\n * • `scrollbar` — custom scrollbar utilities.\n *\n * • `fontFamily.lab` — the Lab Grotesque font stack used across the\n * TrueFoundry platform UI.\n */\nexport const tailwindPreset = {\n darkMode: 'class',\n theme: {\n extend: {\n ...defaultTheme,\n colors,\n fontFamily: {\n lab: ['Lab Grotesque', 'system-ui', 'sans-serif'],\n },\n },\n },\n plugins: [createLightColorPlugin(plugin), scrollbar],\n}\n\n/**\n * Content paths pointing at this package's compiled output. Spread\n * these into your Tailwind config's `content` array so the build scans\n * tfy-web-components' components for utility class usage:\n *\n * content: ['./src/​**​/*.{ts,tsx}', ...tailwindContentPaths],\n */\nexport { tailwindContentPaths }\n\nexport default tailwindPreset\n"],"names":[],"mappings":";;;;;AAEA,MAAA,YAAe,OAAO,SAAU,EAAE,cAAc,gBAAgB,MAAK,GAAI;AACvE,QAAM,2BAA2B,CAAC,WAAW;AAAA,IAC3C,qBAAqB;AAAA,IACrB,8BAA8B;AAAA,MAC5B,oBAAoB;AAAA,IAC1B;AAAA,EACA;AAEE,QAAM,6BAA6B,CAAC,WAAW;AAAA,IAC7C,8BAA8B;AAAA,MAC5B,iBAAiB;AAAA,IACvB;AAAA,EACA;AAEE,QAAM,2BAA2B,CAAC,WAAW;AAAA,IAC3C,qBAAqB;AAAA,IACrB,8BAA8B;AAAA,MAC5B,oBAAoB;AAAA,IAC1B;AAAA,EACA;AAEE,QAAM,6BAA6B,CAAC,WAAW;AAAA,IAC7C,8BAA8B;AAAA,MAC5B,iBAAiB;AAAA,IACvB;AAAA,EACA;AAEE,eAAa;AAAA,IACX,cAAc;AAAA,MACZ,qBAAqB;AAAA,MACrB,qBAAqB;AAAA,MACrB,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,MACnB,wBAAwB;AAAA,QACtB,OAAO;AAAA,QACP,QAAQ;AAAA,MAChB;AAAA,IACA;AAAA,IACI,mBAAmB;AAAA,MACjB,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,IACzB;AAAA,EACA,CAAG;AAED,SAAO,QAAQ,MAAM,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,WAAW,KAAK,MAAM;AAC9D,YAAQ,OAAO,OAAK;AAAA,MAClB,KAAK;AACH;AAAA,UACE;AAAA,YACE,CAAC,mBAAmB,SAAS,EAAE,GAAG,CAAC,UAAU,yBAAyB,KAAK;AAAA,YAC3E,CAAC,mBAAmB,SAAS,EAAE,GAAG,CAAC,UAAU,yBAAyB,KAAK;AAAA,UACvF;AAAA,UACU;AAAA,YACE,QAAQ;AAAA,UACpB;AAAA,QACA;AACQ;AAAA,MACF,KAAK;AACH,qBAAa;AAAA,UACX,CAAC,oBAAoB,SAAS,EAAE,GAAG,yBAAyB,MAAM,CAAA,CAAE,CAAC;AAAA,UACrE,CAAC,oBAAoB,SAAS,EAAE,GAAG,yBAAyB,MAAM,CAAA,CAAE,CAAC;AAAA,QAC/E,CAAS;AACD;AAAA,MACF,KAAK;AACH,qBAAa;AAAA,UACX,CAAC,oBAAoB,SAAS,EAAE,GAAG,yBAAyB,KAAK;AAAA,UACjE,CAAC,oBAAoB,SAAS,EAAE,GAAG,yBAAyB,KAAK;AAAA,QAC3E,CAAS;AACD;AAAA,IACR;AAAA,EACE,CAAC;AAED;AAAA,IACE;AAAA,MACE,2BAA2B,CAAC,UAAU,2BAA2B,KAAK;AAAA,MACtE,2BAA2B,CAAC,UAAU,2BAA2B,KAAK;AAAA,IAC5E;AAAA,IACI;AAAA,MACE,QAAQ,MAAM,cAAc;AAAA,IAClC;AAAA,EACA;AACA,CAAC;AC3BM,MAAM,iBAAiB;AAAA,EAC5B,UAAU;AAAA,EACV,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,GAAG;AAAA,MACH;AAAA,MACA,YAAY;AAAA,QACV,KAAK,CAAC,iBAAiB,aAAa,YAAY;AAAA,MAAA;AAAA,IAClD;AAAA,EACF;AAAA,EAEF,SAAS,CAAC,uBAAuB,MAAM,GAAG,SAAS;AACrD;"}