@plaidev/karte-action-sdk 1.1.121 → 1.1.122-27933539.c9ba2e60

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.
@@ -5593,12 +5593,12 @@ function add_css$8(target) {
5593
5593
 
5594
5594
  function get_each_context$4(ctx, list, i) {
5595
5595
  const child_ctx = ctx.slice();
5596
- child_ctx[11] = list[i];
5597
- child_ctx[13] = i;
5596
+ child_ctx[12] = list[i];
5597
+ child_ctx[14] = i;
5598
5598
  return child_ctx;
5599
5599
  }
5600
5600
 
5601
- // (49:2) {#each _options as option, i}
5601
+ // (55:2) {#each _options as option, i}
5602
5602
  function create_each_block$4(ctx) {
5603
5603
  let label;
5604
5604
  let input;
@@ -5606,7 +5606,7 @@ function create_each_block$4(ctx) {
5606
5606
  let input_checked_value;
5607
5607
  let t0;
5608
5608
  let span;
5609
- let t1_value = /*option*/ ctx[11] + "";
5609
+ let t1_value = /*option*/ ctx[12] + "";
5610
5610
  let t1;
5611
5611
  let t2;
5612
5612
  let mounted;
@@ -5647,8 +5647,8 @@ function create_each_block$4(ctx) {
5647
5647
  attr(input, "class", "radio-button-input svelte-1k9zlui");
5648
5648
  attr(input, "style", /*_buttonStyle*/ ctx[4]);
5649
5649
  attr(input, "name", /*name*/ ctx[0]);
5650
- input.value = input_value_value = /*option*/ ctx[11];
5651
- input.checked = input_checked_value = /*option*/ ctx[11] === /*_value*/ ctx[2];
5650
+ input.value = input_value_value = /*option*/ ctx[12];
5651
+ input.checked = input_checked_value = /*option*/ ctx[12] === /*_value*/ ctx[2];
5652
5652
  attr(span, "class", "radio-button-text svelte-1k9zlui");
5653
5653
  attr(span, "style", /*textStyle*/ ctx[1]);
5654
5654
  attr(label, "class", "radio-button svelte-1k9zlui");
@@ -5662,7 +5662,7 @@ function create_each_block$4(ctx) {
5662
5662
  append_hydration(label, t2);
5663
5663
 
5664
5664
  if (!mounted) {
5665
- dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[13]));
5665
+ dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[14]));
5666
5666
  mounted = true;
5667
5667
  }
5668
5668
  },
@@ -5677,15 +5677,15 @@ function create_each_block$4(ctx) {
5677
5677
  attr(input, "name", /*name*/ ctx[0]);
5678
5678
  }
5679
5679
 
