@getflip/swirl-components-react 0.1.0 → 0.2.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 (160) hide show
  1. package/dist/_commonjsHelpers-44457d8d.ba94af77.js +37 -0
  2. package/dist/a11y-dialog.esm-d7a94c8c.bd6ae411.js +99 -0
  3. package/dist/bodyScrollLock.esm-ce6356d8.2c600fb9.js +93 -0
  4. package/dist/{flip-action-list-item.entry.1b728e6a.js → flip-action-list-item.entry.66f33805.js} +3 -2
  5. package/dist/{flip-action-list-section.entry.da3e6186.js → flip-action-list-section.entry.2927ba41.js} +1 -1
  6. package/dist/{flip-action-list.entry.400a309a.js → flip-action-list.entry.66352b19.js} +2 -2
  7. package/dist/flip-avatar-group.entry.be7886a3.js +20 -0
  8. package/dist/{flip-avatar.entry.2eb3242e.js → flip-avatar.entry.f95286a1.js} +3 -2
  9. package/dist/flip-badge.entry.3f2d34e9.js +20 -0
  10. package/dist/{flip-banner.entry.b3012465.js → flip-banner.entry.32f2ef57.js} +3 -2
  11. package/dist/flip-button-group.entry.ed86679b.js +15 -0
  12. package/dist/flip-button.entry.555b8fd4.js +33 -0
  13. package/dist/{flip-checkbox.entry.2f740fb8.js → flip-checkbox.entry.9768035f.js} +10 -9
  14. package/dist/{flip-chip.entry.e9729ac7.js → flip-chip.entry.5ebbf411.js} +3 -2
  15. package/dist/flip-date-input.entry.7bf9efc5.js +5473 -0
  16. package/dist/flip-date-picker_3.entry.54e0b84d.js +1270 -0
  17. package/dist/{flip-description-list-item.entry.c789511e.js → flip-description-list-item.entry.f4e6faf7.js} +1 -1
  18. package/dist/{flip-description-list.entry.3b158436.js → flip-description-list.entry.2b1d4579.js} +1 -1
  19. package/dist/flip-dialog.entry.2bbc3bff.js +45 -0
  20. package/dist/flip-empty-state.entry.376592fa.js +15 -0
  21. package/dist/flip-file-uploader.entry.c0ddf5a7.js +32 -0
  22. package/dist/flip-file-viewer-audio_6.entry.d60d1099.js +16174 -0
  23. package/dist/flip-file-viewer.entry.0c2922e5.js +95 -0
  24. package/dist/flip-form-control.entry.71c275f5.js +58 -0
  25. package/dist/flip-form-group.entry.ad2385d5.js +18 -0
  26. package/dist/flip-heading.entry.1245bdda.js +18 -0
  27. package/dist/{flip-icon-add-photo.entry.a1003bdf.js → flip-icon-add-photo.entry.c3178433.js} +1 -1
  28. package/dist/{flip-icon-add.entry.7103fbe7.js → flip-icon-add.entry.708a8c7c.js} +1 -1
  29. package/dist/{flip-icon-admin-panel-settings.entry.36a12e47.js → flip-icon-admin-panel-settings.entry.88af777a.js} +1 -1
  30. package/dist/{flip-icon-arrow-back.entry.e35ba078.js → flip-icon-arrow-back.entry.abd86e13.js} +1 -1
  31. package/dist/{flip-icon-arrow-forward.entry.5138c404.js → flip-icon-arrow-forward.entry.ef6e8b77.js} +1 -1
  32. package/dist/flip-icon-arrow-left.entry.70be0607.js +15 -0
  33. package/dist/{flip-icon-arrow-right-small.entry.d1eeb150.js → flip-icon-arrow-right-small.entry.d342c71f.js} +1 -1
  34. package/dist/flip-icon-arrow-right.entry.bd9eae8e.js +15 -0
  35. package/dist/{flip-icon-attachment.entry.594b602b.js → flip-icon-attachment.entry.898243d2.js} +1 -1
  36. package/dist/flip-icon-cancel.entry.fac41df2.js +15 -0
  37. package/dist/{flip-icon-chat-bubble.entry.f56fcdc4.js → flip-icon-chat-bubble.entry.016c1f0d.js} +1 -1
  38. package/dist/{flip-icon-check-circle.entry.e4f8169d.js → flip-icon-check-circle.entry.330f4038.js} +1 -1
  39. package/dist/{flip-icon-check-small.entry.308d57d1.js → flip-icon-check-small.entry.590b928f.js} +1 -1
  40. package/dist/{flip-icon-check-strong.entry.b61365d2.js → flip-icon-check-strong.entry.8fb90e69.js} +1 -1
  41. package/dist/{flip-icon-check.entry.f2c6b547.js → flip-icon-check.entry.bf4892a9.js} +1 -1
  42. package/dist/{flip-icon-chevron-left.entry.dbe9b291.js → flip-icon-chevron-left.entry.8a5cd7ef.js} +1 -1
  43. package/dist/{flip-icon-chevron-right.entry.9565c0f1.js → flip-icon-chevron-right.entry.ba87bdc8.js} +1 -1
  44. package/dist/{flip-icon-close-small.entry.8bfcf1b1.js → flip-icon-close-small.entry.d3ca39fb.js} +1 -1
  45. package/dist/{flip-icon-close.entry.41992748.js → flip-icon-close.entry.ebcf0fe6.js} +1 -1
  46. package/dist/flip-icon-cloud-upload.entry.bf4e840b.js +15 -0
  47. package/dist/{flip-icon-comment.entry.2aac2c10.js → flip-icon-comment.entry.dd07b7a4.js} +1 -1
  48. package/dist/{flip-icon-copy.entry.8e59bf1d.js → flip-icon-copy.entry.796dcb43.js} +1 -1
  49. package/dist/{flip-icon-date-range.entry.c1dd2730.js → flip-icon-date-range.entry.53c670dc.js} +1 -1
  50. package/dist/{flip-icon-delete.entry.bc0b61ff.js → flip-icon-delete.entry.df480685.js} +1 -1
  51. package/dist/{flip-icon-description.entry.e01b2d40.js → flip-icon-description.entry.da40cecc.js} +1 -1
  52. package/dist/{flip-icon-download.entry.a512f353.js → flip-icon-download.entry.3926477e.js} +1 -1
  53. package/dist/{flip-icon-edit.entry.7e3cd472.js → flip-icon-edit.entry.0f50ba4c.js} +1 -1
  54. package/dist/{flip-icon-emoji-mood.entry.df7b536f.js → flip-icon-emoji-mood.entry.4fa27f13.js} +1 -1
  55. package/dist/{flip-icon-emoji-satisfied.entry.e3e5352b.js → flip-icon-emoji-satisfied.entry.9246c39b.js} +1 -1
  56. package/dist/{flip-icon-error.entry.96c3c29b.js → flip-icon-error_3.entry.4e8dcd9e.js} +30 -6
  57. package/dist/flip-icon-expand-less_3.entry.f191352f.js +35 -0
  58. package/dist/{flip-icon-expand-more.entry.4c1fa160.js → flip-icon-expand-more.entry.5dbcc3e3.js} +1 -1
  59. package/dist/{flip-icon-file.entry.3a18cce8.js → flip-icon-file.entry.64c3e030.js} +1 -1
  60. package/dist/{flip-icon-folder-shared.entry.38b22cd2.js → flip-icon-folder-shared.entry.87cd72cd.js} +1 -1
  61. package/dist/flip-icon-fullscreen-exit.entry.b274fc5c.js +15 -0
  62. package/dist/flip-icon-fullscreen.entry.a0a70cc8.js +15 -0
  63. package/dist/{flip-icon-group-assign.entry.a640254f.js → flip-icon-group-assign.entry.17e70921.js} +1 -1
  64. package/dist/{flip-icon-groups-custom.entry.d77901cd.js → flip-icon-groups-custom.entry.ed78b313.js} +1 -1
  65. package/dist/{flip-icon-groups.entry.80196d79.js → flip-icon-groups.entry.ff8a5e63.js} +1 -1
  66. package/dist/{flip-icon-image.entry.601bf2ae.js → flip-icon-image.entry.b010afb8.js} +1 -1
  67. package/dist/{flip-icon-info.entry.b480a255.js → flip-icon-info.entry.61351d50.js} +1 -1
  68. package/dist/{flip-icon-inventory.entry.bb8a5615.js → flip-icon-inventory.entry.f0ffd90a.js} +1 -1
  69. package/dist/{flip-icon-like.entry.af8b36e2.js → flip-icon-like.entry.6b0034de.js} +1 -1
  70. package/dist/{flip-icon-link.entry.be72688c.js → flip-icon-link.entry.9229312e.js} +1 -1
  71. package/dist/{flip-icon-lock.entry.440459fe.js → flip-icon-lock.entry.03e5fa85.js} +1 -1
  72. package/dist/{flip-icon-logout.entry.dde0bfc8.js → flip-icon-logout.entry.8b073a7d.js} +1 -1
  73. package/dist/{flip-icon-mail.entry.b57a0093.js → flip-icon-mail.entry.91482af2.js} +1 -1
  74. package/dist/{flip-icon-manage-accounts.entry.11cc3149.js → flip-icon-manage-accounts.entry.5de8be6f.js} +1 -1
  75. package/dist/{flip-icon-mention.entry.32771810.js → flip-icon-mention.entry.ef803509.js} +1 -1
  76. package/dist/{flip-icon-message.entry.636088c3.js → flip-icon-message.entry.20ae73fb.js} +1 -1
  77. package/dist/{flip-icon-more-horizontal.entry.38f14508.js → flip-icon-more-horizontal.entry.9a2357f0.js} +1 -1
  78. package/dist/{flip-icon-more-vertikal.entry.8a4c613a.js → flip-icon-more-vertikal.entry.0447fdab.js} +1 -1
  79. package/dist/{flip-icon-notifications-active.entry.5658308d.js → flip-icon-notifications-active.entry.3aa487b9.js} +1 -1
  80. package/dist/{flip-icon-notifications-off.entry.8d3b11ff.js → flip-icon-notifications-off.entry.285c2bb6.js} +1 -1
  81. package/dist/{flip-icon-notifications.entry.91f77dd2.js → flip-icon-notifications.entry.e60fed91.js} +1 -1
  82. package/dist/flip-icon-open-in-new.entry.9de4d7c0.js +15 -0
  83. package/dist/{flip-icon-people-alt.entry.b0b2e20c.js → flip-icon-people-alt.entry.dd840fb1.js} +1 -1
  84. package/dist/{flip-icon-person-off.entry.e79df0e6.js → flip-icon-person-off.entry.df6c63b6.js} +1 -1
  85. package/dist/{flip-icon-person.entry.1bc59e68.js → flip-icon-person.entry.37939889.js} +1 -1
  86. package/dist/{flip-icon-phone.entry.03e81177.js → flip-icon-phone.entry.08245320.js} +1 -1
  87. package/dist/{flip-icon-poll.entry.4e059f77.js → flip-icon-poll.entry.e0ff1d9f.js} +1 -1
  88. package/dist/flip-icon-print.entry.f5fbd804.js +15 -0
  89. package/dist/{flip-icon-recieved.entry.e3410f9e.js → flip-icon-recieved.entry.5b4e2a50.js} +1 -1
  90. package/dist/flip-icon-remove.entry.98d516c6.js +15 -0
  91. package/dist/{flip-icon-search-strong.entry.ec0849a6.js → flip-icon-search-strong.entry.afcf6af9.js} +1 -1
  92. package/dist/{flip-icon-cancel_2.entry.eb8d1a8c.js → flip-icon-search.entry.0f103075.js} +3 -13
  93. package/dist/{flip-icon-send.entry.3f80869c.js → flip-icon-send.entry.fd3001a2.js} +1 -1
  94. package/dist/{flip-icon-settings.entry.c86a7bca.js → flip-icon-settings.entry.2b1e4bb0.js} +1 -1
  95. package/dist/{flip-icon-time-filled.entry.ad86a08f.js → flip-icon-time-filled.entry.7fa814d7.js} +1 -1
  96. package/dist/{flip-icon-time-outlined.entry.75a29f76.js → flip-icon-time-outlined.entry.e3f601ce.js} +1 -1
  97. package/dist/{flip-icon-user-assign.entry.1f331180.js → flip-icon-user-assign.entry.4951e82f.js} +1 -1
  98. package/dist/{flip-icon-video-camera.entry.40ea3d7d.js → flip-icon-video-camera.entry.74f8a7b6.js} +1 -1
  99. package/dist/{flip-icon-warning.entry.1c1540b8.js → flip-icon-warning.entry.76ebfb1e.js} +1 -1
  100. package/dist/{flip-link.entry.fe817ab1.js → flip-link.entry.f67e488c.js} +1 -1
  101. package/dist/flip-list.entry.5cc5b288.js +18 -0
  102. package/dist/flip-modal.entry.4921d0b4.js +61 -0
  103. package/dist/flip-option-list-item.entry.fd1d85dd.js +30 -0
  104. package/dist/flip-option-list-section.entry.5509895e.js +15 -0
  105. package/dist/flip-option-list.entry.efe97de9.js +95 -0
  106. package/dist/flip-pagination.entry.b109c35d.js +27 -0
  107. package/dist/flip-progress-indicator.entry.b7cf2985.js +18 -0
  108. package/dist/flip-radio-group.entry.dfc6ef8e.js +35 -0
  109. package/dist/{flip-radio.entry.817d976d.js → flip-radio.entry.f153fc92.js} +6 -5
  110. package/dist/flip-resource-list-file-item.entry.26beeeee.js +20 -0
  111. package/dist/flip-resource-list-item.entry.7cac7a7c.js +41 -0
  112. package/dist/flip-resource-list.entry.75d10224.js +49 -0
  113. package/dist/{flip-search.entry.6717d77a.js → flip-search.entry.eccdd9b5.js} +3 -2
  114. package/dist/{flip-stack.entry.50d88d6f.js → flip-stack.entry.2448bd6b.js} +3 -2
  115. package/dist/{flip-switch.entry.ef96875e.js → flip-switch.entry.71d04383.js} +3 -2
  116. package/dist/flip-tab.entry.184626dd.js +18 -0
  117. package/dist/flip-tabs.entry.9434fd96.js +92 -0
  118. package/dist/{flip-tag.entry.31a7d0f7.js → flip-tag.entry.5df8a6b4.js} +3 -2
  119. package/dist/flip-text-input.entry.55decf50.js +55 -0
  120. package/dist/flip-text.entry.2b6e3f56.js +18 -0
  121. package/dist/{flip-theme-provider.entry.9c054d33.js → flip-theme-provider.entry.1570cb6b.js} +1 -1
  122. package/dist/{flip-thumbnail.entry.449e93ef.js → flip-thumbnail.entry.54ea67cf.js} +3 -2
  123. package/dist/{flip-toast-provider.entry.59025e1a.js → flip-toast-provider.entry.0ee21f8b.js} +1 -1
  124. package/dist/{flip-toast.entry.78522d59.js → flip-toast.entry.29ea2ead.js} +3 -2
  125. package/dist/flip-tooltip.entry.e6a904e4.js +94 -0
  126. package/dist/flip-video-thumbnail.entry.f3cf1c28.js +83 -0
  127. package/dist/{flip-visually-hidden.entry.ae0ff292.js → flip-visually-hidden.entry.47d25a46.js} +1 -1
  128. package/dist/floating-ui.dom.esm-1a4e8b8a.87557233.js +752 -0
  129. package/dist/index-6d2e18c6.289636d4.js +37 -0
  130. package/dist/index.b6e7bb76.js +1359 -0
  131. package/dist/index.d.ts +1 -0
  132. package/dist/stencil-generated/index.d.ts +136 -0
  133. package/dist/stencil-generated/react-component-lib/createComponent.d.ts +10 -0
  134. package/dist/stencil-generated/react-component-lib/createOverlayComponent.d.ts +21 -0
  135. package/dist/stencil-generated/react-component-lib/index.d.ts +2 -0
  136. package/dist/stencil-generated/react-component-lib/interfaces.d.ts +29 -0
  137. package/dist/stencil-generated/react-component-lib/utils/attachProps.d.ts +12 -0
  138. package/dist/stencil-generated/react-component-lib/utils/case.d.ts +2 -0
  139. package/dist/stencil-generated/react-component-lib/utils/index.d.ts +10 -0
  140. package/dist/swirl-components-react.js +133 -96
  141. package/dist/swirl-components-react.umd.cjs +137 -17
  142. package/dist/utils-b46bcd4f.79126bb2.js +30 -0
  143. package/dist/vite-env.d.ts +1 -0
  144. package/package.json +5 -3
  145. package/dist/flip-avatar-group.entry.71bf1f2a.js +0 -19
  146. package/dist/flip-badge.entry.ebda6058.js +0 -19
  147. package/dist/flip-button_2.entry.a323451d.js +0 -42
  148. package/dist/flip-dialog.entry.f2be9a9c.js +0 -139
  149. package/dist/flip-icon-expand-less.entry.3e970433.js +0 -15
  150. package/dist/flip-icon-today.entry.ab272990.js +0 -15
  151. package/dist/flip-icon-visibility-off.entry.ed4db3b5.js +0 -15
  152. package/dist/flip-icon-visibility.entry.1a7dfd44.js +0 -15
  153. package/dist/flip-inline-error.entry.38c26d13.js +0 -17
  154. package/dist/flip-popover.entry.18c5ead6.js +0 -878
  155. package/dist/flip-radio-group.entry.187f29ee.js +0 -35
  156. package/dist/flip-spinner.entry.f8f179be.js +0 -17
  157. package/dist/flip-tooltip.entry.8b5f35c7.js +0 -102
  158. package/dist/index-3c78bcaf.2675909b.js +0 -48
  159. package/dist/main.7e7363a7.js +0 -1322
  160. package/dist/utils-03e3261c.f5223801.js +0 -16
