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.
@@ -11437,7 +11437,7 @@
11437
11437
 
11438
11438
  ExternalLink[FILENAME] = 'src/sdg/components/ExternalLink/ExternalLink.svelte';
11439
11439
 
11440
- var root$d = add_locations(from_html(`<div hidden=""><!></div>`), ExternalLink[FILENAME], [[48, 0]]);
11440
+ var root$d = add_locations(from_html(`<div hidden=""><!></div>`), ExternalLink[FILENAME], [[108, 0]]);
11441
11441
 
11442
11442
  function ExternalLink($$anchor, $$props) {
11443
11443
  check_target(new.target);
@@ -11451,22 +11451,80 @@
11451
11451
  nestedExternalLinks = prop($$props, 'nestedExternalLinks', 7, false);
11452
11452
 
11453
11453
  let imgElement = tag(state(void 0), 'imgElement');
11454
- let processedLinks = new Set();
11455
11454
 
11456
- function addExternalLinkIcon(links) {
11457
- links.forEach((link) => {
11458
- if (processedLinks.has(link.innerHTML)) {
11459
- return;
11460
- }
11455
+ function createVisibleNodesTreeWalker(link) {
11456
+ return document.createTreeWalker(link, NodeFilter.SHOW_ALL, {
11457
+ acceptNode: (node) => {
11458
+ if (node instanceof Element) {
11459
+ if (node.hasAttribute('hidden')) {
11460
+ return NodeFilter.FILTER_REJECT;
11461
+ }
11462
+
11463
+ const style = window.getComputedStyle(node);
11464
+
11465
+ // Si l'élément est masqué par CSS (display ou visibility), on l'ignore
11466
+ if (strict_equals(style.display, 'none') || strict_equals(style.visibility, 'hidden') || strict_equals(style.position, 'absolute')) {
11467
+ return NodeFilter.FILTER_REJECT;
11468
+ }
11469
+ }
11461
11470
 
11462
- let linkContent = link.innerHTML;
11471
+ if (!node instanceof Text) {
11472
+ return NodeFilter.FILTER_SKIP;
11473
+ }
11474
+
11475
+ // Ignore les nœuds vides
11476
+ if (!(/\S/).test(node.textContent)) {
11477
+ return NodeFilter.FILTER_SKIP;
11478
+ }
11463
11479
 
11464
- linkContent = `<span class="qc-ext-link-text">${linkContent}</span>&nbsp;${get(imgElement).outerHTML}`;
11465
- link.innerHTML = linkContent;
11466
- processedLinks.add(linkContent);
11480
+ return NodeFilter.FILTER_ACCEPT;
11481
+ }
11467
11482
  });
11468
11483
  }
11469
11484
 
11485
+ function addExternalLinkIcon(link) {
11486
+ // Crée un TreeWalker pour parcourir uniquement les nœuds texte visibles
11487
+ const walker = createVisibleNodesTreeWalker(link);
11488
+
11489
+ let lastTextNode = null;
11490
+
11491
+ while (walker.nextNode()) {
11492
+ lastTextNode = walker.currentNode;
11493
+ }
11494
+
11495
+ // S'il n'y a pas de nœud texte visible, on ne fait rien
11496
+ if (!lastTextNode) {
11497
+ return;
11498
+ }
11499
+
11500
+ // Séparer le contenu du dernier nœud texte en deux parties :
11501
+ // le préfixe (éventuel) et le dernier mot
11502
+ const text = lastTextNode.textContent;
11503
+
11504
+ const match = text.match(/^([\s\S]*\s)?(\S+)\s*$/m);
11505
+
11506
+ if (!match) {
11507
+ return;
11508
+ }
11509
+
11510
+ const prefix = match[1] || "";
11511
+ const lastWord = match[2].replace(/([\/\-\u2013\u2014])/g, "$1<wbr>");
11512
+
11513
+ // Crée un span avec white-space: nowrap pour empêcher le saut de ligne de l'image de lien externe
11514
+ const span = document.createElement('span');
11515
+
11516
+ span.classList.add('img-wrap');
11517
+ span.innerHTML = `${lastWord}${get(imgElement).outerHTML}`;
11518
+
11519
+ // Met à jour le nœud texte : on garde le préfixe et on insère le span après
11520
+ if (prefix) {
11521
+ lastTextNode.textContent = prefix;
11522
+ lastTextNode.parentNode.insertBefore(span, lastTextNode.nextSibling);
11523
+ } else {
11524
+ lastTextNode.parentNode.replaceChild(span, lastTextNode);
11525
+ }
11526
+ }
11527
+
11470
11528
  user_effect(() => {
11471
11529
  if (nestedExternalLinks() || links().length <= 0 || !get(imgElement)) {
11472
11530
  return;
@@ -11475,7 +11533,11 @@
11475
11533
  isUpdating(true);
11476
11534
 
11477
11535
  tick().then(() => {
11478
- addExternalLinkIcon(links());
11536
+ links().forEach((link) => {
11537
+ if (!link.querySelector('.qc-ext-link-img')) {
11538
+ addExternalLinkIcon(link);
11539
+ }
11540
+ });
11479
11541
 
11480
11542
  return tick();
11481
11543
  }).then(() => {
@@ -11528,10 +11590,10 @@
11528
11590
  };
11529
11591
 
11530
11592
  var div = root$d();
11531
- var node = child(div);
11593
+ var node_1 = child(div);
11532
11594
 
11533
11595
  add_svelte_meta(
11534
- () => Icon(node, {
11596
+ () => Icon(node_1, {
11535
11597
  type: 'external-link',
11536
11598
 
11537
11599
  get alt() {
@@ -11539,6 +11601,7 @@
11539
11601
  },
11540
11602
 
11541
11603
  class: 'qc-ext-link-img',
11604
+ color: 'link-text',
11542
11605
 
11543
11606
  get rootElement() {
11544
11607
  return get(imgElement);
@@ -11550,7 +11613,7 @@
11550
11613
  }),
11551
11614
  'component',
11552
11615
  ExternalLink,
11553
- 49,
11616
+ 109,
11554
11617
  4,
11555
11618
  { componentTag: 'Icon' }
11556
11619
  );
@@ -11581,11 +11644,11 @@
11581
11644
  push($$props, true);
11582
11645
 
11583
11646
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
11584
- const nestedExternalLinks = $$props.$$host.querySelector('qc-external-link');
11585
- let links = tag(state(proxy([])), 'links');
11586
- const observer = Utils.createMutationObserver($$props.$$host, refreshLinks);
11647
+ let links = tag(state(proxy(queryLinks())), 'links');
11587
11648
  let isUpdating = tag(state(false), 'isUpdating');
11588
11649
  let pendingUpdate = false;
11650
+ const nestedExternalLinks = $$props.$$host.querySelector('qc-external-link');
11651
+ const observer = Utils.createMutationObserver($$props.$$host, refreshLinks);
11589
11652
 
11590
11653
  function queryLinks() {
11591
11654
  return Array.from($$props.$$host.querySelectorAll('a'));
@@ -11612,29 +11675,30 @@
11612
11675
 
11613
11676
  onMount(() => {
11614
11677
  $$props.$$host.classList.add('qc-external-link');
11615
- set(links, queryLinks(), true);
11616
11678
  observer?.observe($$props.$$host, { childList: true, characterData: true, subtree: true });
11617
11679
  });
11618
11680
 
11619
- onDestroy(() => {
11620
- observer?.disconnect();
11621
- });
11681
+ onDestroy(() => observer?.disconnect());
11622
11682
 
11623
11683
  var $$exports = { ...legacy_api() };
11624
11684
 
11625
11685
  add_svelte_meta(
11626
11686
  () => ExternalLink($$anchor, spread_props(
11627
11687
  {
11628
- get links() {
11629
- return get(links);
11630
- },
11631
-
11632
11688
  get nestedExternalLinks() {
11633
11689
  return nestedExternalLinks;
11634
11690
  }
11635
11691
  },
11636
11692
  () => props,
11637
11693
  {
11694
+ get links() {
11695
+ return get(links);
11696
+ },
11697
+
11698
+ set links($$value) {
11699
+ set(links, $$value, true);
11700
+ },
11701
+
11638
11702
  get isUpdating() {
11639
11703
  return get(isUpdating);
11640
11704
  },
@@ -11646,7 +11710,7 @@
11646
11710
  )),
11647
11711
  'component',
11648
11712
  ExternalLinkWC,
11649
- 58,
11713
+ 54,
11650
11714
  0,
11651
11715
  { componentTag: 'ExternalLink' }
11652
11716
  );
@@ -11656,9 +11720,232 @@
11656
11720
 
11657
11721
  customElements.define('qc-external-link', create_custom_element(ExternalLinkWC, { externalIconAlt: { attribute: 'img-alt' } }, [], [], false));
11658
11722
 
11723
+ LabelText[FILENAME] = 'src/sdg/components/Label/LabelText.svelte';
11724
+
11725
+ var root_1$6 = add_locations(from_html(`<span class="qc-required" aria-hidden="true">*</span>`), LabelText[FILENAME], [[5, 61]]);
11726
+ var root$c = add_locations(from_html(`<span class="qc-label-text"><!></span><!>`, 1), LabelText[FILENAME], [[5, 0]]);
11727
+
11728
+ function LabelText($$anchor, $$props) {
11729
+ check_target(new.target);
11730
+ push($$props, true);
11731
+
11732
+ let text = prop($$props, 'text', 7),
11733
+ required = prop($$props, 'required', 7);
11734
+
11735
+ var $$exports = {
11736
+ get text() {
11737
+ return text();
11738
+ },
11739
+
11740
+ set text($$value) {
11741
+ text($$value);
11742
+ flushSync();
11743
+ },
11744
+
11745
+ get required() {
11746
+ return required();
11747
+ },
11748
+
11749
+ set required($$value) {
11750
+ required($$value);
11751
+ flushSync();
11752
+ },
11753
+
11754
+ ...legacy_api()
11755
+ };
11756
+
11757
+ var fragment = root$c();
11758
+ var span = first_child(fragment);
11759
+ var node = child(span);
11760
+
11761
+ html(node, text);
11762
+ reset(span);
11763
+
11764
+ var node_1 = sibling(span);
11765
+
11766
+ {
11767
+ var consequent = ($$anchor) => {
11768
+ var span_1 = root_1$6();
11769
+
11770
+ append($$anchor, span_1);
11771
+ };
11772
+
11773
+ add_svelte_meta(
11774
+ () => if_block(node_1, ($$render) => {
11775
+ if (required()) $$render(consequent);
11776
+ }),
11777
+ 'if',
11778
+ LabelText,
11779
+ 5,
11780
+ 47
11781
+ );
11782
+ }
11783
+
11784
+ append($$anchor, fragment);
11785
+
11786
+ return pop($$exports);
11787
+ }
11788
+
11789
+ create_custom_element(LabelText, { text: {}, required: {} }, [], [], true);
11790
+
11791
+ Label[FILENAME] = 'src/sdg/components/Label/Label.svelte';
11792
+
11793
+ var root$b = add_locations(from_html(`<label><!></label>`), Label[FILENAME], [[16, 0]]);
11794
+
11795
+ function Label($$anchor, $$props) {
11796
+ check_target(new.target);
11797
+ push($$props, true);
11798
+
11799
+ let forId = prop($$props, 'forId', 7),
11800
+ text = prop($$props, 'text', 7),
11801
+ required = prop($$props, 'required', 7, false),
11802
+ compact = prop($$props, 'compact', 7, false),
11803
+ bold = prop($$props, 'bold', 7, false),
11804
+ disabled = prop($$props, 'disabled', 7, false),
11805
+ rootElement = prop($$props, 'rootElement', 15),
11806
+ rest = rest_props(
11807
+ $$props,
11808
+ [
11809
+ '$$slots',
11810
+ '$$events',
11811
+ '$$legacy',
11812
+ '$$host',
11813
+ 'forId',
11814
+ 'text',
11815
+ 'required',
11816
+ 'compact',
11817
+ 'bold',
11818
+ 'disabled',
11819
+ 'rootElement'
11820
+ ]);
11821
+
11822
+ var $$exports = {
11823
+ get forId() {
11824
+ return forId();
11825
+ },
11826
+
11827
+ set forId($$value) {
11828
+ forId($$value);
11829
+ flushSync();
11830
+ },
11831
+
11832
+ get text() {
11833
+ return text();
11834
+ },
11835
+
11836
+ set text($$value) {
11837
+ text($$value);
11838
+ flushSync();
11839
+ },
11840
+
11841
+ get required() {
11842
+ return required();
11843
+ },
11844
+
11845
+ set required($$value = false) {
11846
+ required($$value);
11847
+ flushSync();
11848
+ },
11849
+
11850
+ get compact() {
11851
+ return compact();
11852
+ },
11853
+
11854
+ set compact($$value = false) {
11855
+ compact($$value);
11856
+ flushSync();
11857
+ },
11858
+
11859
+ get bold() {
11860
+ return bold();
11861
+ },
11862
+
11863
+ set bold($$value = false) {
11864
+ bold($$value);
11865
+ flushSync();
11866
+ },
11867
+
11868
+ get disabled() {
11869
+ return disabled();
11870
+ },
11871
+
11872
+ set disabled($$value = false) {
11873
+ disabled($$value);
11874
+ flushSync();
11875
+ },
11876
+
11877
+ get rootElement() {
11878
+ return rootElement();
11879
+ },
11880
+
11881
+ set rootElement($$value) {
11882
+ rootElement($$value);
11883
+ flushSync();
11884
+ },
11885
+
11886
+ ...legacy_api()
11887
+ };
11888
+
11889
+ var label = root$b();
11890
+
11891
+ attribute_effect(label, () => ({
11892
+ for: forId(),
11893
+
11894
+ class: [
11895
+ "qc-label",
11896
+ compact() && "qc-compact",
11897
+ bold() && "qc-bold",
11898
+ disabled() && "qc-disabled"
11899
+ ],
11900
+
11901
+ ...rest
11902
+ }));
11903
+
11904
+ var node = child(label);
11905
+
11906
+ add_svelte_meta(
11907
+ () => LabelText(node, {
11908
+ get text() {
11909
+ return text();
11910
+ },
11911
+
11912
+ get required() {
11913
+ return required();
11914
+ }
11915
+ }),
11916
+ 'component',
11917
+ Label,
11918
+ 27,
11919
+ 4,
11920
+ { componentTag: 'LabelText' }
11921
+ );
11922
+
11923
+ reset(label);
11924
+ bind_this(label, ($$value) => rootElement($$value), () => rootElement());
11925
+ append($$anchor, label);
11926
+
11927
+ return pop($$exports);
11928
+ }
11929
+
11930
+ create_custom_element(
11931
+ Label,
11932
+ {
11933
+ forId: {},
11934
+ text: {},
11935
+ required: {},
11936
+ compact: {},
11937
+ bold: {},
11938
+ disabled: {},
11939
+ rootElement: {}
11940
+ },
11941
+ [],
11942
+ [],
11943
+ true
11944
+ );
11945
+
11659
11946
  SearchInput[FILENAME] = 'src/sdg/components/SearchInput/SearchInput.svelte';
11660
11947
 
11661
- var root$c = add_locations(from_html(`<div><!> <input/> <!></div>`), SearchInput[FILENAME], [[28, 0, [[39, 4]]]]);
11948
+ var root$a = add_locations(from_html(`<!> <div><!> <input/> <!></div>`, 1), SearchInput[FILENAME], [[38, 0, [[51, 4]]]]);
11662
11949
 
11663
11950
  function SearchInput($$anchor, $$props) {
11664
11951
  check_target(new.target);
@@ -11667,6 +11954,8 @@
11667
11954
  const lang = Utils.getPageLanguage();
11668
11955
 
11669
11956
  let value = prop($$props, 'value', 15, ''),
11957
+ label = prop($$props, 'label', 7, ''),
11958
+ size = prop($$props, 'size', 7, ''),
11670
11959
  ariaLabel = prop($$props, 'ariaLabel', 23, () => strict_equals(lang, "fr") ? "Rechercher..." : "Search..."),
11671
11960
  clearAriaLabel = prop($$props, 'clearAriaLabel', 23, () => strict_equals(lang, "fr") ? "Effacer le texte" : "Clear text"),
11672
11961
  leftIcon = prop($$props, 'leftIcon', 7, false),
@@ -11679,6 +11968,8 @@
11679
11968
  '$$legacy',
11680
11969
  '$$host',
11681
11970
  'value',
11971
+ 'label',
11972
+ 'size',
11682
11973
  'ariaLabel',
11683
11974
  'clearAriaLabel',
11684
11975
  'leftIcon',
@@ -11708,6 +11999,24 @@
11708
11999
  flushSync();
11709
12000
  },
11710
12001
 
12002
+ get label() {
12003
+ return label();
12004
+ },
12005
+
12006
+ set label($$value = '') {
12007
+ label($$value);
12008
+ flushSync();
12009
+ },
12010
+
12011
+ get size() {
12012
+ return size();
12013
+ },
12014
+
12015
+ set size($$value = '') {
12016
+ size($$value);
12017
+ flushSync();
12018
+ },
12019
+
11711
12020
  get ariaLabel() {
11712
12021
  return ariaLabel();
11713
12022
  },
@@ -11749,11 +12058,49 @@
11749
12058
  ...legacy_api()
11750
12059
  };
11751
12060
 
11752
- var div = root$c();
11753
- var node = child(div);
12061
+ var fragment = root$a();
12062
+ var node = first_child(fragment);
12063
+
12064
+ {
12065
+ var consequent = ($$anchor) => {
12066
+ add_svelte_meta(
12067
+ () => Label($$anchor, {
12068
+ get disabled() {
12069
+ return isDisabled;
12070
+ },
12071
+
12072
+ get text() {
12073
+ return label();
12074
+ },
12075
+
12076
+ get forId() {
12077
+ return id();
12078
+ }
12079
+ }),
12080
+ 'component',
12081
+ SearchInput,
12082
+ 32,
12083
+ 4,
12084
+ { componentTag: 'Label' }
12085
+ );
12086
+ };
12087
+
12088
+ add_svelte_meta(
12089
+ () => if_block(node, ($$render) => {
12090
+ if (label()) $$render(consequent);
12091
+ }),
12092
+ 'if',
12093
+ SearchInput,
12094
+ 31,
12095
+ 0
12096
+ );
12097
+ }
12098
+
12099
+ var div = sibling(node, 2);
12100
+ var node_1 = child(div);
11754
12101
 
11755
12102
  {
11756
- var consequent = ($$anchor) => {
12103
+ var consequent_1 = ($$anchor) => {
11757
12104
  {
11758
12105
  let $0 = user_derived(() => `qc-icon${isDisabled ? ' is-disabled' : ''}`);
11759
12106
 
@@ -11768,7 +12115,7 @@
11768
12115
  }),
11769
12116
  'component',
11770
12117
  SearchInput,
11771
- 34,
12118
+ 46,
11772
12119
  8,
11773
12120
  { componentTag: 'Icon' }
11774
12121
  );
@@ -11776,24 +12123,24 @@
11776
12123
  };
11777
12124
 
11778
12125
  add_svelte_meta(
11779
- () => if_block(node, ($$render) => {
11780
- if (leftIcon()) $$render(consequent);
12126
+ () => if_block(node_1, ($$render) => {
12127
+ if (leftIcon()) $$render(consequent_1);
11781
12128
  }),
11782
12129
  'if',
11783
12130
  SearchInput,
11784
- 33,
12131
+ 45,
11785
12132
  4
11786
12133
  );
11787
12134
  }
11788
12135
 
11789
- var input = sibling(node, 2);
12136
+ var input = sibling(node_1, 2);
11790
12137
 
11791
12138
  attribute_effect(
11792
12139
  input,
11793
12140
  () => ({
11794
12141
  type: 'search',
11795
12142
  autocomplete: 'off',
11796
- 'aria-label': ariaLabel(),
12143
+ 'aria-label': label() ? undefined : ariaLabel(),
11797
12144
  class: isDisabled ? "qc-disabled" : "",
11798
12145
  id: id(),
11799
12146
  ...rest
@@ -11807,10 +12154,10 @@
11807
12154
 
11808
12155
  bind_this(input, ($$value) => searchInput = $$value, () => searchInput);
11809
12156
 
11810
- var node_1 = sibling(input, 2);
12157
+ var node_2 = sibling(input, 2);
11811
12158
 
11812
12159
  {
11813
- var consequent_1 = ($$anchor) => {
12160
+ var consequent_2 = ($$anchor) => {
11814
12161
  add_svelte_meta(
11815
12162
  () => IconButton($$anchor, {
11816
12163
  type: 'button',
@@ -11830,33 +12177,37 @@
11830
12177
  }),
11831
12178
  'component',
11832
12179
  SearchInput,
11833
- 49,
12180
+ 61,
11834
12181
  4,
11835
12182
  { componentTag: 'IconButton' }
11836
12183
  );
11837
12184
  };
11838
12185
 
11839
12186
  add_svelte_meta(
11840
- () => if_block(node_1, ($$render) => {
11841
- if (value()) $$render(consequent_1);
12187
+ () => if_block(node_2, ($$render) => {
12188
+ if (value()) $$render(consequent_2);
11842
12189
  }),
11843
12190
  'if',
11844
12191
  SearchInput,
11845
- 48,
12192
+ 60,
11846
12193
  4
11847
12194
  );
11848
12195
  }
11849
12196
 
11850
12197
  reset(div);
11851
12198
 
11852
- template_effect(() => set_class(div, 1, clsx([
11853
- "qc-search-input",
11854
- leftIcon() && "qc-search-left-icon",
11855
- leftIcon() && isDisabled && "qc-search-left-icon-disabled"
11856
- ])));
12199
+ template_effect(() => {
12200
+ set_class(div, 1, clsx([
12201
+ "qc-search-input",
12202
+ leftIcon() && "qc-search-left-icon",
12203
+ leftIcon() && isDisabled && "qc-search-left-icon-disabled"
12204
+ ]));
12205
+
12206
+ set_attribute(div, 'size', size());
12207
+ });
11857
12208
 
11858
12209
  bind_value(input, value);
11859
- append($$anchor, div);
12210
+ append($$anchor, fragment);
11860
12211
 
11861
12212
  return pop($$exports);
11862
12213
  }
@@ -11865,6 +12216,8 @@
11865
12216
  SearchInput,
11866
12217
  {
11867
12218
  value: {},
12219
+ label: {},
12220
+ size: {},
11868
12221
  ariaLabel: {},
11869
12222
  clearAriaLabel: {},
11870
12223
  leftIcon: {},
@@ -11877,7 +12230,7 @@
11877
12230
 
11878
12231
  SearchBar[FILENAME] = 'src/sdg/components/SearchBar/SearchBar.svelte';
11879
12232
 
11880
- var root$b = add_locations(from_html(`<div><!> <!></div>`), SearchBar[FILENAME], [[37, 0]]);
12233
+ var root$9 = add_locations(from_html(`<div><!> <!></div>`), SearchBar[FILENAME], [[37, 0]]);
11881
12234
 
11882
12235
  function SearchBar($$anchor, $$props) {
11883
12236
  check_target(new.target);
@@ -11959,7 +12312,7 @@
11959
12312
  ...legacy_api()
11960
12313
  };
11961
12314
 
11962
- var div = root$b();
12315
+ var div = root$9();
11963
12316
  let classes;
11964
12317
  var node = child(div);
11965
12318
 
@@ -12055,7 +12408,7 @@
12055
12408
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
12056
12409
  var $$exports = { ...legacy_api() };
12057
12410
 
12058
- add_svelte_meta(() => SearchInput($$anchor, spread_props(() => props)), 'component', SearchInputWC, 18, 0, { componentTag: 'SearchInput' });
12411
+ add_svelte_meta(() => SearchInput($$anchor, spread_props(() => props)), 'component', SearchInputWC, 20, 0, { componentTag: 'SearchInput' });
12059
12412
 
12060
12413
  return pop($$exports);
12061
12414
  }
@@ -12066,6 +12419,8 @@
12066
12419
  id: { attribute: 'id' },
12067
12420
  ariaLabel: { attribute: 'aria-label' },
12068
12421
  clearAriaLabel: { attribute: 'clear-aria-label' },
12422
+ label: { attribute: 'label' },
12423
+ size: { attribute: 'size' },
12069
12424
  leftIcon: { attribute: 'left-icon' }
12070
12425
  },
12071
12426
  [],
@@ -12135,7 +12490,7 @@
12135
12490
  FormError[FILENAME] = 'src/sdg/components/FormError/FormError.svelte';
12136
12491
 
12137
12492
  var root_2$6 = add_locations(from_html(`<!> <span><!></span>`, 1), FormError[FILENAME], [[48, 8]]);
12138
- var root_1$6 = add_locations(from_html(`<div role="alert"><!></div>`), FormError[FILENAME], [[35, 0]]);
12493
+ var root_1$5 = add_locations(from_html(`<div role="alert"><!></div>`), FormError[FILENAME], [[35, 0]]);
12139
12494
 
12140
12495
  function FormError($$anchor, $$props) {
12141
12496
  check_target(new.target);
@@ -12231,7 +12586,7 @@
12231
12586
 
12232
12587
  {
12233
12588
  var consequent = ($$anchor) => {
12234
- var div = root_1$6();
12589
+ var div = root_1$5();
12235
12590
  var node_1 = child(div);
12236
12591
 
12237
12592
  add_svelte_meta(
@@ -12311,74 +12666,6 @@
12311
12666
  true
12312
12667
  );
12313
12668
 
12314
- LabelText[FILENAME] = 'src/sdg/components/Label/LabelText.svelte';
12315
-
12316
- var root_1$5 = add_locations(from_html(`<span class="qc-required" aria-hidden="true">*</span>`), LabelText[FILENAME], [[5, 61]]);
12317
- var root$a = add_locations(from_html(`<span class="qc-label-text"><!></span><!>`, 1), LabelText[FILENAME], [[5, 0]]);
12318
-
12319
- function LabelText($$anchor, $$props) {
12320
- check_target(new.target);
12321
- push($$props, true);
12322
-
12323
- let text = prop($$props, 'text', 7),
12324
- required = prop($$props, 'required', 7);
12325
-
12326
- var $$exports = {
12327
- get text() {
12328
- return text();
12329
- },
12330
-
12331
- set text($$value) {
12332
- text($$value);
12333
- flushSync();
12334
- },
12335
-
12336
- get required() {
12337
- return required();
12338
- },
12339
-
12340
- set required($$value) {
12341
- required($$value);
12342
- flushSync();
12343
- },
12344
-
12345
- ...legacy_api()
12346
- };
12347
-
12348
- var fragment = root$a();
12349
- var span = first_child(fragment);
12350
- var node = child(span);
12351
-
12352
- html(node, text);
12353
- reset(span);
12354
-
12355
- var node_1 = sibling(span);
12356
-
12357
- {
12358
- var consequent = ($$anchor) => {
12359
- var span_1 = root_1$5();
12360
-
12361
- append($$anchor, span_1);
12362
- };
12363
-
12364
- add_svelte_meta(
12365
- () => if_block(node_1, ($$render) => {
12366
- if (required()) $$render(consequent);
12367
- }),
12368
- 'if',
12369
- LabelText,
12370
- 5,
12371
- 47
12372
- );
12373
- }
12374
-
12375
- append($$anchor, fragment);
12376
-
12377
- return pop($$exports);
12378
- }
12379
-
12380
- create_custom_element(LabelText, { text: {}, required: {} }, [], [], true);
12381
-
12382
12669
  Fieldset[FILENAME] = 'src/sdg/components/Fieldset/Fieldset.svelte';
12383
12670
 
12384
12671
  var root_2$5 = add_locations(from_html(`<legend><!></legend>`), Fieldset[FILENAME], [[43, 4]]);
@@ -12977,7 +13264,7 @@
12977
13264
 
12978
13265
  ChoiceGroupWC[FILENAME] = 'src/sdg/components/ChoiceGroup/ChoiceGroupWC.svelte';
12979
13266
 
12980
- var root$9 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), ChoiceGroupWC[FILENAME], [[47, 0]]);
13267
+ var root$8 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), ChoiceGroupWC[FILENAME], [[47, 0]]);
12981
13268
 
12982
13269
  function ChoiceGroupWC($$anchor, $$props) {
12983
13270
  check_target(new.target);
@@ -13080,7 +13367,7 @@
13080
13367
  ...legacy_api()
13081
13368
  };
13082
13369
 
13083
- var fragment = root$9();
13370
+ var fragment = root$8();
13084
13371
  var node = first_child(fragment);
13085
13372
 
13086
13373
  {
@@ -13177,7 +13464,7 @@
13177
13464
  Checkbox[FILENAME] = 'src/sdg/components/Checkbox/Checkbox.svelte';
13178
13465
 
13179
13466
  var root_2$4 = add_locations(from_html(`<span class="qc-required" aria-hidden="true">*</span>`), Checkbox[FILENAME], [[57, 4]]);
13180
- var root$8 = add_locations(from_html(`<div><!> <!> <!></div>`), Checkbox[FILENAME], [[65, 4]]);
13467
+ var root$7 = add_locations(from_html(`<div><!> <!> <!></div>`), Checkbox[FILENAME], [[65, 4]]);
13181
13468
 
13182
13469
  function Checkbox($$anchor, $$props) {
13183
13470
  check_target(new.target);
@@ -13386,7 +13673,7 @@
13386
13673
  ...legacy_api()
13387
13674
  };
13388
13675
 
13389
- var div = root$8();
13676
+ var div = root$7();
13390
13677
  var node_1 = child(div);
13391
13678
 
13392
13679
  add_svelte_meta(() => requiredSpanSnippet(node_1), 'render', Checkbox, 72, 8);
@@ -13460,7 +13747,7 @@
13460
13747
 
13461
13748
  CheckboxWC[FILENAME] = 'src/sdg/components/Checkbox/CheckboxWC.svelte';
13462
13749
 
13463
- var root$7 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), CheckboxWC[FILENAME], [[49, 0]]);
13750
+ var root$6 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), CheckboxWC[FILENAME], [[49, 0]]);
13464
13751
 
13465
13752
  function CheckboxWC($$anchor, $$props) {
13466
13753
  check_target(new.target);
@@ -13525,7 +13812,7 @@
13525
13812
  ...legacy_api()
13526
13813
  };
13527
13814
 
13528
- var fragment = root$7();
13815
+ var fragment = root$6();
13529
13816
  var node = first_child(fragment);
13530
13817
 
13531
13818
  {
@@ -13608,161 +13895,6 @@
13608
13895
  true
13609
13896
  ));
13610
13897
 
13611
- Label[FILENAME] = 'src/sdg/components/Label/Label.svelte';
13612
-
13613
- var root$6 = add_locations(from_html(`<label><!></label>`), Label[FILENAME], [[16, 0]]);
13614
-
13615
- function Label($$anchor, $$props) {
13616
- check_target(new.target);
13617
- push($$props, true);
13618
-
13619
- let forId = prop($$props, 'forId', 7),
13620
- text = prop($$props, 'text', 7),
13621
- required = prop($$props, 'required', 7, false),
13622
- compact = prop($$props, 'compact', 7, false),
13623
- bold = prop($$props, 'bold', 7, false),
13624
- disabled = prop($$props, 'disabled', 7, false),
13625
- rootElement = prop($$props, 'rootElement', 15),
13626
- rest = rest_props(
13627
- $$props,
13628
- [
13629
- '$$slots',
13630
- '$$events',
13631
- '$$legacy',
13632
- '$$host',
13633
- 'forId',
13634
- 'text',
13635
- 'required',
13636
- 'compact',
13637
- 'bold',
13638
- 'disabled',
13639
- 'rootElement'
13640
- ]);
13641
-
13642
- var $$exports = {
13643
- get forId() {
13644
- return forId();
13645
- },
13646
-
13647
- set forId($$value) {
13648
- forId($$value);
13649
- flushSync();
13650
- },
13651
-
13652
- get text() {
13653
- return text();
13654
- },
13655
-
13656
- set text($$value) {
13657
- text($$value);
13658
- flushSync();
13659
- },
13660
-
13661
- get required() {
13662
- return required();
13663
- },
13664
-
13665
- set required($$value = false) {
13666
- required($$value);
13667
- flushSync();
13668
- },
13669
-
13670
- get compact() {
13671
- return compact();
13672
- },
13673
-
13674
- set compact($$value = false) {
13675
- compact($$value);
13676
- flushSync();
13677
- },
13678
-
13679
- get bold() {
13680
- return bold();
13681
- },
13682
-
13683
- set bold($$value = false) {
13684
- bold($$value);
13685
- flushSync();
13686
- },
13687
-
13688
- get disabled() {
13689
- return disabled();
13690
- },
13691
-
13692
- set disabled($$value = false) {
13693
- disabled($$value);
13694
- flushSync();
13695
- },
13696
-
13697
- get rootElement() {
13698
- return rootElement();
13699
- },
13700
-
13701
- set rootElement($$value) {
13702
- rootElement($$value);
13703
- flushSync();
13704
- },
13705
-
13706
- ...legacy_api()
13707
- };
13708
-
13709
- var label = root$6();
13710
-
13711
- attribute_effect(label, () => ({
13712
- for: forId(),
13713
-
13714
- class: [
13715
- "qc-label",
13716
- compact() && "qc-compact",
13717
- bold() && "qc-bold",
13718
- disabled() && "qc-disabled"
13719
- ],
13720
-
13721
- ...rest
13722
- }));
13723
-
13724
- var node = child(label);
13725
-
13726
- add_svelte_meta(
13727
- () => LabelText(node, {
13728
- get text() {
13729
- return text();
13730
- },
13731
-
13732
- get required() {
13733
- return required();
13734
- }
13735
- }),
13736
- 'component',
13737
- Label,
13738
- 27,
13739
- 4,
13740
- { componentTag: 'LabelText' }
13741
- );
13742
-
13743
- reset(label);
13744
- bind_this(label, ($$value) => rootElement($$value), () => rootElement());
13745
- append($$anchor, label);
13746
-
13747
- return pop($$exports);
13748
- }
13749
-
13750
- create_custom_element(
13751
- Label,
13752
- {
13753
- forId: {},
13754
- text: {},
13755
- required: {},
13756
- compact: {},
13757
- bold: {},
13758
- disabled: {},
13759
- rootElement: {}
13760
- },
13761
- [],
13762
- [],
13763
- true
13764
- );
13765
-
13766
13898
  function onMountInput(input, setTextFieldRow, setValue, setInvalid, setRequired) {
13767
13899
  if (!input) return;
13768
13900
  if (!input.autocomplete) {
@@ -14315,7 +14447,7 @@
14315
14447
 
14316
14448
  TextFieldWC[FILENAME] = 'src/sdg/components/TextField/TextFieldWC.svelte';
14317
14449
 
14318
- var root$5 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), TextFieldWC[FILENAME], [[112, 0]]);
14450
+ var root$5 = add_locations(from_html(`<!> <link rel="stylesheet"/>`, 1), TextFieldWC[FILENAME], [[115, 0]]);
14319
14451
 
14320
14452
  function TextFieldWC($$anchor, $$props) {
14321
14453
  check_target(new.target);
@@ -14369,6 +14501,10 @@
14369
14501
  user_effect(() => {
14370
14502
  if (!get(input)) return;
14371
14503
 
14504
+ if (get(labelElement)) {
14505
+ get(input).before(get(labelElement));
14506
+ }
14507
+
14372
14508
  if (description()) {
14373
14509
  get(input).before(get(descriptionElement));
14374
14510
  }
@@ -14597,7 +14733,7 @@
14597
14733
  }),
14598
14734
  'component',
14599
14735
  TextFieldWC,
14600
- 92,
14736
+ 95,
14601
14737
  0,
14602
14738
  { componentTag: 'TextField' }
14603
14739
  );
@@ -16275,9 +16411,9 @@
16275
16411
 
16276
16412
  DropdownList[FILENAME] = 'src/sdg/components/DropdownList/DropdownList.svelte';
16277
16413
 
16278
- var root_2 = add_locations(from_html(`<div class="qc-dropdown-list-search"><!></div>`), DropdownList[FILENAME], [[386, 20]]);
16279
- var root_3 = add_locations(from_html(`<span> </span>`), DropdownList[FILENAME], [[427, 24]]);
16280
- 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]]]]]]]]]]);
16414
+ var root_2 = add_locations(from_html(`<div class="qc-dropdown-list-search"><!></div>`), DropdownList[FILENAME], [[394, 20]]);
16415
+ var root_3 = add_locations(from_html(`<span> </span>`), DropdownList[FILENAME], [[435, 24]]);
16416
+ 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]]]]]]]]]]);
16281
16417
 
