@ebrains/react 0.0.1-alpha.0 → 0.3.0-alpha.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/README.md +4 -48
- package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
- package/arrow-right-9322ba8a.esm.js +5 -0
- package/bluesky-cc5edd2d.esm.js +14 -0
- package/chevron-down-6144c823.esm.js +12 -0
- package/chevron-left-ca6c66e1.esm.js +11 -0
- package/chevron-right-b88ed2d4.esm.js +5 -0
- package/chevron-up-c66bd477.esm.js +12 -0
- package/close-87fc0d63.esm.js +5 -0
- package/color-0ba8ed56.esm.js +423 -0
- package/color-primary-palette_6.entry.esm.js +756 -0
- package/copy-03b72cb6.esm.js +5 -0
- package/correct-use-of-colors.entry.esm.js +243 -0
- package/eds-accordion.entry.esm.js +132 -0
- package/eds-alert.entry.esm.js +102 -0
- package/eds-avatar_17.entry.esm.js +209 -0
- package/eds-card-desc_3.entry.esm.js +129 -0
- package/eds-card-generic.entry.esm.js +125 -0
- package/eds-card-project.entry.esm.js +92 -0
- package/eds-card-section.entry.esm.js +70 -0
- package/eds-card-tags.entry.esm.js +27 -0
- package/eds-card-tool.entry.esm.js +106 -0
- package/eds-card-wrapper.entry.esm.js +39 -0
- package/eds-code-block.entry.esm.js +2243 -0
- package/eds-components-section.entry.esm.js +146 -0
- package/eds-docs-palettes.entry.esm.js +29 -0
- package/eds-docs-tokens.entry.esm.js +45 -0
- package/eds-form.entry.esm.js +374 -0
- package/eds-frame.entry.esm.js +117 -0
- package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
- package/eds-icon-arrow-right.entry.esm.js +21 -0
- package/eds-icon-bluesky.entry.esm.js +21 -0
- package/eds-icon-chevron-down.entry.esm.js +21 -0
- package/eds-icon-chevron-left.entry.esm.js +21 -0
- package/eds-icon-chevron-right.entry.esm.js +21 -0
- package/eds-icon-chevron-up.entry.esm.js +21 -0
- package/eds-icon-close.entry.esm.js +21 -0
- package/eds-icon-copy.entry.esm.js +21 -0
- package/eds-icon-eu.entry.esm.js +21 -0
- package/eds-icon-facebook.entry.esm.js +21 -0
- package/eds-icon-gitlab.entry.esm.js +21 -0
- package/eds-icon-linkedin.entry.esm.js +21 -0
- package/eds-icon-loader.entry.esm.js +21 -0
- package/eds-icon-mastodon.entry.esm.js +21 -0
- package/eds-icon-menu.entry.esm.js +21 -0
- package/eds-icon-more.entry.esm.js +21 -0
- package/eds-icon-search.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +21 -0
- package/eds-icon-user.entry.esm.js +21 -0
- package/eds-icon-youtube.entry.esm.js +21 -0
- package/eds-input_7.entry.esm.js +518 -0
- package/eds-login.entry.esm.js +76 -0
- package/eds-logo-variations.entry.esm.js +29 -0
- package/eds-matomo-notice.entry.esm.js +129 -0
- package/eds-modal.entry.esm.js +114 -0
- package/eds-navigator.entry.esm.js +72 -0
- package/eds-pagination_2.entry.esm.js +456 -0
- package/eds-progress-bar.entry.esm.js +36 -0
- package/eds-rating.entry.esm.js +71 -0
- package/eds-section-core_2.entry.esm.js +69 -0
- package/eds-svg-repository.entry.esm.js +325 -0
- package/eds-tab.entry.esm.js +41 -0
- package/eds-tabs-content.entry.esm.js +145 -0
- package/eds-tabs.entry.esm.js +155 -0
- package/eds-timeline.entry.esm.js +130 -0
- package/eds-tooltip.entry.esm.js +116 -0
- package/eds-trl.entry.esm.js +69 -0
- package/eu-9ddde93a.esm.js +30 -0
- package/facebook-9cb5c17f.esm.js +14 -0
- package/incorrect-use-of-colors.entry.esm.js +71 -0
- package/index-39c58238.esm.js +58 -0
- package/index.esm.js +3 -2668
- package/index.esm2.js +4791 -0
- package/keycloak-13893af6.esm.js +1594 -0
- package/linkedin-e8650abb.esm.js +28 -0
- package/loader-c9628637.esm.js +30 -0
- package/logo-color-7f1fd803.esm.js +115 -0
- package/logo-color-margins-ff8ce71b.esm.js +118 -0
- package/logo-space.entry.esm.js +32 -0
- package/logo-variations-horizontal_2.entry.esm.js +116 -0
- package/logo-white-no-bg-f382f86f.esm.js +1021 -0
- package/logo-wrong-usage.entry.esm.js +137 -0
- package/mastodon-3703ec61.esm.js +14 -0
- package/menu-340ea948.esm.js +11 -0
- package/mono-53f70232.esm.js +11 -0
- package/more-4449d549.esm.js +13 -0
- package/package.json +1 -1
- package/search-fbcd79c2.esm.js +12 -0
- package/src/components.d.ts +40 -0
- package/src/index.d.ts +1 -1
- package/src/react-component-lib/attachProps.d.ts +16 -0
- package/src/react-component-lib/case.d.ts +2 -0
- package/src/react-component-lib/createComponent.d.ts +10 -0
- package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
- package/src/react-component-lib/dev.d.ts +2 -0
- package/src/react-component-lib/index.d.ts +2 -0
- package/src/react-component-lib/interfaces.d.ts +29 -0
- package/src/react-component-lib/utils/attachProps.d.ts +16 -0
- package/src/react-component-lib/utils/case.d.ts +2 -0
- package/src/react-component-lib/utils/index.d.ts +10 -0
- package/success-443809da.esm.js +18 -0
- package/toastManager-d9eee791.esm.js +34 -0
- package/token-list_3.entry.esm.js +385 -0
- package/token-ratios.entry.esm.js +49 -0
- package/token-spacing.entry.esm.js +93 -0
- package/token-typography.entry.esm.js +264 -0
- package/twitter-ac21b505.esm.js +14 -0
- package/user-71ebdc15.esm.js +16 -0
- package/youtube-efbfbdc4.esm.js +14 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const colors = {
|
|
7
|
+
tokens: {
|
|
8
|
+
// grey
|
|
9
|
+
'grey-100': '#f8f8f8',
|
|
10
|
+
'grey-200': '#f2f2f2',
|
|
11
|
+
'grey-300': '#e6e6e6',
|
|
12
|
+
'grey-400': '#d8d8d8',
|
|
13
|
+
'grey-500': '#8c8c8c',
|
|
14
|
+
'grey-600': '#6e6e6e',
|
|
15
|
+
'grey-700': '#666666',
|
|
16
|
+
'grey-800': '#4d4d4d',
|
|
17
|
+
'grey-900': '#242424',
|
|
18
|
+
// green
|
|
19
|
+
'green-100': '#eaffee',
|
|
20
|
+
'green-200': '#d3ffdc',
|
|
21
|
+
'green-300': '#9dffb4',
|
|
22
|
+
'green-400': '#63fb92',
|
|
23
|
+
'green-500': '#00e766',
|
|
24
|
+
'green-600': '#00c959',
|
|
25
|
+
'green-700': '#009d45',
|
|
26
|
+
'green-800': '#007734',
|
|
27
|
+
'green-900': '#004f23',
|
|
28
|
+
// yellow
|
|
29
|
+
'yellow-100': '#fefee5',
|
|
30
|
+
'yellow-200': '#ffffcb',
|
|
31
|
+
'yellow-300': '#fdfdaa',
|
|
32
|
+
'yellow-400': '#ffff8b',
|
|
33
|
+
'yellow-500': '#ffff51',
|
|
34
|
+
'yellow-600': '#f3f30a',
|
|
35
|
+
'yellow-700': '#d7d72b',
|
|
36
|
+
'yellow-800': '#9a9a1e',
|
|
37
|
+
'yellow-900': '#636313',
|
|
38
|
+
// orange
|
|
39
|
+
'orange-100': '#fff4ee',
|
|
40
|
+
'orange-200': '#ffeade',
|
|
41
|
+
'orange-300': '#ffdcc5',
|
|
42
|
+
'orange-400': '#ffcca9',
|
|
43
|
+
'orange-500': '#ffb87e',
|
|
44
|
+
'orange-600': '#ffa543',
|
|
45
|
+
'orange-700': '#cb7f28',
|
|
46
|
+
'orange-800': '#995f1e',
|
|
47
|
+
'orange-900': '#653f14',
|
|
48
|
+
// red
|
|
49
|
+
'red-100': '#feefef',
|
|
50
|
+
'red-200': '#ffe0e1',
|
|
51
|
+
'red-300': '#ffc7c9',
|
|
52
|
+
'red-400': '#ff9ea2',
|
|
53
|
+
'red-500': '#ff7a7f',
|
|
54
|
+
'red-600': '#ff4d68',
|
|
55
|
+
'red-700': '#d01111',
|
|
56
|
+
'red-800': '#a3001a',
|
|
57
|
+
'red-900': '#6f0011',
|
|
58
|
+
// purple
|
|
59
|
+
'purple-100': '#f9f3ff',
|
|
60
|
+
'purple-200': '#f4e8ff',
|
|
61
|
+
'purple-300': '#e9ceff',
|
|
62
|
+
'purple-400': '#ddb1ff',
|
|
63
|
+
'purple-500': '#d18fff',
|
|
64
|
+
'purple-600': '#c461ff',
|
|
65
|
+
'purple-700': '#af56e4',
|
|
66
|
+
'purple-800': '#8337b1',
|
|
67
|
+
'purple-900': '#3d1e4f',
|
|
68
|
+
// blue
|
|
69
|
+
'blue-100': '#eff0ff',
|
|
70
|
+
'blue-200': '#dee0ff',
|
|
71
|
+
'blue-300': '#caceff',
|
|
72
|
+
'blue-400': '#b2b8ff',
|
|
73
|
+
'blue-500': '#7a89f5',
|
|
74
|
+
'blue-600': '#2b69fc',
|
|
75
|
+
'blue-700': '#0034cb',
|
|
76
|
+
'blue-800': '#002799',
|
|
77
|
+
'blue-900': '#001a65',
|
|
78
|
+
// cyan
|
|
79
|
+
'cyan-100': '#E0EEFF',
|
|
80
|
+
'cyan-200': '#D3E6FF',
|
|
81
|
+
'cyan-300': '#B5D8FF',
|
|
82
|
+
'cyan-400': '#92C8FF',
|
|
83
|
+
'cyan-500': '#6CBFFE',
|
|
84
|
+
'cyan-600': '#3FA9F5',
|
|
85
|
+
'cyan-700': '#267FBE',
|
|
86
|
+
'cyan-800': '#1F689B',
|
|
87
|
+
'cyan-900': '#15496D',
|
|
88
|
+
// Generics
|
|
89
|
+
black: '#000000',
|
|
90
|
+
white: '#ffffff',
|
|
91
|
+
transparent: 'transparent',
|
|
92
|
+
current: 'currentColor'
|
|
93
|
+
},
|
|
94
|
+
border: {
|
|
95
|
+
default: 'black',
|
|
96
|
+
inverse: 'white',
|
|
97
|
+
'inverse-soft': 'rgba(255, 255, 255, 0.3)',
|
|
98
|
+
'inverse-softer': 'rgba(255, 255, 255, 0.15)',
|
|
99
|
+
soft: 'rgba(0, 0, 0, .15 )',
|
|
100
|
+
softer: 'rgba(0, 0, 0, .1 )',
|
|
101
|
+
softest: 'rgba(0, 0, 0, .05 )',
|
|
102
|
+
accent: 'green-500',
|
|
103
|
+
error: 'red-700',
|
|
104
|
+
current: 'currentColor',
|
|
105
|
+
transparent: 'transparent'
|
|
106
|
+
},
|
|
107
|
+
text: {
|
|
108
|
+
inverse: 'white',
|
|
109
|
+
default: 'black',
|
|
110
|
+
current: 'currentColor',
|
|
111
|
+
transparent: 'transparent',
|
|
112
|
+
light: 'grey-700',
|
|
113
|
+
lighter: 'grey-600',
|
|
114
|
+
lightest: 'grey-500',
|
|
115
|
+
'extra-light': 'grey-300',
|
|
116
|
+
success: 'green-800',
|
|
117
|
+
warning: 'yellow-900',
|
|
118
|
+
error: 'red-700',
|
|
119
|
+
accent: 'green-500',
|
|
120
|
+
'on-gradient': 'rgba(0, 0, 0, 0.55)'
|
|
121
|
+
},
|
|
122
|
+
background: {
|
|
123
|
+
default: 'grey-200',
|
|
124
|
+
inverse: 'white',
|
|
125
|
+
'inverse-soft': 'rgba(255, 255, 255, .2)',
|
|
126
|
+
'inverse-softer': 'rgba(255, 255, 255, .15)',
|
|
127
|
+
dark: 'grey-300',
|
|
128
|
+
darker: 'grey-400',
|
|
129
|
+
strong: 'grey-700',
|
|
130
|
+
'strong-dark': 'grey-800',
|
|
131
|
+
stronger: 'grey-900',
|
|
132
|
+
strongest: 'black',
|
|
133
|
+
'strongest-soft': 'rgba(0, 0, 0, .05)',
|
|
134
|
+
accent: 'green-500',
|
|
135
|
+
'accent-dark': 'green-600',
|
|
136
|
+
'accent-darker': 'green-800',
|
|
137
|
+
success: 'green-200',
|
|
138
|
+
warning: 'yellow-200',
|
|
139
|
+
error: 'red-200',
|
|
140
|
+
current: 'currentColor',
|
|
141
|
+
transparent: 'transparent',
|
|
142
|
+
overlay: 'rgba(0, 0, 0, 0.25)',
|
|
143
|
+
'on-gradient': 'rgba(0, 0, 0, 0.1)',
|
|
144
|
+
'on-dark': 'rgba(255, 255, 255, 0.2)'
|
|
145
|
+
},
|
|
146
|
+
underline: {
|
|
147
|
+
accent: 'green-500',
|
|
148
|
+
light: 'grey-700',
|
|
149
|
+
lighter: 'grey-600',
|
|
150
|
+
lightest: 'grey-500',
|
|
151
|
+
'extra-light': 'grey-300'
|
|
152
|
+
},
|
|
153
|
+
outline: {
|
|
154
|
+
default: 'black',
|
|
155
|
+
accent: 'green-500'
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Gradients token are created manually inside gradients.css utility file.
|
|
159
|
+
* This mapping is here to generate gradients view inside storybook
|
|
160
|
+
* @file: ui-components/src/assets/styles/utilities/gradient.css
|
|
161
|
+
*/
|
|
162
|
+
gradients: {
|
|
163
|
+
'gradient-01-top': 'gradient-01-top',
|
|
164
|
+
'gradient-02-top': 'gradient-02-top',
|
|
165
|
+
'gradient-03-top': 'gradient-03-top',
|
|
166
|
+
'gradient-04-top': 'gradient-04-top',
|
|
167
|
+
'gradient-01-bottom': 'gradient-01-bottom',
|
|
168
|
+
'gradient-02-bottom': 'gradient-02-bottom',
|
|
169
|
+
'gradient-03-bottom': 'gradient-03-bottom',
|
|
170
|
+
'gradient-04-bottom': 'gradient-04-bottom'
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const TokenList = class {
|
|
174
|
+
constructor(hostRef) {
|
|
175
|
+
registerInstance(this, hostRef);
|
|
176
|
+
this.show = undefined;
|
|
177
|
+
}
|
|
178
|
+
getTextColor(value) {
|
|
179
|
+
if (value.startsWith('rgba') || value.startsWith('rgb')) {
|
|
180
|
+
const rgba = value.replace(/rgba?\(/, '').replace(')', '').split(',').map(v => parseFloat(v.trim()));
|
|
181
|
+
const r = rgba[0];
|
|
182
|
+
const g = rgba[1];
|
|
183
|
+
const b = rgba[2];
|
|
184
|
+
const brightness = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
185
|
+
return brightness > 0.5 ? 'text-default' : 'text-inverse';
|
|
186
|
+
} else if (value.startsWith('#')) {
|
|
187
|
+
const color = value.replace('#', '');
|
|
188
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
189
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
190
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
191
|
+
const brightness = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
192
|
+
return brightness > 0.5 ? 'text-default' : 'text-inverse';
|
|
193
|
+
}
|
|
194
|
+
return 'text-default';
|
|
195
|
+
}
|
|
196
|
+
resolveColor(value) {
|
|
197
|
+
if (colors.tokens[value]) {
|
|
198
|
+
return colors.tokens[value];
|
|
199
|
+
}
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
renderSection(sectionName, sectionContent) {
|
|
203
|
+
if (sectionName === 'tokens') {
|
|
204
|
+
const groupedTokens = this.groupTokensByCategory(sectionContent);
|
|
205
|
+
return Object.entries(groupedTokens).map(([, tokens]) => h("ul", {
|
|
206
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
207
|
+
}, tokens.map(token => {
|
|
208
|
+
const tokenName = Object.keys(token)[0];
|
|
209
|
+
const tokenValue = this.resolveColor(token[tokenName]);
|
|
210
|
+
const textColorClass = this.getTextColor(tokenValue);
|
|
211
|
+
return h("li", {
|
|
212
|
+
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
213
|
+
}, h("div", {
|
|
214
|
+
class: "effect-height items-center justify-between p-16 hidden lg:flex",
|
|
215
|
+
style: {
|
|
216
|
+
backgroundColor: tokenValue
|
|
217
|
+
}
|
|
218
|
+
}, h("span", {
|
|
219
|
+
class: `${textColorClass} f-body-02`
|
|
220
|
+
}, tokenName), h("div", {
|
|
221
|
+
class: "inline-flex"
|
|
222
|
+
}, h("eds-code-block", {
|
|
223
|
+
code: tokenValue,
|
|
224
|
+
language: "hex",
|
|
225
|
+
class: "min-w-[210px] mr-4"
|
|
226
|
+
}), h("eds-code-block", {
|
|
227
|
+
language: "css",
|
|
228
|
+
code: `var(--${tokenName})`,
|
|
229
|
+
class: "min-w-[210px]"
|
|
230
|
+
}))), h("div", {
|
|
231
|
+
class: "effect-height items-center justify-between p-16 block lg:hidden",
|
|
232
|
+
style: {
|
|
233
|
+
backgroundColor: tokenValue
|
|
234
|
+
}
|
|
235
|
+
}, h("span", {
|
|
236
|
+
class: `${textColorClass} f-body-02`
|
|
237
|
+
}, tokenName), h("div", {
|
|
238
|
+
class: "inline block"
|
|
239
|
+
}, h("eds-code-block", {
|
|
240
|
+
code: tokenValue,
|
|
241
|
+
class: "min-w-[210px] mb-4"
|
|
242
|
+
}), h("eds-code-block", {
|
|
243
|
+
code: `var(--${tokenName})`,
|
|
244
|
+
class: "min-w-[210px]"
|
|
245
|
+
}))));
|
|
246
|
+
})));
|
|
247
|
+
}
|
|
248
|
+
return h("ul", {
|
|
249
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
250
|
+
}, Object.entries(sectionContent).map(([key, value]) => {
|
|
251
|
+
const resolvedValue = this.resolveColor(value);
|
|
252
|
+
const textColorClass = this.getTextColor(resolvedValue);
|
|
253
|
+
const style = resolvedValue.startsWith('#') || resolvedValue.startsWith('rgb') ? {
|
|
254
|
+
backgroundColor: resolvedValue
|
|
255
|
+
} : {
|
|
256
|
+
border: `2px solid ${resolvedValue}`
|
|
257
|
+
};
|
|
258
|
+
return h("li", {
|
|
259
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col"
|
|
260
|
+
}, h("div", {
|
|
261
|
+
class: "effect-height block lg:flex items-center justify-between p-16",
|
|
262
|
+
style: style
|
|
263
|
+
}, h("div", {
|
|
264
|
+
class: "w-full flex"
|
|
265
|
+
}, h("span", {
|
|
266
|
+
class: `${textColorClass} mr-auto font-bold`
|
|
267
|
+
}, key), h("span", {
|
|
268
|
+
class: `${textColorClass} ml-auto mr-4 font-bold`
|
|
269
|
+
}, value)), h("span", {
|
|
270
|
+
class: `${textColorClass}`
|
|
271
|
+
}, sectionName === 'background' ? h("eds-code-block", {
|
|
272
|
+
code: `bg-${key}`,
|
|
273
|
+
class: "min-w-[210px] mr-4"
|
|
274
|
+
}) : h("eds-code-block", {
|
|
275
|
+
code: `${sectionName}-${key}`,
|
|
276
|
+
class: sectionName === 'border' ? 'min-w-[250px] mr-4' : 'min-w-[210px] mr-4'
|
|
277
|
+
}))));
|
|
278
|
+
}));
|
|
279
|
+
}
|
|
280
|
+
groupTokensByCategory(tokens) {
|
|
281
|
+
const grouped = {};
|
|
282
|
+
Object.entries(tokens).forEach(([key, value]) => {
|
|
283
|
+
const category = key.split('-')[0];
|
|
284
|
+
if (!grouped[category]) {
|
|
285
|
+
grouped[category] = [];
|
|
286
|
+
}
|
|
287
|
+
grouped[category].push({
|
|
288
|
+
[key]: value
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
return grouped;
|
|
292
|
+
}
|
|
293
|
+
render() {
|
|
294
|
+
// Check if `show` prop is provided; if not, display all sections
|
|
295
|
+
const sectionsToDisplay = this.show ? {
|
|
296
|
+
[this.show]: colors[this.show]
|
|
297
|
+
} : colors;
|
|
298
|
+
return h("section", {
|
|
299
|
+
key: 'ac8573b341ad313eba0f9f082dcc72cfc81208b3',
|
|
300
|
+
class: "w-full mt-28"
|
|
301
|
+
}, Object.entries(sectionsToDisplay).map(([sectionName, sectionContent]) =>
|
|
302
|
+
// Only render sections that exist in `colors`
|
|
303
|
+
sectionContent ? this.renderSection(sectionName, sectionContent) : null));
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const radii = {
|
|
307
|
+
xxs: '2px',
|
|
308
|
+
xs: '4px',
|
|
309
|
+
sm: '8px',
|
|
310
|
+
md: '12px',
|
|
311
|
+
lg: '16px',
|
|
312
|
+
pill: '100px'
|
|
313
|
+
};
|
|
314
|
+
const TokenRadii = class {
|
|
315
|
+
constructor(hostRef) {
|
|
316
|
+
registerInstance(this, hostRef);
|
|
317
|
+
}
|
|
318
|
+
render() {
|
|
319
|
+
return h("section", {
|
|
320
|
+
key: '84dabcd5a39d49e116f8fc9e9b26e00455c7fbb3',
|
|
321
|
+
class: "w-full mt-28"
|
|
322
|
+
}, h("ul", {
|
|
323
|
+
key: 'a821c747c45b8898ab2e7626d2ead91814549335',
|
|
324
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
325
|
+
}, Object.entries(radii).map(([key, value]) => h("li", {
|
|
326
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
327
|
+
}, h("div", {
|
|
328
|
+
class: `w-full p-16 block lg:flex items-center justify-center text-center border-3 border-soft rounded-${key}`
|
|
329
|
+
}, h("eds-code-block", {
|
|
330
|
+
language: "Utility Class",
|
|
331
|
+
code: `rounded-${key}`,
|
|
332
|
+
class: "mx-auto min-w-[200px] sm:mb-4 sm:max-w-[200px] mr-auto"
|
|
333
|
+
}), h("eds-code-block", {
|
|
334
|
+
code: `border-radius:${value}`,
|
|
335
|
+
language: "css",
|
|
336
|
+
class: "mx-auto min-w-[200px] sm:max-w-[200px] ml-auto"
|
|
337
|
+
}))))));
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
const shadows = {
|
|
341
|
+
small: '0px 1.5px 2px rgba(0, 0, 0, 0.1)',
|
|
342
|
+
hover: '0px 0px 16px rgba(0, 0, 0, 0.2)',
|
|
343
|
+
accent: '0px 0px 12px rgba(0, 201, 89, 0.6)',
|
|
344
|
+
podium: '0px 0px 8px 8px rgb(0 0 0 / 25%);',
|
|
345
|
+
border: '0 10px 10px rgba(0, 0, 0, 0.15);',
|
|
346
|
+
'border-top': '0 -10px 10px rgba(0, 0, 0, 0.15);'
|
|
347
|
+
};
|
|
348
|
+
const dropShadows = {
|
|
349
|
+
small: '0px 0px 16px rgba(0, 0, 0, 0.3)'
|
|
350
|
+
};
|
|
351
|
+
const shadowTokens = {
|
|
352
|
+
shadows,
|
|
353
|
+
dropShadows
|
|
354
|
+
};
|
|
355
|
+
const TokenShadows = class {
|
|
356
|
+
constructor(hostRef) {
|
|
357
|
+
registerInstance(this, hostRef);
|
|
358
|
+
}
|
|
359
|
+
render() {
|
|
360
|
+
return h("section", {
|
|
361
|
+
key: '4575feac8b5bff23aed39733e638fbb62916988f',
|
|
362
|
+
class: "w-full mt-28"
|
|
363
|
+
}, h("ul", {
|
|
364
|
+
key: 'c9833aa0d698a7ec33911011ccb9227d43c8261a',
|
|
365
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
366
|
+
}, Object.entries(shadowTokens).map(([category, tokens]) => Object.entries(tokens).map(([key, value]) => h("li", {
|
|
367
|
+
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col items-center mt-16"
|
|
368
|
+
}, h("div", {
|
|
369
|
+
class: "w-full p-16 block lg:flex items-center justify-center text-center border-2 border-soft",
|
|
370
|
+
style: {
|
|
371
|
+
boxShadow: value
|
|
372
|
+
}
|
|
373
|
+
}, h("eds-code-block", {
|
|
374
|
+
code: `${category}-${key}`,
|
|
375
|
+
language: "Utility Class",
|
|
376
|
+
class: "mr-auto sm:mb-4 min-w-[200px]"
|
|
377
|
+
}), h("eds-code-block", {
|
|
378
|
+
code: `${value}`,
|
|
379
|
+
language: "css",
|
|
380
|
+
class: "ml-auto min-w-[200px]"
|
|
381
|
+
})))))));
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export { TokenList as token_list, TokenRadii as token_radii, TokenShadows as token_shadows };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const ratios = {
|
|
7
|
+
'1x1': '1/1',
|
|
8
|
+
'21x9': '21/9',
|
|
9
|
+
'16x9': '16/9',
|
|
10
|
+
'3x2': '3/2',
|
|
11
|
+
'4x3': '4/3',
|
|
12
|
+
'4x5': '4/5'
|
|
13
|
+
};
|
|
14
|
+
const TokenRatios = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
registerInstance(this, hostRef);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return h("section", {
|
|
20
|
+
key: '9c4dc70bd40a40fbeedc88280ea3fdd4b2597e40',
|
|
21
|
+
class: "w-full"
|
|
22
|
+
}, h("eds-section-core", {
|
|
23
|
+
key: '039b72b762e48f62a4fa58d5af7803d0ed73bf6a',
|
|
24
|
+
tag: "div",
|
|
25
|
+
"section-title": "Aspect Ratios",
|
|
26
|
+
"heading-level": "h3"
|
|
27
|
+
}, h("ul", {
|
|
28
|
+
key: 'be3e37d842a24536488b7bc03f24399faa1304ff',
|
|
29
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
30
|
+
}, Object.entries(ratios).map(([key, value]) => h("li", {
|
|
31
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
32
|
+
}, h("div", {
|
|
33
|
+
class: "container ratio-box flex items-center justify-center text-center border-2 border-soft",
|
|
34
|
+
style: {
|
|
35
|
+
aspectRatio: value.replace('/', ':'),
|
|
36
|
+
// Cast to string to resolve TypeScript error
|
|
37
|
+
width: '100%',
|
|
38
|
+
// Full width to show the aspect ratio correctly
|
|
39
|
+
maxWidth: '300px'
|
|
40
|
+
}
|
|
41
|
+
}, h("span", {
|
|
42
|
+
class: "text-default font-bold mr-auto"
|
|
43
|
+
}, "aspect-", key), h("span", {
|
|
44
|
+
class: "mt-2 text-sm ml-auto"
|
|
45
|
+
}, value)))))));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { TokenRatios as token_ratios };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const TokenSpacing = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return h("div", {
|
|
12
|
+
key: '5f72b8386e92973faca8b22ebadcffa5b8ca8744',
|
|
13
|
+
class: "w-full"
|
|
14
|
+
}, h("ul", {
|
|
15
|
+
key: '619cc2546059aaac566dc89f56b098f72f7c2bde',
|
|
16
|
+
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
17
|
+
}, h("li", {
|
|
18
|
+
key: 'b90587543210e02a577854ce061472ef8f3bdc7a',
|
|
19
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
20
|
+
}, h("div", {
|
|
21
|
+
key: 'd98ea95c641209ba592aae8c695e278549840420',
|
|
22
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
23
|
+
}, h("div", {
|
|
24
|
+
key: '6dd84540a213d98fa09480eac823fe030dfb2404',
|
|
25
|
+
class: "spacing-sample m-32 bg-darker"
|
|
26
|
+
}, h("span", {
|
|
27
|
+
key: 'ad0493ba8d97cdcc15535505db4d726d6f69bd38',
|
|
28
|
+
class: "text-white"
|
|
29
|
+
}, "Margin: 2rem / m-32")))), h("li", {
|
|
30
|
+
key: 'a0914d288cdb4b9caef6956af0069cd0937ee019',
|
|
31
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
32
|
+
}, h("div", {
|
|
33
|
+
key: '95adc2b10d3962378de300e00b749b691fda88af',
|
|
34
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
35
|
+
}, h("div", {
|
|
36
|
+
key: '8bad94397c9fe8112b49933a508958000f9cd99d',
|
|
37
|
+
class: "spacing-sample ml-64 bg-darker"
|
|
38
|
+
}, h("span", {
|
|
39
|
+
key: '04229385104243a5ce9a194c4f8056f7341a6736',
|
|
40
|
+
class: "text-white"
|
|
41
|
+
}, "Margin Left: 4rem / ml-64")))), h("li", {
|
|
42
|
+
key: 'f34e1fd5ccafc528ed9359766deaa5c615a2e14b',
|
|
43
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
44
|
+
}, h("div", {
|
|
45
|
+
key: '38e12800b2c8502ea2f9e912af929f71d3ec9699',
|
|
46
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
47
|
+
}, h("div", {
|
|
48
|
+
key: 'f4e93d89576ab3de7f44ce3a85d9838f21bfa7f6',
|
|
49
|
+
class: "spacing-sample mt-32 bg-darker"
|
|
50
|
+
}, h("span", {
|
|
51
|
+
key: 'e85e2e1c7c4c7e765dfafd25dc9f2c33b6bd5069',
|
|
52
|
+
class: "text-white"
|
|
53
|
+
}, "Margin Top: 2rem / mt-32")))), h("li", {
|
|
54
|
+
key: 'b42299c17c024a5906bd09c80a2f309b461b6fde',
|
|
55
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
56
|
+
}, h("div", {
|
|
57
|
+
key: 'f54a9e32893ac6f1b0384e79e2959d1e65a251e2',
|
|
58
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
59
|
+
}, h("div", {
|
|
60
|
+
key: '4209fa0c979a1d55d42d7b892bc94cc0f3788e88',
|
|
61
|
+
class: "spacing-sample p-32 bg-darker"
|
|
62
|
+
}, h("span", {
|
|
63
|
+
key: '1d9249c56d3a42500dfb8cc1d3eae1f89e79cdcd',
|
|
64
|
+
class: "text-white"
|
|
65
|
+
}, "Padding: 2rem / p-32")))), h("li", {
|
|
66
|
+
key: 'ad6f2e33e15c4c21bdfed8478b3d2faa905490fa',
|
|
67
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
68
|
+
}, h("div", {
|
|
69
|
+
key: '9950970e66b8a382e7b0158b54e980a5e5f45774',
|
|
70
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
71
|
+
}, h("div", {
|
|
72
|
+
key: '40e96cd046eaddf3a23387995affbfc399d171ae',
|
|
73
|
+
class: "spacing-sample pt-32 bg-darker"
|
|
74
|
+
}, h("span", {
|
|
75
|
+
key: '2d120273f7a6d4429061d0ade2164ada9a14b506',
|
|
76
|
+
class: "text-white"
|
|
77
|
+
}, "Padding Top: 2rem / pt-32")))), h("li", {
|
|
78
|
+
key: '8c3327edc63f8959c0cb01cce0a8407bf3a605af',
|
|
79
|
+
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
80
|
+
}, h("div", {
|
|
81
|
+
key: 'c0be38039770c54577f073e1a707110cd0807ab5',
|
|
82
|
+
class: "container p-8 item-center border-2 border-soft"
|
|
83
|
+
}, h("div", {
|
|
84
|
+
key: 'd8085da375e734ed11fe580f1a9004f6fddef679',
|
|
85
|
+
class: "spacing-sample pl-32 bg-darker"
|
|
86
|
+
}, h("span", {
|
|
87
|
+
key: '029857c00659221390438d8477734d0f130d1b97',
|
|
88
|
+
class: "text-white"
|
|
89
|
+
}, "Padding Left: 2rem / pl-32"))))));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { TokenSpacing as token_spacing };
|