@tmorrow/cre8-wc 1.0.25 → 1.0.26
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/lib/components/band/band.js +240 -21
- package/lib/components/band/band.styles.d.ts.map +1 -1
- package/lib/components/button/button.js +2 -2
- package/lib/components/button-group/button-group.js +245 -25
- package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts +0 -5
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +4 -7
- package/lib/components/contexts/form-internals-context.d.ts +30 -0
- package/lib/components/contexts/form-internals-context.d.ts.map +1 -0
- package/lib/components/cre8-form-element.d.ts +98 -24
- package/lib/components/cre8-form-element.d.ts.map +1 -1
- package/lib/components/cre8-form-element.js +221 -22
- package/lib/components/danger-button/danger-button.js +2 -2
- package/lib/components/date-picker/date-picker.js +2 -2
- package/lib/components/field/field.js +1 -1
- package/lib/components/multi-select/multi-select.js +420 -124
- package/lib/components/multi-select/multi-select.styles.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.d.ts +0 -4
- package/lib/components/radio-field-item/radio-field-item.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.js +24 -27
- package/lib/components/select/select.d.ts +6 -10
- package/lib/components/select/select.d.ts.map +1 -1
- package/lib/components/select/select.js +372 -67
- package/lib/components/select/select.styles.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.d.ts +0 -4
- package/lib/components/select-tile/select-tile.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.js +10 -13
- package/lib/components/tabs/tabs.d.ts.map +1 -1
- package/lib/components/tabs/tabs.js +324 -110
- package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/tag/tag.js +2 -2
- package/lib/design-tokens/core/scss/theming/component.scss +1 -1
- package/package.json +8 -2
|
@@ -1,19 +1,237 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
const
|
|
1
|
+
import { css as h, html as c } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as u } from "../cre8-element.js";
|
|
4
|
+
const m = h`/**
|
|
5
|
+
* Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/
|
|
6
|
+
*/
|
|
7
|
+
*,
|
|
8
|
+
::slotted(*),
|
|
9
|
+
*:before,
|
|
10
|
+
*:after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
5
13
|
|
|
6
|
-
|
|
14
|
+
:root {
|
|
15
|
+
--size-base-unit: 0.5rem;
|
|
16
|
+
}
|
|
7
17
|
|
|
18
|
+
/**
|
|
19
|
+
* RTL support for values logical properties can't automatically adjust for
|
|
20
|
+
* 1) Percentage based horizontal translate values need to be flipped
|
|
21
|
+
* 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
|
|
22
|
+
* 3) Inverse items that have 45degs
|
|
23
|
+
*/
|
|
24
|
+
[dir=rtl] {
|
|
25
|
+
--rtlTranslateX: 50%;
|
|
26
|
+
/* 1 */
|
|
27
|
+
--rtlGradientToRight: 270deg;
|
|
28
|
+
/* 2 */
|
|
29
|
+
--rtlRotate45Inverse: -45deg;
|
|
30
|
+
/* 3 */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Visible focus outline for elements on a light background
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Visible focus outline for elements with an error status
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Visible focus outline for elements on a dark background
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Focus state for themes that need a dashed outline for focus
|
|
44
|
+
* state
|
|
45
|
+
**/
|
|
46
|
+
/**
|
|
47
|
+
* Invisible focus outline for elements that need a more visible
|
|
48
|
+
* focus state for high-contrast mode
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Visually hidden from display
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
=======
|
|
55
|
+
Animations
|
|
56
|
+
=======
|
|
57
|
+
*/
|
|
58
|
+
:host {
|
|
59
|
+
--cre8-z-index-1: 1;
|
|
60
|
+
--cre8-z-index-50: 50;
|
|
61
|
+
--cre8-z-index-100: 100;
|
|
62
|
+
--cre8-z-index-200: 200;
|
|
63
|
+
--cre8-z-index-1030: 1030;
|
|
64
|
+
--cre8-anim-fade-quick: 0.35s;
|
|
65
|
+
--cre8-anim-ease: ease;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes fadeIn {
|
|
69
|
+
100% {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
@keyframes slideIn {
|
|
74
|
+
100% {
|
|
75
|
+
transform: translateX(0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@keyframes slideInFwd {
|
|
79
|
+
100% {
|
|
80
|
+
width: 272px;
|
|
81
|
+
height: 272px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@keyframes slideOutRight {
|
|
85
|
+
100% {
|
|
86
|
+
width: 272px;
|
|
87
|
+
height: 272px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@keyframes slideUp {
|
|
91
|
+
100% {
|
|
92
|
+
transform: translateY(0);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (width >= 481px) {
|
|
96
|
+
@keyframes slideInFwd {
|
|
97
|
+
100% {
|
|
98
|
+
width: 417px;
|
|
99
|
+
height: 417px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
@keyframes slideOutRight {
|
|
103
|
+
100% {
|
|
104
|
+
width: 417px;
|
|
105
|
+
height: 417px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
@media (width >= 48rem) {
|
|
110
|
+
@keyframes slideInFwd {
|
|
111
|
+
100% {
|
|
112
|
+
width: 330px;
|
|
113
|
+
height: 330px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
@keyframes slideOutRight {
|
|
117
|
+
100% {
|
|
118
|
+
width: 330px;
|
|
119
|
+
height: 330px;
|
|
120
|
+
transform: translateX(calc(100vw - 45px));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
@media (width >= 60rem) {
|
|
125
|
+
@keyframes slideInFwd {
|
|
126
|
+
100% {
|
|
127
|
+
width: 460px;
|
|
128
|
+
height: 460px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
@keyframes slideOutRight {
|
|
132
|
+
100% {
|
|
133
|
+
width: 460px;
|
|
134
|
+
height: 460px;
|
|
135
|
+
transform: translateX(calc(100vw - 45px));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
@media (width >= 75rem) {
|
|
140
|
+
@keyframes slideInFwd {
|
|
141
|
+
100% {
|
|
142
|
+
width: 592px;
|
|
143
|
+
height: 591px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
@keyframes slideOutRight {
|
|
147
|
+
100% {
|
|
148
|
+
width: 592px;
|
|
149
|
+
height: 591px;
|
|
150
|
+
transform: translateX(calc(100vw - 45px));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media (width >= 87.5rem) {
|
|
155
|
+
@keyframes slideOutRight {
|
|
156
|
+
100% {
|
|
157
|
+
width: 592px;
|
|
158
|
+
height: 591px;
|
|
159
|
+
transform: translateX(calc(100vw - 120px));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
@media (width >= 2200px) {
|
|
164
|
+
@keyframes slideOutRight {
|
|
165
|
+
100% {
|
|
166
|
+
width: 592px;
|
|
167
|
+
height: 591px;
|
|
168
|
+
transform: translateX(calc(100vw - 592px));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
span.ripple {
|
|
173
|
+
position: absolute;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
transform: scale(0);
|
|
176
|
+
animation: ripple 600ms linear;
|
|
177
|
+
background-color: var(--ripple-bg-color);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes ripple {
|
|
181
|
+
to {
|
|
182
|
+
transform: scale(4);
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
:root {
|
|
187
|
+
--size-base-unit: 0.5rem;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* RTL support for values logical properties can't automatically adjust for
|
|
192
|
+
* 1) Percentage based horizontal translate values need to be flipped
|
|
193
|
+
* 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
|
|
194
|
+
* 3) Inverse items that have 45degs
|
|
195
|
+
*/
|
|
196
|
+
[dir=rtl] {
|
|
197
|
+
--rtlTranslateX: 50%;
|
|
198
|
+
/* 1 */
|
|
199
|
+
--rtlGradientToRight: 270deg;
|
|
200
|
+
/* 2 */
|
|
201
|
+
--rtlRotate45Inverse: -45deg;
|
|
202
|
+
/* 3 */
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Visible focus outline for elements on a light background
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* Visible focus outline for elements with an error status
|
|
210
|
+
*/
|
|
211
|
+
/**
|
|
212
|
+
* Visible focus outline for elements on a dark background
|
|
213
|
+
*/
|
|
214
|
+
/**
|
|
215
|
+
* Focus state for themes that need a dashed outline for focus
|
|
216
|
+
* state
|
|
217
|
+
**/
|
|
218
|
+
/**
|
|
219
|
+
* Invisible focus outline for elements that need a more visible
|
|
220
|
+
* focus state for high-contrast mode
|
|
221
|
+
*/
|
|
222
|
+
/**
|
|
223
|
+
* Visually hidden from display
|
|
224
|
+
*/
|
|
8
225
|
/**
|
|
9
226
|
* 1) A container with a background that can house various recipes of Components within
|
|
10
227
|
*/
|
|
11
228
|
.cre8-c-band {
|
|
12
229
|
background: var(--cre8-color-bg-subtle);
|
|
13
|
-
padding:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
230
|
+
padding: 24px 0;
|
|
231
|
+
}
|
|
232
|
+
@media all and (min-width: 1200px) {
|
|
233
|
+
.cre8-c-band {
|
|
234
|
+
padding: 32px 0;
|
|
17
235
|
}
|
|
18
236
|
}
|
|
19
237
|
|
|
@@ -32,32 +250,33 @@ const p = d`@import '../../design-tokens/core/scss/theming/component';
|
|
|
32
250
|
.cre8-c-band--full-height {
|
|
33
251
|
height: 100%;
|
|
34
252
|
}
|
|
253
|
+
/* sourceMappingURL=band.module.css.map */
|
|
35
254
|
`;
|
|
36
|
-
var
|
|
37
|
-
for (var e = void 0,
|
|
38
|
-
(
|
|
39
|
-
return e &&
|
|
255
|
+
var f = Object.defineProperty, d = (s, r, o, p) => {
|
|
256
|
+
for (var e = void 0, a = s.length - 1, n; a >= 0; a--)
|
|
257
|
+
(n = s[a]) && (e = n(r, o, e) || e);
|
|
258
|
+
return e && f(r, o, e), e;
|
|
40
259
|
};
|
|
41
|
-
const
|
|
260
|
+
const i = class i extends u {
|
|
42
261
|
render() {
|
|
43
262
|
const r = this.componentClassNames("cre8-c-band", {
|
|
44
263
|
"cre8-c-band--branded": this.variant === "branded",
|
|
45
264
|
"cre8-c-band--full-height": this.fullHeight === !0
|
|
46
265
|
});
|
|
47
|
-
return
|
|
266
|
+
return c`
|
|
48
267
|
<div class="${r}">
|
|
49
268
|
<slot></slot>
|
|
50
269
|
</div>
|
|
51
270
|
`;
|
|
52
271
|
}
|
|
53
272
|
};
|
|
54
|
-
|
|
55
|
-
let t =
|
|
56
|
-
|
|
57
|
-
|
|
273
|
+
i.styles = [m];
|
|
274
|
+
let t = i;
|
|
275
|
+
d([
|
|
276
|
+
l()
|
|
58
277
|
], t.prototype, "variant");
|
|
59
|
-
|
|
60
|
-
|
|
278
|
+
d([
|
|
279
|
+
l({ type: Boolean, reflect: !0 })
|
|
61
280
|
], t.prototype, "fullHeight");
|
|
62
281
|
customElements.get("cre8-band") === void 0 && customElements.define("cre8-band", t);
|
|
63
282
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"band.styles.d.ts","sourceRoot":"","sources":["../../../components/band/band.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"band.styles.d.ts","sourceRoot":"","sources":["../../../components/band/band.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBA0PX,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -896,11 +896,11 @@ const d = class d extends h {
|
|
|
896
896
|
super(...arguments), this.text = "Button", this.variant = "primary", this.type = "button", this.iconRotateDegree = 0, this.iconPosition = void 0, this.size = "md", this.ariaLive = "assertive";
|
|
897
897
|
}
|
|
898
898
|
formSubmit() {
|
|
899
|
-
const t = this.
|
|
899
|
+
const t = this._internals.form;
|
|
900
900
|
t && t.requestSubmit();
|
|
901
901
|
}
|
|
902
902
|
formReset() {
|
|
903
|
-
const t = this.
|
|
903
|
+
const t = this._internals.form;
|
|
904
904
|
t && t.reset();
|
|
905
905
|
}
|
|
906
906
|
generateIconBefore() {
|
|
@@ -1,12 +1,230 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
const
|
|
1
|
+
import { css as l, html as d } from "lit";
|
|
2
|
+
import { property as u } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as h } from "../cre8-element.js";
|
|
4
|
+
const p = l`/**
|
|
5
|
+
* Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/
|
|
6
|
+
*/
|
|
7
|
+
*,
|
|
8
|
+
::slotted(*),
|
|
9
|
+
*:before,
|
|
10
|
+
*:after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
--size-base-unit: 0.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* RTL support for values logical properties can't automatically adjust for
|
|
20
|
+
* 1) Percentage based horizontal translate values need to be flipped
|
|
21
|
+
* 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
|
|
22
|
+
* 3) Inverse items that have 45degs
|
|
23
|
+
*/
|
|
24
|
+
[dir=rtl] {
|
|
25
|
+
--rtlTranslateX: 50%;
|
|
26
|
+
/* 1 */
|
|
27
|
+
--rtlGradientToRight: 270deg;
|
|
28
|
+
/* 2 */
|
|
29
|
+
--rtlRotate45Inverse: -45deg;
|
|
30
|
+
/* 3 */
|
|
31
|
+
}
|
|
5
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Visible focus outline for elements on a light background
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Visible focus outline for elements with an error status
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Visible focus outline for elements on a dark background
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Focus state for themes that need a dashed outline for focus
|
|
44
|
+
* state
|
|
45
|
+
**/
|
|
46
|
+
/**
|
|
47
|
+
* Invisible focus outline for elements that need a more visible
|
|
48
|
+
* focus state for high-contrast mode
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Visually hidden from display
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
=======
|
|
55
|
+
Animations
|
|
56
|
+
=======
|
|
57
|
+
*/
|
|
58
|
+
:host {
|
|
59
|
+
--cre8-z-index-1: 1;
|
|
60
|
+
--cre8-z-index-50: 50;
|
|
61
|
+
--cre8-z-index-100: 100;
|
|
62
|
+
--cre8-z-index-200: 200;
|
|
63
|
+
--cre8-z-index-1030: 1030;
|
|
64
|
+
--cre8-anim-fade-quick: 0.35s;
|
|
65
|
+
--cre8-anim-ease: ease;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes fadeIn {
|
|
69
|
+
100% {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
@keyframes slideIn {
|
|
74
|
+
100% {
|
|
75
|
+
transform: translateX(0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@keyframes slideInFwd {
|
|
79
|
+
100% {
|
|
80
|
+
width: 272px;
|
|
81
|
+
height: 272px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@keyframes slideOutRight {
|
|
85
|
+
100% {
|
|
86
|
+
width: 272px;
|
|
87
|
+
height: 272px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@keyframes slideUp {
|
|
91
|
+
100% {
|
|
92
|
+
transform: translateY(0);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (width >= 481px) {
|
|
96
|
+
@keyframes slideInFwd {
|
|
97
|
+
100% {
|
|
98
|
+
width: 417px;
|
|
99
|
+
height: 417px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
@keyframes slideOutRight {
|
|
103
|
+
100% {
|
|
104
|
+
width: 417px;
|
|
105
|
+
height: 417px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
@media (width >= 48rem) {
|
|
110
|
+
@keyframes slideInFwd {
|
|
111
|
+
100% {
|
|
112
|
+
width: 330px;
|
|
113
|
+
height: 330px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
@keyframes slideOutRight {
|
|
117
|
+
100% {
|
|
118
|
+
width: 330px;
|
|
119
|
+
height: 330px;
|
|
120
|
+
transform: translateX(calc(100vw - 45px));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
@media (width >= 60rem) {
|
|
125
|
+
@keyframes slideInFwd {
|
|
126
|
+
100% {
|
|
127
|
+
width: 460px;
|
|
128
|
+
height: 460px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
@keyframes slideOutRight {
|
|
132
|
+
100% {
|
|
133
|
+
width: 460px;
|
|
134
|
+
height: 460px;
|
|
135
|
+
transform: translateX(calc(100vw - 45px));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
@media (width >= 75rem) {
|
|
140
|
+
@keyframes slideInFwd {
|
|
141
|
+
100% {
|
|
142
|
+
width: 592px;
|
|
143
|
+
height: 591px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
@keyframes slideOutRight {
|
|
147
|
+
100% {
|
|
148
|
+
width: 592px;
|
|
149
|
+
height: 591px;
|
|
150
|
+
transform: translateX(calc(100vw - 45px));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media (width >= 87.5rem) {
|
|
155
|
+
@keyframes slideOutRight {
|
|
156
|
+
100% {
|
|
157
|
+
width: 592px;
|
|
158
|
+
height: 591px;
|
|
159
|
+
transform: translateX(calc(100vw - 120px));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
@media (width >= 2200px) {
|
|
164
|
+
@keyframes slideOutRight {
|
|
165
|
+
100% {
|
|
166
|
+
width: 592px;
|
|
167
|
+
height: 591px;
|
|
168
|
+
transform: translateX(calc(100vw - 592px));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
span.ripple {
|
|
173
|
+
position: absolute;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
transform: scale(0);
|
|
176
|
+
animation: ripple 600ms linear;
|
|
177
|
+
background-color: var(--ripple-bg-color);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes ripple {
|
|
181
|
+
to {
|
|
182
|
+
transform: scale(4);
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
:root {
|
|
187
|
+
--size-base-unit: 0.5rem;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* RTL support for values logical properties can't automatically adjust for
|
|
192
|
+
* 1) Percentage based horizontal translate values need to be flipped
|
|
193
|
+
* 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
|
|
194
|
+
* 3) Inverse items that have 45degs
|
|
195
|
+
*/
|
|
196
|
+
[dir=rtl] {
|
|
197
|
+
--rtlTranslateX: 50%;
|
|
198
|
+
/* 1 */
|
|
199
|
+
--rtlGradientToRight: 270deg;
|
|
200
|
+
/* 2 */
|
|
201
|
+
--rtlRotate45Inverse: -45deg;
|
|
202
|
+
/* 3 */
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Visible focus outline for elements on a light background
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* Visible focus outline for elements with an error status
|
|
210
|
+
*/
|
|
211
|
+
/**
|
|
212
|
+
* Visible focus outline for elements on a dark background
|
|
213
|
+
*/
|
|
214
|
+
/**
|
|
215
|
+
* Focus state for themes that need a dashed outline for focus
|
|
216
|
+
* state
|
|
217
|
+
**/
|
|
218
|
+
/**
|
|
219
|
+
* Invisible focus outline for elements that need a more visible
|
|
220
|
+
* focus state for high-contrast mode
|
|
221
|
+
*/
|
|
222
|
+
/**
|
|
223
|
+
* Visually hidden from display
|
|
224
|
+
*/
|
|
6
225
|
/*------------------------------------*\
|
|
7
226
|
#BUTTON-GROUP
|
|
8
227
|
\*------------------------------------*/
|
|
9
|
-
|
|
10
228
|
:host {
|
|
11
229
|
display: inline-flex;
|
|
12
230
|
}
|
|
@@ -17,7 +235,7 @@ const u = c`@import '../../design-tokens/core/scss/theming/component';
|
|
|
17
235
|
.cre8-c-button-group {
|
|
18
236
|
display: flex;
|
|
19
237
|
flex-wrap: wrap;
|
|
20
|
-
gap:
|
|
238
|
+
gap: 16px;
|
|
21
239
|
}
|
|
22
240
|
|
|
23
241
|
/**
|
|
@@ -25,38 +243,40 @@ const u = c`@import '../../design-tokens/core/scss/theming/component';
|
|
|
25
243
|
*/
|
|
26
244
|
.cre8-c-button-group--responsive-full-width {
|
|
27
245
|
flex-direction: column;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
246
|
+
--cre8-button-width: 100%;
|
|
247
|
+
}
|
|
248
|
+
@media all and (min-width: 768px) {
|
|
249
|
+
.cre8-c-button-group--responsive-full-width {
|
|
31
250
|
flex-direction: row;
|
|
32
251
|
--cre8-button-width: auto;
|
|
33
|
-
|
|
252
|
+
}
|
|
34
253
|
}
|
|
254
|
+
/* sourceMappingURL=button-group.module.css.map */
|
|
35
255
|
`;
|
|
36
|
-
var
|
|
37
|
-
for (var
|
|
38
|
-
(
|
|
39
|
-
return
|
|
256
|
+
var c = Object.defineProperty, f = (o, t, a, m) => {
|
|
257
|
+
for (var e = void 0, i = o.length - 1, n; i >= 0; i--)
|
|
258
|
+
(n = o[i]) && (e = n(t, a, e) || e);
|
|
259
|
+
return e && c(t, a, e), e;
|
|
40
260
|
};
|
|
41
|
-
const s = class s extends
|
|
261
|
+
const s = class s extends h {
|
|
42
262
|
render() {
|
|
43
|
-
const
|
|
263
|
+
const t = this.componentClassNames("cre8-c-button-group", {
|
|
44
264
|
"cre8-c-button-group--responsive-full-width": this.orientation === "responsive-full-width"
|
|
45
265
|
});
|
|
46
|
-
return
|
|
47
|
-
<div class="${
|
|
266
|
+
return d`
|
|
267
|
+
<div class="${t}">
|
|
48
268
|
<slot></slot>
|
|
49
269
|
</div>
|
|
50
270
|
`;
|
|
51
271
|
}
|
|
52
272
|
};
|
|
53
|
-
s.styles = [
|
|
54
|
-
let
|
|
273
|
+
s.styles = [p];
|
|
274
|
+
let r = s;
|
|
55
275
|
f([
|
|
56
|
-
|
|
57
|
-
],
|
|
58
|
-
customElements.get("cre8-button-group") === void 0 && customElements.define("cre8-button-group",
|
|
276
|
+
u()
|
|
277
|
+
], r.prototype, "orientation");
|
|
278
|
+
customElements.get("cre8-button-group") === void 0 && customElements.define("cre8-button-group", r);
|
|
59
279
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
280
|
+
r as Cre8ButtonGroup,
|
|
281
|
+
r as default
|
|
62
282
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../components/button-group/button-group.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../components/button-group/button-group.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBA2PX,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -85,11 +85,6 @@ export declare class Cre8CheckboxFieldItem extends Cre8FormElement {
|
|
|
85
85
|
* Additional aria-describedby connection to id for additional success and error notes to be accessible
|
|
86
86
|
*/
|
|
87
87
|
validationAriaDescribedBy?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Checkbox name
|
|
90
|
-
* @attr {string}
|
|
91
|
-
*/
|
|
92
|
-
name?: string;
|
|
93
88
|
/**
|
|
94
89
|
* Required property
|
|
95
90
|
* @attr {boolean}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-field-item.d.ts","sourceRoot":"","sources":["../../../components/checkbox-field-item/checkbox-field-item.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AACtB,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,cAAc;IAE3B,MAAM,CAAC,MAAM,4BAAY;
|
|
1
|
+
{"version":3,"file":"checkbox-field-item.d.ts","sourceRoot":"","sources":["../../../components/checkbox-field-item/checkbox-field-item.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AACtB,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,cAAc;IAE3B,MAAM,CAAC,MAAM,4BAAY;IAEzB;;OAEG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IAEH,SAAS,EAAE,MAAM,CAAW;IAE5B;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IAEH,WAAW,EAAE,MAAM,CAAa;IAEhC;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IAEH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IAEH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAInC;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IAEH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,KAAK,EAAG,gBAAgB,CAAC;IAEzB,UAAmB,YAAY,EAAE,OAAO,CAAC;IAEzC;;;;;;;MAOE;IAEF,iBAAiB;IAMjB;;OAEG;IACH,OAAO,CAAC,OAAO;IAQf;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAInB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAKrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;OAMG;IACH,iBAAiB,IAAI,IAAI;IAOzB;;;OAGG;IACH,YAAY;IAKZ;;OAEG;IACH,cAAc;IAUd;;;;;;;OAOG;IACH,aAAa,IAAI,MAAM;IASvB;;;;OAIG;IACH,2BAA2B;IA0B3B,MAAM;CAqCT;AAMD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,0BAA0B,EAAE,qBAAqB,CAAC;KACrD;CACJ;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -205,14 +205,14 @@ const h = class h extends x {
|
|
|
205
205
|
* Otherwise, don't provide a value for the checkbox data array
|
|
206
206
|
*/
|
|
207
207
|
setFormData() {
|
|
208
|
-
return this.checked ? this.
|
|
208
|
+
return this.checked ? this._internals.setFormValue(this.value || "on") : this._internals.setFormValue(null);
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* Handle on checkbox change
|
|
212
212
|
* 1) On change of the checkbox input, if `checked` is true, then set it to false and vice versa.
|
|
213
213
|
*/
|
|
214
214
|
_clickHandler() {
|
|
215
|
-
return this.checked = !this.checked, this.checked ? this.
|
|
215
|
+
return this.checked = !this.checked, this.checked ? this._internals.setFormValue(this.value || "on") : this._internals.setFormValue(null);
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
218
|
* Handle On Change
|
|
@@ -221,7 +221,7 @@ const h = class h extends x {
|
|
|
221
221
|
*/
|
|
222
222
|
_handleOnChange(t) {
|
|
223
223
|
const s = t.target;
|
|
224
|
-
this.value = s.value, this.
|
|
224
|
+
this.value = s.value, this._internals.setFormValue(this.value);
|
|
225
225
|
const b = new CustomEvent("change", {
|
|
226
226
|
detail: {
|
|
227
227
|
name: this.name,
|
|
@@ -300,7 +300,7 @@ const h = class h extends x {
|
|
|
300
300
|
type="checkbox"
|
|
301
301
|
@input=${this._clickHandler}
|
|
302
302
|
id=${this.fieldId}
|
|
303
|
-
name=${this.name}
|
|
303
|
+
name=${this.name ?? void 0}
|
|
304
304
|
.value=${this.value}
|
|
305
305
|
required=${o(this.required)}
|
|
306
306
|
aria-invalid=${this.required ? !!this.isError : o(this.isError)}
|
|
@@ -363,9 +363,6 @@ i([
|
|
|
363
363
|
i([
|
|
364
364
|
c()
|
|
365
365
|
], e.prototype, "validationAriaDescribedBy");
|
|
366
|
-
i([
|
|
367
|
-
c()
|
|
368
|
-
], e.prototype, "name");
|
|
369
366
|
i([
|
|
370
367
|
c({ type: Boolean, reflect: !0 })
|
|
371
368
|
], e.prototype, "required");
|