@ds-autonomie/web-components 1.5.0 → 1.6.0

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 (119) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/chunks/{chunk.AO3M5GSN.js → chunk.2SUJL5O6.js} +1 -1
  3. package/dist/chunks/{chunk.ZU3MRZA4.js → chunk.5YABZV2L.js} +1 -1
  4. package/dist/chunks/{chunk.XV2S7PIY.js → chunk.6DSM44NV.js} +1 -1
  5. package/dist/chunks/{chunk.5ND4OP7Q.js → chunk.6SWOU4CL.js} +1 -1
  6. package/dist/chunks/{chunk.OVCI74KS.js → chunk.6Y5VNWAK.js} +7 -7
  7. package/dist/chunks/{chunk.E7NM6WTF.js → chunk.7F5X7SQN.js} +1 -1
  8. package/dist/chunks/chunk.ATDDIVPX.js +87 -0
  9. package/dist/chunks/{chunk.5DKPV25M.js → chunk.B5NS5VQR.js} +1 -1
  10. package/dist/chunks/{chunk.HCQNPYQZ.js → chunk.CBFLGIED.js} +1 -1
  11. package/dist/chunks/{chunk.OIS5HMFT.js → chunk.CHM74JXS.js} +21 -2
  12. package/dist/chunks/{chunk.RVUFDCSS.js → chunk.CICCL52W.js} +1 -1
  13. package/dist/chunks/{chunk.7BYKP4SA.js → chunk.CKDL37GT.js} +2 -0
  14. package/dist/chunks/{chunk.TUZ72ZDQ.js → chunk.CSQ2UP6E.js} +4 -4
  15. package/dist/chunks/{chunk.WF42CVOM.js → chunk.DDLGH65N.js} +4 -4
  16. package/dist/chunks/{chunk.DXP3BNWO.js → chunk.DUJFQEVS.js} +1 -1
  17. package/dist/chunks/chunk.EVHNFCQF.js +121 -0
  18. package/dist/chunks/{chunk.FSXPFNBX.js → chunk.FFFHQKNB.js} +1 -1
  19. package/dist/chunks/{chunk.LC54322H.js → chunk.FYTGBKGY.js} +8 -4
  20. package/dist/chunks/{chunk.YZHYOXYA.js → chunk.HCI6BR7B.js} +24 -69
  21. package/dist/chunks/{chunk.P7QMP76I.js → chunk.HDSA2CY2.js} +1 -1
  22. package/dist/chunks/{chunk.BNJQHJKO.js → chunk.KFZV2L7L.js} +1 -1
  23. package/dist/chunks/{chunk.CWD6PMVD.js → chunk.KGPFHLUW.js} +1 -1
  24. package/dist/chunks/chunk.KUXAIXES.js +69 -0
  25. package/dist/chunks/{chunk.VRU3XH45.js → chunk.M3FN3PFT.js} +1 -1
  26. package/dist/chunks/{chunk.SCNCYZ35.js → chunk.M7UZ33WG.js} +1 -1
  27. package/dist/chunks/{chunk.IH3JU5S6.js → chunk.NMOENRSD.js} +1 -1
  28. package/dist/chunks/{chunk.ZI2RZQPZ.js → chunk.NQSQUH4H.js} +4 -4
  29. package/dist/chunks/{chunk.7J7CS3BK.js → chunk.O2PIWM25.js} +1 -1
  30. package/dist/chunks/chunk.Q62BRBYD.js +68 -0
  31. package/dist/chunks/{chunk.I33L3NO6.js → chunk.RB6TMBWW.js} +5 -0
  32. package/dist/chunks/{chunk.D2QVNPSR.js → chunk.RJBMUBMI.js} +4 -4
  33. package/dist/chunks/{chunk.T4H7RAXS.js → chunk.RV652CSU.js} +4 -4
  34. package/dist/chunks/{chunk.5QKVQDMN.js → chunk.RXBDBWWT.js} +12 -1
  35. package/dist/chunks/{chunk.PCT24AYO.js → chunk.VLRL3RJT.js} +1 -1
  36. package/dist/chunks/chunk.WI3DWLXW.js +99 -0
  37. package/dist/chunks/{chunk.BGNHUCCD.js → chunk.WK3IHF2A.js} +1 -1
  38. package/dist/chunks/{chunk.INCMVGXU.js → chunk.WLJH2IWB.js} +1 -1
  39. package/dist/chunks/chunk.X3FXKNLH.js +92 -0
  40. package/dist/chunks/{chunk.4XH7INOL.js → chunk.XQZX6LVO.js} +1 -1
  41. package/dist/chunks/{chunk.BHLKMLHB.js → chunk.YS2LUMKB.js} +33 -23
  42. package/dist/chunks/{chunk.N5ZXUW7H.js → chunk.Z7QPOCQO.js} +1 -1
  43. package/dist/chunks/{chunk.DX25IW4S.js → chunk.ZC74GTBL.js} +4 -0
  44. package/dist/components/accordion/accordion.d.ts +3 -1
  45. package/dist/components/accordion/accordion.js +7 -7
  46. package/dist/components/accordion/accordion.styles.js +1 -1
  47. package/dist/components/alert/alert.js +6 -6
  48. package/dist/components/avatar/avatar.js +5 -5
  49. package/dist/components/breadcrumb/breadcrumb.js +6 -6
  50. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  51. package/dist/components/button/button.js +7 -7
  52. package/dist/components/checkbox/checkbox.js +4 -4
  53. package/dist/components/checkbox-button/checkbox-button.js +4 -4
  54. package/dist/components/combobox/combobox.d.ts +8 -15
  55. package/dist/components/combobox/combobox.js +8 -9
  56. package/dist/components/dialog/dialog.js +7 -7
  57. package/dist/components/download-card/download-card.d.ts +35 -0
  58. package/dist/components/download-card/download-card.js +19 -0
  59. package/dist/components/download-card/download-card.styles.d.ts +2 -0
  60. package/dist/components/download-card/download-card.styles.js +7 -0
  61. package/dist/components/download-link/download-link.d.ts +36 -0
  62. package/dist/components/download-link/download-link.js +19 -0
  63. package/dist/components/download-link/download-link.styles.d.ts +2 -0
  64. package/dist/components/download-link/download-link.styles.js +7 -0
  65. package/dist/components/drawer/drawer.js +7 -7
  66. package/dist/components/dropdown/dropdown.js +2 -2
  67. package/dist/components/error-message-panel/error-message-panel.d.ts +23 -0
  68. package/dist/components/error-message-panel/error-message-panel.js +11 -0
  69. package/dist/components/error-message-panel/error-message-panel.styles.d.ts +2 -0
  70. package/dist/components/error-message-panel/error-message-panel.styles.js +7 -0
  71. package/dist/components/format-bytes/format-bytes.js +2 -2
  72. package/dist/components/format-date/format-date.js +2 -2
  73. package/dist/components/format-number/format-number.js +2 -2
  74. package/dist/components/icon/icon.js +4 -4
  75. package/dist/components/icon/library.js +2 -2
  76. package/dist/components/icon/library.system.js +1 -1
  77. package/dist/components/icon-button/icon-button.js +4 -4
  78. package/dist/components/input/input.js +7 -7
  79. package/dist/components/input-mask/input-mask.js +2 -2
  80. package/dist/components/input-phone/input-phone.js +13 -13
  81. package/dist/components/menu-item/menu-item.js +4 -4
  82. package/dist/components/option/option.js +6 -6
  83. package/dist/components/progress-bar/progress-bar.js +2 -2
  84. package/dist/components/radio/radio.js +4 -4
  85. package/dist/components/relative-time/relative-time.js +2 -2
  86. package/dist/components/select/select.js +7 -7
  87. package/dist/components/skip-link-item/skip-link-item.d.ts +5 -0
  88. package/dist/components/skip-link-item/skip-link-item.js +1 -1
  89. package/dist/components/skip-links/skip-links.d.ts +1 -0
  90. package/dist/components/skip-links/skip-links.js +2 -2
  91. package/dist/components/skip-links/skip-links.styles.js +1 -1
  92. package/dist/components/spinner/spinner.js +2 -2
  93. package/dist/components/step/step.js +7 -7
  94. package/dist/components/tab/tab.js +2 -2
  95. package/dist/components/tab-group/tab-group.js +2 -2
  96. package/dist/components/tag/tag.js +6 -6
  97. package/dist/components/tooltip/tooltip.js +2 -2
  98. package/dist/components/tree/tree.js +9 -9
  99. package/dist/components/tree-item/tree-item.js +7 -7
  100. package/dist/custom-elements.json +475 -60
  101. package/dist/design-system.d.ts +3 -0
  102. package/dist/design-system.js +92 -78
  103. package/dist/themes/dsa-wc-theme.css +127 -18
  104. package/dist/themes/dsa-wc-theme.min.css +1 -1
  105. package/dist/themes/dsa-wc-theme.styles.js +134 -18
  106. package/dist/translations/en-gb.js +1 -1
  107. package/dist/translations/en.js +1 -1
  108. package/dist/translations/fr.js +1 -1
  109. package/dist/utilities/icon-library.js +2 -2
  110. package/dist/utilities/localize.d.ts +1 -0
  111. package/dist/utilities/localize.js +1 -1
  112. package/dist/utilities/storybook.d.ts +1 -0
  113. package/dist/utilities/storybook.js +23 -0
  114. package/dist/vscode.html-custom-data.json +109 -3
  115. package/dist/web-types.json +272 -28
  116. package/package.json +2 -2
  117. package/dist/chunks/chunk.HRBNFVC5.js +0 -16
  118. package/dist/utilities/debounce.d.ts +0 -1
  119. package/dist/utilities/debounce.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ds-autonomie/web-components
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c16827: `error-message-panel`: implémentation du panneau de message d'erreur utilisable lorsqu'une page n'existe pas
8
+ - e86df51: `download-link`, `download-card` : implémentation des composants download-link et download-card
9
+ - 8f5529f: `combobox` : utilisation de l'évenement dsa-input pour la recherche asynchrone
10
+
11
+ ### Patch Changes
12
+
13
+ - cc3eb57: `skip-links`: correction d'un bug d'affichage des skip-link-item
14
+ - 88054cd: `accordion` : ajout de la possibilité d'avoir un aria-level sur l'en-tête
15
+ - Updated dependencies [e86df51]
16
+ - @ds-autonomie/assets@1.2.0
17
+
3
18
  ## 1.5.0
