qc-trousse-sdg 1.4.7 → 1.4.9

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.
@@ -79574,7 +79574,7 @@
79574
79574
 
79575
79575
  SearchInput[FILENAME] = 'src/sdg/components/SearchInput/SearchInput.svelte';
79576
79576
 
79577
- var root$4 = add_locations(from_html(`<div><!> <input/> <!></div>`), SearchInput[FILENAME], [[28, 0, [[39, 4]]]]);
79577
+ var root$4 = add_locations(from_html(`<!> <div><!> <input/> <!></div>`, 1), SearchInput[FILENAME], [[38, 0, [[51, 4]]]]);
79578
79578
 
79579
79579
  function SearchInput($$anchor, $$props) {
79580
79580
  check_target(new.target);
@@ -79583,6 +79583,8 @@
79583
79583
  const lang = Utils.getPageLanguage();
79584
79584
 
79585
79585
  let value = prop($$props, 'value', 15, ''),
79586
+ label = prop($$props, 'label', 7, ''),
79587
+ size = prop($$props, 'size', 7, ''),
79586
79588
  ariaLabel = prop($$props, 'ariaLabel', 23, () => strict_equals(lang, "fr") ? "Rechercher..." : "Search..."),
79587
79589
  clearAriaLabel = prop($$props, 'clearAriaLabel', 23, () => strict_equals(lang, "fr") ? "Effacer le texte" : "Clear text"),
79588
79590
  leftIcon = prop($$props, 'leftIcon', 7, false),
@@ -79595,6 +79597,8 @@
79595
79597
  '$$legacy',
79596
79598
  '$$host',
79597
79599
  'value',
79600
+ 'label',
79601
+ 'size',
79598
79602
  'ariaLabel',
79599
79603
  'clearAriaLabel',
79600
79604
  'leftIcon',
@@ -79624,6 +79628,24 @@
79624
79628
  flushSync();
79625
79629
  },
79626
79630
 
79631
+ get label() {
79632
+ return label();
79633
+ },
79634
+
79635
+ set label($$value = '') {
79636
+ label($$value);
79637
+ flushSync();
79638
+ },
79639
+
79640
+ get size() {
79641
+ return size();
79642
+ },
79643
+
79644
+ set size($$value = '') {
79645
+ size($$value);
79646
+ flushSync();
79647
+ },
79648
+
79627
79649
  get ariaLabel() {
79628
79650
  return ariaLabel();
79629
79651
  },
@@ -79665,11 +79687,49 @@
79665
79687
  ...legacy_api()
79666
79688
  };
79667
79689
 
79668
- var div = root$4();
79669
- var node = child(div);
79690
+ var fragment = root$4();
79691
+ var node = first_child(fragment);
79670
79692
 
79671
79693
  {
79672
79694
  var consequent = ($$anchor) => {
79695
+ add_svelte_meta(
79696
+ () => Label($$anchor, {
79697
+ get disabled() {
79698
+ return isDisabled;
79699
+ },
79700
+
79701
+ get text() {
79702
+ return label();
79703
+ },
79704
+
79705
+ get forId() {
79706
+ return id();
79707
+ }
79708
+ }),
79709
+ 'component',
79710
+ SearchInput,
79711
+ 32,
79712
+ 4,
79713
+ { componentTag: 'Label' }
79714
+ );
79715
+ };
79716
+
79717
+ add_svelte_meta(
79718
+ () => if_block(node, ($$render) => {
79719
+ if (label()) $$render(consequent);
79720
+ }),
79721
+ 'if',
79722
+ SearchInput,
79723
+ 31,
79724
+ 0
79725
+ );
79726
+ }
79727
+
79728
+ var div = sibling(node, 2);
79729
+ var node_1 = child(div);
79730
+
79731
+ {
79732
+ var consequent_1 = ($$anchor) => {
79673
79733
  {
79674
79734
  let $0 = user_derived(() => `qc-icon${isDisabled ? ' is-disabled' : ''}`);
79675
79735
 
@@ -79684,7 +79744,7 @@
79684
79744
  }),
79685
79745
  'component',
79686
79746
  SearchInput,
79687
- 34,
79747
+ 46,
79688
79748
  8,
79689
79749
  { componentTag: 'Icon' }
79690
79750
  );
