@forgerock/login-widget 1.2.0-beta.12 → 1.2.0-beta.13

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/index.js CHANGED
@@ -12454,6 +12454,7 @@ const styleSchema = z
12454
12454
  .object({
12455
12455
  checksAndRadios: z.union([z.literal('animated'), z.literal('standard')]).optional(),
12456
12456
  labels: z.union([z.literal('floating').optional(), z.literal('stacked')]).optional(),
12457
+ showPassword: z.union([z.literal('none'), z.literal('button'), z.literal('checkbox')]).optional(),
12457
12458
  logo: logoSchema.optional(),
12458
12459
  sections: z
12459
12460
  .object({
@@ -12473,6 +12474,7 @@ styleSchema.partial();
12473
12474
  const fallbackStyles = {
12474
12475
  checksAndRadios: 'animated',
12475
12476
  labels: 'floating',
12477
+ showPassword: 'button',
12476
12478
  logo: undefined,
12477
12479
  sections: undefined,
12478
12480
  stage: undefined,
@@ -12486,8 +12488,19 @@ const styleStore = writable(fallbackStyles);
12486
12488
  */
12487
12489
  function initialize(customStyle) {
12488
12490
  if (customStyle) {
12489
- styleSchema.parse(customStyle);
12490
- styleStore.set(customStyle);
12491
+ /*
12492
+ Helper function to safely assign keys to strict object
12493
+ */
12494
+ const accessStrictType = (str) => {
12495
+ return customStyle[str];
12496
+ };
12497
+ const newStyleConfig = Object.keys(customStyle).reduce((acc, key) => {
12498
+ if (accessStrictType(key) === undefined || accessStrictType(key) === null) {
12499
+ return acc;
12500
+ }
12501
+ return { ...acc, [key]: accessStrictType(key) };
12502
+ }, fallbackStyles);
12503
+ styleStore.set(newStyleConfig);
12491
12504
  }
12492
12505
  else {
12493
12506
  styleStore.set(fallbackStyles);
@@ -12837,7 +12850,7 @@ function create_else_block$d(ctx) {
12837
12850
  }
12838
12851
 
12839
12852
  // (11:0) {#if html}
12840
- function create_if_block$v(ctx) {
12853
+ function create_if_block$w(ctx) {
12841
12854
  let current;
12842
12855
  const default_slot_template = /*#slots*/ ctx[5].default;
12843
12856
  const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[4], null);
@@ -12939,7 +12952,7 @@ function create_fragment$18(ctx) {
12939
12952
  let if_block;
12940
12953
  let if_block_anchor;
12941
12954
  let current;
12942
- const if_block_creators = [create_if_block$v, create_else_block$d];
12955
+ const if_block_creators = [create_if_block$w, create_else_block$d];
12943
12956
  const if_blocks = [];
12944
12957
 
12945
12958
  function select_block_type(ctx, dirty) {
@@ -13154,7 +13167,7 @@ function create_else_block$c(ctx) {
13154
13167
  }
13155
13168
  });
13156
13169
 
13157
- let if_block = /*$styleStore*/ ctx[5]?.logo && create_if_block_1$f(ctx);
13170
+ let if_block = /*$styleStore*/ ctx[5]?.logo && create_if_block_1$h(ctx);
13158
13171
 
13159
13172
  return {
13160
13173
  c() {
@@ -13200,7 +13213,7 @@ function create_else_block$c(ctx) {
13200
13213
  if (if_block) {
13201
13214
  if_block.p(ctx, dirty);
13202
13215
  } else {
13203
- if_block = create_if_block_1$f(ctx);
13216
+ if_block = create_if_block_1$h(ctx);
13204
13217
  if_block.c();
13205
13218
  if_block.m(div, null);
13206
13219
  }
@@ -13235,7 +13248,7 @@ function create_else_block$c(ctx) {
13235
13248
  }
13236
13249
 
13237
13250
  // (39:2) {#if withHeader}
13238
- function create_if_block$u(ctx) {
13251
+ function create_if_block$v(ctx) {
13239
13252
  let div1;
13240
13253
  let div0;
13241
13254
  let div0_style_value;
@@ -13357,7 +13370,7 @@ function create_default_slot_1$i(ctx) {
13357
13370
  }
13358
13371
 
13359
13372
  // (77:6) {#if $styleStore?.logo}
13360
- function create_if_block_1$f(ctx) {
13373
+ function create_if_block_1$h(ctx) {
13361
13374
  let div;
13362
13375
  let div_style_value;
13363
13376
 
@@ -13419,7 +13432,7 @@ function create_fragment$16(ctx) {
13419
13432
  let div;
13420
13433
  let dialog_class_value;
13421
13434
  let current;
13422
- const if_block_creators = [create_if_block$u, create_else_block$c];
13435
+ const if_block_creators = [create_if_block$v, create_else_block$c];
13423
13436
  const if_blocks = [];
13424
13437
 
13425
13438
  function select_block_type(ctx, dirty) {
@@ -13947,7 +13960,7 @@ function create_else_block$b(ctx) {
13947
13960
  }
13948
13961
 
13949
13962
  // (44:33)
13950
- function create_if_block_1$e(ctx) {
13963
+ function create_if_block_1$g(ctx) {
13951
13964
  let warningicon;
13952
13965
  let current;
13953
13966
  warningicon = new Warning_icon({});
@@ -13976,7 +13989,7 @@ function create_if_block_1$e(ctx) {
13976
13989
  }
13977
13990
 
13978
13991
  // (42:4) {#if type === 'error'}
13979
- function create_if_block$t(ctx) {
13992
+ function create_if_block$u(ctx) {
13980
13993
  let alerticon;
13981
13994
  let current;
13982
13995
  alerticon = new Alert_icon({});
@@ -14014,7 +14027,7 @@ function create_fragment$12(ctx) {
14014
14027
  let div_class_value;
14015
14028
  let div_role_value;
14016
14029
  let current;
14017
- const if_block_creators = [create_if_block$t, create_if_block_1$e, create_else_block$b];
14030
+ const if_block_creators = [create_if_block$u, create_if_block_1$g, create_else_block$b];
14018
14031
  const if_blocks = [];
14019
14032
 
14020
14033
  function select_block_type(ctx, dirty) {
@@ -14254,7 +14267,7 @@ class Spinner extends SvelteComponent {
14254
14267
 
14255
14268
  /* src/lib/components/primitives/button/button.svelte generated by Svelte v3.59.2 */
14256
14269
 
14257
- function create_if_block$s(ctx) {
14270
+ function create_if_block$t(ctx) {
14258
14271
  let spinner;
14259
14272
  let current;
14260
14273
 
@@ -14312,7 +14325,7 @@ function create_fragment$10(ctx) {
14312
14325
  let current;
14313
14326
  let mounted;
14314
14327
  let dispose;
14315
- let if_block = /*busy*/ ctx[0] && create_if_block$s();
14328
+ let if_block = /*busy*/ ctx[0] && create_if_block$t();
14316
14329
  const default_slot_template = /*#slots*/ ctx[7].default;
14317
14330
  const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
14318
14331
  const default_slot_or_fallback = default_slot || fallback_block$1();
@@ -14354,7 +14367,7 @@ function create_fragment$10(ctx) {
14354
14367
  transition_in(if_block, 1);
14355
14368
  }
14356
14369
  } else {
14357
- if_block = create_if_block$s();
14370
+ if_block = create_if_block$t();
14358
14371
  if_block.c();
14359
14372
  transition_in(if_block, 1);
14360
14373
  if_block.m(button, t);
@@ -14757,7 +14770,7 @@ function create_else_block$a(ctx) {
14757
14770
  }
14758
14771
 
14759
14772
  // (10:0) {#if html}
14760
- function create_if_block$r(ctx) {
14773
+ function create_if_block$s(ctx) {
14761
14774
  let current;
14762
14775
  const default_slot_template = /*#slots*/ ctx[4].default;
14763
14776
  const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
@@ -14859,7 +14872,7 @@ function create_fragment$_(ctx) {
14859
14872
  let if_block;
14860
14873
  let if_block_anchor;
14861
14874
  let current;
14862
- const if_block_creators = [create_if_block$r, create_else_block$a];
14875
+ const if_block_creators = [create_if_block$s, create_else_block$a];
14863
14876
  const if_blocks = [];
14864
14877
 
14865
14878
  function select_block_type(ctx, dirty) {
@@ -15054,7 +15067,7 @@ class Shield_icon extends SvelteComponent {
15054
15067
 
15055
15068
  /* src/lib/journey/stages/_utilities/back-to.svelte generated by Svelte v3.59.2 */
15056
15069
 
15057
- function create_if_block$q(ctx) {
15070
+ function create_if_block$r(ctx) {
15058
15071
  let p;
15059
15072
  let button;
15060
15073
  let t_value = interpolate(/*string*/ ctx[1]) + "";
@@ -15092,7 +15105,7 @@ function create_if_block$q(ctx) {
15092
15105
 
15093
15106
  function create_fragment$Y(ctx) {
15094
15107
  let if_block_anchor;
15095
- let if_block = /*$stack*/ ctx[2].length > 1 && create_if_block$q(ctx);
15108
+ let if_block = /*$stack*/ ctx[2].length > 1 && create_if_block$r(ctx);
15096
15109
 
15097
15110
  return {
15098
15111
  c() {
@@ -15108,7 +15121,7 @@ function create_fragment$Y(ctx) {
15108
15121
  if (if_block) {
15109
15122
  if_block.p(ctx, dirty);
15110
15123
  } else {
15111
- if_block = create_if_block$q(ctx);
15124
+ if_block = create_if_block$r(ctx);
15112
15125
  if_block.c();
15113
15126
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
15114
15127
  }
@@ -15631,7 +15644,7 @@ function getAttributeValidationFailureText(callback) {
15631
15644
 
15632
15645
  /* src/lib/components/primitives/message/input-message.svelte generated by Svelte v3.59.2 */
15633
15646
 
15634
- function create_if_block$p(ctx) {
15647
+ function create_if_block$q(ctx) {
15635
15648
  let p;
15636
15649
  let p_class_value;
15637
15650
  let p_id_value;
@@ -15664,7 +15677,7 @@ function create_if_block$p(ctx) {
15664
15677
 
15665
15678
  function create_fragment$X(ctx) {
15666
15679
  let if_block_anchor;
15667
- let if_block = /*dirtyMessage*/ ctx[1] && create_if_block$p(ctx);
15680
+ let if_block = /*dirtyMessage*/ ctx[1] && create_if_block$q(ctx);
15668
15681
 
15669
15682
  return {
15670
15683
  c() {
@@ -15680,7 +15693,7 @@ function create_fragment$X(ctx) {
15680
15693
  if (if_block) {
15681
15694
  if_block.p(ctx, dirty);
15682
15695
  } else {
15683
- if_block = create_if_block$p(ctx);
15696
+ if_block = create_if_block$q(ctx);
15684
15697
  if_block.c();
15685
15698
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
15686
15699
  }
@@ -17588,7 +17601,7 @@ function get_each_context$a(ctx, list, i) {
17588
17601
  }
17589
17602
 
17590
17603
  // (39:0) {#if labelOrder === 'first'}
17591
- function create_if_block_1$d(ctx) {
17604
+ function create_if_block_1$f(ctx) {
17592
17605
  let label_1;
17593
17606
  let current;
17594
17607
 
@@ -17697,7 +17710,7 @@ function create_each_block$a(ctx) {
17697
17710
  }
17698
17711
 
17699
17712
  // (61:0) {#if labelOrder === 'last'}
17700
- function create_if_block$o(ctx) {
17713
+ function create_if_block$p(ctx) {
17701
17714
  let label_1;
17702
17715
  let current;
17703
17716
 
@@ -17779,7 +17792,7 @@ function create_fragment$O(ctx) {
17779
17792
  let current;
17780
17793
  let mounted;
17781
17794
  let dispose;
17782
- let if_block0 = /*labelOrder*/ ctx[7] === 'first' && create_if_block_1$d(ctx);
17795
+ let if_block0 = /*labelOrder*/ ctx[7] === 'first' && create_if_block_1$f(ctx);
17783
17796
  let each_value = /*options*/ ctx[8];
17784
17797
  let each_blocks = [];
17785
17798
 
@@ -17787,7 +17800,7 @@ function create_fragment$O(ctx) {
17787
17800
  each_blocks[i] = create_each_block$a(get_each_context$a(ctx, each_value, i));
17788
17801
  }
17789
17802
 
17790
- let if_block1 = /*labelOrder*/ ctx[7] === 'last' && create_if_block$o(ctx);
17803
+ let if_block1 = /*labelOrder*/ ctx[7] === 'last' && create_if_block$p(ctx);
17791
17804
 
17792
17805
  return {
17793
17806
  c() {
@@ -17843,7 +17856,7 @@ function create_fragment$O(ctx) {
17843
17856
  transition_in(if_block0, 1);
17844
17857
  }
17845
17858
  } else {
17846
- if_block0 = create_if_block_1$d(ctx);
17859
+ if_block0 = create_if_block_1$f(ctx);
17847
17860
  if_block0.c();
17848
17861
  transition_in(if_block0, 1);
17849
17862
  if_block0.m(t0.parentNode, t0);
@@ -17911,7 +17924,7 @@ function create_fragment$O(ctx) {
17911
17924
  transition_in(if_block1, 1);
17912
17925
  }
17913
17926
  } else {
17914
- if_block1 = create_if_block$o(ctx);
17927
+ if_block1 = create_if_block$p(ctx);
17915
17928
  if_block1.c();
17916
17929
  transition_in(if_block1, 1);
17917
17930
  if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
@@ -18417,7 +18430,7 @@ function create_else_block$9(ctx) {
18417
18430
  }
18418
18431
 
18419
18432
  // (52:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
18420
- function create_if_block$n(ctx) {
18433
+ function create_if_block$o(ctx) {
18421
18434
  let radio;
18422
18435
  let current;
18423
18436
 
@@ -18472,7 +18485,7 @@ function create_fragment$L(ctx) {
18472
18485
  let if_block;
18473
18486
  let if_block_anchor;
18474
18487
  let current;
18475
- const if_block_creators = [create_if_block$n, create_else_block$9];
18488
+ const if_block_creators = [create_if_block$o, create_else_block$9];
18476
18489
  const if_blocks = [];
18477
18490
 
18478
18491
  function select_block_type(ctx, dirty) {
@@ -18794,12 +18807,12 @@ function create_else_block_1(ctx) {
18794
18807
  }
18795
18808
 
18796
18809
  // (80:0) {#if !stepMetadata?.derived.isStepSelfSubmittable()}
18797
- function create_if_block$m(ctx) {
18810
+ function create_if_block$n(ctx) {
18798
18811
  let current_block_type_index;
18799
18812
  let if_block;
18800
18813
  let if_block_anchor;
18801
18814
  let current;
18802
- const if_block_creators = [create_if_block_1$c, create_else_block$8];
18815
+ const if_block_creators = [create_if_block_1$e, create_else_block$8];
18803
18816
  const if_blocks = [];
18804
18817
 
18805
18818
  function select_block_type_1(ctx, dirty) {
@@ -18864,7 +18877,7 @@ function create_if_block$m(ctx) {
18864
18877
  }
18865
18878
 
18866
18879
  // (104:6) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
18867
- function create_default_slot_2$6(ctx) {
18880
+ function create_default_slot_2$8(ctx) {
18868
18881
  let t0_value = /*opt*/ ctx[15].text + "";
18869
18882
  let t0;
18870
18883
  let t1;
@@ -18905,7 +18918,7 @@ function create_each_block$9(ctx) {
18905
18918
  type: "button",
18906
18919
  width: "auto",
18907
18920
  onClick: func,
18908
- $$slots: { default: [create_default_slot_2$6] },
18921
+ $$slots: { default: [create_default_slot_2$8] },
18909
18922
  $$scope: { ctx }
18910
18923
  }
18911
18924
  });
@@ -19087,7 +19100,7 @@ function create_else_block$8(ctx) {
19087
19100
  }
19088
19101
 
19089
19102
  // (81:2) {#if options.length > 1}
19090
- function create_if_block_1$c(ctx) {
19103
+ function create_if_block_1$e(ctx) {
19091
19104
  let select;
19092
19105
  let current;
19093
19106
 
@@ -19160,7 +19173,7 @@ function create_fragment$J(ctx) {
19160
19173
  let if_block;
19161
19174
  let if_block_anchor;
19162
19175
  let current;
19163
- const if_block_creators = [create_if_block$m, create_else_block_1];
19176
+ const if_block_creators = [create_if_block$n, create_else_block_1];
19164
19177
  const if_blocks = [];
19165
19178
 
19166
19179
  function select_block_type(ctx, dirty) {
@@ -19794,7 +19807,7 @@ function create_if_block_3$8(ctx) {
19794
19807
  }
19795
19808
 
19796
19809
  // (97:0) {#if type === 'phone'}
19797
- function create_if_block_2$9(ctx) {
19810
+ function create_if_block_2$a(ctx) {
19798
19811
  let input;
19799
19812
  let input_aria_describedby_value;
19800
19813
  let input_class_value;
@@ -19874,7 +19887,7 @@ function create_if_block_2$9(ctx) {
19874
19887
  }
19875
19888
 
19876
19889
  // (113:0) {#if type === 'text'}
19877
- function create_if_block_1$b(ctx) {
19890
+ function create_if_block_1$d(ctx) {
19878
19891
  let input;
19879
19892
  let input_aria_describedby_value;
19880
19893
  let input_class_value;
@@ -19954,7 +19967,7 @@ function create_if_block_1$b(ctx) {
19954
19967
  }
19955
19968
 
19956
19969
  // (129:0) {#if labelOrder === 'last'}
19957
- function create_if_block$l(ctx) {
19970
+ function create_if_block$m(ctx) {
19958
19971
  let label_1;
19959
19972
  let current;
19960
19973
 
@@ -20036,9 +20049,9 @@ function create_fragment$I(ctx) {
20036
20049
  let if_block2 = /*type*/ ctx[11] === 'email' && create_if_block_5$2(ctx);
20037
20050
  let if_block3 = /*type*/ ctx[11] === 'number' && create_if_block_4$5(ctx);
20038
20051
  let if_block4 = /*type*/ ctx[11] === 'password' && create_if_block_3$8(ctx);
20039
- let if_block5 = /*type*/ ctx[11] === 'phone' && create_if_block_2$9(ctx);
20040
- let if_block6 = /*type*/ ctx[11] === 'text' && create_if_block_1$b(ctx);
20041
- let if_block7 = /*labelOrder*/ ctx[6] === 'last' && create_if_block$l(ctx);
20052
+ let if_block5 = /*type*/ ctx[11] === 'phone' && create_if_block_2$a(ctx);
20053
+ let if_block6 = /*type*/ ctx[11] === 'text' && create_if_block_1$d(ctx);
20054
+ let if_block7 = /*labelOrder*/ ctx[6] === 'last' && create_if_block$m(ctx);
20042
20055
 
20043
20056
  return {
20044
20057
  c() {
@@ -20158,7 +20171,7 @@ function create_fragment$I(ctx) {
20158
20171
  if (if_block5) {
20159
20172
  if_block5.p(ctx, dirty);
20160
20173
  } else {
20161
- if_block5 = create_if_block_2$9(ctx);
20174
+ if_block5 = create_if_block_2$a(ctx);
20162
20175
  if_block5.c();
20163
20176
  if_block5.m(t5.parentNode, t5);
20164
20177
  }
@@ -20171,7 +20184,7 @@ function create_fragment$I(ctx) {
20171
20184
  if (if_block6) {
20172
20185
  if_block6.p(ctx, dirty);
20173
20186
  } else {
20174
- if_block6 = create_if_block_1$b(ctx);
20187
+ if_block6 = create_if_block_1$d(ctx);
20175
20188
  if_block6.c();
20176
20189
  if_block6.m(t6.parentNode, t6);
20177
20190
  }
@@ -20188,7 +20201,7 @@ function create_fragment$I(ctx) {
20188
20201
  transition_in(if_block7, 1);
20189
20202
  }
20190
20203
  } else {
20191
- if_block7 = create_if_block$l(ctx);
20204
+ if_block7 = create_if_block$m(ctx);
20192
20205
  if_block7.c();
20193
20206
  transition_in(if_block7, 1);
20194
20207
  if_block7.m(if_block7_anchor.parentNode, if_block7_anchor);
@@ -21047,7 +21060,7 @@ class Lock_icon extends SvelteComponent {
21047
21060
 
21048
21061
  /* src/lib/journey/callbacks/kba/kba-create.svelte generated by Svelte v3.59.2 */
21049
21062
 
21050
- function create_if_block$k(ctx) {
21063
+ function create_if_block$l(ctx) {
21051
21064
  let input;
21052
21065
  let current;
21053
21066
 
@@ -21128,7 +21141,7 @@ function create_fragment$E(ctx) {
21128
21141
  }
21129
21142
  });
21130
21143
 
21131
- let if_block = /*displayCustomQuestionInput*/ ctx[3] && create_if_block$k(ctx);
21144
+ let if_block = /*displayCustomQuestionInput*/ ctx[3] && create_if_block$l(ctx);
21132
21145
 
21133
21146
  function input_value_binding(value) {
21134
21147
  /*input_value_binding*/ ctx[21](value);
@@ -21207,7 +21220,7 @@ function create_fragment$E(ctx) {
21207
21220
  transition_in(if_block, 1);
21208
21221
  }
21209
21222
  } else {
21210
- if_block = create_if_block$k(ctx);
21223
+ if_block = create_if_block$l(ctx);
21211
21224
  if_block.c();
21212
21225
  transition_in(if_block, 1);
21213
21226
  if_block.m(fieldset, t6);
@@ -21693,7 +21706,7 @@ function create_else_block$7(ctx) {
21693
21706
  }
21694
21707
 
21695
21708
  // (6:0) {#if !visible}
21696
- function create_if_block$j(ctx) {
21709
+ function create_if_block$k(ctx) {
21697
21710
  let svg;
21698
21711
  let path0;
21699
21712
  let path1;
@@ -21779,7 +21792,7 @@ function create_fragment$C(ctx) {
21779
21792
  let if_block;
21780
21793
  let if_block_anchor;
21781
21794
  let current;
21782
- const if_block_creators = [create_if_block$j, create_else_block$7];
21795
+ const if_block_creators = [create_if_block$k, create_else_block$7];
21783
21796
  const if_blocks = [];
21784
21797
 
21785
21798
  function select_block_type(ctx, dirty) {
@@ -21868,10 +21881,10 @@ class Eye_icon extends SvelteComponent {
21868
21881
 
21869
21882
  /* src/lib/journey/callbacks/password/confirm-input.svelte generated by Svelte v3.59.2 */
21870
21883
 
21871
- function create_default_slot_1$e(ctx) {
21884
+ function create_default_slot_2$7(ctx) {
21872
21885
  let current;
21873
- const default_slot_template = /*#slots*/ ctx[15].default;
21874
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[16], null);
21886
+ const default_slot_template = /*#slots*/ ctx[17].default;
21887
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[18], null);
21875
21888
 
21876
21889
  return {
21877
21890
  c() {
@@ -21886,15 +21899,15 @@ function create_default_slot_1$e(ctx) {
21886
21899
  },
21887
21900
  p(ctx, dirty) {
21888
21901
  if (default_slot) {
21889
- if (default_slot.p && (!current || dirty & /*$$scope*/ 65536)) {
21902
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 262144)) {
21890
21903
  update_slot_base(
21891
21904
  default_slot,
21892
21905
  default_slot_template,
21893
21906
  ctx,
21894
- /*$$scope*/ ctx[16],
21907
+ /*$$scope*/ ctx[18],
21895
21908
  !current
21896
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[16])
21897
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[16], dirty, null),
21909
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[18])
21910
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[18], dirty, null),
21898
21911
  null
21899
21912
  );
21900
21913
  }
@@ -21915,8 +21928,70 @@ function create_default_slot_1$e(ctx) {
21915
21928
  };
21916
21929
  }
21917
21930
 
21918
- // (69:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
21919
- function create_default_slot$k(ctx) {
21931
+ // (66:6) {#if showPassword === "button"}
21932
+ function create_if_block_1$c(ctx) {
21933
+ let button;
21934
+ let eyeicon;
21935
+ let current;
21936
+ let mounted;
21937
+ let dispose;
21938
+
21939
+ eyeicon = new Eye_icon({
21940
+ props: {
21941
+ classes: "tw_password-icon dark:tw_password-icon_dark",
21942
+ visible: /*isVisible*/ ctx[8],
21943
+ $$slots: { default: [create_default_slot_1$e] },
21944
+ $$scope: { ctx }
21945
+ }
21946
+ });
21947
+
21948
+ return {
21949
+ c() {
21950
+ button = element("button");
21951
+ create_component(eyeicon.$$.fragment);
21952
+ attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
21953
+ attr(button, "type", "button");
21954
+ },
21955
+ m(target, anchor) {
21956
+ insert(target, button, anchor);
21957
+ mount_component(eyeicon, button, null);
21958
+ current = true;
21959
+
21960
+ if (!mounted) {
21961
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[14]);
21962
+ mounted = true;
21963
+ }
21964
+ },
21965
+ p(ctx, dirty) {
21966
+ const eyeicon_changes = {};
21967
+ if (dirty & /*isVisible*/ 256) eyeicon_changes.visible = /*isVisible*/ ctx[8];
21968
+
21969
+ if (dirty & /*$$scope*/ 262144) {
21970
+ eyeicon_changes.$$scope = { dirty, ctx };
21971
+ }
21972
+
21973
+ eyeicon.$set(eyeicon_changes);
21974
+ },
21975
+ i(local) {
21976
+ if (current) return;
21977
+ transition_in(eyeicon.$$.fragment, local);
21978
+ current = true;
21979
+ },
21980
+ o(local) {
21981
+ transition_out(eyeicon.$$.fragment, local);
21982
+ current = false;
21983
+ },
21984
+ d(detaching) {
21985
+ if (detaching) detach(button);
21986
+ destroy_component(eyeicon);
21987
+ mounted = false;
21988
+ dispose();
21989
+ }
21990
+ };
21991
+ }
21992
+
21993
+ // (72:10) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
21994
+ function create_default_slot_1$e(ctx) {
21920
21995
  let t;
21921
21996
  let current;
21922
21997
  t = new Locale_strings({ props: { key: "showPassword" } });
@@ -21945,18 +22020,54 @@ function create_default_slot$k(ctx) {
21945
22020
  };
21946
22021
  }
21947
22022
 
21948
- // (63:2)
22023
+ // (65:1) <svelte:fragment slot="input-button">
21949
22024
  function create_input_button_slot$1(ctx) {
21950
- let button;
21951
- let eyeicon;
22025
+ let if_block_anchor;
21952
22026
  let current;
21953
- let mounted;
21954
- let dispose;
22027
+ let if_block = /*showPassword*/ ctx[12] === "button" && create_if_block_1$c(ctx);
21955
22028
 
21956
- eyeicon = new Eye_icon({
22029
+ return {
22030
+ c() {
22031
+ if (if_block) if_block.c();
22032
+ if_block_anchor = empty();
22033
+ },
22034
+ m(target, anchor) {
22035
+ if (if_block) if_block.m(target, anchor);
22036
+ insert(target, if_block_anchor, anchor);
22037
+ current = true;
22038
+ },
22039
+ p(ctx, dirty) {
22040
+ if (/*showPassword*/ ctx[12] === "button") if_block.p(ctx, dirty);
22041
+ },
22042
+ i(local) {
22043
+ if (current) return;
22044
+ transition_in(if_block);
22045
+ current = true;
22046
+ },
22047
+ o(local) {
22048
+ transition_out(if_block);
22049
+ current = false;
22050
+ },
22051
+ d(detaching) {
22052
+ if (if_block) if_block.d(detaching);
22053
+ if (detaching) detach(if_block_anchor);
22054
+ }
22055
+ };
22056
+ }
22057
+
22058
+ // (80:0) {#if showPassword === "checkbox"}
22059
+ function create_if_block$j(ctx) {
22060
+ let div;
22061
+ let checkbox;
22062
+ let current;
22063
+
22064
+ checkbox = new Checkbox({
21957
22065
  props: {
21958
- classes: "tw_password-icon dark:tw_password-icon_dark",
21959
- visible: /*isVisible*/ ctx[6],
22066
+ isFirstInvalidInput: /*isFirstInvalidInput*/ ctx[5],
22067
+ isInvalid: false,
22068
+ key: /*key*/ ctx[3] + /*style*/ ctx[4].showPassword,
22069
+ onChange: /*toggleVisibility*/ ctx[14],
22070
+ value: false,
21960
22071
  $$slots: { default: [create_default_slot$k] },
21961
22072
  $$scope: { ctx }
21962
22073
  }
@@ -21964,117 +22075,149 @@ function create_input_button_slot$1(ctx) {
21964
22075
 
21965
22076
  return {
21966
22077
  c() {
21967
- button = element("button");
21968
- create_component(eyeicon.$$.fragment);
21969
- attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
21970
- attr(button, "slot", "input-button");
21971
- attr(button, "type", "button");
22078
+ div = element("div");
22079
+ create_component(checkbox.$$.fragment);
22080
+ attr(div, "class", "tw_w-full tw_input-spacing");
21972
22081
  },
21973
22082
  m(target, anchor) {
21974
- insert(target, button, anchor);
21975
- mount_component(eyeicon, button, null);
22083
+ insert(target, div, anchor);
22084
+ mount_component(checkbox, div, null);
21976
22085
  current = true;
21977
-
21978
- if (!mounted) {
21979
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[11]);
21980
- mounted = true;
21981
- }
21982
22086
  },
21983
22087
  p(ctx, dirty) {
21984
- const eyeicon_changes = {};
21985
- if (dirty & /*isVisible*/ 64) eyeicon_changes.visible = /*isVisible*/ ctx[6];
22088
+ const checkbox_changes = {};
22089
+ if (dirty & /*isFirstInvalidInput*/ 32) checkbox_changes.isFirstInvalidInput = /*isFirstInvalidInput*/ ctx[5];
22090
+ if (dirty & /*key, style*/ 24) checkbox_changes.key = /*key*/ ctx[3] + /*style*/ ctx[4].showPassword;
21986
22091
 
21987
- if (dirty & /*$$scope*/ 65536) {
21988
- eyeicon_changes.$$scope = { dirty, ctx };
22092
+ if (dirty & /*$$scope*/ 262144) {
22093
+ checkbox_changes.$$scope = { dirty, ctx };
21989
22094
  }
21990
22095
 
21991
- eyeicon.$set(eyeicon_changes);
22096
+ checkbox.$set(checkbox_changes);
21992
22097
  },
21993
22098
  i(local) {
21994
22099
  if (current) return;
21995
- transition_in(eyeicon.$$.fragment, local);
22100
+ transition_in(checkbox.$$.fragment, local);
21996
22101
  current = true;
21997
22102
  },
21998
22103
  o(local) {
21999
- transition_out(eyeicon.$$.fragment, local);
22104
+ transition_out(checkbox.$$.fragment, local);
22000
22105
  current = false;
22001
22106
  },
22002
22107
  d(detaching) {
22003
- if (detaching) detach(button);
22004
- destroy_component(eyeicon);
22005
- mounted = false;
22006
- dispose();
22108
+ if (detaching) detach(div);
22109
+ destroy_component(checkbox);
22110
+ }
22111
+ };
22112
+ }
22113
+
22114
+ // (82:6) <Checkbox {isFirstInvalidInput} isInvalid={false} key = {key + style.showPassword} onChange={toggleVisibility} value={false} >
22115
+ function create_default_slot$k(ctx) {
22116
+ let t;
22117
+
22118
+ return {
22119
+ c() {
22120
+ t = text("Show Password");
22121
+ },
22122
+ m(target, anchor) {
22123
+ insert(target, t, anchor);
22124
+ },
22125
+ d(detaching) {
22126
+ if (detaching) detach(t);
22007
22127
  }
22008
22128
  };
22009
22129
  }
22010
22130
 
22011
22131
  function create_fragment$B(ctx) {
22012
22132
  let input;
22133
+ let t;
22134
+ let if_block_anchor;
22013
22135
  let current;
22014
22136
 
22015
- input = new /*Input*/ ctx[9]({
22137
+ input = new /*Input*/ ctx[11]({
22016
22138
  props: {
22017
22139
  forceValidityFailure: /*forceValidityFailure*/ ctx[0],
22018
22140
  isFirstInvalidInput: false,
22019
- hasRightIcon: true,
22141
+ hasRightIcon: /*style*/ ctx[4].showPassword === 'button'
22142
+ ? true
22143
+ : false,
22020
22144
  key: `${/*key*/ ctx[3]}-confirm`,
22021
22145
  label: interpolate('confirmPassword', null, 'Confirm Password'),
22022
- message: /*message*/ ctx[8],
22023
- onChange: /*onChangeWrapper*/ ctx[10],
22146
+ message: /*message*/ ctx[10],
22147
+ onChange: /*onChangeWrapper*/ ctx[13],
22024
22148
  isInvalid: /*passwordsDoNotMatch*/ ctx[1],
22025
22149
  isRequired: /*isRequired*/ ctx[2],
22026
- showMessage: /*showMessage*/ ctx[4],
22027
- type: /*type*/ ctx[7],
22028
- value: typeof /*value*/ ctx[5] === 'string'
22029
- ? /*value*/ ctx[5]
22150
+ showMessage: /*showMessage*/ ctx[6],
22151
+ type: /*type*/ ctx[9],
22152
+ value: typeof /*value*/ ctx[7] === 'string'
22153
+ ? /*value*/ ctx[7]
22030
22154
  : '',
22031
22155
  $$slots: {
22032
22156
  "input-button": [create_input_button_slot$1],
22033
- default: [create_default_slot_1$e]
22157
+ default: [create_default_slot_2$7]
22034
22158
  },
22035
22159
  $$scope: { ctx }
22036
22160
  }
22037
22161
  });
22038
22162
 
22163
+ let if_block = /*showPassword*/ ctx[12] === "checkbox" && create_if_block$j(ctx);
22164
+
22039
22165
  return {
22040
22166
  c() {
22041
22167
  create_component(input.$$.fragment);
22168
+ t = space();
22169
+ if (if_block) if_block.c();
22170
+ if_block_anchor = empty();
22042
22171
  },
22043
22172
  m(target, anchor) {
22044
22173
  mount_component(input, target, anchor);
22174
+ insert(target, t, anchor);
22175
+ if (if_block) if_block.m(target, anchor);
22176
+ insert(target, if_block_anchor, anchor);
22045
22177
  current = true;
22046
22178
  },
22047
22179
  p(ctx, [dirty]) {
22048
22180
  const input_changes = {};
22049
22181
  if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
22182
+
22183
+ if (dirty & /*style*/ 16) input_changes.hasRightIcon = /*style*/ ctx[4].showPassword === 'button'
22184
+ ? true
22185
+ : false;
22186
+
22050
22187
  if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
22051
- if (dirty & /*message*/ 256) input_changes.message = /*message*/ ctx[8];
22188
+ if (dirty & /*message*/ 1024) input_changes.message = /*message*/ ctx[10];
22052
22189
  if (dirty & /*passwordsDoNotMatch*/ 2) input_changes.isInvalid = /*passwordsDoNotMatch*/ ctx[1];
22053
22190
  if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
22054
- if (dirty & /*showMessage*/ 16) input_changes.showMessage = /*showMessage*/ ctx[4];
22055
- if (dirty & /*type*/ 128) input_changes.type = /*type*/ ctx[7];
22191
+ if (dirty & /*showMessage*/ 64) input_changes.showMessage = /*showMessage*/ ctx[6];
22192
+ if (dirty & /*type*/ 512) input_changes.type = /*type*/ ctx[9];
22056
22193
 
22057
- if (dirty & /*value*/ 32) input_changes.value = typeof /*value*/ ctx[5] === 'string'
22058
- ? /*value*/ ctx[5]
22194
+ if (dirty & /*value*/ 128) input_changes.value = typeof /*value*/ ctx[7] === 'string'
22195
+ ? /*value*/ ctx[7]
22059
22196
  : '';
22060
22197
 
22061
- if (dirty & /*$$scope, isVisible*/ 65600) {
22198
+ if (dirty & /*$$scope, isVisible*/ 262400) {
22062
22199
  input_changes.$$scope = { dirty, ctx };
22063
22200
  }
22064
22201
 
22065
22202
  input.$set(input_changes);
22203
+ if (/*showPassword*/ ctx[12] === "checkbox") if_block.p(ctx, dirty);
22066
22204
  },
22067
22205
  i(local) {
22068
22206
  if (current) return;
22069
22207
  transition_in(input.$$.fragment, local);
22208
+ transition_in(if_block);
22070
22209
  current = true;
22071
22210
  },
22072
22211
  o(local) {
22073
22212
  transition_out(input.$$.fragment, local);
22213
+ transition_out(if_block);
22074
22214
  current = false;
22075
22215
  },
22076
22216
  d(detaching) {
22077
22217
  destroy_component(input, detaching);
22218
+ if (detaching) detach(t);
22219
+ if (if_block) if_block.d(detaching);
22220
+ if (detaching) detach(if_block_anchor);
22078
22221
  }
22079
22222
  };
22080
22223
  }
@@ -22088,7 +22231,9 @@ function instance$C($$self, $$props, $$invalidate) {
22088
22231
  let { onChange } = $$props;
22089
22232
  let { resetValue } = $$props;
22090
22233
  let { style = {} } = $$props;
22234
+ let { isFirstInvalidInput } = $$props;
22091
22235
  const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
22236
+ const showPassword = style.showPassword;
22092
22237
  let { showMessage = undefined } = $$props;
22093
22238
  let isVisible = false;
22094
22239
  let type = 'password';
@@ -22096,7 +22241,7 @@ function instance$C($$self, $$props, $$invalidate) {
22096
22241
  let message = '';
22097
22242
 
22098
22243
  function onChangeWrapper(event) {
22099
- $$invalidate(5, value = event.target?.value);
22244
+ $$invalidate(7, value = event.target?.value);
22100
22245
 
22101
22246
  // TODO: revisit this logic to avoid unnecessary ternary
22102
22247
  onChange(typeof value === 'string' ? value : undefined);
@@ -22106,8 +22251,8 @@ function instance$C($$self, $$props, $$invalidate) {
22106
22251
  * @function toggleVisibility - toggles the password from masked to plaintext
22107
22252
  */
22108
22253
  function toggleVisibility() {
22109
- $$invalidate(6, isVisible = !isVisible);
22110
- $$invalidate(7, type = isVisible ? 'text' : 'password');
22254
+ $$invalidate(8, isVisible = !isVisible);
22255
+ $$invalidate(9, type = isVisible ? 'text' : 'password');
22111
22256
  }
22112
22257
 
22113
22258
  $$self.$$set = $$props => {
@@ -22115,27 +22260,28 @@ function instance$C($$self, $$props, $$invalidate) {
22115
22260
  if ('passwordsDoNotMatch' in $$props) $$invalidate(1, passwordsDoNotMatch = $$props.passwordsDoNotMatch);
22116
22261
  if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
22117
22262
  if ('key' in $$props) $$invalidate(3, key = $$props.key);
22118
- if ('onChange' in $$props) $$invalidate(12, onChange = $$props.onChange);
22119
- if ('resetValue' in $$props) $$invalidate(13, resetValue = $$props.resetValue);
22120
- if ('style' in $$props) $$invalidate(14, style = $$props.style);
22121
- if ('showMessage' in $$props) $$invalidate(4, showMessage = $$props.showMessage);
22122
- if ('$$scope' in $$props) $$invalidate(16, $$scope = $$props.$$scope);
22263
+ if ('onChange' in $$props) $$invalidate(15, onChange = $$props.onChange);
22264
+ if ('resetValue' in $$props) $$invalidate(16, resetValue = $$props.resetValue);
22265
+ if ('style' in $$props) $$invalidate(4, style = $$props.style);
22266
+ if ('isFirstInvalidInput' in $$props) $$invalidate(5, isFirstInvalidInput = $$props.isFirstInvalidInput);
22267
+ if ('showMessage' in $$props) $$invalidate(6, showMessage = $$props.showMessage);
22268
+ if ('$$scope' in $$props) $$invalidate(18, $$scope = $$props.$$scope);
22123
22269
  };
22124
22270
 
22125
22271
  $$self.$$.update = () => {
22126
- if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/ 12326) {
22272
+ if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/ 98438) {
22127
22273
  {
22128
22274
  if (resetValue) {
22129
- $$invalidate(5, value = undefined);
22275
+ $$invalidate(7, value = undefined);
22130
22276
  onChange(value);
22131
22277
  }
22132
22278
 
22133
22279
  if (passwordsDoNotMatch) {
22134
- $$invalidate(8, message = interpolate('passwordConfirmationError', null, 'Passwords do not match'));
22280
+ $$invalidate(10, message = interpolate('passwordConfirmationError', null, 'Passwords do not match'));
22135
22281
  } else if (isRequired) {
22136
- $$invalidate(8, message = interpolate('requiredField', null, 'This field is required'));
22282
+ $$invalidate(10, message = interpolate('requiredField', null, 'This field is required'));
22137
22283
  } else {
22138
- $$invalidate(8, message = '');
22284
+ $$invalidate(10, message = '');
22139
22285
  }
22140
22286
  }
22141
22287
  }
@@ -22146,17 +22292,19 @@ function instance$C($$self, $$props, $$invalidate) {
22146
22292
  passwordsDoNotMatch,
22147
22293
  isRequired,
22148
22294
  key,
22295
+ style,
22296
+ isFirstInvalidInput,
22149
22297
  showMessage,
22150
22298
  value,
22151
22299
  isVisible,
22152
22300
  type,
22153
22301
  message,
22154
22302
  Input,
22303
+ showPassword,
22155
22304
  onChangeWrapper,
22156
22305
  toggleVisibility,
22157
22306
  onChange,
22158
22307
  resetValue,
22159
- style,
22160
22308
  slots,
22161
22309
  $$scope
22162
22310
  ];
@@ -22171,20 +22319,21 @@ class Confirm_input extends SvelteComponent {
22171
22319
  passwordsDoNotMatch: 1,
22172
22320
  isRequired: 2,
22173
22321
  key: 3,
22174
- onChange: 12,
22175
- resetValue: 13,
22176
- style: 14,
22177
- showMessage: 4
22322
+ onChange: 15,
22323
+ resetValue: 16,
22324
+ style: 4,
22325
+ isFirstInvalidInput: 5,
22326
+ showMessage: 6
22178
22327
  });
22179
22328
  }
22180
22329
  }
22181
22330
 
22182
22331
  /* src/lib/journey/callbacks/password/base.svelte generated by Svelte v3.59.2 */
22183
22332
 
22184
- function create_default_slot_1$d(ctx) {
22333
+ function create_default_slot_2$6(ctx) {
22185
22334
  let current;
22186
- const default_slot_template = /*#slots*/ ctx[21].default;
22187
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
22335
+ const default_slot_template = /*#slots*/ ctx[22].default;
22336
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[23], null);
22188
22337
 
22189
22338
  return {
22190
22339
  c() {
@@ -22199,15 +22348,15 @@ function create_default_slot_1$d(ctx) {
22199
22348
  },
22200
22349
  p(ctx, dirty) {
22201
22350
  if (default_slot) {
22202
- if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
22351
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 8388608)) {
22203
22352
  update_slot_base(
22204
22353
  default_slot,
22205
22354
  default_slot_template,
22206
22355
  ctx,
22207
- /*$$scope*/ ctx[22],
22356
+ /*$$scope*/ ctx[23],
22208
22357
  !current
22209
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
22210
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
22358
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[23])
22359
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[23], dirty, null),
22211
22360
  null
22212
22361
  );
22213
22362
  }
@@ -22228,8 +22377,70 @@ function create_default_slot_1$d(ctx) {
22228
22377
  };
22229
22378
  }
22230
22379
 
22231
- // (95:6) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
22232
- function create_default_slot$j(ctx) {
22380
+ // (92:6) {#if showPassword === "button"}
22381
+ function create_if_block_2$9(ctx) {
22382
+ let button;
22383
+ let eyeicon;
22384
+ let current;
22385
+ let mounted;
22386
+ let dispose;
22387
+
22388
+ eyeicon = new Eye_icon({
22389
+ props: {
22390
+ classes: "tw_password-icon dark:tw_password-icon_dark",
22391
+ visible: /*isVisible*/ ctx[11],
22392
+ $$slots: { default: [create_default_slot_1$d] },
22393
+ $$scope: { ctx }
22394
+ }
22395
+ });
22396
+
22397
+ return {
22398
+ c() {
22399
+ button = element("button");
22400
+ create_component(eyeicon.$$.fragment);
22401
+ attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
22402
+ attr(button, "type", "button");
22403
+ },
22404
+ m(target, anchor) {
22405
+ insert(target, button, anchor);
22406
+ mount_component(eyeicon, button, null);
22407
+ current = true;
22408
+
22409
+ if (!mounted) {
22410
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[19]);
22411
+ mounted = true;
22412
+ }
22413
+ },
22414
+ p(ctx, dirty) {
22415
+ const eyeicon_changes = {};
22416
+ if (dirty & /*isVisible*/ 2048) eyeicon_changes.visible = /*isVisible*/ ctx[11];
22417
+
22418
+ if (dirty & /*$$scope*/ 8388608) {
22419
+ eyeicon_changes.$$scope = { dirty, ctx };
22420
+ }
22421
+
22422
+ eyeicon.$set(eyeicon_changes);
22423
+ },
22424
+ i(local) {
22425
+ if (current) return;
22426
+ transition_in(eyeicon.$$.fragment, local);
22427
+ current = true;
22428
+ },
22429
+ o(local) {
22430
+ transition_out(eyeicon.$$.fragment, local);
22431
+ current = false;
22432
+ },
22433
+ d(detaching) {
22434
+ if (detaching) detach(button);
22435
+ destroy_component(eyeicon);
22436
+ mounted = false;
22437
+ dispose();
22438
+ }
22439
+ };
22440
+ }
22441
+
22442
+ // (98:10) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
22443
+ function create_default_slot_1$d(ctx) {
22233
22444
  let t;
22234
22445
  let current;
22235
22446
  t = new Locale_strings({ props: { key: "showPassword" } });
@@ -22258,18 +22469,54 @@ function create_default_slot$j(ctx) {
22258
22469
  };
22259
22470
  }
22260
22471
 
22261
- // (89:4)
22472
+ // (91:4) <svelte:fragment slot="input-button">
22262
22473
  function create_input_button_slot(ctx) {
22263
- let button;
22264
- let eyeicon;
22474
+ let if_block_anchor;
22265
22475
  let current;
22266
- let mounted;
22267
- let dispose;
22476
+ let if_block = /*showPassword*/ ctx[16] === "button" && create_if_block_2$9(ctx);
22268
22477
 
22269
- eyeicon = new Eye_icon({
22478
+ return {
22479
+ c() {
22480
+ if (if_block) if_block.c();
22481
+ if_block_anchor = empty();
22482
+ },
22483
+ m(target, anchor) {
22484
+ if (if_block) if_block.m(target, anchor);
22485
+ insert(target, if_block_anchor, anchor);
22486
+ current = true;
22487
+ },
22488
+ p(ctx, dirty) {
22489
+ if (/*showPassword*/ ctx[16] === "button") if_block.p(ctx, dirty);
22490
+ },
22491
+ i(local) {
22492
+ if (current) return;
22493
+ transition_in(if_block);
22494
+ current = true;
22495
+ },
22496
+ o(local) {
22497
+ transition_out(if_block);
22498
+ current = false;
22499
+ },
22500
+ d(detaching) {
22501
+ if (if_block) if_block.d(detaching);
22502
+ if (detaching) detach(if_block_anchor);
22503
+ }
22504
+ };
22505
+ }
22506
+
22507
+ // (107:2) {#if showPassword === "checkbox"}
22508
+ function create_if_block_1$b(ctx) {
22509
+ let div;
22510
+ let checkbox;
22511
+ let current;
22512
+
22513
+ checkbox = new Checkbox({
22270
22514
  props: {
22271
- classes: "tw_password-icon dark:tw_password-icon_dark",
22272
- visible: /*isVisible*/ ctx[11],
22515
+ isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false,
22516
+ isInvalid: false,
22517
+ key: /*key*/ ctx[0] + /*style*/ ctx[5].showPassword,
22518
+ onChange: /*toggleVisibility*/ ctx[19],
22519
+ value: false,
22273
22520
  $$slots: { default: [create_default_slot$j] },
22274
22521
  $$scope: { ctx }
22275
22522
  }
@@ -22277,51 +22524,60 @@ function create_input_button_slot(ctx) {
22277
22524
 
22278
22525
  return {
22279
22526
  c() {
22280
- button = element("button");
22281
- create_component(eyeicon.$$.fragment);
22282
- attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
22283
- attr(button, "slot", "input-button");
22284
- attr(button, "type", "button");
22527
+ div = element("div");
22528
+ create_component(checkbox.$$.fragment);
22529
+ attr(div, "class", "tw_w-full tw_input-spacing");
22285
22530
  },
22286
22531
  m(target, anchor) {
22287
- insert(target, button, anchor);
22288
- mount_component(eyeicon, button, null);
22532
+ insert(target, div, anchor);
22533
+ mount_component(checkbox, div, null);
22289
22534
  current = true;
22290
-
22291
- if (!mounted) {
22292
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[18]);
22293
- mounted = true;
22294
- }
22295
22535
  },
22296
22536
  p(ctx, dirty) {
22297
- const eyeicon_changes = {};
22298
- if (dirty & /*isVisible*/ 2048) eyeicon_changes.visible = /*isVisible*/ ctx[11];
22537
+ const checkbox_changes = {};
22538
+ if (dirty & /*callbackMetadata*/ 4) checkbox_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
22539
+ if (dirty & /*key, style*/ 33) checkbox_changes.key = /*key*/ ctx[0] + /*style*/ ctx[5].showPassword;
22299
22540
 
22300
- if (dirty & /*$$scope*/ 4194304) {
22301
- eyeicon_changes.$$scope = { dirty, ctx };
22541
+ if (dirty & /*$$scope*/ 8388608) {
22542
+ checkbox_changes.$$scope = { dirty, ctx };
22302
22543
  }
22303
22544
 
22304
- eyeicon.$set(eyeicon_changes);
22545
+ checkbox.$set(checkbox_changes);
22305
22546
  },
22306
22547
  i(local) {
22307
22548
  if (current) return;
22308
- transition_in(eyeicon.$$.fragment, local);
22549
+ transition_in(checkbox.$$.fragment, local);
22309
22550
  current = true;
22310
22551
  },
22311
22552
  o(local) {
22312
- transition_out(eyeicon.$$.fragment, local);
22553
+ transition_out(checkbox.$$.fragment, local);
22313
22554
  current = false;
22314
22555
  },
22315
22556
  d(detaching) {
22316
- if (detaching) detach(button);
22317
- destroy_component(eyeicon);
22318
- mounted = false;
22319
- dispose();
22557
+ if (detaching) detach(div);
22558
+ destroy_component(checkbox);
22320
22559
  }
22321
22560
  };
22322
22561
  }
22323
22562
 
22324
- // (102:2) {#if callbackMetadata?.platform?.confirmPassword}
22563
+ // (109:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key = {key + style.showPassword} onChange={toggleVisibility} value={false} >
22564
+ function create_default_slot$j(ctx) {
22565
+ let t;
22566
+
22567
+ return {
22568
+ c() {
22569
+ t = text("Show Password");
22570
+ },
22571
+ m(target, anchor) {
22572
+ insert(target, t, anchor);
22573
+ },
22574
+ d(detaching) {
22575
+ if (detaching) detach(t);
22576
+ }
22577
+ };
22578
+ }
22579
+
22580
+ // (119:2) {#if callbackMetadata?.platform?.confirmPassword}
22325
22581
  function create_if_block$i(ctx) {
22326
22582
  let confirminput;
22327
22583
  let current;
@@ -22332,10 +22588,11 @@ function create_if_block$i(ctx) {
22332
22588
  passwordsDoNotMatch: /*doPasswordsMatch*/ ctx[10] === false,
22333
22589
  key: /*key*/ ctx[0],
22334
22590
  isRequired: /*value*/ ctx[8].length > 0,
22335
- onChange: /*confirmInput*/ ctx[16],
22591
+ onChange: /*confirmInput*/ ctx[17],
22336
22592
  resetValue: /*resetValue*/ ctx[12],
22337
22593
  showMessage: /*doPasswordsMatch*/ ctx[10] === false,
22338
- style: /*style*/ ctx[5]
22594
+ style: /*style*/ ctx[5],
22595
+ isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false
22339
22596
  }
22340
22597
  });
22341
22598
 
@@ -22356,6 +22613,7 @@ function create_if_block$i(ctx) {
22356
22613
  if (dirty & /*resetValue*/ 4096) confirminput_changes.resetValue = /*resetValue*/ ctx[12];
22357
22614
  if (dirty & /*doPasswordsMatch*/ 1024) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[10] === false;
22358
22615
  if (dirty & /*style*/ 32) confirminput_changes.style = /*style*/ ctx[5];
22616
+ if (dirty & /*callbackMetadata*/ 4) confirminput_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
22359
22617
  confirminput.$set(confirminput_changes);
22360
22618
  },
22361
22619
  i(local) {
@@ -22373,23 +22631,26 @@ function create_if_block$i(ctx) {
22373
22631
  };
22374
22632
  }
22375
22633
 
22376
- // (75:0) {#key callback}
22634
+ // (77:0) {#key callback}
22377
22635
  function create_key_block$3(ctx) {
22378
22636
  let input;
22379
- let t;
22380
- let if_block_anchor;
22637
+ let t0;
22638
+ let t1;
22639
+ let if_block1_anchor;
22381
22640
  let current;
22382
22641
 
22383
22642
  input = new /*Input*/ ctx[15]({
22384
22643
  props: {
22385
22644
  isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false,
22386
- hasRightIcon: true,
22645
+ hasRightIcon: /*style*/ ctx[5].showPassword === 'button'
22646
+ ? true
22647
+ : false,
22387
22648
  key: /*key*/ ctx[0],
22388
22649
  label: interpolate(textToKey(/*callbackType*/ ctx[9]), null, /*textInputLabel*/ ctx[13]),
22389
22650
  message: /*validationFailure*/ ctx[7] || (/*isRequired*/ ctx[4]
22390
22651
  ? interpolate('inputRequiredError')
22391
22652
  : undefined),
22392
- onChange: /*setValue*/ ctx[17],
22653
+ onChange: /*setValue*/ ctx[18],
22393
22654
  isInvalid: /*isInvalid*/ ctx[3],
22394
22655
  isRequired: /*isRequired*/ ctx[4],
22395
22656
  showMessage: /*showMessage*/ ctx[6],
@@ -22399,31 +22660,41 @@ function create_key_block$3(ctx) {
22399
22660
  : '',
22400
22661
  $$slots: {
22401
22662
  "input-button": [create_input_button_slot],
22402
- default: [create_default_slot_1$d]
22663
+ default: [create_default_slot_2$6]
22403
22664
  },
22404
22665
  $$scope: { ctx }
22405
22666
  }
22406
22667
  });
22407
22668
 
22408
- let if_block = /*callbackMetadata*/ ctx[2]?.platform?.confirmPassword && create_if_block$i(ctx);
22669
+ let if_block0 = /*showPassword*/ ctx[16] === "checkbox" && create_if_block_1$b(ctx);
22670
+ let if_block1 = /*callbackMetadata*/ ctx[2]?.platform?.confirmPassword && create_if_block$i(ctx);
22409
22671
 
22410
22672
  return {
22411
22673
  c() {
22412
22674
  create_component(input.$$.fragment);
22413
- t = space();
22414
- if (if_block) if_block.c();
22415
- if_block_anchor = empty();
22675
+ t0 = space();
22676
+ if (if_block0) if_block0.c();
22677
+ t1 = space();
22678
+ if (if_block1) if_block1.c();
22679
+ if_block1_anchor = empty();
22416
22680
  },
22417
22681
  m(target, anchor) {
22418
22682
  mount_component(input, target, anchor);
22419
- insert(target, t, anchor);
22420
- if (if_block) if_block.m(target, anchor);
22421
- insert(target, if_block_anchor, anchor);
22683
+ insert(target, t0, anchor);
22684
+ if (if_block0) if_block0.m(target, anchor);
22685
+ insert(target, t1, anchor);
22686
+ if (if_block1) if_block1.m(target, anchor);
22687
+ insert(target, if_block1_anchor, anchor);
22422
22688
  current = true;
22423
22689
  },
22424
22690
  p(ctx, dirty) {
22425
22691
  const input_changes = {};
22426
22692
  if (dirty & /*callbackMetadata*/ 4) input_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
22693
+
22694
+ if (dirty & /*style*/ 32) input_changes.hasRightIcon = /*style*/ ctx[5].showPassword === 'button'
22695
+ ? true
22696
+ : false;
22697
+
22427
22698
  if (dirty & /*key*/ 1) input_changes.key = /*key*/ ctx[0];
22428
22699
  if (dirty & /*callbackType, textInputLabel*/ 8704) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[9]), null, /*textInputLabel*/ ctx[13]);
22429
22700
 
@@ -22440,30 +22711,31 @@ function create_key_block$3(ctx) {
22440
22711
  ? /*value*/ ctx[8]
22441
22712
  : '';
22442
22713
 
22443
- if (dirty & /*$$scope, isVisible*/ 4196352) {
22714
+ if (dirty & /*$$scope, isVisible*/ 8390656) {
22444
22715
  input_changes.$$scope = { dirty, ctx };
22445
22716
  }
22446
22717
 
22447
22718
  input.$set(input_changes);
22719
+ if (/*showPassword*/ ctx[16] === "checkbox") if_block0.p(ctx, dirty);
22448
22720
 
22449
22721
  if (/*callbackMetadata*/ ctx[2]?.platform?.confirmPassword) {
22450
- if (if_block) {
22451
- if_block.p(ctx, dirty);
22722
+ if (if_block1) {
22723
+ if_block1.p(ctx, dirty);
22452
22724
 
22453
22725
  if (dirty & /*callbackMetadata*/ 4) {
22454
- transition_in(if_block, 1);
22726
+ transition_in(if_block1, 1);
22455
22727
  }
22456
22728
  } else {
22457
- if_block = create_if_block$i(ctx);
22458
- if_block.c();
22459
- transition_in(if_block, 1);
22460
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
22729
+ if_block1 = create_if_block$i(ctx);
22730
+ if_block1.c();
22731
+ transition_in(if_block1, 1);
22732
+ if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
22461
22733
  }
22462
- } else if (if_block) {
22734
+ } else if (if_block1) {
22463
22735
  group_outros();
22464
22736
 
22465
- transition_out(if_block, 1, 1, () => {
22466
- if_block = null;
22737
+ transition_out(if_block1, 1, 1, () => {
22738
+ if_block1 = null;
22467
22739
  });
22468
22740
 
22469
22741
  check_outros();
@@ -22472,19 +22744,23 @@ function create_key_block$3(ctx) {
22472
22744
  i(local) {
22473
22745
  if (current) return;
22474
22746
  transition_in(input.$$.fragment, local);
22475
- transition_in(if_block);
22747
+ transition_in(if_block0);
22748
+ transition_in(if_block1);
22476
22749
  current = true;
22477
22750
  },
22478
22751
  o(local) {
22479
22752
  transition_out(input.$$.fragment, local);
22480
- transition_out(if_block);
22753
+ transition_out(if_block0);
22754
+ transition_out(if_block1);
22481
22755
  current = false;
22482
22756
  },
22483
22757
  d(detaching) {
22484
22758
  destroy_component(input, detaching);
22485
- if (detaching) detach(t);
22486
- if (if_block) if_block.d(detaching);
22487
- if (detaching) detach(if_block_anchor);
22759
+ if (detaching) detach(t0);
22760
+ if (if_block0) if_block0.d(detaching);
22761
+ if (detaching) detach(t1);
22762
+ if (if_block1) if_block1.d(detaching);
22763
+ if (detaching) detach(if_block1_anchor);
22488
22764
  }
22489
22765
  };
22490
22766
  }
@@ -22543,6 +22819,7 @@ function instance$B($$self, $$props, $$invalidate) {
22543
22819
  let { isRequired = false } = $$props;
22544
22820
  let { style = {} } = $$props;
22545
22821
  const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
22822
+ const showPassword = style.showPassword;
22546
22823
  let { showMessage = undefined } = $$props;
22547
22824
  let { validationFailure = '' } = $$props;
22548
22825
  let confirmValue;
@@ -22560,7 +22837,7 @@ function instance$B($$self, $$props, $$invalidate) {
22560
22837
  * @param event
22561
22838
  */
22562
22839
  function confirmInput(val) {
22563
- $$invalidate(19, confirmValue = val);
22840
+ $$invalidate(20, confirmValue = val);
22564
22841
  }
22565
22842
 
22566
22843
  /**
@@ -22579,7 +22856,7 @@ function instance$B($$self, $$props, $$invalidate) {
22579
22856
  *********************************************************************** */
22580
22857
  callback.setInputValue(value);
22581
22858
 
22582
- $$invalidate(20, savedValue = String(value));
22859
+ $$invalidate(21, savedValue = String(value));
22583
22860
  }
22584
22861
 
22585
22862
  /**
@@ -22599,11 +22876,11 @@ function instance$B($$self, $$props, $$invalidate) {
22599
22876
  if ('style' in $$props) $$invalidate(5, style = $$props.style);
22600
22877
  if ('showMessage' in $$props) $$invalidate(6, showMessage = $$props.showMessage);
22601
22878
  if ('validationFailure' in $$props) $$invalidate(7, validationFailure = $$props.validationFailure);
22602
- if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
22879
+ if ('$$scope' in $$props) $$invalidate(23, $$scope = $$props.$$scope);
22603
22880
  };
22604
22881
 
22605
22882
  $$self.$$.update = () => {
22606
- if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 1573126) {
22883
+ if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 3145990) {
22607
22884
  {
22608
22885
  $$invalidate(9, callbackType = callback.getType());
22609
22886
  $$invalidate(0, key = callback?.payload?.input?.[0].name || `password-${callbackMetadata?.idx}`);
@@ -22645,6 +22922,7 @@ function instance$B($$self, $$props, $$invalidate) {
22645
22922
  textInputLabel,
22646
22923
  type,
22647
22924
  Input,
22925
+ showPassword,
22648
22926
  confirmInput,
22649
22927
  setValue,
22650
22928
  toggleVisibility,