4
19
 
5
20
  ### Minor Changes
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.NHRDZGLI.js";
4
4
  import {
5
5
  DSAIcon
6
- } from "./chunk.VRU3XH45.js";
6
+ } from "./chunk.M3FN3PFT.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.6IH66JBY.js";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk.DXQY7NLW.js";
11
11
  import {
12
12
  LocalizeController
13
- } from "./chunk.7BYKP4SA.js";
13
+ } from "./chunk.CKDL37GT.js";
14
14
  import {
15
15
  watch
16
16
  } from "./chunk.6IH66JBY.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk.V7RJROLH.js";
13
13
  import {
14
14
  LocalizeController
15
- } from "./chunk.7BYKP4SA.js";
15
+ } from "./chunk.CKDL37GT.js";
16
16
  import {
17
17
  watch
18
18
  } from "./chunk.6IH66JBY.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk.V7RJROLH.js";
12
12
  import {
13
13
  LocalizeController
14
- } from "./chunk.7BYKP4SA.js";
14
+ } from "./chunk.CKDL37GT.js";
15
15
  import {
16
16
  watch
17
17
  } from "./chunk.6IH66JBY.js";
@@ -1,12 +1,6 @@
1
1
  import {
2
2
  DSASelect
3
- } from "./chunk.INCMVGXU.js";
4
- import {
5
- PhoneConfig
6
- } from "./chunk.UCJGKOXX.js";
7
- import {
8
- input_phone_styles_default
9
- } from "./chunk.ZR7AGQFC.js";
3
+ } from "./chunk.WLJH2IWB.js";
10
4
  import {
11
5
  frenchFlag,
12
6
  frenchNumberPrefix,
@@ -18,6 +12,12 @@ import {
18
12
  rawValueToMaskedValue,
19
13
  stripSpecialChars
20
14
  } from "./chunk.7OLEA3GQ.js";
15
+ import {
16
+ PhoneConfig
17
+ } from "./chunk.UCJGKOXX.js";
18
+ import {
19
+ input_phone_styles_default
20
+ } from "./chunk.ZR7AGQFC.js";
21
21
  import {
22
22
  defaultValue
23
23
  } from "./chunk.CMJ2SRTL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LocalizeController
3
- } from "./chunk.7BYKP4SA.js";
3
+ } from "./chunk.CKDL37GT.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -0,0 +1,87 @@
1
+ import {
2
+ error_message_panel_styles_default
3
+ } from "./chunk.KUXAIXES.js";
4
+ import {
5
+ HasSlotController
6
+ } from "./chunk.YIY5RM53.js";
7
+ import {
8
+ LocalizeController
9
+ } from "./chunk.CKDL37GT.js";
10
+ import {
11
+ ShoelaceElement
12
+ } from "./chunk.YCXTCVAZ.js";
13
+ import {
14
+ __decorateClass
15
+ } from "./chunk.6M63UXML.js";
16
+
17
+ // src/components/error-message-panel/error-message-panel.ts
18
+ import { html } from "lit";
19
+ import { customElement, property } from "lit/decorators.js";
20
+ import { classMap } from "lit/directives/class-map.js";
21
+ var DSAErrorMessagePanel = class extends ShoelaceElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.localize = new LocalizeController(this);
25
+ this.hasSlotController = new HasSlotController(
26
+ this,
27
+ "description",
28
+ "action",
29
+ "error-code"
30
+ );
31
+ this.errorCode = "";
32
+ }
33
+ render() {
34
+ const hasDescription = this.hasSlotController.test("description");
35
+ const hasAction = this.hasSlotController.test("action");
36
+ const hasErrorCode = this.errorCode ? true : this.hasSlotController.test("error-code");
37
+ return html`
38
+ <div part="base">
39
+ <div class="top-left-quarter-circle">
40
+ <svg viewBox="0 0 150 60" width="150" height="60">
41
+ <path
42
+ fill="#D4D90D"
43
+ d="M150-39.398V-90c-20.118 0-69.498 9.036-106.075 45.18C7.347-8.674-.578 40.12.032 60h49.38c0-73.735 67.059-96.988 100.588-99.398Z"
44
+ />
45
+ </svg>
46
+ </div>
47
+ <div
48
+ class=${classMap({
49
+ "error-message-panel": true,
50
+ "error-message-panel--has-description": hasDescription,
51
+ "error-message-panel--has-action": hasAction,
52
+ "error-message-panel--has-error-code": hasErrorCode
53
+ })}
54
+ >
55
+ <slot part="title" class="error-message-panel__title"></slot>
56
+ <p part="error-code">
57
+ ${this.localize.term("errorMessagePanelCodePrefix")}<slot
58
+ name="error-code"
59
+ >${this.errorCode}</slot
60
+ >
61
+ </p>
62
+ <slot name="description" part="description"></slot>
63
+ <slot name="action" part="action"></slot>
64
+ </div>
65
+ <div class="bottom-right-quarter-circle">
66
+ <svg viewBox="0 0 241 101" width="241" height="101">
67
+ <path
68
+ fill="#530ABC"
69
+ d="M0 158.889V241c35.19-2.133 104.504-17.062 161.249-73.58C219.783 109.12 236.735 47.987 241 0h-78.912C143.96 111.969 53.394 154.984 0 158.889Z"
70
+ />
71
+ </svg>
72
+ </div>
73
+ </div>
74
+ `;
75
+ }
76
+ };
77
+ DSAErrorMessagePanel.styles = error_message_panel_styles_default;
78
+ __decorateClass([
79
+ property({ attribute: "error-code" })
80
+ ], DSAErrorMessagePanel.prototype, "errorCode", 2);
81
+ DSAErrorMessagePanel = __decorateClass([
82
+ customElement("dsa-error-message-panel")
83
+ ], DSAErrorMessagePanel);
84
+
85
+ export {
86
+ DSAErrorMessagePanel
87
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.FIGO7UV2.js";
4
4
  import {
5
5
  LocalizeController
6
- } from "./chunk.7BYKP4SA.js";
6
+ } from "./chunk.CKDL37GT.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.6IH66JBY.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk.V7RJROLH.js";
15
15
  import {
16
16
  LocalizeController
17
- } from "./chunk.7BYKP4SA.js";
17
+ } from "./chunk.CKDL37GT.js";
18
18
  import {
19
19
  watch
20
20
  } from "./chunk.6IH66JBY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  skip_links_styles_default
