@getflip/swirl-components 0.508.0 → 0.510.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 (152) hide show
  1. package/components.json +46 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-accordion-item.cjs.entry.js +3 -4
  4. package/dist/cjs/swirl-card.cjs.entry.js +1 -1
  5. package/dist/cjs/swirl-chip.cjs.entry.js +2 -2
  6. package/dist/cjs/swirl-color-input.cjs.entry.js +3 -4
  7. package/dist/cjs/swirl-components.cjs.js +1 -1
  8. package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
  9. package/dist/cjs/swirl-data-cell-stack.cjs.entry.js +2 -3
  10. package/dist/cjs/swirl-data-cell.cjs.entry.js +3 -4
  11. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
  12. package/dist/cjs/swirl-file-chip.cjs.entry.js +1 -1
  13. package/dist/cjs/swirl-file-uploader.cjs.entry.js +1 -1
  14. package/dist/cjs/swirl-file-viewer-audio_7.cjs.entry.js +6 -2
  15. package/dist/cjs/swirl-icon-check-small_2.cjs.entry.js +3 -4
  16. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-inline-status.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-option-list.cjs.entry.js +2 -3
  20. package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
  21. package/dist/cjs/swirl-resource-list-item.cjs.entry.js +4 -5
  22. package/dist/cjs/swirl-resource-list.cjs.entry.js +2 -3
  23. package/dist/cjs/swirl-select.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-separator.cjs.entry.js +1 -1
  25. package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/swirl-table-cell.cjs.entry.js +1 -1
  27. package/dist/cjs/swirl-table.cjs.entry.js +1 -1
  28. package/dist/collection/components/swirl-accordion-item/swirl-accordion-item.js +4 -5
  29. package/dist/collection/components/swirl-card/swirl-card.css +0 -1
  30. package/dist/collection/components/swirl-chip/swirl-chip.css +56 -39
  31. package/dist/collection/components/swirl-chip/swirl-chip.js +20 -1
  32. package/dist/collection/components/swirl-color-input/swirl-color-input.js +3 -4
  33. package/dist/collection/components/swirl-console-layout/swirl-console-layout.css +0 -3
  34. package/dist/collection/components/swirl-data-cell/swirl-data-cell.js +3 -4
  35. package/dist/collection/components/swirl-data-cell-stack/swirl-data-cell-stack.js +2 -3
  36. package/dist/collection/components/swirl-date-picker/swirl-date-picker.css +0 -1
  37. package/dist/collection/components/swirl-file-chip/swirl-file-chip.css +0 -1
  38. package/dist/collection/components/swirl-file-uploader/swirl-file-uploader.css +0 -4
  39. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-image/swirl-file-viewer-image.css +0 -2
  40. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-video/swirl-file-viewer-video.js +25 -1
  41. package/dist/collection/components/swirl-image-grid-item/swirl-image-grid-item.css +0 -2
  42. package/dist/collection/components/swirl-inline-error/swirl-inline-error.css +0 -1
  43. package/dist/collection/components/swirl-inline-status/swirl-inline-status.css +0 -1
  44. package/dist/collection/components/swirl-option-list/swirl-option-list.js +2 -3
  45. package/dist/collection/components/swirl-option-list-item/swirl-option-list-item.js +3 -4
  46. package/dist/collection/components/swirl-pagination/swirl-pagination.css +0 -1
  47. package/dist/collection/components/swirl-resource-list/swirl-resource-list.js +2 -3
  48. package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.css +0 -1
  49. package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +3 -4
  50. package/dist/collection/components/swirl-select/swirl-select.css +0 -2
  51. package/dist/collection/components/swirl-separator/swirl-separator.css +0 -1
  52. package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.css +0 -1
  53. package/dist/collection/components/swirl-table/swirl-table.css +0 -1
  54. package/dist/collection/components/swirl-table-cell/swirl-table-cell.css +1 -2
  55. package/dist/components/swirl-accordion-item.js +1 -1
  56. package/dist/components/swirl-card.js +1 -1
  57. package/dist/components/swirl-chip.js +1 -1
  58. package/dist/components/swirl-color-input.js +1 -1
  59. package/dist/components/swirl-console-layout.js +1 -1
  60. package/dist/components/swirl-data-cell-stack.js +1 -1
  61. package/dist/components/swirl-data-cell.js +1 -1
  62. package/dist/components/swirl-date-picker2.js +1 -1
  63. package/dist/components/swirl-file-chip.js +1 -1
  64. package/dist/components/swirl-file-uploader.js +1 -1
  65. package/dist/components/swirl-file-viewer-image2.js +1 -1
  66. package/dist/components/swirl-file-viewer-video2.js +1 -1
  67. package/dist/components/swirl-image-grid-item.js +1 -1
  68. package/dist/components/swirl-inline-error2.js +1 -1
  69. package/dist/components/swirl-inline-status.js +1 -1
  70. package/dist/components/swirl-option-list-item2.js +1 -1
  71. package/dist/components/swirl-option-list2.js +1 -1
  72. package/dist/components/swirl-pagination.js +1 -1
  73. package/dist/components/swirl-resource-list-item.js +1 -1
  74. package/dist/components/swirl-resource-list.js +1 -1
  75. package/dist/components/swirl-select.js +1 -1
  76. package/dist/components/swirl-separator2.js +1 -1
  77. package/dist/components/swirl-tab-bar2.js +1 -1
  78. package/dist/components/swirl-table-cell.js +1 -1
  79. package/dist/components/swirl-table.js +1 -1
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/swirl-accordion-item.entry.js +3 -4
  82. package/dist/esm/swirl-card.entry.js +1 -1
  83. package/dist/esm/swirl-chip.entry.js +2 -2
  84. package/dist/esm/swirl-color-input.entry.js +3 -4
  85. package/dist/esm/swirl-components.js +1 -1
  86. package/dist/esm/swirl-console-layout.entry.js +1 -1
  87. package/dist/esm/swirl-data-cell-stack.entry.js +2 -3
  88. package/dist/esm/swirl-data-cell.entry.js +3 -4
  89. package/dist/esm/swirl-date-picker_2.entry.js +1 -1
  90. package/dist/esm/swirl-file-chip.entry.js +1 -1
  91. package/dist/esm/swirl-file-uploader.entry.js +1 -1
  92. package/dist/esm/swirl-file-viewer-audio_7.entry.js +6 -2
  93. package/dist/esm/swirl-icon-check-small_2.entry.js +3 -4
  94. package/dist/esm/swirl-icon-error_3.entry.js +1 -1
  95. package/dist/esm/swirl-image-grid-item.entry.js +1 -1
  96. package/dist/esm/swirl-inline-status.entry.js +1 -1
  97. package/dist/esm/swirl-option-list.entry.js +2 -3
  98. package/dist/esm/swirl-pagination.entry.js +1 -1
  99. package/dist/esm/swirl-resource-list-item.entry.js +4 -5
  100. package/dist/esm/swirl-resource-list.entry.js +2 -3
  101. package/dist/esm/swirl-select.entry.js +1 -1
  102. package/dist/esm/swirl-separator.entry.js +1 -1
  103. package/dist/esm/swirl-tab-bar.entry.js +1 -1
  104. package/dist/esm/swirl-table-cell.entry.js +1 -1
  105. package/dist/esm/swirl-table.entry.js +1 -1
  106. package/dist/swirl-components/p-0eb845e5.entry.js +1 -0
  107. package/dist/swirl-components/p-1ad388ee.entry.js +1 -0
  108. package/dist/swirl-components/{p-bf758fa6.entry.js → p-210445a5.entry.js} +1 -1
  109. package/dist/swirl-components/{p-f9d6c569.entry.js → p-39d77af2.entry.js} +1 -1
  110. package/dist/swirl-components/{p-3dbc3b2b.entry.js → p-3bfb288a.entry.js} +1 -1
  111. package/dist/swirl-components/p-49832cd4.entry.js +1 -0
  112. package/dist/swirl-components/p-64903416.entry.js +1 -0
  113. package/dist/swirl-components/p-76e08c22.entry.js +1 -0
  114. package/dist/swirl-components/{p-1d922b34.entry.js → p-8588b8cc.entry.js} +1 -1
  115. package/dist/swirl-components/{p-169ca57a.entry.js → p-8f9f7875.entry.js} +1 -1
  116. package/dist/swirl-components/{p-e7ca6409.entry.js → p-960bf4e2.entry.js} +2 -2
  117. package/dist/swirl-components/p-98c12f65.entry.js +1 -0
  118. package/dist/swirl-components/{p-7a165e77.entry.js → p-a28fcb04.entry.js} +1 -1
  119. package/dist/swirl-components/{p-07b4d869.entry.js → p-a72ee233.entry.js} +1 -1
  120. package/dist/swirl-components/{p-afbf4b33.entry.js → p-aa397b45.entry.js} +1 -1
  121. package/dist/swirl-components/{p-0adbfed0.entry.js → p-c2dc914c.entry.js} +1 -1
  122. package/dist/swirl-components/p-cea23645.entry.js +1 -0
  123. package/dist/swirl-components/p-cf6fbcee.entry.js +1 -0
  124. package/dist/swirl-components/{p-358d9e37.entry.js → p-d311b952.entry.js} +1 -1
  125. package/dist/swirl-components/p-dbd9fcd9.entry.js +1 -0
  126. package/dist/swirl-components/p-e03007f2.entry.js +1 -0
  127. package/dist/swirl-components/{p-18b88415.entry.js → p-ea5709c4.entry.js} +1 -1
  128. package/dist/swirl-components/p-f3e2ce62.entry.js +1 -0
  129. package/dist/swirl-components/p-ffcb308d.entry.js +1 -0
  130. package/dist/swirl-components/swirl-components.esm.js +1 -1
  131. package/dist/types/components/swirl-chip/swirl-chip.d.ts +1 -0
  132. package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-video/swirl-file-viewer-video.d.ts +2 -0
  133. package/dist/types/components/swirl-resource-list/swirl-resource-list.d.ts +1 -1
  134. package/dist/types/components.d.ts +7 -2
  135. package/package.json +1 -1
  136. package/vscode-data.json +4 -0
  137. package/dist/cjs/v4-Bq3ldsQe.js +0 -58
  138. package/dist/components/v4.js +0 -1
  139. package/dist/esm/v4-DD3477fe.js +0 -56
  140. package/dist/swirl-components/p-014d64ac.entry.js +0 -1
  141. package/dist/swirl-components/p-02146e6a.entry.js +0 -1
  142. package/dist/swirl-components/p-0becd3e6.entry.js +0 -1
  143. package/dist/swirl-components/p-1861a24d.entry.js +0 -1
  144. package/dist/swirl-components/p-30da9575.entry.js +0 -1
  145. package/dist/swirl-components/p-417819b1.entry.js +0 -1
  146. package/dist/swirl-components/p-78704082.entry.js +0 -1
  147. package/dist/swirl-components/p-7a90a64c.entry.js +0 -1
  148. package/dist/swirl-components/p-DD3477fe.js +0 -1
  149. package/dist/swirl-components/p-b96b6445.entry.js +0 -1
  150. package/dist/swirl-components/p-cbabb9fe.entry.js +0 -1
  151. package/dist/swirl-components/p-d5c9217e.entry.js +0 -1
  152. package/dist/swirl-components/p-fff2a98f.entry.js +0 -1
package/vscode-data.json CHANGED
@@ -2494,6 +2494,10 @@
2494
2494
  }
2495
2495
  ]
2496
2496
  },
