@abgov/web-components 1.0.0-alpha.131 → 1.0.0-alpha.133
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 +146 -106
- package/web-components.umd.js +54 -54
package/package.json
CHANGED
package/web-components.es.js
CHANGED
|
@@ -2902,7 +2902,7 @@ function create_if_block_1$8(ctx) {
|
|
|
2902
2902
|
};
|
|
2903
2903
|
}
|
|
2904
2904
|
|
|
2905
|
-
// (
|
|
2905
|
+
// (68:4) {#if isIndeterminate}
|
|
2906
2906
|
function create_if_block$e(ctx) {
|
|
2907
2907
|
let svg;
|
|
2908
2908
|
let rect;
|
|
@@ -2933,6 +2933,7 @@ function create_fragment$w(ctx) {
|
|
|
2933
2933
|
let div0;
|
|
2934
2934
|
let input;
|
|
2935
2935
|
let input_value_value;
|
|
2936
|
+
let input_aria_label_value;
|
|
2936
2937
|
let t0;
|
|
2937
2938
|
let t1;
|
|
2938
2939
|
let div1;
|
|
@@ -2943,8 +2944,8 @@ function create_fragment$w(ctx) {
|
|
|
2943
2944
|
let dispose;
|
|
2944
2945
|
|
|
2945
2946
|
function select_block_type(ctx, dirty) {
|
|
2946
|
-
if (/*isIndeterminate*/ ctx[
|
|
2947
|
-
if (/*isChecked*/ ctx[
|
|
2947
|
+
if (/*isIndeterminate*/ ctx[10]) return create_if_block$e;
|
|
2948
|
+
if (/*isChecked*/ ctx[9]) return create_if_block_1$8;
|
|
2948
2949
|
}
|
|
2949
2950
|
|
|
2950
2951
|
let current_block_type = select_block_type(ctx);
|
|
@@ -2964,20 +2965,21 @@ function create_fragment$w(ctx) {
|
|
|
2964
2965
|
this.c = noop;
|
|
2965
2966
|
attr(input, "id", /*name*/ ctx[0]);
|
|
2966
2967
|
attr(input, "name", /*name*/ ctx[0]);
|
|
2967
|
-
input.checked = /*isChecked*/ ctx[
|
|
2968
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
2968
|
+
input.checked = /*isChecked*/ ctx[9];
|
|
2969
|
+
input.disabled = /*isDisabled*/ ctx[12];
|
|
2969
2970
|
attr(input, "type", "checkbox");
|
|
2970
2971
|
input.value = input_value_value = `${/*value*/ ctx[2]}`;
|
|
2972
|
+
attr(input, "aria-label", input_aria_label_value = /*arialabel*/ ctx[4] || /*name*/ ctx[0]);
|
|
2971
2973
|
attr(div0, "class", "goa-checkbox-container");
|
|
2972
|
-
toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[
|
|
2974
|
+
toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[9]);
|
|
2973
2975
|
attr(div1, "class", "goa-checkbox-text");
|
|
2974
2976
|
attr(div1, "data-testid", "text");
|
|
2975
2977
|
attr(label, "data-testid", /*testid*/ ctx[3]);
|
|
2976
2978
|
attr(label, "for", /*name*/ ctx[0]);
|
|
2977
|
-
attr(label, "style", label_style_value = calculateMargin(/*mt*/ ctx[
|
|
2979
|
+
attr(label, "style", label_style_value = calculateMargin(/*mt*/ ctx[5], /*mr*/ ctx[6], /*mb*/ ctx[7], /*ml*/ ctx[8]));
|
|
2978
2980
|
attr(label, "class", "goa-checkbox");
|
|
2979
|
-
toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[
|
|
2980
|
-
toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[
|
|
2981
|
+
toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[12]);
|
|
2982
|
+
toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[11]);
|
|
2981
2983
|
},
|
|
2982
2984
|
m(target, anchor) {
|
|
2983
2985
|
insert(target, label, anchor);
|
|
@@ -2991,7 +2993,7 @@ function create_fragment$w(ctx) {
|
|
|
2991
2993
|
append(slot, t2);
|
|
2992
2994
|
|
|
2993
2995
|
if (!mounted) {
|
|
2994
|
-
dispose = listen(input, "change", /*onChange*/ ctx[
|
|
2996
|
+
dispose = listen(input, "change", /*onChange*/ ctx[13]);
|
|
2995
2997
|
mounted = true;
|
|
2996
2998
|
}
|
|
2997
2999
|
},
|
|
@@ -3004,18 +3006,22 @@ function create_fragment$w(ctx) {
|
|
|
3004
3006
|
attr(input, "name", /*name*/ ctx[0]);
|
|
3005
3007
|
}
|
|
3006
3008
|
|
|
3007
|
-
if (dirty & /*isChecked*/
|
|
3008
|
-
input.checked = /*isChecked*/ ctx[
|
|
3009
|
+
if (dirty & /*isChecked*/ 512) {
|
|
3010
|
+
input.checked = /*isChecked*/ ctx[9];
|
|
3009
3011
|
}
|
|
3010
3012
|
|
|
3011
|
-
if (dirty & /*isDisabled*/
|
|
3012
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
3013
|
+
if (dirty & /*isDisabled*/ 4096) {
|
|
3014
|
+
input.disabled = /*isDisabled*/ ctx[12];
|
|
3013
3015
|
}
|
|
3014
3016
|
|
|
3015
3017
|
if (dirty & /*value*/ 4 && input_value_value !== (input_value_value = `${/*value*/ ctx[2]}`)) {
|
|
3016
3018
|
input.value = input_value_value;
|
|
3017
3019
|
}
|
|
3018
3020
|
|
|
3021
|
+
if (dirty & /*arialabel, name*/ 17 && input_aria_label_value !== (input_aria_label_value = /*arialabel*/ ctx[4] || /*name*/ ctx[0])) {
|
|
3022
|
+
attr(input, "aria-label", input_aria_label_value);
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3019
3025
|
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
|
|
3020
3026
|
if (if_block) if_block.d(1);
|
|
3021
3027
|
if_block = current_block_type && current_block_type(ctx);
|
|
@@ -3026,8 +3032,8 @@ function create_fragment$w(ctx) {
|
|
|
3026
3032
|
}
|
|
3027
3033
|
}
|
|
3028
3034
|
|
|
3029
|
-
if (dirty & /*isChecked*/
|
|
3030
|
-
toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[
|
|
3035
|
+
if (dirty & /*isChecked*/ 512) {
|
|
3036
|
+
toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[9]);
|
|
3031
3037
|
}
|
|
3032
3038
|
|
|
3033
3039
|
if (dirty & /*text*/ 2) set_data(t2, /*text*/ ctx[1]);
|
|
@@ -3040,16 +3046,16 @@ function create_fragment$w(ctx) {
|
|
|
3040
3046
|
attr(label, "for", /*name*/ ctx[0]);
|
|
3041
3047
|
}
|
|
3042
3048
|
|
|
3043
|
-
if (dirty & /*mt, mr, mb, ml*/
|
|
3049
|
+
if (dirty & /*mt, mr, mb, ml*/ 480 && label_style_value !== (label_style_value = calculateMargin(/*mt*/ ctx[5], /*mr*/ ctx[6], /*mb*/ ctx[7], /*ml*/ ctx[8]))) {
|
|
3044
3050
|
attr(label, "style", label_style_value);
|
|
3045
3051
|
}
|
|
3046
3052
|
|
|
3047
|
-
if (dirty & /*isDisabled*/
|
|
3048
|
-
toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[
|
|
3053
|
+
if (dirty & /*isDisabled*/ 4096) {
|
|
3054
|
+
toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[12]);
|
|
3049
3055
|
}
|
|
3050
3056
|
|
|
3051
|
-
if (dirty & /*isError*/
|
|
3052
|
-
toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[
|
|
3057
|
+
if (dirty & /*isError*/ 2048) {
|
|
3058
|
+
toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[11]);
|
|
3053
3059
|
}
|
|
3054
3060
|
},
|
|
3055
3061
|
i: noop,
|
|
@@ -3079,6 +3085,7 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
3079
3085
|
let { disabled = "false" } = $$props;
|
|
3080
3086
|
let { error = "false" } = $$props;
|
|
3081
3087
|
let { testid = "" } = $$props;
|
|
3088
|
+
let { arialabel = "" } = $$props;
|
|
3082
3089
|
let { mt = null } = $$props;
|
|
3083
3090
|
let { mr = null } = $$props;
|
|
3084
3091
|
let { mb = null } = $$props;
|
|
@@ -3100,7 +3107,7 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
3100
3107
|
const newValue = newCheckStatus ? `${_value || "checked"}` : "";
|
|
3101
3108
|
|
|
3102
3109
|
// set the local state
|
|
3103
|
-
$$invalidate(
|
|
3110
|
+
$$invalidate(14, checked = fromBoolean(newCheckStatus));
|
|
3104
3111
|
|
|
3105
3112
|
e.target.dispatchEvent(new CustomEvent("_change",
|
|
3106
3113
|
{
|
|
@@ -3115,40 +3122,42 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
3115
3122
|
|
|
3116
3123
|
$$self.$$set = $$props => {
|
|
3117
3124
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
3118
|
-
if ('checked' in $$props) $$invalidate(
|
|
3125
|
+
if ('checked' in $$props) $$invalidate(14, checked = $$props.checked);
|
|
3119
3126
|
if ('text' in $$props) $$invalidate(1, text = $$props.text);
|
|
3120
3127
|
if ('value' in $$props) $$invalidate(2, value = $$props.value);
|
|
3121
|
-
if ('disabled' in $$props) $$invalidate(
|
|
3122
|
-
if ('error' in $$props) $$invalidate(
|
|
3128
|
+
if ('disabled' in $$props) $$invalidate(15, disabled = $$props.disabled);
|
|
3129
|
+
if ('error' in $$props) $$invalidate(16, error = $$props.error);
|
|
3123
3130
|
if ('testid' in $$props) $$invalidate(3, testid = $$props.testid);
|
|
3124
|
-
if ('
|
|
3125
|
-
if ('
|
|
3126
|
-
if ('
|
|
3127
|
-
if ('
|
|
3131
|
+
if ('arialabel' in $$props) $$invalidate(4, arialabel = $$props.arialabel);
|
|
3132
|
+
if ('mt' in $$props) $$invalidate(5, mt = $$props.mt);
|
|
3133
|
+
if ('mr' in $$props) $$invalidate(6, mr = $$props.mr);
|
|
3134
|
+
if ('mb' in $$props) $$invalidate(7, mb = $$props.mb);
|
|
3135
|
+
if ('ml' in $$props) $$invalidate(8, ml = $$props.ml);
|
|
3128
3136
|
};
|
|
3129
3137
|
|
|
3130
3138
|
$$self.$$.update = () => {
|
|
3131
|
-
if ($$self.$$.dirty & /*disabled*/
|
|
3139
|
+
if ($$self.$$.dirty & /*disabled*/ 32768) {
|
|
3132
3140
|
// Binding
|
|
3133
|
-
$$invalidate(
|
|
3141
|
+
$$invalidate(12, isDisabled = toBoolean(disabled));
|
|
3134
3142
|
}
|
|
3135
3143
|
|
|
3136
|
-
if ($$self.$$.dirty & /*error*/
|
|
3137
|
-
$$invalidate(
|
|
3144
|
+
if ($$self.$$.dirty & /*error*/ 65536) {
|
|
3145
|
+
$$invalidate(11, isError = toBoolean(error));
|
|
3138
3146
|
}
|
|
3139
3147
|
|
|
3140
|
-
if ($$self.$$.dirty & /*checked*/
|
|
3141
|
-
$$invalidate(
|
|
3148
|
+
if ($$self.$$.dirty & /*checked*/ 16384) {
|
|
3149
|
+
$$invalidate(9, isChecked = toBoolean(checked));
|
|
3142
3150
|
}
|
|
3143
3151
|
};
|
|
3144
3152
|
|
|
3145
|
-
$$invalidate(
|
|
3153
|
+
$$invalidate(10, isIndeterminate = false); // Desighn review. To be built with TreeView Later
|
|
3146
3154
|
|
|
3147
3155
|
return [
|
|
3148
3156
|
name,
|
|
3149
3157
|
text,
|
|
3150
3158
|
value,
|
|
3151
3159
|
testid,
|
|
3160
|
+
arialabel,
|
|
3152
3161
|
mt,
|
|
3153
3162
|
mr,
|
|
3154
3163
|
mb,
|
|
@@ -3181,16 +3190,17 @@ class Checkbox extends SvelteElement {
|
|
|
3181
3190
|
safe_not_equal,
|
|
3182
3191
|
{
|
|
3183
3192
|
name: 0,
|
|
3184
|
-
checked:
|
|
3193
|
+
checked: 14,
|
|
3185
3194
|
text: 1,
|
|
3186
3195
|
value: 2,
|
|
3187
|
-
disabled:
|
|
3188
|
-
error:
|
|
3196
|
+
disabled: 15,
|
|
3197
|
+
error: 16,
|
|
3189
3198
|
testid: 3,
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3199
|
+
arialabel: 4,
|
|
3200
|
+
mt: 5,
|
|
3201
|
+
mr: 6,
|
|
3202
|
+
mb: 7,
|
|
3203
|
+
ml: 8
|
|
3194
3204
|
},
|
|
3195
3205
|
null
|
|
3196
3206
|
);
|
|
@@ -3216,6 +3226,7 @@ class Checkbox extends SvelteElement {
|
|
|
3216
3226
|
"disabled",
|
|
3217
3227
|
"error",
|
|
3218
3228
|
"testid",
|
|
3229
|
+
"arialabel",
|
|
3219
3230
|
"mt",
|
|
3220
3231
|
"mr",
|
|
3221
3232
|
"mb",
|
|
@@ -3233,7 +3244,7 @@ class Checkbox extends SvelteElement {
|
|
|
3233
3244
|
}
|
|
3234
3245
|
|
|
3235
3246
|
get checked() {
|
|
3236
|
-
return this.$$.ctx[
|
|
3247
|
+
return this.$$.ctx[14];
|
|
3237
3248
|
}
|
|
3238
3249
|
|
|
3239
3250
|
set checked(checked) {
|
|
@@ -3260,7 +3271,7 @@ class Checkbox extends SvelteElement {
|
|
|
3260
3271
|
}
|
|
3261
3272
|
|
|
3262
3273
|
get disabled() {
|
|
3263
|
-
return this.$$.ctx[
|
|
3274
|
+
return this.$$.ctx[15];
|
|
3264
3275
|
}
|
|
3265
3276
|
|
|
3266
3277
|
set disabled(disabled) {
|
|
@@ -3269,7 +3280,7 @@ class Checkbox extends SvelteElement {
|
|
|
3269
3280
|
}
|
|
3270
3281
|
|
|
3271
3282
|
get error() {
|
|
3272
|
-
return this.$$.ctx[
|
|
3283
|
+
return this.$$.ctx[16];
|
|
3273
3284
|
}
|
|
3274
3285
|
|
|
3275
3286
|
set error(error) {
|
|
@@ -3286,17 +3297,26 @@ class Checkbox extends SvelteElement {
|
|
|
3286
3297
|
flush();
|
|
3287
3298
|
}
|
|
3288
3299
|
|
|
3289
|
-
get
|
|
3300
|
+
get arialabel() {
|
|
3290
3301
|
return this.$$.ctx[4];
|
|
3291
3302
|
}
|
|
3292
3303
|
|
|
3304
|
+
set arialabel(arialabel) {
|
|
3305
|
+
this.$$set({ arialabel });
|
|
3306
|
+
flush();
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
get mt() {
|
|
3310
|
+
return this.$$.ctx[5];
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3293
3313
|
set mt(mt) {
|
|
3294
3314
|
this.$$set({ mt });
|
|
3295
3315
|
flush();
|
|
3296
3316
|
}
|
|
3297
3317
|
|
|
3298
3318
|
get mr() {
|
|
3299
|
-
return this.$$.ctx[
|
|
3319
|
+
return this.$$.ctx[6];
|
|
3300
3320
|
}
|
|
3301
3321
|
|
|
3302
3322
|
set mr(mr) {
|
|
@@ -3305,7 +3325,7 @@ class Checkbox extends SvelteElement {
|
|
|
3305
3325
|
}
|
|
3306
3326
|
|
|
3307
3327
|
get mb() {
|
|
3308
|
-
return this.$$.ctx[
|
|
3328
|
+
return this.$$.ctx[7];
|
|
3309
3329
|
}
|
|
3310
3330
|
|
|
3311
3331
|
set mb(mb) {
|
|
@@ -3314,7 +3334,7 @@ class Checkbox extends SvelteElement {
|
|
|
3314
3334
|
}
|
|
3315
3335
|
|
|
3316
3336
|
get ml() {
|
|
3317
|
-
return this.$$.ctx[
|
|
3337
|
+
return this.$$.ctx[8];
|
|
3318
3338
|
}
|
|
3319
3339
|
|
|
3320
3340
|
set ml(ml) {
|
|
@@ -8404,7 +8424,7 @@ class Input extends SvelteElement {
|
|
|
8404
8424
|
constructor(options) {
|
|
8405
8425
|
super();
|
|
8406
8426
|
|
|
8407
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@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>')
|
|
8427
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@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)}.goa-input--disabled .prefix{border-right:1px solid var(--color-gray-200)}.goa-input--disabled .suffix{border-left:1px solid var(--color-gray-200)}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>')
|
|
8408
8428
|
center center no-repeat}</style>`;
|
|
8409
8429
|
|
|
8410
8430
|
init(
|
|
@@ -9974,21 +9994,22 @@ customElements.define("goa-page-block", PageBlock);
|
|
|
9974
9994
|
|
|
9975
9995
|
function get_each_context$1(ctx, list, i) {
|
|
9976
9996
|
const child_ctx = ctx.slice();
|
|
9977
|
-
child_ctx[
|
|
9997
|
+
child_ctx[20] = list[i];
|
|
9978
9998
|
return child_ctx;
|
|
9979
9999
|
}
|
|
9980
10000
|
|
|
9981
|
-
// (
|
|
10001
|
+
// (60:2) {#each options as option (option.value)}
|
|
9982
10002
|
function create_each_block$1(key_1, ctx) {
|
|
9983
10003
|
let label;
|
|
9984
10004
|
let input;
|
|
9985
10005
|
let input_value_value;
|
|
9986
10006
|
let input_checked_value;
|
|
10007
|
+
let input_aria_label_value;
|
|
9987
10008
|
let t0;
|
|
9988
10009
|
let div;
|
|
9989
10010
|
let t1;
|
|
9990
10011
|
let span;
|
|
9991
|
-
let t2_value = (/*option*/ ctx[
|
|
10012
|
+
let t2_value = (/*option*/ ctx[20].label || /*option*/ ctx[20].value) + "";
|
|
9992
10013
|
let t2;
|
|
9993
10014
|
let t3;
|
|
9994
10015
|
let label_data_testid_value;
|
|
@@ -9996,7 +10017,7 @@ function create_each_block$1(key_1, ctx) {
|
|
|
9996
10017
|
let dispose;
|
|
9997
10018
|
|
|
9998
10019
|
function change_handler() {
|
|
9999
|
-
return /*change_handler*/ ctx[
|
|
10020
|
+
return /*change_handler*/ ctx[18](/*option*/ ctx[20]);
|
|
10000
10021
|
}
|
|
10001
10022
|
|
|
10002
10023
|
return {
|
|
@@ -10013,15 +10034,16 @@ function create_each_block$1(key_1, ctx) {
|
|
|
10013
10034
|
t3 = space();
|
|
10014
10035
|
attr(input, "type", "radio");
|
|
10015
10036
|
attr(input, "name", /*name*/ ctx[1]);
|
|
10016
|
-
input.value = input_value_value = /*option*/ ctx[
|
|
10017
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
10018
|
-
input.checked = input_checked_value = /*option*/ ctx[
|
|
10037
|
+
input.value = input_value_value = /*option*/ ctx[20].value;
|
|
10038
|
+
input.disabled = /*isDisabled*/ ctx[12];
|
|
10039
|
+
input.checked = input_checked_value = /*option*/ ctx[20].value === /*value*/ ctx[0];
|
|
10040
|
+
attr(input, "aria-label", input_aria_label_value = /*arialabel*/ ctx[4] || /*name*/ ctx[1]);
|
|
10019
10041
|
attr(div, "class", "goa-radio-icon");
|
|
10020
10042
|
attr(span, "class", "goa-radio-label");
|
|
10021
|
-
attr(label, "data-testid", label_data_testid_value = "radio-option-" + /*option*/ ctx[
|
|
10043
|
+
attr(label, "data-testid", label_data_testid_value = "radio-option-" + /*option*/ ctx[20].value);
|
|
10022
10044
|
attr(label, "class", "goa-radio");
|
|
10023
|
-
toggle_class(label, "goa-radio--disabled", /*isDisabled*/ ctx[
|
|
10024
|
-
toggle_class(label, "goa-radio--error", /*isError*/ ctx[
|
|
10045
|
+
toggle_class(label, "goa-radio--disabled", /*isDisabled*/ ctx[12]);
|
|
10046
|
+
toggle_class(label, "goa-radio--error", /*isError*/ ctx[10]);
|
|
10025
10047
|
this.first = label;
|
|
10026
10048
|
},
|
|
10027
10049
|
m(target, anchor) {
|
|
@@ -10046,30 +10068,34 @@ function create_each_block$1(key_1, ctx) {
|
|
|
10046
10068
|
attr(input, "name", /*name*/ ctx[1]);
|
|
10047
10069
|
}
|
|
10048
10070
|
|
|
10049
|
-
if (dirty & /*options*/
|
|
10071
|
+
if (dirty & /*options*/ 512 && input_value_value !== (input_value_value = /*option*/ ctx[20].value)) {
|
|
10050
10072
|
input.value = input_value_value;
|
|
10051
10073
|
}
|
|
10052
10074
|
|
|
10053
|
-
if (dirty & /*isDisabled*/
|
|
10054
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
10075
|
+
if (dirty & /*isDisabled*/ 4096) {
|
|
10076
|
+
input.disabled = /*isDisabled*/ ctx[12];
|
|
10055
10077
|
}
|
|
10056
10078
|
|
|
10057
|
-
if (dirty & /*options, value*/
|
|
10079
|
+
if (dirty & /*options, value*/ 513 && input_checked_value !== (input_checked_value = /*option*/ ctx[20].value === /*value*/ ctx[0])) {
|
|
10058
10080
|
input.checked = input_checked_value;
|
|
10059
10081
|
}
|
|
10060
10082
|
|
|
10061
|
-
if (dirty & /*
|
|
10083
|
+
if (dirty & /*arialabel, name*/ 18 && input_aria_label_value !== (input_aria_label_value = /*arialabel*/ ctx[4] || /*name*/ ctx[1])) {
|
|
10084
|
+
attr(input, "aria-label", input_aria_label_value);
|
|
10085
|
+
}
|
|
10086
|
+
|
|
10087
|
+
if (dirty & /*options*/ 512 && t2_value !== (t2_value = (/*option*/ ctx[20].label || /*option*/ ctx[20].value) + "")) set_data(t2, t2_value);
|
|
10062
10088
|
|
|
10063
|
-
if (dirty & /*options*/
|
|
10089
|
+
if (dirty & /*options*/ 512 && label_data_testid_value !== (label_data_testid_value = "radio-option-" + /*option*/ ctx[20].value)) {
|
|
10064
10090
|
attr(label, "data-testid", label_data_testid_value);
|
|
10065
10091
|
}
|
|
10066
10092
|
|
|
10067
|
-
if (dirty & /*isDisabled*/
|
|
10068
|
-
toggle_class(label, "goa-radio--disabled", /*isDisabled*/ ctx[
|
|
10093
|
+
if (dirty & /*isDisabled*/ 4096) {
|
|
10094
|
+
toggle_class(label, "goa-radio--disabled", /*isDisabled*/ ctx[12]);
|
|
10069
10095
|
}
|
|
10070
10096
|
|
|
10071
|
-
if (dirty & /*isError*/
|
|
10072
|
-
toggle_class(label, "goa-radio--error", /*isError*/ ctx[
|
|
10097
|
+
if (dirty & /*isError*/ 1024) {
|
|
10098
|
+
toggle_class(label, "goa-radio--error", /*isError*/ ctx[10]);
|
|
10073
10099
|
}
|
|
10074
10100
|
},
|
|
10075
10101
|
d(detaching) {
|
|
@@ -10088,8 +10114,8 @@ function create_fragment$c(ctx) {
|
|
|
10088
10114
|
let each_1_lookup = new Map();
|
|
10089
10115
|
let div_style_value;
|
|
10090
10116
|
let div_class_value;
|
|
10091
|
-
let each_value = /*options*/ ctx[
|
|
10092
|
-
const get_key = ctx => /*option*/ ctx[
|
|
10117
|
+
let each_value = /*options*/ ctx[9];
|
|
10118
|
+
const get_key = ctx => /*option*/ ctx[20].value;
|
|
10093
10119
|
|
|
10094
10120
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
10095
10121
|
let child_ctx = get_each_context$1(ctx, each_value, i);
|
|
@@ -10108,7 +10134,7 @@ function create_fragment$c(ctx) {
|
|
|
10108
10134
|
}
|
|
10109
10135
|
|
|
10110
10136
|
this.c = noop;
|
|
10111
|
-
attr(div, "style", div_style_value = calculateMargin(/*mt*/ ctx[
|
|
10137
|
+
attr(div, "style", div_style_value = calculateMargin(/*mt*/ ctx[5], /*mr*/ ctx[6], /*mb*/ ctx[7], /*ml*/ ctx[8]));
|
|
10112
10138
|
attr(div, "class", div_class_value = `goa-radio-group--${/*orientation*/ ctx[2]}`);
|
|
10113
10139
|
attr(div, "data-testid", /*testid*/ ctx[3]);
|
|
10114
10140
|
},
|
|
@@ -10121,15 +10147,15 @@ function create_fragment$c(ctx) {
|
|
|
10121
10147
|
each_blocks[i].m(div, null);
|
|
10122
10148
|
}
|
|
10123
10149
|
|
|
10124
|
-
/*div_binding*/ ctx[
|
|
10150
|
+
/*div_binding*/ ctx[19](div);
|
|
10125
10151
|
},
|
|
10126
10152
|
p(ctx, [dirty]) {
|
|
10127
|
-
if (dirty & /*options, isDisabled, isError, name, value, onChange*/
|
|
10128
|
-
each_value = /*options*/ ctx[
|
|
10153
|
+
if (dirty & /*options, isDisabled, isError, name, value, arialabel, onChange*/ 13843) {
|
|
10154
|
+
each_value = /*options*/ ctx[9];
|
|
10129
10155
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, destroy_block, create_each_block$1, null, get_each_context$1);
|
|
10130
10156
|
}
|
|
10131
10157
|
|
|
10132
|
-
if (dirty & /*mt, mr, mb, ml*/
|
|
10158
|
+
if (dirty & /*mt, mr, mb, ml*/ 480 && div_style_value !== (div_style_value = calculateMargin(/*mt*/ ctx[5], /*mr*/ ctx[6], /*mb*/ ctx[7], /*ml*/ ctx[8]))) {
|
|
10133
10159
|
attr(div, "style", div_style_value);
|
|
10134
10160
|
}
|
|
10135
10161
|
|
|
@@ -10150,7 +10176,7 @@ function create_fragment$c(ctx) {
|
|
|
10150
10176
|
each_blocks[i].d();
|
|
10151
10177
|
}
|
|
10152
10178
|
|
|
10153
|
-
/*div_binding*/ ctx[
|
|
10179
|
+
/*div_binding*/ ctx[19](null);
|
|
10154
10180
|
}
|
|
10155
10181
|
};
|
|
10156
10182
|
}
|
|
@@ -10163,6 +10189,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10163
10189
|
let { disabled = "false" } = $$props;
|
|
10164
10190
|
let { error = "false" } = $$props;
|
|
10165
10191
|
let { testid = "" } = $$props;
|
|
10192
|
+
let { arialabel = "" } = $$props;
|
|
10166
10193
|
let { mt = null } = $$props;
|
|
10167
10194
|
let { mr = null } = $$props;
|
|
10168
10195
|
let { mb = null } = $$props;
|
|
@@ -10191,7 +10218,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10191
10218
|
function div_binding($$value) {
|
|
10192
10219
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
10193
10220
|
el = $$value;
|
|
10194
|
-
$$invalidate(
|
|
10221
|
+
$$invalidate(11, el);
|
|
10195
10222
|
});
|
|
10196
10223
|
}
|
|
10197
10224
|
|
|
@@ -10199,33 +10226,34 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10199
10226
|
if ('name' in $$props) $$invalidate(1, name = $$props.name);
|
|
10200
10227
|
if ('value' in $$props) $$invalidate(0, value = $$props.value);
|
|
10201
10228
|
if ('orientation' in $$props) $$invalidate(2, orientation = $$props.orientation);
|
|
10202
|
-
if ('disabled' in $$props) $$invalidate(
|
|
10203
|
-
if ('error' in $$props) $$invalidate(
|
|
10229
|
+
if ('disabled' in $$props) $$invalidate(14, disabled = $$props.disabled);
|
|
10230
|
+
if ('error' in $$props) $$invalidate(15, error = $$props.error);
|
|
10204
10231
|
if ('testid' in $$props) $$invalidate(3, testid = $$props.testid);
|
|
10205
|
-
if ('
|
|
10206
|
-
if ('
|
|
10207
|
-
if ('
|
|
10208
|
-
if ('
|
|
10232
|
+
if ('arialabel' in $$props) $$invalidate(4, arialabel = $$props.arialabel);
|
|
10233
|
+
if ('mt' in $$props) $$invalidate(5, mt = $$props.mt);
|
|
10234
|
+
if ('mr' in $$props) $$invalidate(6, mr = $$props.mr);
|
|
10235
|
+
if ('mb' in $$props) $$invalidate(7, mb = $$props.mb);
|
|
10236
|
+
if ('ml' in $$props) $$invalidate(8, ml = $$props.ml);
|
|
10209
10237
|
};
|
|
10210
10238
|
|
|
10211
10239
|
$$self.$$.update = () => {
|
|
10212
|
-
if ($$self.$$.dirty & /*disabled*/
|
|
10213
|
-
$$invalidate(
|
|
10240
|
+
if ($$self.$$.dirty & /*disabled*/ 16384) {
|
|
10241
|
+
$$invalidate(12, isDisabled = toBoolean(disabled));
|
|
10214
10242
|
}
|
|
10215
10243
|
|
|
10216
|
-
if ($$self.$$.dirty & /*error*/
|
|
10217
|
-
$$invalidate(
|
|
10244
|
+
if ($$self.$$.dirty & /*error*/ 32768) {
|
|
10245
|
+
$$invalidate(10, isError = toBoolean(error));
|
|
10218
10246
|
}
|
|
10219
10247
|
|
|
10220
|
-
if ($$self.$$.dirty & /*name, isBound, ctx, options*/
|
|
10248
|
+
if ($$self.$$.dirty & /*name, isBound, ctx, options*/ 197122) {
|
|
10221
10249
|
{
|
|
10222
10250
|
if (name && !isBound) {
|
|
10223
|
-
$$invalidate(
|
|
10224
|
-
$$invalidate(
|
|
10251
|
+
$$invalidate(17, isBound = true);
|
|
10252
|
+
$$invalidate(16, ctx = getContext(name));
|
|
10225
10253
|
|
|
10226
10254
|
ctx.subscribe(msg => {
|
|
10227
10255
|
if (!msg) return;
|
|
10228
|
-
$$invalidate(
|
|
10256
|
+
$$invalidate(9, options = [...options, msg]);
|
|
10229
10257
|
});
|
|
10230
10258
|
}
|
|
10231
10259
|
}
|
|
@@ -10237,6 +10265,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10237
10265
|
name,
|
|
10238
10266
|
orientation,
|
|
10239
10267
|
testid,
|
|
10268
|
+
arialabel,
|
|
10240
10269
|
mt,
|
|
10241
10270
|
mr,
|
|
10242
10271
|
mb,
|
|
@@ -10277,13 +10306,14 @@ class RadioGroup extends SvelteElement {
|
|
|
10277
10306
|
name: 1,
|
|
10278
10307
|
value: 0,
|
|
10279
10308
|
orientation: 2,
|
|
10280
|
-
disabled:
|
|
10281
|
-
error:
|
|
10309
|
+
disabled: 14,
|
|
10310
|
+
error: 15,
|
|
10282
10311
|
testid: 3,
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10312
|
+
arialabel: 4,
|
|
10313
|
+
mt: 5,
|
|
10314
|
+
mr: 6,
|
|
10315
|
+
mb: 7,
|
|
10316
|
+
ml: 8
|
|
10287
10317
|
},
|
|
10288
10318
|
null
|
|
10289
10319
|
);
|
|
@@ -10308,6 +10338,7 @@ class RadioGroup extends SvelteElement {
|
|
|
10308
10338
|
"disabled",
|
|
10309
10339
|
"error",
|
|
10310
10340
|
"testid",
|
|
10341
|
+
"arialabel",
|
|
10311
10342
|
"mt",
|
|
10312
10343
|
"mr",
|
|
10313
10344
|
"mb",
|
|
@@ -10343,7 +10374,7 @@ class RadioGroup extends SvelteElement {
|
|
|
10343
10374
|
}
|
|
10344
10375
|
|
|
10345
10376
|
get disabled() {
|
|
10346
|
-
return this.$$.ctx[
|
|
10377
|
+
return this.$$.ctx[14];
|
|
10347
10378
|
}
|
|
10348
10379
|
|
|
10349
10380
|
set disabled(disabled) {
|
|
@@ -10352,7 +10383,7 @@ class RadioGroup extends SvelteElement {
|
|
|
10352
10383
|
}
|
|
10353
10384
|
|
|
10354
10385
|
get error() {
|
|
10355
|
-
return this.$$.ctx[
|
|
10386
|
+
return this.$$.ctx[15];
|
|
10356
10387
|
}
|
|
10357
10388
|
|
|
10358
10389
|
set error(error) {
|
|
@@ -10369,17 +10400,26 @@ class RadioGroup extends SvelteElement {
|
|
|
10369
10400
|
flush();
|
|
10370
10401
|
}
|
|
10371
10402
|
|
|
10372
|
-
get
|
|
10403
|
+
get arialabel() {
|
|
10373
10404
|
return this.$$.ctx[4];
|
|
10374
10405
|
}
|
|
10375
10406
|
|
|
10407
|
+
set arialabel(arialabel) {
|
|
10408
|
+
this.$$set({ arialabel });
|
|
10409
|
+
flush();
|
|
10410
|
+
}
|
|
10411
|
+
|
|
10412
|
+
get mt() {
|
|
10413
|
+
return this.$$.ctx[5];
|
|
10414
|
+
}
|
|
10415
|
+
|
|
10376
10416
|
set mt(mt) {
|
|
10377
10417
|
this.$$set({ mt });
|
|
10378
10418
|
flush();
|
|
10379
10419
|
}
|
|
10380
10420
|
|
|
10381
10421
|
get mr() {
|
|
10382
|
-
return this.$$.ctx[
|
|
10422
|
+
return this.$$.ctx[6];
|
|
10383
10423
|
}
|
|
10384
10424
|
|
|
10385
10425
|
set mr(mr) {
|
|
@@ -10388,7 +10428,7 @@ class RadioGroup extends SvelteElement {
|
|
|
10388
10428
|
}
|
|
10389
10429
|
|
|
10390
10430
|
get mb() {
|
|
10391
|
-
return this.$$.ctx[
|
|
10431
|
+
return this.$$.ctx[7];
|
|
10392
10432
|
}
|
|
10393
10433
|
|
|
10394
10434
|
set mb(mb) {
|
|
@@ -10397,7 +10437,7 @@ class RadioGroup extends SvelteElement {
|
|
|
10397
10437
|
}
|
|
10398
10438
|
|
|
10399
10439
|
get ml() {
|
|
10400
|
-
return this.$$.ctx[
|
|
10440
|
+
return this.$$.ctx[8];
|
|
10401
10441
|
}
|
|
10402
10442
|
|
|
10403
10443
|
set ml(ml) {
|