@vellira-ui/tokens 2.98.7 → 2.99.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.
- package/dist/css/tokens.css +30 -24
- package/dist/dark/components/contextMenu.d.ts +13 -3
- package/dist/dark/components/contextMenu.d.ts.map +1 -1
- package/dist/dark/components/contextMenu.js +0 -2
- package/dist/dark/components/dropdown.d.ts +13 -3
- package/dist/dark/components/dropdown.d.ts.map +1 -1
- package/dist/dark/components/dropdown.js +2 -2
- package/dist/dark/components/modal.d.ts +16 -7
- package/dist/dark/components/modal.d.ts.map +1 -1
- package/dist/dark/components/modal.js +0 -2
- package/dist/dark/components/popover.d.ts +5 -25
- package/dist/dark/components/popover.d.ts.map +1 -1
- package/dist/dark/components/popover.js +0 -4
- package/dist/dark/components/select.d.ts +9 -2
- package/dist/dark/components/select.d.ts.map +1 -1
- package/dist/dark/components/select.js +3 -3
- package/dist/dark/components/tooltip.d.ts.map +1 -1
- package/dist/dark/components/tooltip.js +0 -2
- package/dist/dark/semantic/surface.d.ts +1 -0
- package/dist/dark/semantic/surface.d.ts.map +1 -1
- package/dist/dark/semantic/surface.js +1 -0
- package/dist/factories/componentFocusRing.d.ts +4 -2
- package/dist/factories/componentFocusRing.d.ts.map +1 -1
- package/dist/factories/componentFocusRing.js +2 -1
- package/dist/factories/createContextMenuTokens.d.ts +49 -18
- package/dist/factories/createContextMenuTokens.d.ts.map +1 -1
- package/dist/factories/createContextMenuTokens.js +3 -3
- package/dist/factories/createModalTokens.d.ts +39 -20
- package/dist/factories/createModalTokens.d.ts.map +1 -1
- package/dist/factories/createModalTokens.js +4 -6
- package/dist/factories/createPopoverTokens.d.ts +11 -19
- package/dist/factories/createPopoverTokens.d.ts.map +1 -1
- package/dist/factories/createPopoverTokens.js +3 -7
- package/dist/factories/createTooltipTokens.d.ts +4 -7
- package/dist/factories/createTooltipTokens.d.ts.map +1 -1
- package/dist/factories/createTooltipTokens.js +4 -4
- package/dist/generated/token-types.d.ts +7 -6
- package/dist/generated/token-types.d.ts.map +1 -1
- package/dist/generated/token-types.js +8 -16
- package/dist/highContrast/components/contextMenu.d.ts +13 -3
- package/dist/highContrast/components/contextMenu.d.ts.map +1 -1
- package/dist/highContrast/components/contextMenu.js +0 -2
- package/dist/highContrast/components/dropdown.d.ts +13 -3
- package/dist/highContrast/components/dropdown.d.ts.map +1 -1
- package/dist/highContrast/components/dropdown.js +2 -2
- package/dist/highContrast/components/modal.d.ts +16 -7
- package/dist/highContrast/components/modal.d.ts.map +1 -1
- package/dist/highContrast/components/modal.js +0 -2
- package/dist/highContrast/components/popover.d.ts +5 -25
- package/dist/highContrast/components/popover.d.ts.map +1 -1
- package/dist/highContrast/components/popover.js +0 -4
- package/dist/highContrast/components/select.d.ts +9 -2
- package/dist/highContrast/components/select.d.ts.map +1 -1
- package/dist/highContrast/components/select.js +3 -3
- package/dist/highContrast/components/tooltip.d.ts.map +1 -1
- package/dist/highContrast/components/tooltip.js +0 -2
- package/dist/highContrast/semantic/surface.d.ts +1 -0
- package/dist/highContrast/semantic/surface.d.ts.map +1 -1
- package/dist/highContrast/semantic/surface.js +1 -0
- package/dist/light/components/contextMenu.d.ts +13 -3
- package/dist/light/components/contextMenu.d.ts.map +1 -1
- package/dist/light/components/contextMenu.js +0 -2
- package/dist/light/components/dropdown.d.ts +13 -3
- package/dist/light/components/dropdown.d.ts.map +1 -1
- package/dist/light/components/dropdown.js +2 -2
- package/dist/light/components/modal.d.ts +16 -7
- package/dist/light/components/modal.d.ts.map +1 -1
- package/dist/light/components/modal.js +0 -2
- package/dist/light/components/popover.d.ts +5 -25
- package/dist/light/components/popover.d.ts.map +1 -1
- package/dist/light/components/popover.js +0 -4
- package/dist/light/components/select.d.ts +9 -2
- package/dist/light/components/select.d.ts.map +1 -1
- package/dist/light/components/select.js +3 -3
- package/dist/light/components/tooltip.d.ts.map +1 -1
- package/dist/light/components/tooltip.js +0 -2
- package/dist/light/semantic/surface.d.ts +1 -0
- package/dist/light/semantic/surface.d.ts.map +1 -1
- package/dist/light/semantic/surface.js +1 -0
- package/dist/platform-output/component-token-intents.d.ts +71 -0
- package/dist/platform-output/component-token-intents.d.ts.map +1 -0
- package/dist/platform-output/component-token-intents.js +110 -0
- package/dist/platform-output/component-token-web-compatibility.d.ts +32 -0
- package/dist/platform-output/component-token-web-compatibility.d.ts.map +1 -0
- package/dist/platform-output/component-token-web-compatibility.js +40 -0
- package/dist/preservation/token-migrations.d.ts +44 -5
- package/dist/preservation/token-migrations.d.ts.map +1 -1
- package/dist/preservation/token-migrations.js +73 -1
- package/dist/token-architecture.d.ts +4 -4
- package/dist/token-architecture.d.ts.map +1 -1
- package/dist/token-architecture.js +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContextMenuTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createContextMenuTokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createContextMenuTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createContextMenuTokens.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAExE,KAAK,uBAAuB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE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,MAAM,oCAAoC,GAAI,wBAIlD,yBAAyB;;;;;;;;;;;;;;;yBAjHb,MAAM;yBACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIjB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { createComponentShadowIntent } from '../platform-output/component-token-intents.js';
|
|
1
2
|
import { createComponentFocusRing, } from './componentFocusRing.js';
|
|
2
3
|
export const createContextMenuTokens = (config) => ({
|
|
3
4
|
content: {
|
|
4
5
|
bg: config.contentBg,
|
|
5
6
|
border: config.contentBorder,
|
|
6
|
-
shadow:
|
|
7
|
+
shadow: createComponentShadowIntent('lg'),
|
|
7
8
|
},
|
|
8
9
|
item: {
|
|
9
10
|
default: config.itemDefault,
|
|
@@ -47,10 +48,9 @@ export const createContextMenuTokens = (config) => ({
|
|
|
47
48
|
fg: config.groupLabelFg,
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
|
-
export const createContextMenuTokensFromSemantics = ({ focus, menu,
|
|
51
|
+
export const createContextMenuTokensFromSemantics = ({ focus, menu, text, }) => createContextMenuTokens({
|
|
51
52
|
contentBg: menu.background,
|
|
52
53
|
contentBorder: menu.border,
|
|
53
|
-
contentShadow: shadow.lg,
|
|
54
54
|
itemDefault: menu.item.default,
|
|
55
55
|
itemHover: menu.item.hover,
|
|
56
56
|
itemActive: menu.item.active,
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { type SemanticFocusRing } from './componentFocusRing.js';
|
|
2
|
-
type ModalFocusRing =
|
|
3
|
-
color: string;
|
|
4
|
-
width: string;
|
|
5
|
-
shadow: string;
|
|
6
|
-
offset: string;
|
|
7
|
-
};
|
|
1
|
+
import { createComponentFocusRing, type SemanticFocusRing } from './componentFocusRing.js';
|
|
2
|
+
type ModalFocusRing = ReturnType<typeof createComponentFocusRing>;
|
|
8
3
|
type ModalTokensConfig = {
|
|
9
4
|
overlayBg: string;
|
|
10
5
|
contentBg: string;
|
|
11
6
|
contentFg: string;
|
|
12
7
|
contentBorder: string;
|
|
13
|
-
contentShadow: string;
|
|
14
8
|
titleFg: string;
|
|
15
9
|
descriptionFg: string;
|
|
16
10
|
closeButtonDefaultFg: string;
|
|
@@ -45,9 +39,6 @@ export type ModalThemeSemantics = {
|
|
|
45
39
|
lg: number;
|
|
46
40
|
full: number;
|
|
47
41
|
};
|
|
48
|
-
shadow: {
|
|
49
|
-
xl: string;
|
|
50
|
-
};
|
|
51
42
|
spacing: {
|
|
52
43
|
1: number;
|
|
53
44
|
3: number;
|
|
@@ -75,14 +66,20 @@ export declare const createModalTokens: (config: ModalTokensConfig) => {
|
|
|
75
66
|
readonly bg: string;
|
|
76
67
|
readonly fg: string;
|
|
77
68
|
readonly border: string;
|
|
78
|
-
readonly shadow:
|
|
69
|
+
readonly shadow: Readonly<{
|
|
70
|
+
kind: "shadow";
|
|
71
|
+
role: "elevation";
|
|
72
|
+
level: import("../platform-output/component-token-intents.js").ComponentShadowLevel;
|
|
73
|
+
}>;
|
|
79
74
|
readonly borderWidth: 1;
|
|
80
75
|
readonly radius: number;
|
|
81
76
|
readonly padding: number;
|
|
82
77
|
readonly gap: number;
|
|
83
78
|
readonly minWidth: 320;
|
|
84
|
-
readonly maxHeight:
|
|
85
|
-
|
|
79
|
+
readonly maxHeight: Readonly<{
|
|
80
|
+
kind: "viewport-height";
|
|
81
|
+
ratio: number;
|
|
82
|
+
}>;
|
|
86
83
|
readonly viewportMargin: number;
|
|
87
84
|
readonly topOffset: number;
|
|
88
85
|
readonly zIndexOffset: 1;
|
|
@@ -132,7 +129,15 @@ export declare const createModalTokens: (config: ModalTokensConfig) => {
|
|
|
132
129
|
readonly border: "transparent";
|
|
133
130
|
};
|
|
134
131
|
readonly focus: {
|
|
135
|
-
readonly ring:
|
|
132
|
+
readonly ring: {
|
|
133
|
+
readonly color: string;
|
|
134
|
+
readonly width: string;
|
|
135
|
+
readonly shadow: Readonly<{
|
|
136
|
+
kind: "shadow";
|
|
137
|
+
role: "focus-ring";
|
|
138
|
+
}>;
|
|
139
|
+
readonly offset: string;
|
|
140
|
+
};
|
|
136
141
|
};
|
|
137
142
|
readonly disabled: {
|
|
138
143
|
readonly bg: "transparent";
|
|
@@ -146,7 +151,7 @@ export declare const createModalTokens: (config: ModalTokensConfig) => {
|
|
|
146
151
|
readonly openDuration: "180ms";
|
|
147
152
|
};
|
|
148
153
|
};
|
|
149
|
-
export declare const createModalTokensFromSemantics: ({ closeButtonHoverBg, closeButtonPressedBg, focus, overlay, radius,
|
|
154
|
+
export declare const createModalTokensFromSemantics: ({ closeButtonHoverBg, closeButtonPressedBg, focus, overlay, radius, spacing, surface, text, }: ModalThemeSemantics) => {
|
|
150
155
|
readonly overlay: {
|
|
151
156
|
readonly bg: string;
|
|
152
157
|
readonly blur: 4;
|
|
@@ -156,14 +161,20 @@ export declare const createModalTokensFromSemantics: ({ closeButtonHoverBg, clos
|
|
|
156
161
|
readonly bg: string;
|
|
157
162
|
readonly fg: string;
|
|
158
163
|
readonly border: string;
|
|
159
|
-
readonly shadow:
|
|
164
|
+
readonly shadow: Readonly<{
|
|
165
|
+
kind: "shadow";
|
|
166
|
+
role: "elevation";
|
|
167
|
+
level: import("../platform-output/component-token-intents.js").ComponentShadowLevel;
|
|
168
|
+
}>;
|
|
160
169
|
readonly borderWidth: 1;
|
|
161
170
|
readonly radius: number;
|
|
162
171
|
readonly padding: number;
|
|
163
172
|
readonly gap: number;
|
|
164
173
|
readonly minWidth: 320;
|
|
165
|
-
readonly maxHeight:
|
|
166
|
-
|
|
174
|
+
readonly maxHeight: Readonly<{
|
|
175
|
+
kind: "viewport-height";
|
|
176
|
+
ratio: number;
|
|
177
|
+
}>;
|
|
167
178
|
readonly viewportMargin: number;
|
|
168
179
|
readonly topOffset: number;
|
|
169
180
|
readonly zIndexOffset: 1;
|
|
@@ -213,7 +224,15 @@ export declare const createModalTokensFromSemantics: ({ closeButtonHoverBg, clos
|
|
|
213
224
|
readonly border: "transparent";
|
|
214
225
|
};
|
|
215
226
|
readonly focus: {
|
|
216
|
-
readonly ring:
|
|
227
|
+
readonly ring: {
|
|
228
|
+
readonly color: string;
|
|
229
|
+
readonly width: string;
|
|
230
|
+
readonly shadow: Readonly<{
|
|
231
|
+
kind: "shadow";
|
|
232
|
+
role: "focus-ring";
|
|
233
|
+
}>;
|
|
234
|
+
readonly offset: string;
|
|
235
|
+
};
|
|
217
236
|
};
|
|
218
237
|
readonly disabled: {
|
|
219
238
|
readonly bg: "transparent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createModalTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createModalTokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createModalTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createModalTokens.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,wBAAwB,EACxB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAElE,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,cAAc,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ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CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { createComponentShadowIntent, createComponentViewportHeightIntent, } from '../platform-output/component-token-intents.js';
|
|
1
2
|
import { createComponentFocusRing, } from './componentFocusRing.js';
|
|
2
3
|
const modalLayout = {
|
|
3
|
-
maxHeight:
|
|
4
|
-
nativeMaxHeight: '90%',
|
|
4
|
+
maxHeight: createComponentViewportHeightIntent(0.9),
|
|
5
5
|
zIndexOffset: 1,
|
|
6
6
|
};
|
|
7
7
|
const modalMotion = {
|
|
@@ -19,14 +19,13 @@ export const createModalTokens = (config) => ({
|
|
|
19
19
|
bg: config.contentBg,
|
|
20
20
|
fg: config.contentFg,
|
|
21
21
|
border: config.contentBorder,
|
|
22
|
-
shadow:
|
|
22
|
+
shadow: createComponentShadowIntent('xl'),
|
|
23
23
|
borderWidth: 1,
|
|
24
24
|
radius: config.radiusLg,
|
|
25
25
|
padding: config.spacing4,
|
|
26
26
|
gap: config.spacing4,
|
|
27
27
|
minWidth: 320,
|
|
28
28
|
maxHeight: modalLayout.maxHeight,
|
|
29
|
-
nativeMaxHeight: modalLayout.nativeMaxHeight,
|
|
30
29
|
viewportMargin: config.spacing8,
|
|
31
30
|
topOffset: config.spacing10,
|
|
32
31
|
zIndexOffset: modalLayout.zIndexOffset,
|
|
@@ -86,12 +85,11 @@ export const createModalTokens = (config) => ({
|
|
|
86
85
|
},
|
|
87
86
|
motion: modalMotion,
|
|
88
87
|
});
|
|
89
|
-
export const createModalTokensFromSemantics = ({ closeButtonHoverBg, closeButtonPressedBg, focus, overlay, radius,
|
|
88
|
+
export const createModalTokensFromSemantics = ({ closeButtonHoverBg, closeButtonPressedBg, focus, overlay, radius, spacing, surface, text, }) => createModalTokens({
|
|
90
89
|
overlayBg: overlay.backdrop,
|
|
91
90
|
contentBg: overlay.dialog.bg,
|
|
92
91
|
contentFg: text.primary,
|
|
93
92
|
contentBorder: overlay.dialog.border,
|
|
94
|
-
contentShadow: shadow.xl,
|
|
95
93
|
titleFg: text.primary,
|
|
96
94
|
descriptionFg: text.secondary,
|
|
97
95
|
closeButtonDefaultFg: text.secondary,
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { shadows } from '../tokens/shadows.js';
|
|
2
|
-
type NativeShadowToken = (typeof shadows)[keyof typeof shadows];
|
|
3
1
|
type PopoverTokensConfig = {
|
|
4
2
|
contentBg: string;
|
|
5
3
|
contentFg: string;
|
|
6
4
|
contentBorder: string;
|
|
7
|
-
contentWebShadow: string;
|
|
8
|
-
contentNativeShadow: NativeShadowToken;
|
|
9
5
|
titleFg: string;
|
|
10
6
|
descriptionFg: string;
|
|
11
7
|
radiusLg: number;
|
|
@@ -19,12 +15,6 @@ export type PopoverThemeSources = {
|
|
|
19
15
|
border: string;
|
|
20
16
|
};
|
|
21
17
|
};
|
|
22
|
-
shadow: {
|
|
23
|
-
lg: string;
|
|
24
|
-
};
|
|
25
|
-
shadows: {
|
|
26
|
-
lg: NativeShadowToken;
|
|
27
|
-
};
|
|
28
18
|
text: {
|
|
29
19
|
primary: string;
|
|
30
20
|
secondary: string;
|
|
@@ -41,10 +31,11 @@ export declare const createPopoverTokens: (config: PopoverTokensConfig) => {
|
|
|
41
31
|
readonly bg: string;
|
|
42
32
|
readonly fg: string;
|
|
43
33
|
readonly border: string;
|
|
44
|
-
readonly shadow: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
readonly shadow: Readonly<{
|
|
35
|
+
kind: "shadow";
|
|
36
|
+
role: "elevation";
|
|
37
|
+
level: import("../platform-output/component-token-intents.js").ComponentShadowLevel;
|
|
38
|
+
}>;
|
|
48
39
|
readonly borderWidth: 1;
|
|
49
40
|
readonly radius: number;
|
|
50
41
|
readonly padding: number;
|
|
@@ -64,15 +55,16 @@ export declare const createPopoverTokens: (config: PopoverTokensConfig) => {
|
|
|
64
55
|
readonly border: string;
|
|
65
56
|
};
|
|
66
57
|
};
|
|
67
|
-
export declare const createPopoverTokensFromTheme: ({ overlay,
|
|
58
|
+
export declare const createPopoverTokensFromTheme: ({ overlay, text, radius, spacing, }: PopoverThemeSources) => {
|
|
68
59
|
readonly content: {
|
|
69
60
|
readonly bg: string;
|
|
70
61
|
readonly fg: string;
|
|
71
62
|
readonly border: string;
|
|
72
|
-
readonly shadow: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
readonly shadow: Readonly<{
|
|
64
|
+
kind: "shadow";
|
|
65
|
+
role: "elevation";
|
|
66
|
+
level: import("../platform-output/component-token-intents.js").ComponentShadowLevel;
|
|
67
|
+
}>;
|
|
76
68
|
readonly borderWidth: 1;
|
|
77
69
|
readonly radius: number;
|
|
78
70
|
readonly padding: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPopoverTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createPopoverTokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPopoverTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createPopoverTokens.ts"],"names":[],"mappings":"AAEA,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,MAAM,EAAE;QACN,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KAChC,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BlD,CAAC;AAEd,eAAO,MAAM,4BAA4B,GAAI,qCAK1C,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { createComponentShadowIntent } from '../platform-output/component-token-intents.js';
|
|
1
2
|
export const createPopoverTokens = (config) => ({
|
|
2
3
|
content: {
|
|
3
4
|
bg: config.contentBg,
|
|
4
5
|
fg: config.contentFg,
|
|
5
6
|
border: config.contentBorder,
|
|
6
|
-
shadow:
|
|
7
|
-
web: config.contentWebShadow,
|
|
8
|
-
native: config.contentNativeShadow,
|
|
9
|
-
},
|
|
7
|
+
shadow: createComponentShadowIntent('lg'),
|
|
10
8
|
borderWidth: 1,
|
|
11
9
|
radius: config.radiusLg,
|
|
12
10
|
padding: config.spacing4,
|
|
@@ -26,12 +24,10 @@ export const createPopoverTokens = (config) => ({
|
|
|
26
24
|
border: config.contentBorder,
|
|
27
25
|
},
|
|
28
26
|
});
|
|
29
|
-
export const createPopoverTokensFromTheme = ({ overlay,
|
|
27
|
+
export const createPopoverTokensFromTheme = ({ overlay, text, radius, spacing, }) => createPopoverTokens({
|
|
30
28
|
contentBg: overlay.floating.bg,
|
|
31
29
|
contentFg: text.primary,
|
|
32
30
|
contentBorder: overlay.floating.border,
|
|
33
|
-
contentWebShadow: shadow.lg,
|
|
34
|
-
contentNativeShadow: shadows.lg,
|
|
35
31
|
titleFg: text.primary,
|
|
36
32
|
descriptionFg: text.secondary,
|
|
37
33
|
radiusLg: radius.lg,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type ComponentElevationShadowIntent } from '../platform-output/component-token-intents.js';
|
|
1
2
|
type TooltipContentTokens = {
|
|
2
3
|
bg: string;
|
|
3
4
|
fg: string;
|
|
4
5
|
border: string;
|
|
5
|
-
shadow:
|
|
6
|
+
shadow: ComponentElevationShadowIntent;
|
|
6
7
|
borderWidth: number;
|
|
7
8
|
radius: number;
|
|
8
9
|
paddingX: number;
|
|
@@ -28,7 +29,6 @@ type TooltipTokensConfig = {
|
|
|
28
29
|
contentBg: string;
|
|
29
30
|
contentFg: string;
|
|
30
31
|
contentBorder: string;
|
|
31
|
-
contentShadow: string;
|
|
32
32
|
contentBorderWidth?: number;
|
|
33
33
|
contentRadius: number;
|
|
34
34
|
contentPaddingX: number;
|
|
@@ -60,9 +60,6 @@ export type TooltipThemeSources = {
|
|
|
60
60
|
border: string;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
shadow: {
|
|
64
|
-
md: string;
|
|
65
|
-
};
|
|
66
63
|
radius: {
|
|
67
64
|
sm: number;
|
|
68
65
|
};
|
|
@@ -80,7 +77,7 @@ export type TooltipThemeSources = {
|
|
|
80
77
|
};
|
|
81
78
|
};
|
|
82
79
|
};
|
|
83
|
-
export declare const createTooltipTokens: ({ contentBg, contentFg, contentBorder,
|
|
84
|
-
export declare const createTooltipTokensFromTheme: ({ overlay,
|
|
80
|
+
export declare const createTooltipTokens: ({ contentBg, contentFg, contentBorder, contentBorderWidth, contentRadius, contentPaddingX, contentPaddingY, contentMaxWidth, contentCompactMaxWidth, contentCompactPaddingX, contentCompactPaddingY, contentFontSize, contentLineHeight, contentCompactFontSize, contentCompactLineHeight, contentAnimationDuration, contentTranslateY, contentScale, arrowBg, arrowSize, arrowCompactSize, }: TooltipTokensConfig) => TooltipTokens;
|
|
81
|
+
export declare const createTooltipTokensFromTheme: ({ overlay, radius, spacing, typography, }: TooltipThemeSources) => TooltipTokens;
|
|
85
82
|
export {};
|
|
86
83
|
//# sourceMappingURL=createTooltipTokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTooltipTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createTooltipTokens.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"createTooltipTokens.d.ts","sourceRoot":"","sources":["../../src/factories/createTooltipTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,8BAA8B,EAEpC,MAAM,+CAA+C,CAAC;AAEvD,KAAK,oBAAoB,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,8BAA8B,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;I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ACH,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,+XAsBjC,mBAAmB,KAAG,aA6BZ,CAAC;AAEd,eAAO,MAAM,4BAA4B,GAAI,2CAK1C,mBAAmB,kBAclB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { createComponentShadowIntent, } from '../platform-output/component-token-intents.js';
|
|
2
|
+
export const createTooltipTokens = ({ contentBg, contentFg, contentBorder, contentBorderWidth = 1, contentRadius, contentPaddingX, contentPaddingY, contentMaxWidth = 240, contentCompactMaxWidth = 200, contentCompactPaddingX, contentCompactPaddingY, contentFontSize, contentLineHeight, contentCompactFontSize, contentCompactLineHeight, contentAnimationDuration = '150ms', contentTranslateY = 2, contentScale = 0.98, arrowBg = contentBg, arrowSize = 10, arrowCompactSize = 6, }) => ({
|
|
2
3
|
content: {
|
|
3
4
|
bg: contentBg,
|
|
4
5
|
fg: contentFg,
|
|
5
6
|
border: contentBorder,
|
|
6
|
-
shadow:
|
|
7
|
+
shadow: createComponentShadowIntent('md'),
|
|
7
8
|
borderWidth: contentBorderWidth,
|
|
8
9
|
radius: contentRadius,
|
|
9
10
|
paddingX: contentPaddingX,
|
|
@@ -26,11 +27,10 @@ export const createTooltipTokens = ({ contentBg, contentFg, contentBorder, conte
|
|
|
26
27
|
compactSize: arrowCompactSize,
|
|
27
28
|
},
|
|
28
29
|
});
|
|
29
|
-
export const createTooltipTokensFromTheme = ({ overlay,
|
|
30
|
+
export const createTooltipTokensFromTheme = ({ overlay, radius, spacing, typography, }) => createTooltipTokens({
|
|
30
31
|
contentBg: overlay.tooltip.bg,
|
|
31
32
|
contentFg: overlay.tooltip.fg,
|
|
32
33
|
contentBorder: overlay.tooltip.border,
|
|
33
|
-
contentShadow: shadow.md,
|
|
34
34
|
contentRadius: radius.sm,
|
|
35
35
|
contentPaddingX: spacing[3],
|
|
36
36
|
contentPaddingY: spacing[2],
|