@govtechsg/sgds-web-component 2.0.0-rc.1 → 2.0.0-rc.3
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/components/Accordion/accordion.cjs.js +1 -1
- package/components/Accordion/accordion.js +1 -1
- package/components/Accordion/index.umd.js +1 -1
- package/components/ActionCard/index.umd.js +1938 -1836
- package/components/ActionCard/index.umd.js.map +1 -1
- package/components/ActionCard/sgds-action-card.cjs.js +2 -2
- package/components/ActionCard/sgds-action-card.cjs.js.map +1 -1
- package/components/ActionCard/sgds-action-card.d.ts +1 -1
- package/components/ActionCard/sgds-action-card.js +1 -1
- package/components/ActionCard/sgds-action-card.js.map +1 -1
- package/components/Alert/index.umd.js +200 -98
- package/components/Alert/index.umd.js.map +1 -1
- package/components/Alert/sgds-alert.cjs.js +2 -2
- package/components/Alert/sgds-alert.cjs.js.map +1 -1
- package/components/Alert/sgds-alert.d.ts +1 -1
- package/components/Alert/sgds-alert.js +1 -1
- package/components/Alert/sgds-alert.js.map +1 -1
- package/components/Button/button.cjs.js +1 -1
- package/components/Button/button.js +1 -1
- package/components/Button/index.umd.js +1 -1
- package/components/ComboBox/index.umd.js +229 -127
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.cjs.js +2 -2
- package/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +1 -1
- package/components/ComboBox/sgds-combo-box.js +1 -1
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.js +7837 -7735
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.cjs.js +2 -2
- package/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.d.ts +1 -1
- package/components/Datepicker/sgds-datepicker.js +1 -1
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/Drawer/index.umd.js +200 -98
- package/components/Drawer/index.umd.js.map +1 -1
- package/components/Drawer/sgds-drawer.cjs.js +2 -2
- package/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +1 -1
- package/components/Drawer/sgds-drawer.js +1 -1
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/Dropdown/index.umd.js +230 -128
- package/components/Dropdown/index.umd.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.cjs.js +2 -2
- package/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.d.ts +1 -1
- package/components/Dropdown/sgds-dropdown.js +1 -1
- package/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/components/FileUpload/index.umd.js +230 -128
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.cjs.js +2 -2
- package/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +1 -1
- package/components/FileUpload/sgds-file-upload.js +1 -1
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Modal/index.umd.js +200 -98
- package/components/Modal/index.umd.js.map +1 -1
- package/components/Modal/sgds-modal.cjs.js +2 -2
- package/components/Modal/sgds-modal.cjs.js.map +1 -1
- package/components/Modal/sgds-modal.d.ts +1 -1
- package/components/Modal/sgds-modal.js +1 -1
- package/components/Modal/sgds-modal.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +201 -99
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.cjs.js +2 -2
- package/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.d.ts +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.js +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/components/Toast/index.umd.js +1938 -1836
- package/components/Toast/index.umd.js.map +1 -1
- package/components/Toast/sgds-toast.cjs.js +2 -2
- package/components/Toast/sgds-toast.cjs.js.map +1 -1
- package/components/Toast/sgds-toast.d.ts +1 -1
- package/components/Toast/sgds-toast.js +1 -1
- package/components/Toast/sgds-toast.js.map +1 -1
- package/components/index.umd.js +202 -100
- package/components/index.umd.js.map +1 -1
- package/index.umd.js +202 -100
- package/index.umd.js.map +1 -1
- package/package.json +2 -2
package/components/index.umd.js
CHANGED
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
*/
|
|
39
39
|
const NODE_MODE = false;
|
|
40
40
|
// Allows minifiers to rename references to globalThis
|
|
41
|
-
const global$
|
|
41
|
+
const global$3 = globalThis;
|
|
42
42
|
/**
|
|
43
43
|
* Whether the current browser supports `adoptedStyleSheets`.
|
|
44
44
|
*/
|
|
45
|
-
const supportsAdoptingStyleSheets = global$
|
|
46
|
-
(global$
|
|
45
|
+
const supportsAdoptingStyleSheets$1 = global$3.ShadowRoot &&
|
|
46
|
+
(global$3.ShadyCSS === undefined || global$3.ShadyCSS.nativeShadow) &&
|
|
47
47
|
'adoptedStyleSheets' in Document.prototype &&
|
|
48
48
|
'replace' in CSSStyleSheet.prototype;
|
|
49
49
|
const constructionToken = Symbol();
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
// constructable.
|
|
73
73
|
let styleSheet = this._styleSheet;
|
|
74
74
|
const strings = this._strings;
|
|
75
|
-
if (supportsAdoptingStyleSheets && styleSheet === undefined) {
|
|
75
|
+
if (supportsAdoptingStyleSheets$1 && styleSheet === undefined) {
|
|
76
76
|
const cacheable = strings !== undefined && strings.length === 1;
|
|
77
77
|
if (cacheable) {
|
|
78
78
|
styleSheet = cssTagCache.get(strings);
|
|
@@ -135,15 +135,15 @@
|
|
|
135
135
|
* will match spec behavior that gives adopted sheets precedence over styles in
|
|
136
136
|
* shadowRoot.
|
|
137
137
|
*/
|
|
138
|
-
const adoptStyles = (renderRoot, styles) => {
|
|
139
|
-
if (supportsAdoptingStyleSheets) {
|
|
138
|
+
const adoptStyles$1 = (renderRoot, styles) => {
|
|
139
|
+
if (supportsAdoptingStyleSheets$1) {
|
|
140
140
|
renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
143
|
for (const s of styles) {
|
|
144
144
|
const style = document.createElement('style');
|
|
145
145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
|
-
const nonce = global$
|
|
146
|
+
const nonce = global$3['litNonce'];
|
|
147
147
|
if (nonce !== undefined) {
|
|
148
148
|
style.setAttribute('nonce', nonce);
|
|
149
149
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
}
|
|
160
160
|
return unsafeCSS(cssText);
|
|
161
161
|
};
|
|
162
|
-
const getCompatibleStyle = supportsAdoptingStyleSheets ||
|
|
162
|
+
const getCompatibleStyle = supportsAdoptingStyleSheets$1 ||
|
|
163
163
|
(NODE_MODE )
|
|
164
164
|
? (s) => s
|
|
165
165
|
: (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022
|
|
173
173
|
const { is, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, } = Object;
|
|
174
174
|
// Lets a minifier replace globalThis references with a minified name
|
|
175
|
-
const global$
|
|
175
|
+
const global$2 = globalThis;
|
|
176
176
|
let issueWarning$4;
|
|
177
|
-
const trustedTypes$1 = global$
|
|
177
|
+
const trustedTypes$1 = global$2
|
|
178
178
|
.trustedTypes;
|
|
179
179
|
// Temporary workaround for https://crbug.com/993268
|
|
180
180
|
// Currently, any attribute starting with "on" is considered to be a
|
|
@@ -183,12 +183,12 @@
|
|
|
183
183
|
const emptyStringForBooleanAttribute = trustedTypes$1
|
|
184
184
|
? trustedTypes$1.emptyScript
|
|
185
185
|
: '';
|
|
186
|
-
const polyfillSupport$2 = global$
|
|
186
|
+
const polyfillSupport$2 = global$2.reactiveElementPolyfillSupportDevMode
|
|
187
187
|
;
|
|
188
188
|
{
|
|
189
189
|
// Ensure warnings are issued only 1x, even if multiple versions of Lit
|
|
190
190
|
// are loaded.
|
|
191
|
-
const issuedWarnings = (global$
|
|
191
|
+
const issuedWarnings = (global$2.litIssuedWarnings ??=
|
|
192
192
|
new Set());
|
|
193
193
|
// Issue a warning, if we haven't already.
|
|
194
194
|
issueWarning$4 = (code, warning) => {
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
};
|
|
201
201
|
issueWarning$4('dev-mode', `Lit is in dev mode. Not recommended for production!`);
|
|
202
202
|
// Issue polyfill support warning.
|
|
203
|
-
if (global$
|
|
203
|
+
if (global$2.ShadyDOM?.inUse && polyfillSupport$2 === undefined) {
|
|
204
204
|
issueWarning$4('polyfill-support-missing', `Shadow DOM is being polyfilled via \`ShadyDOM\` but ` +
|
|
205
205
|
`the \`polyfill-support\` module has not been loaded.`);
|
|
206
206
|
}
|
|
@@ -211,12 +211,12 @@
|
|
|
211
211
|
* Compiled out of prod mode builds.
|
|
212
212
|
*/
|
|
213
213
|
const debugLogEvent$1 = (event) => {
|
|
214
|
-
const shouldEmit = global$
|
|
214
|
+
const shouldEmit = global$2
|
|
215
215
|
.emitLitDebugLogEvents;
|
|
216
216
|
if (!shouldEmit) {
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
global$
|
|
219
|
+
global$2.dispatchEvent(new CustomEvent('lit-debug', {
|
|
220
220
|
detail: event,
|
|
221
221
|
}));
|
|
222
222
|
}
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
// Map from a class's metadata object to property options
|
|
289
289
|
// Note that we must use nullish-coalescing assignment so that we only use one
|
|
290
290
|
// map even if we load multiple version of this module.
|
|
291
|
-
global$
|
|
291
|
+
global$2.litPropertyMetadata ??= new WeakMap();
|
|
292
292
|
/**
|
|
293
293
|
* Base element class which manages element properties and attributes. When
|
|
294
294
|
* properties change, the `update` method is asynchronously called. This method
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
createRenderRoot() {
|
|
709
709
|
const renderRoot = this.shadowRoot ??
|
|
710
710
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
711
|
-
adoptStyles(renderRoot, this.constructor.elementStyles);
|
|
711
|
+
adoptStyles$1(renderRoot, this.constructor.elementStyles);
|
|
712
712
|
return renderRoot;
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
@@ -1215,8 +1215,8 @@
|
|
|
1215
1215
|
}
|
|
1216
1216
|
// IMPORTANT: do not change the property name or the assignment expression.
|
|
1217
1217
|
// This line will be used in regexes to search for ReactiveElement usage.
|
|
1218
|
-
(global$
|
|
1219
|
-
if (global$
|
|
1218
|
+
(global$2.reactiveElementVersions ??= []).push('2.0.4');
|
|
1219
|
+
if (global$2.reactiveElementVersions.length > 1) {
|
|
1220
1220
|
issueWarning$4('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +
|
|
1221
1221
|
`is not recommended.`);
|
|
1222
1222
|
}
|
|
@@ -1227,19 +1227,19 @@
|
|
|
1227
1227
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1228
1228
|
*/
|
|
1229
1229
|
// Allows minifiers to rename references to globalThis
|
|
1230
|
-
const global = globalThis;
|
|
1230
|
+
const global$1 = globalThis;
|
|
1231
1231
|
/**
|
|
1232
1232
|
* Useful for visualizing and logging insights into what the Lit template system is doing.
|
|
1233
1233
|
*
|
|
1234
1234
|
* Compiled out of prod mode builds.
|
|
1235
1235
|
*/
|
|
1236
1236
|
const debugLogEvent = (event) => {
|
|
1237
|
-
const shouldEmit = global
|
|
1237
|
+
const shouldEmit = global$1
|
|
1238
1238
|
.emitLitDebugLogEvents;
|
|
1239
1239
|
if (!shouldEmit) {
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
|
-
global.dispatchEvent(new CustomEvent('lit-debug', {
|
|
1242
|
+
global$1.dispatchEvent(new CustomEvent('lit-debug', {
|
|
1243
1243
|
detail: event,
|
|
1244
1244
|
}));
|
|
1245
1245
|
}
|
|
@@ -1250,24 +1250,24 @@
|
|
|
1250
1250
|
let debugLogRenderId = 0;
|
|
1251
1251
|
let issueWarning$3;
|
|
1252
1252
|
{
|
|
1253
|
-
global.litIssuedWarnings ??= new Set();
|
|
1253
|
+
global$1.litIssuedWarnings ??= new Set();
|
|
1254
1254
|
// Issue a warning, if we haven't already.
|
|
1255
1255
|
issueWarning$3 = (code, warning) => {
|
|
1256
1256
|
warning += code
|
|
1257
1257
|
? ` See https://lit.dev/msg/${code} for more information.`
|
|
1258
1258
|
: '';
|
|
1259
|
-
if (!global.litIssuedWarnings.has(warning)) {
|
|
1259
|
+
if (!global$1.litIssuedWarnings.has(warning)) {
|
|
1260
1260
|
console.warn(warning);
|
|
1261
|
-
global.litIssuedWarnings.add(warning);
|
|
1261
|
+
global$1.litIssuedWarnings.add(warning);
|
|
1262
1262
|
}
|
|
1263
1263
|
};
|
|
1264
1264
|
issueWarning$3('dev-mode', `Lit is in dev mode. Not recommended for production!`);
|
|
1265
1265
|
}
|
|
1266
|
-
const wrap = global.ShadyDOM?.inUse &&
|
|
1267
|
-
global.ShadyDOM?.noPatch === true
|
|
1268
|
-
? global.ShadyDOM.wrap
|
|
1266
|
+
const wrap = global$1.ShadyDOM?.inUse &&
|
|
1267
|
+
global$1.ShadyDOM?.noPatch === true
|
|
1268
|
+
? global$1.ShadyDOM.wrap
|
|
1269
1269
|
: (node) => node;
|
|
1270
|
-
const trustedTypes = global.trustedTypes;
|
|
1270
|
+
const trustedTypes = global$1.trustedTypes;
|
|
1271
1271
|
/**
|
|
1272
1272
|
* Our TrustedTypePolicy for HTML which is declared using the html template
|
|
1273
1273
|
* tag function.
|
|
@@ -2528,13 +2528,13 @@
|
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
2530
|
// Apply polyfills if available
|
|
2531
|
-
const polyfillSupport$1 = global.litHtmlPolyfillSupportDevMode
|
|
2531
|
+
const polyfillSupport$1 = global$1.litHtmlPolyfillSupportDevMode
|
|
2532
2532
|
;
|
|
2533
2533
|
polyfillSupport$1?.(Template, ChildPart);
|
|
2534
2534
|
// IMPORTANT: do not change the property name or the assignment expression.
|
|
2535
2535
|
// This line will be used in regexes to search for lit-html usage.
|
|
2536
|
-
(global.litHtmlVersions ??= []).push('3.1.4');
|
|
2537
|
-
if (global.litHtmlVersions.length > 1) {
|
|
2536
|
+
(global$1.litHtmlVersions ??= []).push('3.1.4');
|
|
2537
|
+
if (global$1.litHtmlVersions.length > 1) {
|
|
2538
2538
|
issueWarning$3('multiple-versions', `Multiple versions of Lit loaded. ` +
|
|
2539
2539
|
`Loading multiple versions is not recommended.`);
|
|
2540
2540
|
}
|
|
@@ -3325,7 +3325,7 @@
|
|
|
3325
3325
|
}
|
|
3326
3326
|
SgdsElement.styles = [css_248z$V];
|
|
3327
3327
|
|
|
3328
|
-
var css_248z$U = css`:host{--accordion-active-color:var(--sgds-primary
|
|
3328
|
+
var css_248z$U = css`:host{--accordion-active-color:var(--sgds-primary)}`;
|
|
3329
3329
|
|
|
3330
3330
|
const VALID_KEYS = ["Enter", "ArrowUp", "ArrowLeft", "ArrowDown", "ArrowRight"];
|
|
3331
3331
|
/**
|
|
@@ -3761,45 +3761,120 @@
|
|
|
3761
3761
|
}
|
|
3762
3762
|
|
|
3763
3763
|
/**
|
|
3764
|
-
* @
|
|
3765
|
-
*
|
|
3764
|
+
* @license
|
|
3765
|
+
* Copyright 2019 Google LLC
|
|
3766
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3767
|
+
*/
|
|
3768
|
+
const global = window;
|
|
3769
|
+
/**
|
|
3770
|
+
* Whether the current browser supports `adoptedStyleSheets`.
|
|
3771
|
+
*/
|
|
3772
|
+
const supportsAdoptingStyleSheets = global.ShadowRoot &&
|
|
3773
|
+
(global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&
|
|
3774
|
+
'adoptedStyleSheets' in Document.prototype &&
|
|
3775
|
+
'replace' in CSSStyleSheet.prototype;
|
|
3776
|
+
/**
|
|
3777
|
+
* Applies the given styles to a `shadowRoot`. When Shadow DOM is
|
|
3778
|
+
* available but `adoptedStyleSheets` is not, styles are appended to the
|
|
3779
|
+
* `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).
|
|
3780
|
+
* Note, when shimming is used, any styles that are subsequently placed into
|
|
3781
|
+
* the shadowRoot should be placed *before* any shimmed adopted styles. This
|
|
3782
|
+
* will match spec behavior that gives adopted sheets precedence over styles in
|
|
3783
|
+
* shadowRoot.
|
|
3766
3784
|
*/
|
|
3785
|
+
const adoptStyles = (renderRoot, styles) => {
|
|
3786
|
+
if (supportsAdoptingStyleSheets) {
|
|
3787
|
+
renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
|
|
3788
|
+
}
|
|
3789
|
+
else {
|
|
3790
|
+
styles.forEach((s) => {
|
|
3791
|
+
const style = document.createElement('style');
|
|
3792
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3793
|
+
const nonce = global['litNonce'];
|
|
3794
|
+
if (nonce !== undefined) {
|
|
3795
|
+
style.setAttribute('nonce', nonce);
|
|
3796
|
+
}
|
|
3797
|
+
style.textContent = s.cssText;
|
|
3798
|
+
renderRoot.appendChild(style);
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3801
|
+
};
|
|
3767
3802
|
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3803
|
+
/**
|
|
3804
|
+
* @typedef {import('./types').RenderOptions} RenderOptions
|
|
3805
|
+
* @typedef {import('./types').ScopedElementsMixin} ScopedElementsMixin
|
|
3806
|
+
* @typedef {import('./types').ScopedElementsHost} ScopedElementsHost
|
|
3807
|
+
* @typedef {import('./types').ScopedElementsMap} ScopedElementsMap
|
|
3808
|
+
* @typedef {import('@lit/reactive-element').CSSResultOrNative} CSSResultOrNative
|
|
3809
|
+
*/
|
|
3810
|
+
|
|
3811
|
+
// @ts-ignore
|
|
3812
|
+
const supportsScopedRegistry = !!ShadowRoot.prototype.createElement;
|
|
3773
3813
|
|
|
3774
3814
|
/**
|
|
3775
|
-
* @template {import('./types
|
|
3815
|
+
* @template {import('./types').Constructor<HTMLElement>} T
|
|
3776
3816
|
* @param {T} superclass
|
|
3777
|
-
* @return {T & import('./types
|
|
3817
|
+
* @return {T & import('./types').Constructor<ScopedElementsHost>}
|
|
3778
3818
|
*/
|
|
3779
|
-
const ScopedElementsMixinImplementation
|
|
3819
|
+
const ScopedElementsMixinImplementation = superclass =>
|
|
3780
3820
|
/** @type {ScopedElementsHost} */
|
|
3781
3821
|
class ScopedElementsHost extends superclass {
|
|
3782
3822
|
/**
|
|
3783
3823
|
* Obtains the scoped elements definitions map if specified.
|
|
3784
3824
|
*
|
|
3785
|
-
* @
|
|
3825
|
+
* @returns {ScopedElementsMap}
|
|
3786
3826
|
*/
|
|
3787
|
-
static scopedElements
|
|
3827
|
+
static get scopedElements() {
|
|
3828
|
+
return {};
|
|
3829
|
+
}
|
|
3788
3830
|
|
|
3789
|
-
|
|
3790
|
-
|
|
3831
|
+
/**
|
|
3832
|
+
* Obtains the ShadowRoot options.
|
|
3833
|
+
*
|
|
3834
|
+
* @type {ShadowRootInit}
|
|
3835
|
+
*/
|
|
3836
|
+
static get shadowRootOptions() {
|
|
3837
|
+
return this.__shadowRootOptions;
|
|
3791
3838
|
}
|
|
3792
3839
|
|
|
3793
|
-
/**
|
|
3794
|
-
|
|
3840
|
+
/**
|
|
3841
|
+
* Set the shadowRoot options.
|
|
3842
|
+
*
|
|
3843
|
+
* @param {ShadowRootInit} value
|
|
3844
|
+
*/
|
|
3845
|
+
static set shadowRootOptions(value) {
|
|
3846
|
+
this.__shadowRootOptions = value;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
/**
|
|
3850
|
+
* Obtains the element styles.
|
|
3851
|
+
*
|
|
3852
|
+
* @returns {CSSResultOrNative[]}
|
|
3853
|
+
*/
|
|
3854
|
+
static get elementStyles() {
|
|
3855
|
+
return this.__elementStyles;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
static set elementStyles(styles) {
|
|
3859
|
+
this.__elementStyles = styles;
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
// either TS or ESLint will complain here
|
|
3863
|
+
// eslint-disable-next-line no-unused-vars
|
|
3864
|
+
constructor(..._args) {
|
|
3865
|
+
super();
|
|
3866
|
+
/** @type {RenderOptions} */
|
|
3867
|
+
this.renderOptions = this.renderOptions || undefined;
|
|
3868
|
+
}
|
|
3795
3869
|
|
|
3796
3870
|
/**
|
|
3797
3871
|
* Obtains the CustomElementRegistry associated to the ShadowRoot.
|
|
3798
3872
|
*
|
|
3799
|
-
* @returns {CustomElementRegistry
|
|
3873
|
+
* @returns {CustomElementRegistry}
|
|
3800
3874
|
*/
|
|
3801
3875
|
get registry() {
|
|
3802
|
-
|
|
3876
|
+
// @ts-ignore
|
|
3877
|
+
return this.constructor.__registry;
|
|
3803
3878
|
}
|
|
3804
3879
|
|
|
3805
3880
|
/**
|
|
@@ -3808,15 +3883,13 @@
|
|
|
3808
3883
|
* @param {CustomElementRegistry} registry
|
|
3809
3884
|
*/
|
|
3810
3885
|
set registry(registry) {
|
|
3811
|
-
|
|
3886
|
+
// @ts-ignore
|
|
3887
|
+
this.constructor.__registry = registry;
|
|
3812
3888
|
}
|
|
3813
3889
|
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
*/
|
|
3818
|
-
attachShadow(options) {
|
|
3819
|
-
const { scopedElements } = /** @type {typeof ScopedElementsHost} */ (this.constructor);
|
|
3890
|
+
createRenderRoot() {
|
|
3891
|
+
const { scopedElements, shadowRootOptions, elementStyles } =
|
|
3892
|
+
/** @type {typeof ScopedElementsHost} */ (this.constructor);
|
|
3820
3893
|
|
|
3821
3894
|
const shouldCreateRegistry =
|
|
3822
3895
|
!this.registry ||
|
|
@@ -3828,60 +3901,89 @@
|
|
|
3828
3901
|
* Create a new registry if:
|
|
3829
3902
|
* - the registry is not defined
|
|
3830
3903
|
* - this class doesn't have its own registry *AND* has no shared registry
|
|
3831
|
-
* This is important specifically for superclasses/inheritance
|
|
3832
3904
|
*/
|
|
3833
3905
|
if (shouldCreateRegistry) {
|
|
3834
|
-
this.registry = new CustomElementRegistry();
|
|
3835
|
-
for (const [tagName, klass] of Object.entries(scopedElements
|
|
3836
|
-
this.
|
|
3906
|
+
this.registry = supportsScopedRegistry ? new CustomElementRegistry() : customElements;
|
|
3907
|
+
for (const [tagName, klass] of Object.entries(scopedElements)) {
|
|
3908
|
+
this.defineScopedElement(tagName, klass);
|
|
3837
3909
|
}
|
|
3838
3910
|
}
|
|
3839
3911
|
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3912
|
+
/** @type {ShadowRootInit} */
|
|
3913
|
+
const options = {
|
|
3914
|
+
mode: 'open',
|
|
3915
|
+
...shadowRootOptions,
|
|
3843
3916
|
customElements: this.registry,
|
|
3844
|
-
|
|
3845
|
-
// For backwards compatibility, we pass it as both
|
|
3846
|
-
registry: this.registry,
|
|
3847
|
-
});
|
|
3848
|
-
}
|
|
3849
|
-
};
|
|
3917
|
+
};
|
|
3850
3918
|
|
|
3851
|
-
|
|
3919
|
+
const createdRoot = this.attachShadow(options);
|
|
3920
|
+
if (supportsScopedRegistry) {
|
|
3921
|
+
this.renderOptions.creationScope = createdRoot;
|
|
3922
|
+
}
|
|
3852
3923
|
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
* @typedef {import('lit').LitElement} LitElement
|
|
3858
|
-
* @typedef {typeof import('lit').LitElement} TypeofLitElement
|
|
3859
|
-
* @typedef {import('@open-wc/dedupe-mixin').Constructor<LitElement>} LitElementConstructor
|
|
3860
|
-
* @typedef {import('@open-wc/dedupe-mixin').Constructor<ScopedElementsHost>} ScopedElementsHostConstructor
|
|
3861
|
-
*/
|
|
3924
|
+
if (createdRoot instanceof ShadowRoot) {
|
|
3925
|
+
adoptStyles(createdRoot, elementStyles);
|
|
3926
|
+
this.renderOptions.renderBefore = this.renderOptions.renderBefore || createdRoot.firstChild;
|
|
3927
|
+
}
|
|
3862
3928
|
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
* @param {T} superclass
|
|
3866
|
-
* @return {T & ScopedElementsHostConstructor}
|
|
3867
|
-
*/
|
|
3868
|
-
const ScopedElementsMixinImplementation = superclass =>
|
|
3869
|
-
/** @type {ScopedElementsHost} */
|
|
3870
|
-
class ScopedElementsHost extends ScopedElementsMixin$1(superclass) {
|
|
3871
|
-
createRenderRoot() {
|
|
3872
|
-
const { shadowRootOptions, elementStyles } = /** @type {TypeofLitElement} */ (
|
|
3873
|
-
this.constructor
|
|
3874
|
-
);
|
|
3929
|
+
return createdRoot;
|
|
3930
|
+
}
|
|
3875
3931
|
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3932
|
+
createScopedElement(tagName) {
|
|
3933
|
+
const root = supportsScopedRegistry ? this.shadowRoot : document;
|
|
3934
|
+
// @ts-ignore polyfill to support createElement on shadowRoot is loaded
|
|
3935
|
+
return root.createElement(tagName);
|
|
3936
|
+
}
|
|
3879
3937
|
|
|
3880
|
-
|
|
3938
|
+
/**
|
|
3939
|
+
* Defines a scoped element.
|
|
3940
|
+
*
|
|
3941
|
+
* @param {string} tagName
|
|
3942
|
+
* @param {typeof HTMLElement} klass
|
|
3943
|
+
*/
|
|
3944
|
+
defineScopedElement(tagName, klass) {
|
|
3945
|
+
const registeredClass = this.registry.get(tagName);
|
|
3946
|
+
if (registeredClass && supportsScopedRegistry === false && registeredClass !== klass) {
|
|
3947
|
+
// eslint-disable-next-line no-console
|
|
3948
|
+
console.error(
|
|
3949
|
+
[
|
|
3950
|
+
`You are trying to re-register the "${tagName}" custom element with a different class via ScopedElementsMixin.`,
|
|
3951
|
+
'This is only possible with a CustomElementRegistry.',
|
|
3952
|
+
'Your browser does not support this feature so you will need to load a polyfill for it.',
|
|
3953
|
+
'Load "@webcomponents/scoped-custom-element-registry" before you register ANY web component to the global customElements registry.',
|
|
3954
|
+
'e.g. add "<script src="/node_modules/@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min.js"></script>" as your first script tag.',
|
|
3955
|
+
'For more details you can visit https://open-wc.org/docs/development/scoped-elements/',
|
|
3956
|
+
].join('\n'),
|
|
3957
|
+
);
|
|
3958
|
+
}
|
|
3959
|
+
if (!registeredClass) {
|
|
3960
|
+
return this.registry.define(tagName, klass);
|
|
3961
|
+
}
|
|
3962
|
+
return this.registry.get(tagName);
|
|
3963
|
+
}
|
|
3881
3964
|
|
|
3882
|
-
|
|
3965
|
+
/**
|
|
3966
|
+
* @deprecated use the native el.tagName instead
|
|
3967
|
+
*
|
|
3968
|
+
* @param {string} tagName
|
|
3969
|
+
* @returns {string} the tag name
|
|
3970
|
+
*/
|
|
3971
|
+
// eslint-disable-next-line class-methods-use-this
|
|
3972
|
+
getScopedTagName(tagName) {
|
|
3973
|
+
// @ts-ignore
|
|
3974
|
+
return this.constructor.getScopedTagName(tagName);
|
|
3975
|
+
}
|
|
3883
3976
|
|
|
3884
|
-
|
|
3977
|
+
/**
|
|
3978
|
+
* @deprecated use the native el.tagName instead
|
|
3979
|
+
*
|
|
3980
|
+
* @param {string} tagName
|
|
3981
|
+
* @returns {string} the tag name
|
|
3982
|
+
*/
|
|
3983
|
+
// eslint-disable-next-line class-methods-use-this
|
|
3984
|
+
static getScopedTagName(tagName) {
|
|
3985
|
+
// @ts-ignore
|
|
3986
|
+
return this.__registry.get(tagName) ? tagName : undefined;
|
|
3885
3987
|
}
|
|
3886
3988
|
};
|
|
3887
3989
|
|
|
@@ -5452,7 +5554,7 @@
|
|
|
5452
5554
|
property()
|
|
5453
5555
|
], SgdsBreadcrumbItem.prototype, "rel", void 0);
|
|
5454
5556
|
|
|
5455
|
-
var css_248z$A = css`:host{--btn-border-radius:var(--sgds-border-radius);display:inline-block}button:focus:not(:focus-visible){outline:0}:host([variant=primary]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-primary-filled);--btn-border-color:var(--sgds-primary-filled);--btn-hover-bg:var(--sgds-primary-700);--btn-focus-box-shadow-color:var(--sgds-primary-300);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-hover-color:var(--sgds-white)}:host([variant=secondary]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-secondary-filled);--btn-border-color:var(--sgds-secondary-filled);--btn-hover-bg:var(--sgds-secondary-700);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-secondary-300);--btn-hover-color:var(--sgds-white)}:host([variant=warning]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-warning-filled);--btn-hover-bg:var(--sgds-warning-700);--btn-border-color:var(--sgds-warning-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-warning-300)}:host([variant=danger]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-danger-filled);--btn-hover-bg:var(--sgds-danger-700);--btn-border-color:var(--sgds-danger-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-danger-300)}:host([variant=success]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-success-filled);--btn-hover-bg:var(--sgds-success-700);--btn-border-color:var(--sgds-success-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-success-300)}:host([variant=info]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-info-filled);--btn-hover-bg:var(--sgds-info-700);--btn-border-color:var(--sgds-info-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-info-300)}:host([variant=light]) .btn{--btn-color:var(--sgds-dark);--btn-bg:var(--sgds-light-filled);--btn-border-color:var(--sgds-light-filled);--btn-hover-bg:var(--sgds-gray-200);--btn-hover-color:var(--sgds-dark);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-active-border-color:var(--sgds-gray-200);--btn-focus-box-shadow-color:var(--sgds-gray-500)}:host([variant=dark]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-dark-filled);--btn-border-color:var(--sgds-dark-filled);--btn-hover-bg:var(--sgds-gray-700);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-active-border-color:var(--sgds-gray-700);--btn-focus-box-shadow-color:var(--sgds-gray-500)}:host([variant=link]) .btn{--btn-color:var(--sgds-link);--btn-bg:transparent;--btn-border-color:transparent;--btn-hover-bg:transparent;--btn-hover-color:var(--sgds-info-700);--btn-active-color:var(--sgds-info-700);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-info-300);--btn-disabled-color:var(--sgds-disabled-color)}:host([variant=outlined]){--btn-color:var(--sgds-primary-text-emphasis);--btn-bg:var(--sgds-white);--btn-border-color:var(--sgds-primary
|
|
5557
|
+
var css_248z$A = css`:host{--btn-border-radius:var(--sgds-border-radius);display:inline-block}button:focus:not(:focus-visible){outline:0}:host([variant=primary]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-primary-filled);--btn-border-color:var(--sgds-primary-filled);--btn-hover-bg:var(--sgds-primary-700);--btn-focus-box-shadow-color:var(--sgds-primary-300);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-hover-color:var(--sgds-white)}:host([variant=secondary]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-secondary-filled);--btn-border-color:var(--sgds-secondary-filled);--btn-hover-bg:var(--sgds-secondary-700);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-secondary-300);--btn-hover-color:var(--sgds-white)}:host([variant=warning]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-warning-filled);--btn-hover-bg:var(--sgds-warning-700);--btn-border-color:var(--sgds-warning-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-warning-300)}:host([variant=danger]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-danger-filled);--btn-hover-bg:var(--sgds-danger-700);--btn-border-color:var(--sgds-danger-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-danger-300)}:host([variant=success]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-success-filled);--btn-hover-bg:var(--sgds-success-700);--btn-border-color:var(--sgds-success-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-success-300)}:host([variant=info]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-info-filled);--btn-hover-bg:var(--sgds-info-700);--btn-border-color:var(--sgds-info-filled);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-info-300)}:host([variant=light]) .btn{--btn-color:var(--sgds-dark);--btn-bg:var(--sgds-light-filled);--btn-border-color:var(--sgds-light-filled);--btn-hover-bg:var(--sgds-gray-200);--btn-hover-color:var(--sgds-dark);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-active-border-color:var(--sgds-gray-200);--btn-focus-box-shadow-color:var(--sgds-gray-500)}:host([variant=dark]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-dark-filled);--btn-border-color:var(--sgds-dark-filled);--btn-hover-bg:var(--sgds-gray-700);--btn-hover-color:var(--sgds-white);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--btn-hover-bg);--btn-active-border-color:var(--sgds-gray-700);--btn-focus-box-shadow-color:var(--sgds-gray-500)}:host([variant=link]) .btn{--btn-color:var(--sgds-link);--btn-bg:transparent;--btn-border-color:transparent;--btn-hover-bg:transparent;--btn-hover-color:var(--sgds-info-700);--btn-active-color:var(--sgds-info-700);--btn-active-bg:var(--btn-hover-bg);--btn-focus-box-shadow-color:var(--sgds-info-300);--btn-disabled-color:var(--sgds-disabled-color)}:host([variant=outlined]){--btn-color:var(--sgds-primary-text-emphasis);--btn-bg:var(--sgds-white);--btn-border-color:var(--sgds-primary);--btn-hover-bg:var(--sgds-primary-filled);--btn-hover-color:var(--sgds-white);--btn-focus-box-shadow-color:var(--sgds-primary-300);--btn-active-bg:var(--sgds-primary-filled);--btn-active-border-color:var(--sgds-primary-filled);--btn-active-color:var(--sgds-white)}:host([variant=outline-primary]) .btn{--btn-color:var(--sgds-primary-text-emphasis);--btn-bg:var(--sgds-primary-bg-subtle);--btn-border-color:var(--sgds-primary-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-primary-filled);--btn-hover-border-color:var(--sgds-primary-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-primary-filled);--btn-active-border-color:var(--sgds-primary-filled);--btn-focus-box-shadow-color:var(--sgds-primary-300)}:host([variant=outline-secondary]) .btn{--btn-color:var(--sgds-secondary-text-emphasis);--btn-bg:var(--sgds-secondary-bg-subtle);--btn-border-color:var(--sgds-secondary-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-secondary-filled);--btn-hover-border-color:var(--sgds-secondary-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-secondary-filled);--btn-active-border-color:var(--sgds-secondary-filled);--btn-focus-box-shadow-color:var(--sgds-secondary-300)}:host([variant=outline-warning]) .btn{--btn-color:var(--sgds-warning-text-emphasis);--btn-bg:var(--sgds-warning-bg-subtle);--btn-border-color:var(--sgds-warning-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-warning-filled);--btn-hover-border-color:var(--sgds-warning-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-warning-filled);--btn-active-border-color:var(--sgds-warning-filled);--btn-focus-box-shadow-color:var(--sgds-warning-300)}:host([variant=outline-danger]) .btn{--btn-color:var(--sgds-danger-text-emphasis);--btn-bg:var(--sgds-danger-bg-subtle);--btn-border-color:var(--sgds-danger-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-danger-filled);--btn-hover-border-color:var(--sgds-danger-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-danger-filled);--btn-active-border-color:var(--sgds-danger-filled);--btn-focus-box-shadow-color:var(--sgds-danger-300)}:host([variant=outline-success]) .btn{--btn-color:var(--sgds-success-text-emphasis);--btn-bg:var(--sgds-success-bg-subtle);--btn-border-color:var(--sgds-success-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-success-filled);--btn-hover-border-color:var(--sgds-success-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-success-filled);--btn-active-border-color:var(--sgds-success-filled);--btn-focus-box-shadow-color:var(--sgds-success-300)}:host([variant=outline-info]) .btn{--btn-color:var(--sgds-info-text-emphasis);--btn-bg:var(--sgds-info-bg-subtle);--btn-border-color:var(--sgds-info-border-subtle);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-info-filled);--btn-hover-border-color:var(--sgds-info-filled);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-info-filled);--btn-active-border-color:var(--sgds-info-filled);--btn-focus-box-shadow-color:var(--sgds-info-300)}:host([variant=outline-light]) .btn{--btn-color:var(--sgds-light-text-emphasis);--btn-bg:var(--sgds-light-bg-subtle);--btn-border-color:var(--sgds-light-border-subtle);--btn-hover-color:var(--sgds-light-text-emphasis);--btn-hover-bg:var(--sgds-gray-200);--btn-hover-border-color:var(--sgds-gray-300);--btn-active-color:var(--sgds-light-text-emphasis);--btn-active-bg:var(--sgds-gray-200);--btn-active-border-color:var(--sgds-light-border-subtle);--btn-focus-box-shadow-color:var(--sgds-gray-500)}:host([variant=outline-dark]) .btn{--btn-color:var(--sgds-white);--btn-bg:var(--sgds-dark-filled);--btn-border-color:var(--sgds-dark-filled);--btn-hover-color:var(--sgds-white);--btn-hover-bg:var(--sgds-gray-700);--btn-active-color:var(--sgds-white);--btn-active-bg:var(--sgds-gray-700);--btn-active-border-color:var(--sgds-gray-700);--btn-focus-box-shadow-color:var(--sgds-gray-500);--btn-disabled-color:var(--sgds-white)}.btn{--btn-padding-x:var(--sgds-input-btn-padding-x);--btn-padding-y:var(--sgds-input-btn-padding-y);--btn-font-family:var(--sgds-font-sans-serif);--btn-font-size:1rem;--btn-font-weight:400;--btn-line-height:var(--sgds-line-height-lg);--btn-border-width:var(--sgds-border-width);background-color:var(--btn-bg);border:var(--btn-border-width) solid var(--btn-border-color);border-radius:var(--btn-border-radius);color:var(--btn-color);cursor:pointer;display:inline-block;font-family:var(--btn-font-family);font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);line-height:var(--btn-line-height);padding:var(--btn-padding-y) var(--btn-padding-x);text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;user-select:none;vertical-align:middle}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{--btn-hover-color:var(--sgds-white);background-color:var(--btn-hover-bg);color:var(--btn-hover-color)}.btn:focus-visible{--btn-focus-box-shadow-color:var(--sgds-gray-500);--btn-focus-box-shadow:0px 0px 0px var(--sgds-focus-width,0.13rem) var(--btn-focus-box-shadow-color);--btn-hover-color:var(--sgds-white);background-color:var(--btn-hover-bg);border-color:var(--btn-hover-border-color);box-shadow:var(--btn-focus-box-shadow);color:var(--btn-hover-color);outline:0}.btn.active{--btn-active-color:light-dark(var(--sgds-white),var(--sgds-black));--btn-active-bg:light-dark(var(--sgds-black),var(--sgds-white));--btn-active-border-color:transparent;background-color:var(--btn-active-bg);border-color:var(--btn-active-border-color);color:var(--btn-active-color)}.btn.disabled,.btn:disabled{--btn-disabled-color:var(--btn-color);--btn-disabled-opacity:var(--sgds-disabled-opacity);color:var(--btn-disabled-color);cursor:not-allowed;opacity:var(--btn-disabled-opacity)}.btn-link{text-decoration:underline;text-underline-offset:.25rem}.btn-link:hover{color:var(--btn-hover-color)}.btn-lg{--btn-padding-y:0.5rem;--btn-padding-x:1rem;--btn-font-size:1.25rem;--btn-border-radius:var(--sgds-border-radius-lg)}.btn-sm{--btn-padding-y:0.25rem;--btn-padding-x:0.5rem;--btn-font-size:0.875rem;--btn-border-radius:var(--sgds-border-radius-sm)}slot[name=leftIcon]::slotted(*){padding-right:var(--sgds-spacer-2)}slot[name=rightIcon]::slotted(*){padding-left:var(--sgds-spacer-2)}`;
|
|
5456
5558
|
|
|
5457
5559
|
/**
|
|
5458
5560
|
* @summary Custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
|