@scouterna/ui-webc 2.2.4 → 2.2.5
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/{inputMixin-CkYXihTB.js → inputMixin-D1D-VFiT.js} +6 -2
- package/dist/cjs/inputMixin-D1D-VFiT.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/scout-app-bar.cjs.entry.js +1 -1
- package/dist/cjs/scout-app-bar.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-button.cjs.entry.js +3 -3
- package/dist/cjs/scout-button.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-card.cjs.entry.js +1 -1
- package/dist/cjs/scout-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/scout-divider.cjs.entry.js +1 -1
- package/dist/cjs/scout-field.cjs.entry.js +1 -1
- package/dist/cjs/scout-input.cjs.entry.js +22 -3
- package/dist/cjs/scout-input.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-list-view-item.cjs.entry.js +4 -3
- package/dist/cjs/scout-list-view-item.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-list-view-subheader.cjs.entry.js +2 -2
- package/dist/cjs/scout-list-view-subheader.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-list-view.cjs.entry.js +1 -1
- package/dist/cjs/scout-loader.cjs.entry.js +1 -1
- package/dist/cjs/scout-select.cjs.entry.js +2 -2
- package/dist/cjs/scout-stack.cjs.entry.js +2 -2
- package/dist/cjs/scout-switch.cjs.entry.js +2 -2
- package/dist/cjs/ui-webc.cjs.js +1 -1
- package/dist/collection/components/app-bar/app-bar.css +2 -1
- package/dist/collection/components/button/button.css +86 -105
- package/dist/collection/components/button/button.js +3 -4
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/field/field.js +1 -1
- package/dist/collection/components/input/input.css +26 -4
- package/dist/collection/components/input/input.js +80 -2
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/list-view/list-view.js +1 -1
- package/dist/collection/components/list-view-item/list-view-item.js +23 -3
- package/dist/collection/components/list-view-item/list-view-item.js.map +1 -1
- package/dist/collection/components/list-view-subheader/list-view-subheader.css +3 -2
- package/dist/collection/components/list-view-subheader/list-view-subheader.js +1 -1
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +1 -1
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/stack/stack.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/mixins/inputMixin.js +4 -0
- package/dist/collection/mixins/inputMixin.js.map +1 -1
- package/dist/components/{p-B_lll43e.js → p-4RT-nIeK.js} +4 -4
- package/dist/components/{p-B_lll43e.js.map → p-4RT-nIeK.js.map} +1 -1
- package/dist/components/{p-DaGMxK4K.js → p-B-kEl-ny.js} +8 -2
- package/dist/components/p-B-kEl-ny.js.map +1 -0
- package/dist/components/{p-CwrP_ZZM.js → p-CLzh39Ll.js} +4 -4
- package/dist/components/{p-CwrP_ZZM.js.map → p-CLzh39Ll.js.map} +1 -1
- package/dist/components/scout-app-bar.js +1 -1
- package/dist/components/scout-app-bar.js.map +1 -1
- package/dist/components/scout-button.js +5 -5
- package/dist/components/scout-button.js.map +1 -1
- package/dist/components/scout-card.js +1 -1
- package/dist/components/scout-checkbox.js +1 -1
- package/dist/components/scout-divider.js +1 -1
- package/dist/components/scout-field.js +1 -1
- package/dist/components/scout-input.js +26 -4
- package/dist/components/scout-input.js.map +1 -1
- package/dist/components/scout-list-view-item.js +8 -6
- package/dist/components/scout-list-view-item.js.map +1 -1
- package/dist/components/scout-list-view-subheader.js +2 -2
- package/dist/components/scout-list-view-subheader.js.map +1 -1
- package/dist/components/scout-list-view.js +1 -1
- package/dist/components/scout-loader.js +1 -1
- package/dist/components/scout-radio-button.js +1 -1
- package/dist/components/scout-select.js +2 -2
- package/dist/components/scout-stack.js +2 -2
- package/dist/components/scout-switch.js +2 -2
- package/dist/custom-elements.json +116 -2
- package/dist/esm/{inputMixin-mAf9ZFOg.js → inputMixin-C9OB0DNj.js} +6 -2
- package/dist/esm/inputMixin-C9OB0DNj.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/scout-app-bar.entry.js +1 -1
- package/dist/esm/scout-app-bar.entry.js.map +1 -1
- package/dist/esm/scout-button.entry.js +4 -4
- package/dist/esm/scout-button.entry.js.map +1 -1
- package/dist/esm/scout-card.entry.js +1 -1
- package/dist/esm/scout-checkbox_2.entry.js +3 -3
- package/dist/esm/scout-divider.entry.js +1 -1
- package/dist/esm/scout-field.entry.js +1 -1
- package/dist/esm/scout-input.entry.js +23 -4
- package/dist/esm/scout-input.entry.js.map +1 -1
- package/dist/esm/scout-list-view-item.entry.js +4 -3
- package/dist/esm/scout-list-view-item.entry.js.map +1 -1
- package/dist/esm/scout-list-view-subheader.entry.js +2 -2
- package/dist/esm/scout-list-view-subheader.entry.js.map +1 -1
- package/dist/esm/scout-list-view.entry.js +1 -1
- package/dist/esm/scout-loader.entry.js +1 -1
- package/dist/esm/scout-select.entry.js +2 -2
- package/dist/esm/scout-stack.entry.js +2 -2
- package/dist/esm/scout-switch.entry.js +2 -2
- package/dist/esm/ui-webc.js +1 -1
- package/dist/types/components/list-view-item/list-view-item.d.ts +1 -0
- package/dist/types/components.d.ts +30 -0
- package/dist/ui-webc/p-08499152.entry.js +2 -0
- package/dist/ui-webc/{p-97f9cf0a.entry.js.map → p-08499152.entry.js.map} +1 -1
- package/dist/ui-webc/{p-ee497882.entry.js → p-0b8a7cc9.entry.js} +2 -2
- package/dist/ui-webc/p-2a842a24.entry.js +2 -0
- package/dist/ui-webc/p-2a842a24.entry.js.map +1 -0
- package/dist/ui-webc/{p-3018f46f.entry.js → p-30b75968.entry.js} +2 -2
- package/dist/ui-webc/p-30b75968.entry.js.map +1 -0
- package/dist/ui-webc/p-3ac00412.entry.js +2 -0
- package/dist/ui-webc/p-3ac00412.entry.js.map +1 -0
- package/dist/ui-webc/p-4f28520e.entry.js +2 -0
- package/dist/ui-webc/{p-97956c4f.entry.js → p-6de2edd1.entry.js} +2 -2
- package/dist/ui-webc/p-6e9afb25.entry.js +2 -0
- package/dist/ui-webc/p-8a942414.entry.js +2 -0
- package/dist/ui-webc/{p-531dc32a.entry.js.map → p-8a942414.entry.js.map} +1 -1
- package/dist/ui-webc/p-8f3e4290.entry.js +2 -0
- package/dist/ui-webc/p-BsG0XL4c.js +2 -0
- package/dist/ui-webc/p-BsG0XL4c.js.map +1 -0
- package/dist/ui-webc/{p-e4ba9bd7.entry.js → p-b0a70cb6.entry.js} +2 -2
- package/dist/ui-webc/p-cbf489b1.entry.js +2 -0
- package/dist/ui-webc/{p-45b65a28.entry.js.map → p-cbf489b1.entry.js.map} +1 -1
- package/dist/ui-webc/p-d68b8b37.entry.js +2 -0
- package/dist/ui-webc/{p-02c211ea.entry.js.map → p-d68b8b37.entry.js.map} +1 -1
- package/dist/ui-webc/{p-ac65f104.entry.js → p-dcc4dafa.entry.js} +2 -2
- package/dist/ui-webc/scout-app-bar.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-button.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-input.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-list-view-item.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-list-view-subheader.entry.esm.js.map +1 -1
- package/dist/ui-webc/ui-webc.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/inputMixin-CkYXihTB.js.map +0 -1
- package/dist/components/p-DaGMxK4K.js.map +0 -1
- package/dist/esm/inputMixin-mAf9ZFOg.js.map +0 -1
- package/dist/ui-webc/p-02c211ea.entry.js +0 -2
- package/dist/ui-webc/p-3018f46f.entry.js.map +0 -1
- package/dist/ui-webc/p-45b65a28.entry.js +0 -2
- package/dist/ui-webc/p-531dc32a.entry.js +0 -2
- package/dist/ui-webc/p-78b6c86b.entry.js +0 -2
- package/dist/ui-webc/p-78b6c86b.entry.js.map +0 -1
- package/dist/ui-webc/p-974e8415.entry.js +0 -2
- package/dist/ui-webc/p-97f9cf0a.entry.js +0 -2
- package/dist/ui-webc/p-BzgciO7w.js +0 -2
- package/dist/ui-webc/p-BzgciO7w.js.map +0 -1
- package/dist/ui-webc/p-e2288570.entry.js +0 -2
- package/dist/ui-webc/p-f01605ca.entry.js +0 -2
- package/dist/ui-webc/p-f01605ca.entry.js.map +0 -1
- package/dist/ui-webc/p-faaf9da5.entry.js +0 -2
- /package/dist/ui-webc/{p-ee497882.entry.js.map → p-0b8a7cc9.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-e2288570.entry.js.map → p-4f28520e.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-97956c4f.entry.js.map → p-6de2edd1.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-faaf9da5.entry.js.map → p-6e9afb25.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-974e8415.entry.js.map → p-8f3e4290.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-e4ba9bd7.entry.js.map → p-b0a70cb6.entry.js.map} +0 -0
- /package/dist/ui-webc/{p-ac65f104.entry.js.map → p-dcc4dafa.entry.js.map} +0 -0
|
@@ -1,118 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
scout-button {
|
|
2
2
|
display: inline-block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.button {
|
|
6
|
-
flex: 1;
|
|
7
|
-
display: inline-flex;
|
|
8
3
|
height: var(--spacing-10);
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
gap: var(--spacing-3);
|
|
12
|
-
padding: 0 var(--spacing-4);
|
|
13
|
-
font: var(--type-body-base);
|
|
14
|
-
border-radius: var(--spacing-2);
|
|
15
|
-
border: 1px solid transparent;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
-webkit-text-decoration: none;
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
width: var(--spacing-5);
|
|
23
|
-
height: var(--spacing-5);
|
|
24
|
-
margin: 0 calc(var(--spacing-1) * -1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.icon svg {
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.button.icon-only {
|
|
33
|
-
aspect-ratio: 1 / 1;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
padding: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.button.icon-only .icon {
|
|
39
|
-
margin: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.button.icon-only .content {
|
|
43
|
-
/* Visually hidden: https://www.a11yproject.com/posts/how-to-hide-content/ */
|
|
44
|
-
clip: rect(0 0 0 0);
|
|
45
|
-
clip-path: inset(50%);
|
|
46
|
-
height: 1px;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
position: absolute;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
width: 1px;
|
|
51
4
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
5
|
+
scout-button .button {
|
|
6
|
+
flex: 1;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
height: 100%;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
gap: var(--spacing-3);
|
|
12
|
+
padding: 0 var(--spacing-4);
|
|
13
|
+
font: var(--type-body-base);
|
|
14
|
+
border-radius: var(--spacing-2);
|
|
15
|
+
border: 1px solid transparent;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
-webkit-text-decoration: none;
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
box-sizing: border-box;
|
|
60
20
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
21
|
+
scout-button .icon {
|
|
22
|
+
width: var(--spacing-5);
|
|
23
|
+
height: var(--spacing-5);
|
|
24
|
+
margin: 0 calc(var(--spacing-1) * -1);
|
|
64
25
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
border-color: var(--color-background-brand-subtle-base);
|
|
69
|
-
color: var(--color-text-brand-base);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button.outlined:hover {
|
|
73
|
-
background-color: var(--color-background-brand-subtle-hovered);
|
|
26
|
+
scout-button .icon svg {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
74
29
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
30
|
+
scout-button.icon-only .button {
|
|
31
|
+
aspect-ratio: 1 / 1;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
padding: 0;
|
|
78
34
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
border-color: transparent;
|
|
83
|
-
color: var(--color-text-brand-base);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.button.text:hover {
|
|
87
|
-
background-color: var(--color-background-brand-subtle-hovered);
|
|
35
|
+
scout-button.icon-only .icon {
|
|
36
|
+
margin: 0;
|
|
88
37
|
}
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
38
|
+
scout-button.icon-only .content {
|
|
39
|
+
/* Visually hidden: https://www.a11yproject.com/posts/how-to-hide-content/ */
|
|
40
|
+
clip: rect(0 0 0 0);
|
|
41
|
+
clip-path: inset(50%);
|
|
42
|
+
height: 1px;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
position: absolute;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
width: 1px;
|
|
92
47
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
color: var(--color-text-caution-bold-base);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.button.caution:hover {
|
|
100
|
-
background-color: var(--color-background-caution-bold-hovered);
|
|
48
|
+
scout-button .button.primary {
|
|
49
|
+
background-color: var(--color-background-brand-base);
|
|
50
|
+
color: var(--color-text-brand-inverse);
|
|
101
51
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
52
|
+
scout-button .button.primary:hover {
|
|
53
|
+
background-color: var(--color-background-brand-hovered);
|
|
54
|
+
}
|
|
55
|
+
scout-button .button.primary:active {
|
|
56
|
+
background-color: var(--color-background-brand-pressed);
|
|
57
|
+
}
|
|
58
|
+
scout-button .button.outlined {
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
border-color: var(--color-background-brand-subtle-base);
|
|
61
|
+
color: var(--color-text-brand-base);
|
|
105
62
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.button.
|
|
113
|
-
background-color:
|
|
63
|
+
scout-button .button.outlined:hover {
|
|
64
|
+
background-color: var(--color-background-brand-subtle-hovered);
|
|
65
|
+
}
|
|
66
|
+
scout-button .button.outlined:active {
|
|
67
|
+
background-color: var(--color-background-brand-subtle-pressed);
|
|
68
|
+
}
|
|
69
|
+
scout-button .button.text {
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
border-color: transparent;
|
|
72
|
+
color: var(--color-text-brand-base);
|
|
73
|
+
}
|
|
74
|
+
scout-button .button.text:hover {
|
|
75
|
+
background-color: var(--color-background-brand-subtle-hovered);
|
|
76
|
+
}
|
|
77
|
+
scout-button .button.text:active {
|
|
78
|
+
background-color: var(--color-background-brand-subtle-pressed);
|
|
79
|
+
}
|
|
80
|
+
scout-button .button.caution {
|
|
81
|
+
background-color: var(--color-background-caution-bold-base);
|
|
82
|
+
color: var(--color-text-caution-bold-base);
|
|
114
83
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
84
|
+
scout-button .button.caution:hover {
|
|
85
|
+
background-color: var(--color-background-caution-bold-hovered);
|
|
86
|
+
}
|
|
87
|
+
scout-button .button.caution:active {
|
|
88
|
+
background-color: var(--color-background-caution-bold-pressed);
|
|
89
|
+
}
|
|
90
|
+
scout-button .button.danger {
|
|
91
|
+
background-color: var(--color-background-danger-bold-base);
|
|
92
|
+
color: var(--color-text-danger-bold-base);
|
|
118
93
|
}
|
|
94
|
+
scout-button .button.danger:hover {
|
|
95
|
+
background-color: var(--color-background-danger-bold-hovered);
|
|
96
|
+
}
|
|
97
|
+
scout-button .button.danger:active {
|
|
98
|
+
background-color: var(--color-background-danger-bold-pressed);
|
|
99
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
3
|
* A button component that can be used either as a normal button or as a link.
|
|
4
4
|
* Will render a `<button>` element when the `type` is set to "button",
|
|
@@ -33,11 +33,10 @@ export class ScoutButton {
|
|
|
33
33
|
: {
|
|
34
34
|
type: this.type,
|
|
35
35
|
};
|
|
36
|
-
const icon = this.icon && h("span", { key: '
|
|
37
|
-
return (h(
|
|
36
|
+
const icon = this.icon && h("span", { key: '0f03bad87dbcaf10cc387fd20121bd6b3ecdf42d', class: "icon", innerHTML: this.icon });
|
|
37
|
+
return (h(Host, { key: '7a2f998327c5e3dc7139c11f3fcbbe827346c0ee', class: this.iconOnly ? "icon-only" : "" }, h(Tag, { key: 'cabe4acf010df2880a83d5b27f2e885bf326673c', class: `button ${this.variant}`, onClick: () => this.scoutClick.emit(), ...props }, this.iconPosition === "before" && icon, h("span", { key: '7388a6a872149b4cff84256017ee251196612e1a', class: "content" }, h("slot", { key: '0002a40443d7da3b386a708543185cbc572bb461' })), this.iconPosition === "after" && icon)));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "scout-button"; }
|
|
40
|
-
static get encapsulation() { return "scoped"; }
|
|
41
40
|
static get originalStyleUrls() {
|
|
42
41
|
return {
|
|
43
42
|
"$": ["button.css"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,GACL,MAAM,eAAe,CAAC;AAIvB;;;;GAIG;AAKH,MAAM,OAAO,WAAW;IACd,IAAI,GAA2C,QAAQ,CAAC;IAExD,IAAI,CAAU;IACd,MAAM,CAAU;IAChB,GAAG,CAAU;IAErB;;OAEG;IACK,OAAO,GAAY,UAAU,CAAC;IAEtC;;OAEG;IACK,IAAI,CAAU;IACd,YAAY,GAAuB,OAAO,CAAC;IAC3C,QAAQ,GAAY,KAAK,CAAC;IAEzB,UAAU,CAAqB;IAExC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;QAElD,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,MAAM;YAClB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,yDAAyD;gBACzD,GAAG,EACD,IAAI,CAAC,GAAG;oBACR,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;aACjE;YACH,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC;QAER,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,6DAAM,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAEtE,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;YAC3C,EAAC,GAAG,qDACF,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,EAAE,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KACjC,KAAK;gBAER,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI;gBACvC,6DAAM,KAAK,EAAC,SAAS;oBACnB,8DAAQ,CACH;gBACN,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,IAAI,CAClC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Event,\n type EventEmitter,\n h,\n Host,\n Prop,\n} from \"@stencil/core\";\n\nexport type Variant = \"primary\" | \"outlined\" | \"text\" | \"caution\" | \"danger\";\n\n/**\n * A button component that can be used either as a normal button or as a link.\n * Will render a `<button>` element when the `type` is set to \"button\",\n * \"submit\", or \"reset\", and an `<a>` element when the `type` is set to \"link\".\n */\n@Component({\n tag: \"scout-button\",\n styleUrl: \"button.css\",\n})\nexport class ScoutButton {\n @Prop() type: \"button\" | \"submit\" | \"reset\" | \"link\" = \"button\";\n\n @Prop() href?: string;\n @Prop() target?: string;\n @Prop() rel?: string;\n\n /**\n * The variant primarily affects the color of the button.\n */\n @Prop() variant: Variant = \"outlined\";\n\n /**\n * An optional icon to display alongside the button text. Must be an SVG string.\n */\n @Prop() icon?: string;\n @Prop() iconPosition: \"before\" | \"after\" = \"after\";\n @Prop() iconOnly: boolean = false;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n const Tag = this.type === \"link\" ? \"a\" : \"button\";\n\n const props =\n this.type === \"link\"\n ? {\n href: this.href,\n target: this.target,\n // This might not be our job, but better safe than sorry.\n rel:\n this.rel ??\n (this.target === \"_blank\" ? \"noopener noreferrer\" : undefined),\n }\n : {\n type: this.type,\n };\n\n const icon = this.icon && <span class=\"icon\" innerHTML={this.icon} />;\n\n return (\n <Host class={this.iconOnly ? \"icon-only\" : \"\"}>\n <Tag\n class={`button ${this.variant}`}\n onClick={() => this.scoutClick.emit()}\n {...props}\n >\n {this.iconPosition === \"before\" && icon}\n <span class=\"content\">\n <slot />\n </span>\n {this.iconPosition === \"after\" && icon}\n </Tag>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import { h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class ScoutCard {
|
|
6
6
|
render() {
|
|
7
|
-
return (h("div", { key: '
|
|
7
|
+
return (h("div", { key: '1ea5b0a2ea2a8f342e0153d9e90565cc69e2f336', class: "card" }, h("slot", { key: '328519393a7ad17aa158dea8835f16ebdc0cc7bc' })));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "scout-card"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,7 +30,7 @@ export class ScoutCheckbox extends Mixin(inputMixin) {
|
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
const Tag = this.label?.length ? "label" : "div";
|
|
33
|
-
return (h(Tag, { key: '
|
|
33
|
+
return (h(Tag, { key: '67b42b2b686fffecf891da832236fde663b740dc' }, h("input", { key: '81821918d102e1ca809915c14a20aa0847f46e30', ref: (el) => this.setInputRef(el), id: this.ariaId, type: "checkbox", value: this.value, name: this.name, class: "checkbox", style: { "--icon-checkbox": `url(${checkIcon})` }, "aria-labelledby": this.ariaLabelledby, "aria-disabled": this.disabled, disabled: this.disabled, checked: this.checked, onChange: (event) => {
|
|
34
34
|
this.onInput();
|
|
35
35
|
this.onChange(event);
|
|
36
36
|
}, onBlur: () => this.onBlur(), onInvalid: () => this.onInvalid() }), this.label));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class ScoutDivider {
|
|
3
3
|
render() {
|
|
4
|
-
return h(Host, { key: '
|
|
4
|
+
return h(Host, { key: '6a4d3d0bed1689875ec867b16f0c77f391662fc8' });
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "scout-divider"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,7 +35,7 @@ export class ScoutField {
|
|
|
35
35
|
this.errorHidden = false;
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h("div", { key: '
|
|
38
|
+
return (h("div", { key: 'e7539abfb11fac14a5ffd87cfb1a70dd9c41cca7', class: "field" }, h("label", { key: 'c4501be15aafbb2d6e3c447c5893aa2510e20b89', htmlFor: this.inputId, class: "label" }, this.label), h("slot", { key: '5806c8d41926245074fb395b08226272a2432d96' }), h("p", { key: 'f1a36881c2ce2f8485d31e8faac452c9c2423d74', class: "error-text", "aria-live": "polite" }, !this.errorHidden && this.errorText), this.helpText && h("p", { key: '0d9ea374551b527d085ef33595fdee27e80d08fb', class: "help-text" }, this.helpText)));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "scout-field"; }
|
|
41
41
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
2
3
|
height: var(--spacing-10);
|
|
3
|
-
padding: var(--spacing-2);
|
|
4
|
-
|
|
4
|
+
--scout-input-padding: var(--spacing-2);
|
|
5
|
+
--scout-input-border-radius: var(--spacing-2);
|
|
6
|
+
--scout-input-type: var(--type-body-base);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host(.large) {
|
|
10
|
+
height: var(--spacing-14);
|
|
11
|
+
--scout-input-padding: var(--spacing-3);
|
|
12
|
+
--scout-input-border-radius: var(--spacing-3);
|
|
13
|
+
--scout-input-type: var(--type-body-lg);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.input {
|
|
17
|
+
flex: 1;
|
|
18
|
+
padding: var(--scout-input-padding);
|
|
19
|
+
font: var(--scout-input-type);
|
|
5
20
|
border: 1px solid var(--color-gray-300);
|
|
6
|
-
border-radius: var(--
|
|
21
|
+
border-radius: var(--scout-input-border-radius);
|
|
7
22
|
background-color: var(--color-white);
|
|
8
23
|
color: var(--color-text-base);
|
|
9
24
|
}
|
|
@@ -13,3 +28,10 @@
|
|
|
13
28
|
color: var(--color-gray-700);
|
|
14
29
|
cursor: not-allowed;
|
|
15
30
|
}
|
|
31
|
+
|
|
32
|
+
:host(.elevated) .input {
|
|
33
|
+
box-shadow:
|
|
34
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
35
|
+
0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
36
|
+
border-color: transparent;
|
|
37
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Mixin, } from "@stencil/core";
|
|
1
|
+
import { Host, h, Mixin, } from "@stencil/core";
|
|
2
2
|
import { inputMixin } from "../../mixins/inputMixin";
|
|
3
3
|
/**
|
|
4
4
|
* The input component is a basic text input field that can be used to capture
|
|
@@ -10,6 +10,18 @@ export class ScoutInput extends Mixin(inputMixin) {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Size of the input element. Large fields are typically used for prominent
|
|
15
|
+
* inputs, such as a top search field on a page, while medium fields are used
|
|
16
|
+
* for regular form inputs.
|
|
17
|
+
*/
|
|
18
|
+
size = "medium";
|
|
19
|
+
/**
|
|
20
|
+
* Visual variant of the input element. Elevated inputs have a shadow to help
|
|
21
|
+
* them stand out from the background and should only be used when absolutely
|
|
22
|
+
* positioned above other content.
|
|
23
|
+
*/
|
|
24
|
+
variant = "default";
|
|
13
25
|
/**
|
|
14
26
|
* Type of input element. If you need a number input, read the accessibility
|
|
15
27
|
* section of this MDN article first:
|
|
@@ -34,8 +46,15 @@ export class ScoutInput extends Mixin(inputMixin) {
|
|
|
34
46
|
* from tab order and are not validated.
|
|
35
47
|
*/
|
|
36
48
|
disabled = false;
|
|
49
|
+
/**
|
|
50
|
+
* Placeholder text should rarely be used as it poses a lot of accessibility
|
|
51
|
+
* issues.
|
|
52
|
+
*/
|
|
53
|
+
placeholder;
|
|
37
54
|
render() {
|
|
38
|
-
|
|
55
|
+
const sizeClass = this.size === "large" ? "large" : "";
|
|
56
|
+
const variantClass = this.variant === "elevated" ? "elevated" : "";
|
|
57
|
+
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() })));
|
|
39
58
|
}
|
|
40
59
|
static get is() { return "scout-input"; }
|
|
41
60
|
static get encapsulation() { return "scoped"; }
|
|
@@ -51,6 +70,46 @@ export class ScoutInput extends Mixin(inputMixin) {
|
|
|
51
70
|
}
|
|
52
71
|
static get properties() {
|
|
53
72
|
return {
|
|
73
|
+
"size": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "\"medium\" | \"large\"",
|
|
78
|
+
"resolved": "\"large\" | \"medium\"",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Size of the input element. Large fields are typically used for prominent\ninputs, such as a top search field on a page, while medium fields are used\nfor regular form inputs."
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"attribute": "size",
|
|
91
|
+
"defaultValue": "\"medium\""
|
|
92
|
+
},
|
|
93
|
+
"variant": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "\"default\" | \"elevated\"",
|
|
98
|
+
"resolved": "\"default\" | \"elevated\"",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Visual variant of the input element. Elevated inputs have a shadow to help\nthem stand out from the background and should only be used when absolutely\npositioned above other content."
|
|
106
|
+
},
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
109
|
+
"reflect": false,
|
|
110
|
+
"attribute": "variant",
|
|
111
|
+
"defaultValue": "\"default\""
|
|
112
|
+
},
|
|
54
113
|
"type": {
|
|
55
114
|
"type": "string",
|
|
56
115
|
"mutable": false,
|
|
@@ -179,6 +238,25 @@ export class ScoutInput extends Mixin(inputMixin) {
|
|
|
179
238
|
"reflect": false,
|
|
180
239
|
"attribute": "disabled",
|
|
181
240
|
"defaultValue": "false"
|
|
241
|
+
},
|
|
242
|
+
"placeholder": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string",
|
|
247
|
+
"resolved": "string",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": true,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Placeholder text should rarely be used as it poses a lot of accessibility\nissues."
|
|
255
|
+
},
|
|
256
|
+
"getter": false,
|
|
257
|
+
"setter": false,
|
|
258
|
+
"reflect": false,
|
|
259
|
+
"attribute": "placeholder"
|
|
182
260
|
}
|
|
183
261
|
};
|
|
184
262
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,CAAC,EACD,KAAK,EACL,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAwBrD;;;;;GAKG;AAMH,MAAM,OAAO,UACX,SAAQ,KAAK,CAAC,UAAU,CAAC;;;;IAGzB;;;;OAIG;IACK,IAAI,GAAc,MAAM,CAAC;IAEjC;;OAEG;IACK,SAAS,CAAa;IAE9B;;OAEG;IACK,OAAO,CAAU;IAEzB;;OAEG;IACK,KAAK,GAAW,EAAE,CAAC;IAEnB,IAAI,CAAS;IAErB;;;OAGG;IACK,QAAQ,GAAY,KAAK,CAAC;IAElC,MAAM;QACJ,OAAO,CACL,8DACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,EACjC,EAAE,EAAE,IAAI,CAAC,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAC3B,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,GACjC,
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,IAAI,EACJ,CAAC,EACD,KAAK,EACL,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAwBrD;;;;;GAKG;AAMH,MAAM,OAAO,UACX,SAAQ,KAAK,CAAC,UAAU,CAAC;;;;IAGzB;;;;OAIG;IACK,IAAI,GAAuB,QAAQ,CAAC;IAE5C;;;;OAIG;IACK,OAAO,GAA2B,SAAS,CAAC;IAEpD;;;;OAIG;IACK,IAAI,GAAc,MAAM,CAAC;IAEjC;;OAEG;IACK,SAAS,CAAa;IAE9B;;OAEG;IACK,OAAO,CAAU;IAEzB;;OAEG;IACK,KAAK,GAAW,EAAE,CAAC;IAEnB,IAAI,CAAS;IAErB;;;OAGG;IACK,QAAQ,GAAY,KAAK,CAAC;IAElC;;;OAGG;IACK,WAAW,CAAU;IAE7B,MAAM;QACJ,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnE,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,GAAG,SAAS,IAAI,YAAY,EAAE;YACzC,8DACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,EACjC,EAAE,EAAE,IAAI,CAAC,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAC3B,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,GACjC,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n type ComponentInterface,\n Host,\n h,\n Mixin,\n Prop,\n} from \"@stencil/core\";\nimport { inputMixin } from \"../../mixins/inputMixin\";\n\nexport type InputType =\n | \"text\"\n | \"password\"\n | \"email\"\n | \"number\"\n | \"tel\"\n | \"url\"\n // Hack to suggest above value but still allow any other string value\n | (string & {});\n\nexport type InputMode =\n | \"none\"\n | \"text\"\n | \"decimal\"\n | \"numeric\"\n | \"tel\"\n | \"search\"\n | \"email\"\n | \"url\"\n // Hack to suggest above value but still allow any other string value\n | (string & {});\n\n/**\n * The input component is a basic text input field that can be used to capture\n * user input. It supports various types and input modes for different use\n * cases. When used in a form, make sure to wrap it in a Field component to\n * display a label, help text, and error messages.\n */\n@Component({\n tag: \"scout-input\",\n styleUrl: \"input.css\",\n scoped: true,\n})\nexport class ScoutInput\n extends Mixin(inputMixin)\n implements ComponentInterface\n{\n /**\n * Size of the input element. Large fields are typically used for prominent\n * inputs, such as a top search field on a page, while medium fields are used\n * for regular form inputs.\n */\n @Prop() size: \"medium\" | \"large\" = \"medium\";\n\n /**\n * Visual variant of the input element. Elevated inputs have a shadow to help\n * them stand out from the background and should only be used when absolutely\n * positioned above other content.\n */\n @Prop() variant: \"default\" | \"elevated\" = \"default\";\n\n /**\n * Type of input element. If you need a number input, read the accessibility\n * section of this MDN article first:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/number#accessibility\n */\n @Prop() type: InputType = \"text\";\n\n /**\n * Input mode hints for devices with dynamic keyboards.\n */\n @Prop() inputmode?: InputMode;\n\n /**\n * Regex pattern for input validation.\n */\n @Prop() pattern?: string;\n\n /**\n * Value of the input element, in case you want to control it yourself.\n */\n @Prop() value: string = \"\";\n\n @Prop() name: string;\n\n /**\n * Whether the input is disabled. Disabled inputs are not editable, excluded\n * from tab order and are not validated.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Placeholder text should rarely be used as it poses a lot of accessibility\n * issues.\n */\n @Prop() placeholder?: string;\n\n render() {\n const sizeClass = this.size === \"large\" ? \"large\" : \"\";\n const variantClass = this.variant === \"elevated\" ? \"elevated\" : \"\";\n\n return (\n <Host class={`${sizeClass} ${variantClass}`}>\n <input\n ref={(el) => this.setInputRef(el)}\n id={this.ariaId}\n type={this.type}\n name={this.name}\n inputMode={this.inputmode}\n pattern={this.pattern}\n class=\"input\"\n value={this.value}\n disabled={this.disabled}\n placeholder={this.placeholder}\n onInput={() => this.onInput()}\n onBlur={() => this.onBlur()}\n onInvalid={() => this.onInvalid()}\n />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -21,7 +21,7 @@ export class ScoutListView {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '68c7e8924c60ba15c6c8a64724eebeea1731909f', role: "list" }, h("slot", { key: '7b686b0f83c138ab0d497f9b6a0d7d5927bce63c' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "scout-list-view"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,6 +10,7 @@ export class ScoutListViewItem {
|
|
|
10
10
|
name;
|
|
11
11
|
value;
|
|
12
12
|
checked;
|
|
13
|
+
disabled;
|
|
13
14
|
scoutClick;
|
|
14
15
|
render() {
|
|
15
16
|
const Tag = this.type === "link"
|
|
@@ -26,7 +27,7 @@ export class ScoutListViewItem {
|
|
|
26
27
|
(this.target === "_blank" ? "noopener noreferrer" : undefined),
|
|
27
28
|
}
|
|
28
29
|
: {};
|
|
29
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '329bcf60c9b9df6af329d833500b673f3de7e0ff', role: "listitem" }, h(Tag, { key: '864c0c388e72a544afac7b73dc715fc992f913aa', class: "button", ...linkProps, onClick: () => this.scoutClick.emit() }, this.getPrefix(), this.getContent(), this.getSuffix())));
|
|
30
31
|
}
|
|
31
32
|
getPrefix() {
|
|
32
33
|
if (!this.icon) {
|
|
@@ -39,10 +40,10 @@ export class ScoutListViewItem {
|
|
|
39
40
|
}
|
|
40
41
|
getSuffix() {
|
|
41
42
|
if (this.type === "radio") {
|
|
42
|
-
return (h("scout-radio-button", { name: this.name, value: this.value, checked: this.checked }));
|
|
43
|
+
return (h("scout-radio-button", { name: this.name, value: this.value, checked: this.checked, disabled: this.disabled }));
|
|
43
44
|
}
|
|
44
45
|
if (this.type === "checkbox") {
|
|
45
|
-
return (h("scout-checkbox", { name: this.name, value: this.value, checked: this.checked }));
|
|
46
|
+
return (h("scout-checkbox", { name: this.name, value: this.value, checked: this.checked, disabled: this.disabled }));
|
|
46
47
|
}
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
@@ -257,6 +258,25 @@ export class ScoutListViewItem {
|
|
|
257
258
|
"setter": false,
|
|
258
259
|
"reflect": false,
|
|
259
260
|
"attribute": "checked"
|
|
261
|
+
},
|
|
262
|
+
"disabled": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "boolean",
|
|
267
|
+
"resolved": "boolean",
|
|
268
|
+
"references": {}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": true,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": ""
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"reflect": false,
|
|
279
|
+
"attribute": "disabled"
|
|
260
280
|
}
|
|
261
281
|
};
|
|
262
282
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-view-item.js","sourceRoot":"","sources":["../../../src/components/list-view-item/list-view-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EAEL,IAAI,EACJ,CAAC,EACD,IAAI,GACL,MAAM,eAAe,CAAC;AAWvB,MAAM,OAAO,iBAAiB;IACpB,IAAI,CAAU;IACd,OAAO,CAAU;IACjB,SAAS,CAAU;IACnB,IAAI,GAAa,QAAQ,CAAC;IAE1B,IAAI,CAAU;IACd,MAAM,CAAU;IAChB,GAAG,CAAU;IAEb,IAAI,CAAU;IACd,KAAK,CAAU;IACf,OAAO,CAAW;
|
|
1
|
+
{"version":3,"file":"list-view-item.js","sourceRoot":"","sources":["../../../src/components/list-view-item/list-view-item.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n Component,\n Event,\n type EventEmitter,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\nexport type ItemType = \"button\" | \"link\" | \"radio\" | \"checkbox\";\n\n@Component({\n tag: \"scout-list-view-item\",\n styleUrl: \"list-view-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutListViewItem {\n @Prop() icon?: string;\n @Prop() primary?: string;\n @Prop() secondary?: string;\n @Prop() type: ItemType = \"button\";\n\n @Prop() href?: string;\n @Prop() target?: string;\n @Prop() rel?: string;\n\n @Prop() name?: string;\n @Prop() value?: string;\n @Prop() checked?: boolean;\n\n @Prop() disabled?: boolean;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n const Tag =\n this.type === \"link\"\n ? \"a\"\n : this.type === \"radio\" || this.type === \"checkbox\"\n ? \"label\"\n : \"button\";\n\n const linkProps =\n this.type === \"link\"\n ? {\n href: this.href,\n target: this.target,\n // This might not be our job, but better safe than sorry.\n rel:\n this.rel ??\n (this.target === \"_blank\" ? \"noopener noreferrer\" : undefined),\n }\n : {};\n\n return (\n <Host role=\"listitem\">\n <Tag\n class=\"button\"\n {...linkProps}\n onClick={() => this.scoutClick.emit()}\n >\n {this.getPrefix()}\n {this.getContent()}\n {this.getSuffix()}\n </Tag>\n </Host>\n );\n }\n\n private getPrefix() {\n if (!this.icon) {\n return null;\n }\n\n return <div class=\"prefix-icon\" innerHTML={this.icon} />;\n }\n\n private getContent() {\n return (\n <div class=\"content\">\n {this.primary && <div class=\"primary\">{this.primary}</div>}\n {this.secondary && <div class=\"secondary\">{this.secondary}</div>}\n </div>\n );\n }\n\n private getSuffix() {\n if (this.type === \"radio\") {\n return (\n <scout-radio-button\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n );\n }\n\n if (this.type === \"checkbox\") {\n return (\n <scout-checkbox\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n );\n }\n\n return null;\n }\n}\n"]}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: flex-start;
|
|
7
|
-
padding:
|
|
7
|
+
padding: 0 var(--spacing-4) !important;
|
|
8
|
+
height: var(--spacing-12);
|
|
8
9
|
border: none !important;
|
|
9
10
|
background-color: transparent;
|
|
10
11
|
}
|
|
@@ -13,6 +14,6 @@
|
|
|
13
14
|
margin: 0;
|
|
14
15
|
padding: 0;
|
|
15
16
|
font: var(--type-body-sm);
|
|
16
|
-
color: var(--color-
|
|
17
|
+
color: var(--color-gray-800);
|
|
17
18
|
font-weight: 500;
|
|
18
19
|
}
|
|
@@ -3,7 +3,7 @@ export class ScoutListViewSubheader {
|
|
|
3
3
|
text;
|
|
4
4
|
headingLevel = "h2";
|
|
5
5
|
render() {
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
return (h(Host, { key: 'b93e8553a3b335f456e7bcbd32c3c635da58da00', role: "listitem" }, h(this.headingLevel, { key: 'e82ea8203aef696156a211c6aac9415fe488a56b', class: "heading" }, this.text)));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "scout-list-view-subheader"; }
|
|
9
9
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class ScoutLoader {
|
|
|
22
22
|
this.showElement(this.symbolElements[0]);
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '4262ae621bb24ef73641363fff67a1587ea2c644', class: this.size === "base" ? "" : this.size }, h("div", { key: '54ff8ba284a22ab683a9403c803bff7999acce3f', class: "frame" }, this.getSymbols()), this.text && h("div", { key: '83368c83c87bf6e171b996c05dc6a5e4da91e26e', class: "text" }, this.text)));
|
|
26
26
|
}
|
|
27
27
|
showElement(el) {
|
|
28
28
|
el.classList.remove("animate-out");
|
|
@@ -28,7 +28,7 @@ export class ScoutRadioButton extends Mixin(inputMixin) {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
const Tag = this.label?.length ? "label" : "div";
|
|
31
|
-
return (h(Tag, { key: '
|
|
31
|
+
return (h(Tag, { key: '22df090dcbf2f2b4b14b7cad8d34500295045f70' }, h("input", { key: '3bcc5022fa6202fd1fe733c1a8430f7ed1a54cf4', ref: (el) => this.setInputRef(el), id: this.ariaId, type: "radio", value: this.value, name: this.name, class: "radio", "aria-labelledby": this.ariaLabelledby, "aria-disabled": this.disabled, disabled: this.disabled, checked: this.checked, onChange: (event) => {
|
|
32
32
|
this.onInput();
|
|
33
33
|
this.onChange(event);
|
|
34
34
|
}, onBlur: () => this.onBlur(), onInvalid: () => this.onInvalid() }), this.label));
|
|
@@ -21,7 +21,7 @@ export class ScoutSelect extends Mixin(inputMixin) {
|
|
|
21
21
|
disabled = false;
|
|
22
22
|
name;
|
|
23
23
|
render() {
|
|
24
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: '12bf95188935ab6b11101c829970800199b53e9a', class: "select-wrapper" }, h("select", { key: '1c373cc25f6de17b7139baab0af69fd23adf3b85', id: this.ariaId, name: this.name, class: "select", disabled: this.disabled, onChange: () => this.onInput(), onBlur: () => this.onBlur(), onInvalid: () => this.onInvalid() }, h("slot", { key: '99f4430d6433e96c95651acba4ff0068235d1cb8' })), h("span", { key: '4f36424bd7395db03ea9caf10751cd570fc06853', class: "select-icon", style: { "--icon-chevron": `url(${chevronIcon})` }, "aria-hidden": "true" })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "scout-select"; }
|
|
27
27
|
static get encapsulation() { return "scoped"; }
|
|
@@ -18,10 +18,10 @@ export class ScoutStack {
|
|
|
18
18
|
*/
|
|
19
19
|
gapSize = "m";
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '768d68ecb7184d322a181d5917f2eaee3d270c52', style: {
|
|
22
22
|
"--stack-flex-direction": `${this.direction}`,
|
|
23
23
|
"--stack-gap-spacing": `var(--spacing-${GapSizeValues[this.gapSize]})`,
|
|
24
|
-
} }, h("slot", { key: '
|
|
24
|
+
} }, h("slot", { key: '01a68b251dcbc2b46a2902f922fe56c57daf840c' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "scout-stack"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|