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.
- package/README.md +49 -58
- package/dist/Button-C77b7jpW.js +284 -0
- package/dist/Button-C77b7jpW.js.map +1 -0
- package/dist/CompositeItem-BGwD51jI.js +33 -0
- package/dist/CompositeItem-BGwD51jI.js.map +1 -0
- package/dist/CompositeList-D4xmSZ5V.js +291 -0
- package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
- package/dist/CompositeRoot-BxrPc7F6.js +351 -0
- package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
- package/dist/DirectionContext-Pb9yafF5.js +11 -0
- package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
- package/dist/FieldItemContext-DRVgx-D1.js +13 -0
- package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
- package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
- package/dist/Input-Dhmo6L2n.js.map +1 -0
- package/dist/Modal-C4MUy9GD.js +696 -0
- package/dist/Modal-C4MUy9GD.js.map +1 -0
- package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
- package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
- package/dist/Popover-eC_vX5By.js +1074 -0
- package/dist/Popover-eC_vX5By.js.map +1 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
- package/dist/Tooltip-BuGLP-PU.js +4096 -0
- package/dist/Tooltip-BuGLP-PU.js.map +1 -0
- package/dist/classNames-B1XpQHle.js +44 -0
- package/dist/classNames-B1XpQHle.js.map +1 -0
- package/dist/components/atoms/Accordion.d.ts +19 -37
- package/dist/components/atoms/Accordion.es.js +847 -78
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/AudioPlayer.es.js +9 -9
- package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
- package/dist/components/atoms/Avatar.d.ts +42 -9
- package/dist/components/atoms/Avatar.es.js +491 -36
- package/dist/components/atoms/Avatar.es.js.map +1 -1
- package/dist/components/atoms/Badge.d.ts +40 -35
- package/dist/components/atoms/Badge.es.js +163 -53
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +37 -16
- package/dist/components/atoms/Button.es.js +16 -221
- package/dist/components/atoms/Button.es.js.map +1 -1
- package/dist/components/atoms/ButtonGroup.d.ts +53 -0
- package/dist/components/atoms/ButtonGroup.es.js +349 -0
- package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
- package/dist/components/atoms/IconButton.d.ts +23 -9
- package/dist/components/atoms/IconButton.es.js +82 -16
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.d.ts +1 -1
- package/dist/components/atoms/IconProvider.es.js +48 -7
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Modal.d.ts +27 -3
- package/dist/components/atoms/Modal.es.js +15 -16
- package/dist/components/atoms/Modal.es.js.map +1 -1
- package/dist/components/atoms/Notification.d.ts +1 -1
- package/dist/components/atoms/Notification.es.js +26 -3
- package/dist/components/atoms/Notification.es.js.map +1 -1
- package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
- package/dist/components/atoms/OutlinedRadio.es.js +12 -25
- package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
- package/dist/components/atoms/Progress.d.ts +48 -0
- package/dist/components/atoms/Progress.es.js +279 -0
- package/dist/components/atoms/Progress.es.js.map +1 -0
- package/dist/components/atoms/Skeleton.d.ts +9 -3
- package/dist/components/atoms/Skeleton.es.js +33 -3
- package/dist/components/atoms/Skeleton.es.js.map +1 -1
- package/dist/components/atoms/Spinner.d.ts +15 -4
- package/dist/components/atoms/Spinner.es.js +86 -22
- package/dist/components/atoms/Spinner.es.js.map +1 -1
- package/dist/components/atoms/Switch.d.ts +19 -7
- package/dist/components/atoms/Switch.es.js +288 -50
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.d.ts +17 -3
- package/dist/components/atoms/TabButton.es.js +647 -25
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/TabPanel.es.js +1 -1
- package/dist/components/atoms/Tag.d.ts +43 -0
- package/dist/components/atoms/Tag.es.js +219 -0
- package/dist/components/atoms/Tag.es.js.map +1 -0
- package/dist/components/atoms/Tooltip.d.ts +36 -14
- package/dist/components/atoms/Tooltip.es.js +7 -114
- package/dist/components/atoms/Tooltip.es.js.map +1 -1
- package/dist/components/molecules/Alert.d.ts +1 -1
- package/dist/components/molecules/Alert.es.js +13 -9
- package/dist/components/molecules/Alert.es.js.map +1 -1
- package/dist/components/molecules/CopyField.d.ts +2 -2
- package/dist/components/molecules/CopyField.es.js +3 -4
- package/dist/components/molecules/CopyField.es.js.map +1 -1
- package/dist/components/molecules/CustomDrawer.d.ts +5 -4
- package/dist/components/molecules/CustomDrawer.es.js +141 -82
- package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
- package/dist/components/molecules/Dialog.d.ts +16 -8
- package/dist/components/molecules/Dialog.es.js +33 -31
- package/dist/components/molecules/Dialog.es.js.map +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +15 -11
- package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
- package/dist/components/molecules/Input.d.ts +1 -1
- package/dist/components/molecules/Input.es.js +3 -5
- package/dist/components/molecules/Input.es.js.map +1 -1
- package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
- package/dist/components/molecules/Markdown/components.d.ts +12 -11
- package/dist/components/molecules/Markdown.es.js +26 -49
- package/dist/components/molecules/Markdown.es.js.map +1 -1
- package/dist/components/molecules/Notify.d.ts +30 -1
- package/dist/components/molecules/Notify.es.js +91 -36
- package/dist/components/molecules/Notify.es.js.map +1 -1
- package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
- package/dist/components/molecules/ToggleButton.d.ts +3 -2
- package/dist/components/molecules/ToggleButton.es.js +155 -57
- package/dist/components/molecules/ToggleButton.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/AgentStepsCard.d.ts +2 -2
- package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
- package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/index.d.ts +0 -6
- package/dist/components/molecules/agent-chat.es.js +78 -410
- package/dist/components/molecules/agent-chat.es.js.map +1 -1
- package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
- package/dist/components/theme/colors.d.ts +17 -53
- package/dist/components/theme/colors.es.js +384 -180
- package/dist/components/theme/colors.es.js.map +1 -1
- package/dist/components/theme/theme.d.ts +14 -11
- package/dist/components/theme/theme.es.js +3 -64
- package/dist/components/theme/theme.es.js.map +1 -1
- package/dist/components/theme/useTheme.es.js +1 -4
- package/dist/components/theme/useTheme.es.js.map +1 -1
- package/dist/composite-CrCQWAKA.js +108 -0
- package/dist/composite-CrCQWAKA.js.map +1 -0
- package/dist/composite-DCpXNxz9.js +66 -0
- package/dist/composite-DCpXNxz9.js.map +1 -0
- package/dist/conversions-CbWPvHRE.js +14 -0
- package/dist/conversions-CbWPvHRE.js.map +1 -0
- package/dist/error-FX4R42W-.js +6 -0
- package/dist/error-FX4R42W-.js.map +1 -0
- package/dist/fonts.css +7 -0
- package/dist/hooks/useContainerDimensions.d.ts +1 -1
- package/dist/index-B806bfA-.js +257 -0
- package/dist/index-B806bfA-.js.map +1 -0
- package/dist/index-DSVg79g-.js +45 -0
- package/dist/index-DSVg79g-.js.map +1 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.es.js +56 -9
- package/dist/index.es.js.map +1 -1
- package/dist/inertValue-IJM5NA30.js +11 -0
- package/dist/inertValue-IJM5NA30.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/markdown.css +13 -14
- package/dist/new-components/atoms/Checkbox.d.ts +6 -0
- package/dist/new-components/atoms/Checkbox.es.js +423 -0
- package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
- package/dist/new-components/atoms/Chip.d.ts +38 -0
- package/dist/new-components/atoms/Chip.es.js +269 -0
- package/dist/new-components/atoms/Chip.es.js.map +1 -0
- package/dist/new-components/atoms/Popover.d.ts +87 -0
- package/dist/new-components/atoms/Popover.es.js +21 -0
- package/dist/new-components/atoms/Popover.es.js.map +1 -0
- package/dist/new-components/atoms/Radio.d.ts +14 -0
- package/dist/new-components/atoms/Radio.es.js +536 -0
- package/dist/new-components/atoms/Radio.es.js.map +1 -0
- package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
- package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
- package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
- package/dist/new-components/atoms/Slider.d.ts +8 -0
- package/dist/new-components/atoms/Slider.es.js +1415 -0
- package/dist/new-components/atoms/Slider.es.js.map +1 -0
- package/dist/new-components/atoms/Toggletip.d.ts +43 -0
- package/dist/new-components/atoms/Toggletip.es.js +216 -0
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
- package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
- package/dist/shadowDom-Bq4g0Qeu.js +52 -0
- package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme.css +9 -154
- package/dist/tokens.css +1136 -0
- package/dist/useAnimationFrame-DwhymJoW.js +108 -0
- package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
- package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
- package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
- package/dist/useButton-PUBhT4Vo.js +235 -0
- package/dist/useButton-PUBhT4Vo.js.map +1 -0
- package/dist/useControlled-BSyYkg5C.js +65 -0
- package/dist/useControlled-BSyYkg5C.js.map +1 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
- package/dist/useLabelableId-DCLzrdD-.js +241 -0
- package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
- package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
- package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
- package/dist/useTimeout-BXf1hDIL.js +46 -0
- package/dist/useTimeout-BXf1hDIL.js.map +1 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
- package/dist/useValueAsRef-BfFRcMg6.js +28 -0
- package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
- package/dist/utils/classNames.d.ts +3 -2
- package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
- package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
- package/dist/vite-env.d.ts +18 -0
- package/package.json +30 -22
- package/dist/Input-BvwIpntS.js.map +0 -1
- package/dist/Notification-BT4CZ69U.js +0 -39
- package/dist/Notification-BT4CZ69U.js.map +0 -1
- package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
- package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
- package/dist/classNames-Dy-RXSjS.js +0 -9
- package/dist/classNames-Dy-RXSjS.js.map +0 -1
- package/dist/components/molecules/DropdownMenu.d.ts +0 -18
- package/dist/components/molecules/DropdownMenu.es.js +0 -104
- package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
- package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
- package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
- package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
- package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
- package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
- package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
- package/dist/components/theme/lightColorPlugin.d.ts +0 -1
- package/dist/components/theme/lightColorPlugin.es.js +0 -92
- package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
- package/dist/tailwindPreset.d.ts +0 -144
- package/dist/tailwindPreset.es.js +0 -100
- package/dist/tailwindPreset.es.js.map +0 -1
package/dist/tailwindPreset.d.ts
DELETED
|
@@ -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;"}
|