qc-trousse-sdg 1.4.3 → 1.4.5

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.
Files changed (60) hide show
  1. package/README.md +76 -51
  2. package/dist/css/qc-sdg-design-tokens.min.css +1 -1
  3. package/dist/css/qc-sdg-no-grid.min.css +1 -1
  4. package/dist/css/qc-sdg.min.css +1 -1
  5. package/dist/img/QUEBEC_blanc.svg +3 -12
  6. package/dist/img/QUEBEC_couleur.svg +3 -23
  7. package/dist/js/qc-sdg.min.js +1 -1
  8. package/index.html +1 -1
  9. package/package.json +1 -1
  10. package/public/css/qc-sdg-design-tokens.css +0 -2
  11. package/public/css/qc-sdg-no-grid.css +154 -110
  12. package/public/css/qc-sdg.css +154 -110
  13. package/public/img/QUEBEC_blanc.svg +3 -12
  14. package/public/img/QUEBEC_couleur.svg +3 -23
  15. package/public/img/favicon.ico +0 -0
  16. package/public/index.html +13 -0
  17. package/public/js/qc-doc-sdg.js +31 -34
  18. package/public/js/qc-sdg.js +2049 -1268
  19. package/src/doc/_index.html +3 -0
  20. package/src/sdg/_components.js +0 -1
  21. package/src/sdg/bases/form/_form.scss +0 -4
  22. package/src/sdg/components/Alert/Alert.svelte +1 -1
  23. package/src/sdg/components/Button/_button.scss +35 -12
  24. package/src/sdg/components/Checkbox/Checkbox.svelte +3 -3
  25. package/src/sdg/components/Checkbox/CheckboxWC.svelte +3 -3
  26. package/src/sdg/components/Checkbox/{updateInput.svelte.js → updateChoiceInput.svelte.js} +6 -1
  27. package/src/sdg/components/ChoiceGroup/ChoiceGroup.svelte +2 -2
  28. package/src/sdg/components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte +3 -0
  29. package/src/sdg/components/ChoiceGroup/Test/checkboxBaselineTest.html +3 -0
  30. package/src/sdg/components/DropdownList/DropdownList.svelte +4 -7
  31. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte +1 -6
  32. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/_dropdownListItemsMultiple.scss +3 -8
  33. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/_dropdownListItemsSingle.scss +1 -2
  34. package/src/sdg/components/DropdownList/DropdownListItems/_dropdownListItems.scss +2 -4
  35. package/src/sdg/components/DropdownList/SelectWC.svelte +31 -50
  36. package/src/sdg/components/DropdownList/Test/DropdownListSvelteTest.svelte +37 -2
  37. package/src/sdg/components/DropdownList/Test/{dropdownListTest.html → dropdownListBaselineTest.html} +19 -1
  38. package/src/sdg/components/DropdownList/Test/dropdownListTestUtils.js +14 -0
  39. package/src/sdg/components/DropdownList/_dropdownList.scss +11 -16
  40. package/src/sdg/components/DropdownList/_select.html +9 -0
  41. package/src/sdg/components/Fieldset/_fieldset.scss +17 -4
  42. package/src/sdg/components/Label/_label.scss +1 -0
  43. package/src/sdg/components/PivFooter/PivFooter.svelte +2 -2
  44. package/src/sdg/components/PivHeader/PivHeader.svelte +79 -74
  45. package/src/sdg/components/PivHeader/Test/pivHeaderBaselineTest.html +12 -1
  46. package/src/sdg/components/PivHeader/Test/pivHeaderTest.js +9 -0
  47. package/src/sdg/components/PivHeader/_pivHeader.html +1 -0
  48. package/src/sdg/components/PivHeader/_pivHeader.scss +46 -19
  49. package/src/sdg/components/TextField/Test/textFieldBaselineTest.html +24 -5
  50. package/src/sdg/components/TextField/TextField.svelte +29 -25
  51. package/src/sdg/components/TextField/TextFieldWC.svelte +8 -0
  52. package/src/sdg/components/TextField/_textField.scss +6 -13
  53. package/src/sdg/qc-sdg-test.js +4 -0
  54. package/src/sdg/scss/settings/_tokens.scss +0 -4
  55. package/tests/buildSvelteTestsIgnore.json +2 -1
  56. package/tests/dropdown-list-baseline.spec.ts +51 -4
  57. package/tests/piv-header-baseline.spec.ts +3 -0
  58. package/src/sdg/components/Button/Button.svelte +0 -50
  59. package/src/sdg/components/Button/ButtonWC.svelte +0 -36
  60. package/tests/piv-header-svelte.spec.ts +0 -11
@@ -33,6 +33,9 @@
33
33
 
34
34
  const UNINITIALIZED = Symbol();
35
35
 
36
+ // Dev-time component properties
37
+ const FILENAME = Symbol('filename');
38
+
36
39
  const NAMESPACE_HTML = 'http://www.w3.org/1999/xhtml';
37
40
  const NAMESPACE_SVG = 'http://www.w3.org/2000/svg';
38
41
 
@@ -41,6 +44,16 @@
41
44
  /* This file is generated by scripts/process-messages/index.js. Do not edit! */
42
45
 
43
46
 
47
+ /**
48
+ * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
49
+ * @returns {never}
50
+ */
51
+ function invalid_snippet_arguments() {
52
+ {
53
+ throw new Error(`https://svelte.dev/e/invalid_snippet_arguments`);
54
+ }
55
+ }
56
+
44
57
  /**
45
58
  * `%name%(...)` can only be used during component initialisation
46
59
  * @param {string} name
@@ -52,6 +65,26 @@
52
65
  }
53
66
  }
54
67
 
68
+ /**
69
+ * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.
70
+ * @returns {never}
71
+ */
72
+ function snippet_without_render_tag() {
73
+ {
74
+ throw new Error(`https://svelte.dev/e/snippet_without_render_tag`);
75
+ }
76
+ }
77
+
78
+ /**
79
+ * The `this` prop on `<svelte:element>` must be a string, if defined
80
+ * @returns {never}
81
+ */
82
+ function svelte_element_invalid_this_value() {
83
+ {
84
+ throw new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);
85
+ }
86
+ }
87
+
55
88
  // Store the references to globals in case someone tries to monkey patch these, causing the below
56
89
  // to de-opt (this occurs often when using popular extensions).
57
90
  var is_array = Array.isArray;
@@ -123,6 +156,43 @@
123
156
  /* This file is generated by scripts/process-messages/index.js. Do not edit! */
124
157
 
125
158
 
159
+ /**
160
+ * Calling `%method%` on a component instance (of %component%) is no longer valid in Svelte 5
161
+ * @param {string} method
162
+ * @param {string} component
163
+ * @returns {never}
164
+ */
165
+ function component_api_changed(method, component) {
166
+ {
167
+ throw new Error(`https://svelte.dev/e/component_api_changed`);
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working.
173
+ * @param {string} component
174
+ * @param {string} name
175
+ * @returns {never}
176
+ */
177
+ function component_api_invalid_new(component, name) {
178
+ {
179
+ throw new Error(`https://svelte.dev/e/component_api_invalid_new`);
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Keyed each block has duplicate key `%value%` at indexes %a% and %b%
185
+ * @param {string} a
186
+ * @param {string} b
187
+ * @param {string | undefined | null} [value]
188
+ * @returns {never}
189
+ */
190
+ function each_key_duplicate(a, b, value) {
191
+ {
192
+ throw new Error(`https://svelte.dev/e/each_key_duplicate`);
193
+ }
194
+ }
195
+
126
196
  /**
127
197
  * `%rune%` cannot be used inside an effect cleanup function
128
198
  * @param {string} rune
@@ -219,6 +289,49 @@
219
289
  /* This file is generated by scripts/process-messages/index.js. Do not edit! */
220
290
 
221
291
 
292
+ /**
293
+ * Assignment to `%property%` property (%location%) will evaluate to the right-hand side, not the value of `%property%` following the assignment. This may result in unexpected behaviour.
294
+ * @param {string} property
295
+ * @param {string} location
296
+ */
297
+ function assignment_value_stale(property, location) {
298
+ {
299
+ console.warn(`https://svelte.dev/e/assignment_value_stale`);
300
+ }
301
+ }
302
+
303
+ /**
304
+ * `%binding%` (%location%) is binding to a non-reactive property
305
+ * @param {string} binding
306
+ * @param {string | undefined | null} [location]
307
+ */
308
+ function binding_property_non_reactive(binding, location) {
309
+ {
310
+ console.warn(`https://svelte.dev/e/binding_property_non_reactive`);
311
+ }
312
+ }
313
+
314
+ /**
315
+ * Your `console.%method%` contained `$state` proxies. Consider using `$inspect(...)` or `$state.snapshot(...)` instead
316
+ * @param {string} method
317
+ */
318
+ function console_log_state(method) {
319
+ {
320
+ console.warn(`https://svelte.dev/e/console_log_state`);
321
+ }
322
+ }
323
+
324
+ /**
325
+ * %handler% should be a function. Did you mean to %suggestion%?
326
+ * @param {string} handler
327
+ * @param {string} suggestion
328
+ */
329
+ function event_handler_invalid(handler, suggestion) {
330
+ {
331
+ console.warn(`https://svelte.dev/e/event_handler_invalid`);
332
+ }
333
+ }
334
+
222
335
  /**
223
336
  * Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
224
337
  * @param {string | undefined | null} [location]
@@ -229,6 +342,42 @@
229
342
  }
230
343
  }
231
344
 
345
+ /**
346
+ * %parent% passed property `%prop%` to %child% with `bind:`, but its parent component %owner% did not declare `%prop%` as a binding. Consider creating a binding between %owner% and %parent% (e.g. `bind:%prop%={...}` instead of `%prop%={...}`)
347
+ * @param {string} parent
348
+ * @param {string} prop
349
+ * @param {string} child
350
+ * @param {string} owner
351
+ */
352
+ function ownership_invalid_binding(parent, prop, child, owner) {
353
+ {
354
+ console.warn(`https://svelte.dev/e/ownership_invalid_binding`);
355
+ }
356
+ }
357
+
358
+ /**
359
+ * Mutating unbound props (`%name%`, at %location%) is strongly discouraged. Consider using `bind:%prop%={...}` in %parent% (or using a callback) instead
360
+ * @param {string} name
361
+ * @param {string} location
362
+ * @param {string} prop
363
+ * @param {string} parent
364
+ */
365
+ function ownership_invalid_mutation(name, location, prop, parent) {
366
+ {
367
+ console.warn(`https://svelte.dev/e/ownership_invalid_mutation`);
368
+ }
369
+ }
370
+
371
+ /**
372
+ * Reactive `$state(...)` proxies and the values they proxy have different identities. Because of this, comparisons with `%operator%` will produce unexpected results
373
+ * @param {string} operator
374
+ */
375
+ function state_proxy_equality_mismatch(operator) {
376
+ {
377
+ console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`);
378
+ }
379
+ }
380
+
232
381
  /** @import { TemplateNode } from '#client' */
233
382
 
234
383
 
@@ -317,6 +466,19 @@
317
466
  }
318
467
  }
319
468
 
469
+ /* This file is generated by scripts/process-messages/index.js. Do not edit! */
470
+
471
+
472
+ /**
473
+ * `<svelte:element this="%tag%">` is a void element — it cannot have content
474
+ * @param {string} tag
475
+ */
476
+ function dynamic_void_element_content(tag) {
477
+ {
478
+ console.warn(`https://svelte.dev/e/dynamic_void_element_content`);
479
+ }
480
+ }
481
+
320
482
  /** @import { Snapshot } from './types' */
321
483
 
322
484
  /**
@@ -696,6 +858,45 @@
696
858
  set(signal, signal.v + d);
697
859
  }
698
860
 
861
+ /**
862
+ * @param {any} value
863
+ */
864
+ function get_proxied_value(value) {
865
+ try {
866
+ if (value !== null && typeof value === 'object' && STATE_SYMBOL in value) {
867
+ return value[STATE_SYMBOL];
868
+ }
869
+ } catch {
870
+ // the above if check can throw an error if the value in question
871
+ // is the contentWindow of an iframe on another domain, in which
872
+ // case we want to just return the value (because it's definitely
873
+ // not a proxied value) so we don't break any JavaScript interacting
874
+ // with that iframe (such as various payment companies client side
875
+ // JavaScript libraries interacting with their iframes on the same
876
+ // domain)
877
+ }
878
+
879
+ return value;
880
+ }
881
+
882
+ /**
883
+ * @param {any} a
884
+ * @param {any} b
885
+ * @param {boolean} equal
886
+ * @returns {boolean}
887
+ */
888
+ function strict_equals(a, b, equal = true) {
889
+ // try-catch needed because this tries to read properties of `a` and `b`,
890
+ // which could be disallowed for example in a secure context
891
+ try {
892
+ if ((a === b) !== (get_proxied_value(a) === get_proxied_value(b))) {
893
+ state_proxy_equality_mismatch(equal ? '===' : '!==');
894
+ }
895
+ } catch {}
896
+
897
+ return (a === b) === equal;
898
+ }
899
+
699
900
  /** @import { TemplateNode } from '#client' */
700
901
 
701
902
  // export these for reference in the compiled code, making global name deduplication unnecessary
@@ -2536,6 +2737,23 @@
2536
2737
  component_context = context;
2537
2738
  }
2538
2739
 
2740
+ /**
2741
+ * The current component function. Different from current component context:
2742
+ * ```html
2743
+ * <!-- App.svelte -->
2744
+ * <Foo>
2745
+ * <Bar /> <!-- context == Foo.svelte, function == App.svelte -->
2746
+ * </Foo>
2747
+ * ```
2748
+ * @type {ComponentContext['function']}
2749
+ */
2750
+ let dev_current_component_function = null;
2751
+
2752
+ /** @param {ComponentContext['function']} fn */
2753
+ function set_dev_current_component_function(fn) {
2754
+ dev_current_component_function = fn;
2755
+ }
2756
+
2539
2757
  /**
2540
2758
  * Retrieves the context that belongs to the closest parent component with the specified `key`.
2541
2759
  * Must be called during component initialisation.
@@ -2660,6 +2878,33 @@
2660
2878
  return null;
2661
2879
  }
2662
2880
 
2881
+ const VOID_ELEMENT_NAMES = [
2882
+ 'area',
2883
+ 'base',
2884
+ 'br',
2885
+ 'col',
2886
+ 'command',
2887
+ 'embed',
2888
+ 'hr',
2889
+ 'img',
2890
+ 'input',
2891
+ 'keygen',
2892
+ 'link',
2893
+ 'meta',
2894
+ 'param',
2895
+ 'source',
2896
+ 'track',
2897
+ 'wbr'
2898
+ ];
2899
+
2900
+ /**
2901
+ * Returns `true` if `name` is of a void element
2902
+ * @param {string} name
2903
+ */
2904
+ function is_void(name) {
2905
+ return VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === '!doctype';
2906
+ }
2907
+
2663
2908
  /**
2664
2909
  * @param {string} name
2665
2910
  */
@@ -2759,6 +3004,105 @@
2759
3004
  return RAW_TEXT_ELEMENTS.includes(/** @type {RAW_TEXT_ELEMENTS[number]} */ (name));
2760
3005
  }
2761
3006
 
3007
+ /**
3008
+ * Prevent devtools trying to make `location` a clickable link by inserting a zero-width space
3009
+ * @template {string | undefined} T
3010
+ * @param {T} location
3011
+ * @returns {T};
3012
+ */
3013
+ function sanitize_location(location) {
3014
+ return /** @type {T} */ (location?.replace(/\//g, '/\u200b'));
3015
+ }
3016
+
3017
+ /**
3018
+ *
3019
+ * @param {any} a
3020
+ * @param {any} b
3021
+ * @param {string} property
3022
+ * @param {string} location
3023
+ */
3024
+ function compare(a, b, property, location) {
3025
+ if (a !== b) {
3026
+ assignment_value_stale(property, /** @type {string} */ (sanitize_location(location)));
3027
+ }
3028
+
3029
+ return a;
3030
+ }
3031
+
3032
+ /**
3033
+ * @param {any} object
3034
+ * @param {string} property
3035
+ * @param {any} value
3036
+ * @param {string} location
3037
+ */
3038
+ function assign(object, property, value, location) {
3039
+ return compare(
3040
+ (object[property] = value),
3041
+ untrack(() => object[property]),
3042
+ property,
3043
+ location
3044
+ );
3045
+ }
3046
+
3047
+ /** @import { SourceLocation } from '#shared' */
3048
+
3049
+ /**
3050
+ * @param {any} fn
3051
+ * @param {string} filename
3052
+ * @param {SourceLocation[]} locations
3053
+ * @returns {any}
3054
+ */
3055
+ function add_locations(fn, filename, locations) {
3056
+ return (/** @type {any[]} */ ...args) => {
3057
+ const dom = fn(...args);
3058
+
3059
+ var node = hydrating ? dom : dom.nodeType === 11 ? dom.firstChild : dom;
3060
+ assign_locations(node, filename, locations);
3061
+
3062
+ return dom;
3063
+ };
3064
+ }
3065
+
3066
+ /**
3067
+ * @param {Element} element
3068
+ * @param {string} filename
3069
+ * @param {SourceLocation} location
3070
+ */
3071
+ function assign_location(element, filename, location) {
3072
+ // @ts-expect-error
3073
+ element.__svelte_meta = {
3074
+ loc: { file: filename, line: location[0], column: location[1] }
3075
+ };
3076
+
3077
+ if (location[2]) {
3078
+ assign_locations(element.firstChild, filename, location[2]);
3079
+ }
3080
+ }
3081
+
3082
+ /**
3083
+ * @param {Node | null} node
3084
+ * @param {string} filename
3085
+ * @param {SourceLocation[]} locations
3086
+ */
3087
+ function assign_locations(node, filename, locations) {
3088
+ var i = 0;
3089
+ var depth = 0;
3090
+
3091
+ while (node && i < locations.length) {
3092
+ if (hydrating && node.nodeType === 8) {
3093
+ var comment = /** @type {Comment} */ (node);
3094
+ if (comment.data === HYDRATION_START || comment.data === HYDRATION_START_ELSE) depth += 1;
3095
+ else if (comment.data[0] === HYDRATION_END) depth -= 1;
3096
+ }
3097
+
3098
+ if (depth === 0 && node.nodeType === 1) {
3099
+ assign_location(/** @type {Element} */ (node), filename, locations[i++]);
3100
+ }
3101
+
3102
+ node = node.nextSibling;
3103
+ }
3104
+ }
3105
+
2762
3106
  /**
2763
3107
  * @param {HTMLElement} dom
2764
3108
  * @param {boolean} value
@@ -3071,6 +3415,48 @@
3071
3415
  }
3072
3416
  }
3073
3417
 
3418
+ /**
3419
+ * In dev, warn if an event handler is not a function, as it means the
3420
+ * user probably called the handler or forgot to add a `() =>`
3421
+ * @param {() => (event: Event, ...args: any) => void} thunk
3422
+ * @param {EventTarget} element
3423
+ * @param {[Event, ...any]} args
3424
+ * @param {any} component
3425
+ * @param {[number, number]} [loc]
3426
+ * @param {boolean} [remove_parens]
3427
+ */
3428
+ function apply(
3429
+ thunk,
3430
+ element,
3431
+ args,
3432
+ component,
3433
+ loc,
3434
+ has_side_effects = false,
3435
+ remove_parens = false
3436
+ ) {
3437
+ let handler;
3438
+ let error;
3439
+
3440
+ try {
3441
+ handler = thunk();
3442
+ } catch (e) {
3443
+ error = e;
3444
+ }
3445
+
3446
+ if (typeof handler !== 'function' && (has_side_effects || handler != null || error)) {
3447
+ component?.[FILENAME];
3448
+ const phase = args[0]?.eventPhase < Event.BUBBLING_PHASE ? 'capture' : '';
3449
+ args[0]?.type + phase;
3450
+
3451
+ event_handler_invalid();
3452
+
3453
+ if (error) {
3454
+ throw error;
3455
+ }
3456
+ }
3457
+ handler?.apply(element, args);
3458
+ }
3459
+
3074
3460
  /** @param {string} html */
3075
3461
  function create_fragment_from_html(html) {
3076
3462
  var elem = document.createElement('template');
@@ -3434,6 +3820,119 @@
3434
3820
  return Promise.resolve();
3435
3821
  }
3436
3822
 
3823
+ /** @typedef {{ file: string, line: number, column: number }} Location */
3824
+
3825
+
3826
+ /**
3827
+ * Sets up a validator that
3828
+ * - traverses the path of a prop to find out if it is allowed to be mutated
3829
+ * - checks that the binding chain is not interrupted
3830
+ * @param {Record<string, any>} props
3831
+ */
3832
+ function create_ownership_validator(props) {
3833
+ const component = component_context?.function;
3834
+ const parent = component_context?.p?.function;
3835
+
3836
+ return {
3837
+ /**
3838
+ * @param {string} prop
3839
+ * @param {any[]} path
3840
+ * @param {any} result
3841
+ * @param {number} line
3842
+ * @param {number} column
3843
+ */
3844
+ mutation: (prop, path, result, line, column) => {
3845
+ const name = path[0];
3846
+ if (is_bound_or_unset(props, name) || !parent) {
3847
+ return result;
3848
+ }
3849
+
3850
+ /** @type {any} */
3851
+ let value = props;
3852
+
3853
+ for (let i = 0; i < path.length - 1; i++) {
3854
+ value = value[path[i]];
3855
+ if (!value?.[STATE_SYMBOL]) {
3856
+ return result;
3857
+ }
3858
+ }
3859
+
3860
+ const location = sanitize_location(`${component[FILENAME]}:${line}:${column}`);
3861
+
3862
+ ownership_invalid_mutation(name, location, prop, parent[FILENAME]);
3863
+
3864
+ return result;
3865
+ },
3866
+ /**
3867
+ * @param {any} key
3868
+ * @param {any} child_component
3869
+ * @param {() => any} value
3870
+ */
3871
+ binding: (key, child_component, value) => {
3872
+ if (!is_bound_or_unset(props, key) && parent && value()?.[STATE_SYMBOL]) {
3873
+ ownership_invalid_binding(
3874
+ component[FILENAME],
3875
+ key,
3876
+ child_component[FILENAME],
3877
+ parent[FILENAME]
3878
+ );
3879
+ }
3880
+ }
3881
+ };
3882
+ }
3883
+
3884
+ /**
3885
+ * @param {Record<string, any>} props
3886
+ * @param {string} prop_name
3887
+ */
3888
+ function is_bound_or_unset(props, prop_name) {
3889
+ // Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`
3890
+ // or `createClassComponent(Component, props)`
3891
+ const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;
3892
+ return (
3893
+ !!get_descriptor(props, prop_name)?.set ||
3894
+ (is_entry_props && prop_name in props) ||
3895
+ !(prop_name in props)
3896
+ );
3897
+ }
3898
+
3899
+ /** @param {Function & { [FILENAME]: string }} target */
3900
+ function check_target(target) {
3901
+ if (target) {
3902
+ component_api_invalid_new(target[FILENAME] ?? 'a component', target.name);
3903
+ }
3904
+ }
3905
+
3906
+ function legacy_api() {
3907
+ const component = component_context?.function;
3908
+
3909
+ /** @param {string} method */
3910
+ function error(method) {
3911
+ component_api_changed(method, component[FILENAME]);
3912
+ }
3913
+
3914
+ return {
3915
+ $destroy: () => error('$destroy()'),
3916
+ $on: () => error('$on(...)'),
3917
+ $set: () => error('$set(...)')
3918
+ };
3919
+ }
3920
+
3921
+ /**
3922
+ * @param {Node} anchor
3923
+ * @param {...(()=>any)[]} args
3924
+ */
3925
+ function validate_snippet_args(anchor, ...args) {
3926
+ if (typeof anchor !== 'object' || !(anchor instanceof Node)) {
3927
+ invalid_snippet_arguments();
3928
+ }
3929
+ for (let arg of args) {
3930
+ if (typeof arg !== 'function') {
3931
+ invalid_snippet_arguments();
3932
+ }
3933
+ }
3934
+ }
3935
+
3437
3936
  /** @import { Effect, Source, TemplateNode } from '#client' */
3438
3937
 
3439
3938
  const PENDING = 0;
@@ -4418,22 +4917,57 @@
4418
4917
  return sanitized;
4419
4918
  }
4420
4919
 
4421
- /** @import { Snippet } from 'svelte' */
4422
- /** @import { Effect, TemplateNode } from '#client' */
4920
+ /** @import { TemplateNode } from '#client' */
4423
4921
  /** @import { Getters } from '#shared' */
4424
4922
 
4425
4923
  /**
4426
- * @template {(node: TemplateNode, ...args: any[]) => void} SnippetFn
4427
- * @param {TemplateNode} node
4428
- * @param {() => SnippetFn | null | undefined} get_snippet
4429
- * @param {(() => any)[]} args
4924
+ * @param {() => string} tag_fn
4430
4925
  * @returns {void}
4431
4926
  */
4432
- function snippet(node, get_snippet, ...args) {
4433
- var anchor = node;
4927
+ function validate_void_dynamic_element(tag_fn) {
4928
+ const tag = tag_fn();
4929
+ if (tag && is_void(tag)) {
4930
+ dynamic_void_element_content();
4931
+ }
4932
+ }
4434
4933
 
4435
- /** @type {SnippetFn | null | undefined} */
4436
- // @ts-ignore
4934
+ /** @param {() => unknown} tag_fn */
4935
+ function validate_dynamic_element_tag(tag_fn) {
4936
+ const tag = tag_fn();
4937
+ const is_string = typeof tag === 'string';
4938
+ if (tag && !is_string) {
4939
+ svelte_element_invalid_this_value();
4940
+ }
4941
+ }
4942
+
4943
+ /**
4944
+ * @template {() => unknown} T
4945
+ * @param {T} fn
4946
+ */
4947
+ function prevent_snippet_stringification(fn) {
4948
+ fn.toString = () => {
4949
+ snippet_without_render_tag();
4950
+ return '';
4951
+ };
4952
+ return fn;
4953
+ }
4954
+
4955
+ /** @import { Snippet } from 'svelte' */
4956
+ /** @import { Effect, TemplateNode } from '#client' */
4957
+ /** @import { Getters } from '#shared' */
4958
+
4959
+ /**
4960
+ * @template {(node: TemplateNode, ...args: any[]) => void} SnippetFn
4961
+ * @param {TemplateNode} node
4962
+ * @param {() => SnippetFn | null | undefined} get_snippet
4963
+ * @param {(() => any)[]} args
4964
+ * @returns {void}
4965
+ */
4966
+ function snippet(node, get_snippet, ...args) {
4967
+ var anchor = node;
4968
+
4969
+ /** @type {SnippetFn | null | undefined} */
4970
+ // @ts-ignore
4437
4971
  var snippet = noop;
4438
4972
 
4439
4973
  /** @type {Effect | null} */
@@ -4455,6 +4989,29 @@
4455
4989
  }
4456
4990
  }
4457
4991
 
4992
+ /**
4993
+ * In development, wrap the snippet function so that it passes validation, and so that the
4994
+ * correct component context is set for ownership checks
4995
+ * @param {any} component
4996
+ * @param {(node: TemplateNode, ...args: any[]) => void} fn
4997
+ */
4998
+ function wrap_snippet(component, fn) {
4999
+ const snippet = (/** @type {TemplateNode} */ node, /** @type {any[]} */ ...args) => {
5000
+ var previous_component_function = dev_current_component_function;
5001
+ set_dev_current_component_function(component);
5002
+
5003
+ try {
5004
+ return fn(node, ...args);
5005
+ } finally {
5006
+ set_dev_current_component_function(previous_component_function);
5007
+ }
5008
+ };
5009
+
5010
+ prevent_snippet_stringification(snippet);
5011
+
5012
+ return snippet;
5013
+ }
5014
+
4458
5015
  /** @import { Effect, TemplateNode } from '#client' */
4459
5016
 
4460
5017
  /**
@@ -5746,6 +6303,80 @@
5746
6303
  };
5747
6304
  }
5748
6305
 
6306
+ /**
6307
+ * @param {() => any} collection
6308
+ * @param {(item: any, index: number) => string} key_fn
6309
+ * @returns {void}
6310
+ */
6311
+ function validate_each_keys(collection, key_fn) {
6312
+ render_effect(() => {
6313
+ const keys = new Map();
6314
+ const maybe_array = collection();
6315
+ const array = is_array(maybe_array)
6316
+ ? maybe_array
6317
+ : maybe_array == null
6318
+ ? []
6319
+ : Array.from(maybe_array);
6320
+ const length = array.length;
6321
+ for (let i = 0; i < length; i++) {
6322
+ const key = key_fn(array[i], i);
6323
+ if (keys.has(key)) {
6324
+ String(keys.get(key));
6325
+
6326
+ /** @type {string | null} */
6327
+ let k = String(key);
6328
+ if (k.startsWith('[object ')) k = null;
6329
+
6330
+ each_key_duplicate();
6331
+ }
6332
+ keys.set(key, i);
6333
+ }
6334
+ });
6335
+ }
6336
+
6337
+ /**
6338
+ * @param {string} binding
6339
+ * @param {() => Record<string, any>} get_object
6340
+ * @param {() => string} get_property
6341
+ * @param {number} line
6342
+ * @param {number} column
6343
+ */
6344
+ function validate_binding(binding, get_object, get_property, line, column) {
6345
+ var warned = false;
6346
+
6347
+ dev_current_component_function?.[FILENAME];
6348
+
6349
+ render_effect(() => {
6350
+ if (warned) return;
6351
+
6352
+ var [object, is_store_sub] = capture_store_binding(get_object);
6353
+
6354
+ if (is_store_sub) return;
6355
+
6356
+ var property = get_property();
6357
+
6358
+ var ran = false;
6359
+
6360
+ // by making the (possibly false, but it would be an extreme edge case) assumption
6361
+ // that a getter has a corresponding setter, we can determine if a property is
6362
+ // reactive by seeing if this effect has dependencies
6363
+ var effect = render_effect(() => {
6364
+ if (ran) return;
6365
+
6366
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
6367
+ object[property];
6368
+ });
6369
+
6370
+ ran = true;
6371
+
6372
+ if (effect.deps === null) {
6373
+ binding_property_non_reactive();
6374
+
6375
+ warned = true;
6376
+ }
6377
+ });
6378
+ }
6379
+
5749
6380
  /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
5750
6381
 
5751
6382
  /**
@@ -6220,6 +6851,37 @@
6220
6851
  return Class;
6221
6852
  }
6222
6853
 
6854
+ /**
6855
+ * @param {string} method
6856
+ * @param {...any} objects
6857
+ */
6858
+ function log_if_contains_state(method, ...objects) {
6859
+ untrack(() => {
6860
+ try {
6861
+ let has_state = false;
6862
+ const transformed = [];
6863
+
6864
+ for (const obj of objects) {
6865
+ if (obj && typeof obj === 'object' && STATE_SYMBOL in obj) {
6866
+ transformed.push(snapshot(obj, true));
6867
+ has_state = true;
6868
+ } else {
6869
+ transformed.push(obj);
6870
+ }
6871
+ }
6872
+
6873
+ if (has_state) {
6874
+ console_log_state(method);
6875
+
6876
+ // eslint-disable-next-line no-console
6877
+ console.log('%c[snapshot]', 'color: grey', ...transformed);
6878
+ }
6879
+ } catch {}
6880
+ });
6881
+
6882
+ return objects;
6883
+ }
6884
+
6223
6885
  class Utils {
6224
6886
 
6225
6887
  static assetsBasePath =
@@ -6359,9 +7021,12 @@
6359
7021
  }
6360
7022
  }
6361
7023
 
6362
- var root$o = template(`<div></div>`);
7024
+ Icon[FILENAME] = 'src/sdg/bases/Icon/Icon.svelte';
7025
+
7026
+ var root$n = add_locations(template(`<div></div>`), Icon[FILENAME], [[16, 0]]);
6363
7027
 
6364
7028
  function Icon($$anchor, $$props) {
7029
+ check_target(new.target);
6365
7030
  push($$props, true);
6366
7031
 
6367
7032
  let type = prop($$props, 'type', 7),
@@ -6372,23 +7037,25 @@
6372
7037
  height = prop($$props, 'height', 7, 'auto'),
6373
7038
  src = prop($$props, 'src', 7, ''),
6374
7039
  rotate = prop($$props, 'rotate', 7, 0),
6375
- rest = rest_props($$props, [
6376
- '$$slots',
6377
- '$$events',
6378
- '$$legacy',
6379
- '$$host',
6380
- 'type',
6381
- 'label',
6382
- 'size',
6383
- 'color',
6384
- 'width',
6385
- 'height',
6386
- 'src',
6387
- 'rotate'
6388
- ]);
6389
-
6390
- let attributes = user_derived(() => width() === 'auto' ? { 'data-img-size': size() } : {});
6391
- var div = root$o();
7040
+ rest = rest_props(
7041
+ $$props,
7042
+ [
7043
+ '$$slots',
7044
+ '$$events',
7045
+ '$$legacy',
7046
+ '$$host',
7047
+ 'type',
7048
+ 'label',
7049
+ 'size',
7050
+ 'color',
7051
+ 'width',
7052
+ 'height',
7053
+ 'src',
7054
+ 'rotate'
7055
+ ]);
7056
+
7057
+ let attributes = user_derived(() => strict_equals(width(), 'auto') ? { 'data-img-size': size() } : {});
7058
+ var div = root$n();
6392
7059
  let attributes_1;
6393
7060
 
6394
7061
  template_effect(() => attributes_1 = set_attributes(div, attributes_1, {
@@ -6467,7 +7134,8 @@
6467
7134
  set rotate($$value = 0) {
6468
7135
  rotate($$value);
6469
7136
  flushSync();
6470
- }
7137
+ },
7138
+ ...legacy_api()
6471
7139
  });
6472
7140
  }
6473
7141
 
@@ -6488,12 +7156,24 @@
6488
7156
  true
6489
7157
  );
6490
7158
 
6491
- var root$n = template(`<div tabindex="0"><div class="icon-container"><div class="qc-icon"><!></div></div> <div class="content-container"><div class="content"><!> <!> <!></div></div></div>`);
7159
+ Notice[FILENAME] = 'src/sdg/components/Notice/Notice.svelte';
7160
+
7161
+ var root$m = add_locations(template(`<div tabindex="0"><div class="icon-container"><div class="qc-icon"><!></div></div> <div class="content-container"><div class="content"><!> <!> <!></div></div></div>`), Notice[FILENAME], [
7162
+ [
7163
+ 57,
7164
+ 0,
7165
+ [
7166
+ [60, 2, [[61, 4]]],
7167
+ [69, 2, [[70, 4]]]
7168
+ ]
7169
+ ]
7170
+ ]);
6492
7171
 
6493
7172
  function Notice($$anchor, $$props) {
7173
+ check_target(new.target);
6494
7174
  push($$props, true);
6495
7175
 
6496
- const isFr = Utils.getPageLanguage() === 'fr';
7176
+ const isFr = strict_equals(Utils.getPageLanguage(), 'fr');
6497
7177
  const defaultHeader = 'h2';
6498
7178
  const defaultType = 'information';
6499
7179
 
@@ -6516,7 +7196,7 @@
6516
7196
  const types = Object.keys(typesDescriptions);
6517
7197
  const usedType = types.includes(type()) ? type() : defaultType;
6518
7198
  const usedHeader = header().match(/h[1-6]/) ? header() : defaultHeader;
6519
- const role = usedType === "success" ? "status" : usedType === "error" ? "alert" : null;
7199
+ const role = strict_equals(usedType, "success") ? "status" : strict_equals(usedType, "error") ? "alert" : null;
6520
7200
  let noticeElement = state(null);
6521
7201
 
6522
7202
  user_effect(() => {
@@ -6529,12 +7209,12 @@
6529
7209
  }
6530
7210
  });
6531
7211
 
6532
- const shouldUseIcon = usedType === "advice" || usedType === "note";
7212
+ const shouldUseIcon = strict_equals(usedType, "advice") || strict_equals(usedType, "note");
6533
7213
  // Si le type est "advice" ou "note", on force "neutral" (le gris), sinon on garde le type normal
6534
7214
  const computedType = shouldUseIcon ? "neutral" : usedType;
6535
7215
  const iconType = shouldUseIcon ? icon() ?? "note" : usedType;
6536
7216
  const iconLabel = typesDescriptions[type()] ?? typesDescriptions['information'];
6537
- var div = root$n();
7217
+ var div = root$m();
6538
7218
 
6539
7219
  set_class(div, 1, `qc-component qc-notice qc-${computedType ?? ''}`);
6540
7220
 
@@ -6558,19 +7238,26 @@
6558
7238
  var fragment = comment();
6559
7239
  var node_3 = first_child(fragment);
6560
7240
 
6561
- element(node_3, () => usedHeader, false, ($$element, $$anchor) => {
6562
- var fragment_1 = comment();
6563
- var node_4 = first_child(fragment_1);
7241
+ validate_void_dynamic_element(() => usedHeader);
7242
+ validate_dynamic_element_tag(() => usedHeader);
6564
7243
 
6565
- html(node_4, title);
6566
- append($$anchor, fragment_1);
6567
- });
7244
+ element(
7245
+ node_3,
7246
+ () => usedHeader,
7247
+ false,
7248
+ ($$element, $$anchor) => {
7249
+ var fragment_1 = comment();
7250
+ var node_4 = first_child(fragment_1);
7251
+
7252
+ html(node_4, title);
7253
+ append($$anchor, fragment_1);
7254
+ });
6568
7255
 
6569
7256
  append($$anchor, fragment);
6570
7257
  };