2497
+ {
2498
+ "name": "disabled",
2499
+ "description": ""
2500
+ },
2497
2501
  {
2498
2502
  "name": "icon",
2499
2503
  "description": ""
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
4
- // require the crypto API and do not support built-in fallback to lower quality random number
5
- // generators (like Math.random()).
6
- let getRandomValues;
7
- const rnds8 = new Uint8Array(16);
8
- function rng() {
9
- // lazy load so that environments that need to polyfill have a chance to do so
10
- if (!getRandomValues) {
11
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
12
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
13
-
14
- if (!getRandomValues) {
15
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
16
- }
17
- }
18
-
19
- return getRandomValues(rnds8);
20
- }
21
-
22
- /**
23
- * Convert array of 16 byte values to UUID string format of the form:
24
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
25
- */
26
-
27
- const byteToHex = [];
28
-
29
- for (let i = 0; i < 256; ++i) {
30
- byteToHex.push((i + 0x100).toString(16).slice(1));
31
- }
32
-
33
- function unsafeStringify(arr, offset = 0) {
34
- // Note: Be careful editing this code! It's been tuned for performance
35
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
36
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
37
- }
38
-
39
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
40
- var native = {
41
- randomUUID
42
- };
43
-
44
- function v4(options, buf, offset) {
45
- if (native.randomUUID && true && !options) {
46
- return native.randomUUID();
47
- }
48
-
49
- options = options || {};
50
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
51
-
52
- rnds[6] = rnds[6] & 0x0f | 0x40;
53
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
54
-
55
- return unsafeStringify(rnds);
56
- }
57
-
58
- exports.v4 = v4;
@@ -1 +0,0 @@
1
- let t;const r=new Uint8Array(16);function o(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(r)}const n=[];for(let t=0;t<256;++t)n.push((t+256).toString(16).slice(1));var e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function u(t){if(e.randomUUID&&!t)return e.randomUUID();const r=(t=t||{}).random||(t.rng||o)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(t,r=0){return n[t[r+0]]+n[t[r+1]]+n[t[r+2]]+n[t[r+3]]+"-"+n[t[r+4]]+n[t[r+5]]+"-"+n[t[r+6]]+n[t[r+7]]+"-"+n[t[r+8]]+n[t[r+9]]+"-"+n[t[r+10]]+n[t[r+11]]+n[t[r+12]]+n[t[r+13]]+n[t[r+14]]+n[t[r+15]]}(r)}export{u as v}
@@ -1,56 +0,0 @@
1
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
2
- // require the crypto API and do not support built-in fallback to lower quality random number
3
- // generators (like Math.random()).
4
- let getRandomValues;
5
- const rnds8 = new Uint8Array(16);
6
- function rng() {
7
- // lazy load so that environments that need to polyfill have a chance to do so
8
- if (!getRandomValues) {
9
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
10
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
11
-
12
- if (!getRandomValues) {
13
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
14
- }
15
- }
16
-
17
- return getRandomValues(rnds8);
18
- }
19
-
20
- /**
21
- * Convert array of 16 byte values to UUID string format of the form:
22
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
23
- */
24
-
25
- const byteToHex = [];
26
-
27
- for (let i = 0; i < 256; ++i) {
28
- byteToHex.push((i + 0x100).toString(16).slice(1));
29
- }
30
-
31
- function unsafeStringify(arr, offset = 0) {
32
- // Note: Be careful editing this code! It's been tuned for performance
33
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
34
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
35
- }
36
-
37
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
38
- var native = {
39
- randomUUID
40
- };
41
-
42
- function v4(options, buf, offset) {
43
- if (native.randomUUID && true && !options) {
44
- return native.randomUUID();
45
- }
46
-
47
- options = options || {};
48
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
49
-
50
- rnds[6] = rnds[6] & 0x0f | 0x40;
51
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
52
-
53
- return unsafeStringify(rnds);
54
- }
55
-
56
- export { v4 as v };
@@ -1 +0,0 @@
1
- import{r as i,c as e,h as s,a as o}from"./p-BdGaOt5L.js";import{c as t}from"./p-orsBiyT_.js";import{F as c}from"./p-Bp6322JD.js";import{a,b as r,c as n,e as l,f as h,h as p}from"./p-CCck-DTo.js";const f=class{constructor(o){i(this,o),this.delete=e(this,"delete",7),this.download=e(this,"download",7),this.preview=e(this,"preview",7),this.deleteButtonLabel="Delete",this.downloadButtonLabel="Download",this.errorLabel="Error",this.loadingLabel="Loading …",this.previewButtonLabel="Preview",this.fileType="unknown",this.isHovered=!1,this.fileIconMap={image:s("swirl-icon-image",{size:20}),video:s("swirl-icon-video-player",{size:20}),audio:s("swirl-icon-audio-file",{size:20}),pdf:s("swirl-icon-picture-as-pdf",{size:20}),compressed:s("swirl-icon-folder",{size:20}),document:s("swirl-icon-file",{size:20}),unknown:s("swirl-icon-attachment",{size:20})},this.handleClick=()=>{this.loading||(this.showPreviewButton?this.handlePreviewClick():this.showDownloadButton&&this.handleDownloadClick())},this.handleDownloadClick=i=>{if(i?.stopPropagation(),this.download.emit(),this.skipNativeDownload)return;const e=this.name||this.url.split("/").pop();fetch(this.url).then((i=>i.blob())).then((i=>{c.saveAs(i,e)}))},this.handlePreviewClick=i=>{i?.stopPropagation(),this.preview.emit()},this.handleDeleteClick=i=>{i?.stopPropagation(),this.delete.emit()}}componentWillLoad(){this.setFileType()}watchType(){this.setFileType()}getFileIcon(){return this.hasError?s("swirl-icon-error",{color:"critical",size:20}):this.loading?s("swirl-spinner",{size:"s",label:this.loadingLabel}):this.fileIconMap[this.fileType]}setFileType(){this.fileType=a(this.type)?"image":r(this.type)?"video":n(this.type)?"audio":l(this.type)?"pdf":h(this.type)?"compressed":p(this.type)?"document":"unknown"}render(){const i=this.showPreviewButton||this.showDownloadButton||this.showDeleteButton,e=t("file-chip",`file-chip--type-${this.fileType}`,{"file-chip--loading":this.loading,"file-chip--has-error":this.hasError,"file-chip--has-description":this.description||this.loading||this.hasError,"file-chip--has-download-action":this.showDownloadButton,"file-chip--has-preview-action":this.showPreviewButton,"file-chip--no-actions":!i,"file-chip--no-suffix":!(this.description||this.showPreviewButton||this.showDownloadButton||this.showDeleteButton)});return s(o,{key:"f651e5164bafe40eee9878dcab33479cb54f3896"},s("span",{key:"c47da266ecd534a53380f490770def3ce0b67382","aria-label":this.name,class:e,onClick:this.handleClick,role:"group"},s("span",{key:"c9f421e1d6bd5b3ec84b230ae09af699b52d99d0",class:"file-chip__icon"},this.getFileIcon()),s("span",{key:"638a067d8de73b1d2de56fe89ff2e1b36dd33e79",class:"file-chip__info"},s("span",{key:"5b31f556cc872b3d9b17197189152f08be2ebb4d",class:"file-chip__name",title:this.name},this.name),s("span",{key:"eb33221f26cfa17f8ab06957ff5616a1978929fb",class:"file-chip__suffix"},(this.description||this.loading||this.hasError)&&s("span",{key:"e961d5a92610d88cfa06fc35a739758def3aa69a",class:"file-chip__description",role:this.hasError?"status":void 0},this.hasError?this.errorLabel:this.loading?this.loadingLabel:this.description),i&&!this.loading&&s("span",{key:"66b30511a7e2c92440dc4172b04c0e025bfb0314",class:"file-chip__actions"},this.showPreviewButton&&s("swirl-button",{key:"4258c47754d60ff728fc6c726a1af97dc5a30347",hideLabel:!0,icon:"<swirl-icon-preview></swirl-icon-preview>",label:this.previewButtonLabel,onClick:this.handlePreviewClick,part:"file-chip__preview",variant:"plain"}),this.showDownloadButton&&s("swirl-button",{key:"07383082bfab772beea9f9e94e75afd66e1fe13f",hideLabel:!0,icon:"<swirl-icon-download></swirl-icon-download>",label:this.downloadButtonLabel,onClick:this.handleDownloadClick,part:"file-chip__download",variant:"plain"}),this.showDeleteButton&&s("swirl-button",{key:"7967e4aa0250e14d8521958916c1a1b90075a220",hideLabel:!0,icon:"<swirl-icon-close></swirl-icon-close>",label:this.deleteButtonLabel,onClick:this.handleDeleteClick,part:"file-chip__delete",variant:"plain"}))))))}static get watchers(){return{type:[{watchType:0}]}}};f.style=":host{display:inline-block;max-width:100%;overflow:hidden;background-color:var(--s-background-default);border-radius:var(--s-border-radius-sm);outline:1px solid var(--s-border-strong);outline-offset:-1px}.file-chip{display:flex;position:relative;align-items:center;max-width:100%;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);background-color:transparent;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-8);gap:var(--s-space-12)}@media (hover: hover){.file-chip:hover:not(.file-chip--no-actions):not(.file-chip--loading).file-chip--has-preview-action,.file-chip:hover:not(.file-chip--no-actions):not(.file-chip--loading).file-chip--has-download-action,.file-chip:focus-within:not(.file-chip--no-actions):not(.file-chip--loading).file-chip--has-preview-action,.file-chip:focus-within:not(.file-chip--no-actions):not(.file-chip--loading).file-chip--has-download-action{background-color:var(--s-state-hovered);cursor:pointer}.file-chip:hover:not(.file-chip--no-actions):not(.file-chip--loading) .file-chip__description,.file-chip:focus-within:not(.file-chip--no-actions):not(.file-chip--loading) .file-chip__description{opacity:0;pointer-events:none}.file-chip:hover:not(.file-chip--no-actions):not(.file-chip--loading) .file-chip__actions,.file-chip:focus-within:not(.file-chip--no-actions):not(.file-chip--loading) .file-chip__actions{opacity:1;pointer-events:auto}}.file-chip__icon{display:flex;flex-shrink:0;padding:var(--s-space-4);background-color:var(--s-decorative-blueberry-surface-subdued);border-radius:50%;color:var(--s-decorative-blueberry-text)}.file-chip__info{display:flex;align-items:center;gap:var(--s-space-12);flex-grow:1;min-width:0}.file-chip__name{color:var(--s-text-default);font-weight:var(--s-font-weight-semibold)}.file-chip__suffix{display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--s-space-12);flex-grow:1;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}@media (hover: hover){.file-chip__suffix{display:inline-grid;justify-items:end;gap:0}}.file-chip__suffix swirl-button{display:inline-flex}@media (hover: hover){.file-chip__description,.file-chip__actions{grid-area:1 / 1}}.file-chip__description{color:var(--s-text-subdued);font-size:var(--s-font-size-xs)}.file-chip__name,.file-chip__description{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-chip__actions{display:flex;align-items:center;gap:var(--s-space-8)}@media (hover: hover){.file-chip__actions{opacity:0;pointer-events:none}}.file-chip--no-suffix .file-chip__suffix{display:none}.file-chip--has-description .file-chip__info{align-items:baseline}.file-chip--type-image .file-chip__icon{color:var(--s-decorative-kiwi-text);background-color:var(--s-decorative-kiwi-surface-subdued)}.file-chip--type-video .file-chip__icon{color:var(--s-decorative-radish-text);background-color:var(--s-decorative-radish-surface-subdued)}.file-chip--type-audio .file-chip__icon{color:var(--s-decorative-grape-text);background-color:var(--s-decorative-grape-surface-subdued)}.file-chip--type-pdf .file-chip__icon{color:var(--s-decorative-chilli-text);background-color:var(--s-decorative-chilli-surface-subdued)}.file-chip--type-compressed .file-chip__icon{color:var(--s-decorative-pumpkin-text);background-color:var(--s-decorative-pumpkin-surface-subdued)}.file-chip--type-document .file-chip__icon{color:var(--s-decorative-blueberry-text);background-color:var(--s-decorative-blueberry-surface-subdued)}.file-chip--type-unknown .file-chip__icon{color:var(--s-decorative-banana-text);background-color:var(--s-decorative-banana-surface-subdued)}.file-chip--loading .file-chip__icon{padding:var(--s-space-2)}.file-chip--loading .file-chip__icon{background-color:transparent}.file-chip--has-error .file-chip__icon{background-color:var(--s-surface-critical-subdued)}.file-chip--has-error .file-chip__description{color:var(--s-text-critical)}";export{f as swirl_file_chip}
@@ -1 +0,0 @@
1
- import{r as a,c as e,h as l,a as t,d as i}from"./p-BdGaOt5L.js";import{c}from"./p-orsBiyT_.js";import{v as s}from"./p-DD3477fe.js";const d=class{constructor(l){a(this,l),this.valueChange=e(this,"valueChange",7),this.intent="default",this.vertical=!1,this.elementId=`data-cell-${s()}`,this.handleRadioClick=a=>{const e=a.target,l=this.el.querySelector('swirl-radio[slot="content"]');if(e.contains(l)){const a=l?.querySelector('input[type="radio"]');a.click()}},this.handleClick=a=>{this.handleRadioClick(a),this.valueChange.emit(a)}}render(){const a=Boolean("SWIRL-DATA-CELL"===this.el.querySelector('[slot="media"]')?.parentElement.tagName),e=Boolean("SWIRL-DATA-CELL"===this.el.querySelector('[slot="suffix"]')?.parentElement.tagName),i=Boolean(this.label),s=Boolean("SWIRL-DATA-CELL"===this.el.querySelector('[slot="content"]')?.parentElement.tagName),d=Boolean(this.el.querySelector('swirl-checkbox[slot="content"]')),r=Boolean(this.el.querySelector('swirl-radio[slot="content"]')),o=c("data-cell",{"data-cell--vertical":this.vertical,"data-cell--has-media":a,"data-cell--has-suffix":e,"data-cell--has-content":s,"data-cell--no-label":!i,"data-cell--interactive":d||r,[`data-cell--intent-${this.intent}`]:this.intent}),n=`${this.elementId}-label`,f=`${this.elementId}-value`,u="SWIRL-DATA-CELL-STACK"===this.el.parentElement?.tagName,b=u?"listitem":"group",h=d||r?"button":void 0,p=u&&!h?"group":h,v=l("swirl-stack",{key:"b7e45f984e5f703bf6602cf04026ce030206743b",orientation:"horizontal",align:"center",spacing:"4"},l("span",{key:"abe3e4a268fc074e864335eb5a3504ed977210df",class:"data-cell__label",id:n,role:"term"},this.label),this.tooltip&&l("swirl-tooltip",{key:"6fd19146e87e14c4bc5c20cf391a0f4dfee16edd",class:"data-cell__tooltip",content:this.tooltip,position:"right"},l("swirl-icon-info",{key:"3fffcab519ac14c2493abc99a2ea9f99c5d5899b",size:16,tabIndex:0})));return l(t,{key:"950c2a9d7c7e1f605698c5d2b44bdcb3ff54e5d0",role:b},l("div",{key:"d40c9e1dfca15fb47193d42602b48040ae9f2eed",class:o,part:"data-cell",onClick:d||r?this.handleClick:void 0,role:p,tabIndex:d||r?0:void 0},a&&l("div",{key:"07218ec52d997f764c250e1f70f2269a55eced5e",class:"data-cell__media","aria-hidden":"true"},l("slot",{key:"84eaae0b7997bd80cf1a9c0c7179209b7272a95b",name:"media"})),l("div",{key:"4d4f901bf61febc68ec46f00db0a4167160bf869",class:"data-cell__content"},i&&l("div",{key:"2d4ad0b8975a409e372a5d4f2e3f75fa0714774f",class:"data-cell__label-wrapper"},v),(s||this.value||e)&&l("div",{key:"78c4f5ee10fbc8928b24a53d1d42cb6e3b20524f",class:"data-cell__value-wrapper",role:"definition","aria-labelledby":i?n:void 0,id:f},s?l("div",{class:"data-cell__input"},l("slot",{name:"content"})):this.value&&l("div",{class:"data-cell__value"},this.value))),e&&l("div",{key:"98f57eda879de173cb4b683df7bf3213c2d4197b",class:"data-cell__suffix"},l("slot",{key:"9793229f457bf8989af7bf9ecc5d684340d25e9f",name:"suffix"}))))}get el(){return i(this)}};d.style=":host{display:block;width:100%}:host *{box-sizing:border-box}.data-cell{display:flex;align-items:center;gap:var(--s-space-8);width:100%;padding:var(--s-space-12) var(--s-space-16);border-radius:var(--swirl-data-cell-border-radius, var(--s-border-radius-l))}.data-cell--interactive{cursor:pointer}.data-cell--intent-default{background-color:var(--s-surface-raised-50-default)}.data-cell--intent-info{background-color:var(--s-surface-info-subdued)}.data-cell--intent-critical{background-color:var(--s-surface-critical-subdued)}.data-cell--intent-warning{background-color:var(--s-surface-warning-subdued)}.data-cell--intent-success{background-color:var(--s-surface-success-subdued)}.data-cell--intent-special{background-color:var(--s-decorative-grape-surface-subdued)}.data-cell--intent-translucent{background-color:var(--s-surface-on-image-default)}.data-cell--intent-subdued{background-color:var(--s-surface-raised-default)}.data-cell--vertical{align-items:center}.data-cell__media{flex-shrink:0;display:flex;align-items:center}.data-cell__media ::slotted(swirl-avatar){--swirl-avatar-background-color:var(--s-surface-default)}.data-cell__content{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:var(--s-space-24)}.data-cell--no-label .data-cell__content,.data-cell--no-label .data-cell__value-wrapper,.data-cell--no-label .data-cell__input{width:100%}.data-cell--vertical .data-cell__content{flex-direction:column;align-items:flex-start;gap:var(--s-space-4)}.data-cell__label-wrapper{flex-shrink:0;min-width:0}.data-cell:not(.data-cell--vertical) .data-cell__label-wrapper{width:calc(160px + var(--s-space-4) + 16px)}.data-cell__label{display:block;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);color:var(--s-text-subdued);font-weight:var(--s-font-weight-normal)}.data-cell:not(.data-cell--vertical) .data-cell__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.data-cell__tooltip swirl-icon-info{flex-shrink:0;color:var(--s-text-subdued)}.data-cell__value-wrapper{display:flex;align-items:center;gap:var(--s-space-4);flex-shrink:1;min-width:0}.data-cell--vertical .data-cell__value-wrapper{flex-direction:column;align-items:flex-start}.data-cell__value{flex:1;min-width:0;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);color:var(--s-text-default);font-weight:var(--s-font-weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.data-cell--vertical .data-cell__value{white-space:normal;overflow:visible;text-overflow:clip}.data-cell__suffix{flex-shrink:0}.data-cell__input{width:100%;--swirl-form-control-label-background-color:var( --swirl-data-cell-input-background, var(--s-surface-default) )}.data-cell__input ::slotted(swirl-checkbox),.data-cell__input ::slotted(swirl-radio){width:100%}@media (max-width: 767px){.data-cell:not(.data-cell--vertical) .data-cell__content{flex-direction:column;align-items:flex-start;gap:var(--s-space-4)}.data-cell:not(.data-cell--vertical) .data-cell__value-wrapper{flex-direction:column;align-items:flex-start}}";export{d as swirl_data_cell}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as r,a,d as i,F as o}from"./p-BdGaOt5L.js";import{s,t as c}from"./p-CCck-DTo.js";import{c as n}from"./p-orsBiyT_.js";const d=class{constructor(r){e(this,r),this.valueChange=t(this,"valueChange",3),this.disableDate=()=>!1,this.firstDayOfWeek=0,this.fixedAspectRatio=!0,this.fixedMaxWidth=!0,this.locale="en-US",this.onClick=e=>{e.stopPropagation(),e.preventDefault()},this.onSelectDate=e=>{this.valueChange.emit("string"==typeof e.detail?s(new Date(e.detail)):e.detail.map((e=>s(new Date(e)))))}}componentWillLoad(){if(!this.firstDayOfWeek){const e=new Intl.Locale(this.locale);this.firstDayOfWeek="getWeekInfo"in e?e.getWeekInfo().firstDay:e.weekInfo?.firstDay??0}}render(){const e=this.startDate instanceof Date?c(this.startDate):void 0,t=n({"date-picker--fixed-max-width":this.fixedMaxWidth,"date-picker--fixed-aspect-ratio":this.fixedAspectRatio});return r(a,{key:"b5427fbe372af8ca42124c874a4e44b775441af0",onClick:this.onClick},r("wc-datepicker",{key:"569e169295ddd23b4a2a06d3a19ad5e7f1e484fa",class:t,elementClassName:"date-picker",disableDate:this.disableDate,firstDayOfWeek:this.firstDayOfWeek,labels:this.labels,locale:this.locale,onSelectDate:this.onSelectDate,range:this.range,startDate:e,value:this.value}))}get el(){return i(this)}};d.style=":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:transparent;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker--fixed-max-width .date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-state-hovered)}.date-picker__next-month-button:active,.date-picker__previous-month-button:active{background-color:var(--s-state-pressed)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:transparent;font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular)}.date-picker--fixed-aspect-ratio .date-picker__weekday{aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0;aspect-ratio:1;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto}.date-picker__date:hover:before{background-color:var(--s-state-hovered)}.date-picker--fixed-aspect-ratio .date-picker__date{aspect-ratio:1}.date-picker__date--current:before{background-color:var(--s-state-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";const l=class{constructor(t){e(this,t),this.size=24}render(){const e=20===this.size?24:this.size,t={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},a=n("swirl-icon",`swirl-icon--size-${this.size}`),i=Boolean(this.label);return r("svg",{key:"582adf5a7e27aaa21ba1566ea577c6a11b8358ee","aria-hidden":i?void 0:"true",class:a,fill:"none",height:this.size,part:"icon",role:i?"img":void 0,style:t,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},i&&r("title",{key:"f413af85b915d58d20189b2d4703d49013ac6671"},this.label),16===this.size&&r(o,{key:"57f1e5479e0a4568a53fc2080f4cd18580d195b3"},r("path",{key:"85094b936b32822694e1b251dde8996e597fe5ca",d:"M6 10.9999C5.53333 10.9999 5.13889 10.8388 4.81667 10.5166C4.49444 10.1944 4.33333 9.79992 4.33333 9.33325C4.33333 8.86658 4.49444 8.47214 4.81667 8.14992C5.13889 7.8277 5.53333 7.66658 6 7.66658C6.46667 7.66658 6.86111 7.8277 7.18333 8.14992C7.50556 8.47214 7.66667 8.86658 7.66667 9.33325C7.66667 9.79992 7.50556 10.1944 7.18333 10.5166C6.86111 10.8388 6.46667 10.9999 6 10.9999ZM3.33333 14.6666C2.96667 14.6666 2.65267 14.5361 2.39133 14.2753C2.13044 14.0139 2 13.6999 2 13.3333V3.99992C2 3.63325 2.13044 3.31947 2.39133 3.05859C2.65267 2.79725 2.96667 2.66659 3.33333 2.66659H4V1.99992C4 1.81103 4.06378 1.65259 4.19133 1.52459C4.31933 1.39703 4.47778 1.33325 4.66667 1.33325C4.85556 1.33325 5.014 1.39703 5.142 1.52459C5.26956 1.65259 5.33333 1.81103 5.33333 1.99992V2.66659H10.6667V1.99992C10.6667 1.81103 10.7307 1.65259 10.8587 1.52459C10.9862 1.39703 11.1444 1.33325 11.3333 1.33325C11.5222 1.33325 11.6804 1.39703 11.808 1.52459C11.936 1.65259 12 1.81103 12 1.99992V2.66659H12.6667C13.0333 2.66659 13.3473 2.79725 13.6087 3.05859C13.8696 3.31947 14 3.63325 14 3.99992V13.3333C14 13.6999 13.8696 14.0139 13.6087 14.2753C13.3473 14.5361 13.0333 14.6666 12.6667 14.6666H3.33333ZM3.33333 13.3333H12.6667V6.66658H3.33333V13.3333ZM3.33333 5.33325H12.6667V3.99992H3.33333V5.33325Z",fill:"currentColor"})),(20===this.size||24===this.size)&&r(o,{key:"d5f11b0145b91865ff8a16afe93bba261ee81877"},r("path",{key:"dce1f161fef1cc2de373ab9c001dd79e44f6971d",d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z",fill:"currentColor"})),28===this.size&&r(o,{key:"7fef989f84f82f529567a06b04e27c036d7c106b"},r("path",{key:"78ecae9b23c9fedbffceb1fdd0585353a247cf0d",d:"M10.5 19.2499C9.68333 19.2499 8.99306 18.968 8.42917 18.4041C7.86528 17.8402 7.58333 17.1499 7.58333 16.3333C7.58333 15.5166 7.86528 14.8263 8.42917 14.2624C8.99306 13.6985 9.68333 13.4166 10.5 13.4166C11.3167 13.4166 12.0069 13.6985 12.5708 14.2624C13.1347 14.8263 13.4167 15.5166 13.4167 16.3333C13.4167 17.1499 13.1347 17.8402 12.5708 18.4041C12.0069 18.968 11.3167 19.2499 10.5 19.2499ZM5.83333 25.6666C5.19167 25.6666 4.64217 25.4383 4.18483 24.9818C3.72828 24.5244 3.5 23.9749 3.5 23.3333V6.99992C3.5 6.35825 3.72828 5.80914 4.18483 5.35259C4.64217 4.89525 5.19167 4.66659 5.83333 4.66659H7V3.49992C7 3.16936 7.11161 2.89209 7.33483 2.66809C7.55883 2.44486 7.83611 2.33325 8.16667 2.33325C8.49722 2.33325 8.7745 2.44486 8.9985 2.66809C9.22172 2.89209 9.33333 3.16936 9.33333 3.49992V4.66659H18.6667V3.49992C18.6667 3.16936 18.7787 2.89209 19.0027 2.66809C19.2259 2.44486 19.5028 2.33325 19.8333 2.33325C20.1639 2.33325 20.4408 2.44486 20.664 2.66809C20.888 2.89209 21 3.16936 21 3.49992V4.66659H22.1667C22.8083 4.66659 23.3578 4.89525 23.8152 5.35259C24.2717 5.80914 24.5 6.35825 24.5 6.99992V23.3333C24.5 23.9749 24.2717 24.5244 23.8152 24.9818C23.3578 25.4383 22.8083 25.6666 22.1667 25.6666H5.83333ZM5.83333 23.3333H22.1667V11.6666H5.83333V23.3333ZM5.83333 9.33325H22.1667V6.99992H5.83333V9.33325Z",fill:"currentColor"})))}};l.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}.icon-wrapper{display:inline-flex;justify-content:center;align-items:center;border-radius:var(--s-border-radius-full-round);background-color:var(--s-surface-raised-default)}.icon-wrapper--size-xs{width:16px;height:16px}.icon-wrapper--size-s{width:20px;height:20px}.icon-wrapper--size-m{width:24px;height:24px}.icon-wrapper--size-l{width:28px;height:28px}.icon-wrapper--size-xl{width:32px;height:32px}.icon-wrapper--size-2xl{width:40px;height:40px}.icon-wrapper--background-color-neutral{background-color:var(--s-surface-raised-default);color:var(--s-icon-default)}.icon-wrapper--background-color-banana{background-color:var(--s-decorative-banana-surface-subdued);color:var(--s-decorative-banana-text)}.icon-wrapper--background-color-blueberry{background-color:var(--s-decorative-blueberry-surface-subdued);color:var(--s-decorative-blueberry-text)}.icon-wrapper--background-color-chilli{background-color:var(--s-decorative-chilli-surface-subdued);color:var(--s-decorative-chilli-text)}.icon-wrapper--background-color-grape{background-color:var(--s-decorative-grape-surface-subdued);color:var(--s-decorative-grape-text)}.icon-wrapper--background-color-kiwi{background-color:var(--s-decorative-kiwi-surface-subdued);color:var(--s-decorative-kiwi-text)}.icon-wrapper--background-color-pumpkin{background-color:var(--s-decorative-pumpkin-surface-subdued);color:var(--s-decorative-pumpkin-text)}.icon-wrapper--background-color-radish{background-color:var(--s-decorative-radish-surface-subdued);color:var(--s-decorative-radish-text)}.icon-wrapper--background-color-default{background-color:var(--s-background-default);color:var(--s-icon-default)}";export{d as swirl_date_picker,l as swirl_icon_today}
@@ -1 +0,0 @@
1
- import{r as i,c as e,h as o,a,d as t}from"./p-BdGaOt5L.js";import{c as d}from"./p-orsBiyT_.js";import{v as s}from"./p-DD3477fe.js";const n=class{constructor(o){i(this,o),this.expansionChange=e(this,"expansionChange",7),this.headingLevel=2,this.itemId=s(),this.expanded=!1,this.headingId=`${s()}-heading`,this.onHeadingClick=()=>{this.toggle()}}componentWillLoad(){if(this.accordion=this.el.closest("swirl-accordion"),this.expanded=this.initiallyOpen&&!this.disabled||!1,!Boolean(this.accordion))throw new Error("[Swirl] swirl-accordion-item must be a child of a swirl-accordion.")}async collapse(){this.expanded&&!this.disabled&&(this.expanded=!1,this.expansionChange.emit(this.expanded))}async expand(){this.expanded||this.disabled||(this.expanded=!0,this.expansionChange.emit(this.expanded))}async toggle(){this.expanded?this.collapse():this.expand()}render(){const i=`h${this.headingLevel}`,e=d("accordion-item",{"accordion-item--expanded":this.expanded});return o(a,{key:"9eb402da9e5382bc658a3bf2bcc6a4e6fc83eb15"},o("div",{key:"baf87dc91914002c5c26dd360a11520b0059638f",class:e},o(i,{key:"a80584ad5c65a7f6a1ddbc504c456dedd4d8ae50",class:"accordion-item__heading"},o("button",{key:"2a99df8d96f34a7b7e0f9c7838e052f79881f5da","aria-controls":this.itemId,"aria-expanded":String(this.expanded),class:"accordion-item__toggle",disabled:this.disabled,id:this.headingId,onClick:this.onHeadingClick,type:"button"},o("slot",{key:"f81381e388c95ba7ab3fddaf9622cf8036289dfd",name:"media"}),o("span",{key:"bc855d5d5fc262c67478d00e5b4979f9f573c465",class:"accordion-item__toggle-text"},this.heading,this.description&&o("swirl-text",{key:"e84613303533dbc57b2e8fbf78ae0b8682631fd7",as:"span",color:"subdued",size:"sm"},this.description)),o("slot",{key:"c441d88ef4e97bb0a0be9b6b79f3c2a4976bc82f",name:"trailing"}),o("span",{key:"1fd5da1543bd83149408f79521aec30d8cfea3e8",class:"accordion-item__icon"},!this.expanded&&o("swirl-icon",{key:"05616a2e22f5f9154654bac3e015bb9ad968bd79",glyph:"chevron-right",size:20}),this.expanded&&o("swirl-icon",{key:"eb1e3be7c7ef2153c195d87d9170d76b56627f24",glyph:"expand-more",size:20})))),o("div",{key:"ea15a0c40f8b32194b1acd5f1c6be4db8fbf1f82","aria-labelledby":this.headingId,class:"accordion-item__content",id:this.itemId,role:"region"},o("slot",{key:"b85f37fcc199ba95c68f049bc15470dc224f5c2b"}))))}get el(){return t(this)}};n.style=":host{display:block}:host *{box-sizing:border-box}.accordion-item{display:grid;align-content:start;border-top:0.0625rem solid var(--s-border-default);transition:grid-template-rows 0.15s;grid-template-rows:auto 0fr;will-change:grid-template-rows}@media (prefers-reduced-motion){.accordion-item{transition:none}}.accordion-item--expanded{grid-template-rows:auto 1fr}.accordion-item--expanded .accordion-item__content{padding-top:var(--s-space-16);padding-bottom:var(--s-space-16);animation:accordion-overflow 0.01s;animation-delay:0.15s;animation-fill-mode:forwards}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.accordion-item--expanded .accordion-item__content{padding-top:var(--s-space-8)}}.accordion-item__heading{margin:0;padding:0;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-semibold)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.accordion-item__heading{font-size:var(--s-font-size-sm)}}.accordion-item__toggle{display:flex;width:100%;padding:0;padding-top:var(--s-space-16);padding-bottom:var(--s-space-16);padding-left:var(--s-space-8);align-items:center;border:none;color:var(--s-text-default);background-color:var(--swirl-accordion-item-toggle-default);font:inherit;line-height:var(--s-line-height-lg);text-align:start;cursor:pointer;gap:var(--s-space-16)}.accordion-item__toggle:hover{background-color:var(--swirl-accordion-item-toggle-hovered)}.accordion-item__toggle:active{background-color:var(--swirl-accordion-item-toggle-pressed)}.accordion-item__toggle:disabled{color:var(--s-text-disabled);background-color:var(--swirl-accordion-item-toggle-default);cursor:default}.accordion-item__toggle:disabled .text{color:var(--s-text-disabled)}.accordion-item__toggle:focus:not(:focus-visible){outline:none}.accordion-item__toggle:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.accordion-item__toggle{line-height:var(--s-line-height-sm)}}.accordion-item__toggle-text{flex-grow:1}.accordion-item__icon{display:inline-flex;padding-right:var(--s-space-8);flex-shrink:0}.accordion-item__content{overflow:hidden;padding-top:0;padding-bottom:0;transition:padding-top 0.15s, padding-bottom 0.15s;animation:accordion-display 0.01s;animation-delay:0.15s;animation-fill-mode:forwards}@media (prefers-reduced-motion){.accordion-item__content{transition:none}}@keyframes accordion-overflow{from{overflow:hidden}to{overflow:visible}}@keyframes accordion-display{from{display:block}to{display:none}}";export{n as swirl_accordion_item}
@@ -1 +0,0 @@
1
- import{r as i,c,h as r,a as s,d as a}from"./p-BdGaOt5L.js";import{c as e}from"./p-orsBiyT_.js";import{D as t}from"./p-Bfn7CHM9.js";import"./p-CCck-DTo.js";const h=class{constructor(r){i(this,r),this.chipClick=c(this,"chipClick",7),this.removeChip=c(this,"remove",7),this.borderRadius="pill",this.iconColor="default",this.intent="default",this.interactive=!1,this.progressBarLabel="Loading progress",this.removeButtonLabel="Remove",this.size="m",this.variant="outline",this.mediaQueryUnsubscribe=()=>{}}componentDidLoad(){this.mediaQueryUnsubscribe=t.subscribe((i=>{this.isDesktop=i,this.forceIconProps()}))}componentDidRender(){this.forceIconProps()}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(){if(!Boolean(this.iconEl)&&!Boolean(this.trailingIconEl))return;const i="s"===this.size?"16":this.isDesktop?"20":"24";if(this.iconEl){const c=this.iconEl.children[0];c?.setAttribute("size",i)}if(this.trailingIconEl){const c=this.trailingIconEl.children[0];c?.setAttribute("size",i)}}render(){const i=this.interactive||void 0!==this.pressed?"button":"span",c=Boolean(this.el.querySelector('[slot="avatar"]')),a=!c&&Boolean(this.icon),t=Boolean(this.el.querySelector('[slot="trailing-content"]')),h=e("chip",`chip--border-radius-${this.borderRadius}`,`chip--icon-color-${this.iconColor}`,`chip--intent-${this.intent}`,`chip--size-${this.size}`,`chip--variant-${this.variant}`,{"chip--pressed":this.pressed,"chip--has-progress":void 0!==this.progress,"chip--interactive":this.interactive||void 0!==this.pressed,"chip--removable":this.removable});return r(s,{key:"42fb03e9b8bc0bdb5158411533822029fc2f7172"},r(i,{key:"a9353bcf8da70ba240ff50ab36d7983a51ab5d89","aria-pressed":void 0!==this.pressed?String(this.pressed):void 0,class:h,onClick:this.chipClick.emit,type:this.interactive?"button":void 0},r("span",{key:"ded71dbe3387cabb8254e279aeb9ccc3f9d6b878",class:"chip__inner"},c&&r("span",{key:"b23cb213584d989ca408a3f918b2f62dfbefd31b",class:"chip__avatar"},r("slot",{key:"4a0a97de89ce85b6a3043ba70011d389d4d8567b",name:"avatar"})),a&&r("span",{key:"908d96c06ccc0487da381b854103c9a3bc21da90",class:"chip__icon",innerHTML:this.icon,ref:i=>this.iconEl=i}),r("span",{key:"388a801b5e203a2dcbe9428d6d241632eb8308fc",class:"chip__label"},this.label),this.trailingIcon&&r("span",{key:"4b25f552a160cce2d9dba87dd5209b8db73ad003",class:"chip__trailing-icon",innerHTML:this.trailingIcon,ref:i=>this.trailingIconEl=i}),t&&r("span",{key:"ddc653637a58b3739c699040ba4e67439c8691e5",class:"chip__trailing-content"},r("slot",{key:"b98d5c932c275412566b46b4712a691e944b27ad",name:"trailing-content"}))),void 0!==this.progress&&r("span",{key:"4a9759a58972fc4b61458c8aeaf01aa57e4dc995",class:"chip__progress-indicator"},r("swirl-progress-indicator",{key:"d8f93347e50e9e815fc6c7c6df9a3bf54df10a98",label:this.progressBarLabel,value:this.progress}))),this.removable&&r("button",{key:"3823bdc2bf504ce3c292c3ff40e50125d05c92da","aria-label":this.removeButtonLabel,class:"chip__remove-button",onClick:this.removeChip.emit,type:"button"},r("swirl-icon-close",{key:"64576204b99032780f4bbf35a77fb94959a80ab9",size:20})))}get el(){return a(this)}};h.style='.sc-swirl-chip-h{position:relative;display:inline-flex;max-width:100%}.sc-swirl-chip-h *.sc-swirl-chip{box-sizing:border-box}.chip.sc-swirl-chip{display:inline-flex;overflow:hidden;max-width:100%;height:2.25rem;padding:0;border:0.0625rem solid var(--s-border-default);border-radius:1.25rem;color:var(--s-text-subdued);background-color:transparent;font:inherit;font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);flex-direction:column}.chip--size-s.sc-swirl-chip{height:2rem}.chip--size-s.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:calc(1.5rem + var(--s-space-12))}.chip--size-s.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:var(--s-space-12);padding-left:var(--s-space-12)}.chip--size-s.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{top:var(--s-space-4);width:1.5rem;height:1.5rem}.chip--interactive.sc-swirl-chip{cursor:pointer}.chip--interactive.sc-swirl-chip:hover{background-color:var(--s-state-hovered)}.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip::part(avatar),.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip [part~="avatar"]{background-color:var(--s-surface-raised-hovered)}.chip--interactive.sc-swirl-chip:active{background-color:var(--s-state-pressed)}.chip--interactive.sc-swirl-chip:active .sc-swirl-chip::part(avatar),.chip--interactive.sc-swirl-chip:active .sc-swirl-chip [part~="avatar"]{background-color:var(--s-surface-raised-pressed)}.chip--icon-color-highlight.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-highlight)}.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:calc(1.875rem + var(--s-space-12))}.chip--intent-critical.sc-swirl-chip{border-color:var(--s-border-critical);color:var(--s-text-critical)}.chip--intent-critical.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-critical)}.chip--border-radius-sm.sc-swirl-chip{border-radius:var(--s-border-radius-sm)}.chip--intent-success.sc-swirl-chip{border-color:var(--s-border-success);color:var(--s-text-success)}.chip--intent-success.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-success)}.chip--intent-highlight.sc-swirl-chip{border-color:var(--s-border-highlight);color:var(--s-text-highlight)}.chip--intent-highlight.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-highlight)}.chip--variant-outline.chip--pressed.sc-swirl-chip,.chip--variant-translucent.chip--pressed.sc-swirl-chip{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default);border-color:var(--s-action-primary-default)}.chip--variant-outline.chip--pressed.sc-swirl-chip .chip__icon.sc-swirl-chip,.chip--variant-translucent.chip--pressed.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-text-on-action-primary)}.chip--variant-outline.chip--pressed.sc-swirl-chip:hover,.chip--variant-translucent.chip--pressed.sc-swirl-chip:hover{background-color:var(--s-action-primary-hovered)}.chip--variant-outline.chip--pressed.sc-swirl-chip:active,.chip--variant-translucent.chip--pressed.sc-swirl-chip:active{background-color:var(--s-action-primary-pressed)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip,.chip--variant-translucent.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:hover,.chip--variant-translucent.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:hover{background-color:var(--s-action-primary-hovered)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:active,.chip--variant-translucent.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:active{background-color:var(--s-action-primary-pressed)}.chip--variant-translucent.sc-swirl-chip{background:var(--s-translucent-medium-default);-webkit-backdrop-filter:blur(var(--s-blur-s));backdrop-filter:blur(var(--s-blur-s))}.chip--variant-translucent.chip--interactive.sc-swirl-chip:hover{background:var(--s-translucent-medium-hovered)}.chip--variant-translucent.chip--interactive.sc-swirl-chip:active{background:var(--s-translucent-medium-pressed)}.chip--variant-plain.sc-swirl-chip{height:auto;border:none;border-radius:0;background-color:transparent}.chip--variant-plain.chip--interactive.sc-swirl-chip:hover{background-color:transparent;text-decoration:underline;text-underline-offset:var(--s-space-4)}.chip--variant-plain.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip::part(avatar),.chip--variant-plain.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip [part~="avatar"]{background-color:var(--s-surface-raised-hovered)}.chip--variant-plain.chip--interactive.sc-swirl-chip:active{background-color:transparent}.chip--variant-plain.chip--interactive.sc-swirl-chip:active .sc-swirl-chip::part(avatar),.chip--variant-plain.chip--interactive.sc-swirl-chip:active .sc-swirl-chip [part~="avatar"]{background-color:var(--s-surface-raised-pressed)}.chip--variant-plain.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:var(--s-space-12)}.chip--variant-plain.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{position:relative;top:0;right:auto}.chip--variant-plain.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:0;padding-left:0}.chip--variant-plain.sc-swirl-chip .chip__icon.sc-swirl-chip,.chip--variant-plain.sc-swirl-chip .chip__avatar.sc-swirl-chip{margin-left:0}.chip--has-progress.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{top:0.1875rem}.chip--has-progress.sc-swirl-chip:not(.chip--size-s)+.chip__remove-button.sc-swirl-chip{top:0.0625rem}.chip__inner.sc-swirl-chip{display:inline-flex;max-width:100%;height:100%;padding-right:var(--s-space-16);padding-left:var(--s-space-16);align-items:center}.chip__avatar.sc-swirl-chip,.chip__icon.sc-swirl-chip{display:inline-flex;margin-right:var(--s-space-8);flex-shrink:0}.chip__avatar.sc-swirl-chip{overflow:hidden;width:1.75rem;height:1.75rem;margin-left:-0.625rem}.chip__icon.sc-swirl-chip{margin-left:-0.25rem;color:var(--s-icon-default)}.chip__trailing-icon.sc-swirl-chip,.chip__trailing-content.sc-swirl-chip{display:inline-flex;flex-shrink:0;margin-left:var(--s-space-8)}.chip__label.sc-swirl-chip{overflow:hidden;flex-grow:1;white-space:nowrap;text-overflow:ellipsis}.chip__progress-indicator.sc-swirl-chip{width:100%}.chip__remove-button.sc-swirl-chip{position:absolute;top:0.1875rem;right:var(--s-space-4);display:inline-flex;width:1.875rem;height:1.875rem;padding:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.chip__remove-button.sc-swirl-chip:hover{background-color:var(--s-state-hovered)}.chip__remove-button.sc-swirl-chip:active{background-color:var(--s-state-pressed)}';export{h as swirl_chip}
@@ -1 +0,0 @@
1
- import{r as e,c as s,h as i,a as r,d as t}from"./p-BdGaOt5L.js";import{c as o}from"./p-orsBiyT_.js";import{D as l}from"./p-Bfn7CHM9.js";import{v as c}from"./p-DD3477fe.js";import"./p-CCck-DTo.js";const a=class{constructor(i){e(this,i),this.toggleDrag=s(this,"toggleDrag",7),this.valueChange=s(this,"valueChange",7),this.checked=!1,this.dragHandleDescription="Press spacebar to toggle grab",this.dragHandleLabel="Move item",this.interactive=!0,this.labelWeight="medium",this.labelTooltipPosition="top",this.menuTriggerLabel="Options",this.hasMedia=!1,this.iconSize=24,this.elementId=c(),this.mediaQueryUnsubscribe=()=>{},this.onClick=()=>{this.selectable&&(this.checked=!this.checked,this.valueChange.emit(this.checked))},this.onBlur=()=>{this.makeControlUnfocusable()},this.onFocus=()=>{this.makeControlFocusable()},this.onMenuTriggerClick=e=>{this.disabled&&!Boolean(this.href)&&e.stopPropagation()},this.onDragHandleKeyDown=e=>{"Space"!==e.code&&"Enter"!==e.code||(e.preventDefault(),this.toggleDrag.emit(this.el))},this.onControlClick=e=>{e.preventDefault(),e.stopPropagation()}}componentWillLoad(){this.updateMediaState()}componentDidLoad(){this.parentSemantics=this.el.closest("swirl-resource-list")?.semantics,this.mediaQueryUnsubscribe=l.subscribe((e=>{this.forceIconProps(e),this.updateIconSize(e)})),this.makeControlUnfocusable(),Boolean(this.menuTriggerId)&&console.warn('[Swirl] The "menu-trigger-id" prop of swirl-resource-list-item is deprecated and will be removed with the next major release. Please use the "control" slot to add a menu button instead. https://swirl-storybook.flip-app.dev/?path=/docs/components-swirlresourcelistitem--docs')}disconnectedCallback(){this.mediaQueryUnsubscribe()}get hasBadges(){return Boolean(this.el.querySelector("[slot='badges']"))}get showMeta(){return(Boolean(this.meta)||this.hasBadges)&&!this.selectable}forceIconProps(e){const s=this.iconEl?.children[0];s?.setAttribute("size",e?"20":"24")}updateIconSize(e){this.iconSize=e?20:24}updateMediaState(){const e=this.el.querySelector('[slot="media"]'),s=Boolean(e);s!==this.hasMedia&&(this.hasMedia=s)}getControl(){return this.el.querySelector('[slot="control"] button')}makeControlFocusable(){if("grid"!==this.parentSemantics)return;const e=this.getControl();Boolean(e)&&(e.tabIndex=0)}makeControlUnfocusable(){if("grid"!==this.parentSemantics)return;const e=this.getControl();Boolean(e)&&(e.tabIndex=-1)}render(){const e=this.interactive||this.selectable?Boolean(this.href)&&!this.selectable?"a":"button":"div",s="a"===e,t=this.disabled&&!Boolean(this.href),l=this.hasBadges,c=this.el.querySelector("[slot='control']"),a=Boolean(this.menuTriggerId)||c,n=this.interactive&&Boolean(this.href)?this.href:void 0,m=c&&(Boolean(this.meta)||l),u=Boolean(this.menuTriggerId)&&!Boolean(this.meta)&&!this.selectable,d=this.showMeta,h=Boolean(this.swirlAriaLabel)?this.swirlAriaLabel:this.label,w=this.selectable?String(this.checked):void 0,b=this.interactive&&this.selectable?"checkbox":void 0,p=this.el.closest('[role="grid"]')?"row":"listitem",g="row"===p?"gridcell":void 0,v={minHeight:this.labelMinHeight??void 0},f=()=>i("span",{key:"537dd934195837b1f62852e91bc8d3e60fd7163a",class:"resource-list-item__label",id:this.elementId,innerHTML:this.allowHtml?this.label:void 0,style:{"-webkit-line-clamp":this.labelWrapMaxLines?String(this.labelWrapMaxLines):void 0}},!this.allowHtml&&this.label),_=o("resource-list-item",`resource-list-item--label-weight-${this.labelWeight}`,{"resource-list-item--active":this.active,"resource-list-item--checked":this.checked,"resource-list-item--compact":this.compact,"resource-list-item--disabled":this.disabled,"resource-list-item--draggable":this.allowDrag,"resource-list-item--dragging":this.dragging,"resource-list-item--has-control":c,"resource-list-item--has-menu":a,"resource-list-item--hide-divider":this.hideDivider,"resource-list-item--interactive":this.interactive||this.selectable,"resource-list-item--selectable":this.selectable,"resource-list-item--show-control-on-focus":m,"resource-list-item--show-meta":d,"resource-list-item--wrap-description":this.descriptionWrap,"resource-list-item--wrap-label":this.labelWrap,"resource-list-item--wrap-label-max-lines":this.labelWrapMaxLines});return i(r,{key:"a0ec97096aa526c5506f5d1a7335da572c4254b0",role:p},i("div",{key:"938a0d902c62c49d5b0de62ba0b90000488b4a21",class:_,role:g,onClick:this.onClick},i(e,{key:"1fb212f7ce32d64a384885f9a5270f50eed52ff9","aria-checked":w,"aria-current":this.swirlAriaCurrent,"aria-disabled":t?"true":void 0,"aria-label":h,"aria-labelledby":Boolean(this.swirlAriaLabel)?void 0:this.elementId,class:"resource-list-item__content",style:{alignItems:this.alignItems},href:n,rel:s?this.rel:void 0,target:s?this.target:void 0,disabled:t,onBlur:this.onBlur,onFocus:this.onFocus,part:"resource-list-item__content",role:b,tabIndex:0,type:"button"===e?"button":void 0},this.hasMedia&&i("span",{key:"e1138053996443398d9cfcd9b18f330adf2607f6",class:"resource-list-item__media"},i("slot",{key:"765b883ef7628e0dbee7a617f0f99b3024a88ea6",name:"media"})),i("span",{key:"cd30b88132e3f76cbef1b3b438c63530a89fd4d7",class:"resource-list-item__label-container",style:v},this.labelTooltip?i("swirl-tooltip",{content:this.labelTooltip,position:this.labelTooltipPosition},f()):f(),this.description&&i("span",{key:"998fc6d09b7635155a36ec506083f396f4354d5f",class:"resource-list-item__description",innerHTML:this.allowHtml?this.description:void 0},!this.allowHtml&&this.description))),this.selectable&&i("span",{key:"35ffd1950959e8d98f32382bd0e48c2da3e87a08","aria-hidden":"true",class:"resource-list-item__checkbox"},i("span",{key:"26552aaa887512090f252ed529f272285b92ec7e",class:"resource-list-item__checkbox-icon"},this.checked&&i("swirl-icon-check-strong",{key:"47a8f92c70cc64c9a8f9bd0f3ce292f5c9ab9945"}))),d&&i("span",{key:"aad790a9b0535ff56160deed65d8c3c075e05775",class:"resource-list-item__meta"},this.meta&&i("span",{key:"cc91b6058aa3b282281dcc9122963b5ad7562325",class:"resource-list-item__meta-text"},this.meta),i("span",{key:"a51f75703daa74c1708565d4a187278dbb2f6fcf",class:"resource-list-item__badges"},i("slot",{key:"1e2a61cb3e1461b22af8f1da955b3029a041ddf3",name:"badges"}))),i("span",{key:"aceeb9ef206093840ba980cd3557f020aa86fb1d",class:"resource-list-item__control",onClick:this.onControlClick},i("slot",{key:"1e6075743a17cd29a1ea7d97863d111ddb3d85f2",name:"control"})),u&&i("swirl-popover-trigger",{key:"5d5aac56bf7f9fce6c6be8804cec45e2ed233f83",swirlPopover:this.menuTriggerId},i("swirl-button",{key:"34e4baf52d5b6c49f29bba1685e31e01d071555e","aria-disabled":t?"true":void 0,class:"resource-list-item__menu-trigger",disabled:t,hideLabel:!0,icon:"<swirl-icon-more-horizontal></swirl-icon-more-horizontal>",intent:"primary",label:this.menuTriggerLabel,onClick:this.onMenuTriggerClick}))),this.allowDrag&&i("button",{key:"2ab8938f948dd60903da5f39d6363d8d91cc6e16","aria-describedby":this.dragHandleDescription,"aria-label":`${this.dragHandleLabel} "${this.label}"`,class:"resource-list-item__drag-handle",onKeyDown:this.onDragHandleKeyDown,type:"button"},i("swirl-icon-drag-handle",{key:"cef7c5a979ec10453a31866e3f1e2ceaed9f9129",size:this.iconSize})))}get el(){return t(this)}};a.style='.sc-swirl-resource-list-item-h{position:relative;display:block;width:100%}.sc-swirl-resource-list-item-h *.sc-swirl-resource-list-item{box-sizing:border-box}[aria-selected="true"].sc-swirl-resource-list-item-h .resource-list-item.sc-swirl-resource-list-item{background-color:var(--swirl-resource-list-item-background-hovered)}[aria-selected="true"].sc-swirl-resource-list-item-h .resource-list-item.sc-swirl-resource-list-item .resource-list-item__media.sc-swirl-resource-list-item,[aria-selected="true"].sc-swirl-resource-list-item-h .resource-list-item.sc-swirl-resource-list-item .resource-list-item__meta.sc-swirl-resource-list-item{--swirl-avatar-background-color:var(--s-surface-raised-hovered)}.swirl-resource-list-item--drag.sc-swirl-resource-list-item-h{border-radius:var(--s-border-radius-sm);background-color:var(--s-translucent-medium-pressed)}.resource-list-item.sc-swirl-resource-list-item{position:relative;width:100%;display:flex;overflow:hidden;padding:var(--s-space-12) var(--s-space-8);gap:var(--s-space-12);border-radius:var(--s-border-radius-sm);background-color:var(--swirl-resource-list-item-background-default);--swirl-badge-border-color:transparent}.resource-list-item.sc-swirl-resource-list-item:has(.resource-list-item__content:focus-visible){background-color:var(--swirl-resource-list-item-background-hovered);outline-color:var(--s-focus-default);outline-style:solid;outline-width:0.125rem;z-index:1}.resource-list-item.sc-swirl-resource-list-item:not(.resource-list-item--has-control) .resource-list-item__control.sc-swirl-resource-list-item{display:none}.resource-list-item--interactive.sc-swirl-resource-list-item{cursor:pointer}.resource-list-item--interactive.sc-swirl-resource-list-item .resource-list-item__content.sc-swirl-resource-list-item{cursor:pointer}.resource-list-item--interactive.sc-swirl-resource-list-item .resource-list-item__content.sc-swirl-resource-list-item:disabled{cursor:default}.resource-list-item--interactive.resource-list-item--disabled.sc-swirl-resource-list-item{cursor:default}.resource-list-item--interactive.sc-swirl-resource-list-item:hover:not(.resource-list-item--disabled),.resource-list-item--interactive.sc-swirl-resource-list-item:focus-visible:not(.resource-list-item--disabled){background-color:var(--swirl-resource-list-item-background-hovered)}.resource-list-item--interactive.sc-swirl-resource-list-item:hover:not(.resource-list-item--disabled) .resource-list-item__media.sc-swirl-resource-list-item,.resource-list-item--interactive.sc-swirl-resource-list-item:hover:not(.resource-list-item--disabled) .resource-list-item__meta.sc-swirl-resource-list-item,.resource-list-item--interactive.sc-swirl-resource-list-item:focus-visible:not(.resource-list-item--disabled) .resource-list-item__media.sc-swirl-resource-list-item,.resource-list-item--interactive.sc-swirl-resource-list-item:focus-visible:not(.resource-list-item--disabled) .resource-list-item__meta.sc-swirl-resource-list-item{--swirl-avatar-background-color:var(--s-surface-raised-hovered)}.resource-list-item--interactive.sc-swirl-resource-list-item:active:not(.resource-list-item--disabled){background-color:var(--swirl-resource-list-item-background-pressed)}.resource-list-item--active.sc-swirl-resource-list-item{--swirl-badge-border-color:var( --swirl-resource-list-item-background-hovered );background-color:var(--swirl-resource-list-item-background-hovered)}.resource-list-item--checked.sc-swirl-resource-list-item .resource-list-item__checkbox.sc-swirl-resource-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.resource-list-item--compact.sc-swirl-resource-list-item{padding:var(--s-space-8)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.resource-list-item--compact.sc-swirl-resource-list-item{padding:var(--s-space-8)}}.resource-list-item--compact.sc-swirl-resource-list-item .resource-list-item__label-container.sc-swirl-resource-list-item{min-height:2rem}@media (min-width: 768px){.resource-list-item--selectable.sc-swirl-resource-list-item .resource-list-item__content.sc-swirl-resource-list-item{padding-left:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}}.resource-list-item--selectable.sc-swirl-resource-list-item .resource-list-item__label-container.sc-swirl-resource-list-item{padding-right:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}@media (min-width: 768px){.resource-list-item--selectable.sc-swirl-resource-list-item .resource-list-item__label-container.sc-swirl-resource-list-item{padding-right:var(--s-space-16)}}.resource-list-item--label-weight-medium.sc-swirl-resource-list-item .resource-list-item__label.sc-swirl-resource-list-item{font-weight:var(--s-font-weight-medium)}.resource-list-item--label-weight-semibold.sc-swirl-resource-list-item .resource-list-item__label.sc-swirl-resource-list-item{font-weight:var(--s-font-weight-semibold)}.resource-list-item--label-weight-bold.sc-swirl-resource-list-item .resource-list-item__label.sc-swirl-resource-list-item{font-weight:var(--s-font-weight-bold)}@media (hover: hover){.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:hover .resource-list-item__control.sc-swirl-resource-list-item,.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:focus .resource-list-item__control.sc-swirl-resource-list-item,.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:focus-within .resource-list-item__control.sc-swirl-resource-list-item{pointer-events:auto;opacity:1;position:static;transform:none;margin:calc(-1 * var(--s-space-4)) 0}.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:hover .resource-list-item__meta.sc-swirl-resource-list-item,.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:focus .resource-list-item__meta.sc-swirl-resource-list-item,.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item:focus-within .resource-list-item__meta.sc-swirl-resource-list-item{margin-right:0;padding-right:0}.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item .resource-list-item__meta.sc-swirl-resource-list-item{margin-right:calc(-1 * var(--s-space-16));padding-right:var(--s-space-16);transition:margin 0.1s}.resource-list-item--show-control-on-focus.sc-swirl-resource-list-item .resource-list-item__control.sc-swirl-resource-list-item{pointer-events:none;opacity:0;position:absolute;top:50%;right:var(--s-space-8);transform:translateY(-50%);transition:opacity 0.1s}}.resource-list-item--draggable.sc-swirl-resource-list-item .resource-list-item__content.sc-swirl-resource-list-item{padding-left:calc(var(--s-space-12) * 2 + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.resource-list-item--draggable.sc-swirl-resource-list-item .resource-list-item__content.sc-swirl-resource-list-item{padding-left:calc(var(--s-space-12) * 2 + 1rem)}}.resource-list-item--dragging.sc-swirl-resource-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-state-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08), 0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.resource-list-item--dragging.sc-swirl-resource-list-item:hover:not(.resource-list-item--disabled){background-color:var(--s-state-pressed)}.resource-list-item--disabled.resource-list-item--checked.sc-swirl-resource-list-item .resource-list-item__checkbox.sc-swirl-resource-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-icon-disabled)}.resource-list-item--disabled.sc-swirl-resource-list-item .resource-list-item__checkbox.sc-swirl-resource-list-item{border-color:var(--s-icon-disabled);background-color:transparent}.resource-list-item--disabled.sc-swirl-resource-list-item .resource-list-item__checkbox-icon.sc-swirl-resource-list-item{color:var(--s-text-on-status)}.resource-list-item--wrap-description.sc-swirl-resource-list-item .resource-list-item__description.sc-swirl-resource-list-item{white-space:normal}.resource-list-item--wrap-label.sc-swirl-resource-list-item .resource-list-item__label.sc-swirl-resource-list-item{white-space:normal}.resource-list-item--wrap-label-max-lines.sc-swirl-resource-list-item .resource-list-item__label.sc-swirl-resource-list-item{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;white-space:normal}.resource-list-item__content.sc-swirl-resource-list-item{--swirl-avatar-group-border-color:transparent;display:flex;width:100%;min-width:0;margin:0;padding:0;align-items:flex-start;border:none;color:var(--s-text-default);background:none;font:inherit;line-height:var(--s-line-height-sm);text-align:left;text-decoration:none;gap:var(--s-space-12)}.resource-list-item__content.sc-swirl-resource-list-item:focus,.resource-list-item__content.sc-swirl-resource-list-item:focus-visible{outline:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.resource-list-item__content.sc-swirl-resource-list-item{line-height:var(--s-line-height-base)}}.resource-list-item__media.sc-swirl-resource-list-item{display:inline-flex;flex-shrink:0}.resource-list-item__label-container.sc-swirl-resource-list-item{position:relative;display:flex;height:100%;min-width:0;min-height:3rem;padding-right:var(--s-space-16);justify-content:center;flex-direction:column}.resource-list-item__label.sc-swirl-resource-list-item{overflow:hidden;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);white-space:nowrap;text-overflow:ellipsis}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.resource-list-item__label.sc-swirl-resource-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.resource-list-item__description.sc-swirl-resource-list-item{overflow:hidden;color:var(--s-text-subdued);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);white-space:nowrap;text-overflow:ellipsis}.resource-list-item__menu-trigger.sc-swirl-resource-list-item{position:absolute;top:50%;right:var(--s-space-16);transform:translateY(-50%)}.resource-list-item__control.sc-swirl-resource-list-item{align-self:center}.resource-list-item__checkbox.sc-swirl-resource-list-item{position:absolute;top:50%;right:var(--s-space-16);display:flex;width:1.125rem;height:1.125rem;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s);transform:translateY(-50%);pointer-events:none}@media (min-width: 768px){.resource-list-item__checkbox.sc-swirl-resource-list-item{right:auto;left:calc(var(--s-space-16) - var(--s-space-2))}}.resource-list-item__checkbox-icon.sc-swirl-resource-list-item{display:inline-flex;width:1.0625rem;height:1.0625rem}.resource-list-item__checkbox-icon.sc-swirl-resource-list-item>*.sc-swirl-resource-list-item::part(icon),.resource-list-item__checkbox-icon.sc-swirl-resource-list-item>*.sc-swirl-resource-list-item [part~="icon"]{width:1.0625rem;height:1.0625rem}.resource-list-item__meta.sc-swirl-resource-list-item{display:flex;align-items:flex-end;color:var(--s-text-subdued);font-size:var(--s-font-size-sm);flex-direction:column;align-self:flex-start;gap:var(--s-space-2)}.resource-list-item__meta.sc-swirl-resource-list-item:not(:has(.resource-list-item__meta-text)){align-self:center}.resource-list-item__meta-text.sc-swirl-resource-list-item{line-height:var(--s-line-height-base);margin-top:var(--s-space-2);white-space:nowrap}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.resource-list-item__meta-text.sc-swirl-resource-list-item{line-height:var(--s-line-height-sm);margin-top:var(--s-space-4)}}.resource-list-item__badges.sc-swirl-resource-list-item{display:inline-flex;width:-webkit-max-content;width:-moz-max-content;width:max-content}.resource-list-item__drag-handle.sc-swirl-resource-list-item{position:absolute;z-index:1;top:50%;left:var(--s-space-4);display:inline-flex;margin:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:grab;transform:translateY(-50%)}.resource-list-item__drag-handle.sc-swirl-resource-list-item:active{cursor:grabbing}.resource-list-item__drag-handle.sc-swirl-resource-list-item:focus:not(:focus-visible){outline:none}.resource-list-item__drag-handle.sc-swirl-resource-list-item:focus-visible{outline-color:var(--s-focus-default)}';export{a as swirl_resource_list_item}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,a as e,d as h}from"./p-BdGaOt5L.js";import{S as o}from"./p-CMrz6687.js";import{l,q as n}from"./p-CCck-DTo.js";import{v as a}from"./p-DD3477fe.js";const r=class{constructor(s){t(this,s),this.itemDrop=i(this,"itemDrop",7),this.valueChange=i(this,"valueChange",7),this.allowDeselect=!0,this.assistiveTextItemGrabbed="Item grabbed. Use arrow keys to move item up or down. Use spacebar to save position.",this.assistiveTextItemMoving="Current position:",this.assistiveTextItemMoved="Item moved. New position:",this.selectAllLabel="Select all",this.value=[],this.selectAllState=!1,this.componentLoaded=!1,this.selectAllValue=a(),this.onClick=t=>{t.preventDefault();const i=t.target,s=i?.closest("swirl-option-list-item"),e=t.composedPath()[0],h=Boolean(l(e,'[role="option"]'));if(Boolean(s)&&h)if(s.value===this.selectAllValue)this.selectAllChanged();else{const t=this.items.findIndex((t=>t.value===s.value));this.focusItem(t),this.selectItem(t)}else t.preventDefault()},this.onKeyDown=t=>{if("ArrowDown"===t.code)t.preventDefault(),Boolean(this.dragging)?this.moveDraggedItemDown():this.focusNextItem();else if("ArrowUp"===t.code)t.preventDefault(),Boolean(this.dragging)?this.moveDraggedItemUp():this.focusPreviousItem();else if("Space"===t.code||"Enter"===t.code){if(!t.target.classList.contains("option-list-item__drag-handle")&&Boolean(this.dragging))return t.preventDefault(),void this.stopDrag(this.dragging);const i=t.composedPath()[0],s=Boolean(l(i,'[role="option"]')),e=i?.closest("swirl-option-list-item")?.value===this.selectAllValue;if(!s&&!e)return;t.preventDefault(),Boolean(this.dragging)?this.stopDrag(this.dragging):e?this.selectAllChanged():this.selectFocusedItem()}else"Home"===t.code?(t.preventDefault(),this.showSelectAll?this.focusSelectAll():this.focusItem(0)):"End"===t.code?(t.preventDefault(),this.focusItem(this.items.length-1)):"KeyA"===t.code&&(t.metaKey||t.ctrlKey)&&this.multiSelect?(t.preventDefault(),this.selectAllItems()):"Tab"===t.code&&Boolean(this.dragging)&&t.preventDefault()},this.resetTabIndex=()=>{this.removeItemsTabIndex(),this.focusedItem=void 0;const t=this.items[0]?.querySelector('[role="option"]'),i=this.selectAllEl?.querySelector('[role="option"]');(i||t)?.setAttribute("tabIndex","0")},this.selectAllChanged=()=>{if(this.disabled)return;const t=this.items?.length||0;this.updateValue((this.value?.length||0)===t?[]:this.items.map((t=>t.value)))},this.toggleDrag=t=>{const i=t.detail;Boolean(this.dragging)?this.stopDrag(i):this.startDrag(i)},this.startDrag=t=>{this.dragging=t,this.draggingStartIndex=this.getItemIndex(this.dragging),t.setAttribute("dragging","true");const i=this.getItemIndex(this.dragging);this.focusItem(i),this.assistiveText=this.assistiveTextItemGrabbed},this.stopDrag=t=>{this.dragging=void 0,t.removeAttribute("dragging");const i=this.getActiveItemIndex();this.assistiveText=`${this.assistiveTextItemMoved} ${i+1}`,this.itemDrop.emit({item:t,oldIndex:this.draggingStartIndex,newIndex:i}),this.draggingStartIndex=void 0,this.focusItem(i)}}connectedCallback(){this.componentLoaded&&(this.observeSlotChanges(),this.subscribeToSwirlPopover(),this.setItemAllowDragState())}componentDidLoad(){this.updateItems(),this.observeSlotChanges(),this.setItemAllowDragState(),this.setItemDisabledState(),this.setItemContext(),this.syncItemsWithValue(),this.setupDragDrop(),this.setSectionSeparator(),this.setSelectAllState(),this.subscribeToSwirlPopover(),this.componentLoaded=!0}componentDidRender(){this.setupDragDrop()}disconnectedCallback(){this.unsubscribeFromSwirlPopover(),this.observer?.disconnect(),this.sortable?.destroy(),this.removeToggleDragListeners()}removeToggleDragListeners(){this.items?.forEach((t=>{t.removeEventListener("toggleDrag",this.toggleDrag)}))}watchAllowDrag(){this.setItemAllowDragState(),this.setupDragDrop()}watchDisabled(){this.setItemDisabledState()}watchMultiSelect(){this.setItemContext()}watchValue(){this.syncItemsWithValue(),this.setSelectAllState()}async focusItemWithValue(t){const i=this.items.findIndex((i=>i.value===t));i>=0&&this.focusItem(i)}observeSlotChanges(){this.observer=new MutationObserver((()=>{this.updateItems(),this.setItemAllowDragState(),this.setItemDisabledState(),this.setItemContext(),this.syncItemsWithValue(),this.setSelectAllState()})),this.observer.observe(this.listboxEl,{childList:!0,subtree:!0})}setSelectAllState(){const t=this.items?.length||0,i=this.value?.length||0;this.selectAllState=0!==t&&0!==i&&(i===t||"indeterminate")}updateItems(){this.removeToggleDragListeners(),this.items=n(this.el,"swirl-option-list-item").filter((t=>t.value!==this.selectAllValue)),this.selectAllEl?.querySelector('[tabindex="0"]')||this.items.some((t=>t.querySelector('[tabindex="0"]')))||this.resetTabIndex()}removeItemsTabIndex(){this.selectAllEl?.querySelector('[role="option"]')?.removeAttribute("tabIndex"),this.items.forEach((t=>t.querySelector('[role="option"]')?.removeAttribute("tabIndex")))}setItemDisabledState(){this.disabled&&this.items.forEach((t=>t.disabled=!0))}setItemContext(){this.multiSelect?this.items.forEach((t=>t.context="multi-select")):(this.items.forEach((t=>t.context="single-select")),this.value.length>1&&this.updateValue([this.value[0]]))}setupDragDrop(){Boolean(this.sortable)&&this.sortable.destroy(),this.allowDrag&&(this.sortable=o.create(this.listboxEl,{animation:150,draggable:'swirl-option-list-item[allow-drag="true"]',dragClass:"option-list-item--drag",handle:".option-list-item__drag-handle",onEnd:t=>{this.itemDrop.emit({item:t.item,oldIndex:t.oldIndex,newIndex:t.newIndex})}}))}setItemAllowDragState(){if(this.allowDrag&&!this.multiSelect)return void console.error("[SwirlOptionList] Drag can only be allowed for multi select lists.");const t=n(this.el,"swirl-option-list-section");this.allowDrag&&t.length>0?console.error("[SwirlOptionList] Drag can only be allowed for lists without sections."):this.items.forEach(this.allowDrag?t=>{t.setAttribute("allow-drag","true"),t.addEventListener("toggleDrag",this.toggleDrag)}:t=>{t.removeAttribute("allow-drag"),t.removeEventListener("toggleDrag",this.toggleDrag)})}selectItem(t){if(this.disabled)return;const i=this.items[t];if(i.disabled)return;const s=this.value.includes(i.value);s&&!this.allowDeselect||(this.multiSelect||(this.value=[]),this.updateValue(s?this.value.filter((t=>t!==i.value)):[...this.value,i.value]))}updateValue(t){this.value=t,this.valueChange.emit(this.value)}selectFocusedItem(){this.disabled||-1===this.getActiveItemIndex()||this.selectItem(this.getActiveItemIndex())}selectAllItems(){if(this.disabled)return;const t=this.items.every((t=>this.value.includes(t.value)));this.updateValue(t?[]:this.items.map((t=>t.value)))}syncItemsWithValue(){this.items?.forEach((t=>t.selected=this.value.includes(t.value)))}focusItem(t){if(this.disabled)return;this.removeItemsTabIndex();const i=this.items[t]?.querySelector('[role="option"]');Boolean(i)&&(i.setAttribute("tabIndex","0"),i.focus(),this.focusedItem=i)}focusNextItem(){if(this.disabled)return;const t=this.getActiveItemIndex(),i=Math.min(t+1,this.items.length-1);this.focusItem(i)}focusPreviousItem(){const t=this.getActiveItemIndex();if(t<=0&&this.showSelectAll)this.focusSelectAll();else{const i=Math.max(t-1,0);this.focusItem(i)}}focusSelectAll(){const t=this.selectAllEl?.querySelector('[role="option"]');t&&(this.removeItemsTabIndex(),t.setAttribute("tabIndex","0"),t.focus(),this.focusedItem=void 0)}getActiveItemIndex(){return Boolean(this.focusedItem)?this.items.map((t=>t.querySelector('[role="option"]'))).findIndex((t=>t===this.focusedItem)):Boolean(this.selectAllEl)?-1:0}getItemIndex(t){return this.items.map((t=>t)).findIndex((i=>i===t))}moveDraggedItemDown(){const t=this.dragging.nextElementSibling;Boolean(t)&&(t.after(this.dragging),this.updateItems(),this.listboxEl.focus(),this.assistiveText=`${this.assistiveTextItemMoving} ${this.getActiveItemIndex()+1}`)}moveDraggedItemUp(){const t=this.dragging.previousElementSibling;Boolean(t)&&t!==this.selectAllEl&&(t.before(this.dragging),this.updateItems(),this.listboxEl.focus(),this.assistiveText=`${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging)+1}`)}setSectionSeparator(){this.el&&Array.from(this.el.querySelectorAll("swirl-option-list-section")).filter((t=>t.isConnected)).forEach(((t,i)=>{0===i&&"SWIRL-OPTION-LIST-ITEM"!==t.previousElementSibling?.tagName&&(t.hasSeparator=!1)}))}subscribeToSwirlPopover(){this.swirlPopover=l(this.el,"swirl-popover"),this.swirlPopover?.addEventListener("popoverClose",this.resetTabIndex)}unsubscribeFromSwirlPopover(){this.swirlPopover?.removeEventListener("popoverClose",this.resetTabIndex)}render(){const t=this.multiSelect?"true":void 0,i=Boolean(this.dragging)?0:void 0,h=this.multiSelect&&this.showSelectAll;return s(e,{key:"e0ea80491a50a70572c909f0c74452b5dc7af615"},s("swirl-visually-hidden",{key:"d2f301bc25620143d44f0731550c718cac9eaa06",role:"alert"},this.assistiveText),s("div",{key:"40daab178c452c0e30577d1c5d5333075f8b2b74","aria-label":this.label,"aria-multiselectable":t,class:"option-list",id:this.optionListId,onClick:this.onClick,onKeyDown:this.onKeyDown,ref:t=>this.listboxEl=t,role:"listbox",tabIndex:i},h&&s("swirl-option-list-item",{key:"c6d7350616a58eb36a8537824b325377645622d4",ref:t=>this.selectAllEl=t,label:this.selectAllLabel,disabled:this.disabled,context:"multi-select",selected:!0===this.selectAllState,indeterminate:"indeterminate"===this.selectAllState,value:this.selectAllValue}),s("slot",{key:"8388cc14123c840116b14390803c93c1a9f3766c",onSlotchange:this.setSectionSeparator})))}get el(){return h(this)}static get watchers(){return{allowDrag:[{watchAllowDrag:0}],disabled:[{watchDisabled:0}],multiSelect:[{watchMultiSelect:0}],value:[{watchValue:0}]}}};r.style=".sc-swirl-option-list-h{display:block}.sc-swirl-option-list-h *.sc-swirl-option-list{box-sizing:border-box}";export{r as swirl_option_list}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i,a as e,d as h}from"./p-BdGaOt5L.js";import{S as o}from"./p-CMrz6687.js";import{v as r}from"./p-DD3477fe.js";const a=class{constructor(i){t(this,i),this.itemDrop=s(this,"itemDrop",7),this.assistiveTextItemGrabbed="Item grabbed. Use arrow keys to move item up or down. Use spacebar to save position.",this.assistiveTextItemMoving="Current position:",this.assistiveTextItemMoved="Item moved. New position:",this.semantics="grid",this.spacing="0",this.listId=r(),this.focusedIndex=0,this.componentLoaded=!1,this.toggleDrag=t=>{const s=t.detail;Boolean(this.dragging)?this.stopDrag(s):this.startDrag(s)},this.startDrag=t=>{this.dragging=t,this.draggingStartIndex=this.getItemIndex(this.dragging),t.setAttribute("dragging","true");const s=this.getItemIndex(this.dragging);this.focusItemAtIndex(s),this.assistiveText=this.assistiveTextItemGrabbed},this.stopDrag=t=>{const s=this.getItemIndex(this.dragging);this.dragging=void 0,t.removeAttribute("dragging"),this.assistiveText=`${this.assistiveTextItemMoved} ${s+1}`,this.itemDrop.emit({item:t,oldIndex:this.draggingStartIndex,newIndex:s}),this.draggingStartIndex=void 0},this.onKeyDown=t=>{if("grid"===this.semantics&&!Boolean(this.dragging))if("ArrowDown"===t.code)t.preventDefault(),this.focusItemAtIndex((this.focusedIndex+1)%this.items.length);else if("ArrowUp"===t.code)t.preventDefault(),this.focusItemAtIndex(0===this.focusedIndex?this.items.length-1:this.focusedIndex-1);else if("Enter"===t.code&&Boolean(this.controllingElement)){const s=this.items[this.focusedIndex];if(!Boolean(s)||!s.isConnected)return;t.stopPropagation(),t.preventDefault(),s.click()}else"Home"===t.code?(t.preventDefault(),this.focusItemAtIndex(0)):"End"===t.code&&(t.preventDefault(),this.focusItemAtIndex(this.items.length-1));if(Boolean(this.dragging))if("ArrowDown"===t.code)t.preventDefault(),this.moveDraggedItemDown();else if("ArrowUp"===t.code)t.preventDefault(),this.moveDraggedItemUp();else if("Space"===t.code||"Enter"===t.code){const s=t.composedPath()[0];s?.classList.contains("resource-list-item__drag-handle")||(t.preventDefault(),this.stopDrag(this.dragging))}}}connectedCallback(){this.componentLoaded&&(this.observeSlotChanges(),this.collectItems(),this.setupControllingElement(),this.setItemAllowDragState())}componentDidLoad(){this.observeSlotChanges(),this.collectItems(),this.setupControllingElement(),this.setItemAllowDragState(),this.setupDragDrop(),this.setSectionSpacingAndSeparator(),this.componentLoaded=!0}componentDidRender(){this.setupDragDrop()}disconnectedCallback(){this.sortable?.destroy(),this.observer?.disconnect(),this.controllingElement?.removeEventListener("keydown",this.onKeyDown),this.removeToggleDragListeners()}observeSlotChanges(){this.observer?.disconnect(),this.observer=new MutationObserver((()=>{this.collectItems(),this.setItemAllowDragState(),this.setSectionSpacingAndSeparator()})),this.observer.observe(this.el,{childList:!0,characterData:!0,subtree:!0})}watchAllowDrag(){this.setItemAllowDragState(),this.setupDragDrop()}async resetFocus(){this.focusedIndex=0,this.removeItemsFromTabOrder(),this.enableItemFocus(this.items[0]),Boolean(this.controllingElement)&&this.items[0]?.setAttribute("aria-selected","true")}collectItems(){this.removeToggleDragListeners(),this.items=Array.from(this.el.querySelectorAll("swirl-resource-list-item, swirl-resource-list-file-item, [data-resource-list-item]")).filter((t=>t.isConnected)),this.sections=Array.from(this.el.querySelectorAll("swirl-resource-list-section")).filter((t=>t.isConnected)),this.removeItemsFromTabOrder(),this.enableItemFocus(this.items[this.focusedIndex]),Boolean(this.controllingElement)&&this.items[0]?.setAttribute("aria-selected","true")}setupControllingElement(){Boolean(this.controllingElement)&&(this.controllingElement.setAttribute("aria-controls",this.listId),this.controllingElement.setAttribute("role","combobox"),this.controllingElement.setAttribute("aria-autocomplete","list"),this.controllingElement.addEventListener("keydown",this.onKeyDown))}getItemIndex(t){return this.items.map((t=>t)).findIndex((s=>s===t))}removeItemsFromTabOrder(){"grid"===this.semantics&&this.items.forEach((t=>{const s=t?.querySelector(".resource-list-item__content, .resource-list-file-item, [data-resource-list-item-button]"),i=t?.querySelector(".resource-list-item__drag-handle");Boolean(this.controllingElement)&&t.setAttribute("aria-selected","false"),s?.setAttribute("tabIndex","-1"),i?.setAttribute("tabIndex","-1")}))}removeToggleDragListeners(){this.items?.forEach((t=>{t.removeEventListener("toggleDrag",this.toggleDrag)}))}setItemAllowDragState(){this.allowDrag?this.items.filter((t=>this.sections.every((s=>!s.contains(t))))).forEach((t=>{t.setAttribute("allow-drag","true"),t.addEventListener("toggleDrag",this.toggleDrag)})):this.items.forEach((t=>{t.removeAttribute("allow-drag"),t.removeEventListener("toggleDrag",this.toggleDrag)}))}setupDragDrop(){Boolean(this.sortable)&&this.sortable.destroy(),this.allowDrag&&(this.sortable=o.create(this.gridEl,{animation:150,draggable:"swirl-resource-list-item",dragClass:"swirl-resource-list-item--drag",handle:".resource-list-item__drag-handle",onEnd:t=>{this.itemDrop.emit({item:t.item,oldIndex:t.oldDraggableIndex,newIndex:t.newDraggableIndex})}}))}enableItemFocus(t,s){if(!Boolean(t)||Boolean(this.controllingElement))return;const i=t.querySelector(".resource-list-item__content, .resource-list-file-item, [data-resource-list-item-button]"),e=t.querySelector(".resource-list-item__drag-handle");Boolean(e)&&e.setAttribute("tabIndex","0"),Boolean(i)&&(i.setAttribute("tabIndex","0"),s&&!Boolean(this.controllingElement)&&i.focus())}focusItemAtIndex(t){this.removeItemsFromTabOrder();const s=this.items[t];Boolean(s)&&s.isConnected&&(this.enableItemFocus(s,!Boolean(this.controllingElement)),Boolean(this.controllingElement)&&(s.setAttribute("aria-selected","true"),s.scrollIntoView({block:"nearest"})),this.focusedIndex=t)}moveDraggedItemDown(){const t=this.dragging.nextElementSibling;Boolean(t)&&(t.after(this.dragging),this.collectItems(),this.focusItemAtIndex(this.getItemIndex(this.dragging)),this.assistiveText=`${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging)+1}`)}moveDraggedItemUp(){const t=this.dragging.previousElementSibling;Boolean(t)&&(t.before(this.dragging),this.collectItems(),this.focusItemAtIndex(this.getItemIndex(this.dragging)),this.assistiveText=`${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging)+1}`)}setSectionSpacingAndSeparator(){this.sections.forEach(((t,s)=>{0===s&&"SWIRL-RESOURCE-LIST-ITEM"!==t.previousElementSibling?.tagName&&(t.hasSeparator=!1),t.spacing=this.spacing}))}render(){return i(e,{key:"0a7edd843c77cb5105b0523a4e60a0c470aa54ba",onKeyDown:this.onKeyDown},i("swirl-visually-hidden",{key:"c7361c42c129ee08ad1a70cb135d5a4eac7b8691",role:"alert"},this.assistiveText),i("swirl-box",{key:"748481c0b950167cfbced4ef486a87e2a1892deb",paddingBlockEnd:this.paddingBlockEnd??this.padding,paddingBlockStart:this.paddingBlockStart??this.padding,paddingInlineEnd:this.paddingInlineEnd??this.padding??"8",paddingInlineStart:this.paddingInlineStart??this.padding??"8"},i("swirl-stack",{key:"85c7697b06af904deaef64414b2f5b53caada0c2","aria-label":this.label,class:"resource-list",id:this.listId,ref:t=>this.gridEl=t,role:this.semantics,spacing:this.spacing},i("slot",{key:"eff384c8ac86d3dfb8eacb638959933298762459"}))))}get el(){return h(this)}static get watchers(){return{allowDrag:[{watchAllowDrag:0}]}}};a.style=".sc-swirl-resource-list-h{display:block;width:100%}.sc-swirl-resource-list-h *.sc-swirl-resource-list{box-sizing:border-box}";export{a as swirl_resource_list}
@@ -1 +0,0 @@
1
- let t;const r=new Uint8Array(16);function o(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(r)}const n=[];for(let t=0;t<256;++t)n.push((t+256).toString(16).slice(1));var e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function u(t){if(e.randomUUID&&!t)return e.randomUUID();const r=(t=t||{}).random||(t.rng||o)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(t,r=0){return n[t[r+0]]+n[t[r+1]]+n[t[r+2]]+n[t[r+3]]+"-"+n[t[r+4]]+n[t[r+5]]+"-"+n[t[r+6]]+n[t[r+7]]+"-"+n[t[r+8]]+n[t[r+9]]+"-"+n[t[r+10]]+n[t[r+11]]+n[t[r+12]]+n[t[r+13]]+n[t[r+14]]+n[t[r+15]]}(r)}export{u as v}
@@ -1 +0,0 @@
1
- import{r as a,h as e,a as s,d as t}from"./p-BdGaOt5L.js";import{c as l}from"./p-orsBiyT_.js";import{v as d}from"./p-DD3477fe.js";const r=class{constructor(e){a(this,e),this.hideLabel=!1,this.headerId=`data-cell-stack-header-${d()}`,this.onSlotChange=a=>{a.target.assignedElements().filter((a=>"SWIRL-DATA-CELL"!==a.tagName)).length>0&&console.warn("[SwirlDataCellStack] Only swirl-data-cell elements are allowed as direct children.")}}render(){const a=Boolean(this.el.querySelector('[slot="cta"]')),t=Boolean(this.label)&&!this.hideLabel,d=l("data-cell-stack",{"data-cell-stack--has-cta":a}),r=t?`${this.headerId}-label`:void 0,c=this.description?`${this.headerId}-description`:void 0;return e(s,{key:"b79ce886f01b55239f1a2a0a153568fcdd3d9961"},e("div",{key:"d95fafcfc4de8958971ecb91f43dd7339e89bab6",class:d,part:"data-cell-stack",role:"group"},(t||this.description||a)&&e("header",{key:"e87a98dab5c55ea579dc414add17d41a7fdd416b",class:"data-cell-stack__header",id:this.headerId},e("div",{key:"3774cf27961cc6088db2c01fa76becea9d46eb7d",class:"data-cell-stack__header-content"},t&&e("h3",{key:"ee1312f8b92564c3f87d3b0c2a4270e5be15e472",class:"data-cell-stack__label",id:r},this.label),this.description&&e("p",{key:"8c70b4d92f1bd6be313df0d9de091731c1a9aa20",class:"data-cell-stack__description",id:c},this.description)),a&&e("div",{key:"d0dfecd262d77c78efd59def270e6a924275eb33",class:"data-cell-stack__cta"},e("slot",{key:"ad3505f97e9b89707fd007971b0858eeb907ceee",name:"cta"}))),e("div",{key:"a8bb8acd3e42db09ebb8ba47490e5a7a2be083af",class:"data-cell-stack__cells",role:"list","aria-labelledby":r||void 0,"aria-describedby":c||void 0},e("slot",{key:"8652e5e828e2f8da7ff31837c9d0814a945b66b1",onSlotchange:this.onSlotChange}))))}get el(){return t(this)}};r.style=":host{display:block;width:100%}:host *{box-sizing:border-box}.data-cell-stack{display:flex;flex-direction:column;width:100%;gap:var(--s-space-16)}.data-cell-stack__header{display:flex;align-items:flex-start;gap:var(--s-space-8);width:100%;justify-content:space-between}.data-cell-stack__header-content{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s-space-4)}.data-cell-stack__label{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);color:var(--s-text-default);font-weight:var(--s-font-weight-semibold);margin:0}.data-cell-stack__description{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);color:var(--s-text-subdued);margin:0}.data-cell-stack__cells{display:flex;flex-direction:column;gap:var(--s-space-2)}.data-cell-stack__cells ::slotted(swirl-data-cell:first-of-type:not(:last-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-l) var(--s-border-radius-l) var(--s-border-radius-s) var(--s-border-radius-s)}.data-cell-stack__cells ::slotted(swirl-data-cell:last-of-type:not(:first-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-s) var(--s-border-radius-s) var(--s-border-radius-l) var(--s-border-radius-l)}.data-cell-stack__cells ::slotted(swirl-data-cell:not(:first-of-type):not(:last-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-s)}.data-cell-stack__cells ::slotted(swirl-data-cell:first-of-type:last-of-type){--swirl-data-cell-border-radius:var(--s-border-radius-l)}.data-cell-stack__cta{display:flex;align-items:center;flex-shrink:0}";export{r as swirl_data_cell_stack}
@@ -1 +0,0 @@
1
- import{r as i,h as t,F as e,c as o,a as s,d as l}from"./p-BdGaOt5L.js";import{c as r}from"./p-orsBiyT_.js";import{D as a}from"./p-Bfn7CHM9.js";import{v as n}from"./p-DD3477fe.js";import"./p-CCck-DTo.js";const c=class{constructor(t){i(this,t),this.size=24}render(){const i=20===this.size?24:this.size,o={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`),l=Boolean(this.label);return t("svg",{key:"5073b3883f61141cefd7d7355b2a75c8a56b6fa8","aria-hidden":l?void 0:"true",class:s,fill:"none",height:this.size,part:"icon",role:l?"img":void 0,style:o,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},l&&t("title",{key:"ca6b706ca3001059f45ee06deff21ea533bbae46"},this.label),16===this.size&&t(e,{key:"a9aebfec118690d417c890d863bc58f19640c888"},t("path",{key:"aab82abda1ae6e8be5bb1fc1840ca3dc495cb7e9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4142 4.91924C12.8047 5.30976 12.8047 5.94293 12.4142 6.33345L7.08086 11.6667C6.69033 12.0572 6.05717 12.0572 5.66664 11.6667L3.70711 9.70707C3.31658 9.31655 3.31658 8.68338 3.70711 8.29286C4.09763 7.90233 4.7308 7.90233 5.12132 8.29286L6.37375 9.54539L11 4.91924C11.3905 4.52871 12.0237 4.52871 12.4142 4.91924Z",fill:"currentColor"})),(20===this.size||24===this.size)&&t(e,{key:"7b6731c7cda06c5551e710699b2408b5ca610226"},t("path",{key:"1580b3e8ff392814aac20ea41ea0a2f2ad4bd887","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z",fill:"currentColor"})),28===this.size&&t(e,{key:"598e47b9c857d04d564817ee0abd58b3e81dd294"},t("path",{key:"328726b943abcea58aaa3c4129f82a433ec77c42","fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.7248 8.60863C22.4083 9.29205 22.4083 10.4001 21.7248 11.0835L12.3915 20.4167C11.7081 21.1001 10.6001 21.1001 9.91663 20.4167L6.48744 16.9873C5.80403 16.3039 5.80403 15.1959 6.48744 14.5125C7.17086 13.8291 8.2789 13.8291 8.96232 14.5125L11.1541 16.7044L19.25 8.60863C19.9334 7.92521 21.0414 7.92521 21.7248 8.60863Z",fill:"currentColor"})))}};c.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}.icon-wrapper{display:inline-flex;justify-content:center;align-items:center;border-radius:var(--s-border-radius-full-round);background-color:var(--s-surface-raised-default)}.icon-wrapper--size-xs{width:16px;height:16px}.icon-wrapper--size-s{width:20px;height:20px}.icon-wrapper--size-m{width:24px;height:24px}.icon-wrapper--size-l{width:28px;height:28px}.icon-wrapper--size-xl{width:32px;height:32px}.icon-wrapper--size-2xl{width:40px;height:40px}.icon-wrapper--background-color-neutral{background-color:var(--s-surface-raised-default);color:var(--s-icon-default)}.icon-wrapper--background-color-banana{background-color:var(--s-decorative-banana-surface-subdued);color:var(--s-decorative-banana-text)}.icon-wrapper--background-color-blueberry{background-color:var(--s-decorative-blueberry-surface-subdued);color:var(--s-decorative-blueberry-text)}.icon-wrapper--background-color-chilli{background-color:var(--s-decorative-chilli-surface-subdued);color:var(--s-decorative-chilli-text)}.icon-wrapper--background-color-grape{background-color:var(--s-decorative-grape-surface-subdued);color:var(--s-decorative-grape-text)}.icon-wrapper--background-color-kiwi{background-color:var(--s-decorative-kiwi-surface-subdued);color:var(--s-decorative-kiwi-text)}.icon-wrapper--background-color-pumpkin{background-color:var(--s-decorative-pumpkin-surface-subdued);color:var(--s-decorative-pumpkin-text)}.icon-wrapper--background-color-radish{background-color:var(--s-decorative-radish-surface-subdued);color:var(--s-decorative-radish-text)}.icon-wrapper--background-color-default{background-color:var(--s-background-default);color:var(--s-icon-default)}";const d=class{constructor(t){i(this,t),this.toggleDrag=o(this,"toggleDrag",7),this.context="single-select",this.dragHandleDescription="Press spacebar to toggle grab",this.dragHandleLabel="Move option",this.minWidth="15rem",this.selected=!1,this.indeterminate=!1,this.swirlAriaRole="option",this.truncateLabel=!0,this.iconSize=24,this.elementId=n(),this.mediaQueryUnsubscribe=()=>{},this.onDragHandleKeyDown=i=>{"Space"!==i.code&&"Enter"!==i.code||(i.preventDefault(),this.toggleDrag.emit(this.el))},this.onBlur=()=>{this.focused=!1},this.onFocus=()=>{this.focused=!0}}componentDidLoad(){this.mediaQueryUnsubscribe=a.subscribe((i=>{this.forceIconProps(i),this.updateIconSize(i)}))}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(i){const t=this.iconEl?.children[0];t?.setAttribute("size",i?"20":"24")}updateIconSize(i){this.iconSize=i?20:24}render(){const i=this.disabled?"true":void 0,e=this.indeterminate?void 0:String(this.selected),o="multi-select"===this.context,l=Boolean(this.icon)&&"single-select"===this.context,a=Boolean(this.iconBadge),n=this.el.querySelector('[slot="avatar"]'),c=this.selected&&"single-select"===this.context,d=r("option-list-item",`option-list-item--context-${this.context}`,{"option-list-item--disabled":this.disabled,"option-list-item--draggable":this.allowDrag,"option-list-item--dragging":this.dragging,"option-list-item--selected":this.selected,"option-list-item--indeterminate":this.indeterminate&&!this.selected,"option-list-item--show-avatar":n});return t(s,{key:"1e25e511c68647f4588aa64b5de0ae03528161a5"},t("div",{key:"8c1f602b01f8968187411d7e27439edf9d0bfbf4","aria-checked":"menuitemradio"===this.swirlAriaRole?e:void 0,"aria-describedby":Boolean(this.description)?`option-list-item-${this.elementId}-description`:void 0,"aria-disabled":i,"aria-labelledby":`option-list-item-${this.elementId}-label`,"aria-selected":"option"===this.swirlAriaRole?e:void 0,class:d,id:`option-list-item-${this.elementId}`,onBlur:this.onBlur,onFocus:this.onFocus,part:"option-list-item",role:this.swirlAriaRole,style:{minWidth:this.minWidth}},l&&t("span",{key:"cbebac927e5706a65da753c53dff407a42fad16c",class:"option-list-item__icon",innerHTML:this.icon,ref:i=>this.iconEl=i},a&&t("span",{key:"db6953592315384152fa71c5e8e6fdf643fcd5de",class:"option-list-item__icon-badge",innerHTML:this.iconBadge})),o&&t("span",{key:"d09d0b6db2b3bb6cf6c3eb4ddf7a870748484c30",class:"option-list-item__checkbox"},t("span",{key:"729134e866d0e56e0ad811464948745e5ff50692",class:"option-list-item__checkbox-box"},this.selected&&t("swirl-icon-check-strong",{key:"37e980a9cfcef829c612c97b20fad3c630ed163f",class:"option-list-item__checkbox-icon",size:16}),!this.selected&&this.indeterminate&&t("span",{key:"4ebdcb375e22fd368f76960e61114327320ab2c4",class:"option-list-item__checkbox-indeterminate-icon"}))),t("span",{key:"9d801b6f3b72bc5cfcfc18e2eb45f9adee6e755b",class:"option-list-item__avatar"},t("slot",{key:"fca3269ae56233fcef6c013481ae4712d0859b23",name:"avatar"})),t("span",{key:"2733d44b3d4b33396c2a995a6b64676f45c5ee7c",class:"option-list-item__label-container"},t("span",{key:"342d9bbbf7c17d0b8e5612c915a86edc928165e4",class:"option-list-item__label",style:{whiteSpace:this.truncateLabel?"nowrap":"normal"},id:`option-list-item-${this.elementId}-label`,part:"option-list-item__label"},this.label),this.description&&t("span",{key:"f44e4abe0f3678279a6593cd8ec80e987317cca3",class:"option-list-item__description",id:`option-list-item-${this.elementId}-description`},this.description)),c&&t("span",{key:"e4744267f21610bdb8be26ba02c21ca86a21b7f6",class:"option-list-item__selection-icon"},t("swirl-icon-check-small",{key:"290cc81320d414b22d05da1d5b485c9b82e61807",size:this.iconSize}))),this.allowDrag&&t("button",{key:"fa1c38bcbe38154b43fcfbd4bcdff38d7a539a7a","aria-describedby":this.dragHandleDescription,"aria-label":`${this.dragHandleLabel} "${this.label}"`,class:"option-list-item__drag-handle",onKeyDown:this.onDragHandleKeyDown,tabIndex:this.focused?0:-1,type:"button"},t("swirl-icon-drag-handle",{key:"3e22273d1a0f7926e78cf604604e5caa4b17e5ed",size:this.iconSize})))}get el(){return l(this)}};d.style='.sc-swirl-option-list-item-h{position:relative;display:block;width:100%}.sc-swirl-option-list-item-h *.sc-swirl-option-list-item{box-sizing:border-box}.option-list-item--drag.sc-swirl-option-list-item-h{border-radius:var(--s-border-radius-s);background-color:var(--s-translucent-medium-pressed)}.option-list-item.sc-swirl-option-list-item{display:inline-flex;position:relative;width:100%;min-height:3rem;padding:var(--s-space-12) var(--s-space-16);border-radius:var(--s-border-radius-sm);align-items:center;background-color:transparent;cursor:pointer;gap:var(--s-space-12)}.option-list-item.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-state-hovered)}.option-list-item.sc-swirl-option-list-item:active:not(.option-list-item--disabled){background-color:var(--s-translucent-low-pressed)}.option-list-item.sc-swirl-option-list-item:focus{outline:none}.option-list-item.sc-swirl-option-list-item:focus-visible{background-color:var(--s-state-hovered);outline-color:var(--s-focus-default);outline-style:solid;outline-width:0.125rem;z-index:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item.sc-swirl-option-list-item{min-height:0;padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-8)}}.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1rem)}}.option-list-item--dragging.sc-swirl-option-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-translucent-low-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08), 0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.option-list-item--dragging.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-translucent-low-pressed)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item{color:var(--s-icon-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item,.option-list-item--indeterminate.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.option-list-item--disabled.sc-swirl-option-list-item{cursor:default}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{background-color:var(--s-icon-disabled)}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-text-on-status)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__selection-icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-surface-overlay-default)}.option-list-item--disabled.option-list-item--indeterminate.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);color:var(--s-text-on-status);background-color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__avatar.sc-swirl-option-list-item{filter:grayscale(100%)}.option-list-item--show-avatar.sc-swirl-option-list-item .option-list-item__avatar.sc-swirl-option-list-item{display:inline-flex}.option-list-item__label-container.sc-swirl-option-list-item{display:flex;flex-grow:1;flex-direction:column;overflow:hidden}.option-list-item__label-container.sc-swirl-option-list-item>*.sc-swirl-option-list-item{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-default);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__label.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-subdued);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__description.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__avatar.sc-swirl-option-list-item{display:none;flex-shrink:0}.option-list-item__icon.sc-swirl-option-list-item{display:inline-flex;position:relative;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__icon.sc-swirl-option-list-item{width:1.25rem;height:1.25rem}}.option-list-item__icon-badge.sc-swirl-option-list-item{position:absolute;display:grid;bottom:0;right:0}.option-list-item__selection-icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}.option-list-item__checkbox.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__checkbox.sc-swirl-option-list-item{width:1.375rem;height:1.375rem}}.option-list-item__checkbox-box.sc-swirl-option-list-item{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.option-list-item__checkbox-icon.sc-swirl-option-list-item{display:inline-flex}.option-list-item__checkbox-indeterminate-icon.sc-swirl-option-list-item{position:relative;width:100%;height:100%}.option-list-item__checkbox-indeterminate-icon.sc-swirl-option-list-item:after{position:absolute;top:50%;left:50%;width:0.625rem;height:0.125rem;border-radius:0.0625rem;background-color:currentColor;content:"";transform:translate3d(-50%, -50%, 0)}.option-list-item__drag-handle.sc-swirl-option-list-item{position:absolute;z-index:1;top:50%;right:var(--s-space-4);display:inline-flex;margin:0;padding:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:grab;transform:translateY(-50%)}.option-list-item__drag-handle.sc-swirl-option-list-item:active{cursor:grabbing}.option-list-item__drag-handle.sc-swirl-option-list-item:focus:not(:focus-visible){outline:none}.option-list-item__drag-handle.sc-swirl-option-list-item:focus-visible{outline-color:var(--s-focus-default)}';export{c as swirl_icon_check_small,d as swirl_option_list_item}
@@ -1 +0,0 @@
1
- import{r as a,c as t,h as r,a as b,d as i}from"./p-BdGaOt5L.js";import{c as s}from"./p-orsBiyT_.js";import{n as e}from"./p-CCck-DTo.js";const l=class{constructor(r){a(this,r),this.activateNextTab=t(this,"activateNextTab",7),this.activatePreviousTab=t(this,"activatePreviousTab",7),this.activateTab=t(this,"activateTab",7),this.justify="start",this.tabs=[],this.variant="default",this.onKeyDown=a=>{"ArrowLeft"===a.code?(a.preventDefault(),this.focusAdjacentTab(!0),this.activatePreviousTab.emit()):"ArrowRight"===a.code&&(a.preventDefault(),this.focusAdjacentTab(!1),this.activateNextTab.emit())}}onTabFocus(a){a.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}focusAdjacentTab(a){const t=this.getTabs(),r=t.findIndex((a=>"true"===a.ariaSelected));t[e(a?r-1:r+1,t.length)].focus()}getTabs(){return Array.from(this.el.querySelectorAll('[role="tab"]'))}render(){const a=s("tab-bar",`tab-bar--justify-${this.justify}`,{"tab-bar--variant-pill":"pill"===this.variant,"tab-bar--variant-default":"default"===this.variant,"tab-bar--wrap":this.wrap}),t={paddingInlineEnd:Boolean(this.paddingInlineEnd)?`var(--s-space-${this.paddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:void 0,paddingBlockEnd:Boolean(this.paddingBlockEnd)?`var(--s-space-${this.paddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.paddingBlockStart)?`var(--s-space-${this.paddingBlockStart})`:void 0};return r(b,{key:"784c3bd3a61d049d4e3e1a00fd3e77e01506f45c"},r("div",{key:"a08f5098615da85f8a5e7e05679ec2ba6e06fce7","aria-label":this.label,class:a,onKeyDown:this.onKeyDown,role:this.disableTabSemantics?void 0:"tablist",style:t},this.tabs.map((a=>{const t=s("tab-bar__tab",{"tab-bar__tab--active":a.active,"tab-bar__tab--variant-pill":"pill"===this.variant,"tab-bar__tab--variant-default":"default"===this.variant}),b=s("tab-bar__tab-label",{"tab-bar__tab-label--variant-pill":"pill"===this.variant}),i=r("button",{"aria-controls":this.disableTabSemantics?void 0:a.id,"aria-selected":this.disableTabSemantics?void 0:a.active?"true":"false",class:t,id:`tab-${a.id}`,key:a.tooltip?void 0:a.id,onClick:()=>this.activateTab.emit(a.id),onFocus:this.onTabFocus,role:this.disableTabSemantics?void 0:"tab",tabIndex:this.disableTabSemantics?void 0:a.active?0:-1,type:"button"},a.icon&&r("span",{class:"tab-bar__tab-icon",innerHTML:a.icon}),r("span",{class:b},a.label,a.suffix&&r("span",{class:"tab-bar__tab-suffix"},a.suffix)));return a.tooltip?r("swirl-tooltip",{content:a.tooltip,key:a.id},i):i}))))}get el(){return i(this)}};l.style='.sc-swirl-tab-bar-h{display:flex;height:var(--swirl-tab-bar-height)}.sc-swirl-tab-bar-h *.sc-swirl-tab-bar{box-sizing:border-box}.tab-bar.sc-swirl-tab-bar{position:relative;display:flex;overflow-x:auto;width:100%;justify-content:flex-start;scrollbar-width:none}.tab-bar.tab-bar--variant-default.sc-swirl-tab-bar{border-bottom:var(--swirl-tab-bar-border-width) solid var(--s-border-default)}.tab-bar.tab-bar--variant-pill.sc-swirl-tab-bar{gap:var(--s-space-8)}.tab-bar--wrap.sc-swirl-tab-bar{flex-wrap:wrap}.tab-bar--justify-evenly.sc-swirl-tab-bar>*.sc-swirl-tab-bar,.tab-bar--justify-evenly.sc-swirl-tab-bar .tab-bar__tab.sc-swirl-tab-bar{flex:1}.tab-bar__tab.sc-swirl-tab-bar{position:relative;display:flex;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;margin:0;justify-content:center;align-items:center;border:none;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-lg);cursor:pointer}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar{padding:var(--s-space-4) var(--s-space-8);color:var(--s-interactive-neutral-default);background-color:transparent}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-default);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-highlight);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus{outline:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus-visible .tab-bar__tab-label.sc-swirl-tab-bar{border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.125rem var(--s-focus-default)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar{padding:var(--s-space-8) var(--s-space-16);border-radius:var(--s-border-radius-full-round);color:var(--s-text-default);background:var(--s-action-neutral-default);gap:var(--s-space-8)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:hover{background:var(--s-action-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:active{background:var(--s-action-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-on-action-primary);background:var(--s-action-primary-default)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-on-action-primary)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-subdued)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tab-bar__tab.sc-swirl-tab-bar{padding:calc(var(--s-space-4) + var(--s-space-2)) var(--s-space-8);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tab-bar__tab-icon.sc-swirl-tab-bar{display:inline-flex}.tab-bar__tab-label.sc-swirl-tab-bar{display:inline-flex;padding:var(--s-space-8) var(--s-space-8);text-align:center;white-space:nowrap;gap:var(--s-space-4)}.tab-bar__tab-label.tab-bar__tab-label--variant-pill.sc-swirl-tab-bar{padding:0}.tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-default);font-weight:var(--s-font-weight-normal)}';export{l as swirl_tab_bar}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as r,a as s}from"./p-BdGaOt5L.js";import{c as i}from"./p-orsBiyT_.js";import{v as o}from"./p-DD3477fe.js";const n=(t,e=0,r=1)=>t>r?r:t<e?e:t,a=(t,e=0,r=Math.pow(10,e))=>Math.round(r*t)/r,l=t=>("#"===t[0]&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?a(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:8===t.length?a(parseInt(t.substring(6,8),16)/255,2):1}),h=t=>{const{h:e,s:r,l:s}=(({h:t,s:e,v:r,a:s})=>{const i=(200-e)*r/100;return{h:a(t),s:a(i>0&&i<200?e*r/100/(i<=100?i:200-i)*100:0),l:a(i/2),a:a(s,2)}})(t);return`hsl(${e}, ${r}%, ${s}%)`},c=t=>{const e=t.toString(16);return e.length<2?"0"+e:e},d=(t,e)=>{if(t===e)return!0;for(const r in t)if(t[r]!==e[r])return!1;return!0},u={},p=t=>{let e=u[t];return e||(e=document.createElement("template"),e.innerHTML=t,u[t]=e),e},b=(t,e,r)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r}))};let f=!1;const m=t=>"touches"in t,g=(t,e)=>{const r=m(e)?e.touches[0]:e,s=t.el.getBoundingClientRect();b(t.el,"move",t.getMove({x:n((r.pageX-(s.left+window.pageXOffset))/s.width),y:n((r.pageY-(s.top+window.pageYOffset))/s.height)}))};class v{constructor(t,e,r,s){const i=p(`<div role="slider" tabindex="0" part="${e}" ${r}><div part="${e}-pointer"></div></div>`);t.appendChild(i.content.cloneNode(!0));const o=t.querySelector(`[part=${e}]`);o.addEventListener("mousedown",this),o.addEventListener("touchstart",this),o.addEventListener("keydown",this),this.el=o,this.xy=s,this.nodes=[o.firstChild,o]}set dragging(t){const e=t?document.addEventListener:document.removeEventListener;e(f?"touchmove":"mousemove",this),e(f?"touchend":"mouseup",this)}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":if(t.preventDefault(),!(t=>!(f&&!m(t)||(f||(f=m(t)),0)))(t)||!f&&0!=t.button)return;this.el.focus(),g(this,t),this.dragging=!0;break;case"mousemove":case"touchmove":t.preventDefault(),g(this,t);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((t,e)=>{const r=e.keyCode;r>40||t.xy&&r<37||r<33||(e.preventDefault(),b(t.el,"move",t.getMove({x:39===r?.01:37===r?-.01:34===r?.05:33===r?-.05:35===r?1:36===r?-1:0,y:40===r?.01:38===r?-.01:0},!0)))})(this,t)}}style(t){t.forEach(((t,e)=>{for(const r in t)this.nodes[e].style.setProperty(r,t[r])}))}}class x extends v{constructor(t){super(t,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:t}){this.h=t,this.style([{left:t/360*100+"%",color:h({h:t,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${a(t)}`)}getMove(t,e){return{h:e?n(this.h+360*t.x,0,360):360*t.x}}}class w extends v{constructor(t){super(t,"saturation",'aria-label="Color"',!0)}update(t){this.hsva=t,this.style([{top:100-t.v+"%",left:`${t.s}%`,color:h(t)},{"background-color":h({h:t.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${a(t.s)}%, Brightness ${a(t.v)}%`)}getMove(t,e){return{s:e?n(this.hsva.s+100*t.x,0,100):100*t.x,v:e?n(this.hsva.v-100*t.y,0,100):Math.round(100-100*t.y)}}}const k=Symbol("same"),y=Symbol("color"),_=Symbol("hsva"),$=Symbol("update"),I=Symbol("parts"),S=Symbol("css"),C=Symbol("sliders");class z extends HTMLElement{static get observedAttributes(){return["color"]}get[S](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[C](){return[w,x]}get color(){return this[y]}set color(t){if(!this[k](t)){const e=this.colorModel.toHsva(t);this[$](e),this[y]=t}}constructor(){super();const t=p(`<style>${this[S].join("")}</style>`),e=this.attachShadow({mode:"open"});e.appendChild(t.content.cloneNode(!0)),e.addEventListener("move",this),this[I]=this[C].map((t=>new t(e)))}connectedCallback(){if(this.hasOwnProperty("color")){const t=this.color;delete this.color,this.color=t}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(t,e,r){const s=this.colorModel.fromAttr(r);this[k](s)||(this.color=s)}handleEvent(t){const e=this[_],r={...e,...t.detail};let s;this[$](r),d(r,e)||this[k](s=this.colorModel.fromHsva(r))||(this[y]=s,b(this,"color-changed",{value:s}))}[k](t){return this.color&&this.colorModel.equal(t,this.color)}[$](t){this[_]=t,this[I].forEach((e=>e.update(t)))}}const M={defaultColor:"#000",toHsva:t=>(({r:t,g:e,b:r,a:s})=>{const i=Math.max(t,e,r),o=i-Math.min(t,e,r),n=o?i===t?(e-r)/o:i===e?2+(r-t)/o:4+(t-e)/o:0;return{h:a(60*(n<0?n+6:n)),s:a(i?o/i*100:0),v:a(i/255*100),a:s}})(l(t)),fromHsva:({h:t,s:e,v:r})=>(({r:t,g:e,b:r,a:s})=>{const i=s<1?c(a(255*s)):"";return"#"+c(t)+c(e)+c(r)+i})((({h:t,s:e,v:r,a:s})=>{t=t/360*6,e/=100,r/=100;const i=Math.floor(t),o=r*(1-e),n=r*(1-(t-i)*e),l=r*(1-(1-t+i)*e),h=i%6;return{r:a(255*[r,n,o,o,l,r][h]),g:a(255*[l,r,r,n,o,o][h]),b:a(255*[o,o,l,r,r,n][h]),a:a(s,2)}})({h:t,s:e,v:r,a:1})),equal:(t,e)=>t.toLowerCase()===e.toLowerCase()||d(l(t),l(e)),fromAttr:t=>t};class B extends z{get colorModel(){return M}}customElements.define("hex-color-picker",class extends B{});const E=class{constructor(r){t(this,r),this.inputBlur=e(this,"inputBlur",7),this.inputFocus=e(this,"inputFocus",7),this.valueChange=e(this,"valueChange",7),this.pickerButtonLabel="Open color picker",this.pickerLabel="Color picker",this.pickerId=`color-picker-${o()}`,this.onPickerChange=t=>{this.value=t.detail.value},this.onChange=t=>{this.value=t.target.value},this.onBlur=t=>{this.inputBlur.emit(t)},this.onFocus=t=>{this.inputFocus.emit(t),this.handleAutoSelect(t)},this.onInput=t=>{this.onChange(t)}}componentDidLoad(){this.autoFocus&&setTimeout((()=>{this.inputEl.focus()})),this.picker.addEventListener("color-changed",this.onPickerChange)}disconnectedCallback(){this.picker?.removeEventListener("color-changed",this.onPickerChange)}watchValue(t,e){t!==e&&this.valueChange.emit(t)}handleAutoSelect(t){this.autoSelect&&t.target.select()}render(){const t=!0===this.invalid||!1===this.invalid?String(this.invalid):void 0,e=i("color-input",{"color-input--inline":this.inline});return r(s,{key:"2ed3d40d8b69af36b2226c911cc5dae84742f0cb"},r("div",{key:"ef197f8e0a01ddf121df8f47a99691040663f286",class:e},r("input",{key:"34f8ae5eb9aaa8e664a6b47fac63917a2f7e2039","aria-describedby":this.swirlAriaDescribedby,"aria-disabled":this.disabled?"true":void 0,"aria-invalid":t,autoFocus:this.autoFocus,class:"color-input__input",disabled:this.disabled,maxLength:7,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,ref:t=>this.inputEl=t,required:this.required,spellcheck:"false",type:"text",value:this.value,readonly:this.readonly}),r("swirl-popover-trigger",{key:"3e11abdfdf445802e84cf3e87de2499c3a402f9a",swirlPopover:this.pickerId},r("button",{key:"e99eb09576d3843aebd5c8803e0d9235bbb0139e",disabled:this.readonly,"aria-label":this.pickerButtonLabel,class:"color-input__preview-button",style:{backgroundColor:this.disabled?"var(--s-border-subdued)":this.value},type:"button"})),r("swirl-popover",{key:"b60e4424b971f6f76b5e0adc9d7b155cd7a0fdac",animation:"scale-in-y",id:this.pickerId,label:this.pickerLabel,placement:"bottom-end"},r("swirl-box",{key:"756f20986aeb68b92bd03649623b64f210b1f846",centerInline:!0,paddingBlockEnd:"8",paddingBlockStart:"8",paddingInlineEnd:"16",paddingInlineStart:"16"},r("hex-color-picker",{key:"5410df4ccf4537763171af4b15ab26898e007ff4",color:this.value,ref:t=>this.picker=t})))))}static get watchers(){return{value:[{watchValue:0}]}}};E.style=".sc-swirl-color-input-h{display:block;width:100%}.sc-swirl-color-input-h *.sc-swirl-color-input{box-sizing:border-box}.color-input.sc-swirl-color-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);font:inherit;line-height:var(--s-line-height-sm);cursor:text}.color-input--inline.sc-swirl-color-input .color-input__preview-button.sc-swirl-color-input{width:1.5rem;height:1.5rem;margin-top:-0.125rem;margin-right:-0.25rem;margin-bottom:-0.125rem}.color-input__input.sc-swirl-color-input{display:inline-flex;width:100%;margin:0;padding:0;flex-grow:1;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.color-input__input.sc-swirl-color-input:focus{outline:none}.color-input__input.sc-swirl-color-input:disabled{color:var(--s-text-disabled);background-color:transparent}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.color-input__input.sc-swirl-color-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.color-input__preview-button.sc-swirl-color-input{width:2.75rem;height:2.75rem;margin-top:-1.25rem;flex-shrink:0;border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-s);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}";export{E as swirl_color_input}