@getflip/swirl-components 0.533.0 → 0.534.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 (156) hide show
  1. package/components.json +158 -1
  2. package/dist/cjs/index-D-n4TKMG.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{media-query.service-B8u-DqoO.js → media-query.service-C1jMjjiy.js} +1 -1
  5. package/dist/cjs/swirl-action-list_2.cjs.entry.js +2 -2
  6. package/dist/cjs/swirl-app-layout.cjs.entry.js +2 -2
  7. package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-banner.cjs.entry.js +2 -2
  9. package/dist/cjs/swirl-button.cjs.entry.js +2 -2
  10. package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/swirl-components.cjs.js +1 -1
  12. package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
  13. package/dist/cjs/swirl-date-input.cjs.entry.js +2 -2
  14. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
  15. package/dist/cjs/swirl-file-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/swirl-file-viewer-audio_7.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +2 -2
  20. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +2 -2
  21. package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -1
  22. package/dist/cjs/swirl-inline-status.cjs.entry.js +2 -2
  23. package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
  25. package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
  26. package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
  27. package/dist/cjs/swirl-option-list.cjs.entry.js +1 -1
  28. package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
  29. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
  30. package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
  31. package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +2 -2
  32. package/dist/cjs/swirl-resource-list-item.cjs.entry.js +2 -2
  33. package/dist/cjs/swirl-search.cjs.entry.js +2 -2
  34. package/dist/cjs/swirl-select.cjs.entry.js +1 -1
  35. package/dist/cjs/swirl-shell-layout.cjs.entry.js +1 -1
  36. package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
  37. package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
  38. package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
  39. package/dist/cjs/swirl-table.cjs.entry.js +2287 -2
  40. package/dist/cjs/swirl-tabs.cjs.entry.js +1 -1
  41. package/dist/cjs/swirl-text-input.cjs.entry.js +2 -2
  42. package/dist/cjs/swirl-time-input.cjs.entry.js +2 -2
  43. package/dist/cjs/swirl-toast.cjs.entry.js +2 -2
  44. package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
  45. package/dist/cjs/swirl-tooltip.cjs.entry.js +1 -1
  46. package/dist/cjs/{utils-UfZG-xPD.js → utils-C4tLdXqU.js} +33 -0
  47. package/dist/collection/components/swirl-table/swirl-table-virtualizer.js +224 -0
  48. package/dist/collection/components/swirl-table/swirl-table.js +253 -2
  49. package/dist/collection/components/swirl-table/swirl-table.stories.js +190 -0
  50. package/dist/collection/utils.js +32 -0
  51. package/dist/components/media-query.service.js +1 -1
  52. package/dist/components/swirl-file-viewer-pdf2.js +1 -1
  53. package/dist/components/swirl-popover2.js +1 -1
  54. package/dist/components/swirl-tab-bar2.js +1 -1
  55. package/dist/components/swirl-table.js +1 -1
  56. package/dist/components/swirl-tabs.js +1 -1
  57. package/dist/components/swirl-tooltip2.js +1 -1
  58. package/dist/components/utils.js +1 -1
  59. package/dist/esm/index-Dz56lJ37.js +4 -4
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/esm/{media-query.service-CCYT6DU8.js → media-query.service-Bbqqduao.js} +1 -1
  62. package/dist/esm/swirl-action-list_2.entry.js +2 -2
  63. package/dist/esm/swirl-app-layout.entry.js +2 -2
  64. package/dist/esm/swirl-autocomplete.entry.js +1 -1
  65. package/dist/esm/swirl-banner.entry.js +2 -2
  66. package/dist/esm/swirl-button.entry.js +2 -2
  67. package/dist/esm/swirl-carousel.entry.js +1 -1
  68. package/dist/esm/swirl-components.js +1 -1
  69. package/dist/esm/swirl-console-layout.entry.js +1 -1
  70. package/dist/esm/swirl-date-input.entry.js +2 -2
  71. package/dist/esm/swirl-date-picker_2.entry.js +1 -1
  72. package/dist/esm/swirl-file-chip.entry.js +1 -1
  73. package/dist/esm/swirl-file-viewer-audio_7.entry.js +1 -1
  74. package/dist/esm/swirl-file-viewer_7.entry.js +1 -1
  75. package/dist/esm/swirl-form-control.entry.js +1 -1
  76. package/dist/esm/swirl-icon-check-small_3.entry.js +2 -2
  77. package/dist/esm/swirl-icon-error_3.entry.js +2 -2
  78. package/dist/esm/swirl-image-grid-item.entry.js +1 -1
  79. package/dist/esm/swirl-inline-status.entry.js +2 -2
  80. package/dist/esm/swirl-lightbox.entry.js +1 -1
  81. package/dist/esm/swirl-menu-item.entry.js +1 -1
  82. package/dist/esm/swirl-menu.entry.js +1 -1
  83. package/dist/esm/swirl-modal.entry.js +1 -1
  84. package/dist/esm/swirl-option-list.entry.js +1 -1
  85. package/dist/esm/swirl-pagination.entry.js +1 -1
  86. package/dist/esm/swirl-pdf-reader.entry.js +1 -1
  87. package/dist/esm/swirl-popover_2.entry.js +1 -1
  88. package/dist/esm/swirl-resource-list-file-item.entry.js +2 -2
  89. package/dist/esm/swirl-resource-list-item.entry.js +2 -2
  90. package/dist/esm/swirl-search.entry.js +2 -2
  91. package/dist/esm/swirl-select.entry.js +1 -1
  92. package/dist/esm/swirl-shell-layout.entry.js +1 -1
  93. package/dist/esm/swirl-tab-bar.entry.js +1 -1
  94. package/dist/esm/swirl-table-column.entry.js +1 -1
  95. package/dist/esm/swirl-table-row.entry.js +1 -1
  96. package/dist/esm/swirl-table.entry.js +2288 -3
  97. package/dist/esm/swirl-tabs.entry.js +1 -1
  98. package/dist/esm/swirl-text-input.entry.js +2 -2
  99. package/dist/esm/swirl-time-input.entry.js +2 -2
  100. package/dist/esm/swirl-toast.entry.js +2 -2
  101. package/dist/esm/swirl-toolbar.entry.js +1 -1
  102. package/dist/esm/swirl-tooltip.entry.js +1 -1
  103. package/dist/esm/{utils-CCck-DTo.js → utils-D23VxAsw.js} +33 -1
  104. package/dist/swirl-components/p-0cb6bbde.entry.js +1 -0
  105. package/dist/swirl-components/{p-ea6bdee5.entry.js → p-20354a36.entry.js} +1 -1
  106. package/dist/swirl-components/{p-8d078f8a.entry.js → p-247ada6e.entry.js} +1 -1
  107. package/dist/swirl-components/{p-270be9f2.entry.js → p-29fed244.entry.js} +1 -1
  108. package/dist/swirl-components/{p-c924fc96.entry.js → p-437ac2fa.entry.js} +1 -1
  109. package/dist/swirl-components/{p-97deaddc.entry.js → p-48c1b8e4.entry.js} +1 -1
  110. package/dist/swirl-components/{p-40be5fde.entry.js → p-48c559a4.entry.js} +1 -1
  111. package/dist/swirl-components/p-4a1d3582.entry.js +1 -0
  112. package/dist/swirl-components/{p-ad4fd14f.entry.js → p-5c6fc0bc.entry.js} +1 -1
  113. package/dist/swirl-components/{p-73a8e8a0.entry.js → p-6242f9bb.entry.js} +1 -1
  114. package/dist/swirl-components/{p-0c0acfd3.entry.js → p-641bb5b1.entry.js} +1 -1
  115. package/dist/swirl-components/{p-993dae75.entry.js → p-6528e39b.entry.js} +1 -1
  116. package/dist/swirl-components/{p-b45902de.entry.js → p-6785b8a5.entry.js} +1 -1
  117. package/dist/swirl-components/{p-dcf08d9a.entry.js → p-692dd291.entry.js} +1 -1
  118. package/dist/swirl-components/{p-418a8b7b.entry.js → p-6e0825ae.entry.js} +1 -1
  119. package/dist/swirl-components/{p-22931b7b.entry.js → p-71e1f20d.entry.js} +1 -1
  120. package/dist/swirl-components/{p-f015fc2d.entry.js → p-78af0765.entry.js} +1 -1
  121. package/dist/swirl-components/{p-2ddf4a93.entry.js → p-7a9bb681.entry.js} +1 -1
  122. package/dist/swirl-components/{p-b36ee49f.entry.js → p-84cfb27a.entry.js} +1 -1
  123. package/dist/swirl-components/{p-c6bceca5.entry.js → p-91b316f9.entry.js} +1 -1
  124. package/dist/swirl-components/{p-da6fa0fa.entry.js → p-958aa736.entry.js} +1 -1
  125. package/dist/swirl-components/{p-fbdb4aff.entry.js → p-95d6d7ad.entry.js} +1 -1
  126. package/dist/swirl-components/{p-577174d9.entry.js → p-984c4d86.entry.js} +1 -1
  127. package/dist/swirl-components/{p-CCck-DTo.js → p-D23VxAsw.js} +1 -1
  128. package/dist/swirl-components/{p-Bfn7CHM9.js → p-_iAIu_AF.js} +1 -1
  129. package/dist/swirl-components/{p-d0275263.entry.js → p-a11ba0b5.entry.js} +1 -1
  130. package/dist/swirl-components/{p-1bf78baf.entry.js → p-ae978c57.entry.js} +1 -1
  131. package/dist/swirl-components/{p-95a403cf.entry.js → p-b08aa57d.entry.js} +1 -1
  132. package/dist/swirl-components/{p-26362ab2.entry.js → p-bb4c80bf.entry.js} +1 -1
  133. package/dist/swirl-components/{p-e63650e3.entry.js → p-c182f4c1.entry.js} +1 -1
  134. package/dist/swirl-components/{p-d763ce05.entry.js → p-c4dad69d.entry.js} +1 -1
  135. package/dist/swirl-components/{p-47b02bc4.entry.js → p-cf855c44.entry.js} +1 -1
  136. package/dist/swirl-components/{p-fbcc5141.entry.js → p-d26aa1e7.entry.js} +1 -1
  137. package/dist/swirl-components/{p-3340670b.entry.js → p-d298c94c.entry.js} +1 -1
  138. package/dist/swirl-components/{p-9ad61433.entry.js → p-d8924470.entry.js} +1 -1
  139. package/dist/swirl-components/{p-268ddaee.entry.js → p-dab890a1.entry.js} +2 -2
  140. package/dist/swirl-components/{p-3e6fb027.entry.js → p-de5a7b4a.entry.js} +1 -1
  141. package/dist/swirl-components/p-ea36e3ec.entry.js +1 -0
  142. package/dist/swirl-components/{p-96c9486a.entry.js → p-eb297822.entry.js} +1 -1
  143. package/dist/swirl-components/{p-bee027a0.entry.js → p-ec10ca71.entry.js} +1 -1
  144. package/dist/swirl-components/{p-94e6a907.entry.js → p-f6c37730.entry.js} +1 -1
  145. package/dist/swirl-components/{p-b581b1e6.entry.js → p-fd188df6.entry.js} +1 -1
  146. package/dist/swirl-components/swirl-components.esm.js +1 -1
  147. package/dist/types/components/swirl-table/swirl-table-virtualizer.d.ts +60 -0
  148. package/dist/types/components/swirl-table/swirl-table.d.ts +43 -0
  149. package/dist/types/components/swirl-table/swirl-table.stories.d.ts +2 -0
  150. package/dist/types/components.d.ts +57 -2
  151. package/dist/types/utils.d.ts +12 -0
  152. package/package.json +2 -1
  153. package/vscode-data.json +16 -0
  154. package/dist/swirl-components/p-0c0b46e1.entry.js +0 -1
  155. package/dist/swirl-components/p-2943bc69.entry.js +0 -1
  156. package/dist/swirl-components/p-5fa1c77c.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-n4TKMG.js');