6571
7258
 
6572
7259
  if_block(node_2, ($$render) => {
6573
- if (title() && title() !== "") $$render(consequent);
7260
+ if (title() && strict_equals(title(), "", false)) $$render(consequent);
6574
7261
  });
6575
7262
  }
6576
7263
 
@@ -6629,7 +7316,8 @@
6629
7316
  set slotContent($$value) {
6630
7317
  slotContent($$value);
6631
7318
  flushSync();
6632
- }
7319
+ },
7320
+ ...legacy_api()
6633
7321
  });
6634
7322
  }
6635
7323
 
@@ -6648,23 +7336,28 @@
6648
7336
  true
6649
7337
  );
6650
7338
 
6651
- var root$m = template(`<!> <link rel="stylesheet">`, 1);
7339
+ NoticeWC[FILENAME] = 'src/sdg/components/Notice/NoticeWC.svelte';
7340
+
7341
+ var root$l = add_locations(template(`<!> <link rel="stylesheet">`, 1), NoticeWC[FILENAME], [[27, 0]]);
6652
7342
 
6653
7343
  function NoticeWC($$anchor, $$props) {
7344
+ check_target(new.target);
6654
7345
  push($$props, true);
6655
7346
 
6656
7347
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
6657
- var fragment = root$m();
7348
+ var fragment = root$l();
6658
7349
  var node = first_child(fragment);
6659
7350
 
6660
7351
  {
6661
- const slotContent = ($$anchor) => {
7352
+ const slotContent = wrap_snippet(NoticeWC, function ($$anchor) {
7353
+ validate_snippet_args(...arguments);
7354
+
6662
7355
  var fragment_1 = comment();
6663
7356
  var node_1 = first_child(fragment_1);
6664
7357
 
6665
- slot(node_1, $$props, 'default', {});
7358
+ slot(node_1, $$props, 'default', {}, null);
6666
7359
  append($$anchor, fragment_1);
6667
- };
7360
+ });
6668
7361
 
6669
7362
  Notice(node, spread_props(() => props, { slotContent, $$slots: { slotContent: true } }));
6670
7363
  }
@@ -6673,7 +7366,7 @@
6673
7366
 
6674
7367
  template_effect(() => set_attribute(link, 'href', Utils.cssPath));
6675
7368
  append($$anchor, fragment);
6676
- pop();
7369
+ return pop({ ...legacy_api() });
6677
7370
  }
6678
7371
 
6679
7372
  customElements.define('qc-notice', create_custom_element(
@@ -6690,8 +7383,12 @@
6690
7383
  true
6691
7384
  ));
6692
7385
 
6693
- var root_2$8 = template(`<div class="title"><a> </a></div>`);
6694
- var root_3$3 = template(`<div class="go-to-content"><a> </a></div>`);
7386
+ PivHeader[FILENAME] = 'src/sdg/components/PivHeader/PivHeader.svelte';
7387
+
7388
+ var root_3$3 = add_locations(template(`<a class="page-title"> </a>`), PivHeader[FILENAME], [[72, 24]]);
7389
+ var root_4$4 = add_locations(template(`<span class="page-title" role="heading" aria-level="1"> </span>`), PivHeader[FILENAME], [[74, 24]]);
7390
+ var root_2$8 = add_locations(template(`<div class="title"><!></div>`), PivHeader[FILENAME], [[70, 16]]);
7391
+ var root_5 = add_locations(template(`<div class="go-to-content"><a> </a></div>`), PivHeader[FILENAME], [[62, 12, [[63, 16]]]]);
6695
7392
 
6696
7393
  var on_click$3 = (evt, displaySearchForm, focusOnSearchInput) => {
6697
7394
  evt.preventDefault();
@@ -6702,14 +7399,48 @@
6702
7399
  });
6703
7400
  };
6704
7401
 
6705
- var root_4$4 = template(`<a class="qc-search" href="/" role="button"><span> </span></a>`);
6706
- var root_8 = template(`<li><a> </a></li>`);
6707
- var root_9 = template(`<li><a> </a></li>`);
6708
- var root_7 = template(`<nav><ul><!> <!></ul></nav>`);
6709
- var root_10 = template(`<div class="search-zone"><!></div>`);
6710
- var root$l = template(`<div role="banner" class="qc-piv-header qc-component"><div><!> <div class="piv-top"><a class="logo" rel="noreferrer"><div role="img"></div></a> <!> <div class="right-section"><!> <div class="links"><!></div></div></div> <!> <div class="piv-bottom"><!></div></div></div>`);
7402
+ var root_6$1 = add_locations(template(`<a class="qc-search" href="/" role="button"><span class="no-link-title" role="heading" aria-level="1"> </span></a>`), PivHeader[FILENAME], [[95, 20, [[106, 24]]]]);
7403
+ var root_10 = add_locations(template(`<li><a> </a></li>`), PivHeader[FILENAME], [[119, 40, [[119, 44]]]]);
7404
+ var root_11 = add_locations(template(`<li><a> </a></li>`), PivHeader[FILENAME], [[122, 40, [[122, 44]]]]);
7405
+ var root_9 = add_locations(template(`<nav><ul><!> <!></ul></nav>`), PivHeader[FILENAME], [[116, 28, [[117, 32]]]]);
7406
+ var root_12 = add_locations(template(`<div class="search-zone"><!></div>`), PivHeader[FILENAME], [[135, 16]]);
7407
+
7408
+ var root$k = add_locations(template(`<div role="banner" class="qc-piv-header qc-component"><div><!> <div class="piv-top"><div class="signature-group"><div class="logo"><a rel="noreferrer"><img></a></div> <!></div> <div class="right-section"><!> <div class="links"><!></div></div></div> <!> <div class="piv-bottom"><!></div></div></div>`), PivHeader[FILENAME], [
7409
+ [
7410
+ 57,
7411
+ 0,
7412
+ [
7413
+ [
7414
+ 60,
7415
+ 4,
7416
+ [
7417
+ [
7418
+ 79,
7419
+ 8,
7420
+ [
7421
+ [
7422
+ 80,
7423
+ 12,
7424
+ [
7425
+ [
7426
+ 81,
7427
+ 16,
7428
+ [[82, 20, [[86, 24]]]]
7429
+ ]
7430
+ ]
7431
+ ],
7432
+ [93, 12, [[110, 16]]]
7433
+ ]
7434
+ ],
7435
+ [133, 8]
7436
+ ]
7437
+ ]
7438
+ ]
7439
+ ]
7440
+ ]);
6711
7441
 
6712
7442
  function PivHeader($$anchor, $$props) {
7443
+ check_target(new.target);
6713
7444
  push($$props, true);
6714
7445
 
6715
7446
  const lang = Utils.getPageLanguage();
@@ -6718,19 +7449,19 @@
6718
7449
  logoUrl = prop($$props, 'logoUrl', 7, '/'),
6719
7450
  fullWidth = prop($$props, 'fullWidth', 7, 'false'),
6720
7451
  logoSrc = prop($$props, 'logoSrc', 23, () => Utils.imagesRelativePath + 'QUEBEC_blanc.svg'),
6721
- logoAlt = prop($$props, 'logoAlt', 7, lang === 'fr' ? 'Logo du gouvernement du Québec' : 'Logo of government of Québec'),
7452
+ logoAlt = prop($$props, 'logoAlt', 23, () => strict_equals(lang, 'fr') ? 'Logo du gouvernement du Québec' : 'Logo of government of Québec'),
6722
7453
  titleUrl = prop($$props, 'titleUrl', 7, '/'),
6723
7454
  titleText = prop($$props, 'titleText', 7, ''),
6724
- joinUsText = prop($$props, 'joinUsText', 7, lang === 'fr' ? 'Nous joindre' : 'Contact us'),
7455
+ joinUsText = prop($$props, 'joinUsText', 23, () => strict_equals(lang, 'fr') ? 'Nous joindre' : 'Contact us'),
6725
7456
  joinUsUrl = prop($$props, 'joinUsUrl', 7, ''),
6726
- altLanguageText = prop($$props, 'altLanguageText', 7, lang === 'fr' ? 'English' : 'Français'),
7457
+ altLanguageText = prop($$props, 'altLanguageText', 23, () => strict_equals(lang, 'fr') ? 'English' : 'Français'),
6727
7458
  altLanguageUrl = prop($$props, 'altLanguageUrl', 7, ''),
6728
- linksLabel = prop($$props, 'linksLabel', 7, lang === 'fr' ? 'Navigation PIV' : 'PIV navigation'),
7459
+ linksLabel = prop($$props, 'linksLabel', 23, () => strict_equals(lang, 'fr') ? 'Navigation PIV' : 'PIV navigation'),
6729
7460
  goToContent = prop($$props, 'goToContent', 7, 'true'),
6730
7461
  goToContentAnchor = prop($$props, 'goToContentAnchor', 7, '#main'),
6731
- goToContentText = prop($$props, 'goToContentText', 7, lang === 'fr' ? 'Passer au contenu' : 'Skip to content'),
6732
- displaySearchText = prop($$props, 'displaySearchText', 7, lang === 'fr' ? 'Cliquer pour faire une recherche' : 'Click to search'),
6733
- hideSearchText = prop($$props, 'hideSearchText', 7, lang === 'fr' ? 'Masquer la barre de recherche' : 'Hide search bar'),
7462
+ goToContentText = prop($$props, 'goToContentText', 23, () => strict_equals(lang, 'fr') ? 'Passer au contenu' : 'Skip to content'),
7463
+ displaySearchText = prop($$props, 'displaySearchText', 23, () => strict_equals(lang, 'fr') ? 'Cliquer pour faire une recherche' : 'Click to search'),
7464
+ hideSearchText = prop($$props, 'hideSearchText', 23, () => strict_equals(lang, 'fr') ? 'Masquer la barre de recherche' : 'Hide search bar'),
6734
7465
  enableSearch = prop($$props, 'enableSearch', 7, 'false'),
6735
7466
  showSearch = prop($$props, 'showSearch', 7, 'false'),
6736
7467
  linksSlot = prop($$props, 'linksSlot', 7),
@@ -6750,83 +7481,114 @@
6750
7481
  }
6751
7482
 
