@getflip/swirl-components-react 0.3.0 → 0.4.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 (142) hide show
  1. package/dist/file-manager.entry.07628dad.js +58 -0
  2. package/dist/{flip-action-list-item.entry.bfe816d0.js → flip-action-list-item.entry.a330605c.js} +1 -1
  3. package/dist/{flip-action-list-section.entry.8072859c.js → flip-action-list-section.entry.19091d98.js} +1 -1
  4. package/dist/{flip-action-list.entry.07c4e8cb.js → flip-action-list.entry.319f0192.js} +2 -2
  5. package/dist/flip-app-layout_5.entry.ac01996d.js +215 -0
  6. package/dist/flip-autocomplete.entry.21deedf2.js +70 -0
  7. package/dist/{flip-avatar-group.entry.f987aa8b.js → flip-avatar-group.entry.c2cc9526.js} +1 -1
  8. package/dist/flip-avatar.entry.7034b888.js +57 -0
  9. package/dist/flip-badge.entry.bc935c62.js +20 -0
  10. package/dist/{flip-banner.entry.50b72a3f.js → flip-banner.entry.d257835c.js} +1 -1
  11. package/dist/{flip-button-group.entry.9261c585.js → flip-button-group.entry.8ce7a3d4.js} +1 -1
  12. package/dist/{flip-button.entry.98440a9e.js → flip-button.entry.eb07eb8a.js} +2 -2
  13. package/dist/{flip-checkbox.entry.56d1e132.js → flip-checkbox.entry.43a3832e.js} +1 -1
  14. package/dist/{flip-chip.entry.e2be5143.js → flip-chip.entry.a479c5b0.js} +1 -1
  15. package/dist/{flip-date-input.entry.2d5088ea.js → flip-date-input.entry.b98d662b.js} +1 -1
  16. package/dist/{flip-date-picker_3.entry.d61d1842.js → flip-date-picker_2.entry.c2143459.js} +281 -374
  17. package/dist/{flip-description-list-item.entry.ebdd7136.js → flip-description-list-item.entry.f1db6930.js} +1 -1
  18. package/dist/{flip-description-list.entry.48a4d48b.js → flip-description-list.entry.0e214ec2.js} +1 -1
  19. package/dist/{flip-dialog.entry.bec58ff3.js → flip-dialog.entry.24f62804.js} +1 -1
  20. package/dist/{flip-file-uploader.entry.d8919920.js → flip-file-uploader.entry.91b6ca52.js} +1 -1
  21. package/dist/{flip-file-viewer-audio_6.entry.6ac11dbe.js → flip-file-viewer_7.entry.47a4ee0d.js} +4964 -4794
  22. package/dist/{flip-form-control.entry.c45d4428.js → flip-form-control.entry.82737412.js} +1 -1
  23. package/dist/{flip-form-group.entry.52e6ee89.js → flip-form-group.entry.89c2a7a6.js} +1 -1
  24. package/dist/flip-heading.entry.00139b62.js +18 -0
  25. package/dist/{flip-icon-add-photo.entry.897fe115.js → flip-icon-add-photo.entry.b5415432.js} +1 -1
  26. package/dist/flip-icon-add_4.entry.b525e436.js +45 -0
  27. package/dist/{flip-icon-admin-panel-settings.entry.d1c445fd.js → flip-icon-admin-panel-settings.entry.e416caa2.js} +1 -1
  28. package/dist/{flip-icon-arrow-back.entry.e054a0e8.js → flip-icon-arrow-back.entry.3b24c3c4.js} +1 -1
  29. package/dist/{flip-icon-arrow-forward.entry.ceea49fe.js → flip-icon-arrow-forward.entry.c3577622.js} +1 -1
  30. package/dist/{flip-icon-arrow-left_3.entry.ec0b28c1.js → flip-icon-arrow-left_3.entry.0e8c6ffd.js} +1 -1
  31. package/dist/{flip-icon-arrow-right-small.entry.88470f4b.js → flip-icon-arrow-right-small.entry.36a480f8.js} +1 -1
  32. package/dist/{flip-icon-attachment.entry.c141c860.js → flip-icon-attachment.entry.d44215f9.js} +1 -1
  33. package/dist/{flip-icon-expand-less_3.entry.6e9d656c.js → flip-icon-cancel_4.entry.90ff0e73.js} +23 -13
  34. package/dist/{flip-icon-chat-bubble.entry.13a6899b.js → flip-icon-chat-bubble.entry.b8022c94.js} +1 -1
  35. package/dist/{flip-icon-check-circle.entry.4c134688.js → flip-icon-check-circle.entry.b59a0f63.js} +1 -1
  36. package/dist/flip-icon-check-small_3.entry.fd9f691c.js +145 -0
  37. package/dist/{flip-icon-check-strong.entry.819065e2.js → flip-icon-check-strong.entry.cab3e061.js} +1 -1
  38. package/dist/{flip-icon-check.entry.e9e18ec0.js → flip-icon-check.entry.f6231fc3.js} +1 -1
  39. package/dist/{flip-icon-chevron-left.entry.8b4f8813.js → flip-icon-chevron-left.entry.cd972c85.js} +1 -1
  40. package/dist/{flip-icon-chevron-right.entry.d32eba9e.js → flip-icon-chevron-right.entry.b96a1ead.js} +1 -1
  41. package/dist/{flip-icon-close-small.entry.e18fcac6.js → flip-icon-close-small.entry.292f402f.js} +1 -1
  42. package/dist/{flip-icon-close.entry.30a8abc3.js → flip-icon-close.entry.a52651ec.js} +1 -1
  43. package/dist/{flip-icon-cloud-upload.entry.6412d35e.js → flip-icon-cloud-upload.entry.8c3de009.js} +1 -1
  44. package/dist/{flip-icon-comment.entry.731b5907.js → flip-icon-comment.entry.68e5198c.js} +1 -1
  45. package/dist/{flip-icon-copy.entry.c29519f3.js → flip-icon-copy.entry.ea55301c.js} +1 -1
  46. package/dist/{flip-icon-date-range.entry.d6dea969.js → flip-icon-date-range.entry.78991d34.js} +1 -1
  47. package/dist/{flip-icon-delete.entry.e99d814a.js → flip-icon-delete.entry.addf184d.js} +1 -1
  48. package/dist/{flip-icon-description.entry.8448b398.js → flip-icon-description.entry.7688a64f.js} +1 -1
  49. package/dist/{flip-icon-edit.entry.3ae910b7.js → flip-icon-edit.entry.5df4b598.js} +1 -1
  50. package/dist/{flip-icon-emoji-mood.entry.89308bc3.js → flip-icon-emoji-mood.entry.7772f2da.js} +1 -1
  51. package/dist/{flip-icon-emoji-satisfied.entry.5a9bca01.js → flip-icon-emoji-satisfied.entry.3f11571c.js} +1 -1
  52. package/dist/{flip-icon-error_3.entry.f44ffe60.js → flip-icon-error_3.entry.6d22b7a2.js} +1 -1
  53. package/dist/{flip-icon-expand-more.entry.d0acac42.js → flip-icon-expand-more.entry.2ffa6f0c.js} +1 -1
  54. package/dist/{flip-icon-file.entry.24508e1d.js → flip-icon-file.entry.517a75cc.js} +1 -1
  55. package/dist/{flip-icon-folder-shared.entry.c829f971.js → flip-icon-folder-shared.entry.661494c2.js} +1 -1
  56. package/dist/{flip-icon-group-assign.entry.ba88a447.js → flip-icon-group-assign.entry.8131eb64.js} +1 -1
  57. package/dist/{flip-icon-groups-custom.entry.eeaaa045.js → flip-icon-groups-custom.entry.f0086123.js} +1 -1
  58. package/dist/{flip-icon-groups.entry.fb62ee22.js → flip-icon-groups.entry.2e076144.js} +1 -1
  59. package/dist/{flip-icon-image.entry.75eebbb0.js → flip-icon-image.entry.d0482319.js} +1 -1
  60. package/dist/{flip-icon-info.entry.e30b9669.js → flip-icon-info.entry.d16cf109.js} +1 -1
  61. package/dist/{flip-icon-inventory.entry.39ebc534.js → flip-icon-inventory.entry.a209dd1e.js} +1 -1
  62. package/dist/{flip-icon-like.entry.80e5f8b9.js → flip-icon-like.entry.631333f8.js} +1 -1
  63. package/dist/{flip-icon-link.entry.c99a2106.js → flip-icon-link.entry.b67ce56a.js} +1 -1
  64. package/dist/{flip-icon-lock.entry.5957290a.js → flip-icon-lock.entry.13f8fa54.js} +1 -1
  65. package/dist/{flip-icon-logout.entry.c6240d44.js → flip-icon-logout.entry.79b91644.js} +1 -1
  66. package/dist/{flip-icon-mail.entry.65b32c8b.js → flip-icon-mail.entry.62265dc6.js} +1 -1
  67. package/dist/{flip-icon-manage-accounts.entry.73cd3a27.js → flip-icon-manage-accounts.entry.e821e9df.js} +1 -1
  68. package/dist/{flip-icon-mention.entry.088e8573.js → flip-icon-mention.entry.09ac190a.js} +1 -1
  69. package/dist/{flip-icon-message.entry.e7306c78.js → flip-icon-message.entry.06934900.js} +1 -1
  70. package/dist/{flip-icon-more-horizontal.entry.9b6c4ab4.js → flip-icon-more-horizontal.entry.d1d97d3d.js} +1 -1
  71. package/dist/{flip-icon-more-vertikal.entry.43a77373.js → flip-icon-more-vertikal.entry.d40ca8b0.js} +1 -1
  72. package/dist/{flip-icon-notifications-active.entry.b48ff150.js → flip-icon-notifications-active.entry.c38ee4bb.js} +1 -1
  73. package/dist/{flip-icon-notifications-off.entry.b60ef6aa.js → flip-icon-notifications-off.entry.02743a47.js} +1 -1
  74. package/dist/{flip-icon-notifications.entry.e2d0f244.js → flip-icon-notifications.entry.4f873bc3.js} +1 -1
  75. package/dist/{flip-icon-open-in-new.entry.bdcb5f7e.js → flip-icon-open-in-new.entry.cb673e42.js} +1 -1
  76. package/dist/{flip-icon-people-alt.entry.4c0917f0.js → flip-icon-people-alt.entry.648a37d3.js} +1 -1
  77. package/dist/{flip-icon-person-off.entry.4dba1b98.js → flip-icon-person-off.entry.3bc3e587.js} +1 -1
  78. package/dist/{flip-icon-person.entry.57042a58.js → flip-icon-person.entry.b269287a.js} +1 -1
  79. package/dist/{flip-icon-phone.entry.3ad46317.js → flip-icon-phone.entry.89c67938.js} +1 -1
  80. package/dist/{flip-icon-poll.entry.c14b718c.js → flip-icon-poll.entry.51bd2d6b.js} +1 -1
  81. package/dist/{flip-icon-print.entry.42bc6751.js → flip-icon-print.entry.fcdc08c4.js} +1 -1
  82. package/dist/{flip-icon-recieved.entry.35cc64fd.js → flip-icon-recieved.entry.e52d5907.js} +1 -1
  83. package/dist/{flip-icon-search-strong.entry.d6722aba.js → flip-icon-search-strong.entry.f9f740dc.js} +1 -1
  84. package/dist/{flip-icon-search.entry.c2c88135.js → flip-icon-search.entry.530eb22a.js} +1 -1
  85. package/dist/{flip-icon-send.entry.6d3ed0a4.js → flip-icon-send.entry.1a1f6a9f.js} +1 -1
  86. package/dist/{flip-icon-settings.entry.3ab04c76.js → flip-icon-settings.entry.05357f2b.js} +1 -1
  87. package/dist/{flip-icon-time-filled.entry.050c61d7.js → flip-icon-time-filled.entry.7dfefe00.js} +1 -1
  88. package/dist/{flip-icon-time-outlined.entry.195df6e9.js → flip-icon-time-outlined.entry.b309035e.js} +1 -1
  89. package/dist/{flip-icon-user-assign.entry.60316828.js → flip-icon-user-assign.entry.b595047d.js} +1 -1
  90. package/dist/{flip-icon-video-camera.entry.d376e2da.js → flip-icon-video-camera.entry.08411542.js} +1 -1
  91. package/dist/{flip-icon-warning.entry.7484d16e.js → flip-icon-warning.entry.5d5e3ce9.js} +1 -1
  92. package/dist/{flip-lightbox.entry.cdffd089.js → flip-lightbox.entry.d7a5b33f.js} +2 -2
  93. package/dist/{flip-link.entry.145e89bf.js → flip-link.entry.5415c5a4.js} +1 -1
  94. package/dist/{flip-list.entry.fcece197.js → flip-list.entry.5ffbd0ef.js} +1 -1
  95. package/dist/{flip-modal.entry.f20fd032.js → flip-modal.entry.8f99c357.js} +10 -10
  96. package/dist/{flip-option-list-section.entry.c0084261.js → flip-option-list-section.entry.1c46b667.js} +1 -1
  97. package/dist/{flip-pagination.entry.a8a4c1bf.js → flip-pagination.entry.44ba4122.js} +1 -1
  98. package/dist/flip-pdf-reader.entry.4fba8eda.js +79 -0
  99. package/dist/flip-popover.entry.0f8879c7.js +99 -0
  100. package/dist/{flip-progress-indicator.entry.8069914b.js → flip-progress-indicator.entry.98300d84.js} +1 -1
  101. package/dist/{flip-radio-group.entry.4046ee83.js → flip-radio-group.entry.3a737bc9.js} +1 -1
  102. package/dist/{flip-radio.entry.941e407b.js → flip-radio.entry.45be80ff.js} +1 -1
  103. package/dist/{flip-resource-list-file-item.entry.678596e2.js → flip-resource-list-file-item.entry.380c5dbe.js} +1 -1
  104. package/dist/{flip-search.entry.05617d72.js → flip-search.entry.6805dae6.js} +1 -1
  105. package/dist/{flip-stack.entry.60b7e7d8.js → flip-stack.entry.c7c6570a.js} +1 -1
  106. package/dist/{flip-switch.entry.51a1856d.js → flip-switch.entry.d92b7292.js} +1 -1
  107. package/dist/{flip-tab.entry.fd12f894.js → flip-tab.entry.e7a1ab1a.js} +1 -1
  108. package/dist/{flip-tabs.entry.9462dbaa.js → flip-tabs.entry.16f909d5.js} +1 -1
  109. package/dist/{flip-tag.entry.923d754e.js → flip-tag.entry.8622ab43.js} +1 -1
  110. package/dist/flip-text-input.entry.326d7e72.js +58 -0
  111. package/dist/{flip-text.entry.634f95b3.js → flip-text.entry.a01cf4bc.js} +1 -1
  112. package/dist/{flip-theme-provider.entry.ab641668.js → flip-theme-provider.entry.bb6a10e3.js} +1 -1
  113. package/dist/{flip-thumbnail.entry.9d00d2f8.js → flip-thumbnail.entry.7e078ff9.js} +1 -1
  114. package/dist/{flip-toast-provider.entry.d0391c9a.js → flip-toast-provider.entry.442c1fb8.js} +1 -1
  115. package/dist/{flip-toast.entry.fac8df58.js → flip-toast.entry.696f6bd2.js} +1 -1
  116. package/dist/{flip-tooltip.entry.f7d80b92.js → flip-tooltip.entry.0c1774a4.js} +1 -1
  117. package/dist/{flip-video-thumbnail.entry.f45c61bc.js → flip-video-thumbnail.entry.b6b896d0.js} +1 -1
  118. package/dist/{flip-visually-hidden.entry.1099adf3.js → flip-visually-hidden.entry.58a19f2e.js} +1 -1
  119. package/dist/index.b66ff9f0.js +1365 -0
  120. package/dist/stencil-generated/index.d.ts +5 -0
  121. package/dist/swirl-components-react.js +142 -137
  122. package/dist/swirl-components-react.umd.cjs +51 -35
  123. package/dist/utils-39b2afe8.37b54ba4.js +40 -0
  124. package/package.json +2 -2
  125. package/dist/flip-avatar.entry.7be29e5c.js +0 -57
  126. package/dist/flip-badge.entry.bb0eb78d.js +0 -20
  127. package/dist/flip-empty-state.entry.d125feea.js +0 -15
  128. package/dist/flip-file-viewer.entry.66629b65.js +0 -95
  129. package/dist/flip-heading.entry.b20bb368.js +0 -18
  130. package/dist/flip-icon-add.entry.a04d115d.js +0 -15
  131. package/dist/flip-icon-cancel.entry.07a0efa7.js +0 -15
  132. package/dist/flip-icon-check-small.entry.1da0f061.js +0 -15
  133. package/dist/flip-icon-fullscreen-exit.entry.4f7369df.js +0 -15
  134. package/dist/flip-icon-fullscreen.entry.fe6d6998.js +0 -15
  135. package/dist/flip-icon-remove.entry.7ce5335b.js +0 -15
  136. package/dist/flip-option-list-item.entry.ed931c3c.js +0 -30
  137. package/dist/flip-option-list.entry.a07fd2d3.js +0 -95
  138. package/dist/flip-resource-list-item.entry.3ba2f6c5.js +0 -41
  139. package/dist/flip-resource-list.entry.b5f4d108.js +0 -49
  140. package/dist/flip-text-input.entry.09a6024a.js +0 -55
  141. package/dist/index.0ccdd659.js +0 -1360
  142. package/dist/utils-b46bcd4f.79126bb2.js +0 -30
@@ -1,49 +0,0 @@
1
- import { r as i, h as o, H as r, g as l } from "./index.0ccdd659.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,55 +0,0 @@
1
- import { r, c as h, h as t, H as c } from "./index.0ccdd659.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);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}.text-input__suffix.sc-flip-text-input{padding-left:var(--s-space-4);color:var(--s-text-subdued);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, u = this.type === "password" && this.showPassword ? "text" : this.type, p = 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: p }, 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: u, 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
- };