16282
16418
  function DropdownList($$anchor, $$props) {
16283
16419
  check_target(new.target);
@@ -16554,6 +16690,14 @@
16554
16690
  }
16555
16691
  });
16556
16692
 
16693
+ user_effect(() => {
16694
+ if (value()) {
16695
+ items().forEach((item) => {
16696
+ item.checked = value().includes(item.value);
16697
+ });
16698
+ }
16699
+ });
16700
+
16557
16701
  user_effect(() => {
16558
16702
  items().forEach((item) => {
16559
16703
  if (!item.id) {
@@ -16826,7 +16970,7 @@
16826
16970
  }),
16827
16971
  'component',
16828
16972
  DropdownList,
16829
- 327,
16973
+ 335,
16830
16974
  12,
16831
16975
  { componentTag: 'Label' }
16832
16976
  );
@@ -16838,7 +16982,7 @@
16838
16982
  }),
16839
16983
  'if',
16840
16984
  DropdownList,
16841
- 326,
16985
+ 334,
16842
16986
  8
16843
16987
  );
16844
16988
  }
@@ -16910,7 +17054,7 @@
16910
17054
  }),
16911
17055
  'component',
16912
17056
  DropdownList,
16913
- 349,
17057
+ 357,
16914
17058
  12,
16915
17059
  { componentTag: 'DropdownListButton' }