6752
7483
  onMount(() => {
6753
- set(containerClass, get(containerClass) + (fullWidth() === 'true' ? '-fluid' : ''));
7484
+ set(containerClass, get(containerClass) + (strict_equals(fullWidth(), 'true') ? '-fluid' : ''));
6754
7485
 
6755
- if (showSearch() === 'true') {
7486
+ if (strict_equals(showSearch(), 'true')) {
6756
7487
  enableSearch('true');
6757
7488
  set(displaySearchForm, true);
6758
7489
  }
6759
7490
  });
6760
7491
 
6761
- var div = root$l();
7492
+ var div = root$k();
6762
7493
  var div_1 = child(div);
6763
7494
 
6764
7495
  {
6765
- const title = ($$anchor) => {
7496
+ const title = wrap_snippet(PivHeader, function ($$anchor) {
7497
+ validate_snippet_args(...arguments);
7498
+
6766
7499
  var fragment = comment();
6767
7500
  var node = first_child(fragment);
6768
7501
 
6769
7502
  {
6770
- var consequent = ($$anchor) => {
7503
+ var consequent_1 = ($$anchor) => {
6771
7504
  var div_2 = root_2$8();
6772
- var a = child(div_2);
6773
- var text = child(a, true);
7505
+ var node_1 = child(div_2);
6774
7506
 
6775
- reset(a);
6776
- reset(div_2);
7507
+ {
7508
+ var consequent = ($$anchor) => {
7509
+ var a = root_3$3();
7510
+ var text = child(a, true);
6777
7511
 
6778
- template_effect(() => {
6779
- set_attribute(a, 'href', titleUrl());
6780
- set_text(text, titleText());
6781
- });
7512
+ reset(a);
7513
+
7514
+ template_effect(() => {
7515
+ set_attribute(a, 'href', titleUrl());
7516
+ set_text(text, titleText());
7517
+ });
7518
+
7519
+ append($$anchor, a);
7520
+ };
7521
+
7522
+ var alternate = ($$anchor) => {
7523
+ var span = root_4$4();
7524
+ var text_1 = child(span, true);
7525
+
7526
+ reset(span);
7527
+ template_effect(() => set_text(text_1, titleText()));
7528
+ append($$anchor, span);
7529
+ };
7530
+
7531
+ if_block(node_1, ($$render) => {
7532
+ if (titleUrl() && titleUrl().length > 0) $$render(consequent); else $$render(alternate, false);
7533
+ });
7534
+ }
6782
7535
 
7536
+ reset(div_2);
6783
7537
  append($$anchor, div_2);
6784
7538
  };
6785
7539
 
6786
7540
  if_block(node, ($$render) => {
6787
- if (titleUrl() && titleText()) $$render(consequent);
7541
+ if (titleText()) $$render(consequent_1);
6788
7542
  });
6789
7543
  }
6790
7544
 
6791
7545
  append($$anchor, fragment);
6792
- };
7546
+ });
6793
7547
 
6794
- var node_1 = child(div_1);
7548
+ var node_2 = child(div_1);
6795
7549
 
6796
7550
  {
6797
- var consequent_1 = ($$anchor) => {
6798
- var div_3 = root_3$3();
7551
+ var consequent_2 = ($$anchor) => {
7552
+ var div_3 = root_5();
6799
7553
  var a_1 = child(div_3);
6800
- var text_1 = child(a_1, true);
7554
+ var text_2 = child(a_1, true);
6801
7555
 
6802
7556
  reset(a_1);
6803
7557
  reset(div_3);
6804
7558
 
6805
7559
  template_effect(() => {
6806
7560
  set_attribute(a_1, 'href', goToContentAnchor());
6807
- set_text(text_1, goToContentText());
7561
+ set_text(text_2, goToContentText());
6808
7562
  });
6809
7563
 
6810
7564
  append($$anchor, div_3);
6811
7565
  };
6812
7566
 
6813
- if_block(node_1, ($$render) => {
6814
- if (goToContent() === 'true') $$render(consequent_1);
7567
+ if_block(node_2, ($$render) => {
7568
+ if (strict_equals(goToContent(), 'true')) $$render(consequent_2);
6815
7569
  });
6816
7570
  }
6817
7571
 
6818
- var div_4 = sibling(node_1, 2);
6819
- var a_2 = child(div_4);
6820
- var node_2 = sibling(a_2, 2);
7572
+ var div_4 = sibling(node_2, 2);
7573
+ var div_5 = child(div_4);
7574
+ var div_6 = child(div_5);
7575
+ var a_2 = child(div_6);
7576
+ var img = child(a_2);
7577
+
7578
+ reset(a_2);
7579
+ reset(div_6);
7580
+
7581
+ var node_3 = sibling(div_6, 2);
6821
7582
 
6822
- title(node_2);
7583
+ title(node_3);
7584
+ reset(div_5);
6823
7585
 
6824
- var div_5 = sibling(node_2, 2);
6825
- var node_3 = child(div_5);
7586
+ var div_7 = sibling(div_5, 2);
7587
+ var node_4 = child(div_7);
6826
7588
 
6827
7589
  {
6828
- var consequent_2 = ($$anchor) => {
6829
- var a_3 = root_4$4();
7590
+ var consequent_3 = ($$anchor) => {
7591
+ var a_3 = root_6$1();
6830
7592
 
6831
7593
  a_3.__click = [
6832
7594
  on_click$3,
@@ -6834,85 +7596,85 @@
6834
7596
  focusOnSearchInput
6835
7597
  ];
6836
7598
 
6837
- var span = child(a_3);
6838
- var text_2 = child(span, true);
7599
+ var span_1 = child(a_3);
7600
+ var text_3 = child(span_1, true);
6839
7601
 
6840
- reset(span);
7602
+ reset(span_1);
6841
7603
  reset(a_3);
6842
- template_effect(() => set_text(text_2, get(displaySearchForm) ? hideSearchText() : displaySearchText()));
7604
+ template_effect(() => set_text(text_3, get(displaySearchForm) ? hideSearchText() : displaySearchText()));
6843
7605
  append($$anchor, a_3);
6844
7606
  };
6845
7607
 
6846
- if_block(node_3, ($$render) => {
6847
- if (Utils.isTruthy(enableSearch())) $$render(consequent_2);
7608
+ if_block(node_4, ($$render) => {
7609
+ if (Utils.isTruthy(enableSearch())) $$render(consequent_3);
6848
7610
  });
6849
7611
  }
6850
7612
 
6851
- var div_6 = sibling(node_3, 2);
6852
- var node_4 = child(div_6);
7613
+ var div_8 = sibling(node_4, 2);
7614
+ var node_5 = child(div_8);
6853
7615
 
6854
7616
  {
6855
- var consequent_3 = ($$anchor) => {
7617
+ var consequent_4 = ($$anchor) => {
6856
7618
  var fragment_1 = comment();
6857
- var node_5 = first_child(fragment_1);
7619
+ var node_6 = first_child(fragment_1);
6858
7620
 
6859
- snippet(node_5, linksSlot);
7621
+ snippet(node_6, linksSlot);
6860
7622
  append($$anchor, fragment_1);
6861
7623
  };
6862
7624
 
6863
- var alternate = ($$anchor) => {
7625
+ var alternate_1 = ($$anchor) => {
6864
7626
  var fragment_2 = comment();
6865
- var node_6 = first_child(fragment_2);
7627
+ var node_7 = first_child(fragment_2);
6866
7628
 
6867
7629
  {
6868
- var consequent_6 = ($$anchor) => {
6869
- var nav = root_7();
7630
+ var consequent_7 = ($$anchor) => {
7631
+ var nav = root_9();
6870
7632
  var ul = child(nav);
6871
- var node_7 = child(ul);
7633
+ var node_8 = child(ul);
6872
7634
 
6873
7635
  {
6874
- var consequent_4 = ($$anchor) => {
6875
- var li = root_8();
7636
+ var consequent_5 = ($$anchor) => {
7637
+ var li = root_10();
6876
7638
  var a_4 = child(li);
6877
- var text_3 = child(a_4, true);
7639
+ var text_4 = child(a_4, true);
6878
7640
 
6879
7641
  reset(a_4);
6880
7642
  reset(li);
6881
7643
 
6882
7644
  template_effect(() => {
6883
7645
  set_attribute(a_4, 'href', altLanguageUrl());
6884
- set_text(text_3, altLanguageText());
7646
+ set_text(text_4, altLanguageText());
6885
7647
  });
6886
7648
 
6887
7649
  append($$anchor, li);
6888
7650
  };
6889
7651
 
6890
- if_block(node_7, ($$render) => {
6891
- if (altLanguageUrl()) $$render(consequent_4);
7652
+ if_block(node_8, ($$render) => {
7653
+ if (altLanguageUrl()) $$render(consequent_5);
6892
7654
  });
6893
7655
  }
6894
7656
 
6895
- var node_8 = sibling(node_7, 2);
7657
+ var node_9 = sibling(node_8, 2);
6896
7658
 
6897
7659
  {
6898
- var consequent_5 = ($$anchor) => {
6899
- var li_1 = root_9();
7660
+ var consequent_6 = ($$anchor) => {
7661
+ var li_1 = root_11();
6900
7662
  var a_5 = child(li_1);
6901
- var text_4 = child(a_5, true);
7663
+ var text_5 = child(a_5, true);
6902
7664
 
6903
7665
  reset(a_5);
6904
7666
  reset(li_1);
6905
7667
 
6906
7668
  template_effect(() => {
6907
7669
  set_attribute(a_5, 'href', joinUsUrl());
6908
- set_text(text_4, joinUsText());
7670
+ set_text(text_5, joinUsText());
6909
7671
  });
6910
7672
 
6911
7673
  append($$anchor, li_1);
6912
7674
  };
6913
7675
 
6914
- if_block(node_8, ($$render) => {
6915
- if (joinUsUrl()) $$render(consequent_5);
7676
+ if_block(node_9, ($$render) => {
7677
+ if (joinUsUrl()) $$render(consequent_6);
6916
7678
  });
6917
7679
  }
6918
7680
 
@@ -6922,75 +7684,71 @@
6922
7684
  append($$anchor, nav);
6923
7685
  };
6924
7686
 
6925
- if_block(node_6, ($$render) => {
6926
- if (joinUsUrl() || altLanguageUrl()) $$render(consequent_6);
7687
+ if_block(node_7, ($$render) => {
7688
+ if (joinUsUrl() || altLanguageUrl()) $$render(consequent_7);
6927
7689
  });
6928
7690
  }
6929
7691
 
6930
7692
  append($$anchor, fragment_2);
6931
7693
  };
6932
7694
 
6933
- if_block(node_4, ($$render) => {
6934
- if ((!slots() || slots()['links']) && linksSlot()) $$render(consequent_3); else $$render(alternate, false);
7695
+ if_block(node_5, ($$render) => {
7696
+ if ((!slots() || slots()['links']) && linksSlot()) $$render(consequent_4); else $$render(alternate_1, false);
6935
7697
  });
6936
7698
  }
6937
7699
 
6938
- reset(div_6);
6939
- reset(div_5);
7700
+ reset(div_8);
7701
+ reset(div_7);
6940
7702
  reset(div_4);
6941
7703
 
6942
- var node_9 = sibling(div_4, 2);
7704
+ var node_10 = sibling(div_4, 2);
6943
7705
 
6944
- title(node_9);
7706
+ title(node_10);
6945
7707
 
6946
- var div_7 = sibling(node_9, 2);
6947
- var node_10 = child(div_7);
7708
+ var div_9 = sibling(node_10, 2);
7709
+ var node_11 = child(div_9);
6948
7710
 
6949
7711
  {
6950
- var consequent_8 = ($$anchor) => {
6951
- var div_8 = root_10();
6952
- var node_11 = child(div_8);
7712
+ var consequent_9 = ($$anchor) => {
7713
+ var div_10 = root_12();
7714
+ var node_12 = child(div_10);
6953
7715
 
6954
7716
  {
6955
- var consequent_7 = ($$anchor) => {
7717
+ var consequent_8 = ($$anchor) => {
6956
7718
  var fragment_3 = comment();
6957
- var node_12 = first_child(fragment_3);
7719
+ var node_13 = first_child(fragment_3);
6958
7720
 
6959
- snippet(node_12, searchZoneSlot);
7721
+ snippet(node_13, searchZoneSlot);
6960
7722
  append($$anchor, fragment_3);
6961
7723
  };
6962
7724
 
6963
- if_block(node_11, ($$render) => {
6964
- if (searchZoneSlot()) $$render(consequent_7);
7725
+ if_block(node_12, ($$render) => {
7726
+ if (searchZoneSlot()) $$render(consequent_8);
6965
7727
  });
6966
7728
  }
6967
7729
 
6968
- reset(div_8);
6969
- bind_this(div_8, ($$value) => set(searchZone, $$value), () => get(searchZone));
6970
- append($$anchor, div_8);
7730
+ reset(div_10);
7731
+ bind_this(div_10, ($$value) => set(searchZone, $$value), () => get(searchZone));
7732
+ append($$anchor, div_10);
6971
7733
  };
6972
7734
 
6973
- if_block(node_10, ($$render) => {
6974
- if (get(displaySearchForm)) $$render(consequent_8);
7735
+ if_block(node_11, ($$render) => {
7736
+ if (get(displaySearchForm)) $$render(consequent_9);
6975
7737
  });
6976
7738
  }
6977
7739
 
6978
- reset(div_7);
7740
+ reset(div_9);
6979
7741
  reset(div_1);
6980
7742
 
6981
7743
  template_effect(() => {
6982
7744
  set_attribute(a_2, 'href', logoUrl());
6983
- set_attribute(a_2, 'aria-label', logoAlt());
7745
+ set_attribute(img, 'src', logoSrc());
7746
+ set_attribute(img, 'alt', logoAlt());
6984
7747
  });
6985
7748
  }
6986
7749
 
6987
7750
  reset(div);
6988
-
6989
- template_effect(() => {
6990
- set_style(div, `--logo-src:url(${logoSrc() ?? ''})`);
6991
- set_class(div_1, 1, get(containerClass));
6992
- });
6993
-
7751
+ template_effect(() => set_class(div_1, 1, get(containerClass)));
6994
7752
  append($$anchor, div);
6995
7753
 
6996
7754
  return pop({
@@ -7163,7 +7921,8 @@
7163
7921
  set slots($$value = false) {
7164
7922
  slots($$value);
7165
7923
  flushSync();
7166
- }
7924
+ },
7925
+ ...legacy_api()
7167
7926
  });
7168
7927
  }
7169
7928
 
@@ -7200,41 +7959,51 @@
7200
7959
  true
7201
7960
  );
7202
7961
 
7203
- var root$k = template(`<!> <link rel="stylesheet">`, 1);
7962
+ PivHeaderWC[FILENAME] = 'src/sdg/components/PivHeader/PivHeaderWC.svelte';
7963
+
7964
+ var root$j = add_locations(template(`<!> <link rel="stylesheet">`, 1), PivHeaderWC[FILENAME], [[56, 0]]);
7204
7965
 
7205
7966
  function PivHeaderWC($$anchor, $$props) {
7967
+ check_target(new.target);
7968
+
7206
7969
  const $$slots = sanitize_slots($$props);
7207
7970
 
7208
7971
  push($$props, true);
7209
7972
 
7210
7973
  let self = prop($$props, 'self', 7),
7211
- props = rest_props($$props, [
7212
- '$$slots',
7213
- '$$events',
7214
- '$$legacy',
7215
- '$$host',
7216
- 'self'
7217
- ]);
7218
-
7219
- var fragment = root$k();
7974
+ props = rest_props(
7975
+ $$props,
7976
+ [
7977
+ '$$slots',
7978
+ '$$events',
7979
+ '$$legacy',
7980
+ '$$host',
7981
+ 'self'
7982
+ ]);
7983
+
7984
+ var fragment = root$j();
7220
7985
  var node = first_child(fragment);
7221
7986
 
7222
7987
  {
7223
- const linksSlot = ($$anchor) => {
7988
+ const linksSlot = wrap_snippet(PivHeaderWC, function ($$anchor) {
7989
+ validate_snippet_args(...arguments);
7990
+
7224
7991
  var fragment_1 = comment();
7225
7992
  var node_1 = first_child(fragment_1);
7226
7993
 
7227
- slot(node_1, $$props, 'links', {});
7994
+ slot(node_1, $$props, 'links', {}, null);
7228
7995
  append($$anchor, fragment_1);
7229
- };
7996
+ });
7997
+
7998
+ const searchZoneSlot = wrap_snippet(PivHeaderWC, function ($$anchor) {
7999
+ validate_snippet_args(...arguments);
7230
8000
 
7231
- const searchZoneSlot = ($$anchor) => {
7232
8001
  var fragment_2 = comment();
7233
8002
  var node_2 = first_child(fragment_2);
7234
8003
 
7235
- slot(node_2, $$props, 'search-zone', {});
8004
+ slot(node_2, $$props, 'search-zone', {}, null);
7236
8005
  append($$anchor, fragment_2);
7237
- };
8006
+ });
7238
8007
 
7239
8008
  PivHeader(node, spread_props(
7240
8009
  {
@@ -7264,7 +8033,8 @@
7264
8033
  set self($$value) {
7265
8034
  self($$value);
7266
8035
  flushSync();
7267
- }
8036
+ },
8037
+ ...legacy_api()
7268
8038
  });
7269
8039
  }
7270
8040
 
@@ -7306,28 +8076,31 @@
7306
8076
  }
7307
8077
  ));
7308
8078
 
7309
- var root_2$7 = template(`<img>`);
7310
- var root_4$3 = template(`<a> </a>`);
7311
- var root$j = template(`<div class="qc-piv-footer qc-container-fluid"><!> <a class="logo"></a> <span class="copyright"><!></span></div>`);
8079
+ PivFooter[FILENAME] = 'src/sdg/components/PivFooter/PivFooter.svelte';
8080
+
8081
+ var root_2$7 = add_locations(template(`<img>`), PivFooter[FILENAME], [[34, 12]]);
8082
+ var root_4$3 = add_locations(template(`<a> </a>`), PivFooter[FILENAME], [[45, 12]]);
8083
+ var root$i = add_locations(template(`<div class="qc-piv-footer qc-container-fluid"><!> <a class="logo"></a> <span class="copyright"><!></span></div>`), PivFooter[FILENAME], [[20, 0, [[25, 4], [41, 4]]]]);
7312
8084
 
7313
8085
  function PivFooter($$anchor, $$props) {
8086
+ check_target(new.target);
7314
8087
  push($$props, true);
7315
8088
 
7316
8089
  const lang = Utils.getPageLanguage();
7317
8090
 
7318
8091
  let logoUrl = prop($$props, 'logoUrl', 7, '/'),
7319
- logoSrc = prop($$props, 'logoSrc', 23, () => Utils.imagesRelativePath + '/QUEBEC_couleur.svg'),
7320
- logoSrcDarkTheme = prop($$props, 'logoSrcDarkTheme', 23, () => Utils.imagesRelativePath + '/QUEBEC_blanc.svg'),
7321
- logoAlt = prop($$props, 'logoAlt', 7, lang === 'fr' ? 'Logo du gouvernement du Québec' : 'Logo of the Quebec government'),
8092
+ logoSrc = prop($$props, 'logoSrc', 23, () => Utils.imagesRelativePath + 'QUEBEC_couleur.svg'),
8093
+ logoSrcDarkTheme = prop($$props, 'logoSrcDarkTheme', 23, () => Utils.imagesRelativePath + 'QUEBEC_blanc.svg'),
8094
+ logoAlt = prop($$props, 'logoAlt', 23, () => strict_equals(lang, 'fr') ? 'Logo du gouvernement du Québec' : 'Logo of the Quebec government'),
7322
8095
  logoWidth = prop($$props, 'logoWidth', 7, 139),
7323
8096
  logoHeight = prop($$props, 'logoHeight', 7, 50),
7324
- copyrightUrl = prop($$props, 'copyrightUrl', 7, lang === 'fr' ? 'https://www.quebec.ca/droit-auteur' : 'https://www.quebec.ca/en/copyright'),
8097
+ copyrightUrl = prop($$props, 'copyrightUrl', 23, () => strict_equals(lang, 'fr') ? 'https://www.quebec.ca/droit-auteur' : 'https://www.quebec.ca/en/copyright'),
7325
8098
  copyrightText = prop($$props, 'copyrightText', 23, () => '© Gouvernement du Québec, ' + new Date().getFullYear()),
7326
8099
  mainSlot = prop($$props, 'mainSlot', 7),
7327
8100
  copyrightSlot = prop($$props, 'copyrightSlot', 7),
7328
8101
  slots = prop($$props, 'slots', 23, () => ({}));
7329
8102
 
7330
- var div = root$j();
8103
+ var div = root$i();
7331
8104
  var node = child(div);
7332
8105
 
7333
8106
  {
@@ -7357,7 +8130,13 @@
7357
8130
  index,
7358
8131
  ($$anchor, $$item) => {
7359
8132
  let theme = () => get($$item)[0];
8133
+
8134
+ theme();
8135
+
7360
8136
  let src = () => get($$item)[1];
8137
+
8138
+ src();
8139
+
7361
8140
  var img = root_2$7();
7362
8141
 
7363
8142
  template_effect(() => {
@@ -7429,7 +8208,7 @@
7429
8208
  return logoSrc();
7430
8209
  },
7431
8210
  set logoSrc(
7432
- $$value = Utils.imagesRelativePath + '/QUEBEC_couleur.svg'
8211
+ $$value = Utils.imagesRelativePath + 'QUEBEC_couleur.svg'
7433
8212
  ) {
7434
8213
  logoSrc($$value);
7435
8214
  flushSync();
@@ -7438,7 +8217,7 @@
7438
8217
  return logoSrcDarkTheme();
7439
8218
  },
7440
8219
  set logoSrcDarkTheme(
7441
- $$value = Utils.imagesRelativePath + '/QUEBEC_blanc.svg'
8220
+ $$value = Utils.imagesRelativePath + 'QUEBEC_blanc.svg'
7442
8221
  ) {
7443
8222
  logoSrcDarkTheme($$value);
7444
8223
  flushSync();
@@ -7504,7 +8283,8 @@
7504
8283
  set slots($$value = {}) {
7505
8284
  slots($$value);
7506
8285
  flushSync();
7507
- }
8286
+ },
8287
+ ...legacy_api()
7508
8288
  });
7509
8289
  }
7510
8290
 
@@ -7528,41 +8308,51 @@
7528
8308
  true
7529
8309
  );
7530
8310
 
7531
- var root$i = template(`<!> <link rel="stylesheet">`, 1);
8311
+ PivFooterWC[FILENAME] = 'src/sdg/components/PivFooter/PivFooterWC.svelte';
8312
+
8313
+ var root$h = add_locations(template(`<!> <link rel="stylesheet">`, 1), PivFooterWC[FILENAME], [[44, 0]]);
7532
8314
 
7533
8315
  function PivFooterWC($$anchor, $$props) {
8316
+ check_target(new.target);
8317
+
7534
8318
  const $$slots = sanitize_slots($$props);
7535
8319
 
7536
8320
  push($$props, true);
7537
8321
 
7538
8322
  let self = prop($$props, 'self', 7),
7539
- props = rest_props($$props, [
7540
- '$$slots',
7541
- '$$events',
7542
- '$$legacy',
7543
- '$$host',
7544
- 'self'
7545
- ]);
7546
-
7547
- var fragment = root$i();
8323
+ props = rest_props(
8324
+ $$props,
8325
+ [
8326
+ '$$slots',
8327
+ '$$events',
8328
+ '$$legacy',
8329
+ '$$host',
8330
+ 'self'
8331
+ ]);
8332
+
8333
+ var fragment = root$h();
7548
8334
  var node = first_child(fragment);
7549
8335
 
7550
8336
  {
7551
- const mainSlot = ($$anchor) => {
8337
+ const mainSlot = wrap_snippet(PivFooterWC, function ($$anchor) {
8338
+ validate_snippet_args(...arguments);
8339
+
7552
8340
  var fragment_1 = comment();
7553
8341
  var node_1 = first_child(fragment_1);
7554
8342
 
7555
- slot(node_1, $$props, 'default', {});
8343
+ slot(node_1, $$props, 'default', {}, null);
7556
8344
  append($$anchor, fragment_1);
7557
- };
8345
+ });
8346
+
8347
+ const copyrightSlot = wrap_snippet(PivFooterWC, function ($$anchor) {
8348
+ validate_snippet_args(...arguments);
7558
8349
 
7559
- const copyrightSlot = ($$anchor) => {
7560
8350
  var fragment_2 = comment();
7561
8351
  var node_2 = first_child(fragment_2);
7562
8352
 
7563
- slot(node_2, $$props, 'copyright', {});
8353
+ slot(node_2, $$props, 'copyright', {}, null);
7564
8354
  append($$anchor, fragment_2);
7565
- };
8355
+ });
7566
8356
 
7567
8357
  PivFooter(node, spread_props(() => props, {
7568
8358
  slots: $$slots,
@@ -7584,7 +8374,8 @@
7584
8374
  set self($$value) {
7585
8375
  self($$value);
7586
8376
  flushSync();
7587
- }
8377
+ },
8378
+ ...legacy_api()
7588
8379
  });
7589
8380
  }
7590
8381
 
@@ -7616,9 +8407,12 @@
7616
8407
  }
7617
8408
  ));
7618
8409
 
7619
- var root$h = template(`<button><!></button>`);
8410
+ IconButton[FILENAME] = 'src/sdg/components/IconButton/IconButton.svelte';
8411
+
8412
+ var root$g = add_locations(template(`<button><!></button>`), IconButton[FILENAME], [[16, 0]]);
7620
8413
 
7621
8414
  function IconButton($$anchor, $$props) {
8415
+ check_target(new.target);
7622
8416
  push($$props, true);
7623
8417
 
7624
8418
  const size = prop($$props, 'size', 7, 'xl'),
@@ -7627,20 +8421,22 @@
7627
8421
  iconSize = prop($$props, 'iconSize', 7),
7628
8422
  iconColor = prop($$props, 'iconColor', 7),
7629
8423
  className = prop($$props, 'class', 7, ''),
7630
- rest = rest_props($$props, [
7631
- '$$slots',
7632
- '$$events',
7633
- '$$legacy',
7634
- '$$host',
7635
- 'size',
7636
- 'label',
7637
- 'icon',
7638
- 'iconSize',
7639
- 'iconColor',
7640
- 'class'
7641
- ]);
7642
-
7643
- var button = root$h();
8424
+ rest = rest_props(
8425
+ $$props,
8426
+ [
8427
+ '$$slots',
8428
+ '$$events',
8429
+ '$$legacy',
8430
+ '$$host',
8431
+ 'size',
8432
+ 'label',
8433
+ 'icon',
8434
+ 'iconSize',
8435
+ 'iconColor',
8436
+ 'class'
8437
+ ]);
8438
+
8439
+ var button = root$g();
7644
8440
  let attributes;
7645
8441
  var node = child(button);
7646
8442
 
@@ -7720,7 +8516,8 @@
7720
8516
  set class($$value = '') {
7721
8517
  className($$value);
7722
8518
  flushSync();
7723
- }
8519
+ },
8520
+ ...legacy_api()
7724
8521
  });
7725
8522
  }
7726
8523
 
@@ -7739,9 +8536,24 @@
7739
8536
  true
7740
8537
  );
7741
8538
 
7742
- var root_1$7 = template(`<div role="alert"><div><div class="qc-general-alert-elements"><!> <div class="qc-alert-content"><!> <!></div> <!></div></div></div>`);
8539
+ Alert[FILENAME] = 'src/sdg/components/Alert/Alert.svelte';
8540
+
8541
+ var root_1$7 = add_locations(template(`<div role="alert"><div><div class="qc-general-alert-elements"><!> <div class="qc-alert-content"><!> <!></div> <!></div></div></div>`), Alert[FILENAME], [
8542
+ [
8543
+ 40,
8544
+ 4,
8545
+ [
8546
+ [
8547
+ 43,
8548
+ 8,
8549
+ [[44, 12, [[50, 16]]]]
8550
+ ]
8551
+ ]
8552
+ ]
8553
+ ]);
7743
8554
 
7744
8555
  function Alert($$anchor, $$props) {
8556
+ check_target(new.target);
7745
8557
  push($$props, true);
7746
8558
 
7747
8559
  let type = prop($$props, 'type', 7, "general"),
@@ -7752,13 +8564,13 @@
7752
8564
  slotContent = prop($$props, 'slotContent', 7);
7753
8565
 
7754
8566
  const language = Utils.getPageLanguage();
7755
- const typeClass = type() !== "" ? type() : 'general';
7756
- const closeLabel = language === 'fr' ? "Fermer l’alerte" : "Close l’alerte";
7757
- const warningLabel = language === 'fr' ? "Information d'importance élevée" : "Information of high importance";
7758
- const generalLabel = language === 'fr' ? "Information importante" : "Important information";
7759
- const label = type() === 'general' ? generalLabel : warningLabel;
8567
+ const typeClass = strict_equals(type(), "", false) ? type() : 'general';
8568
+ const closeLabel = strict_equals(language, 'fr') ? "Fermer l’alerte" : "Close l’alerte";
8569
+ const warningLabel = strict_equals(language, 'fr') ? "Information d'importance élevée" : "Information of high importance";
8570
+ const generalLabel = strict_equals(language, 'fr') ? "Information importante" : "Important information";
8571
+ const label = strict_equals(type(), 'general') ? generalLabel : warningLabel;
7760
8572
  let rootElement = state(null);
7761
- let containerClass = "qc-container" + (fullWidth() === 'true' ? '-fluid' : '');
8573
+ let containerClass = "qc-container" + (strict_equals(fullWidth(), 'true') ? '-fluid' : '');
7762
8574
 
7763
8575
  function hideAlert() {
7764
8576
  hide("true");
@@ -7780,8 +8592,8 @@
7780
8592
 
7781
8593
  var div_2 = child(div_1);
7782
8594
  var node_1 = child(div_2);
7783
- const expression = user_derived(() => type() === 'warning' ? 'warning' : 'information');
7784
- const expression_1 = user_derived(() => type() === 'general' ? 'blue-piv' : 'yellow-dark');
8595
+ const expression = user_derived(() => strict_equals(type(), 'warning') ? 'warning' : 'information');
8596
+ const expression_1 = user_derived(() => strict_equals(type(), 'general') ? 'blue-piv' : 'yellow-dark');
7785
8597
 
7786
8598
  Icon(node_1, {
7787
8599
  get type() {
@@ -7814,7 +8626,7 @@
7814
8626
  size: 'nm',
7815
8627
  icon: 'xclose',
7816
8628
  iconSize: 'sm',
7817
- iconColor: 'text-primary'
8629
+ iconColor: 'blue-piv'
7818
8630
  });
7819
8631
  };
7820
8632
 
@@ -7879,7 +8691,8 @@
7879
8691
  set slotContent($$value) {
7880
8692
  slotContent($$value);
7881
8693
  flushSync();
7882
- }
8694
+ },
8695
+ ...legacy_api()
7883
8696
  });
7884
8697
  }
7885
8698
 
@@ -7898,13 +8711,16 @@
7898
8711
  true
7899
8712
  );
7900
8713
 
7901
- var root$g = template(`<!> <link rel="stylesheet">`, 1);
8714
+ AlertWC[FILENAME] = 'src/sdg/components/Alert/AlertWC.svelte';
8715
+
8716
+ var root$f = add_locations(template(`<!> <link rel="stylesheet">`, 1), AlertWC[FILENAME], [[25, 0]]);
7902
8717
 
7903
8718
  function AlertWC($$anchor, $$props) {
8719
+ check_target(new.target);
7904
8720
  push($$props, true);
7905
8721
 
7906
8722
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
7907
- var fragment = root$g();
8723
+ var fragment = root$f();
7908
8724
  var node = first_child(fragment);
7909
8725
 
7910
8726
  Alert(node, spread_props(() => props, { slotContent: `<slot />` }));
@@ -7913,7 +8729,7 @@
7913
8729
 
7914
8730
  template_effect(() => set_attribute(link, 'href', Utils.cssPath));
7915
8731
  append($$anchor, fragment);
7916
- pop();
8732
+ return pop({ ...legacy_api() });
7917
8733
  }
7918
8734
 
7919
8735
  customElements.define('qc-alert', create_custom_element(
@@ -7930,6 +8746,8 @@
7930
8746
  true
7931
8747
  ));
7932
8748
 
8749
+ ToTop[FILENAME] = 'src/sdg/components/ToTop/ToTop.svelte';
8750
+
7933
8751
  function handleEnterAndSpace(e, scrollToTop) {
7934
8752
  switch (e.code) {
7935
8753
  case 'Enter':
@@ -7941,17 +8759,18 @@
7941
8759
  }
7942
8760
 
7943
8761
  var on_click$2 = (e, scrollToTop) => scrollToTop(e);
7944
- var root$f = template(`<a href="#top"><!> <span> </span></a>`);
8762
+ var root$e = add_locations(template(`<a href="#top"><!> <span> </span></a>`), ToTop[FILENAME], [[67, 0, [[77, 3]]]]);
7945
8763
 
7946
8764
  function ToTop($$anchor, $$props) {
8765
+ check_target(new.target);
7947
8766
  push($$props, true);
7948
8767
 
7949
8768
  const lang = Utils.getPageLanguage();
7950
8769
 
7951
- const text = prop($$props, 'text', 7, lang === 'fr' ? "Retour en haut" : "Back to top"),
8770
+ const text = prop($$props, 'text', 23, () => strict_equals(lang, 'fr') ? "Retour en haut" : "Back to top"),
7952
8771
  demo = prop($$props, 'demo', 7, 'false');
7953
8772
 
7954
- let visible = state(demo() === 'true');
8773
+ let visible = state(proxy(strict_equals(demo(), 'true')));
7955
8774
  let lastVisible = setContext('visible', () => get(visible));
7956
8775
  let lastScrollY = 0;
7957
8776
  let minimumScrollHeight = 0;
@@ -7984,7 +8803,7 @@
7984
8803
  lastScrollY = window.scrollY;
7985
8804
  });
7986
8805
 
7987
- var a = root$f();
8806
+ var a = root$e();
7988
8807
 
7989
8808
  event('scroll', $window, handleScrollUpButton);
7990
8809
 
@@ -8032,17 +8851,24 @@
8032
8851
  set demo($$value = 'false') {
8033
8852
  demo($$value);
8034
8853
  flushSync();
8035
- }
8854
+ },
8855
+ ...legacy_api()
8036
8856
  });
8037
8857
  }
8038
8858
 
8039
8859
  delegate(['click', 'keydown']);
8040
8860
  create_custom_element(ToTop, { text: {}, demo: {} }, [], [], true);
8041
8861
 
8862
+ ToTopWC[FILENAME] = 'src/sdg/components/ToTop/toTopWC.svelte';
8863
+
8042
8864
  function ToTopWC($$anchor, $$props) {
8865
+ check_target(new.target);
8866
+ push($$props, true);
8867
+
8043
8868
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8044
8869
 
8045
8870
  ToTop($$anchor, spread_props(() => props));
8871
+ return pop({ ...legacy_api() });
8046
8872
  }
8047
8873
 
8048
8874
  customElements.define('qc-to-top', create_custom_element(
@@ -8056,12 +8882,15 @@
8056
8882
  false
8057
8883
  ));
8058
8884
 
8059
- var root$e = template(`<span role="img" class="qc-ext-link-img"></span>`);
8885
+ ExternalLink[FILENAME] = 'src/sdg/components/ExternalLink/ExternalLink.svelte';
8886
+
8887
+ var root$d = add_locations(template(`<span role="img" class="qc-ext-link-img"></span>`), ExternalLink[FILENAME], [[89, 0]]);
8060
8888
 
8061
8889
  function ExternalLink($$anchor, $$props) {
8890
+ check_target(new.target);
8062
8891
  push($$props, true);
8063
8892
 
8064
- const externalIconAlt = prop($$props, 'externalIconAlt', 23, () => Utils.getPageLanguage() === 'fr' ? "Ce lien dirige vers un autre site." : "This link directs to another site.");
8893
+ const externalIconAlt = prop($$props, 'externalIconAlt', 23, () => strict_equals(Utils.getPageLanguage(), 'fr') ? "Ce lien dirige vers un autre site." : "This link directs to another site.");
8065
8894
  let imgElement = state(void 0);
8066
8895
 
8067
8896
  function createVisibleNodesTreeWalker() {
@@ -8075,7 +8904,7 @@
8075
8904
  const style = window.getComputedStyle(node);
8076
8905
 
8077
8906
  // Si l'élément est masqué par CSS (display ou visibility), on l'ignore
8078
- if (style.display === 'none' || style.visibility === 'hidden' || style.position === 'absolute') {
8907
+ if (strict_equals(style.display, 'none') || strict_equals(style.visibility, 'hidden') || strict_equals(style.position, 'absolute')) {
8079
8908
  return NodeFilter.FILTER_REJECT;
8080
8909
  }
8081
8910
  }
@@ -8137,7 +8966,7 @@
8137
8966
  });
8138
8967
  });
8139
8968
 
8140
- var span_1 = root$e();
8969
+ var span_1 = root$d();
8141
8970
 
8142
8971
  bind_this(span_1, ($$value) => set(imgElement, $$value), () => get(imgElement));
8143
8972
  template_effect(() => set_attribute(span_1, 'aria-label', externalIconAlt()));
@@ -8152,54 +8981,66 @@
8152
8981
  ) {
8153
8982
  externalIconAlt($$value);
8154
8983
  flushSync();
8155
- }
8984
+ },
8985
+ ...legacy_api()
8156
8986
  });
8157
8987
  }
8158
8988
 
8159
8989
  create_custom_element(ExternalLink, { externalIconAlt: {} }, [], [], true);
8160
8990
 
8991
+ ExternalLinkWC[FILENAME] = 'src/sdg/components/ExternalLink/ExternalLinkWC.svelte';
8992
+
8161
8993
  function ExternalLinkWC($$anchor, $$props) {
8994
+ check_target(new.target);
8995
+ push($$props, true);
8996
+
8162
8997
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8163
8998
 
8164
8999
  ExternalLink($$anchor, spread_props(() => props));
9000
+ return pop({ ...legacy_api() });
8165
9001
  }
8166
9002
 
8167
9003
  customElements.define('qc-external-link', create_custom_element(ExternalLinkWC, { externalIconAlt: { attribute: 'img-alt' } }, [], [], false));
8168
9004
 
8169
- var root$d = template(`<div><!> <input> <!></div>`);
9005
+ SearchInput[FILENAME] = 'src/sdg/components/SearchInput/SearchInput.svelte';
9006
+
9007
+ var root$c = add_locations(template(`<div><!> <input> <!></div>`), SearchInput[FILENAME], [[28, 0, [[39, 4]]]]);
8170
9008
 
8171
9009
  function SearchInput($$anchor, $$props) {
9010
+ check_target(new.target);
8172
9011
  push($$props, true);
8173
9012
 
8174
9013
  const lang = Utils.getPageLanguage();
8175
9014
 
8176
9015
  let value = prop($$props, 'value', 15, ''),
8177
- ariaLabel = prop($$props, 'ariaLabel', 7, lang === "fr" ? "Rechercher..." : "Search..."),
8178
- clearAriaLabel = prop($$props, 'clearAriaLabel', 7, lang === "fr" ? "Effacer le texte" : "Clear text"),
9016
+ ariaLabel = prop($$props, 'ariaLabel', 23, () => strict_equals(lang, "fr") ? "Rechercher..." : "Search..."),
9017
+ clearAriaLabel = prop($$props, 'clearAriaLabel', 23, () => strict_equals(lang, "fr") ? "Effacer le texte" : "Clear text"),
8179
9018
  leftIcon = prop($$props, 'leftIcon', 7, false),
8180
9019
  id = prop($$props, 'id', 23, () => `qc-search-input-${Math.random().toString(36).slice(2, 11)}`),
8181
- rest = rest_props($$props, [
8182
- '$$slots',
8183
- '$$events',
8184
- '$$legacy',
8185
- '$$host',
8186
- 'value',
8187
- 'ariaLabel',
8188
- 'clearAriaLabel',
8189
- 'leftIcon',
8190
- 'id'
8191
- ]);
8192
-
8193
- leftIcon(leftIcon() === true || leftIcon() === "true" || leftIcon() === "");
8194
-
8195
- const isDisabled = $$props.disabled === true || $$props.disabled === "true" || $$props.disabled === "";
9020
+ rest = rest_props(
9021
+ $$props,
9022
+ [
9023
+ '$$slots',
9024
+ '$$events',
9025
+ '$$legacy',
9026
+ '$$host',
9027
+ 'value',
9028
+ 'ariaLabel',
9029
+ 'clearAriaLabel',
9030
+ 'leftIcon',
9031
+ 'id'
9032
+ ]);
9033
+
9034
+ leftIcon(strict_equals(leftIcon(), true) || strict_equals(leftIcon(), "true") || strict_equals(leftIcon(), ""));
9035
+
9036
+ const isDisabled = strict_equals($$props.disabled, true) || strict_equals($$props.disabled, "true") || strict_equals($$props.disabled, "");
8196
9037
  let searchInput;
8197
9038
 
8198
9039
  function focus() {
8199
9040
  searchInput?.focus();
8200
9041
  }
8201
9042
 
8202
- var div = root$d();
9043
+ var div = root$c();
8203
9044
  var node = child(div);
8204
9045
 
8205
9046
  {
@@ -8272,7 +9113,9 @@
8272
9113
  append($$anchor, div);
8273
9114
 
8274
9115
  return pop({
8275
- focus,
9116
+ get focus() {
9117
+ return focus;
9118
+ },
8276
9119
  get value() {
8277
9120
  return value();
8278
9121
  },
@@ -8313,7 +9156,8 @@
8313
9156
  ) {
8314
9157
  id($$value);
8315
9158
  flushSync();
8316
- }
9159
+ },
9160
+ ...legacy_api()
8317
9161
  });
8318
9162
  }
8319
9163
 
@@ -8331,31 +9175,41 @@
8331
9175
  true
8332
9176
  );