5680
- if (dirty & /*_options*/ 8 && input_value_value !== (input_value_value = /*option*/ ctx[11])) {
5680
+ if (dirty & /*_options*/ 8 && input_value_value !== (input_value_value = /*option*/ ctx[12])) {
5681
5681
  input.value = input_value_value;
5682
5682
  }
5683
5683
 
5684
- if (dirty & /*_options, _value*/ 12 && input_checked_value !== (input_checked_value = /*option*/ ctx[11] === /*_value*/ ctx[2])) {
5684
+ if (dirty & /*_options, _value*/ 12 && input_checked_value !== (input_checked_value = /*option*/ ctx[12] === /*_value*/ ctx[2])) {
5685
5685
  input.checked = input_checked_value;
5686
5686
  }
5687
5687
 
5688
- if (dirty & /*_options*/ 8 && t1_value !== (t1_value = /*option*/ ctx[11] + "")) set_data(t1, t1_value);
5688
+ if (dirty & /*_options*/ 8 && t1_value !== (t1_value = /*option*/ ctx[12] + "")) set_data(t1, t1_value);
5689
5689
 
5690
5690
  if (dirty & /*textStyle*/ 2) {
5691
5691
  attr(span, "style", /*textStyle*/ ctx[1]);
@@ -5779,6 +5779,7 @@ function instance$8($$self, $$props, $$invalidate) {
5779
5779
  let $value;
5780
5780
  let { name = '' } = $$props;
5781
5781
  let { options = 'ラジオボタン1,ラジオボタン2,ラジオボタン3' } = $$props;
5782
+ let { required = false } = $$props;
5782
5783
  let { textStyle = 'color: #333; font-size: 12px;' } = $$props;
5783
5784
 
5784
5785
  let { buttonStyle = {
@@ -5794,11 +5795,12 @@ function instance$8($$self, $$props, $$invalidate) {
5794
5795
  statePath,
5795
5796
  initialValue: [],
5796
5797
  validator(value) {
5798
+ if (!required) return true;
5797
5799
  return value.length > 0;
5798
5800
  }
5799
5801
  });
5800
5802
 
5801
- component_subscribe($$self, value, value => $$invalidate(9, $value = value));
5803
+ component_subscribe($$self, value, value => $$invalidate(10, $value = value));
5802
5804
 
5803
5805
  const handleChange = index => event => {
5804
5806
  if (event.target.checked) {
@@ -5809,8 +5811,9 @@ function instance$8($$self, $$props, $$invalidate) {
5809
5811
  $$self.$$set = $$props => {
5810
5812
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
5811
5813
  if ('options' in $$props) $$invalidate(7, options = $$props.options);
5814
+ if ('required' in $$props) $$invalidate(8, required = $$props.required);
5812
5815
  if ('textStyle' in $$props) $$invalidate(1, textStyle = $$props.textStyle);
5813
- if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
5816
+ if ('buttonStyle' in $$props) $$invalidate(9, buttonStyle = $$props.buttonStyle);
5814
5817
  };
5815
5818
 
5816
5819
  $$self.$$.update = () => {
@@ -5818,11 +5821,11 @@ function instance$8($$self, $$props, $$invalidate) {
5818
5821
  $$invalidate(3, _options = options.split(','));
5819
5822
  }
5820
5823
 
5821
- if ($$self.$$.dirty & /*buttonStyle*/ 256) {
5824
+ if ($$self.$$.dirty & /*buttonStyle*/ 512) {
5822
5825
  $$invalidate(4, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
5823
5826
  }
5824
5827
 
5825
- if ($$self.$$.dirty & /*$value*/ 512) {
5828
+ if ($$self.$$.dirty & /*$value*/ 1024) {
5826
5829
  $$invalidate(2, _value = $value[0]);
5827
5830
  }
5828
5831
  };
@@ -5836,6 +5839,7 @@ function instance$8($$self, $$props, $$invalidate) {
5836
5839
  value,
5837
5840
  handleChange,
5838
5841
  options,
5842
+ required,
5839
5843
  buttonStyle,
5840
5844
  $value
5841
5845
  ];
@@ -5854,8 +5858,9 @@ class FormRadioButtons extends SvelteComponent {
5854
5858
  {
5855
5859
  name: 0,
5856
5860
  options: 7,
5861
+ required: 8,
5857
5862
  textStyle: 1,
5858
- buttonStyle: 8
5863
+ buttonStyle: 9
5859
5864
  },
5860
5865
  add_css$8
5861
5866
  );
@@ -5870,12 +5875,12 @@ function add_css$7(target) {
5870
5875
 
5871
5876
  function get_each_context$3(ctx, list, i) {
5872
5877
  const child_ctx = ctx.slice();
5873
- child_ctx[9] = list[i];
5874
- child_ctx[11] = i;
5878
+ child_ctx[10] = list[i];
5879
+ child_ctx[12] = i;
5875
5880
  return child_ctx;
5876
5881
  }
5877
5882
 
5878
- // (47:10) {:else}
5883
+ // (53:10) {:else}
5879
5884
  function create_else_block(ctx) {
5880
5885
  let t;
5881
5886
 
@@ -5896,9 +5901,9 @@ function create_else_block(ctx) {
5896
5901
  };
5897
5902
  }
5898
5903
 
5899
- // (45:10) {#if option}
5904
+ // (51:10) {#if option}
5900
5905
  function create_if_block$2(ctx) {
5901
- let t_value = /*option*/ ctx[9] + "";
5906
+ let t_value = /*option*/ ctx[10] + "";
5902
5907
  let t;
5903
5908
 
5904
5909
  return {
@@ -5912,7 +5917,7 @@ function create_if_block$2(ctx) {
5912
5917
  insert_hydration(target, t, anchor);
5913
5918
  },
5914
5919
  p(ctx, dirty) {
5915
- if (dirty & /*_options*/ 4 && t_value !== (t_value = /*option*/ ctx[9] + "")) set_data(t, t_value);
5920
+ if (dirty & /*_options*/ 4 && t_value !== (t_value = /*option*/ ctx[10] + "")) set_data(t, t_value);
5916
5921
  },
5917
5922
  d(detaching) {
5918
5923
  if (detaching) detach(t);
@@ -5920,14 +5925,14 @@ function create_if_block$2(ctx) {
5920
5925
  };
5921
5926
  }
5922
5927
 
5923
- // (43:6) {#each _options as option, i}
5928
+ // (49:6) {#each _options as option, i}
5924
5929
  function create_each_block$3(ctx) {
5925
5930
  let option;
5926
5931
  let t;
5927
5932
  let option_value_value;
5928
5933
 
5929
5934
  function select_block_type(ctx, dirty) {
5930
- if (/*option*/ ctx[9]) return create_if_block$2;
5935
+ if (/*option*/ ctx[10]) return create_if_block$2;
5931
5936
  return create_else_block;
5932
5937
  }
5933
5938
 
@@ -5950,7 +5955,7 @@ function create_each_block$3(ctx) {
5950
5955
  this.h();
5951
5956
  },
5952
5957
  h() {
5953
- option.__value = option_value_value = /*option*/ ctx[9];
5958
+ option.__value = option_value_value = /*option*/ ctx[10];
5954
5959
  option.value = option.__value;
5955
5960
  },
5956
5961
  m(target, anchor) {
@@ -5971,7 +5976,7 @@ function create_each_block$3(ctx) {
5971
5976
  }
5972
5977
  }
5973
5978
 
5974
- if (dirty & /*_options*/ 4 && option_value_value !== (option_value_value = /*option*/ ctx[9])) {
5979
+ if (dirty & /*_options*/ 4 && option_value_value !== (option_value_value = /*option*/ ctx[10])) {
5975
5980
  option.__value = option_value_value;
5976
5981
  option.value = option.__value;
5977
5982
  }
@@ -6105,6 +6110,7 @@ function instance$7($$self, $$props, $$invalidate) {
6105
6110
  let styleVariables;
6106
6111
  let { name = '' } = $$props;
6107
6112
  let { options = 'プルダウン1,プルダウン2,プルダウン3' } = $$props;
6113
+ let { required = false } = $$props;
6108
6114
  let { _style = 'color: #333; cursor: pointer; background-color: #fff; border: solid 2px #ccc; border-radius: 6px; font-size: 12px; padding: 10px 30px 10px 10px;' } = $$props;
6109
6115
 
6110
6116
  let { selectStyle = {
@@ -6119,6 +6125,7 @@ function instance$7($$self, $$props, $$invalidate) {
6119
6125
  statePath,
6120
6126
  initialValue: [],
6121
6127
  validator(value) {
6128
+ if (!required) return true;
6122
6129
  return value.length > 0;
6123
6130
  }
6124
6131
  });
@@ -6131,8 +6138,9 @@ function instance$7($$self, $$props, $$invalidate) {
6131
6138
  $$self.$$set = $$props => {
6132
6139
  if ('name' in $$props) $$invalidate(4, name = $$props.name);
6133
6140
  if ('options' in $$props) $$invalidate(5, options = $$props.options);
6141
+ if ('required' in $$props) $$invalidate(6, required = $$props.required);
6134
6142
  if ('_style' in $$props) $$invalidate(0, _style = $$props._style);
6135
- if ('selectStyle' in $$props) $$invalidate(6, selectStyle = $$props.selectStyle);
6143
+ if ('selectStyle' in $$props) $$invalidate(7, selectStyle = $$props.selectStyle);
6136
6144
  };
6137
6145
 
6138
6146
  $$self.$$.update = () => {
@@ -6140,12 +6148,21 @@ function instance$7($$self, $$props, $$invalidate) {
6140
6148
  $$invalidate(2, _options = ['', ...options.split(',')]);
6141
6149
  }
6142
6150
 
6143
- if ($$self.$$.dirty & /*selectStyle*/ 64) {
6151
+ if ($$self.$$.dirty & /*selectStyle*/ 128) {
6144
6152
  $$invalidate(1, styleVariables = `--color-arrow: ${selectStyle.colorArrow}; --color-focused: ${selectStyle.colorFocused}`);
6145
6153
  }
6146
6154
  };
6147
6155
 
6148
- return [_style, styleVariables, _options, handleChange, name, options, selectStyle];
6156
+ return [
6157
+ _style,
6158
+ styleVariables,
6159
+ _options,
6160
+ handleChange,
6161
+ name,
6162
+ options,
6163
+ required,
6164
+ selectStyle
6165
+ ];
6149
6166
  }
6150
6167
 
6151
6168
  class FormSelect extends SvelteComponent {
@@ -6161,8 +6178,9 @@ class FormSelect extends SvelteComponent {
6161
6178
  {
6162
6179
  name: 4,
6163
6180
  options: 5,
6181
+ required: 6,
6164
6182
  _style: 0,
6165
- selectStyle: 6
6183
+ selectStyle: 7
6166
6184
  },
6167
6185
  add_css$7
6168
6186
  );
@@ -6177,12 +6195,12 @@ function add_css$6(target) {
6177
6195
 
6178
6196
  function get_each_context$2(ctx, list, i) {
6179
6197
  const child_ctx = ctx.slice();
6180
- child_ctx[11] = list[i];
6181
- child_ctx[13] = i;
6198
+ child_ctx[12] = list[i];
6199
+ child_ctx[14] = i;
6182
6200
  return child_ctx;
6183
6201
  }
6184
6202
 
6185
- // (55:2) {#each _options as option, i}
6203
+ // (61:2) {#each _options as option, i}
6186
6204
  function create_each_block$2(ctx) {
6187
6205
  let label;
6188
6206
  let input;
@@ -6193,7 +6211,7 @@ function create_each_block$2(ctx) {
6193
6211
  let span1_class_value;
6194
6212
  let t1;
6195
6213
  let span2;
6196
- let t2_value = /*option*/ ctx[11] + "";
6214
+ let t2_value = /*option*/ ctx[12] + "";
6197
6215
  let t2;
6198
6216
  let t3;
6199
6217
  let mounted;
@@ -6236,10 +6254,10 @@ function create_each_block$2(ctx) {
6236
6254
  attr(input, "class", "check-box-input svelte-15x08a");
6237
6255
  attr(input, "type", "checkbox");
6238
6256
  attr(input, "name", /*name*/ ctx[0]);
6239
- input.checked = input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[13]];
6257
+ input.checked = input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[14]];
6240
6258
  attr(span0, "class", "check-box-icon svelte-15x08a");
6241
6259
 
6242
- attr(span1, "class", span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[13]]
6260
+ attr(span1, "class", span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[14]]
6243
6261
  ? ' _checked'
6244
6262
  : ''}`) + " svelte-15x08a"));
6245
6263
 
@@ -6260,7 +6278,7 @@ function create_each_block$2(ctx) {
6260
6278
  append_hydration(label, t3);
6261
6279
 
6262
6280
  if (!mounted) {
6263
- dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[13]));
6281
+ dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[14]));
6264
6282
  mounted = true;
6265
6283
  }
6266
6284
  },
@@ -6271,11 +6289,11 @@ function create_each_block$2(ctx) {
6271
6289
  attr(input, "name", /*name*/ ctx[0]);
6272
6290
  }
6273
6291
 
6274
- if (dirty & /*isCheckedArray*/ 8 && input_checked_value !== (input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[13]])) {
6292
+ if (dirty & /*isCheckedArray*/ 8 && input_checked_value !== (input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[14]])) {
6275
6293
  input.checked = input_checked_value;
6276
6294
  }
6277
6295
 
6278
- if (dirty & /*isCheckedArray*/ 8 && span1_class_value !== (span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[13]]
6296
+ if (dirty & /*isCheckedArray*/ 8 && span1_class_value !== (span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[14]]
6279
6297
  ? ' _checked'
6280
6298
  : ''}`) + " svelte-15x08a"))) {
6281
6299
  attr(span1, "class", span1_class_value);
@@ -6285,7 +6303,7 @@ function create_each_block$2(ctx) {
6285
6303
  attr(span1, "style", /*_buttonStyle*/ ctx[4]);
6286
6304
  }
6287
6305
 
6288
- if (dirty & /*_options*/ 4 && t2_value !== (t2_value = /*option*/ ctx[11] + "")) set_data(t2, t2_value);
6306
+ if (dirty & /*_options*/ 4 && t2_value !== (t2_value = /*option*/ ctx[12] + "")) set_data(t2, t2_value);
6289
6307
 
6290
6308
  if (dirty & /*textStyle*/ 2) {
6291
6309
  attr(span2, "style", /*textStyle*/ ctx[1]);
@@ -6379,6 +6397,7 @@ function instance$6($$self, $$props, $$invalidate) {
6379
6397
  let $value;
6380
6398
  let { name = '' } = $$props;
6381
6399
  let { options = 'チェックボックス1,チェックボックス2,チェックボックス3' } = $$props;
6400
+ let { required = false } = $$props;
6382
6401
  let { textStyle = 'color: #333; font-size: 12px;' } = $$props;
6383
6402
 
6384
6403
  let { buttonStyle = {
@@ -6394,11 +6413,12 @@ function instance$6($$self, $$props, $$invalidate) {
6394
6413
  statePath,
6395
6414
  initialValue: [],
6396
6415
  validator(value) {
6416
+ if (!required) return true;
6397
6417
  return value.length > 0;
6398
6418
  }
6399
6419
  });
6400
6420
 
6401
- component_subscribe($$self, value, value => $$invalidate(9, $value = value));
6421
+ component_subscribe($$self, value, value => $$invalidate(10, $value = value));
6402
6422
 
6403
6423
  const handleChange = index => event => {
6404
6424
  if (isCheckedArray[index] !== event.target.checked) {
@@ -6412,8 +6432,9 @@ function instance$6($$self, $$props, $$invalidate) {
6412
6432
  $$self.$$set = $$props => {
6413
6433
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
6414
6434
  if ('options' in $$props) $$invalidate(7, options = $$props.options);
6435
+ if ('required' in $$props) $$invalidate(8, required = $$props.required);
6415
6436
  if ('textStyle' in $$props) $$invalidate(1, textStyle = $$props.textStyle);
6416
- if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
6437
+ if ('buttonStyle' in $$props) $$invalidate(9, buttonStyle = $$props.buttonStyle);
6417
6438
  };
6418
6439
 
6419
6440
  $$self.$$.update = () => {
@@ -6421,11 +6442,11 @@ function instance$6($$self, $$props, $$invalidate) {
6421
6442
  $$invalidate(2, _options = options.split(','));
6422
6443
  }
6423
6444
 
6424
- if ($$self.$$.dirty & /*buttonStyle*/ 256) {
6445
+ if ($$self.$$.dirty & /*buttonStyle*/ 512) {
6425
6446
  $$invalidate(4, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
6426
6447
  }
6427
6448
 
6428
- if ($$self.$$.dirty & /*$value, _options*/ 516) {
6449
+ if ($$self.$$.dirty & /*$value, _options*/ 1028) {
6429
6450
  $$invalidate(3, isCheckedArray = (() => {
6430
6451
  const checkedSet = new Set($value);
6431
6452
  return _options.map(option => checkedSet.has(option));
@@ -6442,6 +6463,7 @@ function instance$6($$self, $$props, $$invalidate) {
6442
6463
  value,
6443
6464
  handleChange,
6444
6465
  options,
6466
+ required,
6445
6467
  buttonStyle,
6446
6468
  $value
6447
6469
  ];
@@ -6460,8 +6482,9 @@ class FormCheckBoxes extends SvelteComponent {
6460
6482
  {
6461
6483
  name: 0,
6462
6484
  options: 7,
6485
+ required: 8,
6463
6486
  textStyle: 1,
6464
- buttonStyle: 8
6487
+ buttonStyle: 9
6465
6488
  },
6466
6489
  add_css$6
6467
6490
  );
@@ -6476,11 +6499,11 @@ function add_css$5(target) {
6476
6499
 
6477
6500
  function get_each_context$1(ctx, list, i) {
6478
6501
  const child_ctx = ctx.slice();
6479
- child_ctx[10] = list[i];
6502
+ child_ctx[11] = list[i];
6480
6503
  return child_ctx;
6481
6504
  }
6482
6505
 
6483
- // (54:30)
6506
+ // (60:30)
6484
6507
  function create_if_block_1$1(ctx) {
6485
6508
  let div;
6486
6509
  let svg;
@@ -6520,14 +6543,14 @@ function create_if_block_1$1(ctx) {
6520
6543
  this.h();
6521
6544
  },
6522
6545
  h() {
6523
- attr(path, "d", /*LIKERT_FACE_SVG_DATA*/ ctx[5][/*i*/ ctx[10]]);
6546
+ attr(path, "d", /*LIKERT_FACE_SVG_DATA*/ ctx[5][/*i*/ ctx[11]]);
6524
6547
  attr(svg, "width", "24");
6525
6548
  attr(svg, "height", "24");
6526
6549
  attr(svg, "viewBox", "0 0 24 24");
6527
6550
  attr(svg, "fill", "none");
6528
6551
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
6529
6552
  attr(svg, "class", "svelte-1ysi4uv");
6530
- attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[10] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6553
+ attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[11] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6531
6554
  attr(div, "style", /*_buttonStyle*/ ctx[1]);
6532
6555
  },
6533
6556
  m(target, anchor) {
@@ -6537,14 +6560,14 @@ function create_if_block_1$1(ctx) {
6537
6560
  append_hydration(div, t);
6538
6561
 
6539
6562
  if (!mounted) {
6540
- dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[10]));
6563
+ dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[11]));
6541
6564
  mounted = true;
6542
6565
  }
6543
6566
  },
6544
6567
  p(new_ctx, dirty) {
6545
6568
  ctx = new_ctx;
6546
6569
 
6547
- if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[10] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6570
+ if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[11] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6548
6571
  attr(div, "class", div_class_value);
6549
6572
  }
6550
6573
 
@@ -6560,7 +6583,7 @@ function create_if_block_1$1(ctx) {
6560
6583
  };
6561
6584
  }
6562
6585
 
6563
- // (48:4) {#if type === 'star'}
6586
+ // (54:4) {#if type === 'star'}
6564
6587
  function create_if_block$1(ctx) {
6565
6588
  let div;
6566
6589
  let svg;
@@ -6607,7 +6630,7 @@ function create_if_block$1(ctx) {
6607
6630
  attr(svg, "fill", "none");
6608
6631
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
6609
6632
  attr(svg, "class", "svelte-1ysi4uv");
6610
- attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[10] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6633
+ attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[11] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6611
6634
  attr(div, "style", /*_buttonStyle*/ ctx[1]);
6612
6635
  },
6613
6636
  m(target, anchor) {
@@ -6617,14 +6640,14 @@ function create_if_block$1(ctx) {
6617
6640
  append_hydration(div, t);
6618
6641
 
6619
6642
  if (!mounted) {
6620
- dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[10]));
6643
+ dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[11]));
6621
6644
  mounted = true;
6622
6645
  }
6623
6646
  },
6624
6647
  p(new_ctx, dirty) {
6625
6648
  ctx = new_ctx;
6626
6649
 
6627
- if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[10] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6650
+ if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[11] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6628
6651
  attr(div, "class", div_class_value);
6629
6652
  }
6630
6653
 
@@ -6640,7 +6663,7 @@ function create_if_block$1(ctx) {
6640
6663
  };
6641
6664
  }
6642
6665
 
6643
- // (47:2) {#each [...Array(5).keys()].map(i => i + 1) as i}
6666
+ // (53:2) {#each [...Array(5).keys()].map(i => i + 1) as i}
6644
6667
  function create_each_block$1(ctx) {
6645
6668
  let if_block_anchor;
6646
6669
 
@@ -6769,6 +6792,7 @@ function instance$5($$self, $$props, $$invalidate) {
6769
6792
  let $value;
6770
6793
  let { name = '' } = $$props;
6771
6794
  let { type = 'star' } = $$props;
6795
+ let { required = false } = $$props;
6772
6796
 
6773
6797
  let { buttonStyle = {
6774
6798
  size: '24px',
@@ -6783,11 +6807,12 @@ function instance$5($$self, $$props, $$invalidate) {
6783
6807
  statePath,
6784
6808
  initialValue: [],
6785
6809
  validator(value) {
6810
+ if (!required) return true;
6786
6811
  return value.length > 0;
6787
6812
  }
6788
6813
  });
6789
6814
 
6790
- component_subscribe($$self, value, value => $$invalidate(8, $value = value));
6815
+ component_subscribe($$self, value, value => $$invalidate(9, $value = value));
6791
6816
 
6792
6817
  const handleClick = index => event => {
6793
6818
  value.set([String(index)]);
@@ -6805,15 +6830,16 @@ function instance$5($$self, $$props, $$invalidate) {
6805
6830
  $$self.$$set = $$props => {
6806
6831
  if ('name' in $$props) $$invalidate(6, name = $$props.name);
6807
6832
  if ('type' in $$props) $$invalidate(0, type = $$props.type);
6808
- if ('buttonStyle' in $$props) $$invalidate(7, buttonStyle = $$props.buttonStyle);
6833
+ if ('required' in $$props) $$invalidate(7, required = $$props.required);
6834
+ if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
6809
6835
  };
6810
6836
 
6811
6837
  $$self.$$.update = () => {
6812
- if ($$self.$$.dirty & /*$value*/ 256) {
6838
+ if ($$self.$$.dirty & /*$value*/ 512) {
6813
6839
  $$invalidate(2, _value = Number($value[0] ?? -1));
6814
6840
  }
6815
6841
 
6816
- if ($$self.$$.dirty & /*buttonStyle*/ 128) {
6842
+ if ($$self.$$.dirty & /*buttonStyle*/ 256) {
6817
6843
  $$invalidate(1, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
6818
6844
  }
6819
6845
  };
@@ -6826,6 +6852,7 @@ function instance$5($$self, $$props, $$invalidate) {
6826
6852
  handleClick,
6827
6853
  LIKERT_FACE_SVG_DATA,
6828
6854
  name,
6855
+ required,
6829
6856
  buttonStyle,
6830
6857
  $value
6831
6858
  ];
@@ -6834,7 +6861,21 @@ function instance$5($$self, $$props, $$invalidate) {
6834
6861
  class FormRatingButtons extends SvelteComponent {
6835
6862
  constructor(options) {
6836
6863
  super();
6837
- init(this, options, instance$5, create_fragment$5, safe_not_equal, { name: 6, type: 0, buttonStyle: 7 }, add_css$5);
6864
+
6865
+ init(
6866
+ this,
6867
+ options,
6868
+ instance$5,
6869
+ create_fragment$5,
6870
+ safe_not_equal,
6871
+ {
6872
+ name: 6,
6873
+ type: 0,
6874
+ required: 7,
6875
+ buttonStyle: 8
6876
+ },
6877
+ add_css$5
6878
+ );
6838
6879
  }
6839
6880
  }
6840
6881
 
package/dist/index.es.js CHANGED
@@ -5401,12 +5401,12 @@ function add_css$8(target) {
5401
5401
 
5402
5402
  function get_each_context$4(ctx, list, i) {
5403
5403
  const child_ctx = ctx.slice();
5404
- child_ctx[11] = list[i];
5405
- child_ctx[13] = i;
5404
+ child_ctx[12] = list[i];
5405
+ child_ctx[14] = i;
5406
5406
  return child_ctx;
5407
5407
  }
5408
5408
 
5409
- // (49:2) {#each _options as option, i}
5409
+ // (55:2) {#each _options as option, i}
5410
5410
  function create_each_block$4(ctx) {
5411
5411
  let label;
5412
5412
  let input;
@@ -5414,7 +5414,7 @@ function create_each_block$4(ctx) {
5414
5414
  let input_checked_value;
5415
5415
  let t0;
5416
5416
  let span;
5417
- let t1_value = /*option*/ ctx[11] + "";
5417
+ let t1_value = /*option*/ ctx[12] + "";
5418
5418
  let t1;
5419
5419
  let t2;
5420
5420
  let mounted;
@@ -5432,8 +5432,8 @@ function create_each_block$4(ctx) {
5432
5432
  attr(input, "class", "radio-button-input svelte-1k9zlui");
5433
5433
  attr(input, "style", /*_buttonStyle*/ ctx[4]);
5434
5434
  attr(input, "name", /*name*/ ctx[0]);
5435
- input.value = input_value_value = /*option*/ ctx[11];
5436
- input.checked = input_checked_value = /*option*/ ctx[11] === /*_value*/ ctx[2];
5435
+ input.value = input_value_value = /*option*/ ctx[12];
5436
+ input.checked = input_checked_value = /*option*/ ctx[12] === /*_value*/ ctx[2];
5437
5437
  attr(span, "class", "radio-button-text svelte-1k9zlui");
5438
5438
  attr(span, "style", /*textStyle*/ ctx[1]);
5439
5439
  attr(label, "class", "radio-button svelte-1k9zlui");
@@ -5447,7 +5447,7 @@ function create_each_block$4(ctx) {
5447
5447
  append(label, t2);
5448
5448
 
5449
5449
  if (!mounted) {
5450
- dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[13]));
5450
+ dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[14]));
5451
5451
  mounted = true;
5452
5452
  }
5453
5453
  },
@@ -5462,15 +5462,15 @@ function create_each_block$4(ctx) {
5462
5462
  attr(input, "name", /*name*/ ctx[0]);
5463
5463
  }
5464
5464
 
5465
- if (dirty & /*_options*/ 8 && input_value_value !== (input_value_value = /*option*/ ctx[11])) {
5465
+ if (dirty & /*_options*/ 8 && input_value_value !== (input_value_value = /*option*/ ctx[12])) {
5466
5466
  input.value = input_value_value;
5467
5467
  }
5468
5468
 
5469
- if (dirty & /*_options, _value*/ 12 && input_checked_value !== (input_checked_value = /*option*/ ctx[11] === /*_value*/ ctx[2])) {
5469
+ if (dirty & /*_options, _value*/ 12 && input_checked_value !== (input_checked_value = /*option*/ ctx[12] === /*_value*/ ctx[2])) {
5470
5470
  input.checked = input_checked_value;
5471
5471
  }
5472
5472
 
5473
- if (dirty & /*_options*/ 8 && t1_value !== (t1_value = /*option*/ ctx[11] + "")) set_data(t1, t1_value);
5473
+ if (dirty & /*_options*/ 8 && t1_value !== (t1_value = /*option*/ ctx[12] + "")) set_data(t1, t1_value);
5474
5474
 
5475
5475
  if (dirty & /*textStyle*/ 2) {
5476
5476
  attr(span, "style", /*textStyle*/ ctx[1]);
@@ -5550,6 +5550,7 @@ function instance$8($$self, $$props, $$invalidate) {
5550
5550
  let $value;
5551
5551
  let { name = '' } = $$props;
5552
5552
  let { options = 'ラジオボタン1,ラジオボタン2,ラジオボタン3' } = $$props;
5553
+ let { required = false } = $$props;
5553
5554
  let { textStyle = 'color: #333; font-size: 12px;' } = $$props;
5554
5555
 
5555
5556
  let { buttonStyle = {
@@ -5565,11 +5566,12 @@ function instance$8($$self, $$props, $$invalidate) {
5565
5566
  statePath,
5566
5567
  initialValue: [],
5567
5568
  validator(value) {
5569
+ if (!required) return true;
5568
5570
  return value.length > 0;
5569
5571
  }
5570
5572
  });
5571
5573
 
5572
- component_subscribe($$self, value, value => $$invalidate(9, $value = value));
5574
+ component_subscribe($$self, value, value => $$invalidate(10, $value = value));
5573
5575
 
5574
5576
  const handleChange = index => event => {
5575
5577
  if (event.target.checked) {
@@ -5580,8 +5582,9 @@ function instance$8($$self, $$props, $$invalidate) {
5580
5582
  $$self.$$set = $$props => {
5581
5583
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
5582
5584
  if ('options' in $$props) $$invalidate(7, options = $$props.options);
5585
+ if ('required' in $$props) $$invalidate(8, required = $$props.required);
5583
5586
  if ('textStyle' in $$props) $$invalidate(1, textStyle = $$props.textStyle);
5584
- if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
5587
+ if ('buttonStyle' in $$props) $$invalidate(9, buttonStyle = $$props.buttonStyle);
5585
5588
  };
5586
5589
 
5587
5590
  $$self.$$.update = () => {
@@ -5589,11 +5592,11 @@ function instance$8($$self, $$props, $$invalidate) {
5589
5592
  $$invalidate(3, _options = options.split(','));
5590
5593
  }
5591
5594
 
5592
- if ($$self.$$.dirty & /*buttonStyle*/ 256) {
5595
+ if ($$self.$$.dirty & /*buttonStyle*/ 512) {
5593
5596
  $$invalidate(4, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
5594
5597
  }
5595
5598
 
5596
- if ($$self.$$.dirty & /*$value*/ 512) {
5599
+ if ($$self.$$.dirty & /*$value*/ 1024) {
5597
5600
  $$invalidate(2, _value = $value[0]);
5598
5601
  }
5599
5602
  };
@@ -5607,6 +5610,7 @@ function instance$8($$self, $$props, $$invalidate) {
5607
5610
  value,
5608
5611
  handleChange,
5609
5612
  options,
5613
+ required,
5610
5614
  buttonStyle,
5611
5615
  $value
5612
5616
  ];
@@ -5625,8 +5629,9 @@ class FormRadioButtons extends SvelteComponent {
5625
5629
  {
5626
5630
  name: 0,
5627
5631
  options: 7,
5632
+ required: 8,
5628
5633
  textStyle: 1,
5629
- buttonStyle: 8
5634
+ buttonStyle: 9
5630
5635
  },
5631
5636
  add_css$8
5632
5637
  );
@@ -5641,12 +5646,12 @@ function add_css$7(target) {
5641
5646
 
5642
5647
  function get_each_context$3(ctx, list, i) {
5643
5648
  const child_ctx = ctx.slice();
5644
- child_ctx[9] = list[i];
5645
- child_ctx[11] = i;
5649
+ child_ctx[10] = list[i];
5650
+ child_ctx[12] = i;
5646
5651
  return child_ctx;
5647
5652
  }
5648
5653
 
5649
- // (47:10) {:else}
5654
+ // (53:10) {:else}
5650
5655
  function create_else_block(ctx) {
5651
5656
  let t;
5652
5657
 
@@ -5664,9 +5669,9 @@ function create_else_block(ctx) {
5664
5669
  };
5665
5670
  }
5666
5671
 
5667
- // (45:10) {#if option}
5672
+ // (51:10) {#if option}
5668
5673
  function create_if_block$2(ctx) {
5669
- let t_value = /*option*/ ctx[9] + "";
5674
+ let t_value = /*option*/ ctx[10] + "";
5670
5675
  let t;
5671
5676
 
5672
5677
  return {
@@ -5677,7 +5682,7 @@ function create_if_block$2(ctx) {
5677
5682
  insert(target, t, anchor);
5678
5683
  },
5679
5684
  p(ctx, dirty) {
5680
- if (dirty & /*_options*/ 4 && t_value !== (t_value = /*option*/ ctx[9] + "")) set_data(t, t_value);
5685
+ if (dirty & /*_options*/ 4 && t_value !== (t_value = /*option*/ ctx[10] + "")) set_data(t, t_value);
5681
5686
  },
5682
5687
  d(detaching) {
5683
5688
  if (detaching) detach(t);
@@ -5685,14 +5690,14 @@ function create_if_block$2(ctx) {
5685
5690
  };
5686
5691
  }
5687
5692
 
5688
- // (43:6) {#each _options as option, i}
5693
+ // (49:6) {#each _options as option, i}
5689
5694
  function create_each_block$3(ctx) {
5690
5695
  let option;
5691
5696
  let t;
5692
5697
  let option_value_value;
5693
5698
 
5694
5699
  function select_block_type(ctx, dirty) {
5695
- if (/*option*/ ctx[9]) return create_if_block$2;
5700
+ if (/*option*/ ctx[10]) return create_if_block$2;
5696
5701
  return create_else_block;
5697
5702
  }
5698
5703
 
@@ -5704,7 +5709,7 @@ function create_each_block$3(ctx) {
5704
5709
  option = element("option");
5705
5710
  if_block.c();
5706
5711
  t = space();
5707
- option.__value = option_value_value = /*option*/ ctx[9];
5712
+ option.__value = option_value_value = /*option*/ ctx[10];
5708
5713
  option.value = option.__value;
5709
5714
  },
5710
5715
  m(target, anchor) {
@@ -5725,7 +5730,7 @@ function create_each_block$3(ctx) {
5725
5730
  }
5726
5731
  }
5727
5732
 
5728
- if (dirty & /*_options*/ 4 && option_value_value !== (option_value_value = /*option*/ ctx[9])) {
5733
+ if (dirty & /*_options*/ 4 && option_value_value !== (option_value_value = /*option*/ ctx[10])) {
5729
5734
  option.__value = option_value_value;
5730
5735
  option.value = option.__value;
5731
5736
  }
@@ -5836,6 +5841,7 @@ function instance$7($$self, $$props, $$invalidate) {
5836
5841
  let styleVariables;
5837
5842
  let { name = '' } = $$props;
5838
5843
  let { options = 'プルダウン1,プルダウン2,プルダウン3' } = $$props;
5844
+ let { required = false } = $$props;
5839
5845
  let { _style = 'color: #333; cursor: pointer; background-color: #fff; border: solid 2px #ccc; border-radius: 6px; font-size: 12px; padding: 10px 30px 10px 10px;' } = $$props;
5840
5846
 
5841
5847
  let { selectStyle = {
@@ -5850,6 +5856,7 @@ function instance$7($$self, $$props, $$invalidate) {
5850
5856
  statePath,
5851
5857
  initialValue: [],
5852
5858
  validator(value) {
5859
+ if (!required) return true;
5853
5860
  return value.length > 0;
5854
5861
  }
5855
5862
  });
@@ -5862,8 +5869,9 @@ function instance$7($$self, $$props, $$invalidate) {
5862
5869
  $$self.$$set = $$props => {
5863
5870
  if ('name' in $$props) $$invalidate(4, name = $$props.name);
5864
5871
  if ('options' in $$props) $$invalidate(5, options = $$props.options);
5872
+ if ('required' in $$props) $$invalidate(6, required = $$props.required);
5865
5873
  if ('_style' in $$props) $$invalidate(0, _style = $$props._style);
5866
- if ('selectStyle' in $$props) $$invalidate(6, selectStyle = $$props.selectStyle);
5874
+ if ('selectStyle' in $$props) $$invalidate(7, selectStyle = $$props.selectStyle);
5867
5875
  };
5868
5876
 
5869
5877
  $$self.$$.update = () => {
@@ -5871,12 +5879,21 @@ function instance$7($$self, $$props, $$invalidate) {
5871
5879
  $$invalidate(2, _options = ['', ...options.split(',')]);
5872
5880
  }
5873
5881
 
5874
- if ($$self.$$.dirty & /*selectStyle*/ 64) {
5882
+ if ($$self.$$.dirty & /*selectStyle*/ 128) {
5875
5883
  $$invalidate(1, styleVariables = `--color-arrow: ${selectStyle.colorArrow}; --color-focused: ${selectStyle.colorFocused}`);
5876
5884
  }
5877
5885
  };
5878
5886
 
5879
- return [_style, styleVariables, _options, handleChange, name, options, selectStyle];
5887
+ return [
5888
+ _style,
5889
+ styleVariables,
5890
+ _options,
5891
+ handleChange,
5892
+ name,
5893
+ options,
5894
+ required,
5895
+ selectStyle
5896
+ ];
5880
5897
  }
5881
5898
 
5882
5899
  class FormSelect extends SvelteComponent {
@@ -5892,8 +5909,9 @@ class FormSelect extends SvelteComponent {
5892
5909
  {
5893
5910
  name: 4,
5894
5911
  options: 5,
5912
+ required: 6,
5895
5913
  _style: 0,
5896
- selectStyle: 6
5914
+ selectStyle: 7
5897
5915
  },
5898
5916
  add_css$7
5899
5917
  );
@@ -5908,12 +5926,12 @@ function add_css$6(target) {
5908
5926
 
5909
5927
  function get_each_context$2(ctx, list, i) {
5910
5928
  const child_ctx = ctx.slice();
5911
- child_ctx[11] = list[i];
5912
- child_ctx[13] = i;
5929
+ child_ctx[12] = list[i];
5930
+ child_ctx[14] = i;
5913
5931
  return child_ctx;
5914
5932
  }
5915
5933
 
5916
- // (55:2) {#each _options as option, i}
5934
+ // (61:2) {#each _options as option, i}
5917
5935
  function create_each_block$2(ctx) {
5918
5936
  let label;
5919
5937
  let input;
@@ -5924,7 +5942,7 @@ function create_each_block$2(ctx) {
5924
5942
  let span1_class_value;
5925
5943
  let t1;
5926
5944
  let span2;
5927
- let t2_value = /*option*/ ctx[11] + "";
5945
+ let t2_value = /*option*/ ctx[12] + "";
5928
5946
  let t2;
5929
5947
  let t3;
5930
5948
  let mounted;
@@ -5944,10 +5962,10 @@ function create_each_block$2(ctx) {
5944
5962
  attr(input, "class", "check-box-input svelte-15x08a");
5945
5963
  attr(input, "type", "checkbox");
5946
5964
  attr(input, "name", /*name*/ ctx[0]);
5947
- input.checked = input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[13]];
5965
+ input.checked = input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[14]];
5948
5966
  attr(span0, "class", "check-box-icon svelte-15x08a");
5949
5967
 
5950
- attr(span1, "class", span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[13]]
5968
+ attr(span1, "class", span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[14]]
5951
5969
  ? ' _checked'
5952
5970
  : ''}`) + " svelte-15x08a"));
5953
5971
 
@@ -5968,7 +5986,7 @@ function create_each_block$2(ctx) {
5968
5986
  append(label, t3);
5969
5987
 
5970
5988
  if (!mounted) {
5971
- dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[13]));
5989
+ dispose = listen(input, "change", /*handleChange*/ ctx[6](/*i*/ ctx[14]));
5972
5990
  mounted = true;
5973
5991
  }
5974
5992
  },
@@ -5979,11 +5997,11 @@ function create_each_block$2(ctx) {
5979
5997
  attr(input, "name", /*name*/ ctx[0]);
5980
5998
  }
5981
5999
 
5982
- if (dirty & /*isCheckedArray*/ 8 && input_checked_value !== (input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[13]])) {
6000
+ if (dirty & /*isCheckedArray*/ 8 && input_checked_value !== (input_checked_value = /*isCheckedArray*/ ctx[3][/*i*/ ctx[14]])) {
5983
6001
  input.checked = input_checked_value;
5984
6002
  }
5985
6003
 
5986
- if (dirty & /*isCheckedArray*/ 8 && span1_class_value !== (span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[13]]
6004
+ if (dirty & /*isCheckedArray*/ 8 && span1_class_value !== (span1_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[3][/*i*/ ctx[14]]
5987
6005
  ? ' _checked'
5988
6006
  : ''}`) + " svelte-15x08a"))) {
5989
6007
  attr(span1, "class", span1_class_value);
@@ -5993,7 +6011,7 @@ function create_each_block$2(ctx) {
5993
6011
  attr(span1, "style", /*_buttonStyle*/ ctx[4]);
5994
6012
  }
5995
6013
 
5996
- if (dirty & /*_options*/ 4 && t2_value !== (t2_value = /*option*/ ctx[11] + "")) set_data(t2, t2_value);
6014
+ if (dirty & /*_options*/ 4 && t2_value !== (t2_value = /*option*/ ctx[12] + "")) set_data(t2, t2_value);
5997
6015
 
5998
6016
  if (dirty & /*textStyle*/ 2) {
5999
6017
  attr(span2, "style", /*textStyle*/ ctx[1]);
@@ -6073,6 +6091,7 @@ function instance$6($$self, $$props, $$invalidate) {
6073
6091
  let $value;
6074
6092
  let { name = '' } = $$props;
6075
6093
  let { options = 'チェックボックス1,チェックボックス2,チェックボックス3' } = $$props;
6094
+ let { required = false } = $$props;
6076
6095
  let { textStyle = 'color: #333; font-size: 12px;' } = $$props;
6077
6096
 
6078
6097
  let { buttonStyle = {
@@ -6088,11 +6107,12 @@ function instance$6($$self, $$props, $$invalidate) {
6088
6107
  statePath,
6089
6108
  initialValue: [],
6090
6109
  validator(value) {
6110
+ if (!required) return true;
6091
6111
  return value.length > 0;
6092
6112
  }
6093
6113
  });
6094
6114
 
6095
- component_subscribe($$self, value, value => $$invalidate(9, $value = value));
6115
+ component_subscribe($$self, value, value => $$invalidate(10, $value = value));
6096
6116
 
6097
6117
  const handleChange = index => event => {
6098
6118
  if (isCheckedArray[index] !== event.target.checked) {
@@ -6106,8 +6126,9 @@ function instance$6($$self, $$props, $$invalidate) {
6106
6126
  $$self.$$set = $$props => {
6107
6127
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
6108
6128
  if ('options' in $$props) $$invalidate(7, options = $$props.options);
6129
+ if ('required' in $$props) $$invalidate(8, required = $$props.required);
6109
6130
  if ('textStyle' in $$props) $$invalidate(1, textStyle = $$props.textStyle);
6110
- if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
6131
+ if ('buttonStyle' in $$props) $$invalidate(9, buttonStyle = $$props.buttonStyle);
6111
6132
  };
6112
6133
 
6113
6134
  $$self.$$.update = () => {
@@ -6115,11 +6136,11 @@ function instance$6($$self, $$props, $$invalidate) {
6115
6136
  $$invalidate(2, _options = options.split(','));
6116
6137
  }
6117
6138
 
6118
- if ($$self.$$.dirty & /*buttonStyle*/ 256) {
6139
+ if ($$self.$$.dirty & /*buttonStyle*/ 512) {
6119
6140
  $$invalidate(4, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
6120
6141
  }
6121
6142
 
6122
- if ($$self.$$.dirty & /*$value, _options*/ 516) {
6143
+ if ($$self.$$.dirty & /*$value, _options*/ 1028) {
6123
6144
  $$invalidate(3, isCheckedArray = (() => {
6124
6145
  const checkedSet = new Set($value);
6125
6146
  return _options.map(option => checkedSet.has(option));
@@ -6136,6 +6157,7 @@ function instance$6($$self, $$props, $$invalidate) {
6136
6157
  value,
6137
6158
  handleChange,
6138
6159
  options,
6160
+ required,
6139
6161
  buttonStyle,
6140
6162
  $value
6141
6163
  ];
@@ -6154,8 +6176,9 @@ class FormCheckBoxes extends SvelteComponent {
6154
6176
  {
6155
6177
  name: 0,
6156
6178
  options: 7,
6179
+ required: 8,
6157
6180
  textStyle: 1,
6158
- buttonStyle: 8
6181
+ buttonStyle: 9
6159
6182
  },
6160
6183
  add_css$6
6161
6184
  );
@@ -6170,11 +6193,11 @@ function add_css$5(target) {
6170
6193
 
6171
6194
  function get_each_context$1(ctx, list, i) {
6172
6195
  const child_ctx = ctx.slice();
6173
- child_ctx[10] = list[i];
6196
+ child_ctx[11] = list[i];
6174
6197
  return child_ctx;
6175
6198
  }
6176
6199
 
6177
- // (54:30)
6200
+ // (60:30)
6178
6201
  function create_if_block_1$1(ctx) {
6179
6202
  let div;
6180
6203
  let svg;
@@ -6190,14 +6213,14 @@ function create_if_block_1$1(ctx) {
6190
6213
  svg = svg_element("svg");
6191
6214
  path = svg_element("path");
6192
6215
  t = space();
6193
- attr(path, "d", /*LIKERT_FACE_SVG_DATA*/ ctx[5][/*i*/ ctx[10]]);
6216
+ attr(path, "d", /*LIKERT_FACE_SVG_DATA*/ ctx[5][/*i*/ ctx[11]]);
6194
6217
  attr(svg, "width", "24");
6195
6218
  attr(svg, "height", "24");
6196
6219
  attr(svg, "viewBox", "0 0 24 24");
6197
6220
  attr(svg, "fill", "none");
6198
6221
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
6199
6222
  attr(svg, "class", "svelte-1ysi4uv");
6200
- attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[10] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6223
+ attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[11] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6201
6224
  attr(div, "style", /*_buttonStyle*/ ctx[1]);
6202
6225
  },
6203
6226
  m(target, anchor) {
@@ -6207,14 +6230,14 @@ function create_if_block_1$1(ctx) {
6207
6230
  append(div, t);
6208
6231
 
6209
6232
  if (!mounted) {
6210
- dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[10]));
6233
+ dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[11]));
6211
6234
  mounted = true;
6212
6235
  }
6213
6236
  },
6214
6237
  p(new_ctx, dirty) {
6215
6238
  ctx = new_ctx;
6216
6239
 
6217
- if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[10] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6240
+ if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[11] === /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6218
6241
  attr(div, "class", div_class_value);
6219
6242
  }
6220
6243
 
@@ -6230,7 +6253,7 @@ function create_if_block_1$1(ctx) {
6230
6253
  };
6231
6254
  }
6232
6255
 
6233
- // (48:4) {#if type === 'star'}
6256
+ // (54:4) {#if type === 'star'}
6234
6257
  function create_if_block$1(ctx) {
6235
6258
  let div;
6236
6259
  let svg;
@@ -6253,7 +6276,7 @@ function create_if_block$1(ctx) {
6253
6276
  attr(svg, "fill", "none");
6254
6277
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
6255
6278
  attr(svg, "class", "svelte-1ysi4uv");
6256
- attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[10] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6279
+ attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[11] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv");
6257
6280
  attr(div, "style", /*_buttonStyle*/ ctx[1]);
6258
6281
  },
6259
6282
  m(target, anchor) {
@@ -6263,14 +6286,14 @@ function create_if_block$1(ctx) {
6263
6286
  append(div, t);
6264
6287
 
6265
6288
  if (!mounted) {
6266
- dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[10]));
6289
+ dispose = listen(div, "click", /*handleClick*/ ctx[4](/*i*/ ctx[11]));
6267
6290
  mounted = true;
6268
6291
  }
6269
6292
  },
6270
6293
  p(new_ctx, dirty) {
6271
6294
  ctx = new_ctx;
6272
6295
 
6273
- if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[10] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6296
+ if (dirty & /*_value*/ 4 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[11] <= /*_value*/ ctx[2] ? ' _selected' : '') + " svelte-1ysi4uv")) {
6274
6297
  attr(div, "class", div_class_value);
6275
6298
  }
6276
6299
 
@@ -6286,7 +6309,7 @@ function create_if_block$1(ctx) {
6286
6309
  };
6287
6310
  }
6288
6311
 
6289
- // (47:2) {#each [...Array(5).keys()].map(i => i + 1) as i}
6312
+ // (53:2) {#each [...Array(5).keys()].map(i => i + 1) as i}
6290
6313
  function create_each_block$1(ctx) {
6291
6314
  let if_block_anchor;
6292
6315
 
@@ -6397,6 +6420,7 @@ function instance$5($$self, $$props, $$invalidate) {
6397
6420
  let $value;
6398
6421
  let { name = '' } = $$props;
6399
6422
  let { type = 'star' } = $$props;
6423
+ let { required = false } = $$props;
6400
6424
 
6401
6425
  let { buttonStyle = {
6402
6426
  size: '24px',
@@ -6411,11 +6435,12 @@ function instance$5($$self, $$props, $$invalidate) {
6411
6435
  statePath,
6412
6436
  initialValue: [],
6413
6437
  validator(value) {
6438
+ if (!required) return true;
6414
6439
  return value.length > 0;
6415
6440
  }
6416
6441
  });
6417
6442
 
6418
- component_subscribe($$self, value, value => $$invalidate(8, $value = value));
6443
+ component_subscribe($$self, value, value => $$invalidate(9, $value = value));
6419
6444
 
6420
6445
  const handleClick = index => event => {
6421
6446
  value.set([String(index)]);
@@ -6433,15 +6458,16 @@ function instance$5($$self, $$props, $$invalidate) {
6433
6458
  $$self.$$set = $$props => {
6434
6459
  if ('name' in $$props) $$invalidate(6, name = $$props.name);
6435
6460
  if ('type' in $$props) $$invalidate(0, type = $$props.type);
6436
- if ('buttonStyle' in $$props) $$invalidate(7, buttonStyle = $$props.buttonStyle);
6461
+ if ('required' in $$props) $$invalidate(7, required = $$props.required);
6462
+ if ('buttonStyle' in $$props) $$invalidate(8, buttonStyle = $$props.buttonStyle);
6437
6463
  };
6438
6464
 
6439
6465
  $$self.$$.update = () => {
6440
- if ($$self.$$.dirty & /*$value*/ 256) {
6466
+ if ($$self.$$.dirty & /*$value*/ 512) {
6441
6467
  $$invalidate(2, _value = Number($value[0] ?? -1));
6442
6468
  }
6443
6469
 
6444
- if ($$self.$$.dirty & /*buttonStyle*/ 128) {
6470
+ if ($$self.$$.dirty & /*buttonStyle*/ 256) {
6445
6471
  $$invalidate(1, _buttonStyle = `--size: ${buttonStyle.size}; --color-active: ${buttonStyle.colorActive}; --color-inactive: ${buttonStyle.colorInactive}`);
6446
6472
  }
6447
6473
  };
@@ -6454,6 +6480,7 @@ function instance$5($$self, $$props, $$invalidate) {
6454
6480
  handleClick,
6455
6481
  LIKERT_FACE_SVG_DATA,
6456
6482
  name,
6483
+ required,
6457
6484
  buttonStyle,
6458
6485
  $value
6459
6486
  ];
@@ -6462,7 +6489,21 @@ function instance$5($$self, $$props, $$invalidate) {
6462
6489
  class FormRatingButtons extends SvelteComponent {
6463
6490
  constructor(options) {
6464
6491
  super();
6465
- init(this, options, instance$5, create_fragment$5, safe_not_equal, { name: 6, type: 0, buttonStyle: 7 }, add_css$5);
6492
+
6493
+ init(
6494
+ this,
6495
+ options,
6496
+ instance$5,
6497
+ create_fragment$5,
6498
+ safe_not_equal,
6499
+ {
6500
+ name: 6,
6501
+ type: 0,
6502
+ required: 7,
6503
+ buttonStyle: 8
6504
+ },
6505
+ add_css$5
6506
+ );
6466
6507
  }
6467
6508
  }
6468
6509
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.121",
3
+ "version": "1.1.122-27933539.c9ba2e60",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",