16916
17060
  );
@@ -16965,7 +17109,7 @@
16965
17109
  ),
16966
17110
  'component',
16967
17111
  DropdownList,
16968
- 387,
17112
+ 395,
16969
17113
  24,
16970
17114
  { componentTag: 'SearchInput' }
16971
17115
  );
@@ -16981,7 +17125,7 @@
16981
17125
  }),
16982
17126
  'if',
16983
17127
  DropdownList,
16984
- 385,
17128
+ 393,
16985
17129
  16
16986
17130
  );
16987
17131
  }
@@ -17041,7 +17185,7 @@
17041
17185
  ),
17042
17186
  'component',
17043
17187
  DropdownList,
17044
- 405,
17188
+ 413,
17045
17189
  16,
17046
17190
  { componentTag: 'DropdownListItems' }
17047
17191
  );
@@ -17061,7 +17205,7 @@
17061
17205
  }),
17062
17206
  'key',
17063
17207
  DropdownList,
17064
- 426,
17208
+ 434,
17065
17209
  20
17066
17210
  );
17067
17211
 
@@ -17109,7 +17253,7 @@
17109
17253
  }),
17110
17254
  'component',
17111
17255
  DropdownList,
17112
- 435,
17256
+ 443,
17113
17257
  4,
17114
17258
  { componentTag: 'FormError' }
17115
17259
  );