4
- var utils = require('./utils-UfZG-xPD.js');
4
+ var utils = require('./utils-C4tLdXqU.js');
5
5
 
6
6
  const swirlTabsCss = () => `.sc-swirl-tabs-h{display:block;width:100%}.sc-swirl-tabs-h *.sc-swirl-tabs{box-sizing:border-box}.tabs.sc-swirl-tabs{width:100%}`;
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  var index = require('./index-D-n4TKMG.js');
4
4
  var index$1 = require('./index-DcAhLZUH.js');
5
- var mediaQuery_service = require('./media-query.service-B8u-DqoO.js');
6
- require('./utils-UfZG-xPD.js');
5
+ var mediaQuery_service = require('./media-query.service-C1jMjjiy.js');
6
+ require('./utils-C4tLdXqU.js');
7
7
 
8
8
  const swirlTextInputCss = () => `.sc-swirl-text-input-h{display:block;width:100%}.sc-swirl-text-input-h *.sc-swirl-text-input{box-sizing:border-box}.text-input.sc-swirl-text-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}.text-input--auto-grow.sc-swirl-text-input .text-input__input.sc-swirl-text-input{max-height:none}.text-input--clearable.sc-swirl-text-input,.text-input--type-number.sc-swirl-text-input,.text-input--type-password.sc-swirl-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--clearable.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input,.text-input--type-number.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input,.text-input--type-password.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--show-password.sc-swirl-text-input .text-input__input.sc-swirl-text-input{width:100%}.text-input--font-size-sm.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--font-size-sm.sc-swirl-text-input .text-input__input.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text-input--font-size-base.sc-swirl-text-input{--swirl-text-input-placeholder-size:var(--s-font-size-base);font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--font-size-base.sc-swirl-text-input .text-input__input.sc-swirl-text-input{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text-input--has-suffix.sc-swirl-text-input input.text-input__input.sc-swirl-text-input:not([type="password"]){width:0.25rem;min-width:0.25rem}.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input{width:2rem;height:1.125rem;justify-content:center;background-color:var(--s-surface-raised-default)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:first-of-type{border-top-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:last-of-type{border-bottom-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:hover{background-color:var(--s-surface-raised-hovered)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-less.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-more.sc-swirl-text-input{width:1rem}.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:0}}.text-input--inline.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{top:calc(100% + var(--s-space-12) + var(--s-border-width-default));right:calc(-1 * var(--s-space-12));max-width:6rem}.text-input__input.sc-swirl-text-input{display:inline-flex;width:100%;max-height:13.75rem;margin:0;padding:0;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);resize:none;caret-color:var(--s-border-highlight)}.text-input__input.sc-swirl-text-input:focus{outline:none}.text-input__input.sc-swirl-text-input:disabled{color:var(--s-text-subdued);background-color:transparent}.text-input__input.sc-swirl-text-input::-webkit-outer-spin-button,.text-input__input.sc-swirl-text-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.text-input__input[type="number"].sc-swirl-text-input{-moz-appearance:textfield}.text-input__input.sc-swirl-text-input::-moz-placeholder{color:var(--swirl-input-placeholder-color);font-size:var(--swirl-text-input-placeholder-size)}.text-input__input.sc-swirl-text-input::placeholder{color:var(--swirl-input-placeholder-color);font-size:var(--swirl-text-input-placeholder-size)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__input.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text-input--disable-dynamic-width.sc-swirl-text-input input.text-input__input.sc-swirl-text-input:not([type="password"]){width:100%;min-width:0}.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.text-input__clear-button.sc-swirl-text-input:focus:not(:focus-visible),.text-input__password-toggle.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__clear-button.sc-swirl-text-input:focus-visible,.text-input__password-toggle.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{top:-0.625rem}}.text-input__stepper.sc-swirl-text-input{position:absolute;top:-1.4375rem;right:0;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__stepper.sc-swirl-text-input{top:-1.25rem}}.text-input__step-button.sc-swirl-text-input{display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.text-input__step-button.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__step-button.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}.text-input__character-counter.sc-swirl-text-input{position:absolute;top:-1.375rem;right:0;display:flex;color:var(--s-text-subdued);line-height:var(--s-line-height-sm);flex-direction:column}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__character-counter.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text-input__prefix.sc-swirl-text-input{padding-right:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}.text-input__suffix.sc-swirl-text-input{padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}`;
