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