@ebrains/react 0.2.0-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/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +57 -57
- 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-section.entry.esm.js +17 -7
- package/eds-components-section.entry.esm.js +57 -24
- package/eds-docs-palettes.entry.esm.js +1 -1
- package/eds-docs-tokens.entry.esm.js +1 -1
- package/eds-form.entry.esm.js +374 -0
- package/eds-input_7.entry.esm.js +518 -0
- package/eds-login.entry.esm.js +4 -12
- package/eds-logo-variations.entry.esm.js +29 -0
- package/{eds-pagination.entry.esm.js → eds-pagination_2.entry.esm.js} +199 -1
- package/eds-progress-bar.entry.esm.js +36 -0
- package/eds-svg-repository.entry.esm.js +12 -3
- package/eds-tabs-content.entry.esm.js +4 -4
- package/eds-tabs.entry.esm.js +26 -7
- package/eds-timeline.entry.esm.js +130 -0
- package/eds-trl.entry.esm.js +69 -0
- package/incorrect-use-of-colors.entry.esm.js +11 -10
- package/index.esm.js +1 -1
- package/index.esm2.js +35 -27
- package/logo-space.entry.esm.js +4 -4
- package/logo-variations-horizontal_2.entry.esm.js +116 -0
- package/logo-wrong-usage.entry.esm.js +39 -39
- package/package.json +1 -1
- package/src/components.d.ts +2 -0
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +26 -26
- package/token-typography.entry.esm.js +2 -2
- package/eds-alert_28.entry.esm.js +0 -227
- package/eds-block-break.entry.esm.js +0 -22
- package/eds-breadcrumb.entry.esm.js +0 -169
- package/eds-footer.entry.esm.js +0 -110
- package/eds-fullscreen-menu.entry.esm.js +0 -143
- package/eds-social-networks.entry.esm.js +0 -74
- package/eds-table.entry.esm.js +0 -196
- package/logo-variations-horizontal.entry.esm.js +0 -50
- package/logo-variations-vertical.entry.esm.js +0 -53
|
@@ -42,35 +42,35 @@ const CorrectUseOfColors = class {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
return h("div", {
|
|
45
|
-
key: '
|
|
45
|
+
key: '33f38f14e5b6e7271ae26608fb1a1ed0c7930c7c',
|
|
46
46
|
class: "container"
|
|
47
47
|
}, h("p", {
|
|
48
|
-
key: '
|
|
48
|
+
key: '4857375e983add7d8e5e0a0d9896641774be018e',
|
|
49
49
|
class: "f-body-01"
|
|
50
50
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
51
|
-
key: '
|
|
51
|
+
key: '1c6bd69472074babf8f830fdba9be31e73afcd88',
|
|
52
52
|
label: "primary",
|
|
53
53
|
size: "small",
|
|
54
|
-
intent: "
|
|
55
|
-
icon: "
|
|
54
|
+
intent: "blueish",
|
|
55
|
+
icon: "chevron-right",
|
|
56
56
|
url: "../color-palette/#primary-palette",
|
|
57
|
-
"extra-class": "inline-block"
|
|
57
|
+
"extra-class": "inline-block ml-4"
|
|
58
58
|
}), "and", h("eds-link", {
|
|
59
|
-
key: '
|
|
59
|
+
key: 'ae3429fadbea001f01731d3c15f28865d668a50a',
|
|
60
60
|
label: "support",
|
|
61
61
|
size: "small",
|
|
62
|
-
intent: "
|
|
63
|
-
icon: "
|
|
62
|
+
intent: "blueish",
|
|
63
|
+
icon: "chevron-right",
|
|
64
64
|
url: "../color-palette/#support-palette",
|
|
65
|
-
"extra-class": "inline-block"
|
|
65
|
+
"extra-class": "inline-block ml-4"
|
|
66
66
|
}), "color palettes."), h("div", {
|
|
67
|
-
key: '
|
|
67
|
+
key: 'd8c6b9ab88abbf6194a4fb26120244982b59c2c4',
|
|
68
68
|
class: "flex"
|
|
69
69
|
}, h("div", {
|
|
70
|
-
key: '
|
|
70
|
+
key: 'fc7f854940caabb9e032999f51732b64555e96e7',
|
|
71
71
|
class: "w-full"
|
|
72
72
|
}, h("ul", {
|
|
73
|
-
key: '
|
|
73
|
+
key: '99c6a2e47c683ac38f2a14feec80177c0cf1c174',
|
|
74
74
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
75
75
|
}, primary.map(color => h("li", {
|
|
76
76
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -80,10 +80,10 @@ const CorrectUseOfColors = class {
|
|
|
80
80
|
backgroundColor: color.background
|
|
81
81
|
}
|
|
82
82
|
}))))), h("div", {
|
|
83
|
-
key: '
|
|
83
|
+
key: '91048e89cff083356c589c0f1bfecdd482e0c797',
|
|
84
84
|
class: "w-full"
|
|
85
85
|
}, h("ul", {
|
|
86
|
-
key: '
|
|
86
|
+
key: '6ee69388227089a5224a6d249c8e1eea4efde128',
|
|
87
87
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
88
88
|
}, support.map(color => h("li", {
|
|
89
89
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -93,32 +93,32 @@ const CorrectUseOfColors = class {
|
|
|
93
93
|
backgroundColor: color.background
|
|
94
94
|
}
|
|
95
95
|
})))))), h("p", {
|
|
96
|
-
key: '
|
|
96
|
+
key: 'c0a8e42942f2655648aa2ec3ce74bbf8d043ba63',
|
|
97
97
|
class: "f-body-01"
|
|
98
98
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
99
|
-
key: '
|
|
99
|
+
key: '3f272298bcd7d0e6ad791edc408ef636349fbf7d',
|
|
100
100
|
label: "purple",
|
|
101
101
|
size: "small",
|
|
102
|
-
intent: "
|
|
103
|
-
icon: "
|
|
102
|
+
intent: "blueish",
|
|
103
|
+
icon: "chevron-right",
|
|
104
104
|
url: "../color-palette/#primary-palette",
|
|
105
|
-
"extra-class": "inline-block"
|
|
105
|
+
"extra-class": "inline-block ml-4"
|
|
106
106
|
}), "and", h("eds-link", {
|
|
107
|
-
key: '
|
|
107
|
+
key: '9a0b28f388483944aa4b053b9f8e807c1383431e',
|
|
108
108
|
label: "support",
|
|
109
109
|
size: "small",
|
|
110
|
-
intent: "
|
|
111
|
-
icon: "
|
|
110
|
+
intent: "blueish",
|
|
111
|
+
icon: "chevron-right",
|
|
112
112
|
url: "../color-palette/#support-palette",
|
|
113
|
-
"extra-class": "inline-block"
|
|
113
|
+
"extra-class": "inline-block ml-4"
|
|
114
114
|
}), "color palettes."), h("div", {
|
|
115
|
-
key: '
|
|
115
|
+
key: '27ab1cdb936918fafe122c5a569c83322043bb79',
|
|
116
116
|
class: "flex"
|
|
117
117
|
}, h("div", {
|
|
118
|
-
key: '
|
|
118
|
+
key: '037b9916ff3a3e8c2e9db64b650d44a57aedbcf9',
|
|
119
119
|
class: "w-full"
|
|
120
120
|
}, h("ul", {
|
|
121
|
-
key: '
|
|
121
|
+
key: '60f4f6290b31a29852fb934c678edcaa61c8e930',
|
|
122
122
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
123
123
|
}, purple.map(color => h("li", {
|
|
124
124
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -128,10 +128,10 @@ const CorrectUseOfColors = class {
|
|
|
128
128
|
backgroundColor: color.background
|
|
129
129
|
}
|
|
130
130
|
}))))), h("div", {
|
|
131
|
-
key: '
|
|
131
|
+
key: '36397292a31417703736b3be5b77e17241675dd9',
|
|
132
132
|
class: "w-full"
|
|
133
133
|
}, h("ul", {
|
|
134
|
-
key: '
|
|
134
|
+
key: '20a9e6bb396c184c2718a18554eb1b4828817379',
|
|
135
135
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
136
136
|
}, support.map(color => h("li", {
|
|
137
137
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -141,32 +141,32 @@ const CorrectUseOfColors = class {
|
|
|
141
141
|
backgroundColor: color.background
|
|
142
142
|
}
|
|
143
143
|
})))))), h("p", {
|
|
144
|
-
key: '
|
|
144
|
+
key: '0b89819b9fce1dff39b06b70873d651b7a1c84ac',
|
|
145
145
|
class: "f-body-01"
|
|
146
146
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
147
|
-
key: '
|
|
147
|
+
key: '9b3e7d46ac8116ff5f47f895bb06e89cd49c4e03',
|
|
148
148
|
label: "blue",
|
|
149
149
|
size: "small",
|
|
150
|
-
intent: "
|
|
151
|
-
icon: "
|
|
150
|
+
intent: "blueish",
|
|
151
|
+
icon: "chevron-right",
|
|
152
152
|
url: "../color-palette/#primary-palette",
|
|
153
|
-
"extra-class": "inline-block"
|
|
153
|
+
"extra-class": "inline-block ml-4"
|
|
154
154
|
}), "and", h("eds-link", {
|
|
155
|
-
key: '
|
|
155
|
+
key: '94c3384e546bcae55d5634064a37436b4cdaab0f',
|
|
156
156
|
label: "support",
|
|
157
157
|
size: "small",
|
|
158
|
-
intent: "
|
|
159
|
-
icon: "
|
|
158
|
+
intent: "blueish",
|
|
159
|
+
icon: "chevron-right",
|
|
160
160
|
url: "../color-palette/#support-palette",
|
|
161
|
-
"extra-class": "inline-block"
|
|
161
|
+
"extra-class": "inline-block ml-4"
|
|
162
162
|
}), "color palettes."), h("div", {
|
|
163
|
-
key: '
|
|
163
|
+
key: '7e3fe503559fa6865b824fd7f93dfdf8ed368f34',
|
|
164
164
|
class: "flex"
|
|
165
165
|
}, h("div", {
|
|
166
|
-
key: '
|
|
166
|
+
key: '4ed98a3b92ba8b73e3cd67dec625b4b8dfb34ee1',
|
|
167
167
|
class: "w-full"
|
|
168
168
|
}, h("ul", {
|
|
169
|
-
key: '
|
|
169
|
+
key: '0ccfd018568eb834ae05771976122736f5944205',
|
|
170
170
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
171
171
|
}, blue.map(color => h("li", {
|
|
172
172
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -176,10 +176,10 @@ const CorrectUseOfColors = class {
|
|
|
176
176
|
backgroundColor: color.background
|
|
177
177
|
}
|
|
178
178
|
}))))), h("div", {
|
|
179
|
-
key: '
|
|
179
|
+
key: 'd2cef9f5bd8ce7fb103e22a8964cee88853c1162',
|
|
180
180
|
class: "w-full"
|
|
181
181
|
}, h("ul", {
|
|
182
|
-
key: '
|
|
182
|
+
key: '24301ce590bd1530316f351202bd76fafaa7dda5',
|
|
183
183
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
184
184
|
}, support.map(color => h("li", {
|
|
185
185
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -189,32 +189,32 @@ const CorrectUseOfColors = class {
|
|
|
189
189
|
backgroundColor: color.background
|
|
190
190
|
}
|
|
191
191
|
})))))), h("p", {
|
|
192
|
-
key: '
|
|
192
|
+
key: '748852527301ab6465b593f5f271dc6dcef9d198',
|
|
193
193
|
class: "f-body-01"
|
|
194
194
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
195
|
-
key: '
|
|
195
|
+
key: 'f035467c04170412a1b06f05b8675b6be57e8aa2',
|
|
196
196
|
label: "redish",
|
|
197
197
|
size: "small",
|
|
198
|
-
intent: "
|
|
199
|
-
icon: "
|
|
198
|
+
intent: "blueish",
|
|
199
|
+
icon: "chevron-right",
|
|
200
200
|
url: "../color-palette/#primary-palette",
|
|
201
|
-
"extra-class": "inline-block"
|
|
201
|
+
"extra-class": "inline-block ml-4"
|
|
202
202
|
}), "and", h("eds-link", {
|
|
203
|
-
key: '
|
|
203
|
+
key: '6e4eb577c6582a160b8282b54a6edfc58f20926b',
|
|
204
204
|
label: "support",
|
|
205
205
|
size: "small",
|
|
206
|
-
intent: "
|
|
207
|
-
icon: "
|
|
206
|
+
intent: "blueish",
|
|
207
|
+
icon: "chevron-right",
|
|
208
208
|
url: "../color-palette/#support-palette",
|
|
209
|
-
"extra-class": "inline-block"
|
|
209
|
+
"extra-class": "inline-block ml-4"
|
|
210
210
|
}), "color palettes."), h("div", {
|
|
211
|
-
key: '
|
|
211
|
+
key: '9209fd1ab3092cd21dd81a3328171c8de4fb8bca',
|
|
212
212
|
class: "flex"
|
|
213
213
|
}, h("div", {
|
|
214
|
-
key: '
|
|
214
|
+
key: 'dc71b931a70fbd31a4f72814b23a1d97933bc721',
|
|
215
215
|
class: "w-full"
|
|
216
216
|
}, h("ul", {
|
|
217
|
-
key: '
|
|
217
|
+
key: 'd3f6f25439b6fbc8e8c08b39bf46de9ce52482fa',
|
|
218
218
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
219
219
|
}, red.map(color => h("li", {
|
|
220
220
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -224,10 +224,10 @@ const CorrectUseOfColors = class {
|
|
|
224
224
|
backgroundColor: color.background
|
|
225
225
|
}
|
|
226
226
|
}))))), h("div", {
|
|
227
|
-
key: '
|
|
227
|
+
key: '78d64d48a72836043c53e485269402bf566a5d98',
|
|
228
228
|
class: "w-full"
|
|
229
229
|
}, h("ul", {
|
|
230
|
-
key: '
|
|
230
|
+
key: '6eb824d03f4d0e2d3966963c899473e242b31dc6',
|
|
231
231
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
232
232
|
}, support.map(color => h("li", {
|
|
233
233
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { c as cva } from './index-39c58238.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
|
|
8
|
+
const EdsAlertStyle0 = edsAlertCss;
|
|
9
|
+
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
10
|
+
variants: {
|
|
11
|
+
intent: {
|
|
12
|
+
default: '',
|
|
13
|
+
warning: 'bg-warning',
|
|
14
|
+
error: 'bg-error',
|
|
15
|
+
success: 'bg-success'
|
|
16
|
+
},
|
|
17
|
+
direction: {
|
|
18
|
+
vertical: 'space-y-12',
|
|
19
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
20
|
+
},
|
|
21
|
+
withBtn: {
|
|
22
|
+
false: '',
|
|
23
|
+
true: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [{
|
|
27
|
+
direction: 'horizontal',
|
|
28
|
+
withBtn: true,
|
|
29
|
+
class: 'px-20 pr-12 py-12'
|
|
30
|
+
}, {
|
|
31
|
+
direction: 'horizontal',
|
|
32
|
+
withBtn: false,
|
|
33
|
+
class: 'p-20'
|
|
34
|
+
}, {
|
|
35
|
+
direction: 'vertical',
|
|
36
|
+
withBtn: true,
|
|
37
|
+
class: 'p-16'
|
|
38
|
+
}, {
|
|
39
|
+
direction: 'vertical',
|
|
40
|
+
withBtn: false,
|
|
41
|
+
class: 'px-12 py-20'
|
|
42
|
+
}],
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
intent: 'default',
|
|
45
|
+
direction: 'horizontal'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const EdsAlert = class {
|
|
49
|
+
constructor(hostRef) {
|
|
50
|
+
registerInstance(this, hostRef);
|
|
51
|
+
this.message = undefined;
|
|
52
|
+
this.pressableLabel = undefined;
|
|
53
|
+
this.pressableUrl = undefined;
|
|
54
|
+
this.direction = 'horizontal';
|
|
55
|
+
this.intent = 'default';
|
|
56
|
+
this.withBtn = false;
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
63
|
+
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
64
|
+
links.forEach(link => {
|
|
65
|
+
this.emitContext(link);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
emitContext(linkElement) {
|
|
69
|
+
const event = new CustomEvent('parentContext', {
|
|
70
|
+
detail: {
|
|
71
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
72
|
+
identifier: null
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
linkElement.dispatchEvent(event);
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
return h("div", {
|
|
79
|
+
key: '99518cd34cbfc04691f2f827b53105ef88c03af8',
|
|
80
|
+
class: alertStyles({
|
|
81
|
+
intent: this.intent,
|
|
82
|
+
direction: this.direction,
|
|
83
|
+
withBtn: this.withBtn
|
|
84
|
+
}),
|
|
85
|
+
role: "alert"
|
|
86
|
+
}, h("p", {
|
|
87
|
+
key: '7eca97c849473bb4c8472d11243dc5eb9dded61f',
|
|
88
|
+
class: "f-ui-01 py-8"
|
|
89
|
+
}, this.message), this.withBtn && (this.pressableUrl ? h("eds-link", {
|
|
90
|
+
class: "eds-alert-link",
|
|
91
|
+
label: this.pressableLabel,
|
|
92
|
+
url: this.pressableUrl,
|
|
93
|
+
intent: "secondary"
|
|
94
|
+
}) : null));
|
|
95
|
+
}
|
|
96
|
+
get el() {
|
|
97
|
+
return getElement(this);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
EdsAlert.style = EdsAlertStyle0;
|
|
101
|
+
|
|
102
|
+
export { EdsAlert as eds_alert };
|