@scouterna/ui-webc 2.2.5 → 2.2.7
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/cjs/{index-B3fXatmo.js → index-DpSUh0CA.js} +1809 -91
- package/dist/cjs/index.cjs.js +0 -1
- package/dist/cjs/{inputMixin-D1D-VFiT.js → inputMixin-BEUFwoun.js} +1 -4
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/scout-app-bar.cjs.entry.js +3 -4
- package/dist/cjs/scout-bottom-bar-item.cjs.entry.js +3 -4
- package/dist/cjs/scout-bottom-bar.cjs.entry.js +3 -4
- package/dist/cjs/scout-button.cjs.entry.js +12 -6
- package/dist/cjs/scout-card.cjs.entry.js +3 -4
- package/dist/cjs/scout-checkbox_2.cjs.entry.js +6 -7
- package/dist/cjs/scout-divider.cjs.entry.js +3 -4
- package/dist/cjs/scout-field.cjs.entry.js +3 -4
- package/dist/cjs/scout-input.cjs.entry.js +5 -6
- package/dist/cjs/scout-link.cjs.entry.js +3 -4
- package/dist/cjs/scout-list-view-item.cjs.entry.js +3 -4
- package/dist/cjs/scout-list-view-subheader.cjs.entry.js +3 -4
- package/dist/cjs/scout-list-view.cjs.entry.js +3 -4
- package/dist/cjs/scout-loader.cjs.entry.js +3 -4
- package/dist/cjs/scout-select.cjs.entry.js +4 -5
- package/dist/cjs/scout-stack.cjs.entry.js +3 -4
- package/dist/cjs/scout-switch.cjs.entry.js +4 -5
- package/dist/cjs/ui-webc.cjs.js +3 -4
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/app-bar/app-bar.js +0 -1
- package/dist/collection/components/bottom-bar/bottom-bar.js +0 -1
- package/dist/collection/components/bottom-bar-item/bottom-bar-item.css +4 -2
- package/dist/collection/components/bottom-bar-item/bottom-bar-item.js +0 -1
- package/dist/collection/components/button/button.css +32 -14
- package/dist/collection/components/button/button.js +36 -4
- package/dist/collection/components/card/card.js +0 -1
- package/dist/collection/components/checkbox/checkbox.css +13 -8
- package/dist/collection/components/checkbox/checkbox.js +0 -1
- package/dist/collection/components/divider/divider.js +0 -1
- package/dist/collection/components/field/field.js +0 -1
- package/dist/collection/components/input/input.js +17 -6
- package/dist/collection/components/link/link.css +7 -5
- package/dist/collection/components/link/link.js +0 -1
- package/dist/collection/components/list-view/list-view.js +0 -1
- package/dist/collection/components/list-view-item/list-view-item.css +4 -2
- package/dist/collection/components/list-view-item/list-view-item.js +0 -1
- package/dist/collection/components/list-view-subheader/list-view-subheader.js +0 -1
- package/dist/collection/components/loader/loader.js +0 -1
- package/dist/collection/components/radio-button/radio-button.css +15 -10
- package/dist/collection/components/radio-button/radio-button.js +0 -1
- package/dist/collection/components/select/select.css +4 -2
- package/dist/collection/components/select/select.js +0 -1
- package/dist/collection/components/stack/stack.js +0 -1
- package/dist/collection/components/switch/switch.css +10 -6
- package/dist/collection/components/switch/switch.js +0 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/mixins/inputMixin.js +0 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -10
- package/dist/components/p-CTivgs5a.js +1 -0
- package/dist/components/p-CmHrcz9s.js +1 -0
- package/dist/components/p-R-tzZ3cs.js +1 -0
- package/dist/components/p-vLvmwbzB.js +1 -0
- package/dist/components/scout-app-bar.js +1 -42
- package/dist/components/scout-bottom-bar-item.js +1 -85
- package/dist/components/scout-bottom-bar.js +1 -39
- package/dist/components/scout-button.js +1 -75
- package/dist/components/scout-card.js +1 -39
- package/dist/components/scout-checkbox.js +1 -9
- package/dist/components/scout-divider.js +1 -39
- package/dist/components/scout-field.js +1 -72
- package/dist/components/scout-input.js +1 -98
- package/dist/components/scout-link.js +1 -91
- package/dist/components/scout-list-view-item.js +1 -108
- package/dist/components/scout-list-view-subheader.js +1 -44
- package/dist/components/scout-list-view.js +1 -59
- package/dist/components/scout-loader.js +1 -96
- package/dist/components/scout-radio-button.js +1 -9
- package/dist/components/scout-select.js +1 -61
- package/dist/components/scout-stack.js +1 -62
- package/dist/components/scout-switch.js +1 -75
- package/dist/custom-elements.d.ts +11 -0
- package/dist/custom-elements.json +74 -7
- package/dist/esm/{index-ksA_9NPe.js → index-xD2pOo_x.js} +1809 -91
- package/dist/esm/index.js +0 -1
- package/dist/{components/p-B-kEl-ny.js → esm/inputMixin-BuDdNX3m.js} +3 -5
- package/dist/esm/loader.js +3 -4
- package/dist/esm/scout-app-bar.entry.js +3 -4
- package/dist/esm/scout-bottom-bar-item.entry.js +3 -4
- package/dist/esm/scout-bottom-bar.entry.js +3 -4
- package/dist/esm/scout-button.entry.js +12 -6
- package/dist/esm/scout-card.entry.js +3 -4
- package/dist/esm/scout-checkbox_2.entry.js +6 -7
- package/dist/esm/scout-divider.entry.js +3 -4
- package/dist/esm/scout-field.entry.js +3 -4
- package/dist/esm/scout-input.entry.js +5 -6
- package/dist/esm/scout-link.entry.js +3 -4
- package/dist/esm/scout-list-view-item.entry.js +3 -4
- package/dist/esm/scout-list-view-subheader.entry.js +3 -4
- package/dist/esm/scout-list-view.entry.js +3 -4
- package/dist/esm/scout-loader.entry.js +3 -4
- package/dist/esm/scout-select.entry.js +4 -5
- package/dist/esm/scout-stack.entry.js +3 -4
- package/dist/esm/scout-switch.entry.js +4 -5
- package/dist/esm/ui-webc.js +4 -5
- package/dist/types/components/button/button.d.ts +5 -0
- package/dist/types/components.d.ts +18 -8
- package/dist/types/stencil-public-runtime.d.ts +87 -4
- package/dist/ui-webc/index.esm.js +1 -2
- package/dist/ui-webc/p-061e3457.entry.js +1 -0
- package/dist/ui-webc/p-0dd7cda5.entry.js +1 -0
- package/dist/ui-webc/p-186ee2d2.entry.js +1 -0
- package/dist/ui-webc/p-24ccd3fc.entry.js +1 -0
- package/dist/ui-webc/p-594f0ba6.entry.js +1 -0
- package/dist/ui-webc/p-5b96b509.entry.js +1 -0
- package/dist/ui-webc/p-66f2d080.entry.js +1 -0
- package/dist/ui-webc/p-802ce20c.entry.js +1 -0
- package/dist/ui-webc/p-8da4cdaa.entry.js +1 -0
- package/dist/ui-webc/p-94f1aa41.entry.js +1 -0
- package/dist/ui-webc/p-BuuT2Uz3.js +1 -0
- package/dist/ui-webc/p-a92dd367.entry.js +1 -0
- package/dist/ui-webc/p-bf96d820.entry.js +1 -0
- package/dist/ui-webc/p-cdce9596.entry.js +1 -0
- package/dist/ui-webc/p-d7430470.entry.js +1 -0
- package/dist/ui-webc/p-db9e3e2d.entry.js +1 -0
- package/dist/ui-webc/p-eaec31f1.entry.js +1 -0
- package/dist/ui-webc/p-f3ff75c8.entry.js +1 -0
- package/dist/ui-webc/p-xD2pOo_x.js +2 -0
- package/dist/ui-webc/ui-webc.esm.js +1 -2
- package/package.json +5 -5
- package/dist/cjs/index-B3fXatmo.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/inputMixin-D1D-VFiT.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/scout-app-bar.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-bottom-bar-item.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-bottom-bar.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-button.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-card.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-checkbox.scout-radio-button.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-divider.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-field.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-input.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-link.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-list-view-item.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-list-view-subheader.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-list-view.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-loader.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-select.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-stack.entry.cjs.js.map +0 -1
- package/dist/cjs/scout-switch.entry.cjs.js.map +0 -1
- package/dist/cjs/ui-webc.cjs.js.map +0 -1
- package/dist/collection/components/app-bar/app-bar.js.map +0 -1
- package/dist/collection/components/bottom-bar/bottom-bar.js.map +0 -1
- package/dist/collection/components/bottom-bar-item/bottom-bar-item.js.map +0 -1
- package/dist/collection/components/button/button.js.map +0 -1
- package/dist/collection/components/card/card.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox.js.map +0 -1
- package/dist/collection/components/divider/divider.js.map +0 -1
- package/dist/collection/components/field/field.js.map +0 -1
- package/dist/collection/components/input/input.js.map +0 -1
- package/dist/collection/components/link/link.js.map +0 -1
- package/dist/collection/components/list-view/list-view.js.map +0 -1
- package/dist/collection/components/list-view-item/list-view-item.js.map +0 -1
- package/dist/collection/components/list-view-subheader/list-view-subheader.js.map +0 -1
- package/dist/collection/components/loader/loader.js.map +0 -1
- package/dist/collection/components/radio-button/radio-button.js.map +0 -1
- package/dist/collection/components/select/select.js.map +0 -1
- package/dist/collection/components/stack/stack.js.map +0 -1
- package/dist/collection/components/switch/switch.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/mixins/inputMixin.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-4RT-nIeK.js +0 -71
- package/dist/components/p-4RT-nIeK.js.map +0 -1
- package/dist/components/p-B-kEl-ny.js.map +0 -1
- package/dist/components/p-CLzh39Ll.js +0 -73
- package/dist/components/p-CLzh39Ll.js.map +0 -1
- package/dist/components/p-fr5CaUFu.js +0 -1747
- package/dist/components/p-fr5CaUFu.js.map +0 -1
- package/dist/components/scout-app-bar.js.map +0 -1
- package/dist/components/scout-bottom-bar-item.js.map +0 -1
- package/dist/components/scout-bottom-bar.js.map +0 -1
- package/dist/components/scout-button.js.map +0 -1
- package/dist/components/scout-card.js.map +0 -1
- package/dist/components/scout-checkbox.js.map +0 -1
- package/dist/components/scout-divider.js.map +0 -1
- package/dist/components/scout-field.js.map +0 -1
- package/dist/components/scout-input.js.map +0 -1
- package/dist/components/scout-link.js.map +0 -1
- package/dist/components/scout-list-view-item.js.map +0 -1
- package/dist/components/scout-list-view-subheader.js.map +0 -1
- package/dist/components/scout-list-view.js.map +0 -1
- package/dist/components/scout-loader.js.map +0 -1
- package/dist/components/scout-radio-button.js.map +0 -1
- package/dist/components/scout-select.js.map +0 -1
- package/dist/components/scout-stack.js.map +0 -1
- package/dist/components/scout-switch.js.map +0 -1
- package/dist/esm/index-ksA_9NPe.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/inputMixin-C9OB0DNj.js +0 -69
- package/dist/esm/inputMixin-C9OB0DNj.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/scout-app-bar.entry.js.map +0 -1
- package/dist/esm/scout-bottom-bar-item.entry.js.map +0 -1
- package/dist/esm/scout-bottom-bar.entry.js.map +0 -1
- package/dist/esm/scout-button.entry.js.map +0 -1
- package/dist/esm/scout-card.entry.js.map +0 -1
- package/dist/esm/scout-checkbox.scout-radio-button.entry.js.map +0 -1
- package/dist/esm/scout-divider.entry.js.map +0 -1
- package/dist/esm/scout-field.entry.js.map +0 -1
- package/dist/esm/scout-input.entry.js.map +0 -1
- package/dist/esm/scout-link.entry.js.map +0 -1
- package/dist/esm/scout-list-view-item.entry.js.map +0 -1
- package/dist/esm/scout-list-view-subheader.entry.js.map +0 -1
- package/dist/esm/scout-list-view.entry.js.map +0 -1
- package/dist/esm/scout-loader.entry.js.map +0 -1
- package/dist/esm/scout-select.entry.js.map +0 -1
- package/dist/esm/scout-stack.entry.js.map +0 -1
- package/dist/esm/scout-switch.entry.js.map +0 -1
- package/dist/esm/ui-webc.js.map +0 -1
- package/dist/ui-webc/index.esm.js.map +0 -1
- package/dist/ui-webc/loader.esm.js.map +0 -1
- package/dist/ui-webc/p-08499152.entry.js +0 -2
- package/dist/ui-webc/p-08499152.entry.js.map +0 -1
- package/dist/ui-webc/p-0b8a7cc9.entry.js +0 -2
- package/dist/ui-webc/p-0b8a7cc9.entry.js.map +0 -1
- package/dist/ui-webc/p-1efd7b9a.entry.js +0 -2
- package/dist/ui-webc/p-1efd7b9a.entry.js.map +0 -1
- package/dist/ui-webc/p-2a842a24.entry.js +0 -2
- package/dist/ui-webc/p-2a842a24.entry.js.map +0 -1
- package/dist/ui-webc/p-30b75968.entry.js +0 -2
- package/dist/ui-webc/p-30b75968.entry.js.map +0 -1
- package/dist/ui-webc/p-3ac00412.entry.js +0 -2
- package/dist/ui-webc/p-3ac00412.entry.js.map +0 -1
- package/dist/ui-webc/p-4f28520e.entry.js +0 -2
- package/dist/ui-webc/p-4f28520e.entry.js.map +0 -1
- package/dist/ui-webc/p-50112773.entry.js +0 -2
- package/dist/ui-webc/p-50112773.entry.js.map +0 -1
- package/dist/ui-webc/p-6de2edd1.entry.js +0 -2
- package/dist/ui-webc/p-6de2edd1.entry.js.map +0 -1
- package/dist/ui-webc/p-6e9afb25.entry.js +0 -2
- package/dist/ui-webc/p-6e9afb25.entry.js.map +0 -1
- package/dist/ui-webc/p-8a942414.entry.js +0 -2
- package/dist/ui-webc/p-8a942414.entry.js.map +0 -1
- package/dist/ui-webc/p-8f3e4290.entry.js +0 -2
- package/dist/ui-webc/p-8f3e4290.entry.js.map +0 -1
- package/dist/ui-webc/p-BsG0XL4c.js +0 -2
- package/dist/ui-webc/p-BsG0XL4c.js.map +0 -1
- package/dist/ui-webc/p-b0a70cb6.entry.js +0 -2
- package/dist/ui-webc/p-b0a70cb6.entry.js.map +0 -1
- package/dist/ui-webc/p-c2c5857d.entry.js +0 -2
- package/dist/ui-webc/p-c2c5857d.entry.js.map +0 -1
- package/dist/ui-webc/p-cbf489b1.entry.js +0 -2
- package/dist/ui-webc/p-cbf489b1.entry.js.map +0 -1
- package/dist/ui-webc/p-d68b8b37.entry.js +0 -2
- package/dist/ui-webc/p-d68b8b37.entry.js.map +0 -1
- package/dist/ui-webc/p-dcc4dafa.entry.js +0 -2
- package/dist/ui-webc/p-dcc4dafa.entry.js.map +0 -1
- package/dist/ui-webc/p-ksA_9NPe.js +0 -3
- package/dist/ui-webc/p-ksA_9NPe.js.map +0 -1
- package/dist/ui-webc/scout-app-bar.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-bottom-bar-item.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-bottom-bar.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-button.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-card.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-checkbox.scout-radio-button.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-divider.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-field.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-input.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-link.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-list-view-item.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-list-view-subheader.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-list-view.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-loader.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-select.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-stack.entry.esm.js.map +0 -1
- package/dist/ui-webc/scout-switch.entry.esm.js.map +0 -1
- package/dist/ui-webc/ui-webc.esm.js.map +0 -1
|
@@ -1,98 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i as inputMixin } from './p-B-kEl-ny.js';
|
|
3
|
-
|
|
4
|
-
const inputCss = ".sc-scout-input-h{display:flex;height:var(--spacing-10);--scout-input-padding:var(--spacing-2);--scout-input-border-radius:var(--spacing-2);--scout-input-type:var(--type-body-base)}.large.sc-scout-input-h{height:var(--spacing-14);--scout-input-padding:var(--spacing-3);--scout-input-border-radius:var(--spacing-3);--scout-input-type:var(--type-body-lg)}.input.sc-scout-input{flex:1;padding:var(--scout-input-padding);font:var(--scout-input-type);border:1px solid var(--color-gray-300);border-radius:var(--scout-input-border-radius);background-color:var(--color-white);color:var(--color-text-base)}.input.sc-scout-input:disabled{background-color:var(--color-gray-100);color:var(--color-gray-700);cursor:not-allowed}.elevated.sc-scout-input-h .input.sc-scout-input{box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -2px rgba(0, 0, 0, 0.1);border-color:transparent}";
|
|
5
|
-
|
|
6
|
-
const ScoutInput$1 = /*@__PURE__*/ proxyCustomElement(class ScoutInput extends Mixin(inputMixin) {
|
|
7
|
-
constructor(registerHost) {
|
|
8
|
-
super(false);
|
|
9
|
-
if (registerHost !== false) {
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
}
|
|
12
|
-
this.scoutInputChange = createEvent(this, "scoutInputChange");
|
|
13
|
-
this.scoutBlur = createEvent(this, "scoutBlur");
|
|
14
|
-
this._scoutValidate = createEvent(this, "_scoutValidate");
|
|
15
|
-
this._scoutInvalid = createEvent(this, "_scoutInvalid");
|
|
16
|
-
this._scoutFieldId = createEvent(this, "_scoutFieldId");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Size of the input element. Large fields are typically used for prominent
|
|
20
|
-
* inputs, such as a top search field on a page, while medium fields are used
|
|
21
|
-
* for regular form inputs.
|
|
22
|
-
*/
|
|
23
|
-
size = "medium";
|
|
24
|
-
/**
|
|
25
|
-
* Visual variant of the input element. Elevated inputs have a shadow to help
|
|
26
|
-
* them stand out from the background and should only be used when absolutely
|
|
27
|
-
* positioned above other content.
|
|
28
|
-
*/
|
|
29
|
-
variant = "default";
|
|
30
|
-
/**
|
|
31
|
-
* Type of input element. If you need a number input, read the accessibility
|
|
32
|
-
* section of this MDN article first:
|
|
33
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/number#accessibility
|
|
34
|
-
*/
|
|
35
|
-
type = "text";
|
|
36
|
-
/**
|
|
37
|
-
* Input mode hints for devices with dynamic keyboards.
|
|
38
|
-
*/
|
|
39
|
-
inputmode;
|
|
40
|
-
/**
|
|
41
|
-
* Regex pattern for input validation.
|
|
42
|
-
*/
|
|
43
|
-
pattern;
|
|
44
|
-
/**
|
|
45
|
-
* Value of the input element, in case you want to control it yourself.
|
|
46
|
-
*/
|
|
47
|
-
value = "";
|
|
48
|
-
name;
|
|
49
|
-
/**
|
|
50
|
-
* Whether the input is disabled. Disabled inputs are not editable, excluded
|
|
51
|
-
* from tab order and are not validated.
|
|
52
|
-
*/
|
|
53
|
-
disabled = false;
|
|
54
|
-
/**
|
|
55
|
-
* Placeholder text should rarely be used as it poses a lot of accessibility
|
|
56
|
-
* issues.
|
|
57
|
-
*/
|
|
58
|
-
placeholder;
|
|
59
|
-
render() {
|
|
60
|
-
const sizeClass = this.size === "large" ? "large" : "";
|
|
61
|
-
const variantClass = this.variant === "elevated" ? "elevated" : "";
|
|
62
|
-
return (h(Host, { key: '769603f718f511a0a2202814a7621d60a2a9f34c', class: `${sizeClass} ${variantClass}` }, h("input", { key: '6a4e1ad8173dfe37ce5facf8627990fd797dfc60', ref: (el) => this.setInputRef(el), id: this.ariaId, type: this.type, name: this.name, inputMode: this.inputmode, pattern: this.pattern, class: "input", value: this.value, disabled: this.disabled, placeholder: this.placeholder, onInput: () => this.onInput(), onBlur: () => this.onBlur(), onInvalid: () => this.onInvalid() })));
|
|
63
|
-
}
|
|
64
|
-
static get style() { return inputCss; }
|
|
65
|
-
}, [770, "scout-input", {
|
|
66
|
-
"validate": [16],
|
|
67
|
-
"size": [1],
|
|
68
|
-
"variant": [1],
|
|
69
|
-
"type": [1],
|
|
70
|
-
"inputmode": [1],
|
|
71
|
-
"pattern": [1],
|
|
72
|
-
"value": [1],
|
|
73
|
-
"name": [1],
|
|
74
|
-
"disabled": [4],
|
|
75
|
-
"placeholder": [1],
|
|
76
|
-
"ariaId": [32]
|
|
77
|
-
}]);
|
|
78
|
-
function defineCustomElement$1() {
|
|
79
|
-
if (typeof customElements === "undefined") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const components = ["scout-input"];
|
|
83
|
-
components.forEach(tagName => { switch (tagName) {
|
|
84
|
-
case "scout-input":
|
|
85
|
-
if (!customElements.get(tagName)) {
|
|
86
|
-
customElements.define(tagName, ScoutInput$1);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
} });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const ScoutInput = ScoutInput$1;
|
|
93
|
-
const defineCustomElement = defineCustomElement$1;
|
|
94
|
-
|
|
95
|
-
export { ScoutInput, defineCustomElement };
|
|
96
|
-
//# sourceMappingURL=scout-input.js.map
|
|
97
|
-
|
|
98
|
-
//# sourceMappingURL=scout-input.js.map
|
|
1
|
+
import{p as t,M as s,c as a,h as i,d as e,t as r}from"./p-CmHrcz9s.js";import{i as o}from"./p-CTivgs5a.js";const u=t(class extends(s(o)){constructor(t){super(!1),!1!==t&&this.__registerHost(),this.scoutInputChange=a(this,"scoutInputChange"),this.scoutBlur=a(this,"scoutBlur"),this._scoutValidate=a(this,"_scoutValidate"),this._scoutInvalid=a(this,"_scoutInvalid"),this._scoutFieldId=a(this,"_scoutFieldId")}size="medium";variant="default";type="text";inputmode;pattern;value="";name;disabled=!1;placeholder;render(){return i(e,{key:"800efa151d522ef1d7a483128baa6c0958dcd100",class:`${"large"===this.size?"large":""} ${"elevated"===this.variant?"elevated":""}`},i("input",{key:"92756a5cdf529455fffaadcbcdd2bc36a5087c65",ref:t=>this.setInputRef(t),id:this.ariaId,type:this.type,name:this.name,inputMode:this.inputmode,pattern:this.pattern,class:"input",value:this.value,disabled:this.disabled,placeholder:this.placeholder,onInput:()=>this.onInput(),onBlur:()=>this.onBlur(),onInvalid:()=>this.onInvalid()}))}static get style(){return".sc-scout-input-h{display:flex;height:var(--spacing-10);--scout-input-padding:var(--spacing-2);--scout-input-border-radius:var(--spacing-2);--scout-input-type:var(--type-body-base)}.large.sc-scout-input-h{height:var(--spacing-14);--scout-input-padding:var(--spacing-3);--scout-input-border-radius:var(--spacing-3);--scout-input-type:var(--type-body-lg)}.input.sc-scout-input{flex:1;padding:var(--scout-input-padding);font:var(--scout-input-type);border:1px solid var(--color-gray-300);border-radius:var(--scout-input-border-radius);background-color:var(--color-white);color:var(--color-text-base)}.input.sc-scout-input:disabled{background-color:var(--color-gray-100);color:var(--color-gray-700);cursor:not-allowed}.elevated.sc-scout-input-h .input.sc-scout-input{box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);border-color:transparent}"}},[514,"scout-input",{validate:[16],size:[1],variant:[1],type:[1],inputmode:[1],pattern:[1],value:[1],name:[1],disabled:[4],placeholder:[1],ariaId:[32]}]),c=u,n=function(){"undefined"!=typeof customElements&&["scout-input"].forEach((t=>{"scout-input"===t&&(customElements.get(r(t))||customElements.define(r(t),u))}))};export{c as ScoutInput,n as defineCustomElement}
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const linkCss = ":host{display:inline}a,button{color:var(--color-text-brand-base);-webkit-text-decoration:none;text-decoration:none}a:hover,button:hover{-webkit-text-decoration:underline;text-decoration:underline;color:var(--color-background-brand-hover)}a:active,button:active{color:var(--color-background-brand-pressed)}button{display:inline;background:none;border:none;padding:0;cursor:pointer}";
|
|
4
|
-
|
|
5
|
-
const ScoutLink$1 = /*@__PURE__*/ proxyCustomElement(class ScoutLink extends H {
|
|
6
|
-
constructor(registerHost) {
|
|
7
|
-
super();
|
|
8
|
-
if (registerHost !== false) {
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
}
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.scoutLinkClick = createEvent(this, "scoutLinkClick");
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The URL that the link points to. Required when type is set to link
|
|
16
|
-
*/
|
|
17
|
-
href;
|
|
18
|
-
/**
|
|
19
|
-
* Text to be displayed for the link
|
|
20
|
-
*/
|
|
21
|
-
label;
|
|
22
|
-
rel;
|
|
23
|
-
/**
|
|
24
|
-
* If the label property is not sufficient to describe its use, add an aria-label describing what happens
|
|
25
|
-
* when pressing the button or where the user navigates if it is a link.
|
|
26
|
-
*/
|
|
27
|
-
linkAriaLabel;
|
|
28
|
-
/**
|
|
29
|
-
* There are two types. If you intend to use it as a button with onclick, a button is rendered, however if you want to you it
|
|
30
|
-
* as a normal link, a link with href is rendered.
|
|
31
|
-
*/
|
|
32
|
-
type = "link";
|
|
33
|
-
/**
|
|
34
|
-
* _blank Opens the linked document in a new window or tab
|
|
35
|
-
*
|
|
36
|
-
* _self Opens the linked document in the same frame as it was clicked (this is default)
|
|
37
|
-
*
|
|
38
|
-
* _parent Opens the linked document in the parent frame
|
|
39
|
-
*
|
|
40
|
-
* _top Opens the linked document in the full body of the window
|
|
41
|
-
*
|
|
42
|
-
* _framename Opens the linked document in the named iframe
|
|
43
|
-
*/
|
|
44
|
-
target = "_self";
|
|
45
|
-
/**
|
|
46
|
-
* Only sent if the link is a button.
|
|
47
|
-
*/
|
|
48
|
-
scoutLinkClick;
|
|
49
|
-
render() {
|
|
50
|
-
if (this.type === "button") {
|
|
51
|
-
return (h("button", { type: "button", "aria-label": this.linkAriaLabel || "", onClick: () => this.scoutLinkClick.emit() }, this.label));
|
|
52
|
-
}
|
|
53
|
-
if (!this.href) {
|
|
54
|
-
throw new Error("Href is requied when type is set to link");
|
|
55
|
-
}
|
|
56
|
-
return (h("a", { href: this.href, target: this.target, "aria-label": this.linkAriaLabel || "", rel:
|
|
57
|
-
// This might not be our job, but better safe than sorry.
|
|
58
|
-
this.rel ??
|
|
59
|
-
(this.target === "_blank" ? "noopener noreferrer" : undefined) }, this.label));
|
|
60
|
-
}
|
|
61
|
-
static get delegatesFocus() { return true; }
|
|
62
|
-
static get style() { return linkCss; }
|
|
63
|
-
}, [785, "scout-link", {
|
|
64
|
-
"href": [1],
|
|
65
|
-
"label": [1],
|
|
66
|
-
"rel": [1],
|
|
67
|
-
"linkAriaLabel": [1, "link-aria-label"],
|
|
68
|
-
"type": [1],
|
|
69
|
-
"target": [1]
|
|
70
|
-
}]);
|
|
71
|
-
function defineCustomElement$1() {
|
|
72
|
-
if (typeof customElements === "undefined") {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const components = ["scout-link"];
|
|
76
|
-
components.forEach(tagName => { switch (tagName) {
|
|
77
|
-
case "scout-link":
|
|
78
|
-
if (!customElements.get(tagName)) {
|
|
79
|
-
customElements.define(tagName, ScoutLink$1);
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
} });
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const ScoutLink = ScoutLink$1;
|
|
86
|
-
const defineCustomElement = defineCustomElement$1;
|
|
87
|
-
|
|
88
|
-
export { ScoutLink, defineCustomElement };
|
|
89
|
-
//# sourceMappingURL=scout-link.js.map
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=scout-link.js.map
|
|
1
|
+
import{p as t,H as e,c as r,h as o,t as n}from"./p-CmHrcz9s.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.scoutLinkClick=r(this,"scoutLinkClick")}href;label;rel;linkAriaLabel;type="link";target="_self";scoutLinkClick;render(){if("button"===this.type)return o("button",{type:"button","aria-label":this.linkAriaLabel||"",onClick:()=>this.scoutLinkClick.emit()},this.label);if(!this.href)throw Error("Href is requied when type is set to link");return o("a",{href:this.href,target:this.target,"aria-label":this.linkAriaLabel||"",rel:this.rel??("_blank"===this.target?"noopener noreferrer":void 0)},this.label)}static get delegatesFocus(){return!0}static get style(){return":host{display:inline}a,button{color:var(--color-text-brand-base);-webkit-text-decoration:none;text-decoration:none}@media (hover: hover){a:hover,button:hover{-webkit-text-decoration:underline;text-decoration:underline;color:var(--color-background-brand-hover)}}a:active,button:active{color:var(--color-background-brand-pressed)}button{display:inline;background:none;border:none;padding:0;cursor:pointer}"}},[529,"scout-link",{href:[1],label:[1],rel:[1],linkAriaLabel:[1,"link-aria-label"],type:[1],target:[1]}]),s=i,a=function(){"undefined"!=typeof customElements&&["scout-link"].forEach((t=>{"scout-link"===t&&(customElements.get(n(t))||customElements.define(n(t),i))}))};export{s as ScoutLink,a as defineCustomElement}
|
|
@@ -1,108 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { d as defineCustomElement$3 } from './p-CLzh39Ll.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-4RT-nIeK.js';
|
|
4
|
-
|
|
5
|
-
const listViewItemCss = ":host{display:flex}.button{flex:1;display:flex;align-items:center;text-align:inherit;min-height:var(--spacing-12);color:var(--color-text-base);padding:var(--spacing-2) var(--spacing-4);cursor:pointer;border:none;background-color:transparent;-webkit-text-decoration:none;text-decoration:none}.button:hover{background-color:var(--color-background-brand-subtle-hovered)}.prefix-icon,.suffix-icon{display:flex;align-items:center;height:var(--spacing-6);color:var(--color-neutral-700)}.prefix-icon svg,.suffix-icon svg,.prefix-icon .icon,.suffix-icon .icon{width:var(--spacing-6);height:var(--spacing-6)}.prefix-icon{justify-content:flex-start;width:var(--spacing-14)}.suffix-icon{justify-content:flex-end;width:var(--spacing-8)}.suffix-icon .icon{background-color:currentColor;-webkit-mask-image:var(--icon);mask-image:var(--icon);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.content{flex:1;display:flex;flex-direction:column;justify-content:center}.primary{font:var(--type-body-base)}.secondary{font:var(--type-body-sm);color:var(--color-neutral-700)}";
|
|
6
|
-
|
|
7
|
-
const ScoutListViewItem$1 = /*@__PURE__*/ proxyCustomElement(class ScoutListViewItem extends H {
|
|
8
|
-
constructor(registerHost) {
|
|
9
|
-
super();
|
|
10
|
-
if (registerHost !== false) {
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
}
|
|
13
|
-
this.__attachShadow();
|
|
14
|
-
this.scoutClick = createEvent(this, "scoutClick");
|
|
15
|
-
}
|
|
16
|
-
icon;
|
|
17
|
-
primary;
|
|
18
|
-
secondary;
|
|
19
|
-
type = "button";
|
|
20
|
-
href;
|
|
21
|
-
target;
|
|
22
|
-
rel;
|
|
23
|
-
name;
|
|
24
|
-
value;
|
|
25
|
-
checked;
|
|
26
|
-
disabled;
|
|
27
|
-
scoutClick;
|
|
28
|
-
render() {
|
|
29
|
-
const Tag = this.type === "link"
|
|
30
|
-
? "a"
|
|
31
|
-
: this.type === "radio" || this.type === "checkbox"
|
|
32
|
-
? "label"
|
|
33
|
-
: "button";
|
|
34
|
-
const linkProps = this.type === "link"
|
|
35
|
-
? {
|
|
36
|
-
href: this.href,
|
|
37
|
-
target: this.target,
|
|
38
|
-
// This might not be our job, but better safe than sorry.
|
|
39
|
-
rel: this.rel ??
|
|
40
|
-
(this.target === "_blank" ? "noopener noreferrer" : undefined),
|
|
41
|
-
}
|
|
42
|
-
: {};
|
|
43
|
-
return (h(Host, { key: '329bcf60c9b9df6af329d833500b673f3de7e0ff', role: "listitem" }, h(Tag, { key: '864c0c388e72a544afac7b73dc715fc992f913aa', class: "button", ...linkProps, onClick: () => this.scoutClick.emit() }, this.getPrefix(), this.getContent(), this.getSuffix())));
|
|
44
|
-
}
|
|
45
|
-
getPrefix() {
|
|
46
|
-
if (!this.icon) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
return h("div", { class: "prefix-icon", innerHTML: this.icon });
|
|
50
|
-
}
|
|
51
|
-
getContent() {
|
|
52
|
-
return (h("div", { class: "content" }, this.primary && h("div", { class: "primary" }, this.primary), this.secondary && h("div", { class: "secondary" }, this.secondary)));
|
|
53
|
-
}
|
|
54
|
-
getSuffix() {
|
|
55
|
-
if (this.type === "radio") {
|
|
56
|
-
return (h("scout-radio-button", { name: this.name, value: this.value, checked: this.checked, disabled: this.disabled }));
|
|
57
|
-
}
|
|
58
|
-
if (this.type === "checkbox") {
|
|
59
|
-
return (h("scout-checkbox", { name: this.name, value: this.value, checked: this.checked, disabled: this.disabled }));
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
static get delegatesFocus() { return true; }
|
|
64
|
-
static get style() { return listViewItemCss; }
|
|
65
|
-
}, [785, "scout-list-view-item", {
|
|
66
|
-
"icon": [1],
|
|
67
|
-
"primary": [1],
|
|
68
|
-
"secondary": [1],
|
|
69
|
-
"type": [1],
|
|
70
|
-
"href": [1],
|
|
71
|
-
"target": [1],
|
|
72
|
-
"rel": [1],
|
|
73
|
-
"name": [1],
|
|
74
|
-
"value": [1],
|
|
75
|
-
"checked": [4],
|
|
76
|
-
"disabled": [4]
|
|
77
|
-
}]);
|
|
78
|
-
function defineCustomElement$1() {
|
|
79
|
-
if (typeof customElements === "undefined") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const components = ["scout-list-view-item", "scout-checkbox", "scout-radio-button"];
|
|
83
|
-
components.forEach(tagName => { switch (tagName) {
|
|
84
|
-
case "scout-list-view-item":
|
|
85
|
-
if (!customElements.get(tagName)) {
|
|
86
|
-
customElements.define(tagName, ScoutListViewItem$1);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
case "scout-checkbox":
|
|
90
|
-
if (!customElements.get(tagName)) {
|
|
91
|
-
defineCustomElement$3();
|
|
92
|
-
}
|
|
93
|
-
break;
|
|
94
|
-
case "scout-radio-button":
|
|
95
|
-
if (!customElements.get(tagName)) {
|
|
96
|
-
defineCustomElement$2();
|
|
97
|
-
}
|
|
98
|
-
break;
|
|
99
|
-
} });
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const ScoutListViewItem = ScoutListViewItem$1;
|
|
103
|
-
const defineCustomElement = defineCustomElement$1;
|
|
104
|
-
|
|
105
|
-
export { ScoutListViewItem, defineCustomElement };
|
|
106
|
-
//# sourceMappingURL=scout-list-view-item.js.map
|
|
107
|
-
|
|
108
|
-
//# sourceMappingURL=scout-list-view-item.js.map
|
|
1
|
+
import{p as e,H as t,c as i,h as s,d as o,t as r}from"./p-CmHrcz9s.js";import{d as c}from"./p-R-tzZ3cs.js";import{d as n}from"./p-vLvmwbzB.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.scoutClick=i(this,"scoutClick")}icon;primary;secondary;type="button";href;target;rel;name;value;checked;disabled;scoutClick;render(){return s(o,{key:"329bcf60c9b9df6af329d833500b673f3de7e0ff",role:"listitem"},s("link"===this.type?"a":"radio"===this.type||"checkbox"===this.type?"label":"button",{key:"864c0c388e72a544afac7b73dc715fc992f913aa",class:"button",..."link"===this.type?{href:this.href,target:this.target,rel:this.rel??("_blank"===this.target?"noopener noreferrer":void 0)}:{},onClick:()=>this.scoutClick.emit()},this.getPrefix(),this.getContent(),this.getSuffix()))}getPrefix(){return this.icon?s("div",{class:"prefix-icon",innerHTML:this.icon}):null}getContent(){return s("div",{class:"content"},this.primary&&s("div",{class:"primary"},this.primary),this.secondary&&s("div",{class:"secondary"},this.secondary))}getSuffix(){return"radio"===this.type?s("scout-radio-button",{name:this.name,value:this.value,checked:this.checked,disabled:this.disabled}):"checkbox"===this.type?s("scout-checkbox",{name:this.name,value:this.value,checked:this.checked,disabled:this.disabled}):null}static get delegatesFocus(){return!0}static get style(){return":host{display:flex}.button{flex:1;display:flex;align-items:center;text-align:inherit;min-height:var(--spacing-12);color:var(--color-text-base);padding:var(--spacing-2) var(--spacing-4);cursor:pointer;border:none;background-color:transparent;-webkit-text-decoration:none;text-decoration:none}@media (hover: hover){.button:hover{background-color:var(--color-background-brand-subtle-hovered)}}.prefix-icon,.suffix-icon{display:flex;align-items:center;height:var(--spacing-6);color:var(--color-neutral-700)}.prefix-icon svg,.suffix-icon svg,.prefix-icon .icon,.suffix-icon .icon{width:var(--spacing-6);height:var(--spacing-6)}.prefix-icon{justify-content:flex-start;width:var(--spacing-14)}.suffix-icon{justify-content:flex-end;width:var(--spacing-8)}.suffix-icon .icon{background-color:currentColor;-webkit-mask-image:var(--icon);mask-image:var(--icon);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.content{flex:1;display:flex;flex-direction:column;justify-content:center}.primary{font:var(--type-body-base)}.secondary{font:var(--type-body-sm);color:var(--color-neutral-700)}"}},[529,"scout-list-view-item",{icon:[1],primary:[1],secondary:[1],type:[1],href:[1],target:[1],rel:[1],name:[1],value:[1],checked:[4],disabled:[4]}]),l=a,d=function(){"undefined"!=typeof customElements&&["scout-list-view-item","scout-checkbox","scout-radio-button"].forEach((e=>{switch(e){case"scout-list-view-item":customElements.get(r(e))||customElements.define(r(e),a);break;case"scout-checkbox":customElements.get(r(e))||c();break;case"scout-radio-button":customElements.get(r(e))||n()}}))};export{l as ScoutListViewItem,d as defineCustomElement}
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const listViewSubheaderCss = ":host{display:flex;align-items:center;justify-content:flex-start;padding:0 var(--spacing-4) !important;height:var(--spacing-12);border:none !important;background-color:transparent}.heading{margin:0;padding:0;font:var(--type-body-sm);color:var(--color-gray-800);font-weight:500}";
|
|
4
|
-
|
|
5
|
-
const ScoutListViewSubheader$1 = /*@__PURE__*/ proxyCustomElement(class ScoutListViewSubheader extends H {
|
|
6
|
-
constructor(registerHost) {
|
|
7
|
-
super();
|
|
8
|
-
if (registerHost !== false) {
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
}
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
}
|
|
13
|
-
text;
|
|
14
|
-
headingLevel = "h2";
|
|
15
|
-
render() {
|
|
16
|
-
return (h(Host, { key: 'b93e8553a3b335f456e7bcbd32c3c635da58da00', role: "listitem" }, h(this.headingLevel, { key: 'e82ea8203aef696156a211c6aac9415fe488a56b', class: "heading" }, this.text)));
|
|
17
|
-
}
|
|
18
|
-
static get delegatesFocus() { return true; }
|
|
19
|
-
static get style() { return listViewSubheaderCss; }
|
|
20
|
-
}, [785, "scout-list-view-subheader", {
|
|
21
|
-
"text": [1],
|
|
22
|
-
"headingLevel": [1, "heading-level"]
|
|
23
|
-
}]);
|
|
24
|
-
function defineCustomElement$1() {
|
|
25
|
-
if (typeof customElements === "undefined") {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const components = ["scout-list-view-subheader"];
|
|
29
|
-
components.forEach(tagName => { switch (tagName) {
|
|
30
|
-
case "scout-list-view-subheader":
|
|
31
|
-
if (!customElements.get(tagName)) {
|
|
32
|
-
customElements.define(tagName, ScoutListViewSubheader$1);
|
|
33
|
-
}
|
|
34
|
-
break;
|
|
35
|
-
} });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const ScoutListViewSubheader = ScoutListViewSubheader$1;
|
|
39
|
-
const defineCustomElement = defineCustomElement$1;
|
|
40
|
-
|
|
41
|
-
export { ScoutListViewSubheader, defineCustomElement };
|
|
42
|
-
//# sourceMappingURL=scout-list-view-subheader.js.map
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=scout-list-view-subheader.js.map
|
|
1
|
+
import{p as e,H as t,h as s,d as a,t as n}from"./p-CmHrcz9s.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}text;headingLevel="h2";render(){return s(a,{key:"b93e8553a3b335f456e7bcbd32c3c635da58da00",role:"listitem"},s(this.headingLevel,{key:"e82ea8203aef696156a211c6aac9415fe488a56b",class:"heading"},this.text))}static get delegatesFocus(){return!0}static get style(){return":host{display:flex;align-items:center;justify-content:flex-start;padding:0 var(--spacing-4) !important;height:var(--spacing-12);border:none !important;background-color:transparent}.heading{margin:0;padding:0;font:var(--type-body-sm);color:var(--color-gray-800);font-weight:500}"}},[529,"scout-list-view-subheader",{text:[1],headingLevel:[1,"heading-level"]}]),i=r,o=function(){"undefined"!=typeof customElements&&["scout-list-view-subheader"].forEach((e=>{"scout-list-view-subheader"===e&&(customElements.get(n(e))||customElements.define(n(e),r))}))};export{i as ScoutListViewSubheader,o as defineCustomElement}
|
|
@@ -1,59 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const listViewCss = ":host{display:flex;flex-direction:column;padding:var(--spacing-2) 0}";
|
|
4
|
-
|
|
5
|
-
const ScoutListView$1 = /*@__PURE__*/ proxyCustomElement(class ScoutListView extends H {
|
|
6
|
-
constructor(registerHost) {
|
|
7
|
-
super();
|
|
8
|
-
if (registerHost !== false) {
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
}
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
}
|
|
13
|
-
get el() { return this; }
|
|
14
|
-
onScoutChecked(event) {
|
|
15
|
-
const { checked, element } = event.detail;
|
|
16
|
-
if (element.type !== "radio" || !element.name || !checked) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const listItems = this.el.querySelectorAll("scout-list-view-item");
|
|
20
|
-
const otherRadios = [];
|
|
21
|
-
listItems.forEach((item) => {
|
|
22
|
-
const radios = item.shadowRoot.querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`);
|
|
23
|
-
radios.forEach((r) => {
|
|
24
|
-
if (r !== element) {
|
|
25
|
-
otherRadios.push(r);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
for (const radio of otherRadios) {
|
|
30
|
-
radio.checked = false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
return (h(Host, { key: '68c7e8924c60ba15c6c8a64724eebeea1731909f', role: "list" }, h("slot", { key: '7b686b0f83c138ab0d497f9b6a0d7d5927bce63c' })));
|
|
35
|
-
}
|
|
36
|
-
static get delegatesFocus() { return true; }
|
|
37
|
-
static get style() { return listViewCss; }
|
|
38
|
-
}, [273, "scout-list-view", undefined, [[0, "scoutChecked", "onScoutChecked"]]]);
|
|
39
|
-
function defineCustomElement$1() {
|
|
40
|
-
if (typeof customElements === "undefined") {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const components = ["scout-list-view"];
|
|
44
|
-
components.forEach(tagName => { switch (tagName) {
|
|
45
|
-
case "scout-list-view":
|
|
46
|
-
if (!customElements.get(tagName)) {
|
|
47
|
-
customElements.define(tagName, ScoutListView$1);
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
} });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const ScoutListView = ScoutListView$1;
|
|
54
|
-
const defineCustomElement = defineCustomElement$1;
|
|
55
|
-
|
|
56
|
-
export { ScoutListView, defineCustomElement };
|
|
57
|
-
//# sourceMappingURL=scout-list-view.js.map
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=scout-list-view.js.map
|
|
1
|
+
import{p as e,H as t,h as s,d as c,t as o}from"./p-CmHrcz9s.js";const i=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get el(){return this}onScoutChecked(e){const{checked:t,element:s}=e.detail;if("radio"!==s.type||!s.name||!t)return;const c=this.el.querySelectorAll("scout-list-view-item"),o=[];c.forEach((e=>{e.shadowRoot.querySelectorAll(`input[type="radio"][name="${CSS.escape(s.name)}"]`).forEach((e=>{e!==s&&o.push(e)}))}));for(const e of o)e.checked=!1}render(){return s(c,{key:"68c7e8924c60ba15c6c8a64724eebeea1731909f",role:"list"},s("slot",{key:"7b686b0f83c138ab0d497f9b6a0d7d5927bce63c"}))}static get delegatesFocus(){return!0}static get style(){return":host{display:flex;flex-direction:column;padding:var(--spacing-2) 0}"}},[273,"scout-list-view",void 0,[[0,"scoutChecked","onScoutChecked"]]]),n=i,r=function(){"undefined"!=typeof customElements&&["scout-list-view"].forEach((e=>{"scout-list-view"===e&&(customElements.get(o(e))||customElements.define(o(e),i))}))};export{n as ScoutListView,r as defineCustomElement}
|