@@ -0,0 +1,95 @@
1
+ import { r as o, c, h as l, H as h, g as n } from "./index.b6e7bb76.js";
2
+ import { q as u } from "./utils-b46bcd4f.79126bb2.js";
3
+ import "react";
4
+ import "react-dom";
5
+ const d = ":host{display:block}:host *{box-sizing:border-box}", r = class {
6
+ constructor(t) {
7
+ o(this, t), this.valueChange = c(this, "valueChange", 7), this.value = [], this.onFocus = () => {
8
+ this.focusItem(0);
9
+ }, this.onClick = (e) => {
10
+ const s = e.target, i = s == null ? void 0 : s.closest("flip-option-list-item");
11
+ !Boolean(i) || this.selectItem(this.items.findIndex((a) => a.value === i.value));
12
+ }, this.onKeyDown = (e) => {
13
+ e.code === "ArrowDown" ? (e.preventDefault(), this.focusNextItem()) : e.code === "ArrowUp" ? (e.preventDefault(), this.focusPreviousItem()) : e.code === "Space" ? (e.preventDefault(), this.selectFocusedItem()) : e.code === "Home" ? (e.preventDefault(), this.focusItem(0)) : e.code === "End" ? (e.preventDefault(), this.focusItem(this.items.length - 1)) : e.code === "KeyA" && (e.metaKey || e.ctrlKey) && this.multiSelect && (e.preventDefault(), this.selectAllItems());
14
+ };
15
+ }
16
+ componentDidLoad() {
17
+ this.items = u(this.el, "flip-option-list-item"), this.setItemDisabledState(), this.setItemContext(), this.syncItemsWithValue();
18
+ }
19
+ watchDisabled() {
20
+ this.setItemDisabledState();
21
+ }
22
+ watchMultiSelect() {
23
+ this.setItemContext();
24
+ }
25
+ watchValue() {
26
+ this.syncItemsWithValue();
27
+ }
28
+ setItemDisabledState() {
29
+ this.items.forEach((t) => t.disabled = this.disabled);
30
+ }
31
+ setItemContext() {
32
+ 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]]));
33
+ }
34
+ selectItem(t) {
35
+ if (this.disabled)
36
+ return;
37
+ const e = this.items[t], s = this.value.includes(e.value);
38
+ this.multiSelect || (this.value = []), s ? this.updateValue(this.value.filter((i) => i !== e.value)) : this.updateValue([...this.value, e.value]);
39
+ }
40
+ updateValue(t) {
41
+ this.value = t, this.valueChange.emit(this.value);
42
+ }
43
+ selectFocusedItem() {
44
+ this.disabled || this.getActiveItemIndex() === -1 || this.selectItem(this.getActiveItemIndex());
45
+ }
46
+ selectAllItems() {
47
+ if (this.disabled)
48
+ return;
49
+ this.items.every((e) => this.value.includes(e.value)) ? this.updateValue([]) : this.updateValue(this.items.map((e) => e.value));
50
+ }
51
+ syncItemsWithValue() {
52
+ this.items.forEach((t) => t.selected = this.value.includes(t.value));
53
+ }
54
+ focusItem(t) {
55
+ if (this.disabled)
56
+ return;
57
+ this.items.forEach((s) => s.shadowRoot.children[0].removeAttribute("tabIndex"));
58
+ const e = this.items[t].shadowRoot.children[0];
59
+ !Boolean(e) || (e.setAttribute("tabIndex", "0"), e.focus());
60
+ }
61
+ focusNextItem() {
62
+ if (this.disabled)
63
+ return;
64
+ const t = this.getActiveItemIndex(), e = Math.min(t + 1, this.items.length - 1);
65
+ this.focusItem(e);
66
+ }
67
+ focusPreviousItem() {
68
+ const t = this.getActiveItemIndex(), e = Math.max(t - 1, 0);
69
+ this.focusItem(e);
70
+ }
71
+ getActiveItemIndex() {
72
+ return this.items.map((t) => t.shadowRoot.children[0]).findIndex((t) => {
73
+ var e, s;
74
+ return t === document.activeElement || t === ((s = (e = document.activeElement) === null || e === void 0 ? void 0 : e.shadowRoot) === null || s === void 0 ? void 0 : s.querySelector('[role="option"]'));
75
+ });
76
+ }
77
+ render() {
78
+ const t = this.multiSelect ? "true" : void 0, e = this.disabled ? -1 : 0;
79
+ return l(h, null, l("div", { "aria-label": this.label, "aria-multiselectable": t, class: "option-list", onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, role: "listbox", tabIndex: e }, l("slot", null)));
80
+ }
81
+ get el() {
82
+ return n(this);
83
+ }
84
+ static get watchers() {
85
+ return {
86
+ disabled: ["watchDisabled"],
87
+ multiSelect: ["watchMultiSelect"],
88
+ value: ["watchValue"]
89
+ };
90
+ }
91
+ };
92
+ r.style = d;
93
+ export {
94
+ r as flip_option_list
95
+ };
@@ -0,0 +1,27 @@
1
+ import { r as p, c as r, h as a, H as c } from "./index.b6e7bb76.js";
2
+ import { c as g } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const h = ":host{display:block;width:100%}:host *{box-sizing:border-box}.pagination{display:block;width:100%}.pagination--variant-simple .pagination__list{gap:var(--s-space-4)}.pagination__list{display:flex;margin:0;padding:0;justify-content:flex-start;align-items:center;line-height:var(--s-line-height-base);list-style:none;gap:var(--s-space-8)}@media (--from-tablet){.pagination__list{gap:var(--s-space-16)}}.pagination__advanced-label{display:flex;align-items:center;gap:var(--s-space-8);white-space:nowrap}.pagination__page-select-container{position:relative}.pagination__page-select{display:inline-flex;padding-right:var(--s-space-16);border:none;background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-select:focus{outline-color:var(--s-focus-default)}.pagination__page-select-icon{position:absolute;top:50%;right:0;transform:translateY(-50%);pointer-events:none}", b = class {
7
+ constructor(t) {
8
+ p(this, t), this.setPage = r(this, "setPage", 7), this.accessibleNextButtonLabel = "Next page", this.accessiblePrevButtonLabel = "Previous page", this.nextButtonLabel = "Next", this.pageLabel = "out of", this.prevButtonLabel = "Prev", this.pageSelectLabel = "Select a page", this.variant = "default", this.onPrevButtonClick = () => {
9
+ const e = Math.max(this.page - 1, 1);
10
+ this.page !== e && this.setPage.emit(e);
11
+ }, this.onNextButtonClick = () => {
12
+ const e = Math.min(this.page + 1, this.pages);
13
+ this.page !== e && this.setPage.emit(e);
14
+ }, this.onSelect = (e) => {
15
+ const i = +e.target.value;
16
+ this.page !== i && this.setPage.emit(i);
17
+ };
18
+ }
19
+ render() {
20
+ const t = this.variant !== "advanced", e = this.variant !== "simple", i = this.variant === "advanced", s = `${this.page} ${this.pageLabel} ${this.pages}`, l = g("pagination", `pagination--variant-${this.variant}`);
21
+ return a(c, null, a("nav", { "aria-label": this.label, class: l }, a("ul", { class: "pagination__list" }, a("li", { class: "pagination__list-item" }, a("flip-button", { class: "pagination__prev-button", disabled: this.page <= 1, flipAriaLabel: this.accessiblePrevButtonLabel, hideLabel: t, icon: "<flip-icon-chevron-left></flip-icon-chevron-left>", intent: "primary", label: this.prevButtonLabel, onClick: this.onPrevButtonClick })), e ? a("li", { class: "pagination__list-item" }, a("span", null, i ? a("span", { "aria-current": "page", class: "pagination__advanced-label" }, a("span", { class: "pagination__page-select-container" }, a("select", { "aria-label": this.pageSelectLabel, class: "pagination__page-select", onChange: this.onSelect }, new Array(this.pages).fill(void 0).map((n, o) => o + 1).map((n) => a("option", { selected: this.page === n, value: String(n) }, n))), a("flip-icon-expand-more", { "aria-hidden": "true", class: "pagination__page-select-icon", size: 16 })), a("span", { "aria-hidden": "true" }, this.pageLabel, " ", this.pages)) : a("span", { "aria-current": "page" }, s))) : a("li", { class: "pagination__list-item" }, a("flip-visually-hidden", null, a("span", { "aria-current": "page" }, s))), a("li", { class: "pagination__list-item" }, a("flip-button", { class: "pagination__next-button", disabled: this.page >= this.pages, flipAriaLabel: this.accessibleNextButtonLabel, hideLabel: t, icon: "<flip-icon-chevron-right></flip-icon-chevron-right>", iconPosition: "end", intent: "primary", label: this.nextButtonLabel, onClick: this.onNextButtonClick })))));
22
+ }
23
+ };
24
+ b.style = h;
25
+ export {
26
+ b as flip_pagination
27
+ };
@@ -0,0 +1,18 @@
1
+ import { r as t, h as s, H as n } from "./index.b6e7bb76.js";
2
+ import { c } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const d = ":host{display:block;width:100%}:host *{box-sizing:border-box}:host(.circle){display:inline-flex;width:auto}.progress-indicator--variant-bar{display:block;width:100%;height:0.25rem;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.progress-indicator--variant-bar::-webkit-progress-bar{border-radius:0.125rem;background-color:var(--s-surface-raised-default)}.progress-indicator--variant-bar::-webkit-progress-value{border-radius:0.125rem;background-color:var(--s-surface-highlight-default);-webkit-transition:width 0.25s;transition:width 0.25s}.progress-indicator--variant-bar::-moz-progress-bar{height:0.25rem;border-radius:0.125rem;background-color:var(--s-surface-highlight-default);-moz-transition:width 0.25s;transition:width 0.25s}@media (prefers-reduced-motion){.progress-indicator--variant-bar::-moz-progress-bar{-moz-transition:none;transition:none}}.progress-indicator--variant-bar.progress-indicator--size-s{height:0.125rem}.progress-indicator--variant-bar.progress-indicator--size-s::-webkit-progress-bar{border-radius:0.0625rem}.progress-indicator--variant-bar.progress-indicator--size-s::-webkit-progress-value{border-radius:0.0625rem}.progress-indicator--variant-bar.progress-indicator--size-s::-moz-progress-bar{height:0.125rem;border-radius:0.0625rem}.progress-indicator--variant-circle{position:relative;display:inline-flex;overflow:hidden;width:3rem;height:3rem}.progress-indicator--variant-circle.progress-indicator--size-s{width:1.5rem;height:1.5rem}.progress-indicator__circle{position:absolute;width:100%;height:100%;transform:rotate(-90deg);inset:0}.progress-indicator__circle-background{stroke:var(--s-border-default);stroke-linecap:round}.progress-indicator__circle-value{transition:stroke-dashoffset 0.25s;stroke:var(--s-interactive-primary-default);stroke-linecap:round}@media (prefers-reduced-motion){.progress-indicator__circle-value{transition:none}}", l = class {
7
+ constructor(a) {
8
+ t(this, a), this.size = "m", this.value = 0, this.variant = "bar";
9
+ }
10
+ render() {
11
+ const a = c("progress-indicator", `progress-indicator--size-${this.size}`, `progress-indicator--variant-${this.variant}`), i = this.size === "m" ? 4 : 2, r = this.size === "m" ? 20 : 10, e = Math.round(r * 2 * Math.PI), o = Math.round(e * ((100 - this.value) / 100));
12
+ return s(n, { class: this.variant }, this.variant === "bar" && s("progress", { "aria-label": this.label, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": this.value, class: a, max: 100, value: this.value }), this.variant === "circle" && s("span", { role: "progressbar", "aria-label": this.label, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": this.value, class: a }, s("svg", { class: "progress-indicator__circle", focusable: "false", viewBox: `0 0 ${(r + i) * 2} ${(r + i) * 2}` }, s("circle", { class: "progress-indicator__circle-background", cx: r + i, cy: r + i, r, fill: "none", "stroke-width": i }), s("circle", { class: "progress-indicator__circle-value", cx: r + i, cy: r + i, r, fill: "none", "stroke-width": i, "stroke-dasharray": e, "stroke-dashoffset": o }))));
13
+ }
14
+ };
15
+ l.style = d;
16
+ export {
17
+ l as flip_progress_indicator
18
+ };
@@ -0,0 +1,35 @@
1
+ import { r as o, c as s, h as r, H as l, g as n } from "./index.b6e7bb76.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const u = ".sc-flip-radio-group-h{display:block}.sc-flip-radio-group-h *.sc-flip-radio-group{box-sizing:border-box}.radio-group.sc-flip-radio-group{display:flex;flex-direction:column;gap:var(--s-space-4)}", d = class {
5
+ constructor(i) {
6
+ o(this, i), this.valueChange = s(this, "valueChange", 7);
7
+ }
8
+ componentDidLoad() {
9
+ this.radioButtons = Array.from(this.el.querySelectorAll("flip-radio")), this.initValue(), this.handleValueChanges();
10
+ }
11
+ initValue() {
12
+ if (this.value === void 0)
13
+ return;
14
+ const i = this.radioButtons.find((e) => e.value === this.value);
15
+ !Boolean(i) || (i.checked = !0);
16
+ }
17
+ handleValueChanges() {
18
+ for (const [i, e] of Object.entries(this.radioButtons))
19
+ e.addEventListener("valueChange", () => {
20
+ (e.checked === !0 || e.checked === "true") && (this.valueChange.emit(e.value), this.value = e.value, this.radioButtons.forEach((t, a) => {
21
+ String(a) !== i && (t.checked = !1);
22
+ }));
23
+ });
24
+ }
25
+ render() {
26
+ return r(l, { "aria-describedby": this.flipAriaDescribedby, role: "radiogroup" }, r("div", { class: "radio-group" }, r("slot", null)));
27
+ }
28
+ get el() {
29
+ return n(this);
30
+ }
31
+ };
32
+ d.style = u;
33
+ export {
34
+ d as flip_radio_group
35
+ };
@@ -1,9 +1,10 @@
1
- import { r as s, c as l, h as i, H as c } from "./main.7e7363a7.js";
2
- import { c as t } from "./index-3c78bcaf.2675909b.js";
1
+ import { r as s, c as l, h as i, H as c } from "./index.b6e7bb76.js";
2
+ import { c as t } from "./index-6d2e18c6.289636d4.js";
3
3
  import "react";