3
- } from "./chunk.DX25IW4S.js";
3
+ } from "./chunk.ZC74GTBL.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -26,7 +26,20 @@ var DSASkipLinks = class extends ShoelaceElement {
26
26
  }
27
27
  // Gets an array of all <dsa-skip-link-item> elements
28
28
  getAllLinks() {
29
- return [...this.querySelectorAll(LINK_ITEM_TAG)];
29
+ const linksNode = this.querySelectorAll(LINK_ITEM_TAG);
30
+ const allLinks = [];
31
+ linksNode.forEach((option) => {
32
+ const clonedOption = option.cloneNode(true);
33
+ allLinks.push(clonedOption);
34
+ });
35
+ return allLinks;
36
+ }
37
+ handleDefaultSlotChange() {
38
+ if (customElements.get(LINK_ITEM_TAG)) {
39
+ this.allLinks = this.getAllLinks();
40
+ } else {
41
+ customElements.whenDefined(LINK_ITEM_TAG).then(() => this.handleDefaultSlotChange());
42
+ }
30
43
  }
31
44
  render() {
32
45
  return html`
@@ -38,6 +51,12 @@ var DSASkipLinks = class extends ShoelaceElement {
38
51
  })}
39
52
  </ul>
40
53
  </nav>
54
+ <slot
55
+ tabindex="-1"
56
+ class="slot_links"
57
+ @slotchange=${this.handleDefaultSlotChange}
58
+ >
59
+ </slot>
41
60
  </div>
42
61
  `;
43
62
  }
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.EMIT7S33.js";
7
7
  import {
8
8
  LocalizeController
9
- } from "./chunk.7BYKP4SA.js";
9
+ } from "./chunk.CKDL37GT.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk.6IH66JBY.js";
@@ -43,6 +43,7 @@ var translation = {
43
43
  stepCompleted: "\xC9tape valid\xE9e",
44
44
  stepInProgress: "\xC9tape en cours",
45
45
  stepError: "\xC9tape en erreur",
46
+ errorMessagePanelCodePrefix: "Code d'erreur: ",
46
47
  // countries
47
48
  fr_FR: "France",
48
49
  fr_GP: "Guadeloupe",
@@ -100,6 +101,7 @@ var translation2 = {
100
101
  stepCompleted: "Step completed",
101
102
  stepInProgress: "Step in progress",
102
103
  stepError: "Step in error",
104
+ errorMessagePanelCodePrefix: "Error code: ",
103
105
  // countries
104
106
  fr_FR: "France",
105
107
  fr_GP: "Guadeloupe",
@@ -1,10 +1,10 @@
1
- import {
2
- input_styles_default
3
- } from "./chunk.AQC66RY2.js";
4
1
  import {
5
2
  getOverridenIconDetails,
6
3
  isPrefixIconOverriden
7
4
  } from "./chunk.KBT2EKLF.js";
5
+ import {
6
+ input_styles_default
7
+ } from "./chunk.AQC66RY2.js";
8
8
  import {
9
9
  defaultValue
10
10
  } from "./chunk.CMJ2SRTL.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk.YIY5RM53.js";
17
17
  import {
18
18
  LocalizeController
19
- } from "./chunk.7BYKP4SA.js";
19
+ } from "./chunk.CKDL37GT.js";
20
20
  import {
21
21
  watch
22
22
  } from "./chunk.6IH66JBY.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ drawer_styles_default
3
+ } from "./chunk.DXVNWE2M.js";
1
4
  import {
2
5
  Modal
3
6
  } from "./chunk.ISAFRNR2.js";
