@getflip/swirl-components-react 0.4.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.07628dad.js → file-manager.entry.5df78d98.js} +1 -1
- package/dist/{flip-action-list-item.entry.a330605c.js → flip-action-list-item.entry.080e14b7.js} +1 -1
- package/dist/{flip-action-list-section.entry.19091d98.js → flip-action-list-section.entry.59cc892d.js} +1 -1
- package/dist/{flip-action-list.entry.319f0192.js → flip-action-list.entry.34dd165b.js} +1 -1
- package/dist/{flip-app-layout_5.entry.ac01996d.js → flip-app-layout_5.entry.20b263f5.js} +16 -16
- package/dist/{flip-autocomplete.entry.21deedf2.js → flip-autocomplete.entry.a63ad331.js} +1 -1
- package/dist/{flip-avatar-group.entry.c2cc9526.js → flip-avatar-group.entry.e00bcff1.js} +1 -1
- package/dist/{flip-avatar.entry.7034b888.js → flip-avatar.entry.32cb98bf.js} +1 -1
- package/dist/{flip-badge.entry.bc935c62.js → flip-badge.entry.63e2d414.js} +1 -1
- package/dist/{flip-banner.entry.d257835c.js → flip-banner.entry.a2f5eef8.js} +1 -1
- package/dist/{flip-button-group.entry.8ce7a3d4.js → flip-button-group.entry.7856eb4f.js} +1 -1
- package/dist/{flip-button.entry.eb07eb8a.js → flip-button.entry.82de4159.js} +12 -6
- package/dist/{flip-checkbox.entry.43a3832e.js → flip-checkbox.entry.4af2f2b4.js} +10 -7
- package/dist/{flip-chip.entry.a479c5b0.js → flip-chip.entry.9e153968.js} +1 -1
- package/dist/flip-console-layout.entry.940ff9f8.js +22 -0
- package/dist/{flip-date-input.entry.b98d662b.js → flip-date-input.entry.dce529bc.js} +6 -4
- package/dist/{flip-date-picker_2.entry.c2143459.js → flip-date-picker_2.entry.177499d7.js} +105 -103
- package/dist/{flip-description-list-item.entry.f1db6930.js → flip-description-list-item.entry.efd60d4e.js} +1 -1
- package/dist/{flip-description-list.entry.0e214ec2.js → flip-description-list.entry.28fc026b.js} +1 -1
- package/dist/{flip-dialog.entry.24f62804.js → flip-dialog.entry.1f35195b.js} +1 -1
- package/dist/{flip-file-uploader.entry.91b6ca52.js → flip-file-uploader.entry.3888ef19.js} +1 -1
- package/dist/{flip-file-viewer_7.entry.47a4ee0d.js → flip-file-viewer_7.entry.098a3dac.js} +2 -2
- package/dist/flip-form-control.entry.8a1150c0.js +65 -0
- package/dist/{flip-form-group.entry.89c2a7a6.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.b5415432.js → flip-icon-add-photo.entry.4a5cdf22.js} +1 -1
- package/dist/{flip-icon-add_4.entry.b525e436.js → flip-icon-add_4.entry.890da8d3.js} +1 -1
- package/dist/{flip-icon-admin-panel-settings.entry.e416caa2.js → flip-icon-admin-panel-settings.entry.29420ba1.js} +1 -1
- package/dist/{flip-icon-arrow-back.entry.3b24c3c4.js → flip-icon-arrow-back.entry.c75093f3.js} +1 -1
- package/dist/{flip-icon-arrow-forward.entry.c3577622.js → flip-icon-arrow-forward.entry.a5ba53d2.js} +1 -1
- package/dist/{flip-icon-arrow-left_3.entry.0e8c6ffd.js → flip-icon-arrow-left_3.entry.492c928f.js} +1 -1
- package/dist/{flip-icon-arrow-right-small.entry.36a480f8.js → flip-icon-arrow-right-small.entry.d977647f.js} +1 -1
- package/dist/{flip-icon-attachment.entry.d44215f9.js → flip-icon-attachment.entry.33509693.js} +1 -1
- package/dist/{flip-icon-cancel_4.entry.90ff0e73.js → flip-icon-cancel_4.entry.c7533bde.js} +1 -1
- package/dist/{flip-icon-chat-bubble.entry.b8022c94.js → flip-icon-chat-bubble.entry.796b792b.js} +1 -1
- package/dist/{flip-icon-check-circle.entry.b59a0f63.js → flip-icon-check-circle.entry.942c13d5.js} +1 -1
- package/dist/{flip-icon-check-small_3.entry.fd9f691c.js → flip-icon-check-small_3.entry.0b74d78c.js} +10 -12
- package/dist/{flip-icon-check-strong.entry.cab3e061.js → flip-icon-check-strong.entry.f072021d.js} +1 -1
- package/dist/{flip-icon-check.entry.f6231fc3.js → flip-icon-check.entry.e4c5c94a.js} +1 -1
- package/dist/{flip-icon-chevron-left.entry.cd972c85.js → flip-icon-chevron-left.entry.65b612e3.js} +1 -1
- package/dist/{flip-icon-chevron-right.entry.b96a1ead.js → flip-icon-chevron-right.entry.0ea10200.js} +1 -1
- package/dist/{flip-icon-close-small.entry.292f402f.js → flip-icon-close-small.entry.cccd694a.js} +1 -1
- package/dist/{flip-icon-close.entry.a52651ec.js → flip-icon-close.entry.cf4afdfd.js} +1 -1
- package/dist/{flip-icon-cloud-upload.entry.8c3de009.js → flip-icon-cloud-upload.entry.8f2ba9c7.js} +1 -1
- package/dist/{flip-icon-comment.entry.68e5198c.js → flip-icon-comment.entry.bd9871c6.js} +1 -1
- package/dist/{flip-icon-copy.entry.ea55301c.js → flip-icon-copy.entry.1b311d2c.js} +1 -1
- package/dist/{flip-icon-date-range.entry.78991d34.js → flip-icon-date-range.entry.20ae3be8.js} +1 -1
- package/dist/{flip-icon-delete.entry.addf184d.js → flip-icon-delete.entry.91cce4b6.js} +1 -1
- package/dist/{flip-icon-description.entry.7688a64f.js → flip-icon-description.entry.1e861585.js} +1 -1
- package/dist/{flip-icon-edit.entry.5df4b598.js → flip-icon-edit.entry.6ce0adc0.js} +1 -1
- package/dist/{flip-icon-emoji-mood.entry.7772f2da.js → flip-icon-emoji-mood.entry.26ff5f4c.js} +1 -1
- package/dist/{flip-icon-emoji-satisfied.entry.3f11571c.js → flip-icon-emoji-satisfied.entry.c5964eb2.js} +1 -1
- package/dist/{flip-icon-error_3.entry.6d22b7a2.js → flip-icon-error_3.entry.ed9ea2ba.js} +1 -1
- package/dist/{flip-icon-expand-more.entry.2ffa6f0c.js → flip-icon-expand-more.entry.dfe65dc1.js} +1 -1
- package/dist/{flip-icon-file.entry.517a75cc.js → flip-icon-file.entry.1337f4a3.js} +1 -1
- package/dist/{flip-icon-folder-shared.entry.661494c2.js → flip-icon-folder-shared.entry.d729af99.js} +1 -1
- package/dist/{flip-icon-group-assign.entry.8131eb64.js → flip-icon-group-assign.entry.1b26fbcc.js} +1 -1
- package/dist/{flip-icon-groups-custom.entry.f0086123.js → flip-icon-groups-custom.entry.f1691911.js} +1 -1
- package/dist/{flip-icon-groups.entry.2e076144.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.d0482319.js → flip-icon-image.entry.ed9e7cea.js} +1 -1
- package/dist/{flip-icon-info.entry.d16cf109.js → flip-icon-info.entry.7ecf555e.js} +1 -1
- package/dist/{flip-icon-inventory.entry.a209dd1e.js → flip-icon-inventory.entry.3dfdaf9f.js} +1 -1
- package/dist/{flip-icon-like.entry.631333f8.js → flip-icon-like.entry.0cc26e51.js} +1 -1
- package/dist/{flip-icon-link.entry.b67ce56a.js → flip-icon-link.entry.4a62a637.js} +1 -1
- package/dist/{flip-icon-lock.entry.13f8fa54.js → flip-icon-lock.entry.de97d106.js} +1 -1
- package/dist/{flip-icon-logout.entry.79b91644.js → flip-icon-logout.entry.551dbbfc.js} +1 -1
- package/dist/{flip-icon-mail.entry.62265dc6.js → flip-icon-mail.entry.8f23d662.js} +1 -1
- package/dist/{flip-icon-manage-accounts.entry.e821e9df.js → flip-icon-manage-accounts.entry.587cc1f2.js} +1 -1
- package/dist/{flip-icon-mention.entry.09ac190a.js → flip-icon-mention.entry.dea7e9bd.js} +1 -1
- package/dist/{flip-icon-message.entry.06934900.js → flip-icon-message.entry.661d3f8b.js} +1 -1
- package/dist/{flip-icon-more-horizontal.entry.d1d97d3d.js → flip-icon-more-horizontal.entry.e1b56167.js} +1 -1
- package/dist/{flip-icon-more-vertikal.entry.d40ca8b0.js → flip-icon-more-vertikal.entry.c8c2faf5.js} +1 -1
- package/dist/{flip-icon-notifications-active.entry.c38ee4bb.js → flip-icon-notifications-active.entry.17e2db26.js} +1 -1
- package/dist/{flip-icon-notifications-off.entry.02743a47.js → flip-icon-notifications-off.entry.fccd2c17.js} +1 -1
- package/dist/{flip-icon-notifications.entry.4f873bc3.js → flip-icon-notifications.entry.fd6974d0.js} +1 -1
- package/dist/{flip-icon-open-in-new.entry.cb673e42.js → flip-icon-open-in-new.entry.377230e7.js} +1 -1
- package/dist/{flip-icon-people-alt.entry.648a37d3.js → flip-icon-people-alt.entry.ff8dcfad.js} +1 -1
- package/dist/{flip-icon-person-off.entry.3bc3e587.js → flip-icon-person-off.entry.c1046231.js} +1 -1
- package/dist/{flip-icon-person.entry.b269287a.js → flip-icon-person.entry.a8e33281.js} +1 -1
- package/dist/{flip-icon-phone.entry.89c67938.js → flip-icon-phone.entry.b13cd9db.js} +1 -1
- package/dist/{flip-icon-poll.entry.51bd2d6b.js → flip-icon-poll.entry.d4d7ab35.js} +1 -1
- package/dist/{flip-icon-print.entry.fcdc08c4.js → flip-icon-print.entry.e22c899f.js} +1 -1
- package/dist/{flip-icon-recieved.entry.e52d5907.js → flip-icon-recieved.entry.42365f6e.js} +1 -1
- package/dist/{flip-icon-search-strong.entry.f9f740dc.js → flip-icon-search-strong.entry.3e2df830.js} +1 -1
- package/dist/{flip-icon-search.entry.530eb22a.js → flip-icon-search.entry.307ecf81.js} +1 -1
- package/dist/{flip-icon-send.entry.1a1f6a9f.js → flip-icon-send.entry.d821277c.js} +1 -1
- package/dist/{flip-icon-settings.entry.05357f2b.js → flip-icon-settings.entry.39d549e4.js} +1 -1
- package/dist/{flip-icon-time-filled.entry.7dfefe00.js → flip-icon-time-filled.entry.59391c42.js} +1 -1
- package/dist/{flip-icon-time-outlined.entry.b309035e.js → flip-icon-time-outlined.entry.7828e49b.js} +1 -1
- package/dist/{flip-icon-user-assign.entry.b595047d.js → flip-icon-user-assign.entry.d015d6d1.js} +1 -1
- package/dist/{flip-icon-video-camera.entry.08411542.js → flip-icon-video-camera.entry.08b245ec.js} +1 -1
- package/dist/{flip-icon-warning.entry.5d5e3ce9.js → flip-icon-warning.entry.6646b827.js} +1 -1
- package/dist/{flip-lightbox.entry.d7a5b33f.js → flip-lightbox.entry.89522005.js} +1 -1
- package/dist/{flip-link.entry.5415c5a4.js → flip-link.entry.21826dcf.js} +1 -1
- package/dist/{flip-list.entry.5ffbd0ef.js → flip-list.entry.28ca3e9a.js} +1 -1
- package/dist/{flip-modal.entry.8f99c357.js → flip-modal.entry.9dc00a89.js} +1 -1
- package/dist/{flip-option-list-section.entry.1c46b667.js → flip-option-list-section.entry.8016c860.js} +1 -1
- package/dist/{flip-pagination.entry.44ba4122.js → flip-pagination.entry.5c31f8e5.js} +1 -1
- package/dist/{flip-pdf-reader.entry.4fba8eda.js → flip-pdf-reader.entry.79fd6e1f.js} +2 -2
- package/dist/flip-popover.entry.712ebb5b.js +115 -0
- package/dist/{flip-progress-indicator.entry.98300d84.js → flip-progress-indicator.entry.342c1c4c.js} +1 -1
- package/dist/{flip-radio-group.entry.3a737bc9.js → flip-radio-group.entry.ab35d743.js} +1 -1
- package/dist/{flip-radio.entry.45be80ff.js → flip-radio.entry.35aa66f2.js} +8 -5
- package/dist/{flip-resource-list-file-item.entry.380c5dbe.js → flip-resource-list-file-item.entry.b56f8795.js} +1 -1
- package/dist/{flip-search.entry.6805dae6.js → flip-search.entry.cb0d0faa.js} +1 -1
- package/dist/flip-select.entry.67d74a11.js +48 -0
- package/dist/{flip-stack.entry.c7c6570a.js → flip-stack.entry.b7e0326d.js} +1 -1
- package/dist/{flip-switch.entry.d92b7292.js → flip-switch.entry.a5b1c2c6.js} +1 -1
- package/dist/{flip-tab.entry.e7a1ab1a.js → flip-tab.entry.97e217ad.js} +1 -1
- package/dist/{flip-tabs.entry.16f909d5.js → flip-tabs.entry.ad810ab3.js} +1 -1
- package/dist/{flip-tag.entry.8622ab43.js → flip-tag.entry.8d4916e7.js} +1 -1
- package/dist/{flip-text-input.entry.326d7e72.js → flip-text-input.entry.b963e731.js} +10 -8
- package/dist/{flip-theme-provider.entry.bb6a10e3.js → flip-theme-provider.entry.d5dd8213.js} +1 -1
- package/dist/{flip-thumbnail.entry.7e078ff9.js → flip-thumbnail.entry.5f5e44d2.js} +1 -1
- package/dist/{flip-toast-provider.entry.442c1fb8.js → flip-toast-provider.entry.4c55da45.js} +5 -3
- package/dist/{flip-toast.entry.696f6bd2.js → flip-toast.entry.c306c0f6.js} +1 -1
- package/dist/{flip-tooltip.entry.0c1774a4.js → flip-tooltip.entry.4544c9e8.js} +2 -2
- package/dist/{flip-video-thumbnail.entry.b6b896d0.js → flip-video-thumbnail.entry.7e6a70de.js} +1 -1
- package/dist/{flip-visually-hidden.entry.58a19f2e.js → flip-visually-hidden.entry.59b6f888.js} +1 -1
- package/dist/index.ac96d2b2.js +1368 -0
- package/dist/stencil-generated/index.d.ts +3 -0
- package/dist/swirl-components-react.js +125 -122
- package/dist/swirl-components-react.umd.cjs +39 -36
- package/package.json +2 -2
- package/dist/flip-form-control.entry.82737412.js +0 -58
- package/dist/flip-heading.entry.00139b62.js +0 -18
- package/dist/flip-popover.entry.0f8879c7.js +0 -99
- package/dist/flip-text.entry.a01cf4bc.js +0 -18
- package/dist/index.b66ff9f0.js +0 -1365
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getflip/swirl-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@getflip/swirl-components": "^0.
|
|
21
|
+
"@getflip/swirl-components": "^0.6.0",
|
|
22
22
|
"react": "^18.2.0",
|
|
23
23
|
"react-dom": "^18.2.0"
|
|
24
24
|
},
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { r as e, h as t, H as i, g as l } from "./index.b66ff9f0.js";
|
|
2
|
-
import { c as n } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const a = ".sc-flip-form-control-h{display:block;width:100%}.sc-flip-form-control-h *.sc-flip-form-control{box-sizing:border-box}.form-control.sc-flip-form-control{display:block;width:100%;line-height:var(--s-line-height-sm)}.form-control.form-control--has-focus.sc-flip-form-control:not(.form-control--disabled) .form-control__label.sc-flip-form-control{border-color:var(--s-border-highlight);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.form-control.sc-flip-form-control:not(.form-control--has-value):not(.form-control--has-focus) .form-control__input.sc-flip-form-control{overflow:hidden;max-height:0}.form-control.sc-flip-form-control:not(.form-control--has-value):not(.form-control--has-focus) .form-control__label-text.sc-flip-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%)}.form-control--invalid.form-control--has-focus.sc-flip-form-control:not(.form-control--disabled) .form-control__label.sc-flip-form-control{border-color:var(--s-border-critical);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-critical)}.form-control--invalid.sc-flip-form-control .form-control__label.sc-flip-form-control{border-color:var(--s-border-critical)}.form-control--disabled.sc-flip-form-control .form-control__label.sc-flip-form-control{border-color:var(--s-border-disabled);color:var(--s-text-disabled)}.form-control--disabled.sc-flip-form-control .form-control__description.sc-flip-form-control{color:var(--s-text-disabled)}.form-control__label.sc-flip-form-control{position:relative;display:flex;width:100%;min-height:4.375rem;padding:calc(var(--s-space-12) + 1.25rem) var(--s-space-16) var(--s-space-12);justify-content:center;border:var(--s-border-width-default) solid var(--s-border-strong);border-radius:var(--s-border-radius-sm);color:var(--s-text-subdued);flex-direction:column;gap:var(--s-space-2)}.form-control__label-text.sc-flip-form-control{position:absolute;right:var(--s-space-16);bottom:calc(100% - 1.25rem - var(--s-space-12));left:var(--s-space-16);overflow:hidden;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis;transition:font-size 0.15s, transform 0.15s, top 0.15s;transform:none}.form-control__description.sc-flip-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}.form-control__error-message.sc-flip-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4)}", c = class {
|
|
7
|
-
constructor(r) {
|
|
8
|
-
e(this, r), this.descriptionId = `form-control-description-${Math.round(Math.random() * 1e5)}`, this.listenToInputValueChanges = () => {
|
|
9
|
-
this.inputEl.addEventListener("valueChange", this.checkInputValue);
|
|
10
|
-
}, this.checkInputValue = () => {
|
|
11
|
-
var o;
|
|
12
|
-
this.inputValue = (o = this.inputEl) === null || o === void 0 ? void 0 : o.value;
|
|
13
|
-
}, this.onFocusIn = () => {
|
|
14
|
-
this.hasFocus = !0;
|
|
15
|
-
}, this.onFocusOut = (o) => {
|
|
16
|
-
Boolean(o.relatedTarget) && (this.hasFocus = !1);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
componentWillLoad() {
|
|
20
|
-
this.inputEl = this.el.children[0], this.associateDescriptionWithInputElement(), this.setInputElementDisabledState(), this.setInputElementInvalidState(), this.checkInputValue(), this.listenToInputValueChanges();
|
|
21
|
-
}
|
|
22
|
-
associateDescriptionWithInputElement() {
|
|
23
|
-
!Boolean(this.description) || !Boolean(this.inputEl) || this.inputEl.setAttribute("flip-aria-describedby", this.descriptionId);
|
|
24
|
-
}
|
|
25
|
-
setInputElementDisabledState() {
|
|
26
|
-
!Boolean(this.inputEl) || (this.disabled ? this.inputEl.setAttribute("disabled", "true") : this.inputEl.removeAttribute("disabled"));
|
|
27
|
-
}
|
|
28
|
-
setInputElementInvalidState() {
|
|
29
|
-
!Boolean(this.inputEl) || (this.invalid ? this.inputEl.setAttribute("invalid", "true") : this.inputEl.removeAttribute("invalid"));
|
|
30
|
-
}
|
|
31
|
-
onWindowClick(r) {
|
|
32
|
-
const o = r.target;
|
|
33
|
-
this.el.contains(o) || (this.hasFocus = !1);
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
const r = Boolean(this.errorMessage), o = Boolean(this.description) && !r, s = n("form-control", {
|
|
37
|
-
"form-control--disabled": this.disabled,
|
|
38
|
-
"form-control--has-focus": this.hasFocus,
|
|
39
|
-
"form-control--has-value": Boolean(this.inputValue),
|
|
40
|
-
"form-control--invalid": this.invalid
|
|
41
|
-
});
|
|
42
|
-
return t(i, { onFocusin: this.onFocusIn, onFocusout: this.onFocusOut }, t("div", { class: s, role: "group" }, t("label", { class: "form-control__label" }, t("span", { class: "form-control__label-text" }, this.label), t("span", { class: "form-control__input" }, t("slot", null))), o && t("span", { class: "form-control__description", id: this.descriptionId }, this.description), r && t("span", { "aria-live": "polite", class: "form-control__error-message", id: this.descriptionId }, t("flip-inline-error", { message: this.errorMessage, size: "s" }))));
|
|
43
|
-
}
|
|
44
|
-
get el() {
|
|
45
|
-
return l(this);
|
|
46
|
-
}
|
|
47
|
-
static get watchers() {
|
|
48
|
-
return {
|
|
49
|
-
description: ["associateDescriptionWithInputElement"],
|
|
50
|
-
disabled: ["setInputElementDisabledState"],
|
|
51
|
-
invalid: ["setInputElementInvalidState"]
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
c.style = a;
|
|
56
|
-
export {
|
|
57
|
-
c as flip_form_control
|
|
58
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as n, h as e, H as s } from "./index.b66ff9f0.js";
|
|
2
|
-
import { c as a } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const l = ".sc-flip-heading-h{display:block;width:100%}.sc-flip-heading-h *.sc-flip-heading{box-sizing:border-box}.heading.sc-flip-heading{display:block;width:100%;margin:0;padding:0;text-align:start}.heading--align-start.sc-flip-heading{text-align:start}.heading--align-center.sc-flip-heading{text-align:center}.heading--align-end.sc-flip-heading{text-align:end}.heading--level-1.sc-flip-heading{font-size:var(--s-font-size-2xl);font-weight:var(--s-font-weight-bold);line-height:var(--s-line-height-2xl);letter-spacing:var(--s-letter-spacing-tight)}.heading--level-2.sc-flip-heading{font-size:var(--s-font-size-xl);font-weight:var(--s-font-weight-bold);line-height:var(--s-line-height-xl)}.heading--level-3.sc-flip-heading{font-size:var(--s-font-size-lg);font-weight:var(--s-font-weight-semibold);line-height:var(--s-line-height-lg)}.heading--level-4.sc-flip-heading,.heading--level-5.sc-flip-heading,.heading--level-6.sc-flip-heading{font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-semibold);line-height:var(--s-line-height-base)}", h = class {
|
|
7
|
-
constructor(i) {
|
|
8
|
-
n(this, i), this.align = "start", this.level = 1;
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
const i = this.as || `h${this.level}`, t = a("heading", `heading--align-${this.align}`, `heading--level-${this.level}`);
|
|
12
|
-
return e(s, null, e(i, { class: t, id: this.headingId }, this.text));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
h.style = l;
|
|
16
|
-
export {
|
|
17
|
-
h as flip_heading
|
|
18
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { r as p, h as i, H as l, g as d } from "./index.b66ff9f0.js";
|
|
2
|
-
import { c, s as m, f as v, a as h } from "./floating-ui.dom.esm-1a4e8b8a.87557233.js";
|
|
3
|
-
import { e as a, d as f } from "./bodyScrollLock.esm-ce6356d8.2c600fb9.js";
|
|
4
|
-
import { c as u } from "./index-6d2e18c6.289636d4.js";
|
|
5
|
-
import { i as n, q as s } from "./utils-39b2afe8.37b54ba4.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "react-dom";
|
|
8
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
9
|
-
const g = ":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;animation:0.15s popover-fade-scale-in}}@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}.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{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popover-fade-scale-in{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}", b = class {
|
|
10
|
-
constructor(o) {
|
|
11
|
-
p(this, o), this.placement = "bottom-start", this.active = !1, this.closing = !1, this.onFocusOut = (e) => {
|
|
12
|
-
if (!this.active)
|
|
13
|
-
return;
|
|
14
|
-
const t = e.relatedTarget || e.target;
|
|
15
|
-
!this.el.contains(t) && this.close();
|
|
16
|
-
}, this.toggle = (e) => {
|
|
17
|
-
e.stopPropagation(), this.active ? this.close() : this.open();
|
|
18
|
-
}, this.onKeydown = (e) => {
|
|
19
|
-
e.code === "Escape" && this.active && this.close();
|
|
20
|
-
}, this.reposition = async () => {
|
|
21
|
-
const e = n();
|
|
22
|
-
if (!(!Boolean(this.triggerEl) || !Boolean(this.contentContainer))) {
|
|
23
|
-
if (e) {
|
|
24
|
-
this.position = void 0;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
this.position = await c(this.triggerEl, this.contentContainer, {
|
|
28
|
-
middleware: [m(), v()],
|
|
29
|
-
placement: this.placement,
|
|
30
|
-
strategy: "fixed"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}, this.onCloseButtonClick = () => {
|
|
34
|
-
this.close();
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
componentDidLoad() {
|
|
38
|
-
this.connectTrigger(), this.updateChildMenuItems(), this.updateTriggerAttributes();
|
|
39
|
-
}
|
|
40
|
-
disconnectedCallback() {
|
|
41
|
-
a(this.scrollContainer);
|
|
42
|
-
}
|
|
43
|
-
onWindowClick(o) {
|
|
44
|
-
const e = o.target;
|
|
45
|
-
this.el.contains(e) || this.close();
|
|
46
|
-
}
|
|
47
|
-
async close() {
|
|
48
|
-
var o;
|
|
49
|
-
this.closing || !this.active || (this.disableAutoUpdate && this.disableAutoUpdate(), this.closing = !0, setTimeout(() => {
|
|
50
|
-
this.active = !1, this.closing = !1, this.updateTriggerAttributes();
|
|
51
|
-
}, 150), this.unlockBodyScroll(), (o = this.getNativeTriggerElement()) === null || o === void 0 || o.focus());
|
|
52
|
-
}
|
|
53
|
-
async open() {
|
|
54
|
-
this.active = !0, this.updateChildMenuItems(), this.updateTriggerAttributes(), requestAnimationFrame(async () => {
|
|
55
|
-
await this.reposition(), this.childMenuItems.length > 0 ? this.childMenuItems[0].focus() : this.contentContainer.focus(), this.disableAutoUpdate && this.disableAutoUpdate(), this.disableAutoUpdate = h(this.triggerEl, this.contentContainer, this.reposition), this.scrollContainer.scrollTop = 0, this.lockBodyScroll();
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
connectTrigger() {
|
|
59
|
-
this.triggerEl = s(document.body, `#${this.trigger}`)[0], Boolean(this.triggerEl) && this.triggerEl.addEventListener("click", this.toggle);
|
|
60
|
-
}
|
|
61
|
-
getNativeTriggerElement() {
|
|
62
|
-
var o, e, t;
|
|
63
|
-
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;
|
|
64
|
-
}
|
|
65
|
-
updateTriggerAttributes() {
|
|
66
|
-
if (!Boolean(this.triggerEl))
|
|
67
|
-
return;
|
|
68
|
-
const o = this.getNativeTriggerElement();
|
|
69
|
-
o.setAttribute("aria-controls", this.popoverId), o.setAttribute("aria-expanded", String(this.active)), o.setAttribute("aria-haspopup", "dialog");
|
|
70
|
-
}
|
|
71
|
-
updateChildMenuItems() {
|
|
72
|
-
this.childMenuItems = s(this.el, '[role="menuitem"]');
|
|
73
|
-
}
|
|
74
|
-
lockBodyScroll() {
|
|
75
|
-
!n() || f(this.scrollContainer);
|
|
76
|
-
}
|
|
77
|
-
unlockBodyScroll() {
|
|
78
|
-
a(this.scrollContainer);
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
var o, e;
|
|
82
|
-
const t = u("popover", {
|
|
83
|
-
"popover--closing": this.closing,
|
|
84
|
-
"popover--active": this.active,
|
|
85
|
-
"popover--inactive": !this.active
|
|
86
|
-
});
|
|
87
|
-
return i(l, { id: this.popoverId, onFocusout: this.onFocusOut }, i("div", { class: t, onKeyDown: this.onKeydown }, i("div", { "aria-hidden": this.active ? "false" : "true", "aria-label": this.label, class: "popover__content", role: "dialog", tabindex: "-1", ref: (r) => this.contentContainer = r, style: {
|
|
88
|
-
top: Boolean(this.position) ? `${(o = this.position) === null || o === void 0 ? void 0 : o.y}px` : "",
|
|
89
|
-
left: Boolean(this.position) ? `${(e = this.position) === null || e === void 0 ? void 0 : e.x}px` : ""
|
|
90
|
-
} }, i("span", { class: "popover__handle" }), i("div", { class: "popover__scroll-container", ref: (r) => this.scrollContainer = r }, i("slot", null))), this.active && i("div", { class: "popover__backdrop", onClick: this.onCloseButtonClick })));
|
|
91
|
-
}
|
|
92
|
-
get el() {
|
|
93
|
-
return d(this);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
b.style = g;
|
|
97
|
-
export {
|
|
98
|
-
b as flip_popover
|
|
99
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as i, h as e, H as o } from "./index.b66ff9f0.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
|
-
};
|