4
4
  import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
5
6
  const n = `.sc-flip-radio-h{display:inline-flex}.sc-flip-radio-h *.sc-flip-radio{box-sizing:border-box}.radio.sc-flip-radio{display:inline-flex;cursor:pointer;line-height:var(--s-line-height-base)}.radio.sc-flip-radio:focus-within .radio__box.sc-flip-radio{box-shadow:0 0 0 0.0625rem var(--s-background-default),
6
- 0 0 0 0.1875rem var(--s-focus-default)}.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-interactive-primary-hovered);background-color:var(--s-interactive-primary-hovered)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{position:relative;border-color:var(--s-icon-highlight);background-color:var(--s-icon-highlight)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{position:absolute;top:50%;left:50%;width:0.5rem;height:0.5rem;border-radius:50%;background-color:var(--s-background-default);content:"";transform:translate3d(-50%, -50%, 0)}.radio--invalid.radio--checked.sc-flip-radio .radio__box.sc-flip-radio,.radio--invalid.radio--indeterminate.sc-flip-radio .radio__box.sc-flip-radio{background-color:var(--s-icon-critical)}.radio--invalid.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-critical)}.radio--disabled.sc-flip-radio{cursor:default}.radio--disabled.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:transparent}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:var(--s-background-default)}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{background-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:transparent}.radio--disabled.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);backround-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__description.sc-flip-radio,.radio--disabled.sc-flip-radio .radio__label.sc-flip-radio{color:var(--s-text-disabled)}.radio__control.sc-flip-radio{position:relative;display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}.radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:var(--s-action-neutral-hovered)}.radio__box.sc-flip-radio{position:relative;display:flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:50%}.radio__label-container.sc-flip-radio{display:inline-flex;margin-left:var(--s-space-12);padding-top:var(--s-space-2);flex-direction:column}.radio__label.sc-flip-radio{font-weight:var(--s-font-weight-medium)}.radio__description.sc-flip-radio{color:var(--s-text-subdued)}`, h = class {
7
+ 0 0 0 0.1875rem var(--s-focus-default)}.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-interactive-primary-hovered);background-color:var(--s-interactive-primary-hovered)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{position:relative;border-color:var(--s-icon-highlight);background-color:var(--s-icon-highlight)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{position:absolute;top:50%;left:50%;width:0.5rem;height:0.5rem;border-radius:50%;background-color:var(--s-background-default);content:"";transform:translate3d(-50%, -50%, 0)}.radio--invalid.radio--checked.sc-flip-radio .radio__box.sc-flip-radio,.radio--invalid.radio--indeterminate.sc-flip-radio .radio__box.sc-flip-radio{background-color:var(--s-icon-critical)}.radio--invalid.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-critical)}.radio--disabled.sc-flip-radio{cursor:default}.radio--disabled.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:transparent}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:var(--s-background-default)}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{background-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:transparent}.radio--disabled.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);backround-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__description.sc-flip-radio,.radio--disabled.sc-flip-radio .radio__label.sc-flip-radio{color:var(--s-text-disabled)}.radio__control.sc-flip-radio{position:relative;display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}.radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:var(--s-action-neutral-hovered)}.radio__box.sc-flip-radio{position:relative;display:flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:50%}.radio__label-container.sc-flip-radio{display:inline-flex;margin-left:var(--s-space-12);padding-top:var(--s-space-2);flex-direction:column}.radio__label.sc-flip-radio{font-weight:var(--s-font-weight-medium)}.radio__description.sc-flip-radio{color:var(--s-text-subdued)}`, p = class {
7
8
  constructor(a) {
8
9
  s(this, a), this.valueChange = l(this, "valueChange", 7), this.checked = !1, this.disabled = !1, this.onChange = () => {
9
10
  this.checked = !0, this.valueChange.emit(this.value);
@@ -19,7 +20,7 @@ const n = `.sc-flip-radio-h{display:inline-flex}.sc-flip-radio-h *.sc-flip-radio
19
20
  return i(c, null, i("label", { class: e, htmlFor: this.inputId }, i("span", { class: "radio__control" }, i("flip-visually-hidden", null, i("input", { "aria-checked": o, "aria-invalid": d, checked: r, class: "radio__input", disabled: this.disabled, id: this.inputId, name: this.inputName, onChange: this.onChange, type: "radio", value: this.value })), i("span", { "aria-hidden": "true", class: "radio__box" })), i("span", { class: "radio__label-container" }, this.label && i("span", { class: "radio__label" }, this.label), this.description && i("span", { class: "radio__description" }, this.description))));