8333
9177
 
8334
- var root$c = template(`<div><!> <!></div>`);
9178
+ SearchBar[FILENAME] = 'src/sdg/components/SearchBar/SearchBar.svelte';
9179
+
9180
+ var root$b = add_locations(template(`<div><!> <!></div>`), SearchBar[FILENAME], [[37, 0]]);
8335
9181
 
8336
9182
  function SearchBar($$anchor, $$props) {
9183
+ check_target(new.target);
8337
9184
  push($$props, true);
8338
9185
 
9186
+ var $$ownership_validator = create_ownership_validator($$props);
8339
9187
  const lang = Utils.getPageLanguage();
8340
9188
 
8341
9189
  let value = prop($$props, 'value', 15, ''),
8342
9190
  name = prop($$props, 'name', 7, 'q'),
8343
9191
  pivBackground = prop($$props, 'pivBackground', 7, false),
8344
- rest = rest_props($$props, [
8345
- '$$slots',
8346
- '$$events',
8347
- '$$legacy',
8348
- '$$host',
8349
- 'value',
8350
- 'name',
8351
- 'pivBackground'
8352
- ]);
9192
+ rest = rest_props(
9193
+ $$props,
9194
+ [
9195
+ '$$slots',
9196
+ '$$events',
9197
+ '$$legacy',
9198
+ '$$host',
9199
+ 'value',
9200
+ 'name',
9201
+ 'pivBackground'
9202
+ ]);
8353
9203
 
8354
9204
  let defaultsAttributes = {
8355
9205
  input: {
8356
- "placeholder": lang === "fr" ? "Rechercher…" : "Search",
8357
- "aria-label": lang === "fr" ? "Rechercher…" : "Search"
8358
- }};
9206
+ "placeholder": strict_equals(lang, "fr") ? "Rechercher…" : "Search",
9207
+ "aria-label": strict_equals(lang, "fr") ? "Rechercher…" : "Search"
9208
+ },
9209
+ submit: {
9210
+ "aria-label": strict_equals(lang, "fr") ? "Lancer la recherche" : "Submit search"
9211
+ }
9212
+ };
8359
9213
 
8360
9214
  let inputProps = user_derived(() => ({
8361
9215
  ...defaultsAttributes.input,
@@ -8367,18 +9221,22 @@
8367
9221
  ...Utils.computeFieldsAttributes("submit", rest)
8368
9222
  }));
8369
9223
 
8370
- var div = root$c();
9224
+ var div = root$b();
8371
9225
  let classes;
8372
9226
  var node = child(div);
8373
9227
 
8374
- SearchInput(node, spread_props(() => get(inputProps), {
8375
- get value() {
8376
- return value();
8377
- },
8378
- set value($$value) {
8379
- value($$value);
8380
- }
8381
- }));
9228
+ {
9229
+ $$ownership_validator.binding('value', SearchInput, value);
9230
+
9231
+ SearchInput(node, spread_props(() => get(inputProps), {
9232
+ get value() {
9233
+ return value();
9234
+ },
9235
+ set value($$value) {
9236
+ value($$value);
9237
+ }
9238
+ }));
9239
+ }
8382
9240
 
8383
9241
  var node_1 = sibling(node, 2);
8384
9242
  const expression = user_derived(() => pivBackground() ? 'blue-piv' : 'background');
@@ -8424,16 +9282,23 @@
8424
9282
  set pivBackground($$value = false) {
8425
9283
  pivBackground($$value);
8426
9284
  flushSync();
8427
- }
9285
+ },
9286
+ ...legacy_api()
8428
9287
  });
8429
9288
  }
8430
9289
 
8431
9290
  create_custom_element(SearchBar, { value: {}, name: {}, pivBackground: {} }, [], [], true);
8432
9291
 
9292
+ SearchBarWC[FILENAME] = 'src/sdg/components/SearchBar/SearchBarWC.svelte';
9293
+
8433
9294
  function SearchBarWC($$anchor, $$props) {
9295
+ check_target(new.target);
9296
+ push($$props, true);
9297
+
8434
9298
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8435
9299
 
8436
9300
  SearchBar($$anchor, spread_props(() => props));
9301
+ return pop({ ...legacy_api() });
8437
9302
  }
8438
9303
 
8439
9304
  customElements.define('qc-search-bar', create_custom_element(
@@ -8448,10 +9313,16 @@
8448
9313
  false
8449
9314
  ));
8450
9315
 
9316
+ SearchInputWC[FILENAME] = 'src/sdg/components/SearchInput/SearchInputWC.svelte';
9317
+
8451
9318
  function SearchInputWC($$anchor, $$props) {
9319
+ check_target(new.target);
9320
+ push($$props, true);
9321
+
8452
9322
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8453
9323
 
8454
9324
  SearchInput($$anchor, spread_props(() => props));
9325
+ return pop({ ...legacy_api() });
8455
9326
  }
8456
9327
 
8457
9328
  customElements.define('qc-search-input', create_custom_element(
@@ -8467,10 +9338,16 @@
8467
9338
  false
8468
9339
  ));
8469
9340
 
9341
+ IconWC[FILENAME] = 'src/sdg/bases/Icon/IconWC.svelte';
9342
+
8470
9343
  function IconWC($$anchor, $$props) {
9344
+ check_target(new.target);
9345
+ push($$props, true);
9346
+
8471
9347
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8472
9348
 
8473
9349
  Icon($$anchor, spread_props(() => props));
9350
+ return pop({ ...legacy_api() });
8474
9351
  }
8475
9352
 
8476
9353
  customElements.define('qc-icon', create_custom_element(
@@ -8490,10 +9367,16 @@
8490
9367
  false
8491
9368
  ));
8492
9369
 
9370
+ IconButtonWC[FILENAME] = 'src/sdg/components/IconButton/IconButtonWC.svelte';
9371
+
8493
9372
  function IconButtonWC($$anchor, $$props) {
9373
+ check_target(new.target);
9374
+ push($$props, true);
9375
+
8494
9376
  const props = rest_props($$props, ['$$slots', '$$events', '$$legacy', '$$host']);
8495
9377
 
8496
9378
  IconButton($$anchor, spread_props(() => props));
9379
+ return pop({ ...legacy_api() });
8497
9380
  }
8498
9381
 
8499
9382
  customElements.define('qc-icon-button', create_custom_element(
@@ -8510,10 +9393,13 @@
8510
9393
  false
8511
9394
  ));
8512
9395
 
8513
- var root_2$6 = template(`<!> <span><!></span>`, 1);
8514
- var root_1$6 = template(`<div role="alert"><!></div>`);
9396
+ FormError[FILENAME] = 'src/sdg/components/FormError/FormError.svelte';
9397
+
9398
+ var root_2$6 = add_locations(template(`<!> <span><!></span>`, 1), FormError[FILENAME], [[48, 8]]);
9399
+ var root_1$6 = add_locations(template(`<div role="alert"><!></div>`), FormError[FILENAME], [[35, 0]]);
8515
9400
 
8516
9401
  function FormError($$anchor, $$props) {
9402
+ check_target(new.target);
8517
9403
  push($$props, true);
8518
9404
 
8519
9405
  const lang = Utils.getPageLanguage();
@@ -8526,7 +9412,7 @@
8526
9412
  rootElement = prop($$props, 'rootElement', 15);
8527
9413
 
8528
9414
  let cleanLabel = user_derived(() => label().replace(/:\s*$/, '')),
8529
- defaultInvalidText = user_derived(() => label() ? lang === 'fr' ? `Le champ ${get(cleanLabel)} est obligatoire.` : `${get(cleanLabel)} field is required.` : lang === 'fr' ? `Ce champ est obligatoire.` : `This field is required.`);
9415
+ defaultInvalidText = user_derived(() => label() ? strict_equals(lang, 'fr') ? `Le champ ${get(cleanLabel)} est obligatoire.` : `${get(cleanLabel)} field is required.` : strict_equals(lang, 'fr') ? `Ce champ est obligatoire.` : `This field is required.`);
8530
9416
 
8531
9417
  onMount(() => {
8532
9418
  if (id()) return;
@@ -8625,7 +9511,8 @@
8625
9511
  set rootElement($$value) {
8626
9512
  rootElement($$value);
8627
9513
  flushSync();
8628
- }
9514
+ },
9515
+ ...legacy_api()
8629
9516
  });
8630
9517
  }
8631
9518
 
@@ -8644,16 +9531,19 @@
8644
9531
  true
8645
9532
  );
8646
9533
 
8647
- var root_1$5 = template(`<span class="qc-required" aria-hidden="true">*</span>`);
8648
- var root$b = template(`<!><!>`, 1);
9534
+ LabelText[FILENAME] = 'src/sdg/components/Label/LabelText.svelte';
9535
+
9536
+ var root_1$5 = add_locations(template(`<span class="qc-required" aria-hidden="true">*</span>`), LabelText[FILENAME], [[4, 26]]);
9537
+ var root$a = add_locations(template(`<!><!>`, 1), LabelText[FILENAME], []);
8649
9538
 
8650
9539
  function LabelText($$anchor, $$props) {
9540
+ check_target(new.target);
8651
9541
  push($$props, true);
8652
9542
 
8653
9543
  let text = prop($$props, 'text', 7),
8654
9544
  required = prop($$props, 'required', 7);
8655
9545
 
8656
- var fragment = root$b();
9546
+ var fragment = root$a();
8657
9547
  var node = first_child(fragment);
8658
9548
 
8659
9549
  html(node, text);
@@ -8688,26 +9578,32 @@
8688
9578
  set required($$value) {
8689
9579
  required($$value);
8690
9580
  flushSync();
8691
- }
9581
+ },
9582
+ ...legacy_api()
8692
9583
  });
8693
9584
  }
8694
9585
 
8695
9586
  create_custom_element(LabelText, { text: {}, required: {} }, [], [], true);
8696
9587
 
8697
- var root_2$5 = template(`<legend><!></legend>`);
8698
- var root_1$4 = template(`<fieldset><!> <div><!></div> <!></fieldset>`);
8699
- var root_4$2 = template(`<div class="qc-fieldset-invalid"><!></div>`);
9588
+ Fieldset[FILENAME] = 'src/sdg/components/Fieldset/Fieldset.svelte';
9589
+
9590
+ var root_2$5 = add_locations(template(`<legend><!></legend>`), Fieldset[FILENAME], [[43, 4]]);
9591
+ var root_1$4 = add_locations(template(`<fieldset><!> <div><!></div> <!></fieldset>`), Fieldset[FILENAME], [[31, 0, [[47, 4]]]]);
9592
+ var root_4$2 = add_locations(template(`<div class="qc-fieldset-invalid"><!></div>`), Fieldset[FILENAME], [[70, 4]]);
8700
9593
 