9
9
 
@@ -3,8 +3,8 @@
3
3
  var index = require('./index-D-n4TKMG.js');
4
4
  var index$2 = require('./index-DcAhLZUH.js');
5
5
  var index$1 = require('./index-BOqO2Grl.js');
6
- var mediaQuery_service = require('./media-query.service-B8u-DqoO.js');
7
- require('./utils-UfZG-xPD.js');
6
+ var mediaQuery_service = require('./media-query.service-C1jMjjiy.js');
7
+ require('./utils-C4tLdXqU.js');
8
8
 
9
9
  const swirlTimeInputCss = () => `.sc-swirl-time-input-h{display:flex;width:100%}.sc-swirl-time-input-h *.sc-swirl-time-input{box-sizing:border-box}.time-input.sc-swirl-time-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);line-height:var(--s-line-height-sm)}.time-input--inline.sc-swirl-time-input .time-input__icon.sc-swirl-time-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input--inline.sc-swirl-time-input .time-input__icon.sc-swirl-time-input{top:0}}.time-input--inline.sc-swirl-time-input .time-input__input.sc-swirl-time-input::-moz-placeholder{color:transparent}.time-input--inline.sc-swirl-time-input .time-input__input.sc-swirl-time-input::placeholder{color:transparent}.time-input__input.sc-swirl-time-input{display:inline-flex;width:calc(100% - 1.25rem - var(--s-space-8));margin:0;padding:0;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)}.time-input__input.sc-swirl-time-input:focus{outline:none}.time-input__input.sc-swirl-time-input:disabled{color:var(--s-text-disabled);background-color:transparent}.time-input__input.sc-swirl-time-input::-moz-placeholder{color:var(--swirl-input-placeholder-color)}.time-input__input.sc-swirl-time-input::placeholder{color:var(--swirl-input-placeholder-color)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input__input.sc-swirl-time-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.time-input__icon.sc-swirl-time-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input__icon.sc-swirl-time-input{top:-0.625rem}}`;
