@ebrains/react 0.9.0-beta → 0.9.2-beta
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/.babelrc +12 -0
- package/LICENSE +21 -0
- package/README.md +5 -1
- package/package.json +2 -6
- package/project.json +10 -0
- package/rollup.config.js +43 -0
- package/src/components.ts +49 -0
- package/src/generated/components.ts +47 -0
- package/src/generated/react-component-lib/attachProps.ts +125 -0
- package/src/generated/react-component-lib/case.ts +7 -0
- package/src/generated/react-component-lib/createComponent.tsx +106 -0
- package/src/generated/react-component-lib/createOverlayComponent.tsx +142 -0
- package/src/generated/react-component-lib/dev.ts +14 -0
- package/src/generated/react-component-lib/index.tsx +50 -0
- package/src/generated/react-component-lib/interfaces.ts +34 -0
- package/src/generated/react-component-lib/utils/attachProps.ts +125 -0
- package/src/generated/react-component-lib/utils/case.ts +7 -0
- package/src/generated/react-component-lib/utils/dev.ts +14 -0
- package/src/generated/react-component-lib/utils/index.tsx +50 -0
- package/src/react-component-lib/attachProps.ts +125 -0
- package/src/react-component-lib/case.ts +7 -0
- package/src/react-component-lib/createComponent.tsx +106 -0
- package/src/react-component-lib/createOverlayComponent.tsx +142 -0
- package/src/react-component-lib/dev.ts +14 -0
- package/src/react-component-lib/index.tsx +50 -0
- package/src/react-component-lib/interfaces.ts +34 -0
- package/src/react-component-lib/utils/attachProps.ts +125 -0
- package/src/react-component-lib/utils/case.ts +7 -0
- package/src/react-component-lib/utils/index.tsx +50 -0
- package/tsconfig.json +17 -0
- package/tsconfig.lib.json +23 -0
- package/analytics-44b1416b.esm.js +0 -55
- package/arrow-diagonal-black-8f0494c3.esm.js +0 -3
- package/arrow-right-9322ba8a.esm.js +0 -5
- package/bluesky-cc5edd2d.esm.js +0 -14
- package/bookmark-c200037c.esm.js +0 -16
- package/chevron-down-6144c823.esm.js +0 -12
- package/chevron-left-ca6c66e1.esm.js +0 -11
- package/chevron-right-b88ed2d4.esm.js +0 -5
- package/chevron-up-c66bd477.esm.js +0 -12
- package/close-87fc0d63.esm.js +0 -5
- package/color-2554aad6.esm.js +0 -122
- package/color-primary-palette_6.entry.esm.js +0 -778
- package/components-section.entry.esm.js +0 -165
- package/copy-03b72cb6.esm.js +0 -5
- package/correct-use-of-colors.entry.esm.js +0 -243
- package/docs-palettes.entry.esm.js +0 -29
- package/docs-tokens.entry.esm.js +0 -45
- package/eds-accordion.entry.esm.js +0 -132
- package/eds-alert.entry.esm.js +0 -112
- package/eds-app-root.entry.esm.js +0 -53
- package/eds-avatar_24.entry.esm.js +0 -275
- package/eds-breadcrumb.entry.esm.js +0 -174
- package/eds-card-desc_3.entry.esm.js +0 -125
- package/eds-card-generic.entry.esm.js +0 -114
- package/eds-card-project.entry.esm.js +0 -93
- package/eds-card-section.entry.esm.js +0 -56
- package/eds-card-tags.entry.esm.js +0 -27
- package/eds-card-tool.entry.esm.js +0 -105
- package/eds-card-wrapper.entry.esm.js +0 -39
- package/eds-code-block.entry.esm.js +0 -2290
- package/eds-cookies-preference.entry.esm.js +0 -47
- package/eds-feedback.entry.esm.js +0 -82
- package/eds-frame.entry.esm.js +0 -112
- package/eds-icon-arrow-diagonal.entry.esm.js +0 -21
- package/eds-icon-arrow-right.entry.esm.js +0 -21
- package/eds-icon-bluesky.entry.esm.js +0 -21
- package/eds-icon-bookmark.entry.esm.js +0 -21
- package/eds-icon-chevron-down.entry.esm.js +0 -21
- package/eds-icon-chevron-left.entry.esm.js +0 -21
- package/eds-icon-chevron-right.entry.esm.js +0 -21
- package/eds-icon-chevron-up.entry.esm.js +0 -21
- package/eds-icon-close.entry.esm.js +0 -21
- package/eds-icon-copy.entry.esm.js +0 -21
- package/eds-icon-eu.entry.esm.js +0 -21
- package/eds-icon-external.entry.esm.js +0 -21
- package/eds-icon-facebook.entry.esm.js +0 -21
- package/eds-icon-gitlab.entry.esm.js +0 -21
- package/eds-icon-linkedin.entry.esm.js +0 -21
- package/eds-icon-loader.entry.esm.js +0 -21
- package/eds-icon-mastodon.entry.esm.js +0 -21
- package/eds-icon-menu.entry.esm.js +0 -21
- package/eds-icon-minus.entry.esm.js +0 -21
- package/eds-icon-more.entry.esm.js +0 -21
- package/eds-icon-paper.entry.esm.js +0 -21
- package/eds-icon-plus.entry.esm.js +0 -21
- package/eds-icon-portal.entry.esm.js +0 -21
- package/eds-icon-private.entry.esm.js +0 -21
- package/eds-icon-public.entry.esm.js +0 -21
- package/eds-icon-search.entry.esm.js +0 -21
- package/eds-icon-star.entry.esm.js +0 -21
- package/eds-icon-success.entry.esm.js +0 -21
- package/eds-icon-thumbs-down.entry.esm.js +0 -21
- package/eds-icon-thumbs-up.entry.esm.js +0 -21
- package/eds-icon-tutorial.entry.esm.js +0 -21
- package/eds-icon-twitter.entry.esm.js +0 -21
- package/eds-icon-unknown.entry.esm.js +0 -21
- package/eds-icon-updown.entry.esm.js +0 -21
- package/eds-icon-user.entry.esm.js +0 -21
- package/eds-icon-youtube.entry.esm.js +0 -21
- package/eds-login_2.entry.esm.js +0 -1828
- package/eds-matomo-notice.entry.esm.js +0 -162
- package/eds-modal.entry.esm.js +0 -142
- package/eds-pagination_2.entry.esm.js +0 -493
- package/eds-progress-bar.entry.esm.js +0 -41
- package/eds-rating.entry.esm.js +0 -79
- package/eds-section-core_2.entry.esm.js +0 -69
- package/eds-spinner.entry.esm.js +0 -67
- package/eds-switch.entry.esm.js +0 -58
- package/eds-tabs.entry.esm.js +0 -143
- package/eds-timeline.entry.esm.js +0 -117
- package/eds-toast-manager.entry.esm.js +0 -62
- package/eds-toast.entry.esm.js +0 -92
- package/eds-tooltip.entry.esm.js +0 -125
- package/eds-trl.entry.esm.js +0 -68
- package/eu-9ddde93a.esm.js +0 -30
- package/facebook-9cb5c17f.esm.js +0 -14
- package/incorrect-use-of-colors.entry.esm.js +0 -71
- package/index-39c58238.esm.js +0 -58
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -4
- package/index.esm2.js +0 -4840
- package/linkedin-e8650abb.esm.js +0 -28
- package/loader-c9628637.esm.js +0 -30
- package/logo-color-7f1fd803.esm.js +0 -115
- package/logo-color-margins-ff8ce71b.esm.js +0 -118
- package/logo-space.entry.esm.js +0 -48
- package/logo-variations-horizontal_2.entry.esm.js +0 -123
- package/logo-variations-tabs.entry.esm.js +0 -29
- package/logo-white-no-bg-f382f86f.esm.js +0 -1021
- package/logo-wrong-usage.entry.esm.js +0 -101
- package/mastodon-3703ec61.esm.js +0 -14
- package/menu-340ea948.esm.js +0 -11
- package/minus-b30a7c71.esm.js +0 -11
- package/mono-53f70232.esm.js +0 -11
- package/more-4449d549.esm.js +0 -13
- package/paper-8e74ea31.esm.js +0 -15
- package/plus-89c07be2.esm.js +0 -12
- package/portal-d6c8ce56.esm.js +0 -18
- package/private-1c25ff8e.esm.js +0 -25
- package/public-d4d8c585.esm.js +0 -16
- package/search-fbcd79c2.esm.js +0 -12
- package/sharedUtils-a550989c.esm.js +0 -17
- package/src/components.d.ts +0 -41
- package/src/generated/components.d.ts +0 -38
- package/src/generated/react-component-lib/attachProps.d.ts +0 -16
- package/src/generated/react-component-lib/case.d.ts +0 -2
- package/src/generated/react-component-lib/createComponent.d.ts +0 -10
- package/src/generated/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/src/generated/react-component-lib/dev.d.ts +0 -2
- package/src/generated/react-component-lib/interfaces.d.ts +0 -29
- package/src/generated/react-component-lib/utils/attachProps.d.ts +0 -16
- package/src/generated/react-component-lib/utils/case.d.ts +0 -2
- package/src/generated/react-component-lib/utils/dev.d.ts +0 -2
- package/src/generated/react-component-lib/utils/index.d.ts +0 -10
- package/src/react-component-lib/attachProps.d.ts +0 -16
- package/src/react-component-lib/case.d.ts +0 -2
- package/src/react-component-lib/createComponent.d.ts +0 -10
- package/src/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/src/react-component-lib/dev.d.ts +0 -2
- package/src/react-component-lib/interfaces.d.ts +0 -29
- package/src/react-component-lib/utils/attachProps.d.ts +0 -16
- package/src/react-component-lib/utils/case.d.ts +0 -2
- package/src/react-component-lib/utils/index.d.ts +0 -10
- package/star-0da9b5e9.esm.js +0 -5
- package/success-443809da.esm.js +0 -18
- package/svg-repository.entry.esm.js +0 -337
- package/thumbs-down-a18fd049.esm.js +0 -5
- package/thumbs-up-c19a71bc.esm.js +0 -6
- package/toastManager-d9eee791.esm.js +0 -34
- package/token-list_3.entry.esm.js +0 -385
- package/token-ratios.entry.esm.js +0 -49
- package/token-typography.entry.esm.js +0 -267
- package/tutotial-150ee1fd.esm.js +0 -27
- package/twitter-ac21b505.esm.js +0 -14
- package/unknown-ed01a24c.esm.js +0 -22
- package/up-and-down-d747abee.esm.js +0 -12
- package/user-71ebdc15.esm.js +0 -16
- package/youtube-efbfbdc4.esm.js +0 -14
- /package/src/generated/react-component-lib/{index.d.ts → index.ts} +0 -0
- /package/src/{index.d.ts → index.ts} +0 -0
- /package/src/react-component-lib/{index.d.ts → index.ts} +0 -0
|
@@ -1,385 +0,0 @@
|
|
|
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: "not-prose 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: "not-prose 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: '8b81b207da80d0006bd14157e527932ca5305a93',
|
|
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: '912af038957cf8b00443e72529d4929b7a508a0a',
|
|
321
|
-
class: "w-full mt-28"
|
|
322
|
-
}, h("ul", {
|
|
323
|
-
key: 'ffffacd1e6006a05a27d5e1248ce626c36abc73e',
|
|
324
|
-
class: "not-prose 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: 'af8f66e30d9115f920d483c02d1f7c2b718589f9',
|
|
362
|
-
class: "w-full mt-28"
|
|
363
|
-
}, h("ul", {
|
|
364
|
-
key: '1588c580f981ab148ba23a76cd33b0c8b993822c',
|
|
365
|
-
class: "not-prose 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 };
|
|
@@ -1,49 +0,0 @@
|
|
|
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: '595dc0d77e33bfb2109666d185933c9f5b23616e',
|
|
21
|
-
class: "w-full"
|
|
22
|
-
}, h("eds-section-core", {
|
|
23
|
-
key: 'a3217b7808a1bc810ff0b158c4e6547bc2a77b06',
|
|
24
|
-
tag: "div",
|
|
25
|
-
"section-title": "Aspect Ratios",
|
|
26
|
-
"heading-level": "h3"
|
|
27
|
-
}, h("ul", {
|
|
28
|
-
key: '505f84a67b6eba8c33d1484c4cb0e94f4de68bc0',
|
|
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 };
|
|
@@ -1,267 +0,0 @@
|
|
|
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 headings = {
|
|
7
|
-
'heading-01': {
|
|
8
|
-
sm: {
|
|
9
|
-
fontFamily: 'var(--sans)',
|
|
10
|
-
fontWeight: 800,
|
|
11
|
-
fontSize: '42px',
|
|
12
|
-
lineHeight: '100%',
|
|
13
|
-
letterSpacing: '-0.01em'
|
|
14
|
-
},
|
|
15
|
-
md: {
|
|
16
|
-
fontSize: '48px'
|
|
17
|
-
},
|
|
18
|
-
lg: {
|
|
19
|
-
fontSize: '72px'
|
|
20
|
-
},
|
|
21
|
-
xl: {
|
|
22
|
-
fontSize: '83px'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
'heading-02': {
|
|
26
|
-
sm: {
|
|
27
|
-
fontFamily: 'var(--sans)',
|
|
28
|
-
fontWeight: 800,
|
|
29
|
-
fontSize: '36px',
|
|
30
|
-
lineHeight: '100%',
|
|
31
|
-
letterSpacing: '-0.01em'
|
|
32
|
-
},
|
|
33
|
-
lg: {
|
|
34
|
-
fontSize: '48px'
|
|
35
|
-
},
|
|
36
|
-
xl: {
|
|
37
|
-
fontSize: '60px'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
'heading-03': {
|
|
41
|
-
sm: {
|
|
42
|
-
fontFamily: 'var(--sans)',
|
|
43
|
-
fontWeight: 800,
|
|
44
|
-
fontSize: '36px',
|
|
45
|
-
lineHeight: '100%',
|
|
46
|
-
letterSpacing: '-0.01em'
|
|
47
|
-
},
|
|
48
|
-
xl: {
|
|
49
|
-
fontSize: '42px'
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
'heading-04': {
|
|
53
|
-
sm: {
|
|
54
|
-
fontFamily: 'var(--sans)',
|
|
55
|
-
fontWeight: 800,
|
|
56
|
-
fontSize: '28px',
|
|
57
|
-
lineHeight: '100%',
|
|
58
|
-
letterSpacing: '-0.01em'
|
|
59
|
-
},
|
|
60
|
-
xl: {
|
|
61
|
-
fontSize: '36px'
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
'heading-05': {
|
|
65
|
-
sm: {
|
|
66
|
-
fontFamily: 'var(--sans)',
|
|
67
|
-
fontWeight: 800,
|
|
68
|
-
fontSize: '28px',
|
|
69
|
-
lineHeight: '110%',
|
|
70
|
-
letterSpacing: '-0.01em'
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
'heading-06': {
|
|
74
|
-
sm: {
|
|
75
|
-
fontFamily: 'var(--sans)',
|
|
76
|
-
fontWeight: 800,
|
|
77
|
-
fontSize: '22px',
|
|
78
|
-
lineHeight: '120%'
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const bodies = {
|
|
83
|
-
'body-01': {
|
|
84
|
-
sm: {
|
|
85
|
-
fontFamily: 'var(--sans)',
|
|
86
|
-
fontWeight: 600,
|
|
87
|
-
fontSize: '20px',
|
|
88
|
-
lineHeight: '140%',
|
|
89
|
-
letterSpacing: '-0.01em'
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
'body-02': {
|
|
93
|
-
sm: {
|
|
94
|
-
fontFamily: 'var(--sans)',
|
|
95
|
-
fontWeight: 600,
|
|
96
|
-
fontSize: '17px',
|
|
97
|
-
lineHeight: '150%'
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
const uis = {
|
|
102
|
-
'ui-01': {
|
|
103
|
-
sm: {
|
|
104
|
-
fontFamily: 'var(--sans)',
|
|
105
|
-
fontWeight: 800,
|
|
106
|
-
fontSize: '18px',
|
|
107
|
-
lineHeight: '110%',
|
|
108
|
-
letterSpacing: '-0.01em'
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
'ui-02': {
|
|
112
|
-
sm: {
|
|
113
|
-
fontFamily: 'var(--sans)',
|
|
114
|
-
fontWeight: 800,
|
|
115
|
-
fontSize: '16px',
|
|
116
|
-
lineHeight: '110%',
|
|
117
|
-
letterSpacing: '-0.01em'
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
'ui-02-light': {
|
|
121
|
-
sm: {
|
|
122
|
-
fontFamily: 'var(--sans)',
|
|
123
|
-
fontWeight: 600,
|
|
124
|
-
fontSize: '16px',
|
|
125
|
-
lineHeight: '110%',
|
|
126
|
-
letterSpacing: '-0.01em'
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
'ui-03': {
|
|
130
|
-
sm: {
|
|
131
|
-
fontFamily: 'var(--sans)',
|
|
132
|
-
fontWeight: 800,
|
|
133
|
-
fontSize: '14px',
|
|
134
|
-
lineHeight: '110%',
|
|
135
|
-
letterSpacing: '-0.01em'
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
'ui-03-light': {
|
|
139
|
-
sm: {
|
|
140
|
-
fontFamily: 'var(--sans)',
|
|
141
|
-
fontWeight: 600,
|
|
142
|
-
fontSize: '14px',
|
|
143
|
-
lineHeight: '130%',
|
|
144
|
-
letterSpacing: '-0.01em'
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
'ui-04': {
|
|
148
|
-
sm: {
|
|
149
|
-
fontFamily: 'var(--sans)',
|
|
150
|
-
fontWeight: 800,
|
|
151
|
-
fontSize: '12px',
|
|
152
|
-
lineHeight: '100%',
|
|
153
|
-
letterSpacing: '-0.01em'
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
'ui-05': {
|
|
157
|
-
sm: {
|
|
158
|
-
fontFamily: 'var(--sans)',
|
|
159
|
-
fontWeight: 800,
|
|
160
|
-
fontSize: '10px',
|
|
161
|
-
lineHeight: '110%',
|
|
162
|
-
letterSpacing: '-0.01em'
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
caption: {
|
|
166
|
-
sm: {
|
|
167
|
-
fontFamily: 'var(--sans)',
|
|
168
|
-
fontWeight: 800,
|
|
169
|
-
fontSize: '12px',
|
|
170
|
-
lineHeight: '120%'
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const displays = {
|
|
175
|
-
'display-01': {
|
|
176
|
-
sm: {
|
|
177
|
-
fontFamily: 'var(--sans)',
|
|
178
|
-
fontWeight: 800,
|
|
179
|
-
fontSize: '120px',
|
|
180
|
-
lineHeight: '100%',
|
|
181
|
-
letterSpacing: '-0.01em'
|
|
182
|
-
},
|
|
183
|
-
lg: {
|
|
184
|
-
fontSize: '150px'
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
const typography = {
|
|
189
|
-
families: {
|
|
190
|
-
sans: 'Inter, Helvetica, Arial, sans-serif'
|
|
191
|
-
},
|
|
192
|
-
typesets: {
|
|
193
|
-
...headings,
|
|
194
|
-
...bodies,
|
|
195
|
-
...uis,
|
|
196
|
-
...displays
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const TokenTypography = class {
|
|
200
|
-
constructor(hostRef) {
|
|
201
|
-
registerInstance(this, hostRef);
|
|
202
|
-
}
|
|
203
|
-
render() {
|
|
204
|
-
return h("section", {
|
|
205
|
-
key: 'b2e3951c7419dccdd31e446898a9ad126e36398e',
|
|
206
|
-
class: "w-full"
|
|
207
|
-
}, h("ul", {
|
|
208
|
-
key: '78ec896dad35353bcdc4d9f9d4b68873e1274933',
|
|
209
|
-
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
210
|
-
}, Object.entries(typography.typesets).filter(([typeKey]) => typeKey !== 'displays') // Exclude "displays"
|
|
211
|
-
.flatMap(([typeKey, typeValues]) => Object.entries(typeValues).map(([size, style]) => h("li", {
|
|
212
|
-
class: "grid-col-span-12 md:grid-col-span-4 flex flex-col items-center mt-16"
|
|
213
|
-
}, h("div", {
|
|
214
|
-
class: "w-full p-4 block lg:flex items-center border border-soft rounded"
|
|
215
|
-
}, h("div", {
|
|
216
|
-
class: "mr-auto hidden lg:block",
|
|
217
|
-
style: {
|
|
218
|
-
fontFamily: typography.families.sans,
|
|
219
|
-
fontWeight: style.fontWeight,
|
|
220
|
-
fontSize: style.fontSize,
|
|
221
|
-
lineHeight: style.lineHeight,
|
|
222
|
-
letterSpacing: style.letterSpacing
|
|
223
|
-
}
|
|
224
|
-
}, h("span", {
|
|
225
|
-
class: "text-default font-bold"
|
|
226
|
-
}, `${typeKey} (${size})`)), h("div", {
|
|
227
|
-
class: "mr-auto block lg:hidden p-4"
|
|
228
|
-
}, h("span", {
|
|
229
|
-
class: "text-default f-heading-05"
|
|
230
|
-
}, `${typeKey} (${size})`)), h("div", {
|
|
231
|
-
class: "ml-auto"
|
|
232
|
-
}, h("eds-code-block", {
|
|
233
|
-
code: [style.fontSize && `font-size: ${style.fontSize};`, style.lineHeight && `line-height: ${style.lineHeight};`, style.letterSpacing && `letter-spacing: ${style.letterSpacing};`, style.fontWeight && `font-weight: ${style.fontWeight};`, style.fontFamily && `font-family: ${style.fontFamily};`].filter(Boolean) // Remove any falsy values (e.g., undefined, null)
|
|
234
|
-
.join('\n'),
|
|
235
|
-
language: "css",
|
|
236
|
-
class: "min-w-[250px] mb-4"
|
|
237
|
-
}), h("eds-code-block", {
|
|
238
|
-
code: `f-${typeKey}`,
|
|
239
|
-
language: "Utility Class",
|
|
240
|
-
class: "min-w-[250px] mb-4"
|
|
241
|
-
}), h("eds-code-block", {
|
|
242
|
-
code: `${size}:f-${typeKey}`,
|
|
243
|
-
language: "Screen",
|
|
244
|
-
class: "min-w-[250px] mb-4"
|
|
245
|
-
}), h("eds-code-block", {
|
|
246
|
-
code: `--var(--f-${typeKey}-fontFamily)`,
|
|
247
|
-
class: "min-w-[250px] mb-4"
|
|
248
|
-
}), h("eds-code-block", {
|
|
249
|
-
code: `--var(--f-${typeKey}-fontWeight)`,
|
|
250
|
-
class: "min-w-[250px] mb-4"
|
|
251
|
-
}), h("eds-code-block", {
|
|
252
|
-
code: `--var(--f-${typeKey}-fontSize)`,
|
|
253
|
-
class: "min-w-[250px] mb-4"
|
|
254
|
-
}), h("eds-code-block", {
|
|
255
|
-
code: `--var(--f-${typeKey}-lineHeight)`,
|
|
256
|
-
class: "min-w-[250px] mb-4"
|
|
257
|
-
}), h("eds-code-block", {
|
|
258
|
-
code: `--var(--f-${typeKey}-letterSpacing)`,
|
|
259
|
-
class: "min-w-[250px] mb-4"
|
|
260
|
-
}), h("eds-code-block", {
|
|
261
|
-
code: `--sans: Inter, Helvetica, Arial, sans-serif;`,
|
|
262
|
-
class: "min-w-[250px] mb-4"
|
|
263
|
-
}))))))));
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
export { TokenTypography as token_typography };
|