@@ -5,9 +8,6 @@ import {
5
8
  lockBodyScrolling,
6
9
  unlockBodyScrolling
7
10
  } from "./chunk.EMIT7S33.js";
8
- import {
9
- drawer_styles_default
10
- } from "./chunk.DXVNWE2M.js";
11
11
  import {
12
12
  HasSlotController
13
13
  } from "./chunk.YIY5RM53.js";
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk.V7RJROLH.js";
25
25
  import {
26
26
  LocalizeController
27
- } from "./chunk.7BYKP4SA.js";
27
+ } from "./chunk.CKDL37GT.js";
28
28
  import {
29
29
  watch
30
30
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.WFHOSUOX.js";
4
4
  import {
5
5
  LocalizeController
6
- } from "./chunk.7BYKP4SA.js";
6
+ } from "./chunk.CKDL37GT.js";
7
7
  import {
8
8
  ifDefinedAndNotEmpty
9
9
  } from "./chunk.ZQJVCRB2.js";
@@ -0,0 +1,121 @@
1
+ // src/components/download-link/download-link.styles.ts
2
+ import { css } from "lit";
3
+ var download_link_styles_default = css`
4
+ .document-link {
5
+ font: var(--dsa-wc-link-font);
6
+ --icon-size: var(--dsa-spacing-24);
7
+ }
8
+ .document-link--x-large {
9
+ font: var(--dsa-wc-link-font-x-large);
10
+ --icon-size: var(--dsa-spacing-32);
11
+ }
12
+ .document-link--large {
13
+ font: var(--dsa-wc-link-font-large);
14
+ --icon-size: 28px;
15
+ }
16
+ .document-link--small {
17
+ font: var(--dsa-wc-link-font-small);
18
+ --icon-size: 20px;
19
+ }
20
+ .document-link--x-small {
21
+ font: var(--dsa-wc-link-font-x-small);
22
+ --icon-size: var(--dsa-spacing-16);
23
+ }
24
+ .document-link--2x-small {
25
+ font: var(--dsa-wc-link-font-2x-small);
26
+ --icon-size: 14px;
27
+ }
28
+
29
+ .link {
30
+ color: var(--dsa-wc-link-on-base-color);
31
+ text-decoration: none;
32
+ border-bottom-width: var(--dsa-wc-link-underline-thickness);
33
+ border-bottom-style: solid;
34
+ transition: border-width 0.1s ease-out;
35
+ }
36
+
37
+ .link--on-contrasted {
38
+ color: var(--dsa-wc-link-on-contrasted-color);
39
+ }
40
+ .link--on-layer {
41
+ color: var(--dsa-wc-link-on-layer-color);
42
+ }
43
+ .link--floating-menu {
44
+ color: var(--dsa-wc-link-floating-menu-color);
45
+ }
46
+
47
+ .link:hover {
48
+ color: var(--dsa-wc-link-hover-on-base-color);
49
+ border-bottom-width: calc(
50
+ var(--dsa-wc-link-underline-thickness) *
51
+ var(--dsa-wc-link-hover-underline-thickness-multiplier)
52
+ );
53
+ }
54
+ .link--on-contrasted:hover {
55
+ color: var(--dsa-wc-link-hover-on-contrasted-color);
56
+ }
57
+ .link--on-layer:hover {
58
+ color: var(--dsa-wc-link-hover-on-layer-color);
59
+ }
60
+ .link--floating-menu:hover {
61
+ color: var(--dsa-wc-link-hover-floating-menu-color);
62
+ }
63
+
64
+ .link:visited {
65
+ color: var(--dsa-wc-link-visited-on-base-color);
66
+ }
67
+ .link--on-contrasted:visited {
68
+ color: var(--dsa-wc-link-visited-on-contrasted-color);
69
+ }
70
+ .link--on-layer:visited {
71
+ color: var(--dsa-wc-link-visited-on-layer-color);
72
+ }
73
+ .link--floating-menu:visited {
74
+ color: var(--dsa-wc-link-visited-floating-menu-color);
75
+ }
76
+
77
+ .link:active {
78
+ color: var(--dsa-wc-link-active-on-base-color);
79
+ }
80
+ .link--on-contrasted:active {
81
+ color: var(--dsa-wc-link-active-on-contrasted-color);
82
+ }
83
+ .link--on-layer:active {
84
+ color: var(--dsa-wc-link-active-on-layer-color);
85
+ }
86
+ .link--floating-menu:active {
87
+ color: var(--dsa-wc-link-active-floating-menu-color);
88
+ }
89
+
90
+ .link:focus-visible {
91
+ outline: var(--dsa-wc-focus-ring);
92
+ border-radius: var(--dsa-wc-focus-ring-radius);
93
+ }
94
+
95
+ .document-info {
96
+ color: var(--dsa-wc-link-document-info-on-base-color);
97
+ margin-top: var(--dsa-spacing-8);
98
+ margin-bottom: 0;
99
+ pointer-events: none;
100
+ }
101
+ .document-info--on-layer {
102
+ color: var(--dsa-wc-link-document-info-on-layer-color);
103
+ }
104
+ .document-info--on-contrasted {
105
+ color: var(--dsa-wc-link-document-info-on-contrasted-color);
106
+ }
107
+ .document-info--floating-menu {
108
+ color: var(--dsa-wc-link-document-info-floating-menu-color);
109
+ }
110
+
111
+ dsa-icon {
112
+ width: var(--icon-size);
113
+ height: var(--icon-size);
114
+ margin-inline-start: var(--dsa-spacing-8);
115
+ vertical-align: bottom;
116
+ }
117
+ `;
118
+
119
+ export {
120
+ download_link_styles_default
121
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LocalizeController
3
- } from "./chunk.7BYKP4SA.js";
3
+ } from "./chunk.CKDL37GT.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -25,6 +25,10 @@ var accordion_styles_default = css`
25
25
  }