8701
9594
  function Fieldset($$anchor, $$props) {
9595
+ check_target(new.target);
8702
9596
  push($$props, true);
8703
9597
 
8704
- const fieldset = ($$anchor) => {
9598
+ const fieldset = wrap_snippet(Fieldset, function ($$anchor) {
9599
+ validate_snippet_args(...arguments);
9600
+
8705
9601
  var fieldset_1 = root_1$4();
8706
9602
 
8707
9603
  set_attribute(fieldset_1, 'aria-describedby', legendId);
8708
9604
 
8709
9605
  fieldset_1.__change = function (...$$args) {
8710
- onchange()?.apply(this, $$args);
9606
+ apply(onchange, this, $$args, Fieldset, [38, 11]);
8711
9607
  };
8712
9608
 
8713
9609
  var node = child(fieldset_1);
@@ -8787,7 +9683,7 @@
8787
9683
  });
8788
9684
 
8789
9685
  append($$anchor, fieldset_1);
8790
- };
9686
+ });
8791
9687
 
8792
9688
  let legend = prop($$props, 'legend', 7),
8793
9689
  name = prop($$props, 'name', 7),
@@ -8937,7 +9833,8 @@
8937
9833
  set rootElement($$value) {
8938
9834
  rootElement($$value);
8939
9835
  flushSync();
8940
- }
9836
+ },
9837
+ ...legacy_api()
8941
9838
  });
8942
9839
  }
8943
9840
 
@@ -8967,9 +9864,9 @@
8967
9864
  true
8968
9865
  );
8969
9866
 
8970
- /* updateInput.svelte.js generated by Svelte v5.28.6 */
9867
+ /* updateChoiceInput.svelte.js generated by Svelte v5.28.6 */
8971
9868
 
8972
- function updateInput(
9869
+ function updateChoiceInput(
8973
9870
  input,
8974
9871
  required,
8975
9872
  invalid,
@@ -8979,11 +9876,17 @@
8979
9876
  name
8980
9877
  ) {
8981
9878
  if (!input) return;
8982
- if (input.role === "switch") return;
9879
+ if (strict_equals(input.role, "switch")) return;
9880
+ if (strict_equals(input.type, "hidden")) return;
8983
9881
 
8984
9882
  let label = input.closest('label');
8985
9883
 
8986
- input.classList.add('qc-choicefield');
9884
+ if (!label) {
9885
+ console.warn(...log_if_contains_state('warn', "Pas d'élément label parent pour l'input", input));
9886
+ return;
9887
+ }
9888
+
9889
+ input.classList.add('qc-choicefield');
8987
9890
  label.classList.add('qc-choicefield-label');
8988
9891
  input.classList.toggle('qc-selection-button', selectionButton);
8989
9892
  label.classList.toggle('qc-selection-button', selectionButton);
@@ -9001,9 +9904,14 @@
9001
9904
  input.addEventListener('change', () => setInvalid(false));
9002
9905
  }
9003
9906
 
9907
+ ChoiceGroup[FILENAME] = 'src/sdg/components/ChoiceGroup/ChoiceGroup.svelte';
9908
+
9004
9909
  function ChoiceGroup($$anchor, $$props) {
9910
+ check_target(new.target);
9005
9911
  push($$props, true);
9006
9912
 
9913
+ var $$ownership_validator = create_ownership_validator($$props);
9914
+
9007
9915
  let invalid = prop($$props, 'invalid', 15, false),
9008
9916
  invalidText = prop($$props, 'invalidText', 7),
9009
9917
  children = prop($$props, 'children', 7),
@@ -9013,21 +9921,23 @@
9013
9921
  host = prop($$props, 'host', 7),
9014
9922
  name = prop($$props, 'name', 7),
9015
9923
  required = prop($$props, 'required', 7),
9016
- restProps = rest_props($$props, [
9017
- '$$slots',
9018
- '$$events',
9019
- '$$legacy',
9020
- '$$host',
9021
- 'invalid',
9022
- 'invalidText',
9023
- 'children',
9024
- 'compact',
9025
- 'selectionButton',
9026
- 'inline',
9027
- 'host',
9028
- 'name',
9029
- 'required'
9030
- ]);
9924
+ restProps = rest_props(
9925
+ $$props,
9926
+ [
9927
+ '$$slots',
9928
+ '$$events',
9929
+ '$$legacy',
9930
+ '$$host',
9931
+ 'invalid',
9932
+ 'invalidText',
9933
+ 'children',
9934
+ 'compact',
9935
+ 'selectionButton',
9936
+ 'inline',
9937
+ 'host',
9938
+ 'name',
9939
+ 'required'
9940
+ ]);
9031
9941
 
9032
9942
  let fieldsetElement = state(void 0);
9033
9943
 
@@ -9038,52 +9948,56 @@
9038
9948
  };
9039
9949
 
9040
9950
  user_effect(() => {
9041
- (host() ? host() : get(fieldsetElement)).querySelectorAll('input, .qc-choicefield').forEach((input) => updateInput(input, required(), invalid(), compact(), selectionButton(), inline(), name()));
9951
+ (host() ? host() : get(fieldsetElement)).querySelectorAll('input, .qc-choicefield').forEach((input) => updateChoiceInput(input, required(), invalid(), compact(), selectionButton(), inline(), name()));
9042
9952
  });
9043
9953
 
9044
- Fieldset($$anchor, spread_props(
9045
- {
9046
- get required() {
9047
- return required();
9048
- },
9049
- get compact() {
9050
- return compact();
9051
- },
9052
- get selectionButton() {
9053
- return selectionButton();
9054
- },
9055
- get inline() {
9056
- return inline();
9057
- },
9058
- get invalidText() {
9059
- return invalidText();
9060
- },
9061
- onchange
9062
- },
9063
- () => restProps,
9064
- {
9065
- get invalid() {
9066
- return invalid();
9067
- },
9068
- set invalid($$value) {
9069
- invalid($$value);
9070
- },
9071
- get rootElement() {
9072
- return get(fieldsetElement);
9073
- },
9074
- set rootElement($$value) {
9075
- set(fieldsetElement, $$value, true);
9076
- },
9077
- children: ($$anchor, $$slotProps) => {
9078
- var fragment_1 = comment();
9079
- var node = first_child(fragment_1);
9954
+ {
9955
+ $$ownership_validator.binding('invalid', Fieldset, invalid);
9080
9956
 
9081
- snippet(node, children);
9082
- append($$anchor, fragment_1);
9957
+ Fieldset($$anchor, spread_props(
9958
+ {
9959
+ get required() {
9960
+ return required();
9961
+ },
9962
+ get compact() {
9963
+ return compact();
9964
+ },
9965
+ get selectionButton() {
9966
+ return selectionButton();
9967
+ },
9968
+ get inline() {
9969
+ return inline();
9970
+ },
9971
+ get invalidText() {
9972
+ return invalidText();
9973
+ },
9974
+ onchange
9083
9975
  },
9084
- $$slots: { default: true }
9085
- }
9086
- ));
9976
+ () => restProps,
9977
+ {
9978
+ get invalid() {
9979
+ return invalid();
9980
+ },
9981
+ set invalid($$value) {
9982
+ invalid($$value);
9983
+ },
9984
+ get rootElement() {
9985
+ return get(fieldsetElement);
9986
+ },
9987
+ set rootElement($$value) {
9988
+ set(fieldsetElement, $$value, true);
9989
+ },
9990
+ children: wrap_snippet(ChoiceGroup, ($$anchor, $$slotProps) => {
9991
+ var fragment_1 = comment();
9992
+ var node = first_child(fragment_1);
9993
+
9994
+ snippet(node, children);
9995
+ append($$anchor, fragment_1);
9996
+ }),
9997
+ $$slots: { default: true }
9998
+ }
9999
+ ));
10000
+ }
9087
10001
 
9088
10002
  return pop({
9089
10003
  get invalid() {
@@ -9148,7 +10062,8 @@
9148
10062
  set required($$value) {
9149
10063
  required($$value);
9150
10064
  flushSync();
9151
- }
10065
+ },
10066
+ ...legacy_api()
9152
10067
  });
9153
10068
  }
9154
10069
 
@@ -9170,11 +10085,16 @@
9170
10085
  true
9171
10086
  );
9172
10087
 
9173
- var root$a = template(`<!> <link rel="stylesheet">`, 1);
10088
+ ChoiceGroupWC[FILENAME] = 'src/sdg/components/ChoiceGroup/ChoiceGroupWC.svelte';
10089
+
10090
+ var root$9 = add_locations(template(`<!> <link rel="stylesheet">`, 1), ChoiceGroupWC[FILENAME], [[47, 0]]);
9174
10091
 
9175
10092
  function ChoiceGroupWC($$anchor, $$props) {
10093
+ check_target(new.target);
9176
10094
  push($$props, true);
9177
10095
 
10096
+ var $$ownership_validator = create_ownership_validator($$props);
10097
+
9178
10098
  let name = prop($$props, 'name', 7),
9179
10099
  legend = prop($$props, 'legend', 7),
9180
10100
  compact = prop($$props, 'compact', 7),
@@ -9185,50 +10105,54 @@
9185
10105
  columnCount = prop($$props, 'columnCount', 7),
9186
10106
  inline = prop($$props, 'inline', 7);
9187
10107
 
9188
- var fragment = root$a();
10108
+ var fragment = root$9();
9189
10109
  var node = first_child(fragment);
9190
10110
 
9191
- ChoiceGroup(node, {
9192
- get name() {
9193
- return name();
9194
- },
9195
- get legend() {
9196
- return legend();
9197
- },
9198
- get compact() {
9199
- return compact();
9200
- },
9201
- get required() {
9202
- return required();
9203
- },
9204
- get invalidText() {
9205
- return invalidText();
9206
- },
9207
- get selectionButton() {
9208
- return selectionButton();
9209
- },
9210
- get columnCount() {
9211
- return columnCount();
9212
- },
9213
- get inline() {
9214
- return inline();
9215
- },
9216
- host: $$props.$$host,
9217
- get invalid() {
9218
- return invalid();
9219
- },
9220
- set invalid($$value) {
9221
- invalid($$value);
9222
- },
9223
- children: ($$anchor, $$slotProps) => {
9224
- var fragment_1 = comment();
9225
- var node_1 = first_child(fragment_1);
10111
+ {
10112
+ $$ownership_validator.binding('invalid', ChoiceGroup, invalid);
9226
10113
 
9227
- slot(node_1, $$props, 'default', {});
9228
- append($$anchor, fragment_1);
9229
- },
9230
- $$slots: { default: true }
9231
- });
10114
+ ChoiceGroup(node, {
10115
+ get name() {
10116
+ return name();
10117
+ },
10118
+ get legend() {
10119
+ return legend();
10120
+ },
10121
+ get compact() {
10122
+ return compact();
10123
+ },
10124
+ get required() {
10125
+ return required();
10126
+ },
10127
+ get invalidText() {
10128
+ return invalidText();
10129
+ },
10130
+ get selectionButton() {
10131
+ return selectionButton();
10132
+ },
10133
+ get columnCount() {
10134
+ return columnCount();
10135
+ },
10136
+ get inline() {
10137
+ return inline();
10138
+ },
10139
+ host: $$props.$$host,
10140
+ get invalid() {
10141
+ return invalid();
10142
+ },
10143
+ set invalid($$value) {
10144
+ invalid($$value);
10145
+ },
10146
+ children: wrap_snippet(ChoiceGroupWC, ($$anchor, $$slotProps) => {
10147
+ var fragment_1 = comment();
10148
+ var node_1 = first_child(fragment_1);
10149
+
10150
+ slot(node_1, $$props, 'default', {}, null);
10151
+ append($$anchor, fragment_1);
10152
+ }),
10153
+ $$slots: { default: true }
10154
+ });
10155
+ }
9232
10156
 
9233
10157
  var link = sibling(node, 2);
9234
10158
 
@@ -9298,7 +10222,8 @@
9298
10222
  set inline($$value) {
9299
10223
  inline($$value);
9300
10224
  flushSync();
9301
- }
10225
+ },
10226
+ ...legacy_api()
9302
10227
  });
9303
10228
  }
9304
10229
 
@@ -9323,13 +10248,18 @@
9323
10248
  true
9324
10249
  ));
9325
10250
 
9326
- var root_2$4 = template(`<span class="qc-required" aria-hidden="true">*</span>`);
9327
- var root$9 = template(`<div><!> <!> <!></div>`);
10251
+ Checkbox[FILENAME] = 'src/sdg/components/Checkbox/Checkbox.svelte';
10252
+
10253
+ var root_2$4 = add_locations(template(`<span class="qc-required" aria-hidden="true">*</span>`), Checkbox[FILENAME], [[56, 4]]);
10254
+ var root$8 = add_locations(template(`<div><!> <!> <!></div>`), Checkbox[FILENAME], [[64, 4]]);
9328
10255
 
9329
10256
  function Checkbox($$anchor, $$props) {
10257
+ check_target(new.target);
9330
10258
  push($$props, true);
9331
10259
 
9332
- const requiredSpanSnippet = ($$anchor) => {
10260
+ const requiredSpanSnippet = wrap_snippet(Checkbox, function ($$anchor) {
10261
+ validate_snippet_args(...arguments);
10262
+
9333
10263
  var fragment = comment();
9334
10264
  var node = first_child(fragment);
9335
10265
 
@@ -9347,7 +10277,7 @@
9347
10277
  }
9348
10278
 
9349
10279
  append($$anchor, fragment);
9350
- };
10280
+ });
9351
10281
 
9352
10282
  Utils.getPageLanguage();
9353
10283
  const qcCheckoxContext = getContext("qc-checkbox");
@@ -9373,7 +10303,7 @@
9373
10303
  onMount(() => {
9374
10304
  if (qcCheckoxContext) return;
9375
10305
  labelElement(get(rootElement)?.querySelector('label'));
9376
- input(get(rootElement)?.querySelector('input'));
10306
+ input(get(rootElement)?.querySelector('input[type="checkbox"]'));
9377
10307
  onChange(input(), (_invalid) => invalid(_invalid));
9378
10308
  });
9379
10309
 
@@ -9383,7 +10313,7 @@
9383
10313
  }
9384
10314
  });
9385
10315
 
9386
- user_effect((_) => updateInput(input(), required(), invalid(), compact(), false, false));
10316
+ user_effect((_) => updateChoiceInput(input(), required(), invalid(), compact(), false, false));
9387
10317
 
9388
10318
  user_effect(() => {
9389
10319
  if (!required()) return;
@@ -9391,7 +10321,7 @@
9391
10321
  labelElement().appendChild(requiredSpan());
9392
10322
  });
9393
10323
 
9394
- var div = root$9();
10324
+ var div = root$8();
9395
10325
  var node_1 = child(div);
9396
10326
 
9397
10327
  requiredSpanSnippet(node_1);
@@ -9526,7 +10456,8 @@
9526
10456
  set input($$value) {
9527
10457
  input($$value);
9528
10458
  flushSync();
9529
- }
10459
+ },
10460
+ ...legacy_api()
9530
10461
  });
9531
10462
  }
9532
10463
 
@@ -9553,10 +10484,16 @@
9553
10484
  true
9554
10485
  );
9555
10486
 
9556
- var root$8 = template(`<!> <link rel="stylesheet">`, 1);
10487
+ CheckboxWC[FILENAME] = 'src/sdg/components/Checkbox/CheckboxWC.svelte';
10488
+
10489
+ var root$7 = add_locations(template(`<!> <link rel="stylesheet">`, 1), CheckboxWC[FILENAME], [[49, 0]]);
9557
10490
 
9558
10491
  function CheckboxWC($$anchor, $$props) {
10492
+ check_target(new.target);
9559
10493
  push($$props, true);
10494
+
10495
+ var $$ownership_validator = create_ownership_validator($$props);
10496
+
9560
10497
  setContext('qc-checkbox', true);
9561
10498
 
9562
10499
  let required = prop($$props, 'required', 15, false),
@@ -9569,51 +10506,55 @@
9569
10506
  input = state(void 0);
9570
10507
 
9571
10508
  onMount(() => {
9572
- set(labelElement, $$props.$$host.querySelector('label'), true);
9573
- set(input, $$props.$$host.querySelector('input'), true);
10509
+ set(labelElement, $$props.$$host.querySelector("label"), true);
10510
+ set(input, $$props.$$host.querySelector('input[type="checkbox"]'), true);
9574
10511
  onChange(get(input), (_invalid) => invalid(_invalid));
9575
10512
  });
9576
10513
 
9577
- var fragment = root$8();
10514
+ var fragment = root$7();
9578
10515
  var node = first_child(fragment);
9579
10516
 
9580
- Checkbox(node, {
9581
- get compact() {
9582
- return compact();
9583
- },
9584
- get required() {
9585
- return required();
9586
- },
9587
- get invalidText() {
9588
- return invalidText();
9589
- },
9590
- get labelElement() {
9591
- return get(labelElement);
9592
- },
9593
- get input() {
9594
- return get(input);
9595
- },
9596
- get invalid() {
9597
- return invalid();
9598
- },
9599
- set invalid($$value) {
9600
- invalid($$value);
9601
- },
9602
- get requiredSpan() {
9603
- return get(requiredSpan);
9604
- },
9605
- set requiredSpan($$value) {
9606
- set(requiredSpan, $$value, true);
9607
- },
9608
- children: ($$anchor, $$slotProps) => {
9609
- var fragment_1 = comment();
9610
- var node_1 = first_child(fragment_1);
10517
+ {
10518
+ $$ownership_validator.binding('invalid', Checkbox, invalid);
9611
10519
 
9612
- slot(node_1, $$props, 'default', {});
9613
- append($$anchor, fragment_1);
9614
- },
9615
- $$slots: { default: true }
9616
- });
10520
+ Checkbox(node, {
10521
+ get compact() {
10522
+ return compact();
10523
+ },
10524
+ get required() {
10525
+ return required();
10526
+ },
10527
+ get invalidText() {
10528
+ return invalidText();
10529
+ },
10530
+ get labelElement() {
10531
+ return get(labelElement);
10532
+ },
10533
+ get input() {
10534
+ return get(input);
10535
+ },
10536
+ get invalid() {
10537
+ return invalid();
10538
+ },
10539
+ set invalid($$value) {
10540
+ invalid($$value);
10541
+ },
10542
+ get requiredSpan() {
10543
+ return get(requiredSpan);
10544
+ },
10545
+ set requiredSpan($$value) {
10546
+ set(requiredSpan, $$value, true);
10547
+ },
10548
+ children: wrap_snippet(CheckboxWC, ($$anchor, $$slotProps) => {
10549
+ var fragment_1 = comment();
10550
+ var node_1 = first_child(fragment_1);
10551
+
10552
+ slot(node_1, $$props, 'default', {}, null);
10553
+ append($$anchor, fragment_1);
10554
+ }),
10555
+ $$slots: { default: true }
10556
+ });
10557
+ }
9617
10558
 
9618
10559
  var link = sibling(node, 2);
9619
10560
 
@@ -9648,7 +10589,8 @@
9648
10589
  set invalidText($$value) {
9649
10590
  invalidText($$value);
9650
10591
  flushSync();
9651
- }
10592
+ },
10593
+ ...legacy_api()
9652
10594
  });
9653
10595
  }
9654
10596
 
@@ -9665,9 +10607,12 @@
9665
10607
  true
9666
10608
  ));
9667
10609
 
9668
- var root$7 = template(`<label><!></label>`);
10610
+ Label[FILENAME] = 'src/sdg/components/Label/Label.svelte';
10611
+
10612
+ var root$6 = add_locations(template(`<label><!></label>`), Label[FILENAME], [[16, 0]]);
9669
10613
 
9670
10614
  function Label($$anchor, $$props) {
10615
+ check_target(new.target);
9671
10616
  push($$props, true);
9672
10617
 
9673
10618
  let forId = prop($$props, 'forId', 7),
@@ -9677,21 +10622,23 @@
9677
10622
  bold = prop($$props, 'bold', 7, false),
9678
10623
  disabled = prop($$props, 'disabled', 7, false),
9679
10624
  rootElement = prop($$props, 'rootElement', 15),
9680
- rest = rest_props($$props, [
9681
- '$$slots',
9682
- '$$events',
9683
- '$$legacy',
9684
- '$$host',
9685
- 'forId',
9686
- 'text',
9687
- 'required',
9688
- 'compact',
9689
- 'bold',
9690
- 'disabled',
9691
- 'rootElement'
9692
- ]);
9693
-
9694
- var label = root$7();
10625
+ rest = rest_props(
10626
+ $$props,
10627
+ [
10628
+ '$$slots',
10629
+ '$$events',
10630
+ '$$legacy',
10631
+ '$$host',
10632
+ 'forId',
10633
+ 'text',
10634
+ 'required',
10635
+ 'compact',
10636
+ 'bold',
10637
+ 'disabled',
10638
+ 'rootElement'
10639
+ ]);
10640
+
10641
+ var label = root$6();
9695
10642
  let attributes;
9696
10643
  var node = child(label);
9697
10644
 
@@ -9769,7 +10716,8 @@
9769
10716
  set rootElement($$value) {
9770
10717
  rootElement($$value);
9771
10718
  flushSync();
9772
- }
10719
+ },
10720
+ ...legacy_api()
9773
10721
  });
9774
10722
  }
9775
10723
 
@@ -9807,15 +10755,22 @@
9807
10755
  setTextFieldRow(input.closest('.qc-formfield-row'));
9808
10756
  }
9809
10757
 
9810
- var root_3$2 = template(`<div class="qc-description"><!></div>`);
9811
- var root_4$1 = template(`<div aria-live="polite"><!></div>`);
9812
- var root_1$3 = template(`<!> <!> <!> <!> <!>`, 1);
9813
- var root_6 = template(`<div class="qc-textfield"><!></div>`);
10758
+ TextField[FILENAME] = 'src/sdg/components/TextField/TextField.svelte';
10759
+
10760
+ var root_3$2 = add_locations(template(`<div class="qc-description"><!></div>`), TextField[FILENAME], [[135, 8]]);
10761
+ var root_4$1 = add_locations(template(`<div aria-live="polite"><!></div>`), TextField[FILENAME], [[146, 8]]);
10762
+ var root_1$3 = add_locations(template(`<!> <!> <!> <!> <!>`, 1), TextField[FILENAME], []);
10763
+ var root_6 = add_locations(template(`<div class="qc-textfield"><!></div>`), TextField[FILENAME], [[170, 4]]);
9814
10764
 
9815
10765
  function TextField($$anchor, $$props) {
10766
+ check_target(new.target);
9816
10767
  push($$props, true);
9817
10768
 
9818
- const textfield = ($$anchor) => {
10769
+ var $$ownership_validator = create_ownership_validator($$props);
10770
+
10771
+ const textfield = wrap_snippet(TextField, function ($$anchor) {
10772
+ validate_snippet_args(...arguments);
10773
+
9819
10774
  var fragment = root_1$3();
9820
10775
  var node = first_child(fragment);
9821
10776
 
@@ -9824,26 +10779,30 @@
9824
10779
  const expression = user_derived(() => input()?.disabled);
9825
10780
  const expression_1 = user_derived(() => input()?.id);
9826
10781
 
9827
- Label($$anchor, {
9828
- get required() {
9829
- return required();
9830
- },
9831
- get disabled() {
9832
- return get(expression);
9833
- },
9834
- get text() {
9835
- return label();
9836
- },
9837
- get forId() {
9838
- return get(expression_1);
9839
- },
9840
- get rootElement() {
9841
- return labelElement();
9842
- },
9843
- set rootElement($$value) {
9844
- labelElement($$value);
9845
- }
9846
- });
10782
+ {
10783
+ $$ownership_validator.binding('labelElement', Label, labelElement);
10784
+
10785
+ Label($$anchor, {
10786
+ get required() {
10787
+ return required();
10788
+ },
10789
+ get disabled() {
10790
+ return get(expression);
10791
+ },
10792
+ get text() {
10793
+ return label();
10794
+ },
10795
+ get forId() {
10796
+ return get(expression_1);
10797
+ },
10798
+ get rootElement() {
10799
+ return labelElement();
10800
+ },
10801
+ set rootElement($$value) {
10802
+ labelElement($$value);
10803
+ }
10804
+ });
10805
+ }
9847
10806
  };
9848
10807
 
9849
10808
  if_block(node, ($$render) => {
@@ -9899,7 +10858,7 @@
9899
10858
  };
9900
10859
 
9901
10860
  if_block(node_4, ($$render) => {
9902
- if (maxlength() !== null) $$render(consequent_2);
10861
+ if (maxlength() && strict_equals(maxlength(), null, false)) $$render(consequent_2);
9903
10862
  });
9904
10863
  }
9905
10864
 
@@ -9907,40 +10866,44 @@
9907
10866
  const expression_2 = user_derived(() => invalidText() ? invalidText() : get(defaultInvalidText));
9908
10867
  const expression_3 = user_derived(() => label() ? label() : input()?.getAttribute("aria-label"));
9909
10868
 
9910
- FormError(node_6, {
9911
- get invalid() {
9912
- return invalid();
9913
- },
9914
- get invalidText() {
9915
- return get(expression_2);
9916
- },
9917
- get label() {
9918
- return get(expression_3);
9919
- },
9920
- extraClasses: ['qc-xs-mt'],
9921
- get id() {
9922
- return get(errorId);
9923
- },
9924
- set id($$value) {
9925
- set(errorId, $$value, true);
9926
- },
9927
- get rootElement() {
9928
- return formErrorElement();
9929
- },
9930
- set rootElement($$value) {
9931
- formErrorElement($$value);
9932
- }
9933
- });
9934
-
9935
- append($$anchor, fragment);
9936
- };
9937
-
9938
- const lang = Utils.getPageLanguage();
10869
+ {
10870
+ $$ownership_validator.binding('formErrorElement', FormError, formErrorElement);
9939
10871
 
9940
- let label = prop($$props, 'label', 7, ''),
9941
- required = prop($$props, 'required', 15, false),
9942
- description = prop($$props, 'description', 7),
9943
- size = prop($$props, 'size', 7),
10872
+ FormError(node_6, {
10873
+ get invalid() {
10874
+ return invalid();
10875
+ },
10876
+ get invalidText() {
10877
+ return get(expression_2);
10878
+ },
10879
+ get label() {
10880
+ return get(expression_3);
10881
+ },
10882
+ extraClasses: ['qc-xs-mt'],
10883
+ get id() {
10884
+ return get(errorId);
10885
+ },
10886
+ set id($$value) {
10887
+ set(errorId, $$value, true);
10888
+ },
10889
+ get rootElement() {
10890
+ return formErrorElement();
10891
+ },
10892
+ set rootElement($$value) {
10893
+ formErrorElement($$value);
10894
+ }
10895
+ });
10896
+ }
10897
+
10898
+ append($$anchor, fragment);
10899
+ });
10900
+
10901
+ const lang = Utils.getPageLanguage();
10902
+
10903
+ let label = prop($$props, 'label', 7, ''),
10904
+ required = prop($$props, 'required', 15, false),
10905
+ description = prop($$props, 'description', 7),
10906
+ size = prop($$props, 'size', 15),
9944
10907
  maxlength = prop($$props, 'maxlength', 7),