10
10
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  var index = require('./index-D-n4TKMG.js');
4
4
  var index$1 = require('./index-DcAhLZUH.js');
5
- var mediaQuery_service = require('./media-query.service-B8u-DqoO.js');
6
- require('./utils-UfZG-xPD.js');
5
+ var mediaQuery_service = require('./media-query.service-C1jMjjiy.js');
6
+ require('./utils-C4tLdXqU.js');
7
7
 
8
8
  const swirlToastCss = () => `:host{display:flex}:host *{box-sizing:border-box}.toast{display:flex;width:100%;max-width:28rem;padding:var(--s-space-16);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);box-shadow:var(--s-shadow-level-2)}.toast--intent-critical{background-color:var(--s-surface-critical-default)}.toast--intent-success{background-color:var(--s-surface-success-default)}.toast--action-position-bottom .toast__content-container{flex-direction:column}.toast--action-position-bottom .toast__action-button{margin-top:var(--s-space-8);margin-left:0;align-self:flex-start}.toast__icon{display:inline-flex;width:1.5rem;height:1.5rem;margin-right:0.625rem;flex-shrink:0}.toast__icon ::part(icon){color:var(--s-icon-on-status)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__icon{width:1.25rem;height:1.25rem}}.toast__content-container{display:flex;flex-grow:1;min-width:0}.toast__content{flex-basis:min-content;flex-grow:1;line-height:var(--s-line-height-base);text-align:left;align-self:flex-start}.toast__content ::part(link){color:var(--text-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__content{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.toast__action-button{--swirl-plain-button-text-color-default:var(--s-text-on-status);--swirl-plain-button-text-color-hovered:var(--s-text-on-status);--swirl-plain-button-text-color-pressed:var(--s-text-on-status);margin-left:var(--s-space-16);min-width:0;flex-shrink:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__action-button{margin-top:-1px}}.toast__dismiss-button{display:inline-flex;min-width:1.5rem;height:1.5rem;margin-left:var(--s-space-16);padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;color:var(--s-text-on-status);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);cursor:pointer}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__dismiss-button{margin-top:calc(-1 * var(--s-space-2))}}.toast__dismiss-button ::part(icon){color:var(--s-icon-on-status)}`;