20
21
  }
21
22
  };
22
- h.style = n;
23
+ p.style = n;
23
24
  export {
24
- h as flip_radio
25
+ p as flip_radio
25
26
  };
@@ -0,0 +1,20 @@
1
+ import { r as l, c as a, h as e, H as n } from "./index.b6e7bb76.js";
2
+ import { c } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const p = ':host{display:block;width:100%}:host *{box-sizing:border-box}.resource-list-file-item{position:relative;display:flex;width:100%;padding:var(--s-space-12) var(--s-space-16);align-items:center;background-color:var(--s-background-default);line-height:var(--s-line-height-base);gap:var(--s-space-12)}.resource-list-file-item:focus{background-color:var(--s-background-hovered);outline:none}.resource-list-file-item--has-control .resource-list-file-item__label-container{padding-right:calc(var(--s-space-12) + 2.5rem)}.resource-list-file-item__icon{color:var(--s-icon-highlight)}.resource-list-file-item__label-container{position:relative;display:flex;min-width:0;min-height:2.875rem;flex-grow:1;justify-content:center;flex-direction:column}.resource-list-file-item__label-container:after{position:absolute;right:0;bottom:calc(-1 * var(--s-space-12));left:0;height:0.0625rem;background-color:var(--s-border-default);content:""}.resource-list-file-item__label{overflow:hidden;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.resource-list-file-item__description{overflow:hidden;margin-top:var(--s-space-2);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-file-item__error-message{margin-top:var(--s-space-2)}.resource-list-file-item__remove-button{position:absolute;top:50%;right:var(--s-space-16);display:inline-flex;transform:translateY(-50%)}.resource-list-file-item__spinner{position:absolute;top:50%;right:var(--s-space-24);display:inline-flex;transform:translateY(-50%)}', m = class {
7
+ constructor(i) {
8
+ l(this, i), this.remove = a(this, "remove", 7), this.icon = "<flip-icon-file></flip-icon-file>", this.removeButtonLabel = "Remove file";
9
+ }
10
+ render() {
11
+ const i = Boolean(this.errorMessage), r = !i && Boolean(this.description), s = !i && this.loading, t = this.removable && !s, o = c("resource-list-file-item", {
12
+ "resource-list-file-item--has-control": s || t
13
+ });
14
+ return e(n, { role: "row" }, e("div", { class: o, role: "gridcell" }, e("span", { class: "resource-list-file-item__icon", innerHTML: this.icon }), e("span", { class: "resource-list-file-item__label-container" }, e("span", { class: "resource-list-file-item__label", id: "label" }, this.label), r && e("span", { class: "resource-list-file-item__description" }, this.description), i && e("span", { "aria-live": "polite", class: "resource-list-file-item__error-message" }, e("flip-inline-error", { message: this.errorMessage, size: "s" }))), s && e("span", { class: "resource-list-file-item__spinner" }, e("flip-spinner", { size: "s" })), t && e("span", { class: "resource-list-file-item__remove-button" }, e("flip-button", { hideLabel: !0, icon: "<flip-icon-close></flip-icon-close>", label: this.removeButtonLabel, onClick: this.remove.emit }))));
15
+ }
16
+ };
17
+ m.style = p;
18
+ export {
19
+ m as flip_resource_list_file_item
20
+ };
@@ -0,0 +1,41 @@
1
+ import { r as n, c as d, h as t, H as u, g as h } from "./index.b6e7bb76.js";
2
+ import { c as m } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const b = ':host{display:block;width:100%}:host *{box-sizing:border-box}.resource-list-item{position:relative;width:100%}.resource-list-item--checked .resource-list-item__checkbox{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.resource-list-item--has-menu .resource-list-item__label-container{padding-right:calc(var(--s-space-16) + 2.5rem + var(--s-space-12))}@media (--from-tablet){.resource-list-item--selectable .resource-list-item__content{padding-left:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}}.resource-list-item--selectable .resource-list-item__label-container{padding-right:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}@media (--from-tablet){.resource-list-item--selectable .resource-list-item__label-container{padding-right:var(--s-space-16)}}.resource-list-item--hide-divider .resource-list-item__label-container:after{display:none}.resource-list-item__content{--flip-avatar-group-border-color:var(--s-background-default);--flip-badge-border-color:var(--s-background-default);display:flex;width:100%;padding-top:var(--s-space-12);padding-right:0;padding-bottom:var(--s-space-12);padding-left:var(--s-space-16);align-items:center;border:none;color:var(--s-text-default);background-color:var(--s-background-default);font:inherit;line-height:var(--s-line-height-base);text-align:left;text-decoration:none;cursor:pointer;gap:var(--s-space-12)}.resource-list-item__content:hover:not(:disabled){background-color:var(--s-background-hovered)}.resource-list-item__content:hover:not(:disabled) .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-hovered);--flip-badge-border-color:var(--s-background-hovered)}.resource-list-item__content:active:not(:disabled){background-color:var(--s-background-pressed)}.resource-list-item__content:active:not(:disabled) .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-pressed);--flip-badge-border-color:var(--s-background-pressed)}.resource-list-item__content:focus{background-color:var(--s-background-hovered);outline:none}.resource-list-item__content:focus .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-hovered);--flip-badge-border-color:var(--s-background-hovered)}.resource-list-item__content:disabled{color:var(--s-text-disabled);background-color:var(--s-background-default);cursor:default}.resource-list-item__content:disabled .resource-list-item__description{color:var(--s-text-disabled)}.resource-list-item__media{display:inline-flex}.resource-list-item__label-container{position:relative;display:flex;min-width:0;min-height:2.875rem;padding-right:var(--s-space-16);flex-grow:1;justify-content:center;flex-direction:column}.resource-list-item__label-container:after{position:absolute;right:0;bottom:calc(-1 * var(--s-space-12));left:0;height:0.0625rem;background-color:var(--s-border-default);content:""}.resource-list-item__label{overflow:hidden;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.resource-list-item__description{overflow:hidden;margin-top:var(--s-space-2);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{position:absolute;top:50%;right:var(--s-space-16);transform:translateY(-50%)}.resource-list-item__checkbox{position:absolute;top:50%;right:var(--s-space-16);display:flex;width:1.25rem;height:1.25rem;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s);transform:translateY(-50%)}@media (--from-tablet){.resource-list-item__checkbox{right:auto;left:var(--s-space-16)}}.resource-list-item__checkbox-icon{display:inline-flex;width:1.0625rem;height:1.0625rem}.resource-list-item__checkbox-icon>*::part(icon){width:1.0625rem;height:1.0625rem}.resource-list-item__meta{position:absolute;top:calc(var(--s-space-12) + var(--s-space-4));right:var(--s-space-16);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}', p = class {
7
+ constructor(e) {
8
+ n(this, e), this.valueChange = d(this, "valueChange", 7), this.checked = !1, this.menuTriggerLabel = "Options", this.onClick = () => {
9
+ !this.selectable || (this.checked = !this.checked, this.valueChange.emit(this.checked));
10
+ }, this.onMenuTriggerClick = (r) => {
11
+ this.disabled && !Boolean(this.href) && r.stopPropagation();
12
+ };
13
+ }
14
+ componentDidLoad() {
15
+ this.forceAvatarProps(), this.forceThumbnailProps();
16
+ }
17
+ forceAvatarProps() {
18
+ const e = this.el.querySelector("flip-avatar");
19
+ !Boolean(e) || (e.removeAttribute("interactive"), e.removeAttribute("show-label"), e.removeAttribute("variant"), e.setAttribute("size", "l"));
20
+ }
21
+ forceThumbnailProps() {
22
+ const e = this.el.querySelector("flip-thumbnail");
23
+ !Boolean(e) || (e.setAttribute("format", "landscape"), ["s", "m"].includes(e.getAttribute("size")) || e.setAttribute("size", "m"));
24
+ }
25
+ render() {
26
+ const e = Boolean(this.href) && !this.selectable ? "a" : "button", r = this.disabled && !Boolean(this.href), i = Boolean(this.menuTriggerId), s = i && !Boolean(this.meta) && !this.selectable, o = Boolean(this.meta) && !this.selectable, a = this.selectable ? String(this.checked) : void 0, l = this.selectable ? "checkbox" : void 0, c = m("resource-list-item", {
27
+ "resource-list-item--checked": this.checked,
28
+ "resource-list-item--has-menu": i,
29
+ "resource-list-item--hide-divider": this.hideDivider,
30
+ "resource-list-item--selectable": this.selectable
31
+ });
32
+ return t(u, { role: "row" }, t("div", { class: c, role: "gridcell" }, t(e, { "aria-checked": a, "aria-disabled": r ? "true" : void 0, "aria-labelledby": "label", class: "resource-list-item__content", href: this.href, disabled: r, onClick: this.onClick, role: l, tabIndex: 0 }, Boolean(this.media) && t("span", { class: "resource-list-item__media", innerHTML: this.media }), t("span", { class: "resource-list-item__label-container" }, t("span", { class: "resource-list-item__label", id: "label" }, this.label), this.description && t("span", { class: "resource-list-item__description" }, this.description))), this.selectable && t("span", { "aria-hidden": "true", class: "resource-list-item__checkbox" }, t("span", { class: "resource-list-item__checkbox-icon" }, this.checked && t("flip-icon-check-strong", null))), o && t("span", { class: "resource-list-item__meta" }, this.meta), s && t("flip-button", { "aria-disabled": r ? "true" : void 0, class: "resource-list-item__menu-trigger", disabled: r, hideLabel: !0, icon: "<flip-icon-more-horizontal></flip-icon-more-horizontal>", id: this.menuTriggerId, intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })));
33
+ }
34
+ get el() {
35
+ return h(this);
36
+ }
37
+ };
38
+ p.style = b;
39
+ export {
40
+ p as flip_resource_list_item
41
+ };
@@ -0,0 +1,49 @@
1
+ import { r as i, h as o, H as r, g as l } from "./index.b6e7bb76.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const n = ":host{display:block;width:100%}:host *{box-sizing:border-box}", c = class {
5
+ constructor(s) {
6
+ i(this, s), this.focusedIndex = 0, this.onFocus = () => {
7
+ this.focusItemAtIndex(this.focusedIndex);
8
+ }, this.onKeyDown = (e) => {
9
+ if (e.key === "ArrowDown")
10
+ e.preventDefault(), this.focusItemAtIndex((this.focusedIndex + 1) % this.items.length);
11
+ else if (e.key === "ArrowUp") {
12
+ e.preventDefault();
13
+ const t = this.focusedIndex === 0 ? this.items.length - 1 : this.focusedIndex - 1;
14
+ this.focusItemAtIndex(t);
15
+ } else
16
+ e.key === "Home" ? (e.preventDefault(), this.focusItemAtIndex(0)) : e.key === "End" && (e.preventDefault(), this.focusItemAtIndex(this.items.length - 1));
17
+ };
18
+ }
19
+ componentDidLoad() {
20
+ this.collectItems(), this.removeItemsFromTabOrder();
21
+ }
22
+ collectItems() {
23
+ this.items = Array.from(this.el.querySelectorAll("flip-resource-list-item, flip-resource-list-file-item"));
24
+ }
25
+ removeItemsFromTabOrder() {
26
+ this.items.forEach((s) => {
27
+ var e, t;
28
+ return (t = (e = s.shadowRoot) === null || e === void 0 ? void 0 : e.querySelector(".resource-list-item__content, .resource-list-file-item")) === null || t === void 0 ? void 0 : t.setAttribute("tabIndex", "-1");
29
+ });
30
+ }
31
+ focusItemAtIndex(s) {
32
+ this.removeItemsFromTabOrder();
33
+ const e = this.items[s];
34
+ if (!Boolean(e))
35
+ return;
36
+ const t = e.shadowRoot.querySelector(".resource-list-item__content, .resource-list-file-item");
37
+ t.setAttribute("tabIndex", "0"), t.focus(), this.focusedIndex = s;
38
+ }
39
+ render() {
40
+ return o(r, { onKeyDown: this.onKeyDown }, o("flip-stack", { "aria-label": this.label, onFocus: this.onFocus, role: "grid", tabIndex: 0 }, o("slot", null)));
41
+ }
42
+ get el() {
43
+ return l(this);
44
+ }
45
+ };
46
+ c.style = n;
47
+ export {
48
+ c as flip_resource_list
49
+ };
@@ -1,7 +1,8 @@
1
- import { r as c, c as r, h as a, H as i } from "./main.7e7363a7.js";
2
- import { c as t } from "./index-3c78bcaf.2675909b.js";
1
+ import { r as c, c as r, h as a, H as i } from "./index.b6e7bb76.js";
2
+ import { c as t } from "./index-6d2e18c6.289636d4.js";
3
3
  import "react";