@@ -79692,24 +79752,24 @@
79692
79752
  };
79693
79753
 
79694
79754
  add_svelte_meta(
79695
- () => if_block(node, ($$render) => {
79696
- if (leftIcon()) $$render(consequent);
79755
+ () => if_block(node_1, ($$render) => {
79756
+ if (leftIcon()) $$render(consequent_1);
79697
79757
  }),
79698
79758
  'if',
79699
79759
  SearchInput,
79700
- 33,
79760
+ 45,
79701
79761
  4
79702
79762
  );
79703
79763
  }
79704
79764
 
79705
- var input = sibling(node, 2);
79765
+ var input = sibling(node_1, 2);
79706
79766
 
79707
79767
  attribute_effect(
79708
79768
  input,
79709
79769
  () => ({
79710
79770
  type: 'search',
79711
79771
  autocomplete: 'off',
79712
- 'aria-label': ariaLabel(),
79772
+ 'aria-label': label() ? undefined : ariaLabel(),
79713
79773
  class: isDisabled ? "qc-disabled" : "",
79714
79774
  id: id(),
79715
79775
  ...rest
@@ -79723,10 +79783,10 @@
79723
79783
 
79724
79784
  bind_this(input, ($$value) => searchInput = $$value, () => searchInput);
79725
79785
 
79726
- var node_1 = sibling(input, 2);
79786
+ var node_2 = sibling(input, 2);
79727
79787
 
79728
79788
  {
79729
- var consequent_1 = ($$anchor) => {
79789
+ var consequent_2 = ($$anchor) => {
79730
79790
  add_svelte_meta(
79731
79791
  () => IconButton($$anchor, {
79732
79792
  type: 'button',
@@ -79746,33 +79806,37 @@
79746
79806
  }),
79747
79807
  'component',
79748
79808
  SearchInput,
79749
- 49,
79809
+ 61,
79750
79810
  4,
79751
79811
  { componentTag: 'IconButton' }
79752
79812
  );
79753
79813
  };
79754
79814
 
79755
79815
  add_svelte_meta(
79756
- () => if_block(node_1, ($$render) => {
79757
- if (value()) $$render(consequent_1);
79816
+ () => if_block(node_2, ($$render) => {
79817
+ if (value()) $$render(consequent_2);
79758
79818
  }),
79759
79819
  'if',
79760
79820
  SearchInput,
79761
- 48,
79821
+ 60,
79762
79822
  4
79763
79823
  );
79764
79824
  }
79765
79825
 
79766
79826
  reset(div);
79767
79827
 
79768
- template_effect(() => set_class(div, 1, clsx([
79769
- "qc-search-input",
79770
- leftIcon() && "qc-search-left-icon",
79771
- leftIcon() && isDisabled && "qc-search-left-icon-disabled"
79772
- ])));
79828
+ template_effect(() => {
79829
+ set_class(div, 1, clsx([
79830
+ "qc-search-input",
79831
+ leftIcon() && "qc-search-left-icon",
79832
+ leftIcon() && isDisabled && "qc-search-left-icon-disabled"
79833
+ ]));
79834
+
79835
+ set_attribute(div, 'size', size());
79836
+ });
79773
79837
 
79774
79838
  bind_value(input, value);
79775
- append($$anchor, div);
79839
+ append($$anchor, fragment);
79776
79840
 
79777
79841
  return pop($$exports);
79778
79842
  }
@@ -79781,6 +79845,8 @@
79781
79845
  SearchInput,
79782
79846
  {
79783
79847
  value: {},
79848
+ label: {},
79849
+ size: {},
79784
79850
  ariaLabel: {},
79785
79851
  clearAriaLabel: {},
79786
79852
  leftIcon: {},
@@ -80935,9 +81001,9 @@
80935
81001
 
80936
81002
  DropdownList[FILENAME] = 'src/sdg/components/DropdownList/DropdownList.svelte';
80937
81003
 
80938
- var root_2$2 = add_locations(from_html(`<div class="qc-dropdown-list-search"><!></div>`), DropdownList[FILENAME], [[386, 20]]);
80939
- var root_3 = add_locations(from_html(`<span> </span>`), DropdownList[FILENAME], [[427, 24]]);
80940
- var root$1 = add_locations(from_html(`<div><div><!> <div tabindex="-1"><!> <div class="qc-dropdown-list-expanded" tabindex="-1" role="listbox"><!> <!> <div role="status" class="qc-sr-only"><!></div></div></div></div> <!></div>`), DropdownList[FILENAME], [[316, 0, [[321, 4, [[340, 8, [[369, 12, [[425, 16]]]]]]]]]]);
81004
+ var root_2$2 = add_locations(from_html(`<div class="qc-dropdown-list-search"><!></div>`), DropdownList[FILENAME], [[394, 20]]);
81005
+ var root_3 = add_locations(from_html(`<span> </span>`), DropdownList[FILENAME], [[435, 24]]);
81006
+ var root$1 = add_locations(from_html(`<div><div><!> <div tabindex="-1"><!> <div class="qc-dropdown-list-expanded" tabindex="-1" role="listbox"><!> <!> <div role="status" class="qc-sr-only"><!></div></div></div></div> <!></div>`), DropdownList[FILENAME], [[324, 0, [[329, 4, [[348, 8, [[377, 12, [[433, 16]]]]]]]]]]);
80941
81007
 
80942
81008
  function DropdownList($$anchor, $$props) {
80943
81009
  check_target(new.target);
@@ -81214,6 +81280,14 @@
81214
81280
  }
81215
81281
  });
81216
81282
 
81283
+ user_effect(() => {
81284
+ if (value()) {
81285
+ items().forEach((item) => {
81286
+ item.checked = value().includes(item.value);
81287
+ });
81288
+ }
81289
+ });
81290
+
81217
81291
  user_effect(() => {
81218
81292
  items().forEach((item) => {
81219
81293
  if (!item.id) {
@@ -81486,7 +81560,7 @@
81486
81560
  }),
81487
81561
  'component',
81488
81562
  DropdownList,
81489
- 327,
81563
+ 335,
81490
81564
  12,
81491
81565
  { componentTag: 'Label' }
81492
81566
  );
@@ -81498,7 +81572,7 @@
81498
81572
  }),
81499
81573
  'if',
81500
81574
  DropdownList,
81501
- 326,
81575
+ 334,
81502
81576
  8
81503
81577
  );
81504
81578
  }
@@ -81570,7 +81644,7 @@
81570
81644
  }),
81571
81645
  'component',
81572
81646
  DropdownList,
81573
- 349,
81647
+ 357,
81574
81648
  12,
81575
81649
  { componentTag: 'DropdownListButton' }
81576
81650
  );