9
9
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-n4TKMG.js');
4
- var utils = require('./utils-UfZG-xPD.js');
4
+ var utils = require('./utils-C4tLdXqU.js');
5
5
 
6
6
  const swirlToolbarCss = () => `:host{display:block}:host *{box-sizing:border-box}`;
7
7
 
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-D-n4TKMG.js');
4
4
  var floatingUi_dom = require('./floating-ui.dom-C8bqk2dV.js');
5
5
  var index$1 = require('./index-DcAhLZUH.js');
6
- var utils = require('./utils-UfZG-xPD.js');
6
+ var utils = require('./utils-C4tLdXqU.js');
7
7
 
8
8
  const swirlTooltipCss = () => `:host{display:contents;font-weight:var(--s-font-weight-normal)}:host *{box-sizing:border-box}.tooltip{display:contents}.tooltip--visible .tooltip__popper{display:block;animation:tooltip-fade-in 0.15s;animation-delay:0.1s;animation-fill-mode:forwards;opacity:0}.tooltip--actual-placement-top .tooltip__arrow{top:calc(100% - 0.0625rem);transform:translate3d(0, -50%, 0) rotate(45deg)}.tooltip--actual-placement-bottom .tooltip__arrow{bottom:calc(100% - 0.0625rem);transform:translate3d(0, 50%, 0) rotate(45deg)}.tooltip--actual-placement-left .tooltip__arrow{left:calc(100% - 0.0625rem);transform:translate3d(-50%, 0, 0) rotate(45deg)}.tooltip--actual-placement-right .tooltip__arrow{right:calc(100% - 0.0625rem);transform:translate3d(50%, 0, 0) rotate(45deg)}.tooltip .tooltip__reference{display:contents}.tooltip__popper{position:fixed;display:none;opacity:0;border:none;padding:0;margin:0;background:transparent;overflow:visible}.tooltip__popper::backdrop{display:none}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:calc(var(--s-space-8) + 0.0625rem);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);text-align:start;box-shadow:var(--s-shadow-level-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tooltip__bubble{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tooltip__content{white-space:normal}.tooltip__arrow{position:absolute;width:0.6875rem;height:0.6875rem;border-radius:0.125rem;background-color:var(--s-surface-neutral-default)}.tooltip--intent-info .tooltip__bubble,.tooltip--intent-info .tooltip__arrow{background-color:var(--s-surface-info-default)}.tooltip--intent-primary .tooltip__bubble,.tooltip--intent-primary .tooltip__arrow{background-color:var(--s-action-primary-default);color:var(--s-text-on-action-primary)}@keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}`;