4
4
  import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
5
6
  const l = ".sc-flip-search-h{display:flex;width:100%}.sc-flip-search-h *.sc-flip-search{box-sizing:border-box}.search.sc-flip-search{position:relative;display:flex;width:100%}.search--disabled.sc-flip-search .search__icon.sc-flip-search{color:var(--s-icon-disabled)}.search--disabled.sc-flip-search .search__input.sc-flip-search{color:var(--s-text-disabled)}.search--disabled.sc-flip-search .search__input.sc-flip-search::-moz-placeholder{color:var(--s-text-disabled)}.search--disabled.sc-flip-search .search__input.sc-flip-search::placeholder{color:var(--s-text-disabled)}.search__icon.sc-flip-search{position:absolute;top:50%;left:var(--s-space-12);display:inline-flex;color:var(--s-icon-default);transform:translateY(-50%)}.search__input.sc-flip-search{width:100%;height:2.5rem;padding-top:var(--s-space-8);padding-right:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));padding-bottom:var(--s-space-8);padding-left:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));border:none;border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--s-surface-raised-default);font:inherit;line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.search__input.sc-flip-search:focus{outline-color:var(--s-focus-default)}.search__input.sc-flip-search::-moz-placeholder{color:var(--s-text-subdued)}.search__input.sc-flip-search::placeholder{color:var(--s-text-subdued)}.search__input.sc-flip-search::-webkit-search-decoration,.search__input.sc-flip-search::-webkit-search-cancel-button,.search__input.sc-flip-search::-webkit-search-results-button,.search__input.sc-flip-search::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.search__input.sc-flip-search:not(:-moz-placeholder-shown)+.search__clear-button.sc-flip-search{display:inline-flex}.search__input.sc-flip-search:not(:placeholder-shown)+.search__clear-button.sc-flip-search{display:inline-flex}.search__clear-button.sc-flip-search{position:absolute;top:50%;right:var(--s-space-12);display:none;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer;transform:translateY(-50%)}", o = class {
6
7
  constructor(s) {
7
8
  c(this, s), this.inputBlur = r(this, "inputBlur", 7), this.inputFocus = r(this, "inputFocus", 7), this.valueChange = r(this, "valueChange", 7), this.clearButtonLabel = "Clear search term", this.placeholder = "Search \u2026", this.clear = () => {
@@ -1,7 +1,8 @@
1
- import { r as i, h as s, H as e } from "./main.7e7363a7.js";
2
- import { c as n } from "./index-3c78bcaf.2675909b.js";
1
+ import { r as i, h as s, H as e } from "./index.b6e7bb76.js";
2
+ import { c as n } from "./index-6d2e18c6.289636d4.js";
3
3
  import "react";
4
4
  import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
5
6
  const c = ":host{display:block;width:100%}:host *{box-sizing:border-box}.stack{display:flex;width:100%;max-width:100%}.stack ::slotted(*){min-width:0;max-width:100%;flex-basis:auto;flex-grow:0;flex-shrink:0}.stack--align-start{align-items:flex-start}.stack--align-center{align-items:center}.stack--align-end{align-items:flex-end}.stack--align-stretch{align-items:stretch}.stack--justify-start{justify-content:flex-start}.stack--justify-center{justify-content:center}.stack--justify-end{justify-content:flex-end}.stack--justify-space-between{justify-content:space-between}.stack--justify-space-around{justify-content:space-around}.stack--justify-space-evenly{justify-content:space-evenly}.stack--justify-stretch{justify-content:stretch}.stack--justify-stretch ::slotted(*){flex-grow:1}.stack--orientation-vertical{flex-direction:column}.stack--orientation-horizontal{flex-direction:row}.stack--wrap{flex-wrap:wrap}", r = class {
6
7
  constructor(t) {
7
8
  i(this, t), this.align = "start", this.as = "div", this.justify = "start", this.orientation = "vertical", this.spacing = "0", this.wrap = !1;
@@ -1,7 +1,8 @@
1
- import { r as n, c as r, h as e, H as a, g as o } from "./main.7e7363a7.js";
2
- import { c as l } from "./index-3c78bcaf.2675909b.js";
1
+ import { r as n, c as r, h as e, H as a, g as o } from "./index.b6e7bb76.js";
2
+ import { c as l } from "./index-6d2e18c6.289636d4.js";
3
3
  import "react";
4
4
  import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
5
6
  const d = `.sc-flip-switch-h{display:inline-flex}.sc-flip-switch-h *.sc-flip-switch{box-sizing:border-box}.switch.sc-flip-switch{display:inline-flex;align-items:center;touch-action:none}.switch.sc-flip-switch:focus-within .switch__control.sc-flip-switch{box-shadow:0 0 0 0.0625rem var(--s-background-default),
6
7
  0 0 0 0.1875rem var(--s-focus-default)}.switch--size-m.sc-flip-switch .switch__control.sc-flip-switch{width:2.75rem;height:1.5rem;border-radius:calc(1.5rem / 2)}.switch--size-m.sc-flip-switch .switch__thumb.sc-flip-switch{width:1.25rem;height:1.25rem}.switch--on.switch--size-m.sc-flip-switch .switch__thumb.sc-flip-switch{left:calc(100% - 1.25rem - var(--s-space-2))}.switch--on.sc-flip-switch .switch__control.sc-flip-switch{background-color:var(--s-interactive-primary-default)}.switch--on.sc-flip-switch .switch__thumb.sc-flip-switch{left:calc(100% - 0.875rem - var(--s-space-2))}.switch--disabled.sc-flip-switch .switch__control.sc-flip-switch{background-color:var(--s-interactive-primary-disabled);cursor:default}.switch--disabled.sc-flip-switch .switch__thumb.sc-flip-switch{background-color:var(--s-interactive-neutral-default)}.switch--disabled.sc-flip-switch .switch__label.sc-flip-switch{color:var(--s-text-disabled)}.switch__control.sc-flip-switch{position:relative;width:1.875rem;height:1.125rem;flex-shrink:0;border-radius:calc(1.125rem / 2);background-color:var(--s-interactive-primary-disabled);cursor:pointer;transition:background-color 0.2s}@media (prefers-reduced-motion){.switch__control.sc-flip-switch{transition:none}}.switch__thumb.sc-flip-switch{position:absolute;top:var(--s-space-2);left:var(--s-space-2);width:0.875rem;height:0.875rem;border-radius:50%;background-color:var(--s-surface-default);transition:left 0.2s;pointer-events:none}@media (prefers-reduced-motion){.switch__thumb.sc-flip-switch{transition:none}}.switch__label.sc-flip-switch{position:relative;z-index:1;margin-left:var(--s-space-12);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base)}`, f = class {
7
8
  constructor(h) {
@@ -0,0 +1,18 @@
1
+ import { r as s, h as a, H as i } from "./index.b6e7bb76.js";
2
+ import { c as o } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const e = ":host{display:block;width:100%}:host *{box-sizing:border-box}.tab{display:none;width:100%;padding:var(--s-space-8)}.tab--active{display:block}", r = class {
7
+ constructor(t) {
8
+ s(this, t);
9
+ }
10
+ render() {
11
+ const t = o("tab", { "tab--active": this.active });
12
+ return a(i, { "aria-labelledby": `tab-${this.tabId}`, id: this.tabId, role: "tabpanel", tabIndex: this.active ? 0 : -1 }, a("div", { class: t }, a("slot", null)));
13
+ }
14
+ };
15
+ r.style = e;
16
+ export {
17
+ r as flip_tab
18
+ };
@@ -0,0 +1,92 @@
1
+ import { r as o, c as r, h as s, H as n, g as b } from "./index.b6e7bb76.js";
2
+ import { c as l } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const d = ".sc-flip-tabs-h{display:block;width:100%}.sc-flip-tabs-h *.sc-flip-tabs{box-sizing:border-box}.tabs.sc-flip-tabs{width:100%}.tabs__tab-bar.sc-flip-tabs{position:relative;display:flex;width:100%;padding-right:var(--s-space-16);padding-left:var(--s-space-16);justify-content:flex-start;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (--from-tablet){.tabs__tab-bar.sc-flip-tabs{padding-right:0;padding-left:0}}.tabs__tab.sc-flip-tabs{display:block;min-width:0;margin:0;padding:var(--s-space-4) 0;border:none;background-color:transparent;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);cursor:pointer}.tabs__tab.sc-flip-tabs:focus-visible{outline:none}.tabs__tab.sc-flip-tabs:focus-visible .tabs__tab-label.sc-flip-tabs{border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.125rem var(--s-focus-default)}.tabs__tab.sc-flip-tabs:not(:first-of-type){padding-left:var(--s-space-8)}.tabs__tab.sc-flip-tabs:not(:last-of-type){padding-right:var(--s-space-8)}.tabs__tab-label.sc-flip-tabs{display:block;overflow:hidden;width:100%;padding:var(--s-space-8) var(--s-space-8);text-align:center;white-space:nowrap;text-overflow:ellipsis}.tabs__tab--active.sc-flip-tabs{color:var(--s-text-highlight)}.tabs__indicator.sc-flip-tabs{position:absolute;bottom:0;left:0;width:0;height:0.125rem;border-radius:0.0625rem;background-color:var(--s-border-highlight);transition:background-color 0.15s, transform 0.15s, width 0.15s;transform:translate3d(0, 0, 0);pointer-events:none}@media (prefers-reduced-motion){.tabs__indicator.sc-flip-tabs{transition:none}}", c = class {
7
+ constructor(t) {
8
+ o(this, t), this.tabActivated = r(this, "tabActivated", 7), this.tabs = [], this.onKeyDown = (i) => {
9
+ i.code === "ArrowLeft" ? (i.preventDefault(), this.activatePreviousTab()) : i.code === "ArrowRight" && (i.preventDefault(), this.activateNextTab());
10
+ }, this.onMouseEnter = (i, a) => {
11
+ if (a.tabId === this.activeTab) {
12
+ this.highlightedTab = void 0;
13
+ return;
14
+ }
15
+ this.highlightedTab = i.target.closest(".tabs__tab") || void 0;
16
+ }, this.onMouseLeave = () => {
17
+ this.highlightedTab = void 0;
18
+ };
19
+ }
20
+ componentWillLoad() {
21
+ this.collectTabs();
22
+ }
23
+ componentDidRender() {
24
+ this.updateIndicatorPosition();
25
+ }
26
+ onWindowResize() {
27
+ this.updateIndicatorPosition();
28
+ }
29
+ async activateTab(t) {
30
+ if (this.activeTab === t)
31
+ return;
32
+ this.activeTab = t, this.tabs.forEach((a) => a.active = !1);
33
+ const i = this.tabs.find((a) => a.tabId === t);
34
+ !Boolean(i) || (this.highlightedTab = void 0, i.active = !0, this.tabActivated.emit(i));
35
+ }
36
+ activateNextTab() {
37
+ const t = this.tabs.findIndex((a) => a.tabId === this.activeTab), i = Math.min(this.tabs.length - 1, t + 1);
38
+ this.activateTab(this.tabs[i].tabId), requestAnimationFrame(() => {
39
+ var a;
40
+ (a = this.el.querySelector(".tabs__tab--active")) === null || a === void 0 || a.focus();
41
+ });
42
+ }
43
+ activatePreviousTab() {
44
+ const t = this.tabs.findIndex((a) => a.tabId === this.activeTab), i = Math.max(0, t - 1);
45
+ this.activateTab(this.tabs[i].tabId), requestAnimationFrame(() => {
46
+ var a;
47
+ (a = this.el.querySelector(".tabs__tab--active")) === null || a === void 0 || a.focus();
48
+ });
49
+ }
50
+ collectTabs() {
51
+ if (this.tabs = Array.from(this.el.querySelectorAll("flip-tab")), this.tabs.length === 0)
52
+ return;
53
+ const t = this.tabs.find((i) => i.tabId === this.initialTab);
54
+ this.activateTab(Boolean(t) ? t.tabId : this.tabs[0].tabId);
55
+ }
56
+ updateIndicatorPosition() {
57
+ const t = this.tabs.find((e) => e.tabId === this.activeTab);
58
+ if (!Boolean(t) && !Boolean(this.highlightedTab)) {
59
+ this.indicatorEl.style.width = "", this.indicatorEl.style.transform = "", this.indicatorEl.style.backgroundColor = "";
60
+ return;
61
+ }
62
+ const a = (this.highlightedTab || this.el.querySelector(`#tab-${t.tabId}`)).querySelector(".tabs__tab-label");
63
+ this.indicatorEl.style.width = `${a.getBoundingClientRect().width / 16}rem`, this.indicatorEl.style.transform = `translate3d(${a.offsetLeft / 16}rem, 0, 0)`, this.indicatorEl.style.backgroundColor = Boolean(this.highlightedTab) ? "var(--s-border-default)" : "";
64
+ }
65
+ render() {
66
+ return s(n, null, s("div", { class: "tabs" }, s("div", { "aria-label": this.label, class: "tabs__tab-bar", onKeyDown: this.onKeyDown, role: "tablist" }, this.tabs.map((t) => {
67
+ const i = t.tabId === this.activeTab, a = l("tabs__tab", {
68
+ "tabs__tab--active": i
69
+ });
70
+ return s("button", {
71
+ "aria-controls": t.tabId,
72
+ "aria-selected": i ? "true" : "false",
73
+ class: a,
74
+ id: `tab-${t.tabId}`,
75
+ key: t.tabId,
76
+ onClick: () => this.activateTab(t.tabId),
77
+ onMouseEnter: (e) => this.onMouseEnter(e, t),
78
+ onMouseLeave: this.onMouseLeave,
79
+ role: "tab",
80
+ tabIndex: i ? 0 : -1,
81
+ type: "button"
82
+ }, s("span", { class: "tabs__tab-label" }, t.label));
83
+ }), s("span", { class: "tabs__indicator", ref: (t) => this.indicatorEl = t })), s("slot", null)));
84
+ }
85
+ get el() {
86
+ return b(this);
87
+ }
88
+ };
89
+ c.style = d;
90
+ export {
91
+ c as flip_tabs
92
+ };
@@ -1,7 +1,8 @@
1
- import { r as e, c as s, h as t, H as n } from "./main.7e7363a7.js";
2
- import { c as i } from "./index-3c78bcaf.2675909b.js";
1
+ import { r as e, c as s, h as t, H as n } from "./index.b6e7bb76.js";
2
+ import { c as i } from "./index-6d2e18c6.289636d4.js";
3
3
  import "react";
4
4
  import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
5
6
  const c = ":host{display:inline-flex}:host *{box-sizing:border-box}.tag{display:inline-flex;padding:var(--s-space-2) var(--s-space-8);align-items:center;border-radius:var(--s-border-radius-s);color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);gap:var(--s-space-4)}.tag--intent-info{color:var(--s-text-info);background-color:var(--s-surface-info-subdued)}.tag--intent-info .tag__removal-button{color:var(--icon-info)}.tag--intent-critical{color:var(--s-text-critical);background-color:var(--s-surface-critical-subdued)}.tag--intent-critical .tag__removal-button{color:var(--icon-critical)}.tag--intent-warning{color:var(--s-text-warning);background-color:var(--s-surface-warning-subdued)}.tag--intent-warning .tag__removal-button{color:var(--icon-warning)}.tag--intent-success{color:var(--s-text-success);background-color:var(--s-surface-success-subdued)}.tag--intent-success .tag__removal-button{color:var(--icon-success)}.tag__removal-button{display:inline-flex;margin-right:calc(-1 * var(--s-space-4));padding:0;border:none;color:var(--s-icon-strong);background-color:transparent;cursor:pointer}.tag__removal-button:focus{outline-color:var(--s-focus-default)}", l = class {
6
7
  constructor(a) {
7
8
  e(this, a), this.remove = s(this, "remove", 7), this.intent = "default", this.removalButtonLabel = "Remove", this.onRemove = (r) => {
@@ -0,0 +1,55 @@
1
+ import { r, c as h, h as t, H as c } from "./index.b6e7bb76.js";
2
+ import { c as d } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const x = '.sc-flip-text-input-h{display:block;width:100%}.sc-flip-text-input-h *.sc-flip-text-input{box-sizing:border-box}.text-input.sc-flip-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)}.text-input--clearable.sc-flip-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--type-number.sc-flip-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--show-password.sc-flip-text-input .text-input__input.sc-flip-text-input{width:100%}.text-input--disabled.sc-flip-text-input .text-input__character-counter.sc-flip-text-input{color:var(--s-text-disabled)}.text-input__input.sc-flip-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-flip-text-input:focus{outline:none}.text-input__input.sc-flip-text-input:disabled{color:var(--s-text-disabled);background-color:transparent}.text-input__input.sc-flip-text-input::-webkit-outer-spin-button,.text-input__input.sc-flip-text-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.text-input__input[type="number"].sc-flip-text-input{-moz-appearance:textfield}input.text-input__input.sc-flip-text-input:not([type="password"]){width:0.25rem;min-width:0.25rem}.text-input__clear-button.sc-flip-text-input,.text-input__password-toggle.sc-flip-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}.text-input__clear-button.sc-flip-text-input:focus,.text-input__password-toggle.sc-flip-text-input:focus{outline-color:var(--s-focus-default)}.text-input__stepper.sc-flip-text-input{position:absolute;top:-1.4375rem;right:0;display:flex;flex-direction:column}.text-input__step-button.sc-flip-text-input{display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__step-button.sc-flip-text-input:focus{outline-color:var(--s-focus-default)}.text-input__character-counter.sc-flip-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}.text-input__prefix.sc-flip-text-input{padding-right:var(--s-space-4);font-size:var(--s-font-size-base)}.text-input__suffix.sc-flip-text-input{padding-left:var(--s-space-4);font-size:var(--s-font-size-base)}', f = class {
7
+ constructor(s) {
8
+ r(this, s), this.valueChange = h(this, "valueChange", 7), this.autoComplete = "on", this.clearButtonLabel = "Clear input", this.rows = 1, this.passwordToggleLabel = "Toggle password display", this.type = "text", this.showPassword = !1, this.clear = () => {
9
+ this.inputEl.value = "", this.value = "", this.valueChange.emit(""), this.inputEl.focus();
10
+ }, this.onChange = (e) => {
11
+ const i = e.target;
12
+ this.value = i.value, this.valueChange.emit(i.value);
13
+ }, this.onFocus = (e) => {
14
+ this.handleAutoSelect(e);
15
+ }, this.onInput = (e) => {
16
+ this.onChange(e);
17
+ }, this.onKeyPress = (e) => {
18
+ this.type === "number" && ["+", "-", "e"].includes(e.key) && e.preventDefault();
19
+ }, this.decreaseValue = () => {
20
+ if (this.type !== "number")
21
+ return;
22
+ const e = this.step || 1, i = isNaN(this.inputEl.valueAsNumber) ? this.min !== void 0 ? this.min + 1 : 1 : this.inputEl.valueAsNumber;
23
+ this.value = String(Math.max(this.min || -1 / 0, i - e)), this.valueChange.emit(this.value);
24
+ }, this.increaseValue = () => {
25
+ if (this.type !== "number")
26
+ return;
27
+ const e = this.step || 1, i = isNaN(this.inputEl.valueAsNumber) ? this.min !== void 0 ? this.min - 1 : -1 : this.inputEl.valueAsNumber;
28
+ this.value = String(Math.min(this.max || 1 / 0, i + e)), this.valueChange.emit(this.value);
29
+ }, this.togglePassword = () => {
30
+ this.type === "password" && (this.showPassword = !this.showPassword);
31
+ };
32
+ }
33
+ componentDidRender() {
34
+ this.adjustInputSize();
35
+ }
36
+ adjustInputSize() {
37
+ this.rows > 1 && (this.inputEl.style.width = "", this.inputEl.style.height = "", this.inputEl.style.height = this.inputEl.scrollHeight / 16 + "rem"), this.rows === 1 && (this.inputEl.style.height = "", this.inputEl.style.width = "", this.type !== "password" && (this.inputEl.style.width = this.inputEl.scrollWidth / 16 + "rem"));
38
+ }
39
+ handleAutoSelect(s) {
40
+ !this.autoSelect || s.target.select();
41
+ }
42
+ render() {
43
+ var s;
44
+ const e = this.rows === 1 ? "input" : "textarea", i = this.invalid === !0 ? "true" : this.invalid === !1 ? "false" : void 0, n = this.type === "number" && !this.disabled, a = this.type === "password" && !this.disabled, l = this.clearable && !this.disabled && Boolean(this.value) && !a && !n && !this.showCharacterCounter, p = this.type === "password" && this.showPassword ? "text" : this.type, u = d("text-input", `text-input--type-${this.type}`, {
45
+ "text-input--clearable": this.clearable,
46
+ "text-input--disabled": this.disabled,
47
+ "text-input--show-password": this.type === "password" && this.showPassword
48
+ });
49
+ return t(c, null, t("div", { class: u }, this.prefixLabel && t("span", { class: "text-input__prefix" }, this.prefixLabel), t(e, { "aria-describedby": this.flipAriaDescribedby, "aria-disabled": this.disabled ? "true" : void 0, "aria-invalid": i, autoComplete: this.autoComplete, autoFocus: this.autoFocus, class: "text-input__input", disabled: this.disabled, inputMode: this.mode, maxLength: this.maxLength, max: this.type === "number" ? this.max : void 0, min: this.type === "number" ? this.min : void 0, onFocus: this.onFocus, onInput: this.onInput, onKeyPress: this.onKeyPress, ref: (o) => this.inputEl = o, required: this.required, rows: this.rows > 1 ? this.rows : void 0, spellcheck: this.spellCheck, step: this.type === "number" ? this.step : void 0, type: p, value: this.rows === 1 ? this.value : void 0 }, this.rows > 1 && this.value), this.suffixLabel && t("span", { class: "text-input__suffix" }, this.suffixLabel), l && t("button", { "aria-label": this.clearButtonLabel, class: "text-input__clear-button", onClick: this.clear, type: "button" }, t("flip-icon-cancel", null)), a && t("button", { "aria-label": this.passwordToggleLabel, class: "text-input__password-toggle", onClick: this.togglePassword, type: "button" }, this.showPassword ? t("flip-icon-visibility-off", null) : t("flip-icon-visibility", null)), n && t("span", { class: "text-input__stepper" }, t("button", { "aria-hidden": "true", class: "text-input__step-button", onClick: this.increaseValue, tabIndex: -1, type: "button" }, t("flip-icon-expand-less", null)), t("button", { "aria-hidden": "true", class: "text-input__step-button", onClick: this.decreaseValue, tabIndex: -1, type: "button" }, t("flip-icon-expand-more", null))), this.showCharacterCounter && t("span", { class: "text-input__character-counter" }, ((s = this.value) === null || s === void 0 ? void 0 : s.length) || 0, " ", Boolean(this.maxLength) ? `/ ${this.maxLength}` : "")));
50
+ }
51
+ };
52
+ f.style = x;
53
+ export {
54
+ f as flip_text_input
55
+ };
@@ -0,0 +1,18 @@
1
+ import { r as i, h as e, H as o } from "./index.b6e7bb76.js";
2
+ import { c as l } from "./index-6d2e18c6.289636d4.js";
3
+ import "react";
4
+ import "react-dom";
5
+ import "./_commonjsHelpers-44457d8d.ba94af77.js";
6
+ const n = ":host{display:block}:host *{box-sizing:border-box}.text{margin:0;padding:0}.text--align-start{text-align:start}.text--align-center{text-align:center}.text--align-end{text-align:end}.text--color-default{color:var(--s-text-default)}.text--color-subdued{color:var(--s-text-subdued)}.text--color-critical{color:var(--s-text-critical)}.text--color-success{color:var(--s-text-success)}.text--color-warning{color:var(--s-text-warning)}.text--size-sm{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}.text--size-lg{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}.text--weight-normal{font-weight:var(--s-font-weight-normal)}.text--weight-medium{font-weight:var(--s-font-weight-medium)}.text--weight-semibold{font-weight:var(--s-font-weight-semibold)}.text--weight-bold{font-weight:var(--s-font-weight-bold)}.text--font-style-normal{font-style:normal}.text--font-style-italic{font-style:italic}", a = class {
7
+ constructor(t) {
8
+ i(this, t), this.align = "start", this.as = "p", this.color = "default", this.fontStyle = "normal", this.size = "base", this.weight = "normal";
9
+ }
10
+ render() {
11
+ const t = this.as, s = l("text", `text--align-${this.align}`, `text--color-${this.color}`, `text--font-style-${this.fontStyle}`, `text--size-${this.size}`, `text--weight-${this.weight}`);
12
+ return e(o, null, e(t, { class: s }, e("slot", null)));
13
+ }
14
+ };
15
+ a.style = n;
16
+ export {
17
+ a as flip_text
18
+ };
@@ -1,4 +1,4 @@
1
- import { r as C, h as b, H } from "./main.7e7363a7.js";
1
+ import { r as C, h as b, H } from "./index.b6e7bb76.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  function h(e, t, n) {