@@ -81625,7 +81699,7 @@
81625
81699
  ),
81626
81700
  'component',
81627
81701
  DropdownList,
81628
- 387,
81702
+ 395,
81629
81703
  24,
81630
81704
  { componentTag: 'SearchInput' }
81631
81705
  );
@@ -81641,7 +81715,7 @@
81641
81715
  }),
81642
81716
  'if',
81643
81717
  DropdownList,
81644
- 385,
81718
+ 393,
81645
81719
  16
81646
81720
  );
81647
81721
  }
@@ -81701,7 +81775,7 @@
81701
81775
  ),
81702
81776
  'component',
81703
81777
  DropdownList,
81704
- 405,
81778
+ 413,
81705
81779
  16,
81706
81780
  { componentTag: 'DropdownListItems' }
81707
81781
  );
@@ -81721,7 +81795,7 @@
81721
81795
  }),
81722
81796
  'key',
81723
81797
  DropdownList,
81724
- 426,
81798
+ 434,
81725
81799
  20
81726
81800
  );
81727
81801
 
@@ -81769,7 +81843,7 @@
81769
81843
  }),
81770
81844
  'component',
81771
81845
  DropdownList,
81772
- 435,
81846
+ 443,
81773
81847
  4,
81774
81848
  { componentTag: 'FormError' }
81775
81849
  );
@@ -82934,7 +83008,7 @@
82934
83008
  ));
82935
83009
 
82936
83010
  if (document.getElementById("version")) {
82937
- document.getElementById("version").textContent = `v1.4.7`;
83011
+ document.getElementById("version").textContent = `v1.4.9`;
82938
83012
  }
82939
83013
 
82940
83014
  // Show maskable "general alert" component