9
9
 
@@ -189,6 +189,38 @@ function getPixelsFromRemToken(token) {
189
189
  .getPropertyValue(token)
190
190
  .replace("rem", "") * 16);
191
191
  }
192
+ /**
193
+ * Nearest vertically scrolling ancestor, also across shadow roots. Falls back
194
+ * to the window.
195
+ */
196
+ function getScrollParent(el) {
197
+ let node = getFlatTreeParent(el);
198
+ while (node && node !== document.body && node !== document.documentElement) {
199
+ const { overflowY } = getComputedStyle(node);
200
+ if (/(auto|scroll|overlay)/.test(overflowY) &&
201
+ node.scrollHeight > node.clientHeight) {
202
+ return node;
203
+ }
204
+ node = getFlatTreeParent(node);
205
+ }
206
+ return window;
207
+ }
208
+ /**
209
+ * Parent in the rendered (flat) tree: a slotted element's parent is its slot,
210
+ * not its light DOM parent, and a shadow root's top element's parent is the
211
+ * host. Unlike `closestPassShadow`, this finds ancestors inside the shadow
212
+ * root an element is slotted into.
213
+ */
214
+ function getFlatTreeParent(el) {
215
+ if (el.assignedSlot) {
216
+ return el.assignedSlot;
217
+ }
218
+ if (el.parentElement) {
219
+ return el.parentElement;
220
+ }
221
+ const root = el.getRootNode();
222
+ return root instanceof ShadowRoot ? root.host : null;
223
+ }
192
224
 
193
225
  exports.closestPassShadow = closestPassShadow;
194
226
  exports.debounce = debounce;
@@ -197,6 +229,7 @@ exports.getCircularArrayIndex = getCircularArrayIndex;
197
229
  exports.getDesktopMediaQuery = getDesktopMediaQuery;
198
230
  exports.getISODateString = getISODateString;
199
231
  exports.getPixelsFromRemToken = getPixelsFromRemToken;
232
+ exports.getScrollParent = getScrollParent;
200
233
  exports.getVisibleHeight = getVisibleHeight;
201
234
  exports.isAudioMimeType = isAudioMimeType;
202
235
  exports.isCompressedArchiveMimeType = isCompressedArchiveMimeType;
