@abgov/web-components 1.0.0-alpha.118 → 1.0.0-alpha.119
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/package.json +1 -1
- package/web-components.es.js +150 -279
- package/web-components.umd.js +36 -36
package/web-components.es.js
CHANGED
|
@@ -2557,7 +2557,7 @@ function create_if_block_1$9(ctx) {
|
|
|
2557
2557
|
};
|
|
2558
2558
|
}
|
|
2559
2559
|
|
|
2560
|
-
// (
|
|
2560
|
+
// (59:4) {#if isIndeterminate}
|
|
2561
2561
|
function create_if_block$f(ctx) {
|
|
2562
2562
|
let svg;
|
|
2563
2563
|
let rect;
|
|
@@ -2725,16 +2725,24 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
2725
2725
|
let { checked } = $$props;
|
|
2726
2726
|
let { text = "" } = $$props;
|
|
2727
2727
|
let { value = "" } = $$props;
|
|
2728
|
-
let { disabled } = $$props;
|
|
2729
|
-
let { error } = $$props;
|
|
2728
|
+
let { disabled = "false" } = $$props;
|
|
2729
|
+
let { error = "false" } = $$props;
|
|
2730
2730
|
let { testid = "" } = $$props;
|
|
2731
2731
|
|
|
2732
|
+
// Private
|
|
2733
|
+
let _value;
|
|
2734
|
+
|
|
2735
|
+
onMount(() => {
|
|
2736
|
+
// hold on to the initial value to prevent losing it on check changes
|
|
2737
|
+
_value = value;
|
|
2738
|
+
});
|
|
2739
|
+
|
|
2732
2740
|
function onChange(e) {
|
|
2733
2741
|
// An empty string is required as setting the second value to `null` caused the data to get
|
|
2734
2742
|
// out of sync with the events.
|
|
2735
2743
|
const newCheckStatus = !isChecked;
|
|
2736
2744
|
|
|
2737
|
-
const
|
|
2745
|
+
const newValue = newCheckStatus ? `${_value || "checked"}` : "";
|
|
2738
2746
|
|
|
2739
2747
|
// set the local state
|
|
2740
2748
|
$$invalidate(9, checked = fromBoolean(newCheckStatus));
|
|
@@ -2745,7 +2753,7 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
2745
2753
|
detail: {
|
|
2746
2754
|
name,
|
|
2747
2755
|
checked: newCheckStatus,
|
|
2748
|
-
value:
|
|
2756
|
+
value: newValue
|
|
2749
2757
|
}
|
|
2750
2758
|
}));
|
|
2751
2759
|
}
|
|
@@ -2762,6 +2770,7 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
2762
2770
|
|
|
2763
2771
|
$$self.$$.update = () => {
|
|
2764
2772
|
if ($$self.$$.dirty & /*disabled*/ 1024) {
|
|
2773
|
+
// Binding
|
|
2765
2774
|
$$invalidate(7, isDisabled = toBoolean(disabled));
|
|
2766
2775
|
}
|
|
2767
2776
|
|
|
@@ -6032,7 +6041,8 @@ function create_if_block_2$5(ctx) {
|
|
|
6032
6041
|
let div;
|
|
6033
6042
|
let t0;
|
|
6034
6043
|
let t1;
|
|
6035
|
-
let
|
|
6044
|
+
let show_if = /*requirement*/ ctx[3] && /*REQUIREMENT_TYPES*/ ctx[4].includes(/*requirement*/ ctx[3]);
|
|
6045
|
+
let if_block = show_if && create_if_block_3$3(ctx);
|
|
6036
6046
|
|
|
6037
6047
|
return {
|
|
6038
6048
|
c() {
|
|
@@ -6050,10 +6060,13 @@ function create_if_block_2$5(ctx) {
|
|
|
6050
6060
|
},
|
|
6051
6061
|
p(ctx, dirty) {
|
|
6052
6062
|
if (dirty & /*label*/ 1) set_data(t0, /*label*/ ctx[0]);
|
|
6063
|
+
if (dirty & /*requirement*/ 8) show_if = /*requirement*/ ctx[3] && /*REQUIREMENT_TYPES*/ ctx[4].includes(/*requirement*/ ctx[3]);
|
|
6053
6064
|
|
|
6054
|
-
if (
|
|
6055
|
-
if (if_block)
|
|
6056
|
-
if_block
|
|
6065
|
+
if (show_if) {
|
|
6066
|
+
if (if_block) {
|
|
6067
|
+
if_block.p(ctx, dirty);
|
|
6068
|
+
} else {
|
|
6069
|
+
if_block = create_if_block_3$3(ctx);
|
|
6057
6070
|
if_block.c();
|
|
6058
6071
|
if_block.m(div, null);
|
|
6059
6072
|
}
|
|
@@ -6069,17 +6082,28 @@ function create_if_block_2$5(ctx) {
|
|
|
6069
6082
|
};
|
|
6070
6083
|
}
|
|
6071
6084
|
|
|
6072
|
-
// (
|
|
6085
|
+
// (28:6) {#if requirement && REQUIREMENT_TYPES.includes(requirement)}
|
|
6073
6086
|
function create_if_block_3$3(ctx) {
|
|
6074
6087
|
let em;
|
|
6088
|
+
let t0;
|
|
6089
|
+
let t1;
|
|
6090
|
+
let t2;
|
|
6075
6091
|
|
|
6076
6092
|
return {
|
|
6077
6093
|
c() {
|
|
6078
6094
|
em = element("em");
|
|
6079
|
-
|
|
6095
|
+
t0 = text("(");
|
|
6096
|
+
t1 = text(/*requirement*/ ctx[3]);
|
|
6097
|
+
t2 = text(")");
|
|
6080
6098
|
},
|
|
6081
6099
|
m(target, anchor) {
|
|
6082
6100
|
insert(target, em, anchor);
|
|
6101
|
+
append(em, t0);
|
|
6102
|
+
append(em, t1);
|
|
6103
|
+
append(em, t2);
|
|
6104
|
+
},
|
|
6105
|
+
p(ctx, dirty) {
|
|
6106
|
+
if (dirty & /*requirement*/ 8) set_data(t1, /*requirement*/ ctx[3]);
|
|
6083
6107
|
},
|
|
6084
6108
|
d(detaching) {
|
|
6085
6109
|
if (detaching) detach(em);
|
|
@@ -6087,7 +6111,7 @@ function create_if_block_3$3(ctx) {
|
|
|
6087
6111
|
};
|
|
6088
6112
|
}
|
|
6089
6113
|
|
|
6090
|
-
// (
|
|
6114
|
+
// (36:2) {#if error}
|
|
6091
6115
|
function create_if_block_1$6(ctx) {
|
|
6092
6116
|
let div;
|
|
6093
6117
|
let t;
|
|
@@ -6111,7 +6135,7 @@ function create_if_block_1$6(ctx) {
|
|
|
6111
6135
|
};
|
|
6112
6136
|
}
|
|
6113
6137
|
|
|
6114
|
-
// (
|
|
6138
|
+
// (39:2) {#if helptext}
|
|
6115
6139
|
function create_if_block$9(ctx) {
|
|
6116
6140
|
let div;
|
|
6117
6141
|
let t;
|
|
@@ -6222,26 +6246,32 @@ function create_fragment$j(ctx) {
|
|
|
6222
6246
|
}
|
|
6223
6247
|
|
|
6224
6248
|
function instance$h($$self, $$props, $$invalidate) {
|
|
6225
|
-
|
|
6249
|
+
const REQUIREMENT_TYPES = ["optional", "required", ""];
|
|
6250
|
+
|
|
6251
|
+
// type check function
|
|
6252
|
+
function isRequirementType(value) {
|
|
6253
|
+
return REQUIREMENT_TYPES.includes(value);
|
|
6254
|
+
}
|
|
6255
|
+
|
|
6226
6256
|
let { label = "" } = $$props;
|
|
6227
6257
|
let { helptext = "" } = $$props;
|
|
6228
6258
|
let { error = "" } = $$props;
|
|
6229
|
-
let {
|
|
6259
|
+
let { requirement = "" } = $$props;
|
|
6260
|
+
|
|
6261
|
+
onMount(() => {
|
|
6262
|
+
if (!isRequirementType(requirement)) {
|
|
6263
|
+
throw "Invalid requirement type";
|
|
6264
|
+
}
|
|
6265
|
+
});
|
|
6230
6266
|
|
|
6231
6267
|
$$self.$$set = $$props => {
|
|
6232
6268
|
if ('label' in $$props) $$invalidate(0, label = $$props.label);
|
|
6233
6269
|
if ('helptext' in $$props) $$invalidate(1, helptext = $$props.helptext);
|
|
6234
6270
|
if ('error' in $$props) $$invalidate(2, error = $$props.error);
|
|
6235
|
-
if ('
|
|
6271
|
+
if ('requirement' in $$props) $$invalidate(3, requirement = $$props.requirement);
|
|
6236
6272
|
};
|
|
6237
6273
|
|
|
6238
|
-
|
|
6239
|
-
if ($$self.$$.dirty & /*optional*/ 16) {
|
|
6240
|
-
$$invalidate(3, isOptional = toBoolean(optional));
|
|
6241
|
-
}
|
|
6242
|
-
};
|
|
6243
|
-
|
|
6244
|
-
return [label, helptext, error, isOptional, optional];
|
|
6274
|
+
return [label, helptext, error, requirement, REQUIREMENT_TYPES];
|
|
6245
6275
|
}
|
|
6246
6276
|
|
|
6247
6277
|
class FormItem extends SvelteElement {
|
|
@@ -6263,7 +6293,7 @@ class FormItem extends SvelteElement {
|
|
|
6263
6293
|
label: 0,
|
|
6264
6294
|
helptext: 1,
|
|
6265
6295
|
error: 2,
|
|
6266
|
-
|
|
6296
|
+
requirement: 3
|
|
6267
6297
|
},
|
|
6268
6298
|
null
|
|
6269
6299
|
);
|
|
@@ -6281,7 +6311,7 @@ class FormItem extends SvelteElement {
|
|
|
6281
6311
|
}
|
|
6282
6312
|
|
|
6283
6313
|
static get observedAttributes() {
|
|
6284
|
-
return ["label", "helptext", "error", "
|
|
6314
|
+
return ["label", "helptext", "error", "requirement"];
|
|
6285
6315
|
}
|
|
6286
6316
|
|
|
6287
6317
|
get label() {
|
|
@@ -6311,12 +6341,12 @@ class FormItem extends SvelteElement {
|
|
|
6311
6341
|
flush();
|
|
6312
6342
|
}
|
|
6313
6343
|
|
|
6314
|
-
get
|
|
6315
|
-
return this.$$.ctx[
|
|
6344
|
+
get requirement() {
|
|
6345
|
+
return this.$$.ctx[3];
|
|
6316
6346
|
}
|
|
6317
6347
|
|
|
6318
|
-
set
|
|
6319
|
-
this.$$set({
|
|
6348
|
+
set requirement(requirement) {
|
|
6349
|
+
this.$$set({ requirement });
|
|
6320
6350
|
flush();
|
|
6321
6351
|
}
|
|
6322
6352
|
}
|
|
@@ -7014,7 +7044,7 @@ customElements.define("goa-icon", Icon);
|
|
|
7014
7044
|
|
|
7015
7045
|
/* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.51.0 */
|
|
7016
7046
|
|
|
7017
|
-
function
|
|
7047
|
+
function create_if_block_4(ctx) {
|
|
7018
7048
|
let div;
|
|
7019
7049
|
let t;
|
|
7020
7050
|
|
|
@@ -7029,7 +7059,7 @@ function create_if_block_7(ctx) {
|
|
|
7029
7059
|
append(div, t);
|
|
7030
7060
|
},
|
|
7031
7061
|
p(ctx, dirty) {
|
|
7032
|
-
if (dirty
|
|
7062
|
+
if (dirty & /*prefix*/ 16384) set_data(t, /*prefix*/ ctx[14]);
|
|
7033
7063
|
},
|
|
7034
7064
|
d(detaching) {
|
|
7035
7065
|
if (detaching) detach(div);
|
|
@@ -7037,8 +7067,8 @@ function create_if_block_7(ctx) {
|
|
|
7037
7067
|
};
|
|
7038
7068
|
}
|
|
7039
7069
|
|
|
7040
|
-
// (
|
|
7041
|
-
function
|
|
7070
|
+
// (78:4) {#if leadingicon}
|
|
7071
|
+
function create_if_block_3$2(ctx) {
|
|
7042
7072
|
let goa_icon;
|
|
7043
7073
|
|
|
7044
7074
|
return {
|
|
@@ -7052,7 +7082,7 @@ function create_if_block_6(ctx) {
|
|
|
7052
7082
|
insert(target, goa_icon, anchor);
|
|
7053
7083
|
},
|
|
7054
7084
|
p(ctx, dirty) {
|
|
7055
|
-
if (dirty
|
|
7085
|
+
if (dirty & /*leadingicon*/ 32) {
|
|
7056
7086
|
set_custom_element_data(goa_icon, "type", /*leadingicon*/ ctx[5]);
|
|
7057
7087
|
}
|
|
7058
7088
|
},
|
|
@@ -7062,8 +7092,8 @@ function create_if_block_6(ctx) {
|
|
|
7062
7092
|
};
|
|
7063
7093
|
}
|
|
7064
7094
|
|
|
7065
|
-
// (
|
|
7066
|
-
function
|
|
7095
|
+
// (108:4) {#if trailingicon && !handlesTrailingIconClick}
|
|
7096
|
+
function create_if_block_2$4(ctx) {
|
|
7067
7097
|
let goa_icon;
|
|
7068
7098
|
|
|
7069
7099
|
return {
|
|
@@ -7078,7 +7108,7 @@ function create_if_block_5(ctx) {
|
|
|
7078
7108
|
insert(target, goa_icon, anchor);
|
|
7079
7109
|
},
|
|
7080
7110
|
p(ctx, dirty) {
|
|
7081
|
-
if (dirty
|
|
7111
|
+
if (dirty & /*trailingicon*/ 64) {
|
|
7082
7112
|
set_custom_element_data(goa_icon, "type", /*trailingicon*/ ctx[6]);
|
|
7083
7113
|
}
|
|
7084
7114
|
},
|
|
@@ -7088,8 +7118,8 @@ function create_if_block_5(ctx) {
|
|
|
7088
7118
|
};
|
|
7089
7119
|
}
|
|
7090
7120
|
|
|
7091
|
-
// (
|
|
7092
|
-
function
|
|
7121
|
+
// (118:4) {#if trailingicon && handlesTrailingIconClick}
|
|
7122
|
+
function create_if_block_1$5(ctx) {
|
|
7093
7123
|
let goa_icon_button;
|
|
7094
7124
|
let mounted;
|
|
7095
7125
|
let dispose;
|
|
@@ -7097,7 +7127,7 @@ function create_if_block_4(ctx) {
|
|
|
7097
7127
|
return {
|
|
7098
7128
|
c() {
|
|
7099
7129
|
goa_icon_button = element("goa-icon-button");
|
|
7100
|
-
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[
|
|
7130
|
+
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[17]);
|
|
7101
7131
|
set_custom_element_data(goa_icon_button, "variant", "nocolor");
|
|
7102
7132
|
set_custom_element_data(goa_icon_button, "size", "medium");
|
|
7103
7133
|
set_custom_element_data(goa_icon_button, "icon", /*trailingicon*/ ctx[6]);
|
|
@@ -7112,11 +7142,11 @@ function create_if_block_4(ctx) {
|
|
|
7112
7142
|
}
|
|
7113
7143
|
},
|
|
7114
7144
|
p(ctx, dirty) {
|
|
7115
|
-
if (dirty
|
|
7116
|
-
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[
|
|
7145
|
+
if (dirty & /*isDisabled*/ 131072) {
|
|
7146
|
+
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[17]);
|
|
7117
7147
|
}
|
|
7118
7148
|
|
|
7119
|
-
if (dirty
|
|
7149
|
+
if (dirty & /*trailingicon*/ 64) {
|
|
7120
7150
|
set_custom_element_data(goa_icon_button, "icon", /*trailingicon*/ ctx[6]);
|
|
7121
7151
|
}
|
|
7122
7152
|
},
|
|
@@ -7128,8 +7158,8 @@ function create_if_block_4(ctx) {
|
|
|
7128
7158
|
};
|
|
7129
7159
|
}
|
|
7130
7160
|
|
|
7131
|
-
// (
|
|
7132
|
-
function
|
|
7161
|
+
// (129:4) {#if suffix}
|
|
7162
|
+
function create_if_block$7(ctx) {
|
|
7133
7163
|
let span;
|
|
7134
7164
|
let t;
|
|
7135
7165
|
|
|
@@ -7144,7 +7174,7 @@ function create_if_block_3$2(ctx) {
|
|
|
7144
7174
|
append(span, t);
|
|
7145
7175
|
},
|
|
7146
7176
|
p(ctx, dirty) {
|
|
7147
|
-
if (dirty
|
|
7177
|
+
if (dirty & /*suffix*/ 32768) set_data(t, /*suffix*/ ctx[15]);
|
|
7148
7178
|
},
|
|
7149
7179
|
d(detaching) {
|
|
7150
7180
|
if (detaching) detach(span);
|
|
@@ -7152,110 +7182,6 @@ function create_if_block_3$2(ctx) {
|
|
|
7152
7182
|
};
|
|
7153
7183
|
}
|
|
7154
7184
|
|
|
7155
|
-
// (139:2) {#if showCounter}
|
|
7156
|
-
function create_if_block$7(ctx) {
|
|
7157
|
-
let if_block_anchor;
|
|
7158
|
-
|
|
7159
|
-
function select_block_type(ctx, dirty) {
|
|
7160
|
-
if (/*maxcharcount*/ ctx[16] > 0) return create_if_block_1$5;
|
|
7161
|
-
if (/*value*/ ctx[0].length > 0) return create_if_block_2$4;
|
|
7162
|
-
}
|
|
7163
|
-
|
|
7164
|
-
let current_block_type = select_block_type(ctx);
|
|
7165
|
-
let if_block = current_block_type && current_block_type(ctx);
|
|
7166
|
-
|
|
7167
|
-
return {
|
|
7168
|
-
c() {
|
|
7169
|
-
if (if_block) if_block.c();
|
|
7170
|
-
if_block_anchor = empty();
|
|
7171
|
-
},
|
|
7172
|
-
m(target, anchor) {
|
|
7173
|
-
if (if_block) if_block.m(target, anchor);
|
|
7174
|
-
insert(target, if_block_anchor, anchor);
|
|
7175
|
-
},
|
|
7176
|
-
p(ctx, dirty) {
|
|
7177
|
-
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
7178
|
-
if_block.p(ctx, dirty);
|
|
7179
|
-
} else {
|
|
7180
|
-
if (if_block) if_block.d(1);
|
|
7181
|
-
if_block = current_block_type && current_block_type(ctx);
|
|
7182
|
-
|
|
7183
|
-
if (if_block) {
|
|
7184
|
-
if_block.c();
|
|
7185
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
7186
|
-
}
|
|
7187
|
-
}
|
|
7188
|
-
},
|
|
7189
|
-
d(detaching) {
|
|
7190
|
-
if (if_block) {
|
|
7191
|
-
if_block.d(detaching);
|
|
7192
|
-
}
|
|
7193
|
-
|
|
7194
|
-
if (detaching) detach(if_block_anchor);
|
|
7195
|
-
}
|
|
7196
|
-
};
|
|
7197
|
-
}
|
|
7198
|
-
|
|
7199
|
-
// (144:31)
|
|
7200
|
-
function create_if_block_2$4(ctx) {
|
|
7201
|
-
let div;
|
|
7202
|
-
let t_value = /*value*/ ctx[0].length + "";
|
|
7203
|
-
let t;
|
|
7204
|
-
|
|
7205
|
-
return {
|
|
7206
|
-
c() {
|
|
7207
|
-
div = element("div");
|
|
7208
|
-
t = text(t_value);
|
|
7209
|
-
attr(div, "class", "counter");
|
|
7210
|
-
},
|
|
7211
|
-
m(target, anchor) {
|
|
7212
|
-
insert(target, div, anchor);
|
|
7213
|
-
append(div, t);
|
|
7214
|
-
},
|
|
7215
|
-
p(ctx, dirty) {
|
|
7216
|
-
if (dirty[0] & /*value*/ 1 && t_value !== (t_value = /*value*/ ctx[0].length + "")) set_data(t, t_value);
|
|
7217
|
-
},
|
|
7218
|
-
d(detaching) {
|
|
7219
|
-
if (detaching) detach(div);
|
|
7220
|
-
}
|
|
7221
|
-
};
|
|
7222
|
-
}
|
|
7223
|
-
|
|
7224
|
-
// (140:4) {#if maxcharcount > 0}
|
|
7225
|
-
function create_if_block_1$5(ctx) {
|
|
7226
|
-
let div;
|
|
7227
|
-
let t0_value = /*value*/ ctx[0].length + "";
|
|
7228
|
-
let t0;
|
|
7229
|
-
let t1_value = `/${/*maxcharcount*/ ctx[16]}` + "";
|
|
7230
|
-
let t1;
|
|
7231
|
-
|
|
7232
|
-
return {
|
|
7233
|
-
c() {
|
|
7234
|
-
div = element("div");
|
|
7235
|
-
t0 = text(t0_value);
|
|
7236
|
-
t1 = text(t1_value);
|
|
7237
|
-
attr(div, "class", "counter");
|
|
7238
|
-
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[16]);
|
|
7239
|
-
},
|
|
7240
|
-
m(target, anchor) {
|
|
7241
|
-
insert(target, div, anchor);
|
|
7242
|
-
append(div, t0);
|
|
7243
|
-
append(div, t1);
|
|
7244
|
-
},
|
|
7245
|
-
p(ctx, dirty) {
|
|
7246
|
-
if (dirty[0] & /*value*/ 1 && t0_value !== (t0_value = /*value*/ ctx[0].length + "")) set_data(t0, t0_value);
|
|
7247
|
-
if (dirty[0] & /*maxcharcount*/ 65536 && t1_value !== (t1_value = `/${/*maxcharcount*/ ctx[16]}` + "")) set_data(t1, t1_value);
|
|
7248
|
-
|
|
7249
|
-
if (dirty[0] & /*value, maxcharcount*/ 65537) {
|
|
7250
|
-
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[16]);
|
|
7251
|
-
}
|
|
7252
|
-
},
|
|
7253
|
-
d(detaching) {
|
|
7254
|
-
if (detaching) detach(div);
|
|
7255
|
-
}
|
|
7256
|
-
};
|
|
7257
|
-
}
|
|
7258
|
-
|
|
7259
7185
|
function create_fragment$f(ctx) {
|
|
7260
7186
|
let div1;
|
|
7261
7187
|
let div0;
|
|
@@ -7269,16 +7195,14 @@ function create_fragment$f(ctx) {
|
|
|
7269
7195
|
let t3;
|
|
7270
7196
|
let t4;
|
|
7271
7197
|
let div0_class_value;
|
|
7272
|
-
let t5;
|
|
7273
7198
|
let div1_style_value;
|
|
7274
7199
|
let mounted;
|
|
7275
7200
|
let dispose;
|
|
7276
|
-
let if_block0 = /*prefix*/ ctx[14] &&
|
|
7277
|
-
let if_block1 = /*leadingicon*/ ctx[5] &&
|
|
7278
|
-
let if_block2 = /*trailingicon*/ ctx[6] && !/*handlesTrailingIconClick*/ ctx[
|
|
7279
|
-
let if_block3 = /*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[
|
|
7280
|
-
let if_block4 = /*suffix*/ ctx[15] &&
|
|
7281
|
-
let if_block5 = /*showCounter*/ ctx[18] && create_if_block$7(ctx);
|
|
7201
|
+
let if_block0 = /*prefix*/ ctx[14] && create_if_block_4(ctx);
|
|
7202
|
+
let if_block1 = /*leadingicon*/ ctx[5] && create_if_block_3$2(ctx);
|
|
7203
|
+
let if_block2 = /*trailingicon*/ ctx[6] && !/*handlesTrailingIconClick*/ ctx[20] && create_if_block_2$4(ctx);
|
|
7204
|
+
let if_block3 = /*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[20] && create_if_block_1$5(ctx);
|
|
7205
|
+
let if_block4 = /*suffix*/ ctx[15] && create_if_block$7(ctx);
|
|
7282
7206
|
|
|
7283
7207
|
return {
|
|
7284
7208
|
c() {
|
|
@@ -7295,13 +7219,11 @@ function create_fragment$f(ctx) {
|
|
|
7295
7219
|
if (if_block3) if_block3.c();
|
|
7296
7220
|
t4 = space();
|
|
7297
7221
|
if (if_block4) if_block4.c();
|
|
7298
|
-
t5 = space();
|
|
7299
|
-
if (if_block5) if_block5.c();
|
|
7300
7222
|
this.c = noop;
|
|
7301
7223
|
attr(input, "class", input_class_value = `input--${/*variant*/ ctx[7]}`);
|
|
7302
7224
|
attr(input, "style", input_style_value = `--search-icon-offset: ${/*trailingicon*/ ctx[6] ? "-0.5rem" : "0"}`);
|
|
7303
|
-
input.readOnly = /*isReadonly*/ ctx[
|
|
7304
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
7225
|
+
input.readOnly = /*isReadonly*/ ctx[19];
|
|
7226
|
+
input.disabled = /*isDisabled*/ ctx[17];
|
|
7305
7227
|
attr(input, "data-testid", /*testid*/ ctx[8]);
|
|
7306
7228
|
attr(input, "autocapitalize", /*autocapitalize*/ ctx[3]);
|
|
7307
7229
|
attr(input, "name", /*name*/ ctx[2]);
|
|
@@ -7316,12 +7238,12 @@ function create_fragment$f(ctx) {
|
|
|
7316
7238
|
|
|
7317
7239
|
attr(div0, "class", div0_class_value = `
|
|
7318
7240
|
goa-input
|
|
7319
|
-
${/*isDisabled*/ ctx[
|
|
7241
|
+
${/*isDisabled*/ ctx[17] ? "goa-input--disabled" : ""}
|
|
7320
7242
|
variant--${/*variant*/ ctx[7]}
|
|
7321
7243
|
type--${/*type*/ ctx[1]}
|
|
7322
7244
|
`);
|
|
7323
7245
|
|
|
7324
|
-
toggle_class(div0, "error", /*isError*/ ctx[
|
|
7246
|
+
toggle_class(div0, "error", /*isError*/ ctx[18]);
|
|
7325
7247
|
attr(div1, "class", "container");
|
|
7326
7248
|
|
|
7327
7249
|
attr(div1, "style", div1_style_value = `
|
|
@@ -7336,31 +7258,29 @@ function create_fragment$f(ctx) {
|
|
|
7336
7258
|
if (if_block1) if_block1.m(div0, null);
|
|
7337
7259
|
append(div0, t1);
|
|
7338
7260
|
append(div0, input);
|
|
7339
|
-
/*input_binding*/ ctx[
|
|
7261
|
+
/*input_binding*/ ctx[28](input);
|
|
7340
7262
|
append(div0, t2);
|
|
7341
7263
|
if (if_block2) if_block2.m(div0, null);
|
|
7342
7264
|
append(div0, t3);
|
|
7343
7265
|
if (if_block3) if_block3.m(div0, null);
|
|
7344
7266
|
append(div0, t4);
|
|
7345
7267
|
if (if_block4) if_block4.m(div0, null);
|
|
7346
|
-
append(div1, t5);
|
|
7347
|
-
if (if_block5) if_block5.m(div1, null);
|
|
7348
7268
|
|
|
7349
7269
|
if (!mounted) {
|
|
7350
7270
|
dispose = [
|
|
7351
|
-
listen(input, "keyup", /*onKeyUp*/ ctx[
|
|
7352
|
-
listen(input, "change", /*onKeyUp*/ ctx[
|
|
7271
|
+
listen(input, "keyup", /*onKeyUp*/ ctx[21]),
|
|
7272
|
+
listen(input, "change", /*onKeyUp*/ ctx[21])
|
|
7353
7273
|
];
|
|
7354
7274
|
|
|
7355
7275
|
mounted = true;
|
|
7356
7276
|
}
|
|
7357
7277
|
},
|
|
7358
|
-
p(ctx, dirty) {
|
|
7278
|
+
p(ctx, [dirty]) {
|
|
7359
7279
|
if (/*prefix*/ ctx[14]) {
|
|
7360
7280
|
if (if_block0) {
|
|
7361
7281
|
if_block0.p(ctx, dirty);
|
|
7362
7282
|
} else {
|
|
7363
|
-
if_block0 =
|
|
7283
|
+
if_block0 = create_if_block_4(ctx);
|
|
7364
7284
|
if_block0.c();
|
|
7365
7285
|
if_block0.m(div0, t0);
|
|
7366
7286
|
}
|
|
@@ -7373,7 +7293,7 @@ function create_fragment$f(ctx) {
|
|
|
7373
7293
|
if (if_block1) {
|
|
7374
7294
|
if_block1.p(ctx, dirty);
|
|
7375
7295
|
} else {
|
|
7376
|
-
if_block1 =
|
|
7296
|
+
if_block1 = create_if_block_3$2(ctx);
|
|
7377
7297
|
if_block1.c();
|
|
7378
7298
|
if_block1.m(div0, t1);
|
|
7379
7299
|
}
|
|
@@ -7382,67 +7302,67 @@ function create_fragment$f(ctx) {
|
|
|
7382
7302
|
if_block1 = null;
|
|
7383
7303
|
}
|
|
7384
7304
|
|
|
7385
|
-
if (dirty
|
|
7305
|
+
if (dirty & /*variant*/ 128 && input_class_value !== (input_class_value = `input--${/*variant*/ ctx[7]}`)) {
|
|
7386
7306
|
attr(input, "class", input_class_value);
|
|
7387
7307
|
}
|
|
7388
7308
|
|
|
7389
|
-
if (dirty
|
|
7309
|
+
if (dirty & /*trailingicon*/ 64 && input_style_value !== (input_style_value = `--search-icon-offset: ${/*trailingicon*/ ctx[6] ? "-0.5rem" : "0"}`)) {
|
|
7390
7310
|
attr(input, "style", input_style_value);
|
|
7391
7311
|
}
|
|
7392
7312
|
|
|
7393
|
-
if (dirty
|
|
7394
|
-
input.readOnly = /*isReadonly*/ ctx[
|
|
7313
|
+
if (dirty & /*isReadonly*/ 524288) {
|
|
7314
|
+
input.readOnly = /*isReadonly*/ ctx[19];
|
|
7395
7315
|
}
|
|
7396
7316
|
|
|
7397
|
-
if (dirty
|
|
7398
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
7317
|
+
if (dirty & /*isDisabled*/ 131072) {
|
|
7318
|
+
input.disabled = /*isDisabled*/ ctx[17];
|
|
7399
7319
|
}
|
|
7400
7320
|
|
|
7401
|
-
if (dirty
|
|
7321
|
+
if (dirty & /*testid*/ 256) {
|
|
7402
7322
|
attr(input, "data-testid", /*testid*/ ctx[8]);
|
|
7403
7323
|
}
|
|
7404
7324
|
|
|
7405
|
-
if (dirty
|
|
7325
|
+
if (dirty & /*autocapitalize*/ 8) {
|
|
7406
7326
|
attr(input, "autocapitalize", /*autocapitalize*/ ctx[3]);
|
|
7407
7327
|
}
|
|
7408
7328
|
|
|
7409
|
-
if (dirty
|
|
7329
|
+
if (dirty & /*name*/ 4) {
|
|
7410
7330
|
attr(input, "name", /*name*/ ctx[2]);
|
|
7411
7331
|
}
|
|
7412
7332
|
|
|
7413
|
-
if (dirty
|
|
7333
|
+
if (dirty & /*type*/ 2) {
|
|
7414
7334
|
attr(input, "type", /*type*/ ctx[1]);
|
|
7415
7335
|
}
|
|
7416
7336
|
|
|
7417
|
-
if (dirty
|
|
7337
|
+
if (dirty & /*value*/ 1 && input.value !== /*value*/ ctx[0]) {
|
|
7418
7338
|
input.value = /*value*/ ctx[0];
|
|
7419
7339
|
}
|
|
7420
7340
|
|
|
7421
|
-
if (dirty
|
|
7341
|
+
if (dirty & /*placeholder*/ 16) {
|
|
7422
7342
|
attr(input, "placeholder", /*placeholder*/ ctx[4]);
|
|
7423
7343
|
}
|
|
7424
7344
|
|
|
7425
|
-
if (dirty
|
|
7345
|
+
if (dirty & /*min*/ 2048) {
|
|
7426
7346
|
attr(input, "min", /*min*/ ctx[11]);
|
|
7427
7347
|
}
|
|
7428
7348
|
|
|
7429
|
-
if (dirty
|
|
7349
|
+
if (dirty & /*max*/ 4096) {
|
|
7430
7350
|
attr(input, "max", /*max*/ ctx[12]);
|
|
7431
7351
|
}
|
|
7432
7352
|
|
|
7433
|
-
if (dirty
|
|
7353
|
+
if (dirty & /*step*/ 8192) {
|
|
7434
7354
|
attr(input, "step", /*step*/ ctx[13]);
|
|
7435
7355
|
}
|
|
7436
7356
|
|
|
7437
|
-
if (dirty
|
|
7357
|
+
if (dirty & /*arialabel, name*/ 1028 && input_aria_label_value !== (input_aria_label_value = /*arialabel*/ ctx[10] || /*name*/ ctx[2])) {
|
|
7438
7358
|
attr(input, "aria-label", input_aria_label_value);
|
|
7439
7359
|
}
|
|
7440
7360
|
|
|
7441
|
-
if (/*trailingicon*/ ctx[6] && !/*handlesTrailingIconClick*/ ctx[
|
|
7361
|
+
if (/*trailingicon*/ ctx[6] && !/*handlesTrailingIconClick*/ ctx[20]) {
|
|
7442
7362
|
if (if_block2) {
|
|
7443
7363
|
if_block2.p(ctx, dirty);
|
|
7444
7364
|
} else {
|
|
7445
|
-
if_block2 =
|
|
7365
|
+
if_block2 = create_if_block_2$4(ctx);
|
|
7446
7366
|
if_block2.c();
|
|
7447
7367
|
if_block2.m(div0, t3);
|
|
7448
7368
|
}
|
|
@@ -7451,11 +7371,11 @@ function create_fragment$f(ctx) {
|
|
|
7451
7371
|
if_block2 = null;
|
|
7452
7372
|
}
|
|
7453
7373
|
|
|
7454
|
-
if (/*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[
|
|
7374
|
+
if (/*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[20]) {
|
|
7455
7375
|
if (if_block3) {
|
|
7456
7376
|
if_block3.p(ctx, dirty);
|
|
7457
7377
|
} else {
|
|
7458
|
-
if_block3 =
|
|
7378
|
+
if_block3 = create_if_block_1$5(ctx);
|
|
7459
7379
|
if_block3.c();
|
|
7460
7380
|
if_block3.m(div0, t4);
|
|
7461
7381
|
}
|
|
@@ -7468,7 +7388,7 @@ function create_fragment$f(ctx) {
|
|
|
7468
7388
|
if (if_block4) {
|
|
7469
7389
|
if_block4.p(ctx, dirty);
|
|
7470
7390
|
} else {
|
|
7471
|
-
if_block4 =
|
|
7391
|
+
if_block4 = create_if_block$7(ctx);
|
|
7472
7392
|
if_block4.c();
|
|
7473
7393
|
if_block4.m(div0, null);
|
|
7474
7394
|
}
|
|
@@ -7477,33 +7397,20 @@ function create_fragment$f(ctx) {
|
|
|
7477
7397
|
if_block4 = null;
|
|
7478
7398
|
}
|
|
7479
7399
|
|
|
7480
|
-
if (dirty
|
|
7400
|
+
if (dirty & /*isDisabled, variant, type*/ 131202 && div0_class_value !== (div0_class_value = `
|
|
7481
7401
|
goa-input
|
|
7482
|
-
${/*isDisabled*/ ctx[
|
|
7402
|
+
${/*isDisabled*/ ctx[17] ? "goa-input--disabled" : ""}
|
|
7483
7403
|
variant--${/*variant*/ ctx[7]}
|
|
7484
7404
|
type--${/*type*/ ctx[1]}
|
|
7485
7405
|
`)) {
|
|
7486
7406
|
attr(div0, "class", div0_class_value);
|
|
7487
7407
|
}
|
|
7488
7408
|
|
|
7489
|
-
if (dirty
|
|
7490
|
-
toggle_class(div0, "error", /*isError*/ ctx[
|
|
7409
|
+
if (dirty & /*isDisabled, variant, type, isError*/ 393346) {
|
|
7410
|
+
toggle_class(div0, "error", /*isError*/ ctx[18]);
|
|
7491
7411
|
}
|
|
7492
7412
|
|
|
7493
|
-
if (/*
|
|
7494
|
-
if (if_block5) {
|
|
7495
|
-
if_block5.p(ctx, dirty);
|
|
7496
|
-
} else {
|
|
7497
|
-
if_block5 = create_if_block$7(ctx);
|
|
7498
|
-
if_block5.c();
|
|
7499
|
-
if_block5.m(div1, null);
|
|
7500
|
-
}
|
|
7501
|
-
} else if (if_block5) {
|
|
7502
|
-
if_block5.d(1);
|
|
7503
|
-
if_block5 = null;
|
|
7504
|
-
}
|
|
7505
|
-
|
|
7506
|
-
if (dirty[0] & /*width*/ 512 && div1_style_value !== (div1_style_value = `
|
|
7413
|
+
if (dirty & /*width*/ 512 && div1_style_value !== (div1_style_value = `
|
|
7507
7414
|
--width: ${/*width*/ ctx[9]};
|
|
7508
7415
|
`)) {
|
|
7509
7416
|
attr(div1, "style", div1_style_value);
|
|
@@ -7515,11 +7422,10 @@ function create_fragment$f(ctx) {
|
|
|
7515
7422
|
if (detaching) detach(div1);
|
|
7516
7423
|
if (if_block0) if_block0.d();
|
|
7517
7424
|
if (if_block1) if_block1.d();
|
|
7518
|
-
/*input_binding*/ ctx[
|
|
7425
|
+
/*input_binding*/ ctx[28](null);
|
|
7519
7426
|
if (if_block2) if_block2.d();
|
|
7520
7427
|
if (if_block3) if_block3.d();
|
|
7521
7428
|
if (if_block4) if_block4.d();
|
|
7522
|
-
if (if_block5) if_block5.d();
|
|
7523
7429
|
mounted = false;
|
|
7524
7430
|
run_all(dispose);
|
|
7525
7431
|
}
|
|
@@ -7536,7 +7442,6 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7536
7442
|
let isReadonly;
|
|
7537
7443
|
let isError;
|
|
7538
7444
|
let isDisabled;
|
|
7539
|
-
let showCounter;
|
|
7540
7445
|
let { type = "text" } = $$props;
|
|
7541
7446
|
let { name = "" } = $$props;
|
|
7542
7447
|
let { value = "" } = $$props;
|
|
@@ -7558,8 +7463,6 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7558
7463
|
let { step = null } = $$props;
|
|
7559
7464
|
let { prefix = "" } = $$props;
|
|
7560
7465
|
let { suffix = "" } = $$props;
|
|
7561
|
-
let { showcounter = "false" } = $$props;
|
|
7562
|
-
let { maxcharcount = 0 } = $$props;
|
|
7563
7466
|
let inputEl;
|
|
7564
7467
|
|
|
7565
7468
|
function onKeyUp(e) {
|
|
@@ -7577,7 +7480,7 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7577
7480
|
function input_binding($$value) {
|
|
7578
7481
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7579
7482
|
inputEl = $$value;
|
|
7580
|
-
$$invalidate(
|
|
7483
|
+
$$invalidate(16, inputEl);
|
|
7581
7484
|
});
|
|
7582
7485
|
}
|
|
7583
7486
|
|
|
@@ -7590,11 +7493,11 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7590
7493
|
if ('leadingicon' in $$props) $$invalidate(5, leadingicon = $$props.leadingicon);
|
|
7591
7494
|
if ('trailingicon' in $$props) $$invalidate(6, trailingicon = $$props.trailingicon);
|
|
7592
7495
|
if ('variant' in $$props) $$invalidate(7, variant = $$props.variant);
|
|
7593
|
-
if ('disabled' in $$props) $$invalidate(
|
|
7594
|
-
if ('handletrailingiconclick' in $$props) $$invalidate(
|
|
7595
|
-
if ('focused' in $$props) $$invalidate(
|
|
7596
|
-
if ('readonly' in $$props) $$invalidate(
|
|
7597
|
-
if ('error' in $$props) $$invalidate(
|
|
7496
|
+
if ('disabled' in $$props) $$invalidate(22, disabled = $$props.disabled);
|
|
7497
|
+
if ('handletrailingiconclick' in $$props) $$invalidate(23, handletrailingiconclick = $$props.handletrailingiconclick);
|
|
7498
|
+
if ('focused' in $$props) $$invalidate(24, focused = $$props.focused);
|
|
7499
|
+
if ('readonly' in $$props) $$invalidate(25, readonly = $$props.readonly);
|
|
7500
|
+
if ('error' in $$props) $$invalidate(26, error = $$props.error);
|
|
7598
7501
|
if ('testid' in $$props) $$invalidate(8, testid = $$props.testid);
|
|
7599
7502
|
if ('width' in $$props) $$invalidate(9, width = $$props.width);
|
|
7600
7503
|
if ('arialabel' in $$props) $$invalidate(10, arialabel = $$props.arialabel);
|
|
@@ -7603,42 +7506,36 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7603
7506
|
if ('step' in $$props) $$invalidate(13, step = $$props.step);
|
|
7604
7507
|
if ('prefix' in $$props) $$invalidate(14, prefix = $$props.prefix);
|
|
7605
7508
|
if ('suffix' in $$props) $$invalidate(15, suffix = $$props.suffix);
|
|
7606
|
-
if ('showcounter' in $$props) $$invalidate(29, showcounter = $$props.showcounter);
|
|
7607
|
-
if ('maxcharcount' in $$props) $$invalidate(16, maxcharcount = $$props.maxcharcount);
|
|
7608
7509
|
};
|
|
7609
7510
|
|
|
7610
7511
|
$$self.$$.update = () => {
|
|
7611
|
-
if ($$self.$$.dirty
|
|
7612
|
-
$$invalidate(
|
|
7512
|
+
if ($$self.$$.dirty & /*handletrailingiconclick*/ 8388608) {
|
|
7513
|
+
$$invalidate(20, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
|
|
7613
7514
|
}
|
|
7614
7515
|
|
|
7615
|
-
if ($$self.$$.dirty
|
|
7616
|
-
$$invalidate(
|
|
7516
|
+
if ($$self.$$.dirty & /*focused*/ 16777216) {
|
|
7517
|
+
$$invalidate(27, isFocused = toBoolean(focused));
|
|
7617
7518
|
}
|
|
7618
7519
|
|
|
7619
|
-
if ($$self.$$.dirty
|
|
7620
|
-
$$invalidate(
|
|
7520
|
+
if ($$self.$$.dirty & /*readonly*/ 33554432) {
|
|
7521
|
+
$$invalidate(19, isReadonly = toBoolean(readonly));
|
|
7621
7522
|
}
|
|
7622
7523
|
|
|
7623
|
-
if ($$self.$$.dirty
|
|
7624
|
-
$$invalidate(
|
|
7524
|
+
if ($$self.$$.dirty & /*error*/ 67108864) {
|
|
7525
|
+
$$invalidate(18, isError = toBoolean(error));
|
|
7625
7526
|
}
|
|
7626
7527
|
|
|
7627
|
-
if ($$self.$$.dirty
|
|
7628
|
-
$$invalidate(
|
|
7528
|
+
if ($$self.$$.dirty & /*disabled*/ 4194304) {
|
|
7529
|
+
$$invalidate(17, isDisabled = toBoolean(disabled));
|
|
7629
7530
|
}
|
|
7630
7531
|
|
|
7631
|
-
if ($$self.$$.dirty
|
|
7632
|
-
$$invalidate(18, showCounter = toBoolean(showcounter));
|
|
7633
|
-
}
|
|
7634
|
-
|
|
7635
|
-
if ($$self.$$.dirty[0] & /*isFocused, inputEl*/ 1073872896) {
|
|
7532
|
+
if ($$self.$$.dirty & /*isFocused, inputEl*/ 134283264) {
|
|
7636
7533
|
if (isFocused && inputEl) {
|
|
7637
7534
|
setTimeout(() => inputEl.focus(), 1);
|
|
7638
7535
|
}
|
|
7639
7536
|
}
|
|
7640
7537
|
|
|
7641
|
-
if ($$self.$$.dirty
|
|
7538
|
+
if ($$self.$$.dirty & /*inputEl, type*/ 65538) {
|
|
7642
7539
|
if (inputEl && type === "search") {
|
|
7643
7540
|
inputEl.addEventListener("search", e => {
|
|
7644
7541
|
onKeyUp(e);
|
|
@@ -7664,9 +7561,7 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7664
7561
|
step,
|
|
7665
7562
|
prefix,
|
|
7666
7563
|
suffix,
|
|
7667
|
-
maxcharcount,
|
|
7668
7564
|
inputEl,
|
|
7669
|
-
showCounter,
|
|
7670
7565
|
isDisabled,
|
|
7671
7566
|
isError,
|
|
7672
7567
|
isReadonly,
|
|
@@ -7677,7 +7572,6 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7677
7572
|
focused,
|
|
7678
7573
|
readonly,
|
|
7679
7574
|
error,
|
|
7680
|
-
showcounter,
|
|
7681
7575
|
isFocused,
|
|
7682
7576
|
input_binding
|
|
7683
7577
|
];
|
|
@@ -7687,7 +7581,7 @@ class Input extends SvelteElement {
|
|
|
7687
7581
|
constructor(options) {
|
|
7688
7582
|
super();
|
|
7689
7583
|
|
|
7690
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:stretch;vertical-align:middle;min-width:100%}.goa-input:hover{border-color:var(--goa-color-interactive--hover)}.goa-input:active,.goa-input:focus,.goa-input:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive--focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text);font-size:var(--input-font-size);padding:var(--input-padding);line-height:calc(40px - calc(var(--input-padding) * 2));background-color:transparent;width:0;flex:1 1 auto}input[type=text],input[type=date],input[type="datetime-local"],input[type=number]{font-family:var(--font-family)}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:default;box-shadow:none}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-input--disabled input:hover{cursor:default !important}.prefix,.suffix{background-color:var(--color-gray-100);padding:0 0.75rem;display:flex;align-items:center}.prefix{border-top-left-radius:var(--input-border-radius);border-bottom-left-radius:var(--input-border-radius);border-right:1px solid var(--color-gray-600)}.suffix{border-top-right-radius:var(--input-border-radius);border-bottom-right-radius:var(--input-border-radius);border-left:1px solid var(--color-gray-600)}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.
|
|
7584
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:stretch;vertical-align:middle;min-width:100%}.goa-input:hover{border-color:var(--goa-color-interactive--hover)}.goa-input:active,.goa-input:focus,.goa-input:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive--focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text);font-size:var(--input-font-size);padding:var(--input-padding);line-height:calc(40px - calc(var(--input-padding) * 2));background-color:transparent;width:0;flex:1 1 auto}input[type=text],input[type=date],input[type="datetime-local"],input[type=number]{font-family:var(--font-family)}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:default;box-shadow:none}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-input--disabled input:hover{cursor:default !important}.prefix,.suffix{background-color:var(--color-gray-100);padding:0 0.75rem;display:flex;align-items:center}.prefix{border-top-left-radius:var(--input-border-radius);border-bottom-left-radius:var(--input-border-radius);border-right:1px solid var(--color-gray-600)}.suffix{border-top-right-radius:var(--input-border-radius);border-bottom-right-radius:var(--input-border-radius);border-left:1px solid var(--color-gray-600)}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.error:hover,.error:focus,.error{border:2px solid var(--goa-color-interactive--error)}input[type="search" i]:enabled:read-write:-webkit-any(:focus, :hover)::-webkit-search-cancel-button{position:relative;right:var(--search-icon-offset);cursor:pointer;-webkit-appearance:none;height:1.2rem;width:1.2rem;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23333" d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"/></svg>')
|
|
7691
7585
|
center center no-repeat}</style>`;
|
|
7692
7586
|
|
|
7693
7587
|
init(
|
|
@@ -7709,11 +7603,11 @@ class Input extends SvelteElement {
|
|
|
7709
7603
|
leadingicon: 5,
|
|
7710
7604
|
trailingicon: 6,
|
|
7711
7605
|
variant: 7,
|
|
7712
|
-
disabled:
|
|
7713
|
-
handletrailingiconclick:
|
|
7714
|
-
focused:
|
|
7715
|
-
readonly:
|
|
7716
|
-
error:
|
|
7606
|
+
disabled: 22,
|
|
7607
|
+
handletrailingiconclick: 23,
|
|
7608
|
+
focused: 24,
|
|
7609
|
+
readonly: 25,
|
|
7610
|
+
error: 26,
|
|
7717
7611
|
testid: 8,
|
|
7718
7612
|
width: 9,
|
|
7719
7613
|
arialabel: 10,
|
|
@@ -7721,12 +7615,9 @@ class Input extends SvelteElement {
|
|
|
7721
7615
|
max: 12,
|
|
7722
7616
|
step: 13,
|
|
7723
7617
|
prefix: 14,
|
|
7724
|
-
suffix: 15
|
|
7725
|
-
showcounter: 29,
|
|
7726
|
-
maxcharcount: 16
|
|
7618
|
+
suffix: 15
|
|
7727
7619
|
},
|
|
7728
|
-
null
|
|
7729
|
-
[-1, -1]
|
|
7620
|
+
null
|
|
7730
7621
|
);
|
|
7731
7622
|
|
|
7732
7623
|
if (options) {
|
|
@@ -7763,9 +7654,7 @@ class Input extends SvelteElement {
|
|
|
7763
7654
|
"max",
|
|
7764
7655
|
"step",
|
|
7765
7656
|
"prefix",
|
|
7766
|
-
"suffix"
|
|
7767
|
-
"showcounter",
|
|
7768
|
-
"maxcharcount"
|
|
7657
|
+
"suffix"
|
|
7769
7658
|
];
|
|
7770
7659
|
}
|
|
7771
7660
|
|
|
@@ -7842,7 +7731,7 @@ class Input extends SvelteElement {
|
|
|
7842
7731
|
}
|
|
7843
7732
|
|
|
7844
7733
|
get disabled() {
|
|
7845
|
-
return this.$$.ctx[
|
|
7734
|
+
return this.$$.ctx[22];
|
|
7846
7735
|
}
|
|
7847
7736
|
|
|
7848
7737
|
set disabled(disabled) {
|
|
@@ -7851,7 +7740,7 @@ class Input extends SvelteElement {
|
|
|
7851
7740
|
}
|
|
7852
7741
|
|
|
7853
7742
|
get handletrailingiconclick() {
|
|
7854
|
-
return this.$$.ctx[
|
|
7743
|
+
return this.$$.ctx[23];
|
|
7855
7744
|
}
|
|
7856
7745
|
|
|
7857
7746
|
set handletrailingiconclick(handletrailingiconclick) {
|
|
@@ -7860,7 +7749,7 @@ class Input extends SvelteElement {
|
|
|
7860
7749
|
}
|
|
7861
7750
|
|
|
7862
7751
|
get focused() {
|
|
7863
|
-
return this.$$.ctx[
|
|
7752
|
+
return this.$$.ctx[24];
|
|
7864
7753
|
}
|
|
7865
7754
|
|
|
7866
7755
|
set focused(focused) {
|
|
@@ -7869,7 +7758,7 @@ class Input extends SvelteElement {
|
|
|
7869
7758
|
}
|
|
7870
7759
|
|
|
7871
7760
|
get readonly() {
|
|
7872
|
-
return this.$$.ctx[
|
|
7761
|
+
return this.$$.ctx[25];
|
|
7873
7762
|
}
|
|
7874
7763
|
|
|
7875
7764
|
set readonly(readonly) {
|
|
@@ -7878,7 +7767,7 @@ class Input extends SvelteElement {
|
|
|
7878
7767
|
}
|
|
7879
7768
|
|
|
7880
7769
|
get error() {
|
|
7881
|
-
return this.$$.ctx[
|
|
7770
|
+
return this.$$.ctx[26];
|
|
7882
7771
|
}
|
|
7883
7772
|
|
|
7884
7773
|
set error(error) {
|
|
@@ -7957,24 +7846,6 @@ class Input extends SvelteElement {
|
|
|
7957
7846
|
this.$$set({ suffix });
|
|
7958
7847
|
flush();
|
|
7959
7848
|
}
|
|
7960
|
-
|
|
7961
|
-
get showcounter() {
|
|
7962
|
-
return this.$$.ctx[29];
|
|
7963
|
-
}
|
|
7964
|
-
|
|
7965
|
-
set showcounter(showcounter) {
|
|
7966
|
-
this.$$set({ showcounter });
|
|
7967
|
-
flush();
|
|
7968
|
-
}
|
|
7969
|
-
|
|
7970
|
-
get maxcharcount() {
|
|
7971
|
-
return this.$$.ctx[16];
|
|
7972
|
-
}
|
|
7973
|
-
|
|
7974
|
-
set maxcharcount(maxcharcount) {
|
|
7975
|
-
this.$$set({ maxcharcount });
|
|
7976
|
-
flush();
|
|
7977
|
-
}
|
|
7978
7849
|
}
|
|
7979
7850
|
|
|
7980
7851
|
customElements.define("goa-input", Input);
|