9945
10908
  maxlengthReached = prop($$props, 'maxlengthReached', 15, false),
9946
10909
  invalidAtSubmit = prop($$props, 'invalidAtSubmit', 15, false),
@@ -9963,7 +10926,7 @@
9963
10926
  textFieldRow = state(void 0),
9964
10927
  defaultInvalidText = user_derived(() => {
9965
10928
  if (!maxlengthReached()) return '';
9966
- return lang === 'fr' ? `La limite de caractères du champ ${label()} est dépassée.` : `The character limit for the ${label()} field has been exceeded.`;
10929
+ return strict_equals(lang, 'fr') ? `La limite de caractères du champ ${label()} est dépassée.` : `The character limit for the ${label()} field has been exceeded.`;
9967
10930
  });
9968
10931
 
9969
10932
  onMount(() => {
@@ -9976,6 +10939,12 @@
9976
10939
  onMountInput(input(), (textFieldRowParam) => set(textFieldRow, textFieldRowParam, true), (valueParam) => value(valueParam), (invalidParam) => invalid(invalidParam));
9977
10940
  });
9978
10941
 
10942
+ user_effect(() => {
10943
+ if (size()) return;
10944
+ if (!input()) return;
10945
+ size(strict_equals(input().tagName, 'INPUT') ? 'md' : 'lg');
10946
+ });
10947
+
9979
10948
  user_effect(() => {
9980
10949
  invalidAtSubmit(required() && !value() || maxlengthReached());
9981
10950
  });
@@ -10006,7 +10975,7 @@
10006
10975
 
10007
10976
  const s = over > 1 ? 's' : '';
10008
10977
 
10009
- set(charCountText, remaining >= 0 ? lang === 'fr' ? `${remaining} caractère${s} restant${s}` : `${remaining} character${s} remaining` : lang === 'fr' ? `${over} caractère${s} en trop` : `${over} character${s} over the limit`, true);
10978
+ set(charCountText, remaining >= 0 ? strict_equals(lang, 'fr') ? `${remaining} caractère${s} restant${s}` : `${remaining} character${s} remaining` : strict_equals(lang, 'fr') ? `${over} caractère${s} en trop` : `${over} character${s} over the limit`, true);
10010
10979
  });
10011
10980
 
10012
10981
  // Génération des ID pour le aria-describedby
@@ -10176,7 +11145,8 @@
10176
11145
  set children($$value) {
10177
11146
  children($$value);
10178
11147
  flushSync();
10179
- }
11148
+ },
11149
+ ...legacy_api()
10180
11150
  });
10181
11151
  }
10182
11152
 
@@ -10206,10 +11176,16 @@
10206
11176
  true
10207
11177
  );
10208
11178
 
10209
- var root$6 = template(`<!> <link rel="stylesheet">`, 1);
11179
+ TextFieldWC[FILENAME] = 'src/sdg/components/TextField/TextFieldWC.svelte';
11180
+
11181
+ var root$5 = add_locations(template(`<!> <link rel="stylesheet">`, 1), TextFieldWC[FILENAME], [[98, 0]]);
10210
11182
 
10211
11183
  function TextFieldWC($$anchor, $$props) {
11184
+ check_target(new.target);
10212
11185
  push($$props, true);
11186
+
11187
+ var $$ownership_validator = create_ownership_validator($$props);
11188
+
10213
11189
  setContext('webComponentMode', true);
10214
11190
 
10215
11191
  let invalid = prop($$props, 'invalid', 15, false),
@@ -10218,6 +11194,7 @@
10218
11194
  description = prop($$props, 'description', 7),
10219
11195
  required = prop($$props, 'required', 7),
10220
11196
  maxlength = prop($$props, 'maxlength', 7),
11197
+ size = prop($$props, 'size', 7),
10221
11198
  maxlengthReached = prop($$props, 'maxlengthReached', 15, false),
10222
11199
  invalidAtSubmit = prop($$props, 'invalidAtSubmit', 15, false);
10223
11200
 
@@ -10234,6 +11211,11 @@
10234
11211
  onMountInput(get(input), (textFieldRowParam) => set(textFieldRow, textFieldRowParam, true), (valueParam) => set(value, valueParam, true), (invalidParam) => invalid(invalidParam));
10235
11212
  });
10236
11213
 
11214
+ user_effect(() => {
11215
+ if (!size()) return;
11216
+ $$props.$$host.setAttribute('size', size());
11217
+ });
11218
+
10237
11219
  user_effect(() => {
10238
11220
  if (!get(input)) return;
10239
11221
 
@@ -10258,85 +11240,99 @@
10258
11240
  }
10259
11241
  });
10260
11242
 
10261
- var fragment = root$6();
11243
+ var fragment = root$5();
10262
11244
  var node = first_child(fragment);
10263
11245
 
10264
- TextField(node, {
10265
- get label() {
10266
- return label();
10267
- },
10268
- get description() {
10269
- return description();
10270
- },
10271
- get input() {
10272
- return get(input);
10273
- },
10274
- get required() {
10275
- return required();
10276
- },
10277
- get maxlength() {
10278
- return maxlength();
10279
- },
10280
- get value() {
10281
- return get(value);
10282
- },
10283
- get invalid() {
10284
- return invalid();
10285
- },
10286
- set invalid($$value) {
10287
- invalid($$value);
10288
- },
10289
- get invalidText() {
10290
- return invalidText();
10291
- },
10292
- set invalidText($$value) {
10293
- invalidText($$value);
10294
- },
10295
- get maxlengthReached() {
10296
- return maxlengthReached();
10297
- },
10298
- set maxlengthReached($$value) {
10299
- maxlengthReached($$value);
10300
- },
10301
- get invalidAtSubmit() {
10302
- return invalidAtSubmit();
10303
- },
10304
- set invalidAtSubmit($$value) {
10305
- invalidAtSubmit($$value);
10306
- },
10307
- get labelElement() {
10308
- return get(labelElement);
10309
- },
10310
- set labelElement($$value) {
10311
- set(labelElement, $$value, true);
10312
- },
10313
- get formErrorElement() {
10314
- return get(formErrorElement);
10315
- },
10316
- set formErrorElement($$value) {
10317
- set(formErrorElement, $$value, true);
10318
- },
10319
- get descriptionElement() {
10320
- return get(descriptionElement);
10321
- },
10322
- set descriptionElement($$value) {
10323
- set(descriptionElement, $$value, true);
10324
- },
10325
- get maxlengthElement() {
10326
- return get(maxlengthElement);
10327
- },
10328
- set maxlengthElement($$value) {
10329
- set(maxlengthElement, $$value, true);
10330
- },
10331
- children: ($$anchor, $$slotProps) => {
10332
- var fragment_1 = comment();
10333
- var node_1 = first_child(fragment_1);
11246
+ {
11247
+ $$ownership_validator.binding('size', TextField, size);
11248
+ $$ownership_validator.binding('invalid', TextField, invalid);
11249
+ $$ownership_validator.binding('invalidText', TextField, invalidText);
11250
+ $$ownership_validator.binding('maxlengthReached', TextField, maxlengthReached);
11251
+ $$ownership_validator.binding('invalidAtSubmit', TextField, invalidAtSubmit);
10334
11252
 
10335
- slot(node_1, $$props, 'default', {});
10336
- append($$anchor, fragment_1);
10337
- },
10338
- $$slots: { default: true }
10339
- });
11253
+ TextField(node, {
11254
+ get label() {
11255
+ return label();
11256
+ },
11257
+ get description() {
11258
+ return description();
11259
+ },
11260
+ get input() {
11261
+ return get(input);
11262
+ },
11263
+ get required() {
11264
+ return required();
11265
+ },
11266
+ get maxlength() {
11267
+ return maxlength();
11268
+ },
11269
+ get value() {
11270
+ return get(value);
11271
+ },
11272
+ get size() {
11273
+ return size();
11274
+ },
11275
+ set size($$value) {
11276
+ size($$value);
11277
+ },
11278
+ get invalid() {
11279
+ return invalid();
11280
+ },
11281
+ set invalid($$value) {
11282
+ invalid($$value);
11283
+ },
11284
+ get invalidText() {
11285
+ return invalidText();
11286
+ },
11287
+ set invalidText($$value) {
11288
+ invalidText($$value);
11289
+ },
11290
+ get maxlengthReached() {
11291
+ return maxlengthReached();
11292
+ },
11293
+ set maxlengthReached($$value) {
11294
+ maxlengthReached($$value);
11295
+ },
11296
+ get invalidAtSubmit() {
11297
+ return invalidAtSubmit();
11298
+ },
11299
+ set invalidAtSubmit($$value) {
11300
+ invalidAtSubmit($$value);
11301
+ },
11302
+ get labelElement() {
11303
+ return get(labelElement);
11304
+ },
11305
+ set labelElement($$value) {
11306
+ set(labelElement, $$value, true);
11307
+ },
11308
+ get formErrorElement() {
11309
+ return get(formErrorElement);
11310
+ },
11311
+ set formErrorElement($$value) {
11312
+ set(formErrorElement, $$value, true);
11313
+ },
11314
+ get descriptionElement() {
11315
+ return get(descriptionElement);
11316
+ },
11317
+ set descriptionElement($$value) {
11318
+ set(descriptionElement, $$value, true);
11319
+ },
11320
+ get maxlengthElement() {
11321
+ return get(maxlengthElement);
11322
+ },
11323
+ set maxlengthElement($$value) {
11324
+ set(maxlengthElement, $$value, true);
11325
+ },
11326
+ children: wrap_snippet(TextFieldWC, ($$anchor, $$slotProps) => {
11327
+ var fragment_1 = comment();
11328
+ var node_1 = first_child(fragment_1);
11329
+
11330
+ slot(node_1, $$props, 'default', {}, null);
11331
+ append($$anchor, fragment_1);
11332
+ }),
11333
+ $$slots: { default: true }
11334
+ });
11335
+ }
10340
11336
 
10341
11337
  var link = sibling(node, 2);
10342
11338
 
@@ -10386,6 +11382,13 @@
10386
11382
  maxlength($$value);
10387
11383
  flushSync();
10388
11384
  },
11385
+ get size() {
11386
+ return size();
11387
+ },
11388
+ set size($$value) {
11389
+ size($$value);
11390
+ flushSync();
11391
+ },
10389
11392
  get maxlengthReached() {
10390
11393
  return maxlengthReached();
10391
11394
  },
@@ -10399,7 +11402,8 @@
10399
11402
  set invalidAtSubmit($$value = false) {
10400
11403
  invalidAtSubmit($$value);
10401
11404
  flushSync();
10402
- }
11405
+ },
11406
+ ...legacy_api()
10403
11407
  });
10404
11408
  }
10405
11409
 
@@ -10416,350 +11420,27 @@
10416
11420
  reflect: true,
10417
11421
  type: 'Boolean'
10418
11422
  },
10419
- invalidText: { attribute: 'invalid-text', type: 'String' },
10420
- maxlengthReached: {},
10421
- invalidAtSubmit: {}
10422
- },
10423
- ['default'],
10424
- [],
10425
- true
10426
- ));
10427
-
10428
- var root$5 = template(`<button><!> <!></button>`);
10429
-
10430
- function Button($$anchor, $$props) {
10431
- push($$props, true);
10432
-
10433
- let variant = prop($$props, 'variant', 7, "primary"),
10434
- disabled = prop($$props, 'disabled', 7, false),
10435
- compact = prop($$props, 'compact', 7, false),
10436
- rounded = prop($$props, 'rounded', 7, false),
10437
- label = prop($$props, 'label', 7, ""),
10438
- icon = prop($$props, 'icon', 7, ""),
10439
- iconPosition = prop($$props, 'iconPosition', 7, "left"),
10440
- iconSrc = prop($$props, 'iconSrc', 7, ""),
10441
- rest = rest_props($$props, [
10442
- '$$slots',
10443
- '$$events',
10444
- '$$legacy',
10445
- '$$host',
10446
- 'variant',
10447
- 'disabled',
10448
- 'compact',
10449
- 'rounded',
10450
- 'label',
10451
- 'icon',
10452
- 'iconPosition',
10453
- 'iconSrc'
10454
- ]);
10455
-
10456
- let className = state(void 0);
10457
-
10458
- user_effect(() => {
10459
- set(
10460
- className,
10461
- [
10462
- "qc-button",
10463
- `qc-${variant()}`,
10464
- compact() && "qc-compact",
10465
- rounded() && "qc-button-rounded"
10466
- ].filter(Boolean).join(" "),
10467
- true
10468
- );
10469
- });
10470
-
10471
- var button = root$5();
10472
- let attributes;
10473
- var node = child(button);
10474
-
10475
- {
10476
- var consequent_2 = ($$anchor) => {
10477
- var fragment = comment();
10478
- var node_1 = first_child(fragment);
10479
-
10480
- {
10481
- var consequent = ($$anchor) => {
10482
- Icon($$anchor, {
10483
- get src() {
10484
- return iconSrc();
10485
- }
10486
- });
10487
- };
10488
-
10489
- var alternate = ($$anchor, $$elseif) => {
10490
- {
10491
- var consequent_1 = ($$anchor) => {
10492
- Icon($$anchor, {
10493
- get type() {
10494
- return icon();
10495
- }
10496
- });
10497
- };
10498
-
10499
- if_block(
10500
- $$anchor,
10501
- ($$render) => {
10502
- if (icon()) $$render(consequent_1);
10503
- },
10504
- $$elseif
10505
- );
10506
- }
10507
- };
10508
-
10509
- if_block(node_1, ($$render) => {
10510
- if (iconSrc()) $$render(consequent); else $$render(alternate, false);
10511
- });
10512
- }
10513
-
10514
- append($$anchor, fragment);
10515
- };
10516
-
10517
- if_block(node, ($$render) => {
10518
- if (iconPosition() === "left") $$render(consequent_2);
10519
- });
10520
- }
10521
-
10522
- var text = sibling(node);
10523
- var node_2 = sibling(text);
10524
-
10525
- {
10526
- var consequent_5 = ($$anchor) => {
10527
- var fragment_3 = comment();
10528
- var node_3 = first_child(fragment_3);
10529
-
10530
- {
10531
- var consequent_3 = ($$anchor) => {
10532
- Icon($$anchor, {
10533
- get src() {
10534
- return iconSrc();
10535
- }
10536
- });
10537
- };
10538
-
10539
- var alternate_1 = ($$anchor, $$elseif) => {
10540
- {
10541
- var consequent_4 = ($$anchor) => {
10542
- Icon($$anchor, {
10543
- get type() {
10544
- return icon();
10545
- }
10546
- });
10547
- };
10548
-
10549
- if_block(
10550
- $$anchor,
10551
- ($$render) => {
10552
- if (icon()) $$render(consequent_4);
10553
- },
10554
- $$elseif
10555
- );
10556
- }
10557
- };
10558
-
10559
- if_block(node_3, ($$render) => {
10560
- if (iconSrc()) $$render(consequent_3); else $$render(alternate_1, false);
10561
- });
10562
- }
10563
-
10564
- append($$anchor, fragment_3);
10565
- };
10566
-
10567
- if_block(node_2, ($$render) => {
10568
- if (icon() && iconPosition() === "right") $$render(consequent_5);
10569
- });
10570
- }
10571
-
10572
- reset(button);
10573
-
10574
- template_effect(() => {
10575
- attributes = set_attributes(button, attributes, {
10576
- class: get(className),
10577
- disabled: disabled(),
10578
- ...rest
10579
- });
10580
-
10581
- set_text(text, ` ${label() ?? ''} `);
10582
- });
10583
-
10584
- append($$anchor, button);
10585
-
10586
- return pop({
10587
- get variant() {
10588
- return variant();
10589
- },
10590
- set variant($$value = "primary") {
10591
- variant($$value);
10592
- flushSync();
10593
- },
10594
- get disabled() {
10595
- return disabled();
10596
- },
10597
- set disabled($$value = false) {
10598
- disabled($$value);
10599
- flushSync();
10600
- },
10601
- get compact() {
10602
- return compact();
10603
- },
10604
- set compact($$value = false) {
10605
- compact($$value);
10606
- flushSync();
10607
- },
10608
- get rounded() {
10609
- return rounded();
10610
- },
10611
- set rounded($$value = false) {
10612
- rounded($$value);
10613
- flushSync();
10614
- },
10615
- get label() {
10616
- return label();
10617
- },
10618
- set label($$value = "") {
10619
- label($$value);
10620
- flushSync();
10621
- },
10622
- get icon() {
10623
- return icon();
10624
- },
10625
- set icon($$value = "") {
10626
- icon($$value);
10627
- flushSync();
10628
- },
10629
- get iconPosition() {
10630
- return iconPosition();
10631
- },
10632
- set iconPosition($$value = "left") {
10633
- iconPosition($$value);
10634
- flushSync();
10635
- },
10636
- get iconSrc() {
10637
- return iconSrc();
10638
- },
10639
- set iconSrc($$value = "") {
10640
- iconSrc($$value);
10641
- flushSync();
10642
- }
10643
- });
10644
- }
10645
-
10646
- create_custom_element(
10647
- Button,
10648
- {
10649
- variant: {},
10650
- disabled: {},
10651
- compact: {},
10652
- rounded: {},
10653
- label: {},
10654
- icon: {},
10655
- iconPosition: {},
10656
- iconSrc: {}
10657
- },
10658
- [],
10659
- [],
10660
- true
10661
- );
10662
-
10663
- function ButtonWC($$anchor, $$props) {
10664
- push($$props, true);
10665
-
10666
- let variant = prop($$props, 'variant', 7, "primary"),
10667
- disabled = prop($$props, 'disabled', 7, false),
10668
- compact = prop($$props, 'compact', 7, false),
10669
- rounded = prop($$props, 'rounded', 7, false),
10670
- label = prop($$props, 'label', 7, ""),
10671
- rest = rest_props($$props, [
10672
- '$$slots',
10673
- '$$events',
10674
- '$$legacy',
10675
- '$$host',
10676
- 'variant',
10677
- 'disabled',
10678
- 'compact',
10679
- 'rounded',
10680
- 'label'
10681
- ]);
10682
-
10683
- Button($$anchor, spread_props(
10684
- {
10685
- get variant() {
10686
- return variant();
10687
- },
10688
- get disabled() {
10689
- return disabled();
10690
- },
10691
- get compact() {
10692
- return compact();
10693
- },
10694
- get rounded() {
10695
- return rounded();
10696
- },
10697
- get label() {
10698
- return label();
10699
- }
10700
- },
10701
- () => rest
10702
- ));
10703
-
10704
- return pop({
10705
- get variant() {
10706
- return variant();
10707
- },
10708
- set variant($$value = "primary") {
10709
- variant($$value);
10710
- flushSync();
10711
- },
10712
- get disabled() {
10713
- return disabled();
10714
- },
10715
- set disabled($$value = false) {
10716
- disabled($$value);
10717
- flushSync();
10718
- },
10719
- get compact() {
10720
- return compact();
10721
- },
10722
- set compact($$value = false) {
10723
- compact($$value);
10724
- flushSync();
10725
- },
10726
- get rounded() {
10727
- return rounded();
10728
- },
10729
- set rounded($$value = false) {
10730
- rounded($$value);
10731
- flushSync();
10732
- },
10733
- get label() {
10734
- return label();
10735
- },
10736
- set label($$value = "") {
10737
- label($$value);
10738
- flushSync();
10739
- }
10740
- });
10741
- }
10742
-
10743
- customElements.define('qc-button', create_custom_element(
10744
- ButtonWC,
10745
- {
10746
- variant: { attribute: 'variant', type: 'String' },
10747
- disabled: { attribute: 'disabled', type: 'Boolean' },
10748
- compact: { attribute: 'compact', type: 'Boolean' },
10749
- rounded: { attribute: 'rounded', type: 'Boolean' },
10750
- label: { attribute: 'label', type: 'String' },
10751
- icon: { attribute: 'icon', type: 'String' },
10752
- iconPosition: { attribute: 'icon-position', type: 'String' },
10753
- iconSrc: { attribute: 'icon-src', type: 'String' }
11423
+ invalidText: { attribute: 'invalid-text', type: 'String' },
11424
+ maxlengthReached: {},
11425
+ invalidAtSubmit: {}
10754
11426
  },
11427
+ ['default'],
10755
11428
  [],
10756
- [],
10757
- false
11429
+ true
10758
11430
  ));
10759
11431
 
10760
- var root$4 = template(`<label><input type="checkbox" role="switch"> <span><!></span> <span class="qc-switch-slider"></span></label>`);
11432
+ ToggleSwitch[FILENAME] = 'src/sdg/components/ToggleSwitch/ToggleSwitch.svelte';
11433
+
11434
+ var root$4 = add_locations(template(`<label><input type="checkbox" role="switch"> <span><!></span> <span class="qc-switch-slider"></span></label>`), ToggleSwitch[FILENAME], [
11435
+ [
11436
+ 17,
11437
+ 0,
11438
+ [[20, 4], [28, 4], [33, 4]]
11439
+ ]
11440
+ ]);
10761
11441
 
10762
11442
  function ToggleSwitch($$anchor, $$props) {
11443
+ check_target(new.target);
10763
11444
  push($$props, true);
10764
11445
 
10765
11446
  let label = prop($$props, 'label', 7),
@@ -10770,7 +11451,7 @@
10770
11451
  textAlign = prop($$props, 'textAlign', 7);
10771
11452
 
10772
11453
  const usedId = "toggle-switch-" + (id() ? id() : Math.random().toString(36));
10773
- let usedLabelTextAlignment = textAlign()?.toLowerCase() === "end" ? "end" : "start";
11454
+ let usedLabelTextAlignment = strict_equals(textAlign()?.toLowerCase(), "end") ? "end" : "start";
10774
11455
  var label_1 = root$4();
10775
11456
 
10776
11457
  set_attribute(label_1, 'for', usedId);
@@ -10784,7 +11465,7 @@
10784
11465
 
10785
11466
  set_class(span, 1, clsx([
10786
11467
  "qc-switch-label",
10787
- usedLabelTextAlignment === "end" && "qc-switch-label-end"
11468
+ strict_equals(usedLabelTextAlignment, "end") && "qc-switch-label-end"
10788
11469
  ]));
10789
11470
 
10790
11471
  var node = child(span);
@@ -10848,7 +11529,8 @@
10848
11529
  set textAlign($$value) {
10849
11530
  textAlign($$value);
10850
11531
  flushSync();
10851
- }
11532
+ },
11533
+ ...legacy_api()
10852
11534
  });
10853
11535
  }
10854
11536
 
@@ -10867,27 +11549,34 @@
10867
11549
  true
10868
11550
  );
10869
11551
 
