@roadtrip/components 3.20.4 → 3.22.0
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/loader.cjs.js +1 -1
- package/dist/cjs/road-badge_14.cjs.entry.js +10 -4
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-range.cjs.entry.js +37 -25
- package/dist/cjs/road-range.cjs.entry.js.map +1 -1
- package/dist/cjs/road-select.cjs.entry.js +19 -14
- package/dist/cjs/road-select.cjs.entry.js.map +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/drawer/drawer.css +4 -0
- package/dist/collection/components/drawer/drawer.js +29 -2
- package/dist/collection/components/drawer/drawer.js.map +1 -1
- package/dist/collection/components/drawer/drawer.stories.js +8 -0
- package/dist/collection/components/input/input.css +5 -0
- package/dist/collection/components/item/item.css +5 -3
- package/dist/collection/components/item/item.stories.js +8 -0
- package/dist/collection/components/range/range.css +28 -8
- package/dist/collection/components/range/range.js +56 -26
- package/dist/collection/components/range/range.js.map +1 -1
- package/dist/collection/components/range/range.stories.js +5 -1
- package/dist/collection/components/select/select.js +22 -17
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-badge_14.entry.js +10 -4
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-range.entry.js +37 -25
- package/dist/esm/road-range.entry.js.map +1 -1
- package/dist/esm/road-select.entry.js +19 -14
- package/dist/esm/road-select.entry.js.map +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/html.html-data.json +8 -0
- package/dist/roadtrip/p-18c7fb2f.entry.js +2 -0
- package/dist/roadtrip/p-18c7fb2f.entry.js.map +1 -0
- package/dist/roadtrip/{p-f3a88dc3.entry.js → p-38099006.entry.js} +2 -2
- package/dist/roadtrip/p-38099006.entry.js.map +1 -0
- package/dist/roadtrip/p-648aa41f.entry.js +2 -0
- package/dist/roadtrip/p-648aa41f.entry.js.map +1 -0
- package/dist/roadtrip/roadtrip.css +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/drawer/drawer.d.ts +10 -1
- package/dist/types/components/range/range.d.ts +7 -3
- package/dist/types/components/select/select.d.ts +2 -1
- package/dist/types/components.d.ts +19 -3
- package/hydrate/index.js +74 -45
- package/package.json +1 -1
- package/dist/roadtrip/p-418ca731.entry.js +0 -2
- package/dist/roadtrip/p-418ca731.entry.js.map +0 -1
- package/dist/roadtrip/p-d6425d60.entry.js +0 -2
- package/dist/roadtrip/p-d6425d60.entry.js.map +0 -1
- package/dist/roadtrip/p-f3a88dc3.entry.js.map +0 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
/**
|
|
14
14
|
* @prop --border-radius: Radius of the item border
|
|
15
15
|
* @prop --background-color: Background of the item
|
|
16
|
+
* @prop --border-color: Border of the item button
|
|
16
17
|
* @prop --min-height: Minimum height of the item
|
|
17
18
|
* @prop --padding-left: Padding left of the native element
|
|
18
19
|
* @prop --inner-padding: inner padding of the item
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
:host {
|
|
23
24
|
--border-radius: var(--road-spacing-02);
|
|
24
25
|
--background-color: var(--road-surface);
|
|
26
|
+
--border-color: var(--road-outline-variant);
|
|
25
27
|
--detail-color: var(--road-icon);
|
|
26
28
|
|
|
27
29
|
position: relative;
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
color: var(--road-on-surface);
|
|
67
69
|
text-align: left;
|
|
68
70
|
background-color: var(--background-color);
|
|
69
|
-
border: 2px solid
|
|
71
|
+
border: 2px solid transparent;
|
|
70
72
|
outline: none;
|
|
71
73
|
transition: background 0.15s ease-in-out;
|
|
72
74
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
*/
|
|
78
80
|
|
|
79
81
|
.item-active {
|
|
80
|
-
border: 2px solid var(--
|
|
82
|
+
border: 2px solid var(--border-color);
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
/**
|
|
@@ -86,7 +88,7 @@
|
|
|
86
88
|
|
|
87
89
|
button.item-native:not(:disabled):not(.item-active):hover,
|
|
88
90
|
button.item-native:not(:disabled):not(.item-active):focus {
|
|
89
|
-
border: 2px solid var(--
|
|
91
|
+
border: 2px solid var(--border-color);
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -130,6 +130,14 @@ Playground.argTypes = {
|
|
|
130
130
|
type: null,
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
|
+
'--border-color': {
|
|
134
|
+
table: {
|
|
135
|
+
defaultValue: { summary: 'var(--road-outline-variant)' },
|
|
136
|
+
},
|
|
137
|
+
control: {
|
|
138
|
+
type: null,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
133
141
|
'--detail-color': {
|
|
134
142
|
table: {
|
|
135
143
|
defaultValue: { summary: 'var(--road-grey-900)' },
|
|
@@ -96,19 +96,23 @@
|
|
|
96
96
|
/* PROGRESS
|
|
97
97
|
-------------------- */
|
|
98
98
|
|
|
99
|
-
.form-range-progress::after {
|
|
99
|
+
.form-range-progress.sc-road-range::after {
|
|
100
100
|
position: absolute;
|
|
101
101
|
top: 0;
|
|
102
102
|
right: 0;
|
|
103
103
|
left: 0;
|
|
104
104
|
display: block;
|
|
105
|
-
width: calc((var(--value) * 100%) / var(--max));
|
|
105
|
+
width: calc(((var(--value) - var(--min)) * 100%) / (var(--max) - var(--min)));
|
|
106
106
|
height: 0.5rem;
|
|
107
107
|
content: "";
|
|
108
108
|
background: var(--road-primary);
|
|
109
109
|
border-radius: 1.125rem;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
:host(.disabled) .form-range-progress.sc-road-range::after {
|
|
113
|
+
background: var(--road-surface-disabled);
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
/* CURSOR
|
|
113
117
|
-------------------- */
|
|
114
118
|
|
|
@@ -140,20 +144,36 @@
|
|
|
140
144
|
appearance: none;
|
|
141
145
|
}
|
|
142
146
|
|
|
147
|
+
/* Styles for disabled state */
|
|
148
|
+
:host(.disabled) .form-range-input::-webkit-slider-thumb,
|
|
149
|
+
:host(.disabled) .form-range-input::-moz-range-thumb {
|
|
150
|
+
cursor: not-allowed;
|
|
151
|
+
background: var(--road-on-surface-disabled);
|
|
152
|
+
box-shadow: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host(.disabled) .form-range-input {
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host(.disabled) {
|
|
160
|
+
cursor: not-allowed;
|
|
161
|
+
}
|
|
162
|
+
|
|
143
163
|
/**
|
|
144
164
|
* Focus state
|
|
145
165
|
*/
|
|
146
166
|
|
|
147
|
-
:host(.focus-visible) .form-range-input::-webkit-slider-thumb,
|
|
148
|
-
:host(:active) .form-range-input::-webkit-slider-thumb,
|
|
149
|
-
:host(:focus) .form-range-input::-webkit-slider-thumb {
|
|
167
|
+
:host(:not(.disabled).focus-visible) .form-range-input::-webkit-slider-thumb,
|
|
168
|
+
:host(:not(.disabled):active) .form-range-input::-webkit-slider-thumb,
|
|
169
|
+
:host(:not(.disabled):focus) .form-range-input::-webkit-slider-thumb {
|
|
150
170
|
background: var(--road-input-surface-variant);
|
|
151
171
|
border: 0.5rem solid var(--road-grey-100-new);
|
|
152
172
|
}
|
|
153
173
|
|
|
154
|
-
:host(.focus-visible) .form-range-input::-moz-range-thumb,
|
|
155
|
-
:host(:active) .form-range-input::-moz-range-thumb,
|
|
156
|
-
:host(:focus) .form-range-input::-moz-range-thumb {
|
|
174
|
+
:host(:not(.disabled).focus-visible) .form-range-input::-moz-range-thumb,
|
|
175
|
+
:host(:not(.disabled):active) .form-range-input::-moz-range-thumb,
|
|
176
|
+
:host(:not(.disabled):focus) .form-range-input::-moz-range-thumb {
|
|
157
177
|
background: var(--road-input-surface-variant);
|
|
158
178
|
border: 0.5rem solid var(--road-grey-100-new);
|
|
159
179
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { navigationAddLessSolid, navigationAddMoreSolid } from "../../../icons";
|
|
3
3
|
/**
|
|
4
4
|
* @slot datalist - list of labels. also put show-labels="true" and max="10" for this exemple
|
|
@@ -21,61 +21,73 @@ export class Range {
|
|
|
21
21
|
this.onInput = (ev) => {
|
|
22
22
|
const input = ev.target;
|
|
23
23
|
if (input) {
|
|
24
|
-
this.value = input.value ||
|
|
24
|
+
this.value = input.value || "";
|
|
25
25
|
}
|
|
26
26
|
if (this.value !== null && this.value !== undefined) {
|
|
27
|
-
this.el.style.setProperty(
|
|
27
|
+
this.el.style.setProperty("--value", `${this.value}`);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
this.rangeId = `road-range-${rangeIds++}`;
|
|
31
|
-
this.value =
|
|
31
|
+
this.value = "";
|
|
32
32
|
this.min = undefined;
|
|
33
33
|
this.max = undefined;
|
|
34
34
|
this.step = undefined;
|
|
35
35
|
this.showValue = false;
|
|
36
36
|
this.showTick = false;
|
|
37
37
|
this.showLabels = false;
|
|
38
|
+
this.disabled = false;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* Update the native input element when the value changes
|
|
41
42
|
*/
|
|
42
43
|
valueChanged() {
|
|
43
|
-
this.roadchange.emit({
|
|
44
|
-
|
|
44
|
+
this.roadchange.emit({
|
|
45
|
+
value: this.value == null ? this.value : this.value.toString(),
|
|
46
|
+
});
|
|
47
|
+
this.roadChange.emit({
|
|
48
|
+
value: this.value == null ? this.value : this.value.toString(),
|
|
49
|
+
});
|
|
45
50
|
}
|
|
46
51
|
getValue() {
|
|
47
|
-
return typeof this.value ===
|
|
52
|
+
return typeof this.value === "number"
|
|
48
53
|
? this.value.toString()
|
|
49
|
-
: (this.value ||
|
|
54
|
+
: (this.value || "").toString();
|
|
50
55
|
}
|
|
51
56
|
handleFocus() {
|
|
52
|
-
this.el.classList.add(
|
|
57
|
+
this.el.classList.add("focus-visible");
|
|
53
58
|
}
|
|
54
59
|
handleBlur() {
|
|
55
|
-
this.el.classList.remove(
|
|
60
|
+
this.el.classList.remove("focus-visible");
|
|
56
61
|
}
|
|
57
62
|
componentDidLoad() {
|
|
58
63
|
// Cacher le label pour accessibilité
|
|
59
|
-
const label = this.el.querySelector(
|
|
60
|
-
const input = this.el.querySelector(
|
|
64
|
+
const label = this.el.querySelector(".form-label");
|
|
65
|
+
const input = this.el.querySelector(".form-control.sc-road-input");
|
|
61
66
|
if (label) {
|
|
62
|
-
label.style.clip =
|
|
63
|
-
label.style.border =
|
|
64
|
-
label.style.height =
|
|
65
|
-
label.style.left =
|
|
66
|
-
label.style.margin =
|
|
67
|
-
label.style.overflow =
|
|
68
|
-
label.style.padding =
|
|
69
|
-
label.style.position =
|
|
70
|
-
label.style.top =
|
|
71
|
-
label.style.width =
|
|
72
|
-
input.style.padding =
|
|
67
|
+
label.style.clip = "rect(0 0 0 0)";
|
|
68
|
+
label.style.border = "0";
|
|
69
|
+
label.style.height = "1px";
|
|
70
|
+
label.style.left = "0";
|
|
71
|
+
label.style.margin = "-1px";
|
|
72
|
+
label.style.overflow = "hidden";
|
|
73
|
+
label.style.padding = "0";
|
|
74
|
+
label.style.position = "absolute";
|
|
75
|
+
label.style.top = "0";
|
|
76
|
+
label.style.width = "1px";
|
|
77
|
+
input.style.padding = "0 1rem 0";
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
render() {
|
|
76
81
|
const value = this.getValue();
|
|
77
|
-
const datalist = this.showLabels !== undefined ? `tickmarks` :
|
|
78
|
-
return (h(Host, { tabindex: "0" }, h("div", { class: "form-group d-flex align-items-end" }, this.showTick && h("road-icon", { icon: navigationAddLessSolid, class: "mr-8", size:
|
|
82
|
+
const datalist = this.showLabels !== undefined ? `tickmarks` : "";
|
|
83
|
+
return (h(Host, { tabindex: "0", class: { disabled: this.disabled } }, h("div", { class: "form-group d-flex align-items-end" }, this.showTick && (h("road-icon", { icon: navigationAddLessSolid, class: "mr-8", size: "sm" })), h("div", { class: "form-range", style: {
|
|
84
|
+
"--min": this.min,
|
|
85
|
+
"--max": this.max,
|
|
86
|
+
"--value": value,
|
|
87
|
+
"--background-color": this.disabled
|
|
88
|
+
? "var(--road-surface-disabled)"
|
|
89
|
+
: "initial",
|
|
90
|
+
} }, this.showValue && h("output", null), this.showLabels && h("slot", { name: "datalist" }), h("input", { type: "range", class: "form-range-input", id: this.rangeId, min: this.min, max: this.max, value: value, onInput: this.onInput, list: datalist, "aria-label": "Valeur", tabindex: "0", disabled: this.disabled }), h("label", { class: "form-range-label" }, "Valeur"), h("div", { class: "form-range-progress" })), this.showTick && (h("road-icon", { icon: navigationAddMoreSolid, class: "ml-8", size: "sm" })))));
|
|
79
91
|
}
|
|
80
92
|
static get is() { return "road-range"; }
|
|
81
93
|
static get encapsulation() { return "scoped"; }
|
|
@@ -125,7 +137,7 @@ export class Range {
|
|
|
125
137
|
},
|
|
126
138
|
"attribute": "value",
|
|
127
139
|
"reflect": false,
|
|
128
|
-
"defaultValue": "
|
|
140
|
+
"defaultValue": "\"\""
|
|
129
141
|
},
|
|
130
142
|
"min": {
|
|
131
143
|
"type": "string",
|
|
@@ -231,6 +243,24 @@ export class Range {
|
|
|
231
243
|
"attribute": "show-labels",
|
|
232
244
|
"reflect": false,
|
|
233
245
|
"defaultValue": "false"
|
|
246
|
+
},
|
|
247
|
+
"disabled": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"complexType": {
|
|
251
|
+
"original": "boolean",
|
|
252
|
+
"resolved": "boolean",
|
|
253
|
+
"references": {}
|
|
254
|
+
},
|
|
255
|
+
"required": false,
|
|
256
|
+
"optional": false,
|
|
257
|
+
"docs": {
|
|
258
|
+
"tags": [],
|
|
259
|
+
"text": "If true, the range will be disabled"
|
|
260
|
+
},
|
|
261
|
+
"attribute": "disabled",
|
|
262
|
+
"reflect": false,
|
|
263
|
+
"defaultValue": "false"
|
|
234
264
|
}
|
|
235
265
|
};
|
|
236
266
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../src/components/range/range.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../src/components/range/range.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,IAAI,EAEJ,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEhF;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,KAAK;;IA+ER,YAAO,GAAG,CAAC,EAAS,EAAE,EAAE;MAC9B,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;MACnD,IAAI,KAAK,EAAE;QACT,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;OAChC;MACD,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;QACnD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;OACvD;IACH,CAAC,CAAC;mBAjFwB,cAAc,QAAQ,EAAE,EAAE;iBAKM,EAAE;;;;qBAqB/B,KAAK;oBAKN,KAAK;sBAKH,KAAK;oBAKP,KAAK;;EAEjC;;KAEG;EAEO,YAAY;IACpB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;MACnB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CA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,CAAC,GAAG,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,QAAQ,gBACH,QAAQ,EACnB,QAAQ,EAAC,GAAG,EACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;UACF,aAAO,KAAK,EAAC,kBAAkB,aAAe;UAC9C,WAAK,KAAK,EAAC,qBAAqB,GAAO,CACnC;QACL,IAAI,CAAC,QAAQ,IAAI,CAChB,iBACE,IAAI,EAAE,sBAAsB,EAC5B,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,IAAI,GACE,CACd,CACG,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n h,\n Element,\n Prop,\n Event,\n Host,\n EventEmitter,\n Watch,\n Listen,\n} from \"@stencil/core\";\nimport { navigationAddLessSolid, navigationAddMoreSolid } from \"../../../icons\";\n\n/**\n * @slot datalist - list of labels. also put show-labels=\"true\" and max=\"10\" for this exemple\n * `<datalist id=\"tickmarks\" slot=\"datalist\" class=\"tickmarks\">`\n `<option value=\"0\" label=\"0%\"></option>`\n `<option value=\"10\" label=\"10%\"></option>`\n `<option value=\"20\" label=\"20%\"></option>`\n `<option value=\"30\" label=\"30%\"></option>`\n `<option value=\"40\" label=\"40%\"></option>`\n `<option value=\"50\" label=\"50%\"></option>`\n `<option value=\"60\" label=\"60%\"></option>`\n `<option value=\"70\" label=\"70%\"></option>`\n `<option value=\"80\" label=\"80%\"></option>`\n `<option value=\"90\" label=\"90%\"></option>`\n `<option value=\"100\" label=\"100%\"></option>`\n `</datalist>`\n */\n\n@Component({\n tag: \"road-range\",\n styleUrl: \"range.css\",\n scoped: true,\n})\nexport class Range {\n @Element() el!: HTMLRoadRangeElement;\n\n /**\n * The id of range\n */\n @Prop() rangeId: string = `road-range-${rangeIds++}`;\n\n /**\n * The value of the range.\n */\n @Prop({ mutable: true }) value?: string | number | null = \"\";\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min!: string;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max!: string;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * Display the current value of the range\n */\n @Prop() showValue: boolean = false;\n\n /**\n * Display Tick of the range\n */\n @Prop() showTick: boolean = false;\n\n /**\n * Display labels of the range\n */\n @Prop() showLabels: boolean = false;\n\n /**\n * If true, the range will be disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Update the native input element when the value changes\n */\n @Watch(\"value\")\n protected valueChanged() {\n this.roadchange.emit({\n value: this.value == null ? this.value : this.value.toString(),\n });\n this.roadChange.emit({\n value: this.value == null ? this.value : this.value.toString(),\n });\n }\n\n /**\n * Emitted when the value has changed.\n */\n @Event() roadchange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n private getValue(): string {\n return typeof this.value === \"number\"\n ? this.value.toString()\n : (this.value || \"\").toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || \"\";\n }\n if (this.value !== null && this.value !== undefined) {\n this.el.style.setProperty(\"--value\", `${this.value}`);\n }\n };\n\n @Listen(\"focus\", { capture: true })\n handleFocus() {\n this.el.classList.add(\"focus-visible\");\n }\n\n @Listen(\"blur\", { capture: true })\n handleBlur() {\n this.el.classList.remove(\"focus-visible\");\n }\n\n componentDidLoad() {\n // Cacher le label pour accessibilité\n\n const label = this.el.querySelector(\".form-label\") as HTMLElement;\n const input = this.el.querySelector(\n \".form-control.sc-road-input\"\n ) as HTMLElement;\n if (label) {\n label.style.clip = \"rect(0 0 0 0)\";\n label.style.border = \"0\";\n label.style.height = \"1px\";\n label.style.left = \"0\";\n label.style.margin = \"-1px\";\n label.style.overflow = \"hidden\";\n label.style.padding = \"0\";\n label.style.position = \"absolute\";\n label.style.top = \"0\";\n label.style.width = \"1px\";\n\n input.style.padding = \"0 1rem 0\";\n }\n }\n\n render() {\n const value = this.getValue();\n const datalist = this.showLabels !== undefined ? `tickmarks` : \"\";\n\n return (\n <Host tabindex=\"0\" class={{ disabled: this.disabled }}>\n <div class=\"form-group d-flex align-items-end\">\n {this.showTick && (\n <road-icon\n icon={navigationAddLessSolid}\n class=\"mr-8\"\n size=\"sm\"\n ></road-icon>\n )}\n <div\n class=\"form-range\"\n style={{\n \"--min\": this.min,\n \"--max\": this.max,\n \"--value\": value,\n \"--background-color\": this.disabled\n ? \"var(--road-surface-disabled)\"\n : \"initial\",\n }}\n >\n {this.showValue && <output></output>}\n {this.showLabels && <slot name=\"datalist\" />}\n <input\n type=\"range\"\n class=\"form-range-input\"\n id={this.rangeId}\n min={this.min}\n max={this.max}\n value={value}\n onInput={this.onInput}\n list={datalist}\n aria-label=\"Valeur\"\n tabindex=\"0\"\n disabled={this.disabled}\n />\n <label class=\"form-range-label\">Valeur</label>\n <div class=\"form-range-progress\"></div>\n </div>\n {this.showTick && (\n <road-icon\n icon={navigationAddMoreSolid}\n class=\"ml-8\"\n size=\"sm\"\n ></road-icon>\n )}\n </div>\n </Host>\n );\n }\n}\n\nlet rangeIds = 0;\n"]}
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
type: null,
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
+
disabled: {
|
|
43
|
+
control: 'boolean',
|
|
44
|
+
},
|
|
42
45
|
},
|
|
43
46
|
args: {
|
|
44
47
|
min: 0,
|
|
@@ -49,6 +52,7 @@ export default {
|
|
|
49
52
|
'show-tick': null,
|
|
50
53
|
'show-labels': null,
|
|
51
54
|
datalist: '',
|
|
55
|
+
disabled: null,
|
|
52
56
|
},
|
|
53
57
|
};
|
|
54
58
|
|
|
@@ -61,10 +65,10 @@ export const Playground = (args) => html`
|
|
|
61
65
|
show-value="${ifDefined(args['show-value'])}"
|
|
62
66
|
show-tick="${ifDefined(args['show-tick'])}"
|
|
63
67
|
show-labels="${ifDefined(args['show-labels'])}"
|
|
68
|
+
disabled="${ifDefined(args.disabled)}"
|
|
64
69
|
@roadchange=${event => args.roadchange(event.detail.value)}
|
|
65
70
|
class="d-flex align-items-end"
|
|
66
71
|
>
|
|
67
72
|
${unsafeHTML(args.datalist)}
|
|
68
73
|
</road-range>
|
|
69
|
-
|
|
70
74
|
`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Host, h
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class Select {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.onChange = (ev) => {
|
|
5
5
|
const select = ev.target;
|
|
6
6
|
if (select) {
|
|
7
|
-
this.value = select.value ||
|
|
7
|
+
this.value = select.value || null;
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
this.onBlur = () => {
|
|
@@ -28,6 +28,12 @@ export class Select {
|
|
|
28
28
|
this.value = undefined;
|
|
29
29
|
}
|
|
30
30
|
valueChanged() {
|
|
31
|
+
if (this.value === null) {
|
|
32
|
+
this.resetSelection();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.addSelected();
|
|
36
|
+
}
|
|
31
37
|
this.roadchange.emit({
|
|
32
38
|
value: this.value,
|
|
33
39
|
});
|
|
@@ -36,32 +42,31 @@ export class Select {
|
|
|
36
42
|
});
|
|
37
43
|
}
|
|
38
44
|
componentWillLoad() {
|
|
39
|
-
if (this.value) {
|
|
45
|
+
if (this.value === null) {
|
|
46
|
+
this.resetSelection();
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
40
49
|
this.addSelected();
|
|
41
50
|
}
|
|
42
51
|
}
|
|
43
52
|
addSelected() {
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
// Désélection de toutes les options
|
|
54
|
+
this.options.forEach(option => option.selected = false);
|
|
55
|
+
// Sélection de la nouvelle option si elle correspond à la valeur actuelle
|
|
46
56
|
const selectedOption = this.options.find(option => option.value == this.value);
|
|
47
|
-
// Recherche de l'option actuellement sélectionnée
|
|
48
|
-
const selectedOption2 = this.options.find(option => option.selected);
|
|
49
|
-
// Désélection de l'option actuellement sélectionnée
|
|
50
|
-
if (selectedOption2) {
|
|
51
|
-
selectedOption2.selected = false;
|
|
52
|
-
}
|
|
53
|
-
// Sélection de la nouvelle option
|
|
54
57
|
if (selectedOption) {
|
|
55
58
|
selectedOption.selected = true;
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
}
|
|
61
|
+
resetSelection() {
|
|
62
|
+
this.value = null;
|
|
63
|
+
this.options.forEach(option => option.selected = false);
|
|
59
64
|
}
|
|
60
65
|
render() {
|
|
61
66
|
const labelId = this.selectId + '-label';
|
|
62
67
|
const hasValueClass = this.value && this.value !== '' ? 'has-value' : '';
|
|
63
68
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
64
|
-
return (h(Host, { class: this.sizes && `select-${this.sizes}` }, h("select", { class: `form-select ${hasValueClass} ${isInvalidClass}`, id: this.selectId, "aria-disabled": this.disabled ? 'true' : null, autoFocus: this.autofocus, disabled: this.disabled, name: this.name, required: this.required, size: this.size, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }, h("option", { selected:
|
|
69
|
+
return (h(Host, { class: this.sizes && `select-${this.sizes}` }, h("select", { class: `form-select ${hasValueClass} ${isInvalidClass}`, id: this.selectId, "aria-disabled": this.disabled ? 'true' : null, autoFocus: this.autofocus, disabled: this.disabled, name: this.name, required: this.required, size: this.size, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }, h("option", { selected: !this.value, disabled: true, hidden: true, style: { display: 'none' }, value: "" }), this.options && this.options.map(option => (h("option", { value: option.value, selected: this.value !== null && option.value == this.value }, option.label)))), h("label", { class: "form-select-label", id: labelId, htmlFor: this.selectId }, this.label), this.error && this.error !== '' && h("p", { class: "invalid-feedback" }, this.error)));
|
|
65
70
|
}
|
|
66
71
|
static get is() { return "road-select"; }
|
|
67
72
|
static get encapsulation() { return "scoped"; }
|
|
@@ -290,7 +295,7 @@ export class Select {
|
|
|
290
295
|
"text": "Emitted when the value has changed."
|
|
291
296
|
},
|
|
292
297
|
"complexType": {
|
|
293
|
-
"original": "{\n value: string | undefined | null
|
|
298
|
+
"original": "{\n value: string | undefined | null;\n }",
|
|
294
299
|
"resolved": "{ value: string | null | undefined; }",
|
|
295
300
|
"references": {}
|
|
296
301
|
}
|
|
@@ -308,7 +313,7 @@ export class Select {
|
|
|
308
313
|
"text": ""
|
|
309
314
|
},
|
|
310
315
|
"complexType": {
|
|
311
|
-
"original": "{\n value: string | undefined | null
|
|
316
|
+
"original": "{\n value: string | undefined | null;\n }",
|
|
312
317
|
"resolved": "{ value: string | null | undefined; }",
|
|
313
318
|
"references": {}
|
|
314
319
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,MAAM;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF;AAED,IAAI,SAAS,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'road-select',\n styleUrl: 'select.css',\n scoped: true,\n})\nexport class Select {\n\n /**\n * The id of select\n */\n @Prop() selectId: string = `road-select-${selectIds++}`;\n\n /**\n * List of options of the select\n */\n @Prop() options: Array<{\n value: string | number;\n label: string;\n selected?: boolean;\n }> = [];\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required: boolean = false;\n\n /**\n * If the control is presented as a scrolling list box (e.g. when multiple is specified),\n * this attribute represents the number of rows in the list that should be visible at one time.\n */\n @Prop() size: number = 0;\n\n /**\n * The sizes of the input.\n */\n @Prop() sizes: 'md' | 'lg' | 'xl' = 'xl';\n\n /**\n * Label for the field\n */\n @Prop() label: string = `${this.selectId}-label`;\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * the value of the select.\n */\n @Prop({ mutable: true }) value?: any | null;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() roadchange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() roadfocus!: EventEmitter<void>;\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() roadblur!: EventEmitter<void>;\n /** @internal */\n @Event() roadBlur!: EventEmitter<void>;\n\n @Watch('value')\n valueChanged() {\n if (this.value === null) {\n this.resetSelection();\n } else {\n this.addSelected();\n }\n\n this.roadchange.emit({\n value: this.value,\n });\n this.roadChange.emit({\n value: this.value,\n });\n }\n\n componentWillLoad() {\n if (this.value === null) {\n this.resetSelection();\n } else {\n this.addSelected();\n }\n }\n\n addSelected() {\n // Désélection de toutes les options\n this.options.forEach(option => option.selected = false);\n\n // Sélection de la nouvelle option si elle correspond à la valeur actuelle\n const selectedOption = this.options.find(option => option.value == this.value);\n if (selectedOption) {\n selectedOption.selected = true;\n }\n }\n\n resetSelection() {\n this.value = null;\n this.options.forEach(option => option.selected = false);\n }\n\n private onChange = (ev: Event) => {\n const select = ev.target as HTMLSelectElement | null;\n if (select) {\n this.value = select.value || null;\n }\n };\n\n private onBlur = () => {\n this.roadblur.emit();\n this.roadBlur.emit();\n };\n\n private onFocus = () => {\n this.roadfocus.emit();\n this.roadFocus.emit();\n };\n\n render() {\n const labelId = this.selectId + '-label';\n const hasValueClass = this.value && this.value !== '' ? 'has-value' : '';\n const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host class={this.sizes && `select-${this.sizes}`}>\n <select\n class={`form-select ${hasValueClass} ${isInvalidClass}`}\n id={this.selectId}\n aria-disabled={this.disabled ? 'true' : null}\n autoFocus={this.autofocus}\n disabled={this.disabled}\n name={this.name}\n required={this.required}\n size={this.size}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n <option\n selected={!this.value} // sélectionné si this.value est null ou vide\n disabled\n hidden\n style={{ display: 'none' }}\n value=\"\"\n >\n </option>\n {this.options && this.options.map(option => (\n <option\n value={option.value}\n selected={this.value !== null && option.value == this.value}\n >\n {option.label}\n </option>\n ))}\n </select>\n <label class=\"form-select-label\" id={labelId} htmlFor={this.selectId}>{this.label}</label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\">{this.error}</p>}\n </Host>\n );\n }\n\n}\n\nlet selectIds = 0;\n"]}
|
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-52302079.js';
|
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy(JSON.parse("[[\"road-badge_14\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\"],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-phone-number-input\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]},null,{\"errorMessage\":[\"updateMessagePosition\"]}]]],[\"road-content-card\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-range\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-autocomplete\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item\",[[4,\"road-carousel-item\"]]],[\"road-flap\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]]]]],[\"road-progress\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton\",[[1,\"road-skeleton\"]]],[\"road-spinner\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table\",[[6,\"road-table\"]]],[\"road-tabs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page\",[[1,\"road-toolbar-title-page\"]]],[\"road-tooltip\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
6
|
+
return bootstrapLazy(JSON.parse("[[\"road-badge_14\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"ariaLabel\":[1,\"aria-label\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\"],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-phone-number-input\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]},null,{\"errorMessage\":[\"updateMessagePosition\"]}]]],[\"road-content-card\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-range\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"],\"disabled\":[4]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-autocomplete\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item\",[[4,\"road-carousel-item\"]]],[\"road-flap\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]]]]],[\"road-progress\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton\",[[1,\"road-skeleton\"]]],[\"road-spinner\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table\",[[6,\"road-table\"]]],[\"road-tabs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page\",[[1,\"road-toolbar-title-page\"]]],[\"road-tooltip\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|