@politiet/sheriff-web-components 2.1.2 → 2.1.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/dist/playwright-util/custom-matchers.d.ts.map +1 -1
- package/dist/playwright-util/custom-matchers.js +2 -3
- package/dist/playwright-util/custom-matchers.js.map +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSChipWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSChipWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSChipWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSDetailsWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSDetailsWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSDetailsWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.js.map +1 -1
- package/dist/react-wrappers/types.d.ts +4 -0
- package/dist/react-wrappers/types.d.ts.map +1 -0
- package/dist/react-wrappers/types.js +2 -0
- package/dist/react-wrappers/types.js.map +1 -0
- package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
- package/dist/sds-button/sds-button.styles.js +15 -0
- package/dist/sds-button/sds-button.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.spec.js +7 -9
- package/dist/sds-textfield/sds-textfield.spec.js.map +1 -1
- package/dist/sheriff-web-components.js +20 -5
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-matchers.d.ts","sourceRoot":"","sources":["../../src/playwright-util/custom-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEtG,eAAO,MAAM,MAAM;oBACI,kBAAkB,YAAY,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"custom-matchers.d.ts","sourceRoot":"","sources":["../../src/playwright-util/custom-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEtG,eAAO,MAAM,MAAM;oBACI,kBAAkB,YAAY,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;uBAK/D,kBAAkB,YAAY,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;sBAInE,kBAAkB,YAAY,OAAO,YAAY,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;EAQ3G,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { expect as pwExpect } from '@playwright/test';
|
|
2
2
|
export const expect = pwExpect.extend({
|
|
3
3
|
async isChecked(receiver) {
|
|
4
|
+
console.log(await receiver.getAttribute('checked'));
|
|
4
5
|
expect(await receiver.getAttribute('checked')).toBe('');
|
|
5
6
|
return { message: () => 'Pass', pass: true };
|
|
6
7
|
},
|
|
@@ -13,9 +14,7 @@ export const expect = pwExpect.extend({
|
|
|
13
14
|
const pass = actual === expected;
|
|
14
15
|
return {
|
|
15
16
|
pass,
|
|
16
|
-
message: () => pass
|
|
17
|
-
? `expected value not to be “${expected}”`
|
|
18
|
-
: `expected value to be “${expected}”, but got ${actual === null ? 'no value' : `“${actual}”`}`,
|
|
17
|
+
message: () => (pass ? `expected value not to be “${expected}”` : `expected value to be “${expected}”, but got ${actual === null ? 'no value' : `“${actual}”`}`),
|
|
19
18
|
};
|
|
20
19
|
},
|
|
21
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-matchers.js","sourceRoot":"","sources":["../../src/playwright-util/custom-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAkD,MAAM,kBAAkB,CAAC;AAEtG,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IACrC,KAAK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CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9C,CAAC;IACD,KAAK,CAAC,YAAY,CAA2B,QAAiB;QAC7D,MAAM,CAAC,MAAM,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC1D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9C,CAAC;IACD,KAAK,CAAC,WAAW,CAA2B,QAAiB,EAAE,QAAgB;QAC9E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAoB,EAAE,EAAE,CAAC,EAAE,CAAC,KAAe,CAAC,CAAC;QACrF,MAAM,IAAI,GAAG,MAAM,KAAK,QAAQ,CAAC;QACjC,OAAO;YACN,IAAI;YACJ,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,6BAA6B,QAAQ,GAAG,CAAC,CAAC,CAAC,yBAAyB,QAAQ,cAAc,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC;SAChK,CAAC;IACH,CAAC;CACD,CAAC,CAAC","sourcesContent":["import { expect as pwExpect, ExpectMatcherState, Locator, MatcherReturnType } from '@playwright/test';\n\nexport const expect = pwExpect.extend({\n\tasync isChecked(this: ExpectMatcherState, receiver: Locator): Promise<MatcherReturnType> {\n\t\tconsole.log(await receiver.getAttribute('checked'));\n\t\texpect(await receiver.getAttribute('checked')).toBe('');\n\t\treturn { message: () => 'Pass', pass: true };\n\t},\n\tasync isNotChecked(this: ExpectMatcherState, receiver: Locator): Promise<MatcherReturnType> {\n\t\texpect(await receiver.getAttribute('checked')).toBeNull();\n\t\treturn { message: () => 'Pass', pass: true };\n\t},\n\tasync toHaveValue(this: ExpectMatcherState, receiver: Locator, expected: string): Promise<MatcherReturnType> {\n\t\tconst actual = await receiver.evaluate((el: HTMLInputElement) => el.value as string);\n\t\tconst pass = actual === expected;\n\t\treturn {\n\t\t\tpass,\n\t\t\tmessage: () => (pass ? `expected value not to be “${expected}”` : `expected value to be “${expected}”, but got ${actual === null ? 'no value' : `“${actual}”`}`),\n\t\t};\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSAlert } from '../sds-alert/sds-alert';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSAlertWrapper: import("@lit/react").ReactWebComponent<SDSAlert, {
|
|
4
4
|
onRemove: SheriffEventName;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSAlertWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSAlertWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSAlertWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSAlertWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,eAAe;cAKA,gBAAgB;EAE1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSAlertWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSAlertWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC9C,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,QAAQ;IACtB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSAlert } from '../sds-alert/sds-alert';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSAlertWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSAlertWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC9C,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,QAAQ;IACtB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSAlert } from '../sds-alert/sds-alert';\nimport { SheriffEventName } from './types';\n\nexport const SDSAlertWrapper = createComponent({\n\ttagName: 'sds-alert',\n\telementClass: SDSAlert,\n\treact: React,\n\tevents: {\n\t\tonRemove: 'sds-remove' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSButton } from '../sds-button/sds-button';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSButtonWrapper: import("@lit/react").ReactWebComponent<SDSButton, {
|
|
4
4
|
onClick: SheriffEventName;
|
|
5
5
|
onReset: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSButtonWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSButtonWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSButtonWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSButtonWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,gBAAgB;aAKP,gBAAgB;aAChB,gBAAgB;cACd,gBAAgB;EAEtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSButtonWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSButtonWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC/C,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,SAAS;IACvB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSButton } from '../sds-button/sds-button';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSButtonWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSButtonWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC/C,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,SAAS;IACvB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSButton } from '../sds-button/sds-button';\nimport { SheriffEventName } from './types';\n\nexport const SDSButtonWrapper = createComponent({\n\ttagName: 'sds-button',\n\telementClass: SDSButton,\n\treact: React,\n\tevents: {\n\t\tonClick: 'click' as SheriffEventName,\n\t\tonReset: 'reset' as SheriffEventName,\n\t\tonSubmit: 'submit' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSCheckboxGroup } from '../sds-checkbox-group/sds-checkbox-group';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSCheckboxGroupWrapper: import("@lit/react").ReactWebComponent<SDSCheckboxGroup, {
|
|
4
4
|
onUpdate: SheriffEventName;
|
|
5
5
|
onChange: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSCheckboxGroupWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxGroupWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSCheckboxGroupWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxGroupWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,uBAAuB;cAKR,gBAAgB;cACpB,gBAAgB;EAEtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSCheckboxGroupWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxGroupWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;IACtD,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;QAC1C,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSCheckboxGroup } from '../sds-checkbox-group/sds-checkbox-group';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSCheckboxGroupWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxGroupWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;IACtD,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;QAC1C,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSCheckboxGroup } from '../sds-checkbox-group/sds-checkbox-group';\nimport { SheriffEventName } from './types';\n\nexport const SDSCheckboxGroupWrapper = createComponent({\n\ttagName: 'sds-checkbox-group',\n\telementClass: SDSCheckboxGroup,\n\treact: React,\n\tevents: {\n\t\tonUpdate: 'sds-update' as SheriffEventName,\n\t\tonChange: 'change' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSCheckbox } from '../sds-checkbox/sds-checkbox';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSCheckboxWrapper: import("@lit/react").ReactWebComponent<SDSCheckbox, {
|
|
4
4
|
onChange: SheriffEventName;
|
|
5
5
|
onFocus: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSCheckboxWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSCheckboxWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,kBAAkB;cAKP,gBAAgB;aAClB,gBAAgB;YAClB,gBAAgB;EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSCheckboxWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IACjD,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,WAAW;IACzB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSCheckbox } from '../sds-checkbox/sds-checkbox';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSCheckboxWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSCheckboxWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IACjD,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,WAAW;IACzB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSCheckbox } from '../sds-checkbox/sds-checkbox';\nimport { SheriffEventName } from './types';\n\nexport const SDSCheckboxWrapper = createComponent({\n\ttagName: 'sds-checkbox',\n\telementClass: SDSCheckbox,\n\treact: React,\n\tevents: {\n\t\tonChange: 'change' as SheriffEventName,\n\t\tonFocus: 'focus' as SheriffEventName,\n\t\tonBlur: 'blur' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSChip } from '../sds-chip/sds-chip';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSChipWrapper: import("@lit/react").ReactWebComponent<SDSChip, {
|
|
4
4
|
onChange: SheriffEventName;
|
|
5
5
|
onRemove: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSChipWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSChipWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSChipWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSChipWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,cAAc;cAKH,gBAAgB;cACZ,gBAAgB;EAE1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSChipWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSChipWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;IAC7C,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSChip } from '../sds-chip/sds-chip';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSChipWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSChipWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;IAC7C,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSChip } from '../sds-chip/sds-chip';\nimport { SheriffEventName } from './types';\n\nexport const SDSChipWrapper = createComponent({\n\ttagName: 'sds-chip',\n\telementClass: SDSChip,\n\treact: React,\n\tevents: {\n\t\tonChange: 'change' as SheriffEventName,\n\t\tonRemove: 'sds-remove' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSDetails } from '../sds-details/sds-details';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSDetailsWrapper: import("@lit/react").ReactWebComponent<SDSDetails, {
|
|
4
4
|
onToggle: SheriffEventName;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSDetailsWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSDetailsWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSDetailsWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSDetailsWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,iBAAiB;cAKF,gBAAgB;EAE1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSDetailsWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSDetailsWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAChD,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSDetails } from '../sds-details/sds-details';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSDetailsWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSDetailsWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAChD,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSDetails } from '../sds-details/sds-details';\nimport { SheriffEventName } from './types';\n\nexport const SDSDetailsWrapper = createComponent({\n\ttagName: 'sds-details',\n\telementClass: SDSDetails,\n\treact: React,\n\tevents: {\n\t\tonToggle: 'sds-toggle' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSNotification } from '../sds-notification/sds-notification';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSNotificationWrapper: import("@lit/react").ReactWebComponent<SDSNotification, {
|
|
4
4
|
onRemove: SheriffEventName;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSNotificationWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSNotificationWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSNotificationWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSNotificationWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,sBAAsB;cAKP,gBAAgB;EAE1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSNotificationWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSNotificationWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,kBAAkB;IAC3B,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSNotification } from '../sds-notification/sds-notification';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSNotificationWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSNotificationWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,kBAAkB;IAC3B,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;KAC1C;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSNotification } from '../sds-notification/sds-notification';\nimport { SheriffEventName } from './types';\n\nexport const SDSNotificationWrapper = createComponent({\n\ttagName: 'sds-notification',\n\telementClass: SDSNotification,\n\treact: React,\n\tevents: {\n\t\tonRemove: 'sds-remove' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSRadioGroup } from '../sds-radio-group/sds-radio-group';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSRadioGroupWrapper: import("@lit/react").ReactWebComponent<SDSRadioGroup, {
|
|
4
4
|
onUpdate: SheriffEventName;
|
|
5
5
|
onChange: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSRadioGroupWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioGroupWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSRadioGroupWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioGroupWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,oBAAoB;cAKL,gBAAgB;cACpB,gBAAgB;EAEtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSRadioGroupWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioGroupWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IACnD,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,aAAa;IAC3B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;QAC1C,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSRadioGroup } from '../sds-radio-group/sds-radio-group';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSRadioGroupWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioGroupWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IACnD,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,aAAa;IAC3B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,YAAgC;QAC1C,QAAQ,EAAE,QAA4B;KACtC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSRadioGroup } from '../sds-radio-group/sds-radio-group';\nimport { SheriffEventName } from './types';\n\nexport const SDSRadioGroupWrapper = createComponent({\n\ttagName: 'sds-radio-group',\n\telementClass: SDSRadioGroup,\n\treact: React,\n\tevents: {\n\t\tonUpdate: 'sds-update' as SheriffEventName,\n\t\tonChange: 'change' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSRadio } from '../sds-radio/sds-radio';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSRadioWrapper: import("@lit/react").ReactWebComponent<SDSRadio, {
|
|
4
4
|
onChange: SheriffEventName;
|
|
5
5
|
onFocus: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSRadioWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSRadioWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,eAAe;cAKJ,gBAAgB;aAClB,gBAAgB;YAClB,gBAAgB;EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSRadioWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC9C,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,QAAQ;IACtB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSRadio } from '../sds-radio/sds-radio';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSRadioWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSRadioWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC9C,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,QAAQ;IACtB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSRadio } from '../sds-radio/sds-radio';\nimport { SheriffEventName } from './types';\n\nexport const SDSRadioWrapper = createComponent({\n\ttagName: 'sds-radio',\n\telementClass: SDSRadio,\n\treact: React,\n\tevents: {\n\t\tonChange: 'change' as SheriffEventName,\n\t\tonFocus: 'focus' as SheriffEventName,\n\t\tonBlur: 'blur' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSSwitch } from '../sds-switch/sds-switch';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSSwitchWrapper: import("@lit/react").ReactWebComponent<SDSSwitch, {
|
|
4
4
|
onChange: SheriffEventName;
|
|
5
5
|
onFocus: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSSwitchWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSSwitchWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSSwitchWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSSwitchWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,gBAAgB;cAKL,gBAAgB;aAClB,gBAAgB;YAClB,gBAAgB;EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSSwitchWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSSwitchWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC/C,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,SAAS;IACvB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSSwitch } from '../sds-switch/sds-switch';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSSwitchWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSSwitchWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC/C,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,SAAS;IACvB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSSwitch } from '../sds-switch/sds-switch';\nimport { SheriffEventName } from './types';\n\nexport const SDSSwitchWrapper = createComponent({\n\ttagName: 'sds-switch',\n\telementClass: SDSSwitch,\n\treact: React,\n\tevents: {\n\t\tonChange: 'change' as SheriffEventName,\n\t\tonFocus: 'focus' as SheriffEventName,\n\t\tonBlur: 'blur' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSTextArea } from '../sds-textarea/sds-textarea';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSTextAreaWrapper: import("@lit/react").ReactWebComponent<SDSTextArea, {
|
|
4
4
|
onInput: SheriffEventName;
|
|
5
5
|
onChange: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSTextAreaWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextAreaWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSTextAreaWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextAreaWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,kBAAkB;aAKT,gBAAgB;cACf,gBAAgB;cACf,gBAAgB;aAClB,gBAAgB;YAClB,gBAAgB;EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSTextAreaWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextAreaWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IACjD,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,WAAW;IACzB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,OAA2B;QACrC,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSTextArea } from '../sds-textarea/sds-textarea';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSTextAreaWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextAreaWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IACjD,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,WAAW;IACzB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,OAA2B;QACrC,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSTextArea } from '../sds-textarea/sds-textarea';\nimport { SheriffEventName } from './types';\n\nexport const SDSTextAreaWrapper = createComponent({\n\ttagName: 'sds-textarea',\n\telementClass: SDSTextArea,\n\treact: React,\n\tevents: {\n\t\tonInput: 'input' as SheriffEventName,\n\t\tonChange: 'input' as SheriffEventName,\n\t\tonSelect: 'select' as SheriffEventName,\n\t\tonFocus: 'focus' as SheriffEventName,\n\t\tonBlur: 'blur' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDSTextField } from '../sds-textfield/sds-textfield';
|
|
2
|
-
import { SheriffEventName } from '
|
|
2
|
+
import { SheriffEventName } from './types';
|
|
3
3
|
export declare const SDSTextFieldWrapper: import("@lit/react").ReactWebComponent<SDSTextField, {
|
|
4
4
|
onInput: SheriffEventName;
|
|
5
5
|
onChange: SheriffEventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSTextFieldWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextFieldWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SDSTextFieldWrapper.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextFieldWrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,mBAAmB;aAKV,gBAAgB;cACf,gBAAgB;cACf,gBAAgB;aAClB,gBAAgB;YAClB,gBAAgB;EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDSTextFieldWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextFieldWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAClD,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,OAA2B;QACrC,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSTextField } from '../sds-textfield/sds-textfield';\nimport { SheriffEventName } from '
|
|
1
|
+
{"version":3,"file":"SDSTextFieldWrapper.js","sourceRoot":"","sources":["../../src/react-wrappers/SDSTextFieldWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAClD,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACP,OAAO,EAAE,OAA2B;QACpC,QAAQ,EAAE,OAA2B;QACrC,QAAQ,EAAE,QAA4B;QACtC,OAAO,EAAE,OAA2B;QACpC,MAAM,EAAE,MAA0B;KAClC;CACD,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit/react';\nimport React from 'react';\nimport { SDSTextField } from '../sds-textfield/sds-textfield';\nimport { SheriffEventName } from './types';\n\nexport const SDSTextFieldWrapper = createComponent({\n\ttagName: 'sds-textfield',\n\telementClass: SDSTextField,\n\treact: React,\n\tevents: {\n\t\tonInput: 'input' as SheriffEventName,\n\t\tonChange: 'input' as SheriffEventName,\n\t\tonSelect: 'select' as SheriffEventName,\n\t\tonFocus: 'focus' as SheriffEventName,\n\t\tonBlur: 'blur' as SheriffEventName,\n\t},\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/react-wrappers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/react-wrappers/types.ts"],"names":[],"mappings":"","sourcesContent":["import { EventName } from '@lit/react';\nimport { SheriffEvent } from '../types';\nexport type SheriffEventName = EventName<SheriffEvent>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-button.styles.d.ts","sourceRoot":"","sources":["../../src/sds-button/sds-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"sds-button.styles.d.ts","sourceRoot":"","sources":["../../src/sds-button/sds-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA2KlB,CAAC"}
|
|
@@ -70,6 +70,9 @@ export const styles = css `
|
|
|
70
70
|
opacity: var(--_sds-button-disabled-opacity);
|
|
71
71
|
cursor: not-allowed;
|
|
72
72
|
pointer-events: none;
|
|
73
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-neutral-action-default));
|
|
74
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));
|
|
75
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-contrast-default));
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
|
|
@@ -90,6 +93,12 @@ export const styles = css `
|
|
|
90
93
|
.sds-button:active {
|
|
91
94
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-main-surface-active)));
|
|
92
95
|
}
|
|
96
|
+
|
|
97
|
+
.sds-button:disabled {
|
|
98
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
99
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));
|
|
100
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));
|
|
101
|
+
}
|
|
93
102
|
}
|
|
94
103
|
|
|
95
104
|
:host([variant='tertiary']) {
|
|
@@ -113,6 +122,12 @@ export const styles = css `
|
|
|
113
122
|
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
114
123
|
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));
|
|
115
124
|
}
|
|
125
|
+
|
|
126
|
+
.sds-button:disabled {
|
|
127
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
128
|
+
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
129
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));
|
|
130
|
+
}
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
:host([variant='tertiary']):host([icon]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-button.styles.js","sourceRoot":"","sources":["../../src/sds-button/sds-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"sds-button.styles.js","sourceRoot":"","sources":["../../src/sds-button/sds-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2KxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));\n\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));\n\t\t--_sds-button-border-width: var(--sds-button-border-width, var(--sds-border-md));\n\t\t--_sds-button-disabled-opacity: var(--sds-button-disabled-opacity, var(--sds-color-states-disabled-opacity));\n\t\t--_sds-button-focus-color: var(--sds-button-focus-color, var(--sds-color-states-focus-outer));\n\t\t--_sds-button-focus-inner-color: var(--sds-button-focus-inner-color, var(--sds-color-states-focus-inner));\n\t\t--_sds-button-focus-spacing: var(--sds-button-focus-spacing, var(--sds-color-states-focus-spacing));\n\t\t--_sds-button-font-family: var(--sds-button-font, var(--sds-typography-font-family-roboto));\n\t\t--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-button-font-weight: var(--sds-button-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));\n\t\t--_sds-button-gap: var(--sds-button-gap, var(--sds-spacing-3xs));\n\t\t--_sds-button-line-height: var(--sds-button-line-height, var(--sds-typography-body-md-desktop-line-height));\n\t\t--_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-lg));\n\t\t--_sds-button-padding-block: var(--sds-button-padding-block, 0);\n\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-xs));\n\t\t--_sds-button-radius: var(--sds-button-radius, var(--sds-radius-sm));\n\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));\n\n\t\t--_sds-button-tertiary-text-decoration: var(--sds-typography-link-text-decoration, underline);\n\t\t--_sds-button-tertiary-text-underline-offset: var(--sds-typography-link-text-underline-offset, 4px);\n\t\t--_sds-button-tertiary-text-underline-thickness: 2px;\n\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\n\t\t::slotted(sds-icon) {\n\t\t\t--sds-icon-color: var(--_sds-button-text-color);\n\t\t}\n\t}\n\n\t.sds-button {\n\t\talign-items: center;\n\t\tbackground-color: var(--_sds-button-background-color);\n\t\tborder-radius: var(--_sds-button-radius);\n\t\tborder: var(--_sds-button-border-width) solid var(--_sds-button-border-color);\n\t\tcolor: var(--_sds-button-text-color);\n\t\tcursor: pointer;\n\t\tdisplay: inline-flex;\n\t\tfont-family: var(--_sds-button-font-family);\n\t\tfont-size: var(--_sds-button-font-size);\n\t\tfont-weight: var(--_sds-button-font-weight);\n\t\tgap: var(--_sds-button-gap);\n\t\tinline-size: 100%;\n\t\tjustify-content: center;\n\t\tline-height: var(--_sds-button-line-height);\n\t\tmin-height: var(--_sds-button-min-height);\n\t\tpadding: var(--_sds-button-padding-block) var(--_sds-button-padding-inline);\n\t\ttext-align: center;\n\n\t\t&:hover {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: 0 0 0 var(--sds-color-states-focus-spacing) var(--_sds-button-focus-inner-color);\n\t\t\toutline: 3px solid var(--_sds-button-focus-color);\n\t\t\toutline-offset: 3px;\n\t\t}\n\n\t\t&:active {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));\n\t\t}\n\n\t\t&:disabled {\n\t\t\topacity: var(--_sds-button-disabled-opacity);\n\t\t\tcursor: not-allowed;\n\t\t\tpointer-events: none;\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-neutral-action-default));\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));\n\t\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-contrast-default));\n\t\t}\n\t}\n\n\t.sds-button--as-link {\n\t\tinline-size: auto;\n\t\ttext-decoration: none;\n\t}\n\n\t:host([variant='secondary']) {\n\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));\n\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));\n\n\t\t.sds-button:hover {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-hover, var(--sds-color-main-surface-hover)));\n\t\t}\n\n\t\t.sds-button:active {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-main-surface-active)));\n\t\t}\n\n\t\t.sds-button:disabled {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));\n\t\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));\n\t\t}\n\t}\n\n\t:host([variant='tertiary']) {\n\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);\n\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));\n\n\t\t.sds-button:hover {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));\n\n\t\t\ttext-decoration: var(--_sds-button-tertiary-text-decoration);\n\t\t\ttext-decoration-thickness: var(--_sds-button-tertiary-text-underline-thickness);\n\t\t\ttext-underline-offset: var(--_sds-button-tertiary-text-underline-offset);\n\t\t}\n\n\t\t.sds-button:active {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));\n\t\t}\n\n\t\t.sds-button:disabled {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, transparent);\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t\t--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));\n\t\t}\n\t}\n\n\t:host([variant='tertiary']):host([icon]) {\n\t\t.sds-button:hover {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-hover, var(--sds-color-main-surface-hover)));\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t}\n\n\t\t.sds-button:active {\n\t\t\t--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-main-surface-active)));\n\t\t\t--_sds-button-border-color: var(--sds-button-border-color, transparent);\n\t\t}\n\t}\n\n\t:host([size='medium']), /* Deprecated */\n\t:host([size='md']) {\n\t\t--_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-md));\n\t\t--_sds-button-padding-block: var(--sds-button-padding-block, var(--sds-spacing-4xs));\n\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-3xs));\n\t\t--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-md));\n\n\t\t&:host([variant='tertiary']) {\n\t\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);\n\t\t}\n\t}\n\n\t:host([size='small']), /* Deprecated */\n\t:host([size='sm']) {\n\t\t--_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-sm));\n\t\t--_sds-button-padding-block: var(--sds-button-padding-block, 0);\n\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-3xs));\n\t\t--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-sm));\n\n\t\t&:host([variant='tertiary']) {\n\t\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);\n\t\t}\n\t}\n\n\t:host([icon]) {\n\t\t--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);\n\t\tmin-width: var(--_sds-button-min-height);\n\t}\n`;\n"]}
|
|
@@ -32,8 +32,10 @@ test.describe('textfield-component', () => {
|
|
|
32
32
|
// Default state
|
|
33
33
|
await expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}.png`);
|
|
34
34
|
// Hover state
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
if (!id.includes('disabled')) {
|
|
36
|
+
page.locator(`#${id}`).hover();
|
|
37
|
+
await expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}-hover.png`);
|
|
38
|
+
}
|
|
37
39
|
// Focus state
|
|
38
40
|
await page.evaluate((id) => {
|
|
39
41
|
const element = document.getElementById(id);
|
|
@@ -69,13 +71,9 @@ test.describe('textfield-component', () => {
|
|
|
69
71
|
});
|
|
70
72
|
test('minlength', async ({ page }) => {
|
|
71
73
|
const textfield = page.locator('#textfield-min');
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
expect(
|
|
75
|
-
await page.goto(pageUrl);
|
|
76
|
-
await textfield.pressSequentially('abcd');
|
|
77
|
-
const isValidExact = await textfield.evaluate((el) => el.checkValidity());
|
|
78
|
-
expect(isValidExact).toBe(true);
|
|
74
|
+
expect(textfield).toHaveAttribute('minlength', '4');
|
|
75
|
+
const nestedInputHasMinlength = await textfield.evaluate((el) => el.hasAttribute('minlength'));
|
|
76
|
+
expect(nestedInputHasMinlength).toBe(true);
|
|
79
77
|
});
|
|
80
78
|
test('maxlength', async ({ page }) => {
|
|
81
79
|
const textfield = page.locator('#textfield-max');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textfield.spec.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,YAAY,GAAG;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,uBAAuB;IACvB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,gBAAgB;IAChB,4BAA4B;IAC5B,2BAA2B;IAC3B,mBAAmB;IACnB,eAAe;IACf,eAAe;CACf,CAAC;AAEF,MAAM,OAAO,GAAG,mDAAmD,CAAC;AAEpE,IAAI,CAAC,QAAQ,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AS,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,qBAAqB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC9C,MAAM,UAAU,GAAG;YAClB,EAAE,EAAE,EAAE,4BAA4B,EAAE,QAAQ,EAAE,KAAK,EAAE;YACrD,EAAE,EAAE,EAAE,2BAA2B,EAAE,QAAQ,EAAE,IAAI,EAAE;SACnD,CAAC;QAEF,KAAK,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAEpC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;YAC7D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAe,EAAE,EAAE;gBAC9D,MAAM,KAAK,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAA4B,CAAC;gBAC/E,OAAO,KAAK,EAAE,YAAY,IAAI,IAAI,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { test, expect } from '@playwright/test';\nimport { expect as sdsExpect } from '../playwright-util/custom-matchers';\n\nconst textfieldIds = [\n\t'textfield-name',\n\t'textfield-label',\n\t'textfield-placeholder',\n\t'textfield-helptext',\n\t'textfield-disabled',\n\t'textfield-readonly',\n\t'textfield-required',\n\t'textfield-error',\n\t'textfield-icon',\n\t'textfield-autocomplete-off',\n\t'textfield-autocomplete-on',\n\t'textfield-pattern',\n\t'textfield-min',\n\t'textfield-max',\n];\n\nconst pageUrl = 'iframe.html?viewMode=docs&id=test-textfield--docs';\n\ntest.describe('textfield-component', () => {\n\ttest.beforeEach(async ({ page }) => {\n\t\tawait page.goto(pageUrl);\n\t});\n\n\ttest('visibility', async ({ page }) => {\n\t\tfor (const id of textfieldIds) {\n\t\t\tawait expect(page.locator(`#${id}`)).toBeVisible();\n\t\t}\n\t});\n\n\ttest('design-implementation', async ({ page }) => {\n\t\tawait page.reload();\n\n\t\tfor (const id of textfieldIds) {\n\t\t\t// Default state\n\t\t\tawait expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}.png`);\n\t\t\t// Hover state\n\t\t\tpage.locator(`#${id}`).hover();\n\t\t\tawait expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}-hover.png`);\n\t\t\t// Focus state\n\t\t\tawait page.evaluate((id) => {\n\t\t\t\tconst element = document.getElementById(id);\n\t\t\t\tif (element) {\n\t\t\t\t\tconst parentDiv = document.createElement('div');\n\t\t\t\t\tparentDiv.style.padding = '10px';\n\t\t\t\t\tparentDiv.style.backgroundColor = 'white';\n\t\t\t\t\telement.parentNode?.insertBefore(parentDiv, element);\n\t\t\t\t\tparentDiv.appendChild(element);\n\t\t\t\t}\n\t\t\t}, id);\n\t\t\tpage.locator(`#${id}`).focus();\n\t\t\tconst parentDiv = await page.locator(`#${id}`).locator('xpath=..');\n\t\t\tawait expect(parentDiv).toHaveScreenshot(`${id}-focus.png`);\n\t\t}\n\t});\n\n\ttest('form-submission', async ({ page }) => {\n\t\tlet requestUrl: URL | undefined;\n\t\tpage.on('request', (request) => {\n\t\t\tif (request.url().includes('iframe.html?name=John')) {\n\t\t\t\trequestUrl = new URL(request.url());\n\t\t\t}\n\t\t});\n\n\t\tawait page.locator('#textfield-name').pressSequentially('John');\n\t\tawait page.locator('#submit-button').click();\n\t\tawait expect(requestUrl?.searchParams.get('name')).toBe('John');\n\t});\n\n\ttest('form-reset', async ({ page }) => {\n\t\tawait page.locator('#textfield-name').pressSequentially('John');\n\t\tawait page.locator('#reset-button').click();\n\t\tconst value = await page.locator('#textfield-name').getAttribute('value');\n\t\texpect(value).toBeNull();\n\t});\n\n\ttest('minlength', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-min');\n\n\t\tawait textfield.pressSequentially('abc');\n\t\tconst isValidShort = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValidShort).toBe(false);\n\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('abcd');\n\t\tconst isValidExact = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValidExact).toBe(true);\n\t});\n\n\ttest('maxlength', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-max');\n\n\t\tawait textfield.pressSequentially('abcdef');\n\t\tawait sdsExpect(textfield).toHaveValue('abcd');\n\t});\n\n\ttest('pattern', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-pattern');\n\n\t\t// Non-digits → invalid\n\t\tawait textfield.pressSequentially('abcd');\n\t\tlet isValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Too few digits → invalid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('123');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Exactly 4 digits → valid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('1234');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(true);\n\n\t\t// Too many digits → invalid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('12345');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\t});\n\n\ttest('required', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-required');\n\n\t\t// No value → invalid\n\t\tlet isValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Has value → valid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('abc');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(true);\n\t});\n\n\ttest('readonly', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-readonly');\n\t\tawait textfield.pressSequentially('abc');\n\t\tawait sdsExpect(textfield).toHaveValue('Kan ikke endres');\n\t});\n\n\ttest('autocomplete on/off', async ({ page }) => {\n\t\tconst textfields = [\n\t\t\t{ id: 'textfield-autocomplete-off', expected: 'off' },\n\t\t\t{ id: 'textfield-autocomplete-on', expected: 'on' },\n\t\t];\n\n\t\tfor (const { id, expected } of textfields) {\n\t\t\tconst host = page.locator(`#${id}`);\n\n\t\t\tawait expect(host).toHaveAttribute('autocomplete', expected);\n\t\t\tconst shadowDomInput = await host.evaluate((el: HTMLElement) => {\n\t\t\t\tconst input = el.shadowRoot?.querySelector('input') as HTMLInputElement | null;\n\t\t\t\treturn input?.autocomplete ?? null;\n\t\t\t});\n\t\t\texpect(shadowDomInput).toBe(expected);\n\t\t}\n\t});\n});\n"]}
|
|
1
|
+
{"version":3,"file":"sds-textfield.spec.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,YAAY,GAAG;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,uBAAuB;IACvB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,gBAAgB;IAChB,4BAA4B;IAC5B,2BAA2B;IAC3B,mBAAmB;IACnB,eAAe;IACf,eAAe;CACf,CAAC;AAEF,MAAM,OAAO,GAAG,mDAAmD,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AE,EAAE;QAC9C,MAAM,UAAU,GAAG;YAClB,EAAE,EAAE,EAAE,4BAA4B,EAAE,QAAQ,EAAE,KAAK,EAAE;YACrD,EAAE,EAAE,EAAE,2BAA2B,EAAE,QAAQ,EAAE,IAAI,EAAE;SACnD,CAAC;QAEF,KAAK,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAEpC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;YAC7D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAe,EAAE,EAAE;gBAC9D,MAAM,KAAK,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAA4B,CAAC;gBAC/E,OAAO,KAAK,EAAE,YAAY,IAAI,IAAI,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { test, expect } from '@playwright/test';\nimport { expect as sdsExpect } from '../playwright-util/custom-matchers';\n\nconst textfieldIds = [\n\t'textfield-name',\n\t'textfield-label',\n\t'textfield-placeholder',\n\t'textfield-helptext',\n\t'textfield-disabled',\n\t'textfield-readonly',\n\t'textfield-required',\n\t'textfield-error',\n\t'textfield-icon',\n\t'textfield-autocomplete-off',\n\t'textfield-autocomplete-on',\n\t'textfield-pattern',\n\t'textfield-min',\n\t'textfield-max',\n];\n\nconst pageUrl = 'iframe.html?viewMode=docs&id=test-textfield--docs';\n\ntest.describe('textfield-component', () => {\n\ttest.beforeEach(async ({ page }) => {\n\t\tawait page.goto(pageUrl);\n\t});\n\n\ttest('visibility', async ({ page }) => {\n\t\tfor (const id of textfieldIds) {\n\t\t\tawait expect(page.locator(`#${id}`)).toBeVisible();\n\t\t}\n\t});\n\n\ttest('design-implementation', async ({ page }) => {\n\t\tawait page.reload();\n\n\t\tfor (const id of textfieldIds) {\n\t\t\t// Default state\n\t\t\tawait expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}.png`);\n\t\t\t// Hover state\n\t\t\tif (!id.includes('disabled')) {\n\t\t\t\tpage.locator(`#${id}`).hover();\n\t\t\t\tawait expect(page.locator(`#${id}`)).toHaveScreenshot(`${id}-hover.png`);\n\t\t\t}\n\t\t\t// Focus state\n\t\t\tawait page.evaluate((id) => {\n\t\t\t\tconst element = document.getElementById(id);\n\t\t\t\tif (element) {\n\t\t\t\t\tconst parentDiv = document.createElement('div');\n\t\t\t\t\tparentDiv.style.padding = '10px';\n\t\t\t\t\tparentDiv.style.backgroundColor = 'white';\n\t\t\t\t\telement.parentNode?.insertBefore(parentDiv, element);\n\t\t\t\t\tparentDiv.appendChild(element);\n\t\t\t\t}\n\t\t\t}, id);\n\t\t\tpage.locator(`#${id}`).focus();\n\t\t\tconst parentDiv = await page.locator(`#${id}`).locator('xpath=..');\n\t\t\tawait expect(parentDiv).toHaveScreenshot(`${id}-focus.png`);\n\t\t}\n\t});\n\n\ttest('form-submission', async ({ page }) => {\n\t\tlet requestUrl: URL | undefined;\n\t\tpage.on('request', (request) => {\n\t\t\tif (request.url().includes('iframe.html?name=John')) {\n\t\t\t\trequestUrl = new URL(request.url());\n\t\t\t}\n\t\t});\n\n\t\tawait page.locator('#textfield-name').pressSequentially('John');\n\t\tawait page.locator('#submit-button').click();\n\t\tawait expect(requestUrl?.searchParams.get('name')).toBe('John');\n\t});\n\n\ttest('form-reset', async ({ page }) => {\n\t\tawait page.locator('#textfield-name').pressSequentially('John');\n\t\tawait page.locator('#reset-button').click();\n\t\tconst value = await page.locator('#textfield-name').getAttribute('value');\n\t\texpect(value).toBeNull();\n\t});\n\n\ttest('minlength', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-min');\n\t\texpect(textfield).toHaveAttribute('minlength', '4');\n\t\tconst nestedInputHasMinlength = await textfield.evaluate((el: HTMLInputElement) => el.hasAttribute('minlength'));\n\t\texpect(nestedInputHasMinlength).toBe(true);\n\t});\n\n\ttest('maxlength', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-max');\n\n\t\tawait textfield.pressSequentially('abcdef');\n\t\tawait sdsExpect(textfield).toHaveValue('abcd');\n\t});\n\n\ttest('pattern', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-pattern');\n\n\t\t// Non-digits → invalid\n\t\tawait textfield.pressSequentially('abcd');\n\t\tlet isValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Too few digits → invalid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('123');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Exactly 4 digits → valid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('1234');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(true);\n\n\t\t// Too many digits → invalid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('12345');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\t});\n\n\ttest('required', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-required');\n\n\t\t// No value → invalid\n\t\tlet isValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(false);\n\n\t\t// Has value → valid\n\t\tawait page.goto(pageUrl);\n\t\tawait textfield.pressSequentially('abc');\n\t\tisValid = await textfield.evaluate((el: HTMLInputElement) => el.checkValidity());\n\t\texpect(isValid).toBe(true);\n\t});\n\n\ttest('readonly', async ({ page }) => {\n\t\tconst textfield = page.locator('#textfield-readonly');\n\t\tawait textfield.pressSequentially('abc');\n\t\tawait sdsExpect(textfield).toHaveValue('Kan ikke endres');\n\t});\n\n\ttest('autocomplete on/off', async ({ page }) => {\n\t\tconst textfields = [\n\t\t\t{ id: 'textfield-autocomplete-off', expected: 'off' },\n\t\t\t{ id: 'textfield-autocomplete-on', expected: 'on' },\n\t\t];\n\n\t\tfor (const { id, expected } of textfields) {\n\t\t\tconst host = page.locator(`#${id}`);\n\n\t\t\tawait expect(host).toHaveAttribute('autocomplete', expected);\n\t\t\tconst shadowDomInput = await host.evaluate((el: HTMLElement) => {\n\t\t\t\tconst input = el.shadowRoot?.querySelector('input') as HTMLInputElement | null;\n\t\t\t\treturn input?.autocomplete ?? null;\n\t\t\t});\n\t\t\texpect(shadowDomInput).toBe(expected);\n\t\t}\n\t});\n});\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),o=/* @__PURE__ */new WeakMap;let r=class{constructor(t,s,o){if(this._$cssResult$=!0,o!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&o.set(e,t))}return t}toString(){return this.cssText}};const a=(t,...s)=>{const o=1===t.length?t[0]:s.reduce(((s,e,o)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1]),t[0]);return new r(o,t,e)},i=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(s)})(t):t,{is:d,defineProperty:n,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:h,getPrototypeOf:p}=Object,g=globalThis,v=g.trustedTypes,u=v?v.emptyScript:"",f=g.reactiveElementPolyfillSupport,b=(t,s)=>t,_={toAttribute(t,s){switch(s){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let e=t;switch(s){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(o){e=null}}return e}},x=(t,s)=>!d(t,s),m={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let y=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=m){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const e=Symbol(),o=this.getPropertyDescriptor(t,e,s);void 0!==o&&n(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=l(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:o,set(s){const a=o?.call(this);r?.call(this,s),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??m}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,s=[...c(t),...h(t)];for(const e of s)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,e]of s)this.elementProperties.set(t,e)}this._$Eh=/* @__PURE__ */new Map;for(const[s,e]of this.elementProperties){const t=this._$Eu(s,e);void 0!==t&&this._$Eh.set(t,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)s.unshift(i(t))}else void 0!==t&&s.push(i(t));return s}static _$Eu(t,s){const e=s.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,s=this.constructor.elementProperties;for(const e of s.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,o)=>{if(s)e.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of o){const o=document.createElement("style"),r=t.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=s.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ET(t,s){const e=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,e);if(void 0!==o&&!0===e.reflect){const r=(void 0!==e.converter?.toAttribute?e.converter:_).toAttribute(s,e.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,s){const e=this.constructor,o=e._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=e.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=o,this[o]=r.fromAttribute(s,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,s,e){if(void 0!==t){const o=this.constructor,r=this[t];if(e??=o.getPropertyOptions(t),!((e.hasChanged??x)(r,s)||e.useDefault&&e.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,e))))return;this.C(t,s,e)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:e,reflect:o,wrapped:r},a){e&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??s??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||e||(s=void 0),this._$AL.set(t,s)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,e]of t){const{wrapped:t}=e,o=this[s];!0!==t||this._$AL.has(s)||void 0===o||this.C(s,void 0,e,o)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=/* @__PURE__ */new Map,y[b("finalized")]=/* @__PURE__ */new Map,f?.({ReactiveElement:y}),(g.reactiveElementVersions??=[]).push("2.1.0");const w=globalThis,k=w.trustedTypes,z=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+S,E=`<${C}>`,A=document,q=()=>A.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,R=/>/g,T=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),L=/'/g,B=/"/g,I=/^(?:script|style|textarea|title)$/i,j=(G=1,(t,...s)=>({_$litType$:G,strings:t,values:s})),N=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),F=/* @__PURE__ */new WeakMap,H=A.createTreeWalker(A,129);var G;function K(t,s){if(!P(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(s):s}class W{constructor({strings:t,_$litType$:s},e){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,s)=>{const e=t.length-1,o=[];let r,a=2===s?"<svg>":3===s?"<math>":"",i=M;for(let d=0;d<e;d++){const s=t[d];let e,n,l=-1,c=0;for(;c<s.length&&(i.lastIndex=c,n=i.exec(s),null!==n);)c=i.lastIndex,i===M?"!--"===n[1]?i=V:void 0!==n[1]?i=R:void 0!==n[2]?(I.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=T):void 0!==n[3]&&(i=T):i===T?">"===n[0]?(i=r??M,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,e=n[1],i=void 0===n[3]?T:'"'===n[3]?B:L):i===B||i===L?i=T:i===V||i===R?i=M:(i=T,r=void 0);const h=i===T&&t[d+1].startsWith("/>")?" ":"";a+=i===M?s+E:l>=0?(o.push(e),s.slice(0,l)+$+s.slice(l)+S+h):s+S+(-2===l?d:h)}return[K(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=W.createElement(n,e),H.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=H.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith($)){const s=l[a++],e=o.getAttribute(t).split(S),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?J:"?"===i[1]?tt:"@"===i[1]?st:Y}),o.removeAttribute(t)}else t.startsWith(S)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(I.test(o.tagName)){const t=o.textContent.split(S),s=t.length-1;if(s>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],q()),H.nextNode(),d.push({type:2,index:++r});o.append(t[s],q())}}}else if(8===o.nodeType)if(o.data===C)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)d.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,s){const e=A.createElement("template");return e.innerHTML=t,e}}function Z(t,s,e=t,o){if(s===N)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=O(s)?void 0:s._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,e,o)),void 0!==o?(e._$Co??=[])[o]=r:e._$Cl=r),void 0!==r&&(s=Z(t,r._$AS(t,s.values),r,o)),s}class Q{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:e}=this._$AD,o=(t?.creationScope??A).importNode(s,!0);H.currentNode=o;let r=H.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new X(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new et(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=H.nextNode(),a++)}return H.currentNode=A,o}p(t){let s=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Z(this,t,s),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>P(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=W.createElement(K(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new Q(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=F.get(t.strings);return void 0===s&&F.set(t.strings,s=new W(t)),s}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,o=0;for(const r of t)o===s.length?s.push(e=new X(this.O(q()),this.O(q()),this,this.options)):e=s[o],e._$AI(r),o++;o<s.length&&(this._$AR(e&&e._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=s,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=Z(this,t,s,0),a=!O(t)||t!==this._$AH&&t!==N,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=Z(this,o[e+i],s,i),d===N&&(d=this._$AH[i]),a||=!O(d)||d!==this._$AH[i],d===U?t=U:t!==U&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class J extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}class tt extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==U)}}class st extends Y{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=Z(this,t,s,0)??U)===N)return;const e=this._$AH,o=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==U&&(e===U||o);o&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const ot=w.litHtmlPolyfillSupport;ot?.(W,X),(w.litHtmlVersions??=[]).push("3.3.0");const rt=globalThis;let at=class extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,e)=>{const o=e?.renderBefore??s;let r=o._$litPart$;if(void 0===r){const t=e?.renderBefore??null;o._$litPart$=r=new X(s.insertBefore(q(),t),t,void 0,e??{})}return r._$AI(t),r})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return N}};at._$litElement$=!0,at.finalized=!0,rt.litElementHydrateSupport?.({LitElement:at});const it=rt.litElementPolyfillSupport;it?.({LitElement:at}),(rt.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:x},nt=(t=dt,s,e)=>{const{kind:o,metadata:r}=e;let a=globalThis.litPropertyMetadata.get(r);if(void 0===a&&globalThis.litPropertyMetadata.set(r,a=/* @__PURE__ */new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),a.set(e.name,t),"accessor"===o){const{name:o}=e;return{set(e){const r=s.get.call(this);s.set.call(this,e),this.requestUpdate(o,r,t)},init(s){return void 0!==s&&this.C(o,void 0,t,s),s}}}if("setter"===o){const{name:o}=e;return function(e){const r=this[o];s.call(this,e),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function lt(t){return(s,e)=>"object"==typeof e?nt(t,s,e):((t,s,e)=>{const o=s.hasOwnProperty(e);return s.constructor.createProperty(e,t),o?Object.getOwnPropertyDescriptor(s,e):void 0})(t,s,e)}function ct(t){return lt({...t,state:!0,attribute:!1})}function ht(t,s){return(s,e,o)=>((t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e))(s,e,{get(){return(s=>s.renderRoot?.querySelector(t)??null)(this)}})}function pt(t){return s=>{customElements.get(t)||(t=>(s,e)=>{void 0!==e?e.addInitializer((()=>{customElements.define(t,s)})):customElements.define(t,s)})(t)(s)}}const gt=a`
|
|
1
|
+
const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),o=/* @__PURE__ */new WeakMap;let r=class{constructor(t,s,o){if(this._$cssResult$=!0,o!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&o.set(e,t))}return t}toString(){return this.cssText}};const a=(t,...s)=>{const o=1===t.length?t[0]:s.reduce(((s,e,o)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1]),t[0]);return new r(o,t,e)},i=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(s)})(t):t,{is:d,defineProperty:n,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:h,getPrototypeOf:p}=Object,g=globalThis,v=g.trustedTypes,u=v?v.emptyScript:"",f=g.reactiveElementPolyfillSupport,b=(t,s)=>t,_={toAttribute(t,s){switch(s){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let e=t;switch(s){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(o){e=null}}return e}},x=(t,s)=>!d(t,s),m={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let y=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=m){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const e=Symbol(),o=this.getPropertyDescriptor(t,e,s);void 0!==o&&n(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=l(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:o,set(s){const a=o?.call(this);r?.call(this,s),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??m}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,s=[...c(t),...h(t)];for(const e of s)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,e]of s)this.elementProperties.set(t,e)}this._$Eh=/* @__PURE__ */new Map;for(const[s,e]of this.elementProperties){const t=this._$Eu(s,e);void 0!==t&&this._$Eh.set(t,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)s.unshift(i(t))}else void 0!==t&&s.push(i(t));return s}static _$Eu(t,s){const e=s.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,s=this.constructor.elementProperties;for(const e of s.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,o)=>{if(s)e.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of o){const o=document.createElement("style"),r=t.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=s.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ET(t,s){const e=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,e);if(void 0!==o&&!0===e.reflect){const r=(void 0!==e.converter?.toAttribute?e.converter:_).toAttribute(s,e.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,s){const e=this.constructor,o=e._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=e.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=o,this[o]=r.fromAttribute(s,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,s,e){if(void 0!==t){const o=this.constructor,r=this[t];if(e??=o.getPropertyOptions(t),!((e.hasChanged??x)(r,s)||e.useDefault&&e.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,e))))return;this.C(t,s,e)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:e,reflect:o,wrapped:r},a){e&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??s??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||e||(s=void 0),this._$AL.set(t,s)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,e]of t){const{wrapped:t}=e,o=this[s];!0!==t||this._$AL.has(s)||void 0===o||this.C(s,void 0,e,o)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=/* @__PURE__ */new Map,y[b("finalized")]=/* @__PURE__ */new Map,f?.({ReactiveElement:y}),(g.reactiveElementVersions??=[]).push("2.1.0");const k=globalThis,w=k.trustedTypes,z=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+S,E=`<${C}>`,A=document,q=()=>A.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,R=/>/g,T=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),L=/'/g,B=/"/g,I=/^(?:script|style|textarea|title)$/i,j=(G=1,(t,...s)=>({_$litType$:G,strings:t,values:s})),N=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),F=/* @__PURE__ */new WeakMap,H=A.createTreeWalker(A,129);var G;function K(t,s){if(!P(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(s):s}class W{constructor({strings:t,_$litType$:s},e){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,s)=>{const e=t.length-1,o=[];let r,a=2===s?"<svg>":3===s?"<math>":"",i=M;for(let d=0;d<e;d++){const s=t[d];let e,n,l=-1,c=0;for(;c<s.length&&(i.lastIndex=c,n=i.exec(s),null!==n);)c=i.lastIndex,i===M?"!--"===n[1]?i=V:void 0!==n[1]?i=R:void 0!==n[2]?(I.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=T):void 0!==n[3]&&(i=T):i===T?">"===n[0]?(i=r??M,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,e=n[1],i=void 0===n[3]?T:'"'===n[3]?B:L):i===B||i===L?i=T:i===V||i===R?i=M:(i=T,r=void 0);const h=i===T&&t[d+1].startsWith("/>")?" ":"";a+=i===M?s+E:l>=0?(o.push(e),s.slice(0,l)+$+s.slice(l)+S+h):s+S+(-2===l?d:h)}return[K(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=W.createElement(n,e),H.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=H.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith($)){const s=l[a++],e=o.getAttribute(t).split(S),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?J:"?"===i[1]?tt:"@"===i[1]?st:Y}),o.removeAttribute(t)}else t.startsWith(S)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(I.test(o.tagName)){const t=o.textContent.split(S),s=t.length-1;if(s>0){o.textContent=w?w.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],q()),H.nextNode(),d.push({type:2,index:++r});o.append(t[s],q())}}}else if(8===o.nodeType)if(o.data===C)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)d.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,s){const e=A.createElement("template");return e.innerHTML=t,e}}function Z(t,s,e=t,o){if(s===N)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=O(s)?void 0:s._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,e,o)),void 0!==o?(e._$Co??=[])[o]=r:e._$Cl=r),void 0!==r&&(s=Z(t,r._$AS(t,s.values),r,o)),s}class Q{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:e}=this._$AD,o=(t?.creationScope??A).importNode(s,!0);H.currentNode=o;let r=H.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new X(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new et(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=H.nextNode(),a++)}return H.currentNode=A,o}p(t){let s=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Z(this,t,s),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>P(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=W.createElement(K(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new Q(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=F.get(t.strings);return void 0===s&&F.set(t.strings,s=new W(t)),s}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,o=0;for(const r of t)o===s.length?s.push(e=new X(this.O(q()),this.O(q()),this,this.options)):e=s[o],e._$AI(r),o++;o<s.length&&(this._$AR(e&&e._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=s,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=Z(this,t,s,0),a=!O(t)||t!==this._$AH&&t!==N,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=Z(this,o[e+i],s,i),d===N&&(d=this._$AH[i]),a||=!O(d)||d!==this._$AH[i],d===U?t=U:t!==U&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class J extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}class tt extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==U)}}class st extends Y{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=Z(this,t,s,0)??U)===N)return;const e=this._$AH,o=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==U&&(e===U||o);o&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const ot=k.litHtmlPolyfillSupport;ot?.(W,X),(k.litHtmlVersions??=[]).push("3.3.0");const rt=globalThis;let at=class extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,e)=>{const o=e?.renderBefore??s;let r=o._$litPart$;if(void 0===r){const t=e?.renderBefore??null;o._$litPart$=r=new X(s.insertBefore(q(),t),t,void 0,e??{})}return r._$AI(t),r})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return N}};at._$litElement$=!0,at.finalized=!0,rt.litElementHydrateSupport?.({LitElement:at});const it=rt.litElementPolyfillSupport;it?.({LitElement:at}),(rt.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:x},nt=(t=dt,s,e)=>{const{kind:o,metadata:r}=e;let a=globalThis.litPropertyMetadata.get(r);if(void 0===a&&globalThis.litPropertyMetadata.set(r,a=/* @__PURE__ */new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),a.set(e.name,t),"accessor"===o){const{name:o}=e;return{set(e){const r=s.get.call(this);s.set.call(this,e),this.requestUpdate(o,r,t)},init(s){return void 0!==s&&this.C(o,void 0,t,s),s}}}if("setter"===o){const{name:o}=e;return function(e){const r=this[o];s.call(this,e),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function lt(t){return(s,e)=>"object"==typeof e?nt(t,s,e):((t,s,e)=>{const o=s.hasOwnProperty(e);return s.constructor.createProperty(e,t),o?Object.getOwnPropertyDescriptor(s,e):void 0})(t,s,e)}function ct(t){return lt({...t,state:!0,attribute:!1})}function ht(t,s){return(s,e,o)=>((t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e))(s,e,{get(){return(s=>s.renderRoot?.querySelector(t)??null)(this)}})}function pt(t){return s=>{customElements.get(t)||(t=>(s,e)=>{void 0!==e?e.addInitializer((()=>{customElements.define(t,s)})):customElements.define(t,s)})(t)(s)}}const gt=a`
|
|
2
2
|
:host {
|
|
3
3
|
--_sds-alert-background-color: var(--sds-alert-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
4
4
|
|
|
@@ -172,7 +172,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
172
172
|
margin: 0 !important;
|
|
173
173
|
max-width: var(--_sds-alert-max-line-width) !important;
|
|
174
174
|
}
|
|
175
|
-
`,vt=t=>t??U,ut=1,ft=2,bt=t=>(...s)=>({_$litDirective$:t,values:s});class _t{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,e){this._$Ct=t,this._$AM=s,this._$Ci=e}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}let xt=class extends _t{constructor(t){if(super(t),this.it=U,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===U||null==t)return this._t=void 0,this.it=t;if(t===N)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};xt.directiveName="unsafeHTML",xt.resultType=1;class mt extends xt{}mt.directiveName="unsafeSVG",mt.resultType=2;const yt=bt(mt),
|
|
175
|
+
`,vt=t=>t??U,ut=1,ft=2,bt=t=>(...s)=>({_$litDirective$:t,values:s});class _t{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,e){this._$Ct=t,this._$AM=s,this._$Ci=e}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}let xt=class extends _t{constructor(t){if(super(t),this.it=U,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===U||null==t)return this._t=void 0,this.it=t;if(t===N)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};xt.directiveName="unsafeHTML",xt.resultType=1;class mt extends xt{}mt.directiveName="unsafeSVG",mt.resultType=2;const yt=bt(mt),kt=["arrow_forward-material-outlined","check_circle-material-filled","close-material-outlined","dangerous-material-filled","InformationSquareFill-aksel-filled","lock-material-filled","search-material-filled","warning-material-filled","chevron_up-material-filled"],wt={"arrow_forward-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M662.82-440.39H145.87v-79.22h516.95L423.87-758.57 480-814.7 814.7-480 480-145.87l-56.13-55.56z"/></svg>',"check_circle-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84T98.26-318.99q-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62 161.01-32.65q86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9T642.01-98.26q-75.46 32.39-161.93 32.39"/></svg>',"close-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M249-193.43 193.43-249l231-231-231-231L249-766.57l231 231 231-231L766.57-711l-231 231 231 231L711-193.43l-231-231z"/></svg>',"dangerous-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M324.35-105.87 105.87-324.35v-311.87L324.35-854.7h311.87L854.7-636.22v311.87L636.22-105.87zm34.91-206.87L480-433.48l120.74 120.74 47.09-46.52L526.52-480l121.31-120.74-47.09-47.09L480-526.52 359.26-647.83l-46.52 47.09L433.48-480 312.74-359.26z"/></svg>',"InformationSquareFill-aksel-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M3.25 4A.75.75 0 0 1 4 3.25h16a.75.75 0 0 1 .75.75v16a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75zM11 7.75a1 1 0 1 1 2 0 1 1 0 0 1-2 0m-1.25 3a.75.75 0 0 1 .75-.75H12a.75.75 0 0 1 .75.75v4.75h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.75v-4h-.75a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>',"lock-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M225.09-67q-32.68 0-55.95-23.27t-23.27-55.95v-423.82q0-32.91 23.27-56.35t55.95-23.44h58.69v-83.56q0-82.44 57.17-140.18 57.16-57.73 139.02-57.73t139.05 57.73q57.2 57.74 57.2 140.18v83.56h58.69q32.91 0 56.35 23.44t23.44 56.35v423.82q0 32.68-23.44 55.95T734.91-67zm255.08-214.13q31.83 0 54.33-22.03t22.5-52.97q0-30-22.67-54.5t-54.5-24.5-54.33 24.5-22.5 55 22.67 52.5 54.5 22M363-649.83h234v-83.43q0-49.96-33.79-84.11-33.8-34.15-82.96-34.15t-83.21 34.15Q363-783.22 363-733.26z"/></svg>',"search-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M795.43-105.17 529.04-371q-29.43 24.26-69.11 37.94-39.67 13.67-85.32 13.67-112.12 0-189.87-77.83Q107-475.04 107-585t77.83-187.78q77.82-77.83 188.28-77.83t187.78 77.83q77.33 77.82 77.33 187.93 0 43.98-13.15 83.13-13.16 39.15-39.46 73.59L853-162.74zM373.81-398.61q77.66 0 131.42-54.53Q559-507.67 559-585t-53.85-131.86-131.34-54.53q-78.33 0-132.96 54.53T186.22-585t54.55 131.86 133.04 54.53"/></svg>',"warning-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M27.56-112.65 480-894.7l452.44 782.05zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51t9.64 22.62q9.65 9.47 22.8 9.47M454-348h60v-219.48h-60z"/></svg>',"chevron_up-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32"><path d="m16 11.5 8 8-1.867 1.867L16 15.233l-6.133 6.134L8 19.5z"/></svg>'},zt=t=>import(`@politiet/sheriff-icons/dist/assets/${t}.js`).then((({default:t})=>t)).catch((t=>{console.log(t)})),$t=t=>fetch(`https://cdn.jsdelivr.net/npm/@politiet/sheriff-icons/dist/assets/${t}.svg`).then((s=>{if(!s.ok)throw new TypeError(`Sheriff: unknown icon: '${t}'`);return s.text()}));const St=a`
|
|
176
176
|
:host {
|
|
177
177
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
|
|
178
178
|
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
@@ -208,7 +208,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
208
208
|
<div class="sds-icon" role="${vt(this.label?"img":void 0)}" style="${vt(this.color?`color:${this.color}`:void 0)}" aria-label="${vt(this.label)}">
|
|
209
209
|
${this.name?j`<slot aria-hidden="true">${yt(this.svg)}</slot>`:j`<slot aria-hidden="true"></slot>`}
|
|
210
210
|
</div>
|
|
211
|
-
`}async fetchIcon(){if(!this.name)return void(this.svg="");const t=await new Promise((t=>{qt.iconLoader.resolve(this.name,t)}));this.svg=t}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}};qt.styles=[St],qt.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?zt:$t}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?zt:$t}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,s){if(!this._disableSystemIcons&&(t=>
|
|
211
|
+
`}async fetchIcon(){if(!this.name)return void(this.svg="");const t=await new Promise((t=>{qt.iconLoader.resolve(this.name,t)}));this.svg=t}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}};qt.styles=[St],qt.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?zt:$t}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?zt:$t}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,s){if(!this._disableSystemIcons&&(t=>kt.includes(t))(t))return void s(wt[t]);let e=this.cache.get(t);"string"!=typeof e?(e||(e=this.resolver(t).catch((()=>"")).then((s=>(this.cache.set(t,s),s))),this.cache.set(t,e)),e.then(s)):s(e)}clear(){this.cache.clear()}get currentLoader(){return this.resolver}},At([lt({type:String,reflect:!0})],qt.prototype,"name",2),At([lt({type:String,reflect:!0})],qt.prototype,"size",2),At([lt({type:String,reflect:!0})],qt.prototype,"color",2),At([lt({type:String,reflect:!0})],qt.prototype,"label",2),At([ct()],qt.prototype,"svg",2),qt=At([pt("sds-icon")],qt);const Ot=bt(class extends _t{constructor(t){if(super(t),t.type!==ut||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(t,[s]){if(void 0===this.st){this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(s)}const e=t.element.classList;for(const o of this.st)o in s||(e.remove(o),this.st.delete(o));for(const o in s){const t=!!s[o];t===this.st.has(o)||this.nt?.has(o)||(t?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return N}}),Pt=a`
|
|
212
212
|
:host {
|
|
213
213
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
214
214
|
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -279,6 +279,9 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
279
279
|
opacity: var(--_sds-button-disabled-opacity);
|
|
280
280
|
cursor: not-allowed;
|
|
281
281
|
pointer-events: none;
|
|
282
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-neutral-action-default));
|
|
283
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));
|
|
284
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-contrast-default));
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
|
|
@@ -299,6 +302,12 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
299
302
|
.sds-button:active {
|
|
300
303
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-main-surface-active)));
|
|
301
304
|
}
|
|
305
|
+
|
|
306
|
+
.sds-button:disabled {
|
|
307
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
308
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-neutral-action-default));
|
|
309
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));
|
|
310
|
+
}
|
|
302
311
|
}
|
|
303
312
|
|
|
304
313
|
:host([variant='tertiary']) {
|
|
@@ -322,6 +331,12 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
322
331
|
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
323
332
|
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));
|
|
324
333
|
}
|
|
334
|
+
|
|
335
|
+
.sds-button:disabled {
|
|
336
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
337
|
+
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
338
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-neutral-action-default));
|
|
339
|
+
}
|
|
325
340
|
}
|
|
326
341
|
|
|
327
342
|
:host([variant='tertiary']):host([icon]) {
|
|
@@ -1400,10 +1415,10 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1400
1415
|
stroke-dashoffset: -120px;
|
|
1401
1416
|
}
|
|
1402
1417
|
}
|
|
1403
|
-
`;var ys=Object.defineProperty,
|
|
1418
|
+
`;var ys=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,ws=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ks(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ys(s,e,a),a};let zs=class extends at{constructor(){super(...arguments),this.size="md",this.contrast=!1}render(){return j`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
|
|
1404
1419
|
<circle class="sds-loader__background" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1405
1420
|
<circle class="sds-loader__circle" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1406
|
-
</svg>`}};zs.styles=[ms],
|
|
1421
|
+
</svg>`}};zs.styles=[ms],ws([lt({type:String,reflect:!0})],zs.prototype,"size",2),ws([lt({type:Boolean,reflect:!0})],zs.prototype,"contrast",2),zs=ws([pt("sds-loader")],zs);const $s=a`
|
|
1407
1422
|
:host {
|
|
1408
1423
|
--_sds-notification-background-color: var(--sds-notification-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
1409
1424
|
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { EventName } from '@lit/react';
|
|
2
1
|
export declare const colorPalettes: readonly ["neutral", "main", "accent", "support-1", "info", "success", "attention", "warning", "danger"];
|
|
3
2
|
export type SDS_COLOR_PALETTES = (typeof colorPalettes)[number];
|
|
4
3
|
export type SDS_SIZES = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
5
4
|
export type SDS_VARIANTS = 'primary' | 'secondary' | 'tertiary';
|
|
6
5
|
export type AutocompleteTypes = 'off' | 'on' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'email' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'impp' | 'url' | 'photo';
|
|
7
6
|
export type SheriffEvent = CustomEvent<null>;
|
|
8
|
-
export type SheriffEventName = EventName<SheriffEvent>;
|
|
9
7
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,0GAA2G,CAAC;AACtI,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAC1B,KAAK,GACL,IAAI,GACJ,MAAM,GACN,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,UAAU,GACV,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,UAAU,GACV,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,KAAK,GACL,KAAK,GACL,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,WAAW,GACX,eAAe,GACf,MAAM,GACN,KAAK,GACL,OAAO,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC","sourcesContent":["export const colorPalettes = ['neutral', 'main', 'accent', 'support-1', 'info', 'success', 'attention', 'warning', 'danger'] as const;\nexport type SDS_COLOR_PALETTES = (typeof colorPalettes)[number];\nexport type SDS_SIZES = 'xl' | 'lg' | 'md' | 'sm' | 'xs';\nexport type SDS_VARIANTS = 'primary' | 'secondary' | 'tertiary';\nexport type AutocompleteTypes =\n\t| 'off'\n\t| 'on'\n\t| 'name'\n\t| 'honorific-prefix'\n\t| 'given-name'\n\t| 'additional-name'\n\t| 'family-name'\n\t| 'honorific-suffix'\n\t| 'nickname'\n\t| 'email'\n\t| 'username'\n\t| 'new-password'\n\t| 'current-password'\n\t| 'one-time-code'\n\t| 'organization-title'\n\t| 'organization'\n\t| 'street-address'\n\t| 'address-line1'\n\t| 'address-line2'\n\t| 'address-line3'\n\t| 'address-level4'\n\t| 'address-level3'\n\t| 'address-level2'\n\t| 'address-level1'\n\t| 'country'\n\t| 'country-name'\n\t| 'postal-code'\n\t| 'cc-name'\n\t| 'cc-given-name'\n\t| 'cc-additional-name'\n\t| 'cc-family-name'\n\t| 'cc-number'\n\t| 'cc-exp'\n\t| 'cc-exp-month'\n\t| 'cc-exp-year'\n\t| 'cc-csc'\n\t| 'cc-type'\n\t| 'transaction-currency'\n\t| 'transaction-amount'\n\t| 'language'\n\t| 'bday'\n\t| 'bday-day'\n\t| 'bday-month'\n\t| 'bday-year'\n\t| 'sex'\n\t| 'tel'\n\t| 'tel-country-code'\n\t| 'tel-national'\n\t| 'tel-area-code'\n\t| 'tel-local'\n\t| 'tel-extension'\n\t| 'impp'\n\t| 'url'\n\t| 'photo';\n\nexport type SheriffEvent = CustomEvent<null>;\n"]}
|