11552
+ ToggleSwitchWC[FILENAME] = 'src/sdg/components/ToggleSwitch/ToggleSwitchWC.svelte';
11553
+
10870
11554
  function ToggleSwitchWC($$anchor, $$props) {
11555
+ check_target(new.target);
10871
11556
  push($$props, true);
10872
11557
 
11558
+ var $$ownership_validator = create_ownership_validator($$props);
11559
+
10873
11560
  let id = prop($$props, 'id', 7),
10874
11561
  label = prop($$props, 'label', 7),
10875
11562
  checked = prop($$props, 'checked', 15, false),
10876
11563
  disabled = prop($$props, 'disabled', 7, false),
10877
11564
  justified = prop($$props, 'justified', 7, false),
10878
11565
  textAlign = prop($$props, 'textAlign', 7),
10879
- rest = rest_props($$props, [
10880
- '$$slots',
10881
- '$$events',
10882
- '$$legacy',
10883
- '$$host',
10884
- 'id',
10885
- 'label',
10886
- 'checked',
10887
- 'disabled',
10888
- 'justified',
10889
- 'textAlign'
10890
- ]);
11566
+ rest = rest_props(
11567
+ $$props,
11568
+ [
11569
+ '$$slots',
11570
+ '$$events',
11571
+ '$$legacy',
11572
+ '$$host',
11573
+ 'id',
11574
+ 'label',
11575
+ 'checked',
11576
+ 'disabled',
11577
+ 'justified',
11578
+ 'textAlign'
11579
+ ]);
10891
11580
 
10892
11581
  let parent = state(void 0);
10893
11582
  let index;
@@ -10925,31 +11614,35 @@
10925
11614
 
10926
11615
  {
10927
11616
  var consequent = ($$anchor) => {
10928
- ToggleSwitch($$anchor, spread_props(
10929
- {
10930
- get label() {
10931
- return label();
10932
- },
10933
- get disabled() {
10934
- return disabled();
10935
- },
10936
- get justified() {
10937
- return justified();
10938
- },
10939
- get textAlign() {
10940
- return textAlign();
10941
- }
10942
- },
10943
- () => rest,
10944
- {
10945
- get checked() {
10946
- return checked();
11617
+ {
11618
+ $$ownership_validator.binding('checked', ToggleSwitch, checked);
11619
+
11620
+ ToggleSwitch($$anchor, spread_props(
11621
+ {
11622
+ get label() {
11623
+ return label();
11624
+ },
11625
+ get disabled() {
11626
+ return disabled();
11627
+ },
11628
+ get justified() {
11629
+ return justified();
11630
+ },
11631
+ get textAlign() {
11632
+ return textAlign();
11633
+ }
10947
11634
  },
10948
- set checked($$value) {
10949
- checked($$value);
11635
+ () => rest,
11636
+ {
11637
+ get checked() {
11638
+ return checked();
11639
+ },
11640
+ set checked($$value) {
11641
+ checked($$value);
11642
+ }
10950
11643
  }
10951
- }
10952
- ));
11644
+ ));
11645
+ }
10953
11646
  };
10954
11647
 
10955
11648
  if_block(node, ($$render) => {
@@ -11001,7 +11694,8 @@
11001
11694
  set textAlign($$value) {
11002
11695
  textAlign($$value);
11003
11696
  flushSync();
11004
- }
11697
+ },
11698
+ ...legacy_api()
11005
11699
  });
11006
11700
  }
11007
11701
 
@@ -11032,7 +11726,10 @@
11032
11726
  false
11033
11727
  ));
11034
11728
 
11729
+ ToggleSwitchGroupWC[FILENAME] = 'src/sdg/components/ChoiceGroup/ToggleSwitchGroupWC.svelte';
11730
+
11035
11731
  function ToggleSwitchGroupWC($$anchor, $$props) {
11732
+ check_target(new.target);
11036
11733
  push($$props, true);
11037
11734
 
11038
11735
  let disabled = prop($$props, 'disabled', 15, false),
@@ -11040,17 +11737,19 @@
11040
11737
  justified = prop($$props, 'justified', 7, false),
11041
11738
  textAlign = prop($$props, 'textAlign', 7),
11042
11739
  maxWidth = prop($$props, 'maxWidth', 7, "fit-content"),
11043
- rest = rest_props($$props, [
11044
- '$$slots',
11045
- '$$events',
11046
- '$$legacy',
11047
- '$$host',
11048
- 'disabled',
11049
- 'items',
11050
- 'justified',
11051
- 'textAlign',
11052
- 'maxWidth'
11053
- ]);
11740
+ rest = rest_props(
11741
+ $$props,
11742
+ [
11743
+ '$$slots',
11744
+ '$$events',
11745
+ '$$legacy',
11746
+ '$$host',
11747
+ 'disabled',
11748
+ 'items',
11749
+ 'justified',
11750
+ 'textAlign',
11751
+ 'maxWidth'
11752
+ ]);
11054
11753
 
11055
11754
  let usedWidth = user_derived(() => {
11056
11755
  if (maxWidth().match(/^\d+px$/) || maxWidth().match(/^\d*\.?\d*rem$/) || maxWidth().match(/^\d*\.?\d*em$/) || maxWidth().match(/^\d*\.?\d*%$/)) {
@@ -11069,11 +11768,13 @@
11069
11768
  },
11070
11769
  () => rest,
11071
11770
  {
11072
- children: ($$anchor, $$slotProps) => {
11771
+ children: wrap_snippet(ToggleSwitchGroupWC, ($$anchor, $$slotProps) => {
11073
11772
  var fragment_1 = comment();
11074
11773
  var node = first_child(fragment_1);
11075
11774
 
11076
11775
  each(node, 17, items, index, ($$anchor, item, $$index) => {
11776
+ validate_binding('bind:checked={item.checked}', () => get(item), () => 'checked', 49, 12);
11777
+
11077
11778
  const expression = user_derived(() => get(item).disabled ?? disabled());
11078
11779
  const expression_1 = user_derived(() => justified() ?? get(item).justified);
11079
11780
  const expression_2 = user_derived(() => textAlign() ?? get(item).textAlign);
@@ -11104,7 +11805,7 @@
11104
11805
  });
11105
11806
 
11106
11807
  append($$anchor, fragment_1);
11107
- },
11808
+ }),
11108
11809
  $$slots: { default: true }
11109
11810
  }
11110
11811
  ));
@@ -11144,7 +11845,8 @@
11144
11845
  set maxWidth($$value = "fit-content") {
11145
11846
  maxWidth($$value);
11146
11847
  flushSync();
11147
- }
11848
+ },
11849
+ ...legacy_api()
11148
11850
  });
11149
11851
  }
11150
11852
 
@@ -11163,12 +11865,15 @@
11163
11865
  false
11164
11866
  ));
11165
11867
 
11868
+ DropdownListItemsSingle[FILENAME] = 'src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/DropdownListItemsSingle.svelte';
11869
+
11166
11870
  var on_click$1 = (event, handleMouseUp, item) => handleMouseUp(event, get(item));
11167
- var root_3$1 = template(`<span class="qc-sr-only"><!></span>`);
11168
- var root_2$3 = template(`<li tabindex="0" role="option"><!></li>`);
11169
- var root_1$2 = template(`<ul></ul>`);
11871
+ var root_3$1 = add_locations(template(`<span class="qc-sr-only"><!></span>`), DropdownListItemsSingle[FILENAME], [[129, 20]]);
11872
+ var root_2$3 = add_locations(template(`<li tabindex="0" role="option"><!></li>`), DropdownListItemsSingle[FILENAME], [[113, 12]]);
11873
+ var root_1$2 = add_locations(template(`<ul></ul>`), DropdownListItemsSingle[FILENAME], [[111, 4]]);
11170
11874
 