26
26
 
27
27
  .accordion__header {
28
+ border-radius: inherit;
29
+ }
30
+
31
+ .accordion__header-button {
28
32
  display: flex;
29
33
  align-items: center;
30
34
  border-radius: inherit;
@@ -40,19 +44,19 @@ var accordion_styles_default = css`
40
44
  border-color: var(--dsa-wc-accordion-hover-border-color);
41
45
  }
42
46
 
43
- .accordion:hover:not(.accordion--disabled) .accordion__header {
47
+ .accordion:hover:not(.accordion--disabled) .accordion__header-button {
44
48
  background-color: var(--dsa-wc-accordion-header-hover-background-color);
45
49
  }
46
50
 
47
- .accordion__header:not(accordion--open):focus-visible {
51
+ .accordion__header-button:not(accordion--open):focus-visible {
48
52
  outline: none;
49
53
  }
50
54
 
51
- .accordion--disabled .accordion__header {
55
+ .accordion--disabled .accordion__header-button {
52
56
  cursor: not-allowed;
53
57
  }
54
58
 
55
- .accordion--disabled .accordion__header:focus-visible {
59
+ .accordion--disabled .accordion__header-button:focus-visible {
56
60
  outline: none;
57
61
  box-shadow: none;
58
62
  }
@@ -1,6 +1,3 @@
1
- import {
2
- debounce
3
- } from "./chunk.HRBNFVC5.js";
4
1
  import {
5
2
  scrollIntoView
6
3
  } from "./chunk.EMIT7S33.js";
@@ -29,7 +26,7 @@ import {
29
26
  } from "./chunk.V7RJROLH.js";
30
27
  import {
31
28
  LocalizeController
32
- } from "./chunk.7BYKP4SA.js";
29
+ } from "./chunk.CKDL37GT.js";
33
30
  import {
34
31
  watch
35
32
  } from "./chunk.6IH66JBY.js";
@@ -58,11 +55,11 @@ var DSACombobox = class extends ShoelaceElement {
58
55
  );
59
56
  this.localize = new LocalizeController(this);
60
57
  this.hasVisualFocus = false;
61
- this.fetchingState = "success";
62
58
  this.displayLabel = "";
63
59
  this.selectedOptions = [];
64
60
  this.allOptions = [];
65
61
  this.filteredOptions = [];
62
+ this.debounceTimerId = null;
66
63
  this.name = "";
67
64
  this.title = "";
68
65
  this.open = false;
@@ -85,8 +82,8 @@ var DSACombobox = class extends ShoelaceElement {
85
82
  this.items = void 0;
86
83
  this.multiple = false;
87
84
  this.maxOptionsVisible = 3;
88
- this.onSearch = void 0;
89
85
  this.debounceTimeout = 300;
86
+ this.fetchingState = "success";
90
87
  }
91
88
  /** Gets the validity state object */
92
89
  get validity() {
@@ -96,18 +93,13 @@ var DSACombobox = class extends ShoelaceElement {
96
93
  get validationMessage() {
97
94
  return this.valueInput.validationMessage;
98
95
  }
99
- async connectedCallback() {
100
- var _a;
96
+ connectedCallback() {
101
97
  super.connectedCallback();
102
98
  this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
103
99
  this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
104
100
  this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
105
101
  this.open = false;
106
- if (this.onSearch !== void 0) {
107
- this.allOptions = (_a = await this.getRemoteOptions()) != null ? _a : [];
108
- } else {
109
- this.allOptions = this.getAllOptions();
110
- }
102
+ this.allOptions = this.getAllOptions();
111
103
  this.filteredOptions = [...this.allOptions];
112
104
  }
113
105
  /** Input events */
@@ -153,41 +145,23 @@ var DSACombobox = class extends ShoelaceElement {
153
145
  }
154
146
  this.filterOptions(this.displayLabel);
155
147
  }
156
- async handleInput() {
157
- var _a, _b;
148
+ handleInput() {
149
+ var _a;
158
150
  this.displayLabel = this.displayInput.value;
159
151
  this.show();
160
- this.emit("dsa-input");
152
+ if (this.debounceTimerId !== null) {
153
+ clearTimeout(this.debounceTimerId);
154
+ }
155
+ this.debounceTimerId = setTimeout(
156
+ () => this.emit("dsa-input"),
157
+ this.debounceTimeout
158
+ );
161
159
  if (!this.multiple) {
162
160
  if (this.displayLabel !== ((_a = this.selectedOptions[0]) == null ? void 0 : _a.getTextLabel())) {
163
161
  this.clearSelectedOptions();
164
162
  }
165
163
  }
166
- if (this.onSearch !== void 0) {
167
- const remoteOptions = (_b = await this.getRemoteOptions()) != null ? _b : [];
168
- this.filterRemoteOptions(remoteOptions);
169
- } else {
170
- this.filterOptions(this.displayLabel);
171
- }
172
- }
173
- filterRemoteOptions(remoteOptions) {
174
- const nonSelectedOptions = remoteOptions.filter(
175
- (option) => this.selectedOptions.every((selectedOption) => {
176
- return selectedOption.value !== option.value;
177
- })
178
- );
179
- this.allOptions = [...this.selectedOptions, ...nonSelectedOptions];
180
- this.filteredOptions = [...this.selectedOptions, ...nonSelectedOptions];
181
- }
182
- asyncFetchOptions() {
183
- if (this.onSearch !== void 0) {
184
- const debouncedOnSearch = debounce(this.onSearch, this.debounceTimeout);
185
- return debouncedOnSearch(
186
- this.displayLabel,
187
- this.selectedOptions.map((option) => option.value)
188
- );
189
- }
190
- return void 0;
164
+ this.filterOptions(this.displayLabel);
191
165
  }
192
166
  handleClearClick(event) {
193
167
  event.stopPropagation();
@@ -202,11 +176,9 @@ var DSACombobox = class extends ShoelaceElement {
202
176
  }
203
177
  }
204
178
  filterOptions(filter) {
205
- if (this.onSearch === void 0) {
206
- this.filteredOptions = this.allOptions.filter((option) => {
207
- return option.innerText.toLowerCase().includes(filter.toLowerCase());
208
- });
209
- }
179
+ this.filteredOptions = this.allOptions.filter((option) => {
180
+ return option.innerText.toLowerCase().includes(filter.toLowerCase());
181
+ });
210
182
  }
211
183
  // Toggles an option's selected state
212
184
  toggleOptionSelection(option, force) {
@@ -271,23 +243,6 @@ var DSACombobox = class extends ShoelaceElement {
271
243
  });
272
244
  return allOptions;
273
245
  }
274
- // Gets an array of all remote <dsa-option> elements
275
- async getRemoteOptions() {
276
- var _a;
277
- let remoteOptions = [];
278
- try {
279
- this.fetchingState = "loading";
280
- remoteOptions = (_a = await this.asyncFetchOptions()) != null ? _a : [];
281
- this.fetchingState = "success";
282
- this.emit("dsa-load");
283
- } catch (e) {
284
- remoteOptions = [];
285
- this.fetchingState = "error";
286
- this.emit("dsa-error");
287
- throw e;
288
- }
289
- return remoteOptions;
290
- }
291
246
  clearSelectedOptions() {
292
247
  this.allOptions.forEach((el) => {
293
248
  el.selected = false;
@@ -809,9 +764,6 @@ __decorateClass([
809
764
  __decorateClass([
810
765
  state()
811
766
  ], DSACombobox.prototype, "hasVisualFocus", 2);
812
- __decorateClass([
813
- state()
814
- ], DSACombobox.prototype, "fetchingState", 2);
815
767
  __decorateClass([
816
768
  state()
817
769
  ], DSACombobox.prototype, "displayLabel", 2);
@@ -827,6 +779,9 @@ __decorateClass([
827
779
  __decorateClass([
828
780
  state()
829
781
  ], DSACombobox.prototype, "filteredOptions", 2);
782
+ __decorateClass([
783
+ state()
784
+ ], DSACombobox.prototype, "debounceTimerId", 2);
830
785
  __decorateClass([
831
786
  property()
832
787
  ], DSACombobox.prototype, "name", 2);
@@ -904,12 +859,12 @@ __decorateClass([
904
859
  __decorateClass([
905
860
  property({ attribute: "max-options-visible", type: Number })
906
861
  ], DSACombobox.prototype, "maxOptionsVisible", 2);
907
- __decorateClass([
908
- property({ type: Function, attribute: false })
909
- ], DSACombobox.prototype, "onSearch", 2);
910
862
  __decorateClass([
911
863
  property({ type: Number, attribute: "debounce-timeout" })
912
864
  ], DSACombobox.prototype, "debounceTimeout", 2);
865
+ __decorateClass([
866
+ property({ attribute: "fetching-state" })
867
+ ], DSACombobox.prototype, "fetchingState", 2);
913
868
  __decorateClass([
914
869
  watch("disabled", { waitUntilFirstUpdate: true })
915
870
  ], DSACombobox.prototype, "handleDisabledChange", 1);