@@ -0,0 +1,224 @@
1
+ import { defaultRangeExtractor, elementScroll, observeElementOffset, observeElementRect, observeWindowOffset, observeWindowRect, Virtualizer, windowScroll, } from "@tanstack/virtual-core";
2
+ /**
3
+ * Decides which rows of a swirl-table to draw and positions them. The consumer
4
+ * renders the rows, identified by `data-index`. Padding on the table body
5
+ * stands in for the rows not drawn. A row's margin-top fills the gap before a
6
+ * kept row far from the visible ones.
7
+ */
8
+ export class SwirlTableVirtualizer {
9
+ constructor(bodyEl, scrollElement, config, onIndexesChange) {
10
+ this.bodyEl = bodyEl;
11
+ this.scrollElement = scrollElement;
12
+ this.config = config;
13
+ this.onIndexesChange = onIndexesChange;
14
+ // Index each row was last measured for. Rows can be reused for other indexes.
15
+ this.measuredIndexes = new WeakMap();
16
+ this.observedRows = new Set();
17
+ /**
18
+ * Own observer, because the virtualizer's `measureElement` caches elements
19
+ * by index and stops observing reused ones.
20
+ */
21
+ this.resizeObserver = new ResizeObserver((entries) => this.resizeRows(entries.map(({ borderBoxSize, target }) => ({
22
+ row: target,
23
+ height: borderBoxSize[0].blockSize,
24
+ }))));
25
+ this.indexes = [];
26
+ this.isResizingRows = false;
27
+ this.hasChangeWhileResizing = false;
28
+ this.bodyEl.style.overflowAnchor = "none";
29
+ this.scrollMargin = this.measureScrollMargin();
30
+ this.virtualizer = new Virtualizer(this.options());
31
+ this.unmount = this.virtualizer._didMount();
32
+ this.virtualizer._willUpdate();
33
+ this.update();
34
+ }
35
+ setConfig(config) {
36
+ this.config = config;
37
+ this.applyOptions();
38
+ }
39
+ /**
40
+ * Call after rows were added, removed or re-indexed. Measures new rows and
41
+ * positions all rows.
42
+ */
43
+ sync() {
44
+ this.updateScrollMargin();
45
+ this.observedRows.forEach((row) => {
46
+ if (!row.isConnected) {
47
+ this.resizeObserver.unobserve(row);
48
+ this.observedRows.delete(row);
49
+ }
50
+ });
51
+ const rows = this.getRenderedRows();
52
+ rows.forEach((row) => {
53
+ if (!this.observedRows.has(row)) {
54
+ this.observedRows.add(row);
55
+ this.resizeObserver.observe(row);
56
+ }
57
+ });
58
+ // Read all heights before resizeRows() writes styles, so the browser lays
59
+ // out the table once instead of once per row.
60
+ this.resizeRows(rows
61
+ .filter((row) => this.measuredIndexes.get(row) !== getRowIndex(row))
62
+ .map((row) => ({ row, height: row.getBoundingClientRect().height })));
63
+ this.layout();
64
+ }
65
+ destroy() {
66
+ this.unmount();
67
+ this.resizeObserver.disconnect();
68
+ this.observedRows.clear();
69
+ this.bodyEl.style.overflowAnchor = "";
70
+ this.bodyEl.style.paddingTop = "";
71
+ this.bodyEl.style.paddingBottom = "";
72
+ this.getRenderedRows().forEach((row) => (row.style.marginTop = ""));
73
+ }
74
+ applyOptions() {
75
+ this.virtualizer.setOptions(this.options());
76
+ this.virtualizer._willUpdate();
77
+ this.update();
78
+ }
79
+ update() {
80
+ // applyOptions() calls update() again with the new margin.
81
+ if (this.updateScrollMargin()) {
82
+ return;
83
+ }
84
+ const indexes = this.virtualizer
85
+ .getVirtualItems()
86
+ .map(({ index }) => index);
87
+ if (!equalIndexes(indexes, this.indexes)) {
88
+ this.indexes = indexes;
89
+ this.onIndexesChange(indexes);
90
+ }
91
+ this.layout();
92
+ }
93
+ /**
94
+ * Measures where the rows start again, as content above the table can
95
+ * change height, e.g. a toolbar appears. Returns whether it changed.
96
+ */
97
+ updateScrollMargin() {
98
+ const scrollMargin = this.measureScrollMargin();
99
+ if (Math.abs(scrollMargin - this.scrollMargin) < 1) {
100
+ return false;
101
+ }
102
+ this.scrollMargin = scrollMargin;
103
+ this.applyOptions();
104
+ return true;
105
+ }
106
+ /**
107
+ * Reports each row's height for its current index. Every resize makes the
108
+ * virtualizer call onChange, so the rows are positioned once at the end
109
+ * instead of after each resize.
110
+ */
111
+ resizeRows(sizes) {
112
+ this.isResizingRows = true;
113
+ try {
114
+ sizes.forEach(({ row, height }) => {
115
+ const index = getRowIndex(row);
116
+ // An unrendered row has no height yet. Counting it as 0 would draw
117
+ // every row. The ResizeObserver measures it later.
118
+ if (!row.isConnected || Number.isNaN(index) || height === 0) {
119
+ return;
120
+ }
121
+ this.measuredIndexes.set(row, index);
122
+ this.virtualizer.resizeItem(index, height);
123
+ });
124
+ }
125
+ finally {
126
+ this.isResizingRows = false;
127
+ }
128
+ if (this.hasChangeWhileResizing) {
129
+ this.hasChangeWhileResizing = false;
130
+ this.update();
131
+ }
132
+ }
133
+ handleChange() {
134
+ if (this.isResizingRows) {
135
+ this.hasChangeWhileResizing = true;
136
+ return;
137
+ }
138
+ this.update();
139
+ }
140
+ layout() {
141
+ const items = new Map(this.virtualizer.getVirtualItems().map((item) => [item.index, item]));
142
+ let cursor;
143
+ this.getRenderedRows().forEach((row) => {
144
+ const index = getRowIndex(row);
145
+ const item = items.get(index);
146
+ // The consumer hasn't removed this row yet.
147
+ if (!item) {
148
+ return;
149
+ }
150
+ // aria-rowindex starts at 1, which is the header row.
151
+ if (row.index !== index + 2) {
152
+ row.index = index + 2;
153
+ }
154
+ const start = item.start - this.scrollMargin;
155
+ if (cursor === undefined) {
156
+ setStyle(this.bodyEl, "paddingTop", start);
157
+ setStyle(row, "marginTop", 0);
158
+ }
159
+ else {
160
+ setStyle(row, "marginTop", start - cursor);
161
+ }
162
+ cursor = item.end - this.scrollMargin;
163
+ });
164
+ if (cursor === undefined) {
165
+ setStyle(this.bodyEl, "paddingTop", 0);
166
+ }
167
+ setStyle(this.bodyEl, "paddingBottom", this.virtualizer.getTotalSize() - (cursor ?? 0));
168
+ }
169
+ getRenderedRows() {
170
+ return Array.from(this.bodyEl.querySelectorAll("swirl-table-row[data-index]"));
171
+ }
172
+ options() {
173
+ const { estimatedRowHeight, keptIndexes, overscan, rowCount } = this.config;
174
+ const isWindow = this.scrollElement instanceof Window;
175
+ return {
176
+ count: rowCount,
177
+ estimateSize: () => estimatedRowHeight,
178
+ getScrollElement: () => this.scrollElement,
179
+ // defaults to 0, which makes the virtualizer scroll to the top when it
180
+ // subscribes to the scroll container.
181
+ initialOffset: () => this.scrollElement instanceof Window
182
+ ? this.scrollElement.scrollY
183
+ : this.scrollElement.scrollTop,
184
+ overscan,
185
+ scrollMargin: this.scrollMargin,
186
+ rangeExtractor: (range) => mergeIndexes(defaultRangeExtractor(range), keptIndexes.filter((index) => Number.isInteger(index) && index >= 0 && index < rowCount)),
187
+ observeElementRect: (isWindow
188
+ ? observeWindowRect
189
+ : observeElementRect),
190
+ observeElementOffset: (isWindow
191
+ ? observeWindowOffset
192
+ : observeElementOffset),
193
+ scrollToFn: (isWindow
194
+ ? windowScroll
195
+ : elementScroll),
196
+ onChange: () => this.handleChange(),
197
+ };
198
+ }
199
+ /** Offset of the first row from the top of the scrolled content. */
200
+ measureScrollMargin() {
201
+ const bodyTop = this.bodyEl.getBoundingClientRect().top;
202
+ if (this.scrollElement instanceof Window) {
203
+ return bodyTop + this.scrollElement.scrollY;
204
+ }
205
+ return (bodyTop -
206
+ this.scrollElement.getBoundingClientRect().top +
207
+ this.scrollElement.scrollTop);
208
+ }
209
+ }
210
+ function getRowIndex(row) {
211
+ return Number(row.dataset.index);
212
+ }
213
+ function mergeIndexes(a, b) {
214
+ return [...new Set([...a, ...b])].sort((x, y) => x - y);
215
+ }
216
+ function equalIndexes(a, b) {
217
+ return a.length === b.length && a.every((index, i) => index === b[i]);
218
+ }
219
+ function setStyle(el, property, px) {
220
+ const value = px > 0 ? `${px}px` : "";
221
+ if (el.style[property] !== value) {
222
+ el.style[property] = value;
223
+ }
224
+ }