@wordpress/theme 0.1.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/LICENSE.md +788 -0
- package/README.md +67 -0
- package/bin/build-tokens.js +83 -0
- package/bin/generate-primitive-tokens/index.ts +115 -0
- package/bin/terrazzo-plugin-ds-tokens-docs/index.ts +103 -0
- package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +210 -0
- package/bin/terrazzo-plugin-figma-ds-token-manager/lib.ts +1 -0
- package/bin/terrazzo-plugin-known-wpds-css-variables/index.ts +72 -0
- package/build/color-ramps/index.js +132 -0
- package/build/color-ramps/index.js.map +7 -0
- package/build/color-ramps/lib/cache-utils.js +57 -0
- package/build/color-ramps/lib/cache-utils.js.map +7 -0
- package/build/color-ramps/lib/constants.js +105 -0
- package/build/color-ramps/lib/constants.js.map +7 -0
- package/build/color-ramps/lib/find-color-with-constraints.js +141 -0
- package/build/color-ramps/lib/find-color-with-constraints.js.map +7 -0
- package/build/color-ramps/lib/index.js +264 -0
- package/build/color-ramps/lib/index.js.map +7 -0
- package/build/color-ramps/lib/ramp-configs.js +315 -0
- package/build/color-ramps/lib/ramp-configs.js.map +7 -0
- package/build/color-ramps/lib/taper-chroma.js +159 -0
- package/build/color-ramps/lib/taper-chroma.js.map +7 -0
- package/build/color-ramps/lib/types.js +17 -0
- package/build/color-ramps/lib/types.js.map +7 -0
- package/build/color-ramps/lib/utils.js +106 -0
- package/build/color-ramps/lib/utils.js.map +7 -0
- package/build/context.js +34 -0
- package/build/context.js.map +7 -0
- package/build/index.js +29 -0
- package/build/index.js.map +7 -0
- package/build/lock-unlock.js +35 -0
- package/build/lock-unlock.js.map +7 -0
- package/build/prebuilt/js/design-tokens.js +135 -0
- package/build/prebuilt/js/design-tokens.js.map +7 -0
- package/build/prebuilt/json/figma.json +1317 -0
- package/build/prebuilt/ts/design-tokens.js +354 -0
- package/build/prebuilt/ts/design-tokens.js.map +7 -0
- package/build/private-apis.js +36 -0
- package/build/private-apis.js.map +7 -0
- package/build/style.module.css.js +2 -0
- package/build/theme-provider.js +92 -0
- package/build/theme-provider.js.map +7 -0
- package/build/types/css-modules.d.js +2 -0
- package/build/types/css-modules.d.js.map +7 -0
- package/build/types.js +17 -0
- package/build/types.js.map +7 -0
- package/build/use-theme-provider-styles.js +230 -0
- package/build/use-theme-provider-styles.js.map +7 -0
- package/build-module/color-ramps/index.js +95 -0
- package/build-module/color-ramps/index.js.map +7 -0
- package/build-module/color-ramps/lib/cache-utils.js +31 -0
- package/build-module/color-ramps/lib/cache-utils.js.map +7 -0
- package/build-module/color-ramps/lib/constants.js +63 -0
- package/build-module/color-ramps/lib/constants.js.map +7 -0
- package/build-module/color-ramps/lib/find-color-with-constraints.js +112 -0
- package/build-module/color-ramps/lib/find-color-with-constraints.js.map +7 -0
- package/build-module/color-ramps/lib/index.js +235 -0
- package/build-module/color-ramps/lib/index.js.map +7 -0
- package/build-module/color-ramps/lib/ramp-configs.js +290 -0
- package/build-module/color-ramps/lib/ramp-configs.js.map +7 -0
- package/build-module/color-ramps/lib/taper-chroma.js +125 -0
- package/build-module/color-ramps/lib/taper-chroma.js.map +7 -0
- package/build-module/color-ramps/lib/types.js +1 -0
- package/build-module/color-ramps/lib/types.js.map +7 -0
- package/build-module/color-ramps/lib/utils.js +84 -0
- package/build-module/color-ramps/lib/utils.js.map +7 -0
- package/build-module/context.js +10 -0
- package/build-module/context.js.map +7 -0
- package/build-module/index.js +5 -0
- package/build-module/index.js.map +7 -0
- package/build-module/lock-unlock.js +10 -0
- package/build-module/lock-unlock.js.map +7 -0
- package/build-module/prebuilt/js/design-tokens.js +115 -0
- package/build-module/prebuilt/js/design-tokens.js.map +7 -0
- package/build-module/prebuilt/json/figma.json +1317 -0
- package/build-module/prebuilt/ts/design-tokens.js +334 -0
- package/build-module/prebuilt/ts/design-tokens.js.map +7 -0
- package/build-module/private-apis.js +12 -0
- package/build-module/private-apis.js.map +7 -0
- package/build-module/style.module.css.js +1 -0
- package/build-module/theme-provider.js +58 -0
- package/build-module/theme-provider.js.map +7 -0
- package/build-module/types/css-modules.d.js +1 -0
- package/build-module/types/css-modules.d.js.map +7 -0
- package/build-module/types.js +1 -0
- package/build-module/types.js.map +7 -0
- package/build-module/use-theme-provider-styles.js +200 -0
- package/build-module/use-theme-provider-styles.js.map +7 -0
- package/build-style/style.css +3 -0
- package/build-types/color-ramps/index.d.ts +44 -0
- package/build-types/color-ramps/index.d.ts.map +1 -0
- package/build-types/color-ramps/lib/cache-utils.d.ts +22 -0
- package/build-types/color-ramps/lib/cache-utils.d.ts.map +1 -0
- package/build-types/color-ramps/lib/constants.d.ts +38 -0
- package/build-types/color-ramps/lib/constants.d.ts.map +1 -0
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +37 -0
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -0
- package/build-types/color-ramps/lib/index.d.ts +11 -0
- package/build-types/color-ramps/lib/index.d.ts.map +1 -0
- package/build-types/color-ramps/lib/ramp-configs.d.ts +7 -0
- package/build-types/color-ramps/lib/ramp-configs.d.ts.map +1 -0
- package/build-types/color-ramps/lib/taper-chroma.d.ts +32 -0
- package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -0
- package/build-types/color-ramps/lib/types.d.ts +78 -0
- package/build-types/color-ramps/lib/types.d.ts.map +1 -0
- package/build-types/color-ramps/lib/utils.d.ts +38 -0
- package/build-types/color-ramps/lib/utils.d.ts.map +1 -0
- package/build-types/color-ramps/stories/index.story.d.ts +14 -0
- package/build-types/color-ramps/stories/index.story.d.ts.map +1 -0
- package/build-types/color-ramps/stories/ramp-table.d.ts +19 -0
- package/build-types/color-ramps/stories/ramp-table.d.ts.map +1 -0
- package/build-types/context.d.ts +10 -0
- package/build-types/context.d.ts.map +1 -0
- package/build-types/index.d.ts +2 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/prebuilt/js/design-tokens.d.ts +3 -0
- package/build-types/prebuilt/js/design-tokens.d.ts.map +1 -0
- package/build-types/prebuilt/ts/design-tokens.d.ts +7 -0
- package/build-types/prebuilt/ts/design-tokens.d.ts.map +1 -0
- package/build-types/private-apis.d.ts +2 -0
- package/build-types/private-apis.d.ts.map +1 -0
- package/build-types/stories/index.story.d.ts +15 -0
- package/build-types/stories/index.story.d.ts.map +1 -0
- package/build-types/theme-provider.d.ts +3 -0
- package/build-types/theme-provider.d.ts.map +1 -0
- package/build-types/types.d.ts +42 -0
- package/build-types/types.d.ts.map +1 -0
- package/build-types/use-theme-provider-styles.d.ts +17 -0
- package/build-types/use-theme-provider-styles.d.ts.map +1 -0
- package/docs/ds-tokens.md +283 -0
- package/package.json +58 -0
- package/src/color-ramps/index.ts +155 -0
- package/src/color-ramps/lib/cache-utils.ts +56 -0
- package/src/color-ramps/lib/constants.ts +85 -0
- package/src/color-ramps/lib/find-color-with-constraints.ts +190 -0
- package/src/color-ramps/lib/index.ts +369 -0
- package/src/color-ramps/lib/ramp-configs.ts +309 -0
- package/src/color-ramps/lib/taper-chroma.ts +226 -0
- package/src/color-ramps/lib/types.ts +90 -0
- package/src/color-ramps/lib/utils.ts +161 -0
- package/src/color-ramps/stories/index.story.tsx +264 -0
- package/src/color-ramps/stories/ramp-table.tsx +212 -0
- package/src/color-ramps/test/__snapshots__/index.test.ts.snap +1280 -0
- package/src/color-ramps/test/index.test.ts +94 -0
- package/src/context.ts +19 -0
- package/src/index.ts +2 -0
- package/src/lock-unlock.ts +10 -0
- package/src/prebuilt/css/design-tokens.css +401 -0
- package/src/prebuilt/js/design-tokens.js +116 -0
- package/src/prebuilt/json/figma.json +1317 -0
- package/src/prebuilt/ts/design-tokens.ts +335 -0
- package/src/private-apis.ts +12 -0
- package/src/stories/index.story.tsx +426 -0
- package/src/style.module.css +3 -0
- package/src/theme-provider.tsx +87 -0
- package/src/types/css-modules.d.ts +4 -0
- package/src/types.ts +44 -0
- package/src/use-theme-provider-styles.ts +247 -0
- package/terrazzo.config.ts +102 -0
- package/tokens/border.json +34 -0
- package/tokens/color.json +877 -0
- package/tokens/elevation.json +201 -0
- package/tokens/spacing.json +45 -0
- package/tokens/typography.json +93 -0
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var design_tokens_exports = {};
|
|
20
|
+
__export(design_tokens_exports, {
|
|
21
|
+
default: () => design_tokens_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(design_tokens_exports);
|
|
24
|
+
var design_tokens_default = {
|
|
25
|
+
"--wpds-border-radius-x-small": {
|
|
26
|
+
".": "1px"
|
|
27
|
+
},
|
|
28
|
+
"--wpds-border-radius-small": {
|
|
29
|
+
".": "2px"
|
|
30
|
+
},
|
|
31
|
+
"--wpds-border-radius-medium": {
|
|
32
|
+
".": "4px"
|
|
33
|
+
},
|
|
34
|
+
"--wpds-border-radius-large": {
|
|
35
|
+
".": "8px"
|
|
36
|
+
},
|
|
37
|
+
"--wpds-border-width-focus": {
|
|
38
|
+
".": "2px",
|
|
39
|
+
"high-dpi": "1.5px"
|
|
40
|
+
},
|
|
41
|
+
"--wpds-color-bg-surface-neutral": {
|
|
42
|
+
".": "var(--wpds-color-private-bg-surface2)"
|
|
43
|
+
},
|
|
44
|
+
"--wpds-color-bg-surface-neutral-strong": {
|
|
45
|
+
".": "var(--wpds-color-private-bg-surface3)"
|
|
46
|
+
},
|
|
47
|
+
"--wpds-color-bg-surface-neutral-weak": {
|
|
48
|
+
".": "var(--wpds-color-private-bg-surface1)"
|
|
49
|
+
},
|
|
50
|
+
"--wpds-color-bg-surface-brand": {
|
|
51
|
+
".": "var(--wpds-color-private-primary-surface1)"
|
|
52
|
+
},
|
|
53
|
+
"--wpds-color-bg-surface-success": {
|
|
54
|
+
".": "var(--wpds-color-private-success-surface4)"
|
|
55
|
+
},
|
|
56
|
+
"--wpds-color-bg-surface-success-weak": {
|
|
57
|
+
".": "var(--wpds-color-private-success-surface2)"
|
|
58
|
+
},
|
|
59
|
+
"--wpds-color-bg-surface-info": {
|
|
60
|
+
".": "var(--wpds-color-private-info-surface4)"
|
|
61
|
+
},
|
|
62
|
+
"--wpds-color-bg-surface-info-weak": {
|
|
63
|
+
".": "var(--wpds-color-private-info-surface2)"
|
|
64
|
+
},
|
|
65
|
+
"--wpds-color-bg-surface-warning": {
|
|
66
|
+
".": "var(--wpds-color-private-warning-surface4)"
|
|
67
|
+
},
|
|
68
|
+
"--wpds-color-bg-surface-warning-weak": {
|
|
69
|
+
".": "var(--wpds-color-private-warning-surface2)"
|
|
70
|
+
},
|
|
71
|
+
"--wpds-color-bg-surface-error": {
|
|
72
|
+
".": "var(--wpds-color-private-error-surface4)"
|
|
73
|
+
},
|
|
74
|
+
"--wpds-color-bg-surface-error-weak": {
|
|
75
|
+
".": "var(--wpds-color-private-error-surface2)"
|
|
76
|
+
},
|
|
77
|
+
"--wpds-color-bg-interactive-neutral": {
|
|
78
|
+
".": "#00000000"
|
|
79
|
+
},
|
|
80
|
+
"--wpds-color-bg-interactive-neutral-active": {
|
|
81
|
+
".": "var(--wpds-color-private-bg-surface4)"
|
|
82
|
+
},
|
|
83
|
+
"--wpds-color-bg-interactive-neutral-disabled": {
|
|
84
|
+
".": "var(--wpds-color-private-bg-surface5)"
|
|
85
|
+
},
|
|
86
|
+
"--wpds-color-bg-interactive-neutral-strong": {
|
|
87
|
+
".": "var(--wpds-color-private-bg-bg-fill-inverted1)"
|
|
88
|
+
},
|
|
89
|
+
"--wpds-color-bg-interactive-neutral-strong-active": {
|
|
90
|
+
".": "var(--wpds-color-private-bg-bg-fill-inverted2)"
|
|
91
|
+
},
|
|
92
|
+
"--wpds-color-bg-interactive-neutral-strong-disabled": {
|
|
93
|
+
".": "var(--wpds-color-private-bg-surface6)"
|
|
94
|
+
},
|
|
95
|
+
"--wpds-color-bg-interactive-neutral-weak": {
|
|
96
|
+
".": "#00000000"
|
|
97
|
+
},
|
|
98
|
+
"--wpds-color-bg-interactive-neutral-weak-active": {
|
|
99
|
+
".": "var(--wpds-color-private-bg-surface4)"
|
|
100
|
+
},
|
|
101
|
+
"--wpds-color-bg-interactive-neutral-weak-disabled": {
|
|
102
|
+
".": "var(--wpds-color-private-bg-surface5)"
|
|
103
|
+
},
|
|
104
|
+
"--wpds-color-bg-interactive-brand": {
|
|
105
|
+
".": "#00000000"
|
|
106
|
+
},
|
|
107
|
+
"--wpds-color-bg-interactive-brand-active": {
|
|
108
|
+
".": "var(--wpds-color-private-primary-surface2)"
|
|
109
|
+
},
|
|
110
|
+
"--wpds-color-bg-interactive-brand-disabled": {
|
|
111
|
+
".": "var(--wpds-color-private-bg-surface5)"
|
|
112
|
+
},
|
|
113
|
+
"--wpds-color-bg-interactive-brand-strong": {
|
|
114
|
+
".": "var(--wpds-color-private-primary-bg-fill1)"
|
|
115
|
+
},
|
|
116
|
+
"--wpds-color-bg-interactive-brand-strong-active": {
|
|
117
|
+
".": "var(--wpds-color-private-primary-bg-fill2)"
|
|
118
|
+
},
|
|
119
|
+
"--wpds-color-bg-interactive-brand-strong-disabled": {
|
|
120
|
+
".": "var(--wpds-color-private-bg-surface6)"
|
|
121
|
+
},
|
|
122
|
+
"--wpds-color-bg-interactive-brand-weak": {
|
|
123
|
+
".": "#00000000"
|
|
124
|
+
},
|
|
125
|
+
"--wpds-color-bg-interactive-brand-weak-active": {
|
|
126
|
+
".": "var(--wpds-color-private-primary-surface4)"
|
|
127
|
+
},
|
|
128
|
+
"--wpds-color-bg-interactive-brand-weak-disabled": {
|
|
129
|
+
".": "var(--wpds-color-private-bg-surface5)"
|
|
130
|
+
},
|
|
131
|
+
"--wpds-color-bg-track-neutral-weak": {
|
|
132
|
+
".": "var(--wpds-color-private-bg-stroke1)"
|
|
133
|
+
},
|
|
134
|
+
"--wpds-color-bg-track-neutral": {
|
|
135
|
+
".": "var(--wpds-color-private-bg-stroke2)"
|
|
136
|
+
},
|
|
137
|
+
"--wpds-color-bg-thumb-neutral-weak": {
|
|
138
|
+
".": "var(--wpds-color-private-bg-stroke3)"
|
|
139
|
+
},
|
|
140
|
+
"--wpds-color-bg-thumb-neutral-weak-active": {
|
|
141
|
+
".": "var(--wpds-color-private-bg-stroke4)"
|
|
142
|
+
},
|
|
143
|
+
"--wpds-color-bg-thumb-brand": {
|
|
144
|
+
".": "var(--wpds-color-private-primary-stroke3)"
|
|
145
|
+
},
|
|
146
|
+
"--wpds-color-bg-thumb-brand-active": {
|
|
147
|
+
".": "var(--wpds-color-private-primary-stroke3)"
|
|
148
|
+
},
|
|
149
|
+
"--wpds-color-bg-thumb-brand-disabled": {
|
|
150
|
+
".": "var(--wpds-color-private-bg-stroke2)"
|
|
151
|
+
},
|
|
152
|
+
"--wpds-color-fg-content-neutral": {
|
|
153
|
+
".": "var(--wpds-color-private-bg-fg-surface4)"
|
|
154
|
+
},
|
|
155
|
+
"--wpds-color-fg-content-neutral-weak": {
|
|
156
|
+
".": "var(--wpds-color-private-bg-fg-surface3)"
|
|
157
|
+
},
|
|
158
|
+
"--wpds-color-fg-interactive-neutral": {
|
|
159
|
+
".": "var(--wpds-color-private-bg-fg-surface4)"
|
|
160
|
+
},
|
|
161
|
+
"--wpds-color-fg-interactive-neutral-active": {
|
|
162
|
+
".": "var(--wpds-color-private-bg-fg-surface4)"
|
|
163
|
+
},
|
|
164
|
+
"--wpds-color-fg-interactive-neutral-disabled": {
|
|
165
|
+
".": "var(--wpds-color-private-bg-fg-surface2)"
|
|
166
|
+
},
|
|
167
|
+
"--wpds-color-fg-interactive-neutral-strong": {
|
|
168
|
+
".": "var(--wpds-color-private-bg-fg-fill-inverted)"
|
|
169
|
+
},
|
|
170
|
+
"--wpds-color-fg-interactive-neutral-strong-active": {
|
|
171
|
+
".": "var(--wpds-color-private-bg-fg-fill-inverted)"
|
|
172
|
+
},
|
|
173
|
+
"--wpds-color-fg-interactive-neutral-strong-disabled": {
|
|
174
|
+
".": "var(--wpds-color-private-bg-fg-surface3)"
|
|
175
|
+
},
|
|
176
|
+
"--wpds-color-fg-interactive-neutral-weak": {
|
|
177
|
+
".": "var(--wpds-color-private-bg-fg-surface3)"
|
|
178
|
+
},
|
|
179
|
+
"--wpds-color-fg-interactive-neutral-weak-disabled": {
|
|
180
|
+
".": "var(--wpds-color-private-bg-fg-surface2)"
|
|
181
|
+
},
|
|
182
|
+
"--wpds-color-fg-interactive-brand": {
|
|
183
|
+
".": "var(--wpds-color-private-primary-fg-surface3)"
|
|
184
|
+
},
|
|
185
|
+
"--wpds-color-fg-interactive-brand-active": {
|
|
186
|
+
".": "var(--wpds-color-private-primary-fg-surface3)"
|
|
187
|
+
},
|
|
188
|
+
"--wpds-color-fg-interactive-brand-disabled": {
|
|
189
|
+
".": "var(--wpds-color-private-bg-fg-surface2)"
|
|
190
|
+
},
|
|
191
|
+
"--wpds-color-fg-interactive-brand-strong": {
|
|
192
|
+
".": "var(--wpds-color-private-primary-fg-fill)"
|
|
193
|
+
},
|
|
194
|
+
"--wpds-color-fg-interactive-brand-strong-active": {
|
|
195
|
+
".": "var(--wpds-color-private-primary-fg-fill)"
|
|
196
|
+
},
|
|
197
|
+
"--wpds-color-fg-interactive-brand-strong-disabled": {
|
|
198
|
+
".": "var(--wpds-color-private-bg-fg-surface3)"
|
|
199
|
+
},
|
|
200
|
+
"--wpds-color-stroke-surface-neutral": {
|
|
201
|
+
".": "var(--wpds-color-private-bg-stroke2)"
|
|
202
|
+
},
|
|
203
|
+
"--wpds-color-stroke-surface-neutral-weak": {
|
|
204
|
+
".": "var(--wpds-color-private-bg-stroke1)"
|
|
205
|
+
},
|
|
206
|
+
"--wpds-color-stroke-surface-neutral-strong": {
|
|
207
|
+
".": "var(--wpds-color-private-bg-stroke3)"
|
|
208
|
+
},
|
|
209
|
+
"--wpds-color-stroke-surface-brand": {
|
|
210
|
+
".": "var(--wpds-color-private-primary-stroke1)"
|
|
211
|
+
},
|
|
212
|
+
"--wpds-color-stroke-surface-brand-strong": {
|
|
213
|
+
".": "var(--wpds-color-private-primary-stroke3)"
|
|
214
|
+
},
|
|
215
|
+
"--wpds-color-stroke-surface-success": {
|
|
216
|
+
".": "var(--wpds-color-private-success-stroke1)"
|
|
217
|
+
},
|
|
218
|
+
"--wpds-color-stroke-surface-success-strong": {
|
|
219
|
+
".": "var(--wpds-color-private-success-stroke3)"
|
|
220
|
+
},
|
|
221
|
+
"--wpds-color-stroke-surface-info": {
|
|
222
|
+
".": "var(--wpds-color-private-info-stroke1)"
|
|
223
|
+
},
|
|
224
|
+
"--wpds-color-stroke-surface-info-strong": {
|
|
225
|
+
".": "var(--wpds-color-private-info-stroke3)"
|
|
226
|
+
},
|
|
227
|
+
"--wpds-color-stroke-surface-warning": {
|
|
228
|
+
".": "var(--wpds-color-private-warning-stroke1)"
|
|
229
|
+
},
|
|
230
|
+
"--wpds-color-stroke-surface-warning-strong": {
|
|
231
|
+
".": "var(--wpds-color-private-warning-stroke3)"
|
|
232
|
+
},
|
|
233
|
+
"--wpds-color-stroke-surface-error": {
|
|
234
|
+
".": "var(--wpds-color-private-error-stroke1)"
|
|
235
|
+
},
|
|
236
|
+
"--wpds-color-stroke-surface-error-strong": {
|
|
237
|
+
".": "var(--wpds-color-private-error-stroke3)"
|
|
238
|
+
},
|
|
239
|
+
"--wpds-color-stroke-interactive-neutral": {
|
|
240
|
+
".": "var(--wpds-color-private-bg-stroke3)"
|
|
241
|
+
},
|
|
242
|
+
"--wpds-color-stroke-interactive-neutral-active": {
|
|
243
|
+
".": "var(--wpds-color-private-bg-stroke4)"
|
|
244
|
+
},
|
|
245
|
+
"--wpds-color-stroke-interactive-neutral-disabled": {
|
|
246
|
+
".": "var(--wpds-color-private-bg-stroke2)"
|
|
247
|
+
},
|
|
248
|
+
"--wpds-color-stroke-interactive-neutral-strong": {
|
|
249
|
+
".": "var(--wpds-color-private-bg-stroke4)"
|
|
250
|
+
},
|
|
251
|
+
"--wpds-color-stroke-interactive-brand": {
|
|
252
|
+
".": "var(--wpds-color-private-primary-stroke3)"
|
|
253
|
+
},
|
|
254
|
+
"--wpds-color-stroke-interactive-brand-active": {
|
|
255
|
+
".": "var(--wpds-color-private-primary-stroke4)"
|
|
256
|
+
},
|
|
257
|
+
"--wpds-color-stroke-interactive-brand-disabled": {
|
|
258
|
+
".": "var(--wpds-color-private-bg-stroke2)"
|
|
259
|
+
},
|
|
260
|
+
"--wpds-color-stroke-interactive-error-strong": {
|
|
261
|
+
".": "var(--wpds-color-private-error-stroke3)"
|
|
262
|
+
},
|
|
263
|
+
"--wpds-color-stroke-focus-brand": {
|
|
264
|
+
".": "var(--wpds-color-private-primary-stroke3)"
|
|
265
|
+
},
|
|
266
|
+
"--wpds-elevation-x-small": {
|
|
267
|
+
".": "0 1px 1px 0 #00000008, 0 1px 2px 0 #00000005, 0 3px 3px 0 #00000005, 0 4px 4px 0 #00000003"
|
|
268
|
+
},
|
|
269
|
+
"--wpds-elevation-small": {
|
|
270
|
+
".": "0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005"
|
|
271
|
+
},
|
|
272
|
+
"--wpds-elevation-medium": {
|
|
273
|
+
".": "0 2px 3px 0 #0000000d, 0 4px 5px 0 #0000000a, 0 12px 12px 0 #00000008, 0 16px 16px 0 #00000005"
|
|
274
|
+
},
|
|
275
|
+
"--wpds-elevation-large": {
|
|
276
|
+
".": "0 5px 15px 0 #00000014, 0 15px 27px 0 #00000012, 0 30px 36px 0 #0000000a, 0 50px 43px 0 #00000005"
|
|
277
|
+
},
|
|
278
|
+
"--wpds-spacing-05": {
|
|
279
|
+
".": "4px"
|
|
280
|
+
},
|
|
281
|
+
"--wpds-spacing-10": {
|
|
282
|
+
".": "8px"
|
|
283
|
+
},
|
|
284
|
+
"--wpds-spacing-15": {
|
|
285
|
+
".": "12px"
|
|
286
|
+
},
|
|
287
|
+
"--wpds-spacing-20": {
|
|
288
|
+
".": "16px"
|
|
289
|
+
},
|
|
290
|
+
"--wpds-spacing-30": {
|
|
291
|
+
".": "24px"
|
|
292
|
+
},
|
|
293
|
+
"--wpds-spacing-40": {
|
|
294
|
+
".": "32px"
|
|
295
|
+
},
|
|
296
|
+
"--wpds-spacing-50": {
|
|
297
|
+
".": "40px"
|
|
298
|
+
},
|
|
299
|
+
"--wpds-spacing-60": {
|
|
300
|
+
".": "48px"
|
|
301
|
+
},
|
|
302
|
+
"--wpds-spacing-70": {
|
|
303
|
+
".": "56px"
|
|
304
|
+
},
|
|
305
|
+
"--wpds-spacing-80": {
|
|
306
|
+
".": "64px"
|
|
307
|
+
},
|
|
308
|
+
"--wpds-font-family-heading": {
|
|
309
|
+
".": '-apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif'
|
|
310
|
+
},
|
|
311
|
+
"--wpds-font-family-body": {
|
|
312
|
+
".": '-apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif'
|
|
313
|
+
},
|
|
314
|
+
"--wpds-font-family-mono": {
|
|
315
|
+
".": '"Menlo", "Consolas", monaco, monospace'
|
|
316
|
+
},
|
|
317
|
+
"--wpds-font-size-x-small": {
|
|
318
|
+
".": "11px"
|
|
319
|
+
},
|
|
320
|
+
"--wpds-font-size-small": {
|
|
321
|
+
".": "12px"
|
|
322
|
+
},
|
|
323
|
+
"--wpds-font-size-medium": {
|
|
324
|
+
".": "13px"
|
|
325
|
+
},
|
|
326
|
+
"--wpds-font-size-large": {
|
|
327
|
+
".": "15px"
|
|
328
|
+
},
|
|
329
|
+
"--wpds-font-size-x-large": {
|
|
330
|
+
".": "20px"
|
|
331
|
+
},
|
|
332
|
+
"--wpds-font-size-2x-large": {
|
|
333
|
+
".": "32px"
|
|
334
|
+
},
|
|
335
|
+
"--wpds-font-line-height-x-small": {
|
|
336
|
+
".": "16px"
|
|
337
|
+
},
|
|
338
|
+
"--wpds-font-line-height-small": {
|
|
339
|
+
".": "20px"
|
|
340
|
+
},
|
|
341
|
+
"--wpds-font-line-height-medium": {
|
|
342
|
+
".": "24px"
|
|
343
|
+
},
|
|
344
|
+
"--wpds-font-line-height-large": {
|
|
345
|
+
".": "28px"
|
|
346
|
+
},
|
|
347
|
+
"--wpds-font-line-height-x-large": {
|
|
348
|
+
".": "32px"
|
|
349
|
+
},
|
|
350
|
+
"--wpds-font-line-height-2x-large": {
|
|
351
|
+
".": "40px"
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
//# sourceMappingURL=design-tokens.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/prebuilt/ts/design-tokens.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default {\n\t'--wpds-border-radius-x-small': {\n\t\t'.': '1px',\n\t},\n\t'--wpds-border-radius-small': {\n\t\t'.': '2px',\n\t},\n\t'--wpds-border-radius-medium': {\n\t\t'.': '4px',\n\t},\n\t'--wpds-border-radius-large': {\n\t\t'.': '8px',\n\t},\n\t'--wpds-border-width-focus': {\n\t\t'.': '2px',\n\t\t'high-dpi': '1.5px',\n\t},\n\t'--wpds-color-bg-surface-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-surface2)',\n\t},\n\t'--wpds-color-bg-surface-neutral-strong': {\n\t\t'.': 'var(--wpds-color-private-bg-surface3)',\n\t},\n\t'--wpds-color-bg-surface-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-surface1)',\n\t},\n\t'--wpds-color-bg-surface-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-surface1)',\n\t},\n\t'--wpds-color-bg-surface-success': {\n\t\t'.': 'var(--wpds-color-private-success-surface4)',\n\t},\n\t'--wpds-color-bg-surface-success-weak': {\n\t\t'.': 'var(--wpds-color-private-success-surface2)',\n\t},\n\t'--wpds-color-bg-surface-info': {\n\t\t'.': 'var(--wpds-color-private-info-surface4)',\n\t},\n\t'--wpds-color-bg-surface-info-weak': {\n\t\t'.': 'var(--wpds-color-private-info-surface2)',\n\t},\n\t'--wpds-color-bg-surface-warning': {\n\t\t'.': 'var(--wpds-color-private-warning-surface4)',\n\t},\n\t'--wpds-color-bg-surface-warning-weak': {\n\t\t'.': 'var(--wpds-color-private-warning-surface2)',\n\t},\n\t'--wpds-color-bg-surface-error': {\n\t\t'.': 'var(--wpds-color-private-error-surface4)',\n\t},\n\t'--wpds-color-bg-surface-error-weak': {\n\t\t'.': 'var(--wpds-color-private-error-surface2)',\n\t},\n\t'--wpds-color-bg-interactive-neutral': {\n\t\t'.': '#00000000',\n\t},\n\t'--wpds-color-bg-interactive-neutral-active': {\n\t\t'.': 'var(--wpds-color-private-bg-surface4)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface5)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-strong': {\n\t\t'.': 'var(--wpds-color-private-bg-bg-fill-inverted1)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-strong-active': {\n\t\t'.': 'var(--wpds-color-private-bg-bg-fill-inverted2)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-strong-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface6)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-weak': {\n\t\t'.': '#00000000',\n\t},\n\t'--wpds-color-bg-interactive-neutral-weak-active': {\n\t\t'.': 'var(--wpds-color-private-bg-surface4)',\n\t},\n\t'--wpds-color-bg-interactive-neutral-weak-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface5)',\n\t},\n\t'--wpds-color-bg-interactive-brand': {\n\t\t'.': '#00000000',\n\t},\n\t'--wpds-color-bg-interactive-brand-active': {\n\t\t'.': 'var(--wpds-color-private-primary-surface2)',\n\t},\n\t'--wpds-color-bg-interactive-brand-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface5)',\n\t},\n\t'--wpds-color-bg-interactive-brand-strong': {\n\t\t'.': 'var(--wpds-color-private-primary-bg-fill1)',\n\t},\n\t'--wpds-color-bg-interactive-brand-strong-active': {\n\t\t'.': 'var(--wpds-color-private-primary-bg-fill2)',\n\t},\n\t'--wpds-color-bg-interactive-brand-strong-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface6)',\n\t},\n\t'--wpds-color-bg-interactive-brand-weak': {\n\t\t'.': '#00000000',\n\t},\n\t'--wpds-color-bg-interactive-brand-weak-active': {\n\t\t'.': 'var(--wpds-color-private-primary-surface4)',\n\t},\n\t'--wpds-color-bg-interactive-brand-weak-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-surface5)',\n\t},\n\t'--wpds-color-bg-track-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke1)',\n\t},\n\t'--wpds-color-bg-track-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke2)',\n\t},\n\t'--wpds-color-bg-thumb-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke3)',\n\t},\n\t'--wpds-color-bg-thumb-neutral-weak-active': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke4)',\n\t},\n\t'--wpds-color-bg-thumb-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke3)',\n\t},\n\t'--wpds-color-bg-thumb-brand-active': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke3)',\n\t},\n\t'--wpds-color-bg-thumb-brand-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke2)',\n\t},\n\t'--wpds-color-fg-content-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface4)',\n\t},\n\t'--wpds-color-fg-content-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface3)',\n\t},\n\t'--wpds-color-fg-interactive-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface4)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-active': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface4)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface2)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-strong': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-fill-inverted)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-strong-active': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-fill-inverted)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-strong-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface3)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface3)',\n\t},\n\t'--wpds-color-fg-interactive-neutral-weak-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface2)',\n\t},\n\t'--wpds-color-fg-interactive-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-fg-surface3)',\n\t},\n\t'--wpds-color-fg-interactive-brand-active': {\n\t\t'.': 'var(--wpds-color-private-primary-fg-surface3)',\n\t},\n\t'--wpds-color-fg-interactive-brand-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface2)',\n\t},\n\t'--wpds-color-fg-interactive-brand-strong': {\n\t\t'.': 'var(--wpds-color-private-primary-fg-fill)',\n\t},\n\t'--wpds-color-fg-interactive-brand-strong-active': {\n\t\t'.': 'var(--wpds-color-private-primary-fg-fill)',\n\t},\n\t'--wpds-color-fg-interactive-brand-strong-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-fg-surface3)',\n\t},\n\t'--wpds-color-stroke-surface-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke2)',\n\t},\n\t'--wpds-color-stroke-surface-neutral-weak': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-neutral-strong': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke3)',\n\t},\n\t'--wpds-color-stroke-surface-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-brand-strong': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke3)',\n\t},\n\t'--wpds-color-stroke-surface-success': {\n\t\t'.': 'var(--wpds-color-private-success-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-success-strong': {\n\t\t'.': 'var(--wpds-color-private-success-stroke3)',\n\t},\n\t'--wpds-color-stroke-surface-info': {\n\t\t'.': 'var(--wpds-color-private-info-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-info-strong': {\n\t\t'.': 'var(--wpds-color-private-info-stroke3)',\n\t},\n\t'--wpds-color-stroke-surface-warning': {\n\t\t'.': 'var(--wpds-color-private-warning-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-warning-strong': {\n\t\t'.': 'var(--wpds-color-private-warning-stroke3)',\n\t},\n\t'--wpds-color-stroke-surface-error': {\n\t\t'.': 'var(--wpds-color-private-error-stroke1)',\n\t},\n\t'--wpds-color-stroke-surface-error-strong': {\n\t\t'.': 'var(--wpds-color-private-error-stroke3)',\n\t},\n\t'--wpds-color-stroke-interactive-neutral': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke3)',\n\t},\n\t'--wpds-color-stroke-interactive-neutral-active': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke4)',\n\t},\n\t'--wpds-color-stroke-interactive-neutral-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke2)',\n\t},\n\t'--wpds-color-stroke-interactive-neutral-strong': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke4)',\n\t},\n\t'--wpds-color-stroke-interactive-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke3)',\n\t},\n\t'--wpds-color-stroke-interactive-brand-active': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke4)',\n\t},\n\t'--wpds-color-stroke-interactive-brand-disabled': {\n\t\t'.': 'var(--wpds-color-private-bg-stroke2)',\n\t},\n\t'--wpds-color-stroke-interactive-error-strong': {\n\t\t'.': 'var(--wpds-color-private-error-stroke3)',\n\t},\n\t'--wpds-color-stroke-focus-brand': {\n\t\t'.': 'var(--wpds-color-private-primary-stroke3)',\n\t},\n\t'--wpds-elevation-x-small': {\n\t\t'.': '0 1px 1px 0 #00000008, 0 1px 2px 0 #00000005, 0 3px 3px 0 #00000005, 0 4px 4px 0 #00000003',\n\t},\n\t'--wpds-elevation-small': {\n\t\t'.': '0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005',\n\t},\n\t'--wpds-elevation-medium': {\n\t\t'.': '0 2px 3px 0 #0000000d, 0 4px 5px 0 #0000000a, 0 12px 12px 0 #00000008, 0 16px 16px 0 #00000005',\n\t},\n\t'--wpds-elevation-large': {\n\t\t'.': '0 5px 15px 0 #00000014, 0 15px 27px 0 #00000012, 0 30px 36px 0 #0000000a, 0 50px 43px 0 #00000005',\n\t},\n\t'--wpds-spacing-05': {\n\t\t'.': '4px',\n\t},\n\t'--wpds-spacing-10': {\n\t\t'.': '8px',\n\t},\n\t'--wpds-spacing-15': {\n\t\t'.': '12px',\n\t},\n\t'--wpds-spacing-20': {\n\t\t'.': '16px',\n\t},\n\t'--wpds-spacing-30': {\n\t\t'.': '24px',\n\t},\n\t'--wpds-spacing-40': {\n\t\t'.': '32px',\n\t},\n\t'--wpds-spacing-50': {\n\t\t'.': '40px',\n\t},\n\t'--wpds-spacing-60': {\n\t\t'.': '48px',\n\t},\n\t'--wpds-spacing-70': {\n\t\t'.': '56px',\n\t},\n\t'--wpds-spacing-80': {\n\t\t'.': '64px',\n\t},\n\t'--wpds-font-family-heading': {\n\t\t'.': '-apple-system, system-ui, \"Segoe UI\", \"Roboto\", \"Oxygen-Sans\", \"Ubuntu\", \"Cantarell\", \"Helvetica Neue\", sans-serif',\n\t},\n\t'--wpds-font-family-body': {\n\t\t'.': '-apple-system, system-ui, \"Segoe UI\", \"Roboto\", \"Oxygen-Sans\", \"Ubuntu\", \"Cantarell\", \"Helvetica Neue\", sans-serif',\n\t},\n\t'--wpds-font-family-mono': {\n\t\t'.': '\"Menlo\", \"Consolas\", monaco, monospace',\n\t},\n\t'--wpds-font-size-x-small': {\n\t\t'.': '11px',\n\t},\n\t'--wpds-font-size-small': {\n\t\t'.': '12px',\n\t},\n\t'--wpds-font-size-medium': {\n\t\t'.': '13px',\n\t},\n\t'--wpds-font-size-large': {\n\t\t'.': '15px',\n\t},\n\t'--wpds-font-size-x-large': {\n\t\t'.': '20px',\n\t},\n\t'--wpds-font-size-2x-large': {\n\t\t'.': '32px',\n\t},\n\t'--wpds-font-line-height-x-small': {\n\t\t'.': '16px',\n\t},\n\t'--wpds-font-line-height-small': {\n\t\t'.': '20px',\n\t},\n\t'--wpds-font-line-height-medium': {\n\t\t'.': '24px',\n\t},\n\t'--wpds-font-line-height-large': {\n\t\t'.': '28px',\n\t},\n\t'--wpds-font-line-height-x-large': {\n\t\t'.': '32px',\n\t},\n\t'--wpds-font-line-height-2x-large': {\n\t\t'.': '40px',\n\t},\n} as Record< string, Record< string, string > >;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,IAAO,wBAAQ;AAAA,EACd,gCAAgC;AAAA,IAC/B,KAAK;AAAA,EACN;AAAA,EACA,8BAA8B;AAAA,IAC7B,KAAK;AAAA,EACN;AAAA,EACA,+BAA+B;AAAA,IAC9B,KAAK;AAAA,EACN;AAAA,EACA,8BAA8B;AAAA,IAC7B,KAAK;AAAA,EACN;AAAA,EACA,6BAA6B;AAAA,IAC5B,KAAK;AAAA,IACL,YAAY;AAAA,EACb;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,0CAA0C;AAAA,IACzC,KAAK;AAAA,EACN;AAAA,EACA,wCAAwC;AAAA,IACvC,KAAK;AAAA,EACN;AAAA,EACA,iCAAiC;AAAA,IAChC,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,wCAAwC;AAAA,IACvC,KAAK;AAAA,EACN;AAAA,EACA,gCAAgC;AAAA,IAC/B,KAAK;AAAA,EACN;AAAA,EACA,qCAAqC;AAAA,IACpC,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,wCAAwC;AAAA,IACvC,KAAK;AAAA,EACN;AAAA,EACA,iCAAiC;AAAA,IAChC,KAAK;AAAA,EACN;AAAA,EACA,sCAAsC;AAAA,IACrC,KAAK;AAAA,EACN;AAAA,EACA,uCAAuC;AAAA,IACtC,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,gDAAgD;AAAA,IAC/C,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,uDAAuD;AAAA,IACtD,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,mDAAmD;AAAA,IAClD,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,qCAAqC;AAAA,IACpC,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,mDAAmD;AAAA,IAClD,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,0CAA0C;AAAA,IACzC,KAAK;AAAA,EACN;AAAA,EACA,iDAAiD;AAAA,IAChD,KAAK;AAAA,EACN;AAAA,EACA,mDAAmD;AAAA,IAClD,KAAK;AAAA,EACN;AAAA,EACA,sCAAsC;AAAA,IACrC,KAAK;AAAA,EACN;AAAA,EACA,iCAAiC;AAAA,IAChC,KAAK;AAAA,EACN;AAAA,EACA,sCAAsC;AAAA,IACrC,KAAK;AAAA,EACN;AAAA,EACA,6CAA6C;AAAA,IAC5C,KAAK;AAAA,EACN;AAAA,EACA,+BAA+B;AAAA,IAC9B,KAAK;AAAA,EACN;AAAA,EACA,sCAAsC;AAAA,IACrC,KAAK;AAAA,EACN;AAAA,EACA,wCAAwC;AAAA,IACvC,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,wCAAwC;AAAA,IACvC,KAAK;AAAA,EACN;AAAA,EACA,uCAAuC;AAAA,IACtC,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,gDAAgD;AAAA,IAC/C,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,uDAAuD;AAAA,IACtD,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,qCAAqC;AAAA,IACpC,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,mDAAmD;AAAA,IAClD,KAAK;AAAA,EACN;AAAA,EACA,qDAAqD;AAAA,IACpD,KAAK;AAAA,EACN;AAAA,EACA,uCAAuC;AAAA,IACtC,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,qCAAqC;AAAA,IACpC,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,uCAAuC;AAAA,IACtC,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,oCAAoC;AAAA,IACnC,KAAK;AAAA,EACN;AAAA,EACA,2CAA2C;AAAA,IAC1C,KAAK;AAAA,EACN;AAAA,EACA,uCAAuC;AAAA,IACtC,KAAK;AAAA,EACN;AAAA,EACA,8CAA8C;AAAA,IAC7C,KAAK;AAAA,EACN;AAAA,EACA,qCAAqC;AAAA,IACpC,KAAK;AAAA,EACN;AAAA,EACA,4CAA4C;AAAA,IAC3C,KAAK;AAAA,EACN;AAAA,EACA,2CAA2C;AAAA,IAC1C,KAAK;AAAA,EACN;AAAA,EACA,kDAAkD;AAAA,IACjD,KAAK;AAAA,EACN;AAAA,EACA,oDAAoD;AAAA,IACnD,KAAK;AAAA,EACN;AAAA,EACA,kDAAkD;AAAA,IACjD,KAAK;AAAA,EACN;AAAA,EACA,yCAAyC;AAAA,IACxC,KAAK;AAAA,EACN;AAAA,EACA,gDAAgD;AAAA,IAC/C,KAAK;AAAA,EACN;AAAA,EACA,kDAAkD;AAAA,IACjD,KAAK;AAAA,EACN;AAAA,EACA,gDAAgD;AAAA,IAC/C,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,4BAA4B;AAAA,IAC3B,KAAK;AAAA,EACN;AAAA,EACA,0BAA0B;AAAA,IACzB,KAAK;AAAA,EACN;AAAA,EACA,2BAA2B;AAAA,IAC1B,KAAK;AAAA,EACN;AAAA,EACA,0BAA0B;AAAA,IACzB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,IACpB,KAAK;AAAA,EACN;AAAA,EACA,8BAA8B;AAAA,IAC7B,KAAK;AAAA,EACN;AAAA,EACA,2BAA2B;AAAA,IAC1B,KAAK;AAAA,EACN;AAAA,EACA,2BAA2B;AAAA,IAC1B,KAAK;AAAA,EACN;AAAA,EACA,4BAA4B;AAAA,IAC3B,KAAK;AAAA,EACN;AAAA,EACA,0BAA0B;AAAA,IACzB,KAAK;AAAA,EACN;AAAA,EACA,2BAA2B;AAAA,IAC1B,KAAK;AAAA,EACN;AAAA,EACA,0BAA0B;AAAA,IACzB,KAAK;AAAA,EACN;AAAA,EACA,4BAA4B;AAAA,IAC3B,KAAK;AAAA,EACN;AAAA,EACA,6BAA6B;AAAA,IAC5B,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,iCAAiC;AAAA,IAChC,KAAK;AAAA,EACN;AAAA,EACA,kCAAkC;AAAA,IACjC,KAAK;AAAA,EACN;AAAA,EACA,iCAAiC;AAAA,IAChC,KAAK;AAAA,EACN;AAAA,EACA,mCAAmC;AAAA,IAClC,KAAK;AAAA,EACN;AAAA,EACA,oCAAoC;AAAA,IACnC,KAAK;AAAA,EACN;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var private_apis_exports = {};
|
|
20
|
+
__export(private_apis_exports, {
|
|
21
|
+
privateApis: () => privateApis
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(private_apis_exports);
|
|
24
|
+
var import_lock_unlock = require("./lock-unlock");
|
|
25
|
+
var import_theme_provider = require("./theme-provider");
|
|
26
|
+
var import_use_theme_provider_styles = require("./use-theme-provider-styles");
|
|
27
|
+
const privateApis = {};
|
|
28
|
+
(0, import_lock_unlock.lock)(privateApis, {
|
|
29
|
+
ThemeProvider: import_theme_provider.ThemeProvider,
|
|
30
|
+
useThemeProviderStyles: import_use_theme_provider_styles.useThemeProviderStyles
|
|
31
|
+
});
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
privateApis
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=private-apis.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/private-apis.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { ThemeProvider } from './theme-provider';\nimport { useThemeProviderStyles } from './use-theme-provider-styles';\n\nexport const privateApis = {};\nlock( privateApis, {\n\tThemeProvider,\n\tuseThemeProviderStyles,\n} );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,yBAAqB;AACrB,4BAA8B;AAC9B,uCAAuC;AAEhC,MAAM,cAAc,CAAC;AAAA,IAC5B,yBAAM,aAAa;AAAA,EAClB;AAAA,EACA;AACD,CAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var theme_provider_exports = {};
|
|
30
|
+
__export(theme_provider_exports, {
|
|
31
|
+
ThemeProvider: () => ThemeProvider
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(theme_provider_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_element = require("@wordpress/element");
|
|
36
|
+
var import_context = require("./context");
|
|
37
|
+
var import_use_theme_provider_styles = require("./use-theme-provider-styles");
|
|
38
|
+
var import_style = __toESM(require("./style.module.css"));
|
|
39
|
+
function cssObjectToText(values) {
|
|
40
|
+
return Object.entries(values).map(([key, value]) => `${key}: ${value};`).join("");
|
|
41
|
+
}
|
|
42
|
+
function generateCSSSelector({
|
|
43
|
+
instanceId,
|
|
44
|
+
isRoot
|
|
45
|
+
}) {
|
|
46
|
+
const rootSel = `[data-wpds-root-provider="true"]`;
|
|
47
|
+
const instanceIdSel = `[data-wpds-theme-provider-id="${instanceId}"]`;
|
|
48
|
+
const selectors = [];
|
|
49
|
+
if (isRoot) {
|
|
50
|
+
selectors.push(
|
|
51
|
+
`:root:has(.${import_style.default.root}${rootSel}${instanceIdSel})`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
selectors.push(`.${import_style.default.root}.${import_style.default.root}${instanceIdSel}`);
|
|
55
|
+
return selectors.join(",");
|
|
56
|
+
}
|
|
57
|
+
const ThemeProvider = ({
|
|
58
|
+
children,
|
|
59
|
+
color = {},
|
|
60
|
+
isRoot = false
|
|
61
|
+
}) => {
|
|
62
|
+
const instanceId = (0, import_element.useId)();
|
|
63
|
+
const { themeProviderStyles, resolvedSettings } = (0, import_use_theme_provider_styles.useThemeProviderStyles)({
|
|
64
|
+
color
|
|
65
|
+
});
|
|
66
|
+
const contextValue = (0, import_element.useMemo)(
|
|
67
|
+
() => ({
|
|
68
|
+
resolvedSettings
|
|
69
|
+
}),
|
|
70
|
+
[resolvedSettings]
|
|
71
|
+
);
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
73
|
+
themeProviderStyles ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `${generateCSSSelector({
|
|
74
|
+
instanceId,
|
|
75
|
+
isRoot
|
|
76
|
+
})} {${cssObjectToText(themeProviderStyles)}}` }) : null,
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
"data-wpds-theme-provider-id": instanceId,
|
|
81
|
+
"data-wpds-root-provider": isRoot,
|
|
82
|
+
className: import_style.default.root,
|
|
83
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.ThemeContext.Provider, { value: contextValue, children })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
] });
|
|
87
|
+
};
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
90
|
+
ThemeProvider
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=theme-provider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/theme-provider.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useId } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ThemeContext } from './context';\nimport { useThemeProviderStyles } from './use-theme-provider-styles';\nimport { type ThemeProviderProps } from './types';\nimport styles from './style.module.css';\n\nfunction cssObjectToText( values: CSSProperties ) {\n\treturn Object.entries( values )\n\t\t.map( ( [ key, value ] ) => `${ key }: ${ value };` )\n\t\t.join( '' );\n}\n\nfunction generateCSSSelector( {\n\tinstanceId,\n\tisRoot,\n}: {\n\tinstanceId: string;\n\tisRoot: boolean;\n} ) {\n\tconst rootSel = `[data-wpds-root-provider=\"true\"]`;\n\tconst instanceIdSel = `[data-wpds-theme-provider-id=\"${ instanceId }\"]`;\n\n\tconst selectors = [];\n\n\tif ( isRoot ) {\n\t\tselectors.push(\n\t\t\t`:root:has(.${ styles.root }${ rootSel }${ instanceIdSel })`\n\t\t);\n\t}\n\n\tselectors.push( `.${ styles.root }.${ styles.root }${ instanceIdSel }` );\n\n\treturn selectors.join( ',' );\n}\n\nexport const ThemeProvider = ( {\n\tchildren,\n\tcolor = {},\n\tisRoot = false,\n}: ThemeProviderProps ) => {\n\tconst instanceId = useId();\n\n\tconst { themeProviderStyles, resolvedSettings } = useThemeProviderStyles( {\n\t\tcolor,\n\t} );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tresolvedSettings,\n\t\t} ),\n\t\t[ resolvedSettings ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ themeProviderStyles ? (\n\t\t\t\t<style>\n\t\t\t\t\t{ `${ generateCSSSelector( {\n\t\t\t\t\t\tinstanceId,\n\t\t\t\t\t\tisRoot,\n\t\t\t\t\t} ) } {${ cssObjectToText( themeProviderStyles ) }}` }\n\t\t\t\t</style>\n\t\t\t) : null }\n\t\t\t<div\n\t\t\t\tdata-wpds-theme-provider-id={ instanceId }\n\t\t\t\tdata-wpds-root-provider={ isRoot }\n\t\t\t\tclassName={ styles.root }\n\t\t\t>\n\t\t\t\t<ThemeContext.Provider value={ contextValue }>\n\t\t\t\t\t{ children }\n\t\t\t\t</ThemeContext.Provider>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkEE;AA1DF,qBAA+B;AAK/B,qBAA6B;AAC7B,uCAAuC;AAEvC,mBAAmB;AAEnB,SAAS,gBAAiB,QAAwB;AACjD,SAAO,OAAO,QAAS,MAAO,EAC5B,IAAK,CAAE,CAAE,KAAK,KAAM,MAAO,GAAI,GAAI,KAAM,KAAM,GAAI,EACnD,KAAM,EAAG;AACZ;AAEA,SAAS,oBAAqB;AAAA,EAC7B;AAAA,EACA;AACD,GAGI;AACH,QAAM,UAAU;AAChB,QAAM,gBAAgB,iCAAkC,UAAW;AAEnE,QAAM,YAAY,CAAC;AAEnB,MAAK,QAAS;AACb,cAAU;AAAA,MACT,cAAe,aAAAA,QAAO,IAAK,GAAI,OAAQ,GAAI,aAAc;AAAA,IAC1D;AAAA,EACD;AAEA,YAAU,KAAM,IAAK,aAAAA,QAAO,IAAK,IAAK,aAAAA,QAAO,IAAK,GAAI,aAAc,EAAG;AAEvE,SAAO,UAAU,KAAM,GAAI;AAC5B;AAEO,MAAM,gBAAgB,CAAE;AAAA,EAC9B;AAAA,EACA,QAAQ,CAAC;AAAA,EACT,SAAS;AACV,MAA2B;AAC1B,QAAM,iBAAa,sBAAM;AAEzB,QAAM,EAAE,qBAAqB,iBAAiB,QAAI,yDAAwB;AAAA,IACzE;AAAA,EACD,CAAE;AAEF,QAAM,mBAAe;AAAA,IACpB,OAAQ;AAAA,MACP;AAAA,IACD;AAAA,IACA,CAAE,gBAAiB;AAAA,EACpB;AAEA,SACC,4EACG;AAAA,0BACD,4CAAC,WACE,aAAI,oBAAqB;AAAA,MAC1B;AAAA,MACA;AAAA,IACD,CAAE,CAAE,KAAM,gBAAiB,mBAAoB,CAAE,KAClD,IACG;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACA,+BAA8B;AAAA,QAC9B,2BAA0B;AAAA,QAC1B,WAAY,aAAAA,QAAO;AAAA,QAEnB,sDAAC,4BAAa,UAAb,EAAsB,OAAQ,cAC5B,UACH;AAAA;AAAA,IACD;AAAA,KACD;AAEF;",
|
|
6
|
+
"names": ["styles"]
|
|
7
|
+
}
|
package/build/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport { type ReactNode } from 'react';\n\nexport interface ThemeProviderSettings {\n\t/**\n\t * The set of color options to apply to the theme.\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * The primary seed color to use for the theme.\n\t\t *\n\t\t * By default, it inherits from parent `ThemeProvider`,\n\t\t * and fallbacks to statically built CSS.\n\t\t */\n\t\tprimary?: string;\n\t\t/**\n\t\t * The background seed color to use for the theme.\n\t\t *\n\t\t * By default, it inherits from parent `ThemeProvider`,\n\t\t * and fallbacks to statically built CSS.\n\t\t */\n\t\tbg?: string;\n\t};\n}\n\nexport interface ThemeProviderProps extends ThemeProviderSettings {\n\t/**\n\t * The children to render.\n\t */\n\tchildren?: ReactNode;\n\n\t/**\n\t * When a ThemeProvider is the root provider, it will apply its theming\n\t * settings also to the root document element (e.g. the html element).\n\t * This is useful, for example, to make sure that the `html` element can\n\t * consume the right background color, or that overlays rendered inside a\n\t * portal can inherit the correct color scheme.\n\t *\n\t * @default false\n\t */\n\tisRoot?: boolean;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|