11171
11875
  function DropdownListItemsSingle($$anchor, $$props) {
11876
+ check_target(new.target);
11172
11877
  push($$props, true);
11173
11878
 
11174
11879
  const selectedElementCLass = "qc-dropdown-list-single-selected";
@@ -11197,7 +11902,7 @@
11197
11902
 
11198
11903
  function focusOnFirstMatchingElement(passedValue) {
11199
11904
  if (get(displayedItemsElements) && get(displayedItemsElements).length > 0) {
11200
- const foundElement = get(displayedItemsElements).find((el) => el.dataset.itemValue.toString() === passedValue.toString());
11905
+ const foundElement = get(displayedItemsElements).find((el) => strict_equals(el.dataset.itemValue.toString(), passedValue.toString()));
11201
11906
 
11202
11907
  if (foundElement) {
11203
11908
  foundElement.focus();
@@ -11209,8 +11914,8 @@
11209
11914
  event.preventDefault();
11210
11915
 
11211
11916
  if (!item.disabled) {
11212
- items().forEach((item) => item.checked = false);
11213
- items().find((option) => option.value === item.value).checked = true;
11917
+ items().forEach((item) => assign(item, 'checked', false, 'src/​sdg/​components/​DropdownList/​DropdownListItems/​DropdownListItemsSingle/​DropdownListItemsSingle.svelte:45:34'));
11918
+ items().find((option) => strict_equals(option.value, item.value)).checked = true;
11214
11919
  selectionCallback()();
11215
11920
  }
11216
11921
  }
@@ -11220,7 +11925,7 @@
11220
11925
  }
11221
11926
 
11222
11927
  function handleComboKey(event, index, item) {
11223
- if (event.key === "ArrowDown") {
11928
+ if (strict_equals(event.key, "ArrowDown")) {
11224
11929
  event.preventDefault();
11225
11930
  event.stopPropagation();
11226
11931
 
@@ -11229,7 +11934,7 @@
11229
11934
  }
11230
11935
  }
11231
11936
 
11232
- if (event.key === "ArrowUp") {
11937
+ if (strict_equals(event.key, "ArrowUp")) {
11233
11938
  event.preventDefault();
11234
11939
  event.stopPropagation();
11235
11940
 
@@ -11240,7 +11945,7 @@
11240
11945
  }
11241
11946
  }
11242
11947
 
11243
- if (event.key === "Enter" || event.key === " ") {
11948
+ if (strict_equals(event.key, "Enter") || strict_equals(event.key, " ")) {
11244
11949
  handleSelection(event, item);
11245
11950
  }
11246
11951
 
@@ -11260,7 +11965,7 @@
11260
11965
  }
11261
11966
 
11262
11967
  function canExit(event, index) {
11263
- return event.key === "Escape" || !event.shiftKey && event.key === "Tab" && index === displayedItems().length - 1;
11968
+ return strict_equals(event.key, "Escape") || !event.shiftKey && strict_equals(event.key, "Tab") && strict_equals(index, displayedItems().length - 1);
11264
11969
  }
11265
11970
 
11266
11971
  function itemsHaveIds() {
@@ -11282,6 +11987,8 @@
11282
11987
  var consequent_1 = ($$anchor) => {
11283
11988
  var ul = root_1$2();
11284
11989
 
11990
+ validate_each_keys(displayedItems, (item) => item.id);
11991
+
11285
11992
  each(ul, 23, displayedItems, (item) => item.id, ($$anchor, item, index) => {
11286
11993
  var li = root_2$3();
11287
11994
 
@@ -11314,6 +12021,7 @@
11314
12021
  }
11315
12022
 
11316
12023
  reset(li);
12024
+ validate_binding('bind:this={displayedItemsElements[index]}', () => get(displayedItemsElements), () => get(index));
11317
12025
  bind_this(li, ($$value, index) => get(displayedItemsElements)[index] = $$value, (index) => get(displayedItemsElements)?.[index], () => [get(index)]);
11318
12026
 
11319
12027
  template_effect(() => {
@@ -11344,9 +12052,15 @@
11344
12052
  append($$anchor, fragment);
11345
12053
 
11346
12054
  return pop({
11347
- focusOnFirstElement,
11348
- focusOnLastElement,
11349
- focusOnFirstMatchingElement,
12055
+ get focusOnFirstElement() {
12056
+ return focusOnFirstElement;
12057
+ },
12058
+ get focusOnLastElement() {
12059
+ return focusOnLastElement;
12060
+ },
12061
+ get focusOnFirstMatchingElement() {
12062
+ return focusOnFirstMatchingElement;
12063
+ },
11350
12064
  get items() {
11351
12065
  return items();
11352
12066
  },
@@ -11395,7 +12109,8 @@
11395
12109
  set handlePrintableCharacter($$value = () => {}) {
11396
12110
  handlePrintableCharacter($$value);
11397
12111
  flushSync();
11398
- }
12112
+ },
12113
+ ...legacy_api()
11399
12114
  });
11400
12115
  }
11401
12116
 
@@ -11421,17 +12136,32 @@
11421
12136
  true
11422
12137
  );
11423
12138
 
12139
+ DropdownListItemsMultiple[FILENAME] = 'src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/DropdownListItemsMultiple.svelte';
12140
+
11424
12141
  function handleChange(_, selectionCallback) {
11425
12142
  selectionCallback()();
11426
12143
  }
11427
12144
 
11428
12145
  var on_click = (e, handleLiClick, item) => handleLiClick(e, get(item));
11429
- var root_2$2 = template(`<li><label class="qc-choicefield-label" compact=""><input type="checkbox" class="qc-choicefield qc-compact"> <span> </span></label></li>`);
11430
- var root_1$1 = template(`<ul></ul>`);
12146
+
12147
+ var root_2$2 = add_locations(template(`<li><label class="qc-choicefield-label" compact=""><input type="checkbox" class="qc-choicefield qc-compact"> <span> </span></label></li>`), DropdownListItemsMultiple[FILENAME], [
12148
+ [
12149
+ 153,
12150
+ 12,
12151
+ [
12152
+ [163, 16, [[168, 20], [180, 20]]]
12153
+ ]
12154
+ ]
12155
+ ]);
12156
+
12157
+ var root_1$1 = add_locations(template(`<ul></ul>`), DropdownListItemsMultiple[FILENAME], [[147, 4]]);
11431
12158
 
11432
12159
  function DropdownListItemsMultiple($$anchor, $$props) {
12160
+ check_target(new.target);
11433
12161
  push($$props, true);
11434
12162
 
12163
+ var $$ownership_validator = create_ownership_validator($$props);
12164
+
11435
12165
  let displayedItems = prop($$props, 'displayedItems', 7),
11436
12166
  handleExit = prop($$props, 'handleExit', 7, () => {}),
11437
12167
  selectionCallback = prop($$props, 'selectionCallback', 7, () => {}),
@@ -11476,7 +12206,7 @@
11476
12206
  }
11477
12207
 
11478
12208
  function handleComboKey(event, index) {
11479
- if (event.key === "ArrowDown") {
12209
+ if (strict_equals(event.key, "ArrowDown")) {
11480
12210
  event.preventDefault();
11481
12211
  event.stopPropagation();
11482
12212
 
@@ -11489,7 +12219,7 @@
11489
12219
  }
11490
12220
  }
11491
12221
 
11492
- if (event.key === "ArrowUp") {
12222
+ if (strict_equals(event.key, "ArrowUp")) {
11493
12223
  event.preventDefault();
11494
12224
  event.stopPropagation();
11495
12225
 
@@ -11504,13 +12234,13 @@
11504
12234
  }
11505
12235
  }
11506
12236
 
11507
- if (event.key === "Enter") {
12237
+ if (strict_equals(event.key, "Enter")) {
11508
12238
  event.preventDefault();
11509
12239
  event.stopPropagation();
11510
12240
 
11511
12241
  if (displayedItems().length > 0 && !displayedItems()[index].disabled) {
11512
12242
  event.target.checked = !event.target.checked;
11513
- displayedItems()[index].checked = event.target.checked;
12243
+ $$ownership_validator.mutation('displayedItems', ['displayedItems', index, 'checked'], displayedItems()[index].checked = event.target.checked, 86, 16);
11514
12244
  }
11515
12245
  }
11516
12246
 
@@ -11530,10 +12260,10 @@
11530
12260
  }
11531
12261
 
11532
12262
  function handleLiKeyDown(event, index) {
11533
- if (event.target.tagName !== "INPUT") {
12263
+ if (strict_equals(event.target.tagName, "INPUT", false)) {
11534
12264
  handleKeyDown(event, index);
11535
12265
 
11536
- if (event.key !== "Tab") {
12266
+ if (strict_equals(event.key, "Tab", false)) {
11537
12267
  event.preventDefault();
11538
12268
  event.stopPropagation();
11539
12269
  }
@@ -11541,7 +12271,7 @@
11541
12271
  }
11542
12272
 
11543
12273
  function handleLiClick(event, item) {
11544
- if (event.target.tagName !== "INPUT") {
12274
+ if (strict_equals(event.target.tagName, "INPUT", false)) {
11545
12275
  event.preventDefault();
11546
12276
  event.stopPropagation();
11547
12277
 
@@ -11552,7 +12282,7 @@
11552
12282
  }
11553
12283
 
11554
12284
  function canExit(event, index) {
11555
- return event.key === "Escape" || !event.shiftKey && event.key === "Tab" && index === displayedItems().length - 1;
12285
+ return strict_equals(event.key, "Escape") || !event.shiftKey && strict_equals(event.key, "Tab") && strict_equals(index, displayedItems().length - 1);
11556
12286
  }
11557
12287
 
11558
12288
  function itemsHaveIds() {
@@ -11574,6 +12304,8 @@
11574
12304
  var consequent = ($$anchor) => {
11575
12305
  var ul = root_1$1();
11576
12306
 
12307
+ validate_each_keys(displayedItems, (item) => item.id);
12308
+
11577
12309
  each(ul, 23, displayedItems, (item) => item.id, ($$anchor, item, index) => {
11578
12310
  var li = root_2$2();
11579
12311
 
@@ -11590,6 +12322,8 @@
11590
12322
  set_attribute(input, 'name', name);
11591
12323
  input.__change = [handleChange, selectionCallback];
11592
12324
  input.__keydown = (e) => handleKeyDown(e, get(index));
12325
+ validate_binding('bind:checked={item.checked}', () => get(item), () => 'checked');
12326
+ validate_binding('bind:this={displayedItemsElements[index]}', () => get(displayedItemsElements), () => get(index));
11593
12327
  bind_this(input, ($$value, index) => get(displayedItemsElements)[index] = $$value, (index) => get(displayedItemsElements)?.[index], () => [get(index)]);
11594
12328
 
11595
12329
  var span = sibling(input, 2);
@@ -11633,9 +12367,15 @@
11633
12367
  append($$anchor, fragment);
11634
12368
 
11635
12369
  return pop({
11636
- focusOnFirstElement,
11637
- focusOnLastElement,
11638
- focusOnFirstMatchingElement,
12370
+ get focusOnFirstElement() {
12371
+ return focusOnFirstElement;
12372
+ },
12373
+ get focusOnLastElement() {
12374
+ return focusOnLastElement;
12375
+ },
12376
+ get focusOnFirstMatchingElement() {
12377
+ return focusOnFirstMatchingElement;
12378
+ },
11639
12379
  get displayedItems() {
11640
12380
  return displayedItems();
11641
12381
  },
@@ -11670,7 +12410,8 @@
11670
12410
  set handlePrintableCharacter($$value = () => {}) {
11671
12411
  handlePrintableCharacter($$value);
11672
12412
  flushSync();
11673
- }
12413
+ },
12414
+ ...legacy_api()
11674
12415
  });
11675
12416
  }
11676
12417
 
@@ -11694,10 +12435,13 @@
11694
12435
  true
11695
12436
  );
11696
12437
 
11697
- var root_4 = template(`<span class="qc-dropdown-list-no-options"><!></span>`);
11698
- var root$3 = template(`<div class="qc-dropdown-list-items" tabindex="-1"><!> <div class="qc-dropdown-list-no-options-container" role="status"><!></div></div>`);
12438
+ DropdownListItems[FILENAME] = 'src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte';
12439
+
12440
+ var root_4 = add_locations(template(`<span class="qc-dropdown-list-no-options"><!></span>`), DropdownListItems[FILENAME], [[100, 16]]);
12441
+ var root$3 = add_locations(template(`<div class="qc-dropdown-list-items" tabindex="-1"><!> <div class="qc-dropdown-list-no-options-container" role="status"><!></div></div>`), DropdownListItems[FILENAME], [[62, 0, [[97, 4]]]]);
11699
12442
 
11700
12443
  function DropdownListItems($$anchor, $$props) {
12444
+ check_target(new.target);
11701
12445
  push($$props, true);
11702
12446
 
11703
12447
  let id = prop($$props, 'id', 7),
@@ -11714,9 +12458,6 @@
11714
12458
  handlePrintableCharacter = prop($$props, 'handlePrintableCharacter', 7, () => {}),
11715
12459
  placeholder = prop($$props, 'placeholder', 7);
11716
12460
 
11717
- const precentRootFontSize = 62.5,
11718
- remRatio = 0.16;
11719
-
11720
12461
  let itemsComponent = state(void 0);
11721
12462
 
11722
12463
  let usedHeight = user_derived(() => {
@@ -11856,15 +12597,21 @@
11856
12597
 
11857
12598
  template_effect(() => {
11858
12599
  set_attribute(div, 'id', id());
11859
- set_style(div, `--dropdown-items-height: ${get(usedHeight) / (remRatio * precentRootFontSize)}rem;`);
12600
+ set_style(div, `--dropdown-items-height: ${get(usedHeight) ?? ''};`);
11860
12601
  });
11861
12602
 
11862
12603
  append($$anchor, div);
11863
12604
 
11864
12605
  return pop({
11865
- focus,
11866
- focusOnLastElement,
11867
- focusOnFirstMatchingElement,
12606
+ get focus() {
12607
+ return focus;
12608
+ },
12609
+ get focusOnLastElement() {
12610
+ return focusOnLastElement;
12611
+ },
12612
+ get focusOnFirstMatchingElement() {
12613
+ return focusOnFirstMatchingElement;
12614
+ },
11868
12615
  get id() {
11869
12616
  return id();
11870
12617
  },
@@ -11955,7 +12702,8 @@
11955
12702
  set placeholder($$value) {
11956
12703
  placeholder($$value);
11957
12704
  flushSync();
11958
- }
12705
+ },
12706
+ ...legacy_api()
11959
12707
  });
11960
12708
  }
11961
12709
 
@@ -11985,11 +12733,14 @@
11985
12733
  true
11986
12734
  );
11987
12735
 
11988
- var root_1 = template(`<span class="qc-dropdown-choice"><!></span>`);
11989
- var root_2$1 = template(`<span class="qc-dropdown-placeholder"><!></span>`);
11990
- var root$2 = template(`<button><!> <span><!></span></button>`);
12736
+ DropdownListButton[FILENAME] = 'src/sdg/components/DropdownList/DropdownListButton/DropdownListButton.svelte';
12737
+
12738
+ var root_1 = add_locations(template(`<span class="qc-dropdown-choice"><!></span>`), DropdownListButton[FILENAME], [[29, 8]]);
12739
+ var root_2$1 = add_locations(template(`<span class="qc-dropdown-placeholder"><!></span>`), DropdownListButton[FILENAME], [[31, 8]]);
12740
+ var root$2 = add_locations(template(`<button><!> <span><!></span></button>`), DropdownListButton[FILENAME], [[19, 0, [[34, 4]]]]);
11991
12741
 
11992
12742
  function DropdownListButton($$anchor, $$props) {
12743
+ check_target(new.target);
11993
12744
  push($$props, true);
11994
12745
 
11995
12746
  let inputId = prop($$props, 'inputId', 7),
@@ -11997,17 +12748,19 @@
11997
12748
  disabled = prop($$props, 'disabled', 7),
11998
12749
  selectedOptionsText = prop($$props, 'selectedOptionsText', 7, ""),
11999
12750
  placeholder = prop($$props, 'placeholder', 7),
12000
- rest = rest_props($$props, [
12001
- '$$slots',
12002
- '$$events',
12003
- '$$legacy',
12004
- '$$host',
12005
- 'inputId',
12006
- 'expanded',
12007
- 'disabled',
12008
- 'selectedOptionsText',
12009
- 'placeholder'
12010
- ]);
12751
+ rest = rest_props(
12752
+ $$props,
12753
+ [
12754
+ '$$slots',
12755
+ '$$events',
12756
+ '$$legacy',
12757
+ '$$host',
12758
+ 'inputId',
12759
+ 'expanded',
12760
+ 'disabled',
12761
+ 'selectedOptionsText',
12762
+ 'placeholder'
12763
+ ]);
12011
12764
 
12012
12765
  let button;
12013
12766
 
@@ -12078,7 +12831,9 @@
12078
12831
  append($$anchor, button_1);
12079
12832
 
12080
12833
  return pop({
12081
- focus,
12834
+ get focus() {
12835
+ return focus;
12836
+ },
12082
12837
  get inputId() {
12083
12838
  return inputId();
12084
12839
  },
@@ -12113,7 +12868,8 @@
12113
12868
  set placeholder($$value) {
12114
12869
  placeholder($$value);
12115
12870
  flushSync();
12116
- }
12871
+ },
12872
+ ...legacy_api()
12117
12873
  });
12118
12874
  }
12119
12875
 
@@ -12131,13 +12887,36 @@
12131
12887
  true
12132
12888
  );
12133
12889
 
12134
- var root_2 = template(`<div class="qc-dropdown-list-search"><!></div>`);
12135
- var root_3 = template(`<span> </span>`);
12136
- var root$1 = template(`<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>`);
12890
+ DropdownList[FILENAME] = 'src/sdg/components/DropdownList/DropdownList.svelte';
12891
+
12892
+ var root_2 = add_locations(template(`<div class="qc-dropdown-list-search"><!></div>`), DropdownList[FILENAME], [[334, 20]]);
12893
+ var root_3 = add_locations(template(`<span> </span>`), DropdownList[FILENAME], [[376, 24]]);
12894
+
12895
+ var root$1 = add_locations(template(`<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], [
12896
+ [
12897
+ 273,
12898
+ 0,
12899
+ [
12900
+ [
12901
+ 278,
12902
+ 4,
12903
+ [
12904
+ [
12905
+ 297,
12906
+ 8,
12907
+ [[325, 12, [[374, 16]]]]
12908
+ ]
12909
+ ]
12910
+ ]
12911
+ ]
12912
+ ]
12913
+ ]);
12137
12914
 
12138
12915
  function DropdownList($$anchor, $$props) {
12916
+ check_target(new.target);
12139
12917
  push($$props, true);
12140
12918
 
12919
+ var $$ownership_validator = create_ownership_validator($$props);
12141
12920
  const lang = Utils.getPageLanguage();
12142
12921
 
12143
12922
  let id = prop($$props, 'id', 23, () => Math.random().toString(36).substring(2, 15)),
@@ -12147,7 +12926,7 @@
12147
12926
  items = prop($$props, 'items', 23, () => []),
12148
12927
  value = prop($$props, 'value', 31, () => proxy([])),
12149
12928
  placeholder = prop($$props, 'placeholder', 7),
12150
- noOptionsMessage = prop($$props, 'noOptionsMessage', 7, lang === "fr" ? "Aucun élément" : "No item"),
12929
+ noOptionsMessage = prop($$props, 'noOptionsMessage', 23, () => strict_equals(lang, "fr") ? "Aucun élément" : "No item"),
12151
12930
  enableSearch = prop($$props, 'enableSearch', 7, false),
12152
12931
  required = prop($$props, 'required', 7, false),
12153
12932
  disabled = prop($$props, 'disabled', 7, false),
@@ -12157,10 +12936,9 @@
12157
12936
  multiple = prop($$props, 'multiple', 7, false),
12158
12937
  rootElement = prop($$props, 'rootElement', 15),
12159
12938
  errorElement = prop($$props, 'errorElement', 15),
12160
- webComponentMode = prop($$props, 'webComponentMode', 7, false),
12161
- webComponentParentRow = prop($$props, 'webComponentParentRow', 7);
12939
+ webComponentMode = prop($$props, 'webComponentMode', 7, false);
12162
12940
 
12163
- const defaultPlaceholder = lang === "fr" ? "Faire une sélection" : "Select an option",
12941
+ const defaultPlaceholder = strict_equals(lang, "fr") ? "Faire une sélection" : "Select an option",
12164
12942
  inputId = `${id()}-input`,
12165
12943
  popupId = `${id()}-popup`,
12166
12944
  itemsId = `${id()}-items`,
@@ -12176,7 +12954,7 @@
12176
12954
  selectedItems = user_derived(() => items().filter((item) => item.checked) ?? []),
12177
12955
  selectedOptionsText = user_derived(() => {
12178
12956
  if (get(selectedItems).length >= 3) {
12179
- if (lang === "fr") {
12957
+ if (strict_equals(lang, "fr")) {
12180
12958
  return `${get(selectedItems).length} options sélectionnées`;
12181
12959
  }
12182
12960
 
@@ -12207,19 +12985,19 @@
12207
12985
  };
12208
12986
  })),
12209
12987
  widthClass = user_derived(() => {
12210
- const keyword = webComponentMode() ? "container" : "root";
12988
+ webComponentMode() ? "container" : "root";
12211
12989
 
12212
12990
  if (availableWidths.includes(width())) {
12213
- return `qc-dropdown-list-${keyword}-${width()}`;
12991
+ return `qc-dropdown-list-${width()}`;
12214
12992
  }
12215
12993
 
12216
- return `qc-dropdown-list-${keyword}-md`;
12994
+ return `qc-dropdown-list-md`;
12217
12995
  }),
12218
12996
  srItemsCountText = user_derived(() => {
12219
12997
  const s = get(displayedItems).length > 1 ? "s" : "";
12220
12998
 
12221
12999
  if (get(displayedItems).length > 0) {
12222
- return lang === "fr" ? `${get(displayedItems).length} résultat${s} disponible${s}. Utilisez les flèches directionnelles haut et bas pour vous déplacer dans la liste.` : `${get(displayedItems).length} result${s} available. Use up and down arrow keys to navigate through the list.`;
13000
+ return strict_equals(lang, "fr") ? `${get(displayedItems).length} résultat${s} disponible${s}. Utilisez les flèches directionnelles haut et bas pour vous déplacer dans la liste.` : `${get(displayedItems).length} result${s} available. Use up and down arrow keys to navigate through the list.`;
12223
13001
  }
12224
13002
 
12225
13003
  return "";
@@ -12250,27 +13028,27 @@
12250
13028
  // Le changement de focus a lieu après le lancement de l'événement clavier.
12251
13029
  // Il faut donc faire un court sleep pour avoir le nouvel élément en focus.
12252
13030
  Utils.sleep(5).then(() => {
12253
- if (event.key === "Tab" && !Utils.componentIsActive(get(instance))) {
13031
+ if (strict_equals(event.key, "Tab") && !Utils.componentIsActive(get(instance))) {
12254
13032
  set(expanded, false);
12255
13033
  }
12256
13034
  }).catch(console.error);
12257
13035
  }
12258
13036
 
12259
13037
  function handleEscape(event) {
12260
- if (event.key === "Escape") {
13038
+ if (strict_equals(event.key, "Escape")) {
12261
13039
  set(expanded, false);
12262
13040
  }
12263
13041
  }
12264
13042
 
12265
13043
  function handleArrowUp(event, targetComponent) {
12266
- if (event.key === "ArrowUp" && targetComponent) {
13044
+ if (strict_equals(event.key, "ArrowUp") && targetComponent) {
12267
13045
  event.preventDefault();
12268
13046
  targetComponent.focus();
12269
13047
  }
12270
13048
  }
12271
13049
 
12272
13050
  function handleArrowDown(event, targetComponent) {
12273
- if (event.key === "ArrowDown" && targetComponent) {
13051
+ if (strict_equals(event.key, "ArrowDown") && targetComponent) {
12274
13052
  event.preventDefault();
12275
13053
  set(expanded, true);
12276
13054
  targetComponent.focus();
@@ -12281,7 +13059,7 @@
12281
13059
  handleEscape(event);
12282
13060
  handleTab(event);
12283
13061
 
12284
- if (event.key === "ArrowDown") {
13062
+ if (strict_equals(event.key, "ArrowDown")) {
12285
13063
  event.preventDefault();
12286
13064
 
12287
13065
  if (get(expanded)) {
@@ -12292,7 +13070,7 @@
12292
13070
  }
12293
13071
  }
12294
13072
 
12295
- if (event.key === "ArrowUp") {
13073
+ if (strict_equals(event.key, "ArrowUp")) {
12296
13074
  event.preventDefault();
12297
13075
 
12298
13076
  if (get(expanded)) {
@@ -12325,7 +13103,7 @@
12325
13103
  set(expanded, false);
12326
13104
  set(hiddenSearchText, "");
12327
13105
 
12328
- if (key === "Escape" && get(button)) {
13106
+ if (strict_equals(key, "Escape") && get(button)) {
12329
13107
  get(button).focus();
12330
13108
  }
12331
13109
  }
@@ -12347,7 +13125,7 @@
12347
13125
  });
12348
13126
 
12349
13127
  user_effect(() => {
12350
- if (get(previousValue)?.toString() !== value()?.toString()) {
13128
+ if (strict_equals(get(previousValue)?.toString(), value()?.toString(), false)) {
12351
13129
  invalid(false);
12352
13130
  }
12353
13131
  });
@@ -12362,7 +13140,7 @@
12362
13140
  user_effect(() => {
12363
13141
  const tempValue = get(selectedItems)?.map((item) => item.value);
12364
13142
 
12365
- if (tempValue?.toString() !== "") {
13143
+ if (strict_equals(tempValue?.toString(), "", false)) {
12366
13144
  value(tempValue);
12367
13145
  } else {
12368
13146
  value([]);
@@ -12389,11 +13167,11 @@
12389
13167
  const optionWithEmptyValue = findOptionWithEmptyValue();
12390
13168
 
12391
13169
  if (!optionWithEmptyValue) return;
12392
- placeholder(optionWithEmptyValue.label !== "" ? optionWithEmptyValue.label : defaultPlaceholder);
13170
+ placeholder(strict_equals(optionWithEmptyValue.label, "", false) ? optionWithEmptyValue.label : defaultPlaceholder);
12393
13171
  });
12394
13172
 
12395
13173
  function findOptionWithEmptyValue() {
12396
- return items()?.find((item) => item.value === "" || item.value === null || item.value === undefined);
13174
+ return items()?.find((item) => strict_equals(item.value, "") || strict_equals(item.value, null) || strict_equals(item.value, undefined));
12397
13175
  }
12398
13176
 
12399
13177
  var div = root$1();
@@ -12402,6 +13180,9 @@
12402
13180
  event('keydown', $document.body, handleTab);
12403
13181
 
12404
13182
  var div_1 = child(div);
13183
+
13184
+ set_class(div_1, 1, clsx(["qc-dropdown-list-container"]));
13185
+
12405
13186
  var node = child(div_1);
12406
13187
 
12407
13188
  {
@@ -12498,7 +13279,7 @@
12498
13279
  handleArrowDown(e, get(dropdownItems));
12499
13280
  handleArrowUp(e, get(button));
12500
13281
 
12501
- if (e.key === "Enter") {
13282
+ if (strict_equals(e.key, "Enter")) {
12502
13283
  e.preventDefault();
12503
13284
  }
12504
13285
  },
@@ -12524,45 +13305,49 @@
12524
13305
 
12525
13306
  var node_4 = sibling(node_2, 2);
12526
13307
 
12527
- bind_this(
12528
- DropdownListItems(node_4, {
12529
- id: itemsId,
12530
- get enableSearch() {
12531
- return enableSearch();
12532
- },
12533
- get placeholder() {
12534
- return placeholder();
12535
- },
12536
- get multiple() {
12537
- return multiple();
12538
- },
12539
- get items() {
12540
- return items();
12541
- },
12542
- get displayedItems() {
12543
- return get(displayedItems);
12544
- },
12545
- get noOptionsMessage() {
12546
- return noOptionsMessage();
12547
- },
12548
- selectionCallbackSingle: () => {
12549
- closeDropdown("");
12550
- get(button)?.focus();
12551
- },
12552
- handleExitSingle: (key) => closeDropdown(key),
12553
- handleExitMultiple: (key) => closeDropdown(key),
12554
- focusOnOuterElement: () => enableSearch() ? get(searchInput)?.focus() : get(button)?.focus(),
12555
- handlePrintableCharacter,
12556
- get value() {
12557
- return value();
12558
- },
12559
- set value($$value) {
12560
- value($$value);
12561
- }
12562
- }),
12563
- ($$value) => set(dropdownItems, $$value, true),
12564
- () => get(dropdownItems)
12565
- );
13308
+ {
13309
+ $$ownership_validator.binding('value', DropdownListItems, value);
13310
+
13311
+ bind_this(
13312
+ DropdownListItems(node_4, {
13313
+ id: itemsId,
13314
+ get enableSearch() {
13315
+ return enableSearch();
13316
+ },
13317
+ get placeholder() {
13318
+ return placeholder();
13319
+ },
13320
+ get multiple() {
13321
+ return multiple();
13322
+ },
13323
+ get items() {
13324
+ return items();
13325
+ },
13326
+ get displayedItems() {
13327
+ return get(displayedItems);
13328
+ },
13329
+ get noOptionsMessage() {
13330
+ return noOptionsMessage();
13331
+ },
13332
+ selectionCallbackSingle: () => {
13333
+ closeDropdown("");
13334
+ get(button)?.focus();
13335
+ },
13336
+ handleExitSingle: (key) => closeDropdown(key),
13337
+ handleExitMultiple: (key) => closeDropdown(key),
13338
+ focusOnOuterElement: () => enableSearch() ? get(searchInput)?.focus() : get(button)?.focus(),
13339
+ handlePrintableCharacter,
13340
+ get value() {
13341
+ return value();
13342
+ },
13343
+ set value($$value) {
13344
+ value($$value);
13345
+ }
13346
+ }),
13347
+ ($$value) => set(dropdownItems, $$value, true),
13348
+ () => get(dropdownItems)
13349
+ );
13350
+ }
12566
13351
 
12567
13352
  var div_5 = sibling(node_4, 2);
12568
13353
  var node_5 = child(div_5);
@@ -12585,43 +13370,41 @@
12585
13370
  var node_6 = sibling(div_1, 2);
12586
13371
  const expression_1 = user_derived(() => label() ?? ariaLabel());
12587
13372
 
12588
- FormError(node_6, {
12589
- id: errorId,
12590
- get invalid() {
12591
- return invalid();
12592
- },
12593
- get invalidText() {
12594
- return invalidText();
12595
- },
12596
- extraClasses: ["qc-xs-mt"],
12597
- get label() {
12598
- return get(expression_1);
12599
- },
12600
- get rootElement() {
12601
- return errorElement();
12602
- },
12603
- set rootElement($$value) {
12604
- errorElement($$value);
12605
- }
12606
- });
13373
+ {
13374
+ $$ownership_validator.binding('errorElement', FormError, errorElement);
13375
+
13376
+ FormError(node_6, {
13377
+ id: errorId,
13378
+ get invalid() {
13379
+ return invalid();
13380
+ },
13381
+ get invalidText() {
13382
+ return invalidText();
13383
+ },
13384
+ extraClasses: ["qc-xs-mt"],
13385
+ get label() {
13386
+ return get(expression_1);
13387
+ },
13388
+ get rootElement() {
13389
+ return errorElement();
13390
+ },
13391
+ set rootElement($$value) {
13392
+ errorElement($$value);
13393
+ }
13394
+ });
13395
+ }
12607
13396
 
12608
13397
  reset(div);
12609
13398
  bind_this(div, ($$value) => rootElement($$value), () => rootElement());
12610
13399
 
12611
13400
  template_effect(() => {
12612
13401
  set_class(div, 1, clsx([
12613
- "qc-dropdown-list-root",
12614
- !webComponentMode() && get(widthClass),
12615
- !(get(parentRow) || webComponentParentRow()) && "qc-dropdown-list-margin"
12616
- ]));
12617
-
12618
- set_class(div_1, 1, clsx([
12619
- "qc-dropdown-list-container",
12620
- webComponentMode() && get(widthClass)
13402
+ !get(parentRow) && !webComponentMode() && "qc-select"
12621
13403
  ]));
12622
13404
 
12623
13405
  set_class(div_2, 1, clsx([
12624
13406
  `qc-dropdown-list`,
13407
+ get(widthClass),
12625
13408
  invalid() && "qc-dropdown-list-invalid"
12626
13409
  ]));
12627
13410
 
@@ -12761,13 +13544,7 @@
12761
13544
  webComponentMode($$value);
12762
13545
  flushSync();
12763
13546
  },
12764
- get webComponentParentRow() {
12765
- return webComponentParentRow();
12766
- },
12767
- set webComponentParentRow($$value) {
12768
- webComponentParentRow($$value);
12769
- flushSync();
12770
- }
13547
+ ...legacy_api()
12771
13548
  });
12772
13549
  }
12773
13550
 
@@ -12791,19 +13568,23 @@
12791
13568
  multiple: {},
12792
13569
  rootElement: {},
12793
13570
  errorElement: {},
12794
- webComponentMode: {},
12795
- webComponentParentRow: {}
13571
+ webComponentMode: {}
12796
13572
  },
12797
13573
  [],
12798
13574
  [],
12799
13575
  true
12800
13576
  );
12801
13577
 
12802
- var root = template(`<div hidden><!></div> <!> <link rel="stylesheet">`, 1);
13578
+ SelectWC[FILENAME] = 'src/sdg/components/DropdownList/SelectWC.svelte';
13579
+
13580
+ var root = add_locations(template(`<div hidden><!></div> <!> <link rel="stylesheet">`, 1), SelectWC[FILENAME], [[119, 0], [139, 0]]);
12803
13581
 
12804
13582
  function SelectWC($$anchor, $$props) {
13583
+ check_target(new.target);
12805
13584
  push($$props, true);
12806
13585
 
13586
+ var $$ownership_validator = create_ownership_validator($$props);
13587
+
12807
13588
  let invalid = prop($$props, 'invalid', 15, false),
12808
13589
  value = prop($$props, 'value', 31, () => proxy([])),
12809
13590
  multiple = prop($$props, 'multiple', 7),
@@ -12812,37 +13593,39 @@
12812
13593
  label = prop($$props, 'label', 7),
12813
13594
  placeholder = prop($$props, 'placeholder', 7),
12814
13595
  width = prop($$props, 'width', 7),
12815
- rest = rest_props($$props, [
12816
- '$$slots',
12817
- '$$events',
12818
- '$$legacy',
12819
- '$$host',
12820
- 'invalid',
12821
- 'value',
12822
- 'multiple',
12823
- 'disabled',
12824
- 'required',
12825
- 'label',
12826
- 'placeholder',
12827
- 'width'
12828
- ]);
12829
-
12830
- const availableWidths = ["xs", "sm", "md", "lg", "xl"];
13596
+ rest = rest_props(
13597
+ $$props,
13598
+ [
13599
+ '$$slots',
13600
+ '$$events',
13601
+ '$$legacy',
13602
+ '$$host',
13603
+ 'invalid',
13604
+ 'value',
13605
+ 'multiple',
13606
+ 'disabled',
13607
+ 'required',
13608
+ 'label',
13609
+ 'placeholder',
13610
+ 'width'
13611
+ ]);
13612
+
12831
13613
  let selectElement = state(void 0);
12832
13614
  let items = state(void 0);
12833
13615
  let labelElement = state(void 0);
12834
- let observer;
13616
+ let observer = new MutationObserver(setupItemsList);
13617
+
13618
+ let observerOptions = {
13619
+ childList: true,
13620
+ attributes: true,
13621
+ subtree: true,
13622
+ attributeFilter: ["label", "value", "disabled", "selected"]
13623
+ };
13624
+
12835
13625
  let instance = state(void 0);
12836
13626
  let errorElement = state(void 0);
12837
13627
  let parentRow = user_derived(() => $$props.$$host.closest(".qc-formfield-row"));
12838
-
12839
- let widthClass = user_derived(() => {
12840
- if (availableWidths.includes(width())) {
12841
- return `qc-dropdown-list-root-${width()}`;
12842
- }
12843
-
12844
- return `qc-dropdown-list-root-md`;
12845
- });
13628
+ let internalChange = false;
12846
13629
 
12847
13630
  onMount(() => {
12848
13631
  set(selectElement, $$props.$$host.querySelector("select"), true);
@@ -12855,40 +13638,46 @@
12855
13638
  if (get(selectElement)) {
12856
13639
  multiple(get(selectElement).multiple);
12857
13640
  disabled(get(selectElement).disabled);
13641
+ get(selectElement).addEventListener("change", handleSelectChange);
13642
+ observer.observe(get(selectElement), observerOptions);
12858
13643
  }
12859
13644
 
12860
13645
  setupItemsList();
12861
- setupObserver();
13646
+ $$props.$$host.classList.add("qc-select");
12862
13647
  });
12863
13648
 
12864
13649
  onDestroy(() => {
12865
13650
  observer?.disconnect();
13651
+ get(selectElement).removeEventListener("change", handleSelectChange);
12866
13652
  });
12867
13653
 
12868
13654
  user_effect(() => {
12869
- if (get(selectElement) && get(selectElement).options && get(selectElement).options.length > 0 && value() && value().length > 0) {
12870
- for (const option of get(selectElement).options) {
12871
- if (value().includes(option.value)) {
12872
- option.setAttribute('selected', '');
12873
- option.selected = true;
12874
- } else {
12875
- option.removeAttribute('selected');
12876
- option.selected = false;
12877
- }
13655
+ if (!get(selectElement)) return;
13656
+ if (!get(selectElement).options) return;
13657
+ internalChange = true;
13658
+
13659
+ let newOptionSelected = false;
13660
+
13661
+ for (const option of get(selectElement).options) {
13662
+ const selected = value().includes(option.value);
13663
+
13664
+ if (strict_equals(selected, option.selected, false)) {
13665
+ option.toggleAttribute("selected", selected);
13666
+ option.selected = selected;
13667
+ newOptionSelected = true;
12878
13668
  }
12879
13669
  }
12880
- });
12881
13670
 
12882
- user_effect(() => {
12883
- if (get(parentRow) && get(errorElement)) {
12884
- get(parentRow).appendChild(get(errorElement));
13671
+ if (newOptionSelected) {
13672
+ get(selectElement).dispatchEvent(new Event('change'));
12885
13673
  }
13674
+
13675
+ tick().then(() => internalChange = false);
12886
13676
  });
12887
13677
 
12888
13678
  user_effect(() => {
12889
- if (get(widthClass)) {
12890
- $$props.$$host.classList.add("qc-dropdown-list-root");
12891
- $$props.$$host.classList.add(get(widthClass));
13679
+ if (get(parentRow) && get(errorElement)) {
13680
+ get(parentRow).appendChild(get(errorElement));
12892
13681
  }
12893
13682
  });
12894
13683
 
@@ -12911,20 +13700,9 @@
12911
13700
  }
12912
13701
  }
12913
13702
 
12914
- function setupObserver() {
12915
- if (get(selectElement)) {
12916
- if (observer) {
12917
- return;
12918
- }
12919
-
12920
- observer = new MutationObserver(setupItemsList);
12921
-
12922
- observer.observe(get(selectElement), {
12923
- childList: true,
12924
- attributes: true,
12925
- attributeFilter: ["label", "value", "disabled", "selected"]
12926
- });
12927
- }
13703
+ function handleSelectChange() {
13704
+ if (internalChange) return;
13705
+ setupItemsList();
12928
13706
  }
12929
13707
 
12930
13708
  var fragment = root();
@@ -12937,65 +13715,67 @@
12937
13715
  var node_1 = sibling(div, 2);
12938
13716
  const expression = user_derived(() => get(selectElement)?.getAttribute("aria-label"));
12939
13717
 
12940
- DropdownList(node_1, spread_props(
12941
- {
12942
- get label() {
12943
- return label();
12944
- },
12945
- get ariaLabel() {
12946
- return get(expression);
12947
- },
12948
- get items() {
12949
- return get(items);
12950
- },
12951
- get placeholder() {
12952
- return placeholder();
12953
- },
12954
- get width() {
12955
- return width();
12956
- },
12957
- webComponentMode: true,
12958
- get webComponentParentRow() {
12959
- return get(parentRow);
12960
- },
12961
- get multiple() {
12962
- return multiple();
12963
- },
12964
- get disabled() {
12965
- return disabled();
12966
- },
12967
- get required() {
12968
- return required();
12969
- }
12970
- },
12971
- () => rest,
12972
- {
12973
- get value() {
12974
- return value();
12975
- },
12976
- set value($$value) {
12977
- value($$value);
12978
- },
12979
- get errorElement() {
12980
- return get(errorElement);
12981
- },
12982
- set errorElement($$value) {
12983
- set(errorElement, $$value, true);
12984
- },
12985
- get invalid() {
12986
- return invalid();
12987
- },
12988
- set invalid($$value) {
12989
- invalid($$value);
12990
- },
12991
- get rootElement() {
12992
- return get(instance);
13718
+ {
13719
+ $$ownership_validator.binding('value', DropdownList, value);
13720
+ $$ownership_validator.binding('invalid', DropdownList, invalid);
13721
+
13722
+ DropdownList(node_1, spread_props(
13723
+ {
13724
+ get label() {
13725
+ return label();
13726
+ },
13727
+ get ariaLabel() {
13728
+ return get(expression);
13729
+ },
13730
+ get items() {
13731
+ return get(items);
13732
+ },
13733
+ get placeholder() {
13734
+ return placeholder();
13735
+ },
13736
+ get width() {
13737
+ return width();
13738
+ },
13739
+ webComponentMode: true,
13740
+ get multiple() {
13741
+ return multiple();
13742
+ },
13743
+ get disabled() {
13744
+ return disabled();
13745
+ },
13746
+ get required() {
13747
+ return required();
13748
+ }
12993
13749
  },
12994
- set rootElement($$value) {
12995
- set(instance, $$value, true);
13750
+ () => rest,
13751
+ {
13752
+ get value() {
13753
+ return value();
13754
+ },
13755
+ set value($$value) {
13756
+ value($$value);
13757
+ },
13758
+ get errorElement() {
13759
+ return get(errorElement);
13760
+ },
13761
+ set errorElement($$value) {
13762
+ set(errorElement, $$value, true);
13763
+ },
13764
+ get invalid() {
13765
+ return invalid();
13766
+ },
13767
+ set invalid($$value) {
13768
+ invalid($$value);
13769
+ },
13770
+ get rootElement() {
13771
+ return get(instance);
13772
+ },
13773
+ set rootElement($$value) {
13774
+ set(instance, $$value, true);
13775
+ }
12996
13776
  }
12997
- }
12998
- ));
13777
+ ));
13778
+ }
12999
13779
 
13000
13780
  var link = sibling(node_1, 2);
13001
13781
 
@@ -13058,7 +13838,8 @@
13058
13838
  set width($$value) {
13059
13839
  width($$value);
13060
13840
  flushSync();
13061
- }
13841
+ },
13842
+ ...legacy_api()
13062
13843
  });
13063
13844
  }
13064
13845