@getflip/swirl-components-react 0.3.0 → 0.5.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.
- package/dist/file-manager.entry.5df78d98.js +58 -0
- package/dist/{flip-action-list-item.entry.bfe816d0.js → flip-action-list-item.entry.080e14b7.js} +1 -1
- package/dist/{flip-action-list-section.entry.8072859c.js → flip-action-list-section.entry.59cc892d.js} +1 -1
- package/dist/{flip-action-list.entry.07c4e8cb.js → flip-action-list.entry.34dd165b.js} +2 -2
- package/dist/flip-app-layout_5.entry.20b263f5.js +215 -0
- package/dist/flip-autocomplete.entry.a63ad331.js +70 -0
- package/dist/{flip-avatar-group.entry.f987aa8b.js → flip-avatar-group.entry.e00bcff1.js} +1 -1
- package/dist/flip-avatar.entry.32cb98bf.js +57 -0
- package/dist/flip-badge.entry.63e2d414.js +20 -0
- package/dist/{flip-banner.entry.50b72a3f.js → flip-banner.entry.a2f5eef8.js} +1 -1
- package/dist/{flip-button-group.entry.9261c585.js → flip-button-group.entry.7856eb4f.js} +1 -1
- package/dist/{flip-button.entry.98440a9e.js → flip-button.entry.82de4159.js} +13 -7
- package/dist/{flip-checkbox.entry.56d1e132.js → flip-checkbox.entry.4af2f2b4.js} +10 -7
- package/dist/{flip-chip.entry.e2be5143.js → flip-chip.entry.9e153968.js} +1 -1
- package/dist/flip-console-layout.entry.940ff9f8.js +22 -0
- package/dist/{flip-date-input.entry.2d5088ea.js → flip-date-input.entry.dce529bc.js} +6 -4
- package/dist/{flip-date-picker_3.entry.d61d1842.js → flip-date-picker_2.entry.177499d7.js} +276 -367
- package/dist/{flip-description-list-item.entry.ebdd7136.js → flip-description-list-item.entry.efd60d4e.js} +1 -1
- package/dist/{flip-description-list.entry.48a4d48b.js → flip-description-list.entry.28fc026b.js} +1 -1
- package/dist/{flip-dialog.entry.bec58ff3.js → flip-dialog.entry.1f35195b.js} +1 -1
- package/dist/{flip-file-uploader.entry.d8919920.js → flip-file-uploader.entry.3888ef19.js} +1 -1
- package/dist/{flip-file-viewer-audio_6.entry.6ac11dbe.js → flip-file-viewer_7.entry.098a3dac.js} +4964 -4794
- package/dist/flip-form-control.entry.8a1150c0.js +65 -0
- package/dist/{flip-form-group.entry.52e6ee89.js → flip-form-group.entry.42d83af8.js} +1 -1
- package/dist/flip-heading_2.entry.36e0c785.js +29 -0
- package/dist/{flip-icon-add-photo.entry.897fe115.js → flip-icon-add-photo.entry.4a5cdf22.js} +1 -1
- package/dist/flip-icon-add_4.entry.890da8d3.js +45 -0
- package/dist/{flip-icon-admin-panel-settings.entry.d1c445fd.js → flip-icon-admin-panel-settings.entry.29420ba1.js} +1 -1
- package/dist/{flip-icon-arrow-back.entry.e054a0e8.js → flip-icon-arrow-back.entry.c75093f3.js} +1 -1
- package/dist/{flip-icon-arrow-forward.entry.ceea49fe.js → flip-icon-arrow-forward.entry.a5ba53d2.js} +1 -1
- package/dist/{flip-icon-arrow-left_3.entry.ec0b28c1.js → flip-icon-arrow-left_3.entry.492c928f.js} +1 -1
- package/dist/{flip-icon-arrow-right-small.entry.88470f4b.js → flip-icon-arrow-right-small.entry.d977647f.js} +1 -1
- package/dist/{flip-icon-attachment.entry.c141c860.js → flip-icon-attachment.entry.33509693.js} +1 -1
- package/dist/{flip-icon-expand-less_3.entry.6e9d656c.js → flip-icon-cancel_4.entry.c7533bde.js} +23 -13
- package/dist/{flip-icon-chat-bubble.entry.13a6899b.js → flip-icon-chat-bubble.entry.796b792b.js} +1 -1
- package/dist/{flip-icon-check-circle.entry.4c134688.js → flip-icon-check-circle.entry.942c13d5.js} +1 -1
- package/dist/flip-icon-check-small_3.entry.0b74d78c.js +143 -0
- package/dist/{flip-icon-check-strong.entry.819065e2.js → flip-icon-check-strong.entry.f072021d.js} +1 -1
- package/dist/{flip-icon-check.entry.e9e18ec0.js → flip-icon-check.entry.e4c5c94a.js} +1 -1
- package/dist/{flip-icon-chevron-left.entry.8b4f8813.js → flip-icon-chevron-left.entry.65b612e3.js} +1 -1
- package/dist/{flip-icon-chevron-right.entry.d32eba9e.js → flip-icon-chevron-right.entry.0ea10200.js} +1 -1
- package/dist/{flip-icon-close-small.entry.e18fcac6.js → flip-icon-close-small.entry.cccd694a.js} +1 -1
- package/dist/{flip-icon-close.entry.30a8abc3.js → flip-icon-close.entry.cf4afdfd.js} +1 -1
- package/dist/{flip-icon-cloud-upload.entry.6412d35e.js → flip-icon-cloud-upload.entry.8f2ba9c7.js} +1 -1
- package/dist/{flip-icon-comment.entry.731b5907.js → flip-icon-comment.entry.bd9871c6.js} +1 -1
- package/dist/{flip-icon-copy.entry.c29519f3.js → flip-icon-copy.entry.1b311d2c.js} +1 -1
- package/dist/{flip-icon-date-range.entry.d6dea969.js → flip-icon-date-range.entry.20ae3be8.js} +1 -1
- package/dist/{flip-icon-delete.entry.e99d814a.js → flip-icon-delete.entry.91cce4b6.js} +1 -1
- package/dist/{flip-icon-description.entry.8448b398.js → flip-icon-description.entry.1e861585.js} +1 -1
- package/dist/{flip-icon-edit.entry.3ae910b7.js → flip-icon-edit.entry.6ce0adc0.js} +1 -1
- package/dist/{flip-icon-emoji-mood.entry.89308bc3.js → flip-icon-emoji-mood.entry.26ff5f4c.js} +1 -1
- package/dist/{flip-icon-emoji-satisfied.entry.5a9bca01.js → flip-icon-emoji-satisfied.entry.c5964eb2.js} +1 -1
- package/dist/{flip-icon-error_3.entry.f44ffe60.js → flip-icon-error_3.entry.ed9ea2ba.js} +1 -1
- package/dist/{flip-icon-expand-more.entry.d0acac42.js → flip-icon-expand-more.entry.dfe65dc1.js} +1 -1
- package/dist/{flip-icon-file.entry.24508e1d.js → flip-icon-file.entry.1337f4a3.js} +1 -1
- package/dist/{flip-icon-folder-shared.entry.c829f971.js → flip-icon-folder-shared.entry.d729af99.js} +1 -1
- package/dist/{flip-icon-group-assign.entry.ba88a447.js → flip-icon-group-assign.entry.1b26fbcc.js} +1 -1
- package/dist/{flip-icon-groups-custom.entry.eeaaa045.js → flip-icon-groups-custom.entry.f1691911.js} +1 -1
- package/dist/{flip-icon-groups.entry.fb62ee22.js → flip-icon-groups.entry.8ee2103f.js} +1 -1
- package/dist/flip-icon-help.entry.258ffe77.js +15 -0
- package/dist/{flip-icon-image.entry.75eebbb0.js → flip-icon-image.entry.ed9e7cea.js} +1 -1
- package/dist/{flip-icon-info.entry.e30b9669.js → flip-icon-info.entry.7ecf555e.js} +1 -1
- package/dist/{flip-icon-inventory.entry.39ebc534.js → flip-icon-inventory.entry.3dfdaf9f.js} +1 -1
- package/dist/{flip-icon-like.entry.80e5f8b9.js → flip-icon-like.entry.0cc26e51.js} +1 -1
- package/dist/{flip-icon-link.entry.c99a2106.js → flip-icon-link.entry.4a62a637.js} +1 -1
- package/dist/{flip-icon-lock.entry.5957290a.js → flip-icon-lock.entry.de97d106.js} +1 -1
- package/dist/{flip-icon-logout.entry.c6240d44.js → flip-icon-logout.entry.551dbbfc.js} +1 -1
- package/dist/{flip-icon-mail.entry.65b32c8b.js → flip-icon-mail.entry.8f23d662.js} +1 -1
- package/dist/{flip-icon-manage-accounts.entry.73cd3a27.js → flip-icon-manage-accounts.entry.587cc1f2.js} +1 -1
- package/dist/{flip-icon-mention.entry.088e8573.js → flip-icon-mention.entry.dea7e9bd.js} +1 -1
- package/dist/{flip-icon-message.entry.e7306c78.js → flip-icon-message.entry.661d3f8b.js} +1 -1
- package/dist/{flip-icon-more-horizontal.entry.9b6c4ab4.js → flip-icon-more-horizontal.entry.e1b56167.js} +1 -1
- package/dist/{flip-icon-more-vertikal.entry.43a77373.js → flip-icon-more-vertikal.entry.c8c2faf5.js} +1 -1
- package/dist/{flip-icon-notifications-active.entry.b48ff150.js → flip-icon-notifications-active.entry.17e2db26.js} +1 -1
- package/dist/{flip-icon-notifications-off.entry.b60ef6aa.js → flip-icon-notifications-off.entry.fccd2c17.js} +1 -1
- package/dist/{flip-icon-notifications.entry.e2d0f244.js → flip-icon-notifications.entry.fd6974d0.js} +1 -1
- package/dist/{flip-icon-open-in-new.entry.bdcb5f7e.js → flip-icon-open-in-new.entry.377230e7.js} +1 -1
- package/dist/{flip-icon-people-alt.entry.4c0917f0.js → flip-icon-people-alt.entry.ff8dcfad.js} +1 -1
- package/dist/{flip-icon-person-off.entry.4dba1b98.js → flip-icon-person-off.entry.c1046231.js} +1 -1
- package/dist/{flip-icon-person.entry.57042a58.js → flip-icon-person.entry.a8e33281.js} +1 -1
- package/dist/{flip-icon-phone.entry.3ad46317.js → flip-icon-phone.entry.b13cd9db.js} +1 -1
- package/dist/{flip-icon-poll.entry.c14b718c.js → flip-icon-poll.entry.d4d7ab35.js} +1 -1
- package/dist/{flip-icon-print.entry.42bc6751.js → flip-icon-print.entry.e22c899f.js} +1 -1
- package/dist/{flip-icon-recieved.entry.35cc64fd.js → flip-icon-recieved.entry.42365f6e.js} +1 -1
- package/dist/{flip-icon-search-strong.entry.d6722aba.js → flip-icon-search-strong.entry.3e2df830.js} +1 -1
- package/dist/{flip-icon-search.entry.c2c88135.js → flip-icon-search.entry.307ecf81.js} +1 -1
- package/dist/{flip-icon-send.entry.6d3ed0a4.js → flip-icon-send.entry.d821277c.js} +1 -1
- package/dist/{flip-icon-settings.entry.3ab04c76.js → flip-icon-settings.entry.39d549e4.js} +1 -1
- package/dist/{flip-icon-time-filled.entry.050c61d7.js → flip-icon-time-filled.entry.59391c42.js} +1 -1
- package/dist/{flip-icon-time-outlined.entry.195df6e9.js → flip-icon-time-outlined.entry.7828e49b.js} +1 -1
- package/dist/{flip-icon-user-assign.entry.60316828.js → flip-icon-user-assign.entry.d015d6d1.js} +1 -1
- package/dist/{flip-icon-video-camera.entry.d376e2da.js → flip-icon-video-camera.entry.08b245ec.js} +1 -1
- package/dist/{flip-icon-warning.entry.7484d16e.js → flip-icon-warning.entry.6646b827.js} +1 -1
- package/dist/{flip-lightbox.entry.cdffd089.js → flip-lightbox.entry.89522005.js} +2 -2
- package/dist/{flip-link.entry.145e89bf.js → flip-link.entry.21826dcf.js} +1 -1
- package/dist/{flip-list.entry.fcece197.js → flip-list.entry.28ca3e9a.js} +1 -1
- package/dist/{flip-modal.entry.f20fd032.js → flip-modal.entry.9dc00a89.js} +10 -10
- package/dist/{flip-option-list-section.entry.c0084261.js → flip-option-list-section.entry.8016c860.js} +1 -1
- package/dist/{flip-pagination.entry.a8a4c1bf.js → flip-pagination.entry.5c31f8e5.js} +1 -1
- package/dist/flip-pdf-reader.entry.79fd6e1f.js +79 -0
- package/dist/flip-popover.entry.712ebb5b.js +115 -0
- package/dist/{flip-progress-indicator.entry.8069914b.js → flip-progress-indicator.entry.342c1c4c.js} +1 -1
- package/dist/{flip-radio-group.entry.4046ee83.js → flip-radio-group.entry.ab35d743.js} +1 -1
- package/dist/{flip-radio.entry.941e407b.js → flip-radio.entry.35aa66f2.js} +8 -5
- package/dist/{flip-resource-list-file-item.entry.678596e2.js → flip-resource-list-file-item.entry.b56f8795.js} +1 -1
- package/dist/{flip-search.entry.05617d72.js → flip-search.entry.cb0d0faa.js} +1 -1
- package/dist/flip-select.entry.67d74a11.js +48 -0
- package/dist/{flip-stack.entry.60b7e7d8.js → flip-stack.entry.b7e0326d.js} +1 -1
- package/dist/{flip-switch.entry.51a1856d.js → flip-switch.entry.a5b1c2c6.js} +1 -1
- package/dist/{flip-tab.entry.fd12f894.js → flip-tab.entry.97e217ad.js} +1 -1
- package/dist/{flip-tabs.entry.9462dbaa.js → flip-tabs.entry.ad810ab3.js} +1 -1
- package/dist/{flip-tag.entry.923d754e.js → flip-tag.entry.8d4916e7.js} +1 -1
- package/dist/flip-text-input.entry.b963e731.js +60 -0
- package/dist/{flip-theme-provider.entry.ab641668.js → flip-theme-provider.entry.d5dd8213.js} +1 -1
- package/dist/{flip-thumbnail.entry.9d00d2f8.js → flip-thumbnail.entry.5f5e44d2.js} +1 -1
- package/dist/{flip-toast-provider.entry.d0391c9a.js → flip-toast-provider.entry.4c55da45.js} +5 -3
- package/dist/{flip-toast.entry.fac8df58.js → flip-toast.entry.c306c0f6.js} +1 -1
- package/dist/{flip-tooltip.entry.f7d80b92.js → flip-tooltip.entry.4544c9e8.js} +2 -2
- package/dist/{flip-video-thumbnail.entry.f45c61bc.js → flip-video-thumbnail.entry.7e6a70de.js} +1 -1
- package/dist/{flip-visually-hidden.entry.1099adf3.js → flip-visually-hidden.entry.59b6f888.js} +1 -1
- package/dist/index.ac96d2b2.js +1368 -0
- package/dist/stencil-generated/index.d.ts +8 -0
- package/dist/swirl-components-react.js +145 -137
- package/dist/swirl-components-react.umd.cjs +56 -37
- package/dist/utils-39b2afe8.37b54ba4.js +40 -0
- package/package.json +2 -2
- package/dist/flip-avatar.entry.7be29e5c.js +0 -57
- package/dist/flip-badge.entry.bb0eb78d.js +0 -20
- package/dist/flip-empty-state.entry.d125feea.js +0 -15
- package/dist/flip-file-viewer.entry.66629b65.js +0 -95
- package/dist/flip-form-control.entry.c45d4428.js +0 -58
- package/dist/flip-heading.entry.b20bb368.js +0 -18
- package/dist/flip-icon-add.entry.a04d115d.js +0 -15
- package/dist/flip-icon-cancel.entry.07a0efa7.js +0 -15
- package/dist/flip-icon-check-small.entry.1da0f061.js +0 -15
- package/dist/flip-icon-fullscreen-exit.entry.4f7369df.js +0 -15
- package/dist/flip-icon-fullscreen.entry.fe6d6998.js +0 -15
- package/dist/flip-icon-remove.entry.7ce5335b.js +0 -15
- package/dist/flip-option-list-item.entry.ed931c3c.js +0 -30
- package/dist/flip-option-list.entry.a07fd2d3.js +0 -95
- package/dist/flip-resource-list-item.entry.3ba2f6c5.js +0 -41
- package/dist/flip-resource-list.entry.b5f4d108.js +0 -49
- package/dist/flip-text-input.entry.09a6024a.js +0 -55
- package/dist/flip-text.entry.634f95b3.js +0 -18
- package/dist/index.0ccdd659.js +0 -1360
- package/dist/utils-b46bcd4f.79126bb2.js +0 -30
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { r as m, c as s, h as n, H as v, g as f } from "./index.ac96d2b2.js";
|
|
2
|
+
import { o as a, s as p, f as u, c as g, a as b } from "./floating-ui.dom.esm-1a4e8b8a.87557233.js";
|
|
3
|
+
import { e as l, d as y } from "./bodyScrollLock.esm-ce6356d8.2c600fb9.js";
|
|
4
|
+
import { c as k } from "./index-6d2e18c6.289636d4.js";
|
|
5
|
+
import { i as c, q as d } from "./utils-39b2afe8.37b54ba4.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
9
|
+
const _ = ":host{position:relative;z-index:var(--s-z-40);display:inline-flex}:host *{box-sizing:border-box}.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:0.15s popover-fade-in;animation:0.15s popover-fade-in}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:none;animation:none}}.popover--active:not(.popover--closing) .popover__content{-webkit-animation:0.15s popover-slide-in;animation:0.15s popover-slide-in}@media (min-width: 768px){.popover--active:not(.popover--closing) .popover__content{transform-origin:top left;-webkit-animation:0.15s popover-fade-scale-in-xy;animation:0.15s popover-fade-scale-in-xy}}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__content{-webkit-animation:none;animation:none}}.popover--closing .popover__backdrop{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (prefers-reduced-motion){.popover--closing .popover__backdrop{-webkit-animation:none;animation:none}}.popover--closing .popover__content{-webkit-animation:0.15s popover-slide-out;animation:0.15s popover-slide-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 768px){.popover--closing .popover__content{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out}}@media (prefers-reduced-motion){.popover--closing .popover__content{-webkit-animation:none;animation:none}}.popover--inactive .popover__content{display:none}@media (min-width: 768px){.popover--animation-scale-in-y.popover--active:not(.popover--closing) .popover__content{-webkit-animation:0.15s popover-fade-scale-in-y;animation:0.15s popover-fade-scale-in-y}}@media (prefers-reduced-motion){.popover--animation-scale-in-y.popover--active:not(.popover--closing) .popover__content{-webkit-animation:none;animation:none}}.popover__backdrop{position:fixed;z-index:0;background-color:rgba(0, 0, 0, 0.2);-webkit-animation:0.15s popover-backdrop-fade-in;animation:0.15s popover-backdrop-fade-in;inset:0}@media (prefers-reduced-motion){.popover__backdrop{-webkit-animation:none;animation:none}}@media (min-width: 768px){.popover__backdrop{display:none}}.popover__content{position:fixed;z-index:2;right:0;bottom:0;left:0;overflow:hidden;border-top-left-radius:var(--s-border-radius-xl);border-top-right-radius:var(--s-border-radius-xl);background-color:var(--s-surface-overlay-default)}@media (min-width: 768px){.popover__content{right:unset;bottom:unset;left:unset;max-width:22.5rem;border-radius:var(--s-border-radius-sm);-webkit-animation:none;animation:none;box-shadow:0.125rem 0.25rem 2.5rem rgba(0, 0, 0, 0.14)}}.popover__scroll-container{overflow-x:hidden;overflow-y:auto;width:100%;max-height:90vh;padding-top:var(--s-space-24);padding-bottom:var(--s-space-24);overscroll-behavior:contain}@media (min-width: 768px){.popover__scroll-container{max-height:22rem;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8)}}.popover__handle{position:absolute;top:var(--s-space-8);left:50%;width:2.5rem;height:0.375rem;border-radius:0.1875rem;background-color:var(--s-border-default);transform:translatex(-50%)}@media (min-width: 768px){.popover__handle{display:none}}@-webkit-keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes popover-fade-scale-in-xy{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popover-fade-scale-in-xy{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@-webkit-keyframes popover-fade-scale-in-y{from{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}@keyframes popover-fade-scale-in-y{from{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}", w = class {
|
|
10
|
+
constructor(o) {
|
|
11
|
+
m(this, o), this.popoverClose = s(this, "popoverClose", 7), this.popoverOpen = s(this, "popoverOpen", 7), this.animation = "scale-in-xy", this.enableFlip = !0, this.offset = 8, this.placement = "bottom-start", this.active = !1, this.closing = !1, this.toggle = (e) => {
|
|
12
|
+
e.stopPropagation(), this.active ? this.close() : this.open();
|
|
13
|
+
}, this.onKeydown = (e) => {
|
|
14
|
+
e.code === "Escape" && this.active && this.close();
|
|
15
|
+
}, this.reposition = async () => {
|
|
16
|
+
const e = c();
|
|
17
|
+
if (!Boolean(this.triggerEl) || !Boolean(this.contentContainer))
|
|
18
|
+
return;
|
|
19
|
+
if (e) {
|
|
20
|
+
this.position = void 0;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const t = typeof this.offset == "number" ? { mainAxis: this.offset, crossAxis: 0 } : { mainAxis: this.offset[0], crossAxis: this.offset[1] }, i = this.enableFlip ? [a(t), p(), u()] : [a(t), p()];
|
|
24
|
+
this.position = await g(this.triggerEl, this.contentContainer, {
|
|
25
|
+
middleware: i,
|
|
26
|
+
placement: this.placement,
|
|
27
|
+
strategy: "fixed"
|
|
28
|
+
});
|
|
29
|
+
}, this.onCloseButtonClick = () => {
|
|
30
|
+
this.close();
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
componentDidLoad() {
|
|
34
|
+
this.connectTrigger(), this.updateFocusableChildren(), this.updateTriggerAttributes();
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
l(this.scrollContainer);
|
|
38
|
+
}
|
|
39
|
+
onWindowFocusIn(o) {
|
|
40
|
+
if (!this.active)
|
|
41
|
+
return;
|
|
42
|
+
const e = o.target;
|
|
43
|
+
!this.el.contains(e) && this.close();
|
|
44
|
+
}
|
|
45
|
+
onWindowClick(o) {
|
|
46
|
+
if (!this.active)
|
|
47
|
+
return;
|
|
48
|
+
const e = o.target, t = this.el.contains(e), i = o.composedPath().some((r) => Boolean(r) && r instanceof Node ? this.el.contains(r) : !1), h = o.target === this.triggerEl;
|
|
49
|
+
!t && !i && !h && this.close();
|
|
50
|
+
}
|
|
51
|
+
async close() {
|
|
52
|
+
var o;
|
|
53
|
+
this.closing || !this.active || (this.popoverClose.emit(), this.disableAutoUpdate && this.disableAutoUpdate(), this.closing = !0, setTimeout(() => {
|
|
54
|
+
this.active = !1, this.closing = !1, this.updateTriggerAttributes();
|
|
55
|
+
}, 150), this.unlockBodyScroll(), (o = this.getNativeTriggerElement()) === null || o === void 0 || o.focus());
|
|
56
|
+
}
|
|
57
|
+
async open() {
|
|
58
|
+
this.active || (this.adjustWidth(), this.active = !0, this.popoverOpen.emit(), this.updateFocusableChildren(), this.updateTriggerAttributes(), requestAnimationFrame(async () => {
|
|
59
|
+
await this.reposition(), this.focusableChildren.length > 0 ? this.focusableChildren[0].focus() : this.contentContainer.focus(), this.disableAutoUpdate && this.disableAutoUpdate(), this.disableAutoUpdate = b(this.triggerEl, this.contentContainer, this.reposition), this.scrollContainer.scrollTop = 0, this.lockBodyScroll();
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
connectTrigger() {
|
|
63
|
+
this.triggerEl = d(document.body, `#${this.trigger}`)[0], Boolean(this.triggerEl) && this.triggerEl.addEventListener("click", (o) => {
|
|
64
|
+
this.toggle(o);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getNativeTriggerElement() {
|
|
68
|
+
var o, e, t;
|
|
69
|
+
return this.triggerEl.tagName.startsWith("FLIP-") ? ((o = this.triggerEl) === null || o === void 0 ? void 0 : o.children[0]) || ((t = (e = this.triggerEl) === null || e === void 0 ? void 0 : e.shadowRoot) === null || t === void 0 ? void 0 : t.children[0]) || this.triggerEl : this.triggerEl;
|
|
70
|
+
}
|
|
71
|
+
updateTriggerAttributes() {
|
|
72
|
+
if (!Boolean(this.triggerEl))
|
|
73
|
+
return;
|
|
74
|
+
const o = this.getNativeTriggerElement();
|
|
75
|
+
o.setAttribute("aria-controls", this.popoverId), o.setAttribute("aria-expanded", String(this.active)), o.setAttribute("aria-haspopup", "dialog");
|
|
76
|
+
}
|
|
77
|
+
updateFocusableChildren() {
|
|
78
|
+
this.focusableChildren = d(this.el, '[role="menuitem"], [role="listbox"]');
|
|
79
|
+
}
|
|
80
|
+
adjustWidth() {
|
|
81
|
+
let o = this.useContainerWidth;
|
|
82
|
+
[!0, "true"].includes(this.useContainerWidth) ? o = !0 : [!1, "false"].includes(this.useContainerWidth) && (o = !1);
|
|
83
|
+
const e = !window.matchMedia("(min-width: 768px)").matches;
|
|
84
|
+
if (Boolean(o) && !e) {
|
|
85
|
+
const t = typeof o == "string" ? this.el.closest(o) || this.el.parentElement : this.el.parentElement;
|
|
86
|
+
this.contentContainer.style.maxWidth = "none", this.contentContainer.style.width = t.getBoundingClientRect().width + "px";
|
|
87
|
+
} else
|
|
88
|
+
this.contentContainer.style.maxWidth = "", this.contentContainer.style.width = "";
|
|
89
|
+
}
|
|
90
|
+
lockBodyScroll() {
|
|
91
|
+
!c() || y(this.scrollContainer);
|
|
92
|
+
}
|
|
93
|
+
unlockBodyScroll() {
|
|
94
|
+
l(this.scrollContainer);
|
|
95
|
+
}
|
|
96
|
+
render() {
|
|
97
|
+
var o, e;
|
|
98
|
+
const t = k("popover", `popover--animation-${this.animation}`, {
|
|
99
|
+
"popover--closing": this.closing,
|
|
100
|
+
"popover--active": this.active,
|
|
101
|
+
"popover--inactive": !this.active
|
|
102
|
+
});
|
|
103
|
+
return n(v, { id: this.popoverId }, n("div", { class: t, onKeyDown: this.onKeydown }, n("div", { "aria-hidden": this.active ? "false" : "true", "aria-label": this.label, class: "popover__content", role: "dialog", ref: (i) => this.contentContainer = i, style: {
|
|
104
|
+
top: Boolean(this.position) ? `${(o = this.position) === null || o === void 0 ? void 0 : o.y}px` : "",
|
|
105
|
+
left: Boolean(this.position) ? `${(e = this.position) === null || e === void 0 ? void 0 : e.x}px` : ""
|
|
106
|
+
}, tabindex: "-1" }, n("span", { class: "popover__handle" }), n("div", { class: "popover__scroll-container", ref: (i) => this.scrollContainer = i }, n("slot", null))), this.active && n("div", { class: "popover__backdrop", onClick: this.onCloseButtonClick })));
|
|
107
|
+
}
|
|
108
|
+
get el() {
|
|
109
|
+
return f(this);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
w.style = _;
|
|
113
|
+
export {
|
|
114
|
+
w as flip_popover
|
|
115
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as o, c as s, h as r, H as l, g as n } from "./index.
|
|
1
|
+
import { r as o, c as s, h as r, H as l, g as n } from "./index.ac96d2b2.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
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-12)}", d = class {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { r as s, c as l, h as i, H as c } from "./index.
|
|
1
|
+
import { r as s, c as l, h as i, H as c } from "./index.ac96d2b2.js";
|
|
2
2
|
import { c as t } from "./index-6d2e18c6.289636d4.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
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),
|
|
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)
|
|
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)}.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-8);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 {
|
|
8
8
|
constructor(a) {
|
|
9
9
|
s(this, a), this.valueChange = l(this, "valueChange", 7), this.checked = !1, this.disabled = !1, this.onChange = () => {
|
|
10
10
|
this.checked = !0, this.valueChange.emit(this.value);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
+
getAriaCheckedLabel(a, r) {
|
|
14
|
+
return a ? "true" : r ? "false" : "mixed";
|
|
15
|
+
}
|
|
13
16
|
render() {
|
|
14
|
-
const a = this.checked === !1 || this.checked === "false", r = this.checked === !0 || this.checked === "true", o = r
|
|
17
|
+
const a = this.checked === !1 || this.checked === "false", r = this.checked === !0 || this.checked === "true", o = this.getAriaCheckedLabel(r, a), d = this.invalid, e = t("radio", {
|
|
15
18
|
"radio--checked": r,
|
|
16
19
|
"radio--disabled": this.disabled,
|
|
17
20
|
"radio--invalid": this.invalid,
|
|
@@ -20,7 +23,7 @@ const n = `.sc-flip-radio-h{display:inline-flex}.sc-flip-radio-h *.sc-flip-radio
|
|
|
20
23
|
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))));
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
h.style = n;
|
|
24
27
|
export {
|
|
25
|
-
|
|
28
|
+
h as flip_radio
|
|
26
29
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { r as n, c, h as e, H as r, g as p } from "./index.ac96d2b2.js";
|
|
2
|
+
import { c as d } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
+
import { q as h } from "./utils-39b2afe8.37b54ba4.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
7
|
+
const u = ".sc-flip-select-h{display:block;width:100%}.sc-flip-select-h *.sc-flip-select{box-sizing:border-box}.select.sc-flip-select{position:relative;display:flex;width:100%}.select--disabled.sc-flip-select .select__label.sc-flip-select{color:var(--s-text-disabled)}.select--disabled.sc-flip-select .select__indicator.sc-flip-select{color:var(--s-icon-disabled)}.select__label.sc-flip-select{display:block;overflow:hidden;width:100%;height:1.375rem;margin:0;padding:0;padding-right:calc(1.5rem + var(--s-space-8));border:none;background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:left;white-space:nowrap;text-overflow:ellipsis;cursor:default}.select__label.sc-flip-select:focus{outline:none}.select__indicator.sc-flip-select{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;color:var(--s-icon-default)}", f = class {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
n(this, t), this.valueChange = c(this, "valueChange", 7), this.options = [], this.select = (i) => {
|
|
10
|
+
this.value = i.detail, this.valueChange.emit(this.value), this.multiSelect || this.popover.close();
|
|
11
|
+
}, this.onSlotChange = () => {
|
|
12
|
+
this.updateOptions();
|
|
13
|
+
}, this.onOpen = () => {
|
|
14
|
+
this.open = !0;
|
|
15
|
+
}, this.onClose = () => {
|
|
16
|
+
this.open = !1;
|
|
17
|
+
}, this.onKeyDown = (i) => {
|
|
18
|
+
(i.code === "Space" || i.code === "Enter") && (i.preventDefault(), this.popover.open());
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
queueMicrotask(() => {
|
|
23
|
+
this.updateOptions();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
onWindowFocusIn(t) {
|
|
27
|
+
t.target === this.el.querySelector("input") && t.stopImmediatePropagation();
|
|
28
|
+
}
|
|
29
|
+
updateOptions() {
|
|
30
|
+
this.options = h(this.el, "flip-option-list-item");
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
const t = Boolean(this.value) ? this.value.map((s) => {
|
|
34
|
+
var l;
|
|
35
|
+
return (l = this.options.find((a) => a.value === s)) === null || l === void 0 ? void 0 : l.label;
|
|
36
|
+
}).join(", ") : "", i = this.invalid === !0 || this.invalid === !1 ? String(this.invalid) : void 0, o = d("select", {
|
|
37
|
+
"select--disabled": this.disabled
|
|
38
|
+
});
|
|
39
|
+
return e(r, { onKeyDown: this.onKeyDown }, e("div", { class: o }, e("input", { "aria-describedby": this.flipAriaDescribedby, "aria-disabled": this.disabled ? "true" : void 0, "aria-invalid": i, class: "select__label", disabled: this.disabled, id: "trigger", readOnly: !0, type: "text", value: t }), e("span", { class: "select__indicator" }, this.open ? e("flip-icon-expand-less", null) : e("flip-icon-expand-more", null)), e("flip-popover", { animation: "scale-in-y", class: "select__popover", enableFlip: !1, label: this.label, offset: [16, -16], onPopoverClose: this.onClose, onPopoverOpen: this.onOpen, popoverId: "select-options", ref: (s) => this.popover = s, trigger: "trigger", useContainerWidth: "flip-form-control" }, e("flip-option-list", { onValueChange: this.select, multiSelect: this.multiSelect, value: this.value }, e("slot", { onSlotchange: this.onSlotChange })))));
|
|
40
|
+
}
|
|
41
|
+
get el() {
|
|
42
|
+
return p(this);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
f.style = u;
|
|
46
|
+
export {
|
|
47
|
+
f as flip_select
|
|
48
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as h, c as n, h as i, H as c } from "./index.ac96d2b2.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,.text-input--type-number.sc-flip-text-input,.text-input--type-password.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--disable-dynamic-width.sc-flip-text-input input.text-input__input.sc-flip-text-input:not([type="password"]){width:100%;min-width:0}.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
|
+
h(this, s), this.inputBlur = n(this, "inputBlur", 7), this.inputFocus = n(this, "inputFocus", 7), this.valueChange = n(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 = (t) => {
|
|
11
|
+
const e = t.target;
|
|
12
|
+
this.value = e.value, this.valueChange.emit(e.value);
|
|
13
|
+
}, this.onBlur = (t) => {
|
|
14
|
+
this.inputBlur.emit(t);
|
|
15
|
+
}, this.onFocus = (t) => {
|
|
16
|
+
this.inputFocus.emit(t), this.handleAutoSelect(t);
|
|
17
|
+
}, this.onInput = (t) => {
|
|
18
|
+
this.onChange(t);
|
|
19
|
+
}, this.onKeyPress = (t) => {
|
|
20
|
+
this.type === "number" && ["+", "-", "e"].includes(t.key) && t.preventDefault();
|
|
21
|
+
}, this.decreaseValue = () => {
|
|
22
|
+
if (this.type !== "number")
|
|
23
|
+
return;
|
|
24
|
+
const t = this.step || 1;
|
|
25
|
+
let e = this.inputEl.valueAsNumber;
|
|
26
|
+
isNaN(this.inputEl.valueAsNumber) && (e = this.min !== void 0 ? this.min + 1 : 1), this.value = String(Math.max(this.min || -1 / 0, e - t)), this.valueChange.emit(this.value);
|
|
27
|
+
}, this.increaseValue = () => {
|
|
28
|
+
if (this.type !== "number")
|
|
29
|
+
return;
|
|
30
|
+
const t = this.step || 1;
|
|
31
|
+
let e = this.inputEl.valueAsNumber;
|
|
32
|
+
isNaN(this.inputEl.valueAsNumber) && (e = this.min !== void 0 ? this.min - 1 : -1), this.value = String(Math.min(this.max || 1 / 0, e + t)), this.valueChange.emit(this.value);
|
|
33
|
+
}, this.togglePassword = () => {
|
|
34
|
+
this.type === "password" && (this.showPassword = !this.showPassword);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
componentDidRender() {
|
|
38
|
+
this.adjustInputSize();
|
|
39
|
+
}
|
|
40
|
+
adjustInputSize() {
|
|
41
|
+
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.disableDynamicWidth && (this.inputEl.style.width = this.inputEl.scrollWidth / 16 + "rem"));
|
|
42
|
+
}
|
|
43
|
+
handleAutoSelect(s) {
|
|
44
|
+
!this.autoSelect || s.target.select();
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
var s;
|
|
48
|
+
const t = this.rows === 1 ? "input" : "textarea", e = this.invalid === !0 || this.invalid === !1 ? String(this.invalid) : void 0, a = this.type === "number" && !this.disabled, l = this.type === "password" && !this.disabled, p = this.clearable && !this.disabled && Boolean(this.value) && !l && !a && !this.showCharacterCounter, u = this.type === "password" && this.showPassword ? "text" : this.type, o = d("text-input", `text-input--type-${this.type}`, {
|
|
49
|
+
"text-input--clearable": this.clearable,
|
|
50
|
+
"text-input--disabled": this.disabled,
|
|
51
|
+
"text-input--disable-dynamic-width": this.disableDynamicWidth,
|
|
52
|
+
"text-input--show-password": this.type === "password" && this.showPassword
|
|
53
|
+
});
|
|
54
|
+
return i(c, null, i("div", { class: o }, this.prefixLabel && i("span", { class: "text-input__prefix" }, this.prefixLabel), i(t, { "aria-autocomplete": this.flipAriaAutocomplete, "aria-controls": this.flipAriaControls, "aria-describedby": this.flipAriaDescribedby, "aria-disabled": this.disabled ? "true" : void 0, "aria-expanded": this.flipAriaExpanded, "aria-invalid": e, 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, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyPress: this.onKeyPress, ref: (r) => this.inputEl = r, required: this.required, role: this.flipRole, 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 && i("span", { class: "text-input__suffix" }, this.suffixLabel), p && i("button", { "aria-label": this.clearButtonLabel, class: "text-input__clear-button", onClick: this.clear, type: "button" }, i("flip-icon-cancel", null)), l && i("button", { "aria-label": this.passwordToggleLabel, class: "text-input__password-toggle", onClick: this.togglePassword, type: "button" }, this.showPassword ? i("flip-icon-visibility-off", null) : i("flip-icon-visibility", null)), a && i("span", { class: "text-input__stepper" }, i("button", { "aria-hidden": "true", class: "text-input__step-button", onClick: this.increaseValue, tabIndex: -1, type: "button" }, i("flip-icon-expand-less", null)), i("button", { "aria-hidden": "true", class: "text-input__step-button", onClick: this.decreaseValue, tabIndex: -1, type: "button" }, i("flip-icon-expand-more", null))), this.showCharacterCounter && i("span", { class: "text-input__character-counter" }, ((s = this.value) === null || s === void 0 ? void 0 : s.length) || 0, " ", Boolean(this.maxLength) ? `/ ${this.maxLength}` : "")));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
f.style = x;
|
|
58
|
+
export {
|
|
59
|
+
f as flip_text_input
|
|
60
|
+
};
|
package/dist/{flip-toast-provider.entry.d0391c9a.js → flip-toast-provider.entry.4c55da45.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r, h as a, H as
|
|
1
|
+
import { r, h as a, H as e } from "./index.ac96d2b2.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const l = class {
|
|
@@ -16,11 +16,13 @@ const l = class {
|
|
|
16
16
|
async toast(t) {
|
|
17
17
|
if (this.toasts.some((o) => o.toastId === t.toastId))
|
|
18
18
|
return;
|
|
19
|
-
|
|
19
|
+
let s = this.globalDuration;
|
|
20
|
+
this.globalDuration === void 0 ? s = t.duration : this.globalDuration === 0 && (s = void 0);
|
|
21
|
+
const i = Object.assign(Object.assign({}, t), { createdAt: new Date(), duration: s, toastId: t.toastId || String(Math.round(Math.random() * 1e4)) });
|
|
20
22
|
return this.toasts = [...this.toasts, i], i;
|
|
21
23
|
}
|
|
22
24
|
render() {
|
|
23
|
-
return a(
|
|
25
|
+
return a(e, { role: "status" }, a("flip-stack", { spacing: "12" }, this.toasts.map((t) => a("flip-toast", Object.assign({ key: t.toastId, onDismiss: this.onDismiss }, t)))));
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as n, h as o, H as l } from "./index.
|
|
1
|
+
import { r as n, h as o, H as l } from "./index.ac96d2b2.js";
|
|
2
2
|
import { c as r, o as p, s as h, f as d } from "./floating-ui.dom.esm-1a4e8b8a.87557233.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const c = ":host{display:inline-flex}:host *{box-sizing:border-box}.tooltip{display:inline-flex}.tooltip .tooltip__reference{display:inline-flex}.tooltip__popper{position:fixed;z-index:var(--s-z-40);max-width:17.5rem}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);-webkit-animation:tooltip-fade-in 0.1s;animation:tooltip-fade-in 0.1s
|
|
5
|
+
const c = ":host{display:inline-flex}:host *{box-sizing:border-box}.tooltip{display:inline-flex}.tooltip .tooltip__reference{display:inline-flex}.tooltip__popper{position:fixed;z-index:var(--s-z-40);max-width:17.5rem}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);-webkit-animation:tooltip-fade-in 0.1s;animation:tooltip-fade-in 0.1s}.tooltip__arrow{position:absolute;width:0.5rem;height:0.5rem;background-color:var(--s-surface-neutral-default)}@-webkit-keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}@keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}", u = class {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
n(this, e), this.delay = 300, this.position = "top", this.visible = !1, this.onKeydown = (t) => {
|
|
8
8
|
t.code === "Escape" && this.hide();
|
package/dist/{flip-visually-hidden.entry.1099adf3.js → flip-visually-hidden.entry.59b6f888.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r, h as i, H as l } from "./index.
|
|
1
|
+
import { r, h as i, H as l } from "./index.ac96d2b2.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const t = ":host{position:absolute;display:inline;overflow:hidden;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;word-wrap:normal;clip:rect(0, 0, 0, 0)}", o = class {
|