@getflip/swirl-components-react 0.10.0 → 0.12.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/{_commonjsHelpers-44457d8d.ba94af77.js → _commonjsHelpers-10467d11.b7d83301.js} +0 -0
- package/dist/balancetext-31f1ec68.bd1c1b2d.js +189 -0
- package/dist/file-manager.entry.7a321755.js +58 -0
- package/dist/{floating-ui.dom.esm-1a4e8b8a.87557233.js → floating-ui.dom.esm-b9f28f6d.15013ef7.js} +0 -0
- package/dist/{index-6d2e18c6.289636d4.js → index-47862d62.75c2fcf1.js} +1 -1
- package/dist/index.149af511.js +1394 -0
- package/dist/stencil-generated/index.d.ts +169 -157
- package/dist/swirl-action-list-item.entry.6548a6f0.js +34 -0
- package/dist/swirl-action-list-section.entry.e12fe159.js +15 -0
- package/dist/{flip-action-list.entry.7bdcff2f.js → swirl-action-list.entry.21644ba6.js} +3 -3
- package/dist/{flip-app-layout_5.entry.6e395cd4.js → swirl-app-layout_5.entry.9703e919.js} +28 -24
- package/dist/swirl-autocomplete.entry.4bad6cbf.js +70 -0
- package/dist/swirl-avatar-group.entry.d41bfa97.js +29 -0
- package/dist/{flip-avatar.entry.f5cb1fd9.js → swirl-avatar.entry.c81909ad.js} +8 -8
- package/dist/swirl-badge.entry.7bd8bbda.js +20 -0
- package/dist/swirl-banner.entry.ef0143b1.js +49 -0
- package/dist/swirl-button-group.entry.60578a80.js +20 -0
- package/dist/swirl-button.entry.167120c6.js +52 -0
- package/dist/{flip-card.entry.66635d0b.js → swirl-card.entry.47b41ce9.js} +4 -4
- package/dist/swirl-checkbox.entry.37c16abe.js +30 -0
- package/dist/{flip-chip.entry.2d504566.js → swirl-chip.entry.89c2c730.js} +23 -15
- package/dist/swirl-components-react.js +171 -159
- package/dist/swirl-components-react.umd.cjs +76 -46
- package/dist/{flip-console-layout.entry.0b474308.js → swirl-console-layout.entry.61b9ad81.js} +22 -22
- package/dist/{flip-date-input.entry.462f9e2d.js → swirl-date-input.entry.f0f6d6ee.js} +633 -623
- package/dist/swirl-date-picker_2.entry.91531b84.js +37 -0
- package/dist/{flip-description-list-item.entry.2ea98099.js → swirl-description-list-item.entry.99c83045.js} +18 -3
- package/dist/{flip-description-list.entry.c08605e6.js → swirl-description-list.entry.724f88d9.js} +5 -5
- package/dist/swirl-dialog.entry.b50cfdb2.js +45 -0
- package/dist/swirl-file-uploader.entry.f8afd2d4.js +32 -0
- package/dist/{flip-file-viewer_7.entry.8d39ace2.js → swirl-file-viewer_7.entry.8973a210.js} +20 -20
- package/dist/swirl-form-control.entry.bc87b691.js +70 -0
- package/dist/swirl-form-group.entry.674e8b3f.js +18 -0
- package/dist/swirl-heading.entry.8e9ded19.js +28 -0
- package/dist/swirl-icon-add-photo.entry.5a20015c.js +18 -0
- package/dist/swirl-icon-add_4.entry.0844d9ca.js +51 -0
- package/dist/swirl-icon-admin-panel-settings.entry.8f932fe7.js +18 -0
- package/dist/swirl-icon-arrow-back.entry.c9c0cd69.js +18 -0
- package/dist/swirl-icon-arrow-downward_2.entry.03e4f1bc.js +29 -0
- package/dist/swirl-icon-arrow-forward.entry.965aa3ee.js +18 -0
- package/dist/swirl-icon-arrow-left_3.entry.5cddfb42.js +40 -0
- package/dist/swirl-icon-arrow-right-small.entry.53b648b8.js +18 -0
- package/dist/swirl-icon-attachment.entry.302569e9.js +18 -0
- package/dist/swirl-icon-block.entry.79c5f2b2.js +18 -0
- package/dist/swirl-icon-cancel_4.entry.31c7f7d7.js +51 -0
- package/dist/swirl-icon-chat-bubble.entry.ac1cbfcd.js +18 -0
- package/dist/swirl-icon-chats-filled.entry.18c0e11a.js +18 -0
- package/dist/swirl-icon-chats-outlined.entry.af240396.js +18 -0
- package/dist/swirl-icon-check-circle.entry.4c0304e9.js +18 -0
- package/dist/swirl-icon-check-small_4.entry.c7292189.js +1468 -0
- package/dist/swirl-icon-check-strong.entry.0e1ebe49.js +18 -0
- package/dist/swirl-icon-check.entry.bb609d4c.js +18 -0
- package/dist/swirl-icon-chevron-left.entry.0faf5ceb.js +18 -0
- package/dist/swirl-icon-chevron-right.entry.9b9edbac.js +18 -0
- package/dist/swirl-icon-close-small.entry.47516cb5.js +18 -0
- package/dist/swirl-icon-close.entry.f20dd2d1.js +18 -0
- package/dist/swirl-icon-cloud-upload.entry.5307cd46.js +18 -0
- package/dist/swirl-icon-column.entry.fb461b40.js +18 -0
- package/dist/swirl-icon-comment.entry.7bfbd903.js +18 -0
- package/dist/swirl-icon-copy.entry.4c17082a.js +18 -0
- package/dist/swirl-icon-date-range.entry.c8ce6402.js +18 -0
- package/dist/swirl-icon-delete.entry.6d3a6a54.js +18 -0
- package/dist/swirl-icon-description.entry.060d019c.js +18 -0
- package/dist/swirl-icon-edit.entry.329a25ea.js +18 -0
- package/dist/swirl-icon-emoji-mood.entry.3fbee1e1.js +18 -0
- package/dist/swirl-icon-emoji-satisfied.entry.9fc1863d.js +18 -0
- package/dist/swirl-icon-error_3.entry.8209c557.js +58 -0
- package/dist/swirl-icon-expand-more.entry.b2e0a30c.js +18 -0
- package/dist/swirl-icon-file.entry.c0e82b43.js +18 -0
- package/dist/swirl-icon-filter.entry.e26fa57c.js +18 -0
- package/dist/swirl-icon-folder-shared.entry.0169b375.js +18 -0
- package/dist/swirl-icon-group-assign.entry.70e80a6e.js +18 -0
- package/dist/swirl-icon-groups-custom.entry.d16f5fb9.js +18 -0
- package/dist/swirl-icon-groups-filled.entry.6cccc3d3.js +18 -0
- package/dist/swirl-icon-groups-outlined.entry.2bf03f93.js +18 -0
- package/dist/swirl-icon-groups.entry.cbc420c1.js +18 -0
- package/dist/swirl-icon-help.entry.bca2c9e9.js +18 -0
- package/dist/swirl-icon-image.entry.67457d50.js +18 -0
- package/dist/swirl-icon-info.entry.0ee58aeb.js +18 -0
- package/dist/swirl-icon-inventory.entry.1548c8b5.js +18 -0
- package/dist/swirl-icon-like.entry.e9d549b8.js +18 -0
- package/dist/swirl-icon-link.entry.c442143c.js +18 -0
- package/dist/swirl-icon-lock.entry.d84f882b.js +18 -0
- package/dist/swirl-icon-logout.entry.7a6a96d3.js +18 -0
- package/dist/swirl-icon-mail.entry.a7b7df7b.js +18 -0
- package/dist/swirl-icon-manage-accounts.entry.fe2691fc.js +18 -0
- package/dist/swirl-icon-mention.entry.c0368650.js +18 -0
- package/dist/swirl-icon-menu-filled.entry.06cced02.js +18 -0
- package/dist/swirl-icon-menu-outlined.entry.89dca403.js +18 -0
- package/dist/swirl-icon-menu.entry.ff253f8f.js +18 -0
- package/dist/swirl-icon-message.entry.b7d9f581.js +18 -0
- package/dist/swirl-icon-more-horizontal.entry.407e51c1.js +18 -0
- package/dist/swirl-icon-more-vertikal.entry.718f85e0.js +18 -0
- package/dist/swirl-icon-news-filled.entry.5134e640.js +18 -0
- package/dist/swirl-icon-news-outlined.entry.9c0931c4.js +18 -0
- package/dist/swirl-icon-notifications-active.entry.c47bbb94.js +18 -0
- package/dist/swirl-icon-notifications-off.entry.d5933059.js +18 -0
- package/dist/swirl-icon-notifications.entry.b945b795.js +18 -0
- package/dist/swirl-icon-open-in-new.entry.98a7ed82.js +18 -0
- package/dist/swirl-icon-people-alt.entry.646cfc3d.js +18 -0
- package/dist/swirl-icon-person-off.entry.f5db1b83.js +18 -0
- package/dist/swirl-icon-person.entry.4b5b54cb.js +18 -0
- package/dist/swirl-icon-phone.entry.f6c4012a.js +18 -0
- package/dist/swirl-icon-poll.entry.9ee6b1d2.js +18 -0
- package/dist/swirl-icon-print.entry.37f08abb.js +18 -0
- package/dist/swirl-icon-recieved.entry.f79a1343.js +18 -0
- package/dist/swirl-icon-search-strong.entry.6752b238.js +18 -0
- package/dist/swirl-icon-search.entry.d152e72f.js +18 -0
- package/dist/swirl-icon-send.entry.cafcc526.js +18 -0
- package/dist/swirl-icon-settings.entry.cdd23f77.js +18 -0
- package/dist/swirl-icon-sync.entry.37eed48f.js +18 -0
- package/dist/swirl-icon-tasks-filled.entry.629446b0.js +18 -0
- package/dist/swirl-icon-tasks-outlined.entry.21e25bc3.js +18 -0
- package/dist/swirl-icon-time-filled.entry.67ee5a24.js +18 -0
- package/dist/swirl-icon-time-outlined.entry.d0eb5d19.js +18 -0
- package/dist/swirl-icon-user-assign.entry.8a6b68ea.js +18 -0
- package/dist/swirl-icon-video-camera.entry.85101910.js +18 -0
- package/dist/swirl-icon-warning.entry.330bf12a.js +18 -0
- package/dist/{flip-lightbox.entry.e6ea2310.js → swirl-lightbox.entry.7a2191eb.js} +13 -13
- package/dist/swirl-link.entry.81bd6e0f.js +15 -0
- package/dist/swirl-list.entry.ca7b2daf.js +18 -0
- package/dist/swirl-modal.entry.97df470f.js +63 -0
- package/dist/swirl-option-list-section.entry.b3b30b8f.js +15 -0
- package/dist/swirl-pagination.entry.0bbbf034.js +27 -0
- package/dist/{flip-pdf-reader.entry.4cdb28da.js → swirl-pdf-reader.entry.064e66a5.js} +8 -8
- package/dist/{flip-popover.entry.4a45218b.js → swirl-popover.entry.1e51f870.js} +10 -10
- package/dist/{flip-progress-indicator.entry.fc0e5979.js → swirl-progress-indicator.entry.46470fa4.js} +4 -4
- package/dist/swirl-radio-group.entry.f931de9f.js +35 -0
- package/dist/swirl-radio.entry.5ccbc5fa.js +29 -0
- package/dist/swirl-resource-list-file-item.entry.66329d69.js +37 -0
- package/dist/swirl-search.entry.364d373f.js +48 -0
- package/dist/swirl-select.entry.95b1f5bc.js +49 -0
- package/dist/swirl-separator.entry.7c230cd1.js +15 -0
- package/dist/{flip-stack.entry.a5b14f3a.js → swirl-stack.entry.cb1d54ae.js} +4 -4
- package/dist/swirl-switch.entry.895cfbbd.js +56 -0
- package/dist/swirl-tab.entry.b870a20f.js +18 -0
- package/dist/swirl-table-cell.entry.0d4a9b8f.js +15 -0
- package/dist/swirl-table-column.entry.b1f05cb5.js +23 -0
- package/dist/swirl-table-row-group.entry.85368b7a.js +19 -0
- package/dist/swirl-table-row.entry.39f31a4b.js +20 -0
- package/dist/swirl-table.entry.cd3a7dde.js +141 -0
- package/dist/{flip-tabs.entry.d3d9f791.js → swirl-tabs.entry.6dbf6d57.js} +8 -8
- package/dist/swirl-tag.entry.b0d8059b.js +21 -0
- package/dist/swirl-text-input.entry.86bbfa05.js +75 -0
- package/dist/swirl-text.entry.53142b33.js +31 -0
- package/dist/{flip-theme-provider.entry.2b2c55b9.js → swirl-theme-provider.entry.9cc36512.js} +18 -18
- package/dist/swirl-thumbnail.entry.bd0a5c89.js +18 -0
- package/dist/{flip-toast-provider.entry.729fe2a2.js → swirl-toast-provider.entry.7747ba81.js} +3 -3
- package/dist/swirl-toast.entry.ea517c98.js +52 -0
- package/dist/{flip-tooltip.entry.8392ec7f.js → swirl-tooltip.entry.71acfc7d.js} +8 -8
- package/dist/{flip-tree-navigation-item.entry.62f7ab3c.js → swirl-tree-navigation-item.entry.59540e7e.js} +4 -4
- package/dist/{flip-video-thumbnail.entry.edc7cce0.js → swirl-video-thumbnail.entry.4546c208.js} +3 -3
- package/dist/{flip-visually-hidden.entry.69776f72.js → swirl-visually-hidden.entry.bbc8b32d.js} +4 -4
- package/dist/utils-33d31b58.1488fcfe.js +46 -0
- package/dist/wc-datepicker.entry.d105e9ee.js +269 -0
- package/package.json +2 -2
- package/dist/file-manager.entry.8bb8e04c.js +0 -58
- package/dist/flip-action-list-item.entry.56f1f1ef.js +0 -18
- package/dist/flip-action-list-section.entry.a99c7d3e.js +0 -15
- package/dist/flip-autocomplete.entry.309d4ae7.js +0 -70
- package/dist/flip-avatar-group.entry.4192d45c.js +0 -29
- package/dist/flip-badge.entry.9de15857.js +0 -20
- package/dist/flip-banner.entry.703f5f14.js +0 -33
- package/dist/flip-button-group.entry.19eb382b.js +0 -20
- package/dist/flip-button.entry.a046c9ec.js +0 -41
- package/dist/flip-checkbox.entry.f73ba3b1.js +0 -30
- package/dist/flip-date-picker_2.entry.cbbcb306.js +0 -1186
- package/dist/flip-dialog.entry.97e79b3a.js +0 -45
- package/dist/flip-file-uploader.entry.2b504539.js +0 -32
- package/dist/flip-form-control.entry.1b840330.js +0 -65
- package/dist/flip-form-group.entry.8b6006f5.js +0 -18
- package/dist/flip-heading_2.entry.603511e8.js +0 -29
- package/dist/flip-icon-add-photo.entry.f336c2f0.js +0 -15
- package/dist/flip-icon-add_4.entry.99b75edc.js +0 -45
- package/dist/flip-icon-admin-panel-settings.entry.de10ebf5.js +0 -15
- package/dist/flip-icon-arrow-back.entry.b8865555.js +0 -15
- package/dist/flip-icon-arrow-forward.entry.b2ef6fc1.js +0 -15
- package/dist/flip-icon-arrow-left_3.entry.7a79a065.js +0 -35
- package/dist/flip-icon-arrow-right-small.entry.ae64706f.js +0 -15
- package/dist/flip-icon-attachment.entry.081189f0.js +0 -15
- package/dist/flip-icon-block.entry.6d9c5dfc.js +0 -15
- package/dist/flip-icon-cancel_4.entry.d2cb75c3.js +0 -45
- package/dist/flip-icon-chat-bubble.entry.67f98ff5.js +0 -15
- package/dist/flip-icon-chats-filled.entry.06584eb3.js +0 -15
- package/dist/flip-icon-chats-outlined.entry.dc6dbf4b.js +0 -15
- package/dist/flip-icon-check-circle.entry.29fe9a35.js +0 -15
- package/dist/flip-icon-check-small_3.entry.8070cb06.js +0 -143
- package/dist/flip-icon-check-strong.entry.fba6e55f.js +0 -15
- package/dist/flip-icon-check.entry.86260e1c.js +0 -15
- package/dist/flip-icon-chevron-left.entry.e4c7857a.js +0 -15
- package/dist/flip-icon-chevron-right.entry.1db14308.js +0 -15
- package/dist/flip-icon-close-small.entry.cbd4fc49.js +0 -15
- package/dist/flip-icon-close.entry.48763036.js +0 -15
- package/dist/flip-icon-cloud-upload.entry.98e40ba8.js +0 -15
- package/dist/flip-icon-comment.entry.6a6d8fbc.js +0 -15
- package/dist/flip-icon-copy.entry.53b11b1a.js +0 -15
- package/dist/flip-icon-date-range.entry.84d14dff.js +0 -15
- package/dist/flip-icon-delete.entry.a9b6ab40.js +0 -15
- package/dist/flip-icon-description.entry.6aefa229.js +0 -15
- package/dist/flip-icon-edit.entry.81a6837c.js +0 -15
- package/dist/flip-icon-emoji-mood.entry.b1766a9a.js +0 -15
- package/dist/flip-icon-emoji-satisfied.entry.89712163.js +0 -15
- package/dist/flip-icon-error_3.entry.d6a422a6.js +0 -39
- package/dist/flip-icon-expand-more.entry.63f210f6.js +0 -15
- package/dist/flip-icon-file.entry.625b53c4.js +0 -15
- package/dist/flip-icon-folder-shared.entry.2128dab9.js +0 -15
- package/dist/flip-icon-group-assign.entry.4860e5f5.js +0 -15
- package/dist/flip-icon-groups-custom.entry.ae87389c.js +0 -15
- package/dist/flip-icon-groups-filled.entry.251c942d.js +0 -15
- package/dist/flip-icon-groups-outlined.entry.43844b1d.js +0 -15
- package/dist/flip-icon-groups.entry.b4f9a7f7.js +0 -15
- package/dist/flip-icon-help.entry.1146bb20.js +0 -15
- package/dist/flip-icon-image.entry.0e41e08d.js +0 -15
- package/dist/flip-icon-info.entry.605cfdf6.js +0 -15
- package/dist/flip-icon-inventory.entry.166bc115.js +0 -15
- package/dist/flip-icon-like.entry.cae24842.js +0 -15
- package/dist/flip-icon-link.entry.22976afa.js +0 -15
- package/dist/flip-icon-lock.entry.566db977.js +0 -15
- package/dist/flip-icon-logout.entry.79ae2f2c.js +0 -15
- package/dist/flip-icon-mail.entry.3846875a.js +0 -15
- package/dist/flip-icon-manage-accounts.entry.b7dff46e.js +0 -15
- package/dist/flip-icon-mention.entry.8cae7e24.js +0 -15
- package/dist/flip-icon-menu-filled.entry.de447ac4.js +0 -15
- package/dist/flip-icon-menu-outlined.entry.3fb10f79.js +0 -15
- package/dist/flip-icon-menu.entry.cd1f33c3.js +0 -15
- package/dist/flip-icon-message.entry.b6422ee9.js +0 -15
- package/dist/flip-icon-more-horizontal.entry.57fdb45f.js +0 -15
- package/dist/flip-icon-more-vertikal.entry.60e8e3db.js +0 -15
- package/dist/flip-icon-news-filled.entry.9e2ae1ac.js +0 -15
- package/dist/flip-icon-news-outlined.entry.27fe1a80.js +0 -15
- package/dist/flip-icon-notifications-active.entry.ad17e8e4.js +0 -15
- package/dist/flip-icon-notifications-off.entry.669ff414.js +0 -15
- package/dist/flip-icon-notifications.entry.c533a876.js +0 -15
- package/dist/flip-icon-open-in-new.entry.f020da7b.js +0 -15
- package/dist/flip-icon-people-alt.entry.23a07d8d.js +0 -15
- package/dist/flip-icon-person-off.entry.b9487422.js +0 -15
- package/dist/flip-icon-person.entry.2b1ece6a.js +0 -15
- package/dist/flip-icon-phone.entry.d878e225.js +0 -15
- package/dist/flip-icon-poll.entry.9f9d3097.js +0 -15
- package/dist/flip-icon-print.entry.3c6ba219.js +0 -15
- package/dist/flip-icon-recieved.entry.0e863e26.js +0 -15
- package/dist/flip-icon-search-strong.entry.9e14089f.js +0 -15
- package/dist/flip-icon-search.entry.8e785c5b.js +0 -15
- package/dist/flip-icon-send.entry.2b9ec517.js +0 -15
- package/dist/flip-icon-settings.entry.1c1c82ba.js +0 -15
- package/dist/flip-icon-tasks-filled.entry.6b345bdf.js +0 -15
- package/dist/flip-icon-tasks-outlined.entry.75282f32.js +0 -15
- package/dist/flip-icon-time-filled.entry.4b2e3be8.js +0 -15
- package/dist/flip-icon-time-outlined.entry.1ce39655.js +0 -15
- package/dist/flip-icon-user-assign.entry.8fd4da9a.js +0 -15
- package/dist/flip-icon-video-camera.entry.7f1b8790.js +0 -15
- package/dist/flip-icon-warning.entry.a73148c4.js +0 -15
- package/dist/flip-link.entry.5daf5ffe.js +0 -15
- package/dist/flip-list.entry.25e0a5e8.js +0 -18
- package/dist/flip-modal.entry.f14cc170.js +0 -63
- package/dist/flip-option-list-section.entry.d1b4d66a.js +0 -15
- package/dist/flip-pagination.entry.e6de7b67.js +0 -27
- package/dist/flip-radio-group.entry.081a6b27.js +0 -35
- package/dist/flip-radio.entry.fd8faaa3.js +0 -29
- package/dist/flip-resource-list-file-item.entry.d15b84be.js +0 -20
- package/dist/flip-search.entry.638f3769.js +0 -31
- package/dist/flip-select.entry.5c709269.js +0 -48
- package/dist/flip-switch.entry.f812357e.js +0 -56
- package/dist/flip-tab.entry.83bf882c.js +0 -18
- package/dist/flip-tag.entry.8b80d408.js +0 -21
- package/dist/flip-text-input.entry.d1b0bb71.js +0 -60
- package/dist/flip-thumbnail.entry.4148adbc.js +0 -18
- package/dist/flip-toast.entry.7c89a88e.js +0 -39
- package/dist/index.6f8c9509.js +0 -1382
- package/dist/utils-39b2afe8.37b54ba4.js +0 -40
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { r as R, c as S, h as n, H, g as E } from "./index.149af511.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
function T(e, t) {
|
|
5
|
+
const a = new Date(e);
|
|
6
|
+
return a.setDate(a.getDate() + t), a;
|
|
7
|
+
}
|
|
8
|
+
function V(e, t, a) {
|
|
9
|
+
const s = [], i = b(e), d = i.getDay() === 0 ? 7 : i.getDay(), l = F(e), D = l.getDay() === 0 ? 7 : l.getDay(), g = a === 1 ? 7 : a - 1, f = [], v = [];
|
|
10
|
+
if (t) {
|
|
11
|
+
let p = (7 - a + d) % 7, m = y(i);
|
|
12
|
+
for (; p > 0; )
|
|
13
|
+
f.push(m), m = y(m), p -= 1;
|
|
14
|
+
f.reverse();
|
|
15
|
+
let w = (7 - D + g) % 7, c = C(l);
|
|
16
|
+
for (; w > 0; )
|
|
17
|
+
v.push(c), c = C(c), w -= 1;
|
|
18
|
+
}
|
|
19
|
+
let r = i;
|
|
20
|
+
for (; r.getMonth() === e.getMonth(); )
|
|
21
|
+
s.push(r), r = C(r);
|
|
22
|
+
return [...f, ...s, ...v];
|
|
23
|
+
}
|
|
24
|
+
function b(e) {
|
|
25
|
+
return u(new Date(`${P(e)}-${String(O(e)).padStart(2, "0")}-01`));
|
|
26
|
+
}
|
|
27
|
+
function h(e) {
|
|
28
|
+
if (e instanceof Date)
|
|
29
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
30
|
+
}
|
|
31
|
+
function F(e) {
|
|
32
|
+
const t = b(e);
|
|
33
|
+
return t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1), t;
|
|
34
|
+
}
|
|
35
|
+
function O(e) {
|
|
36
|
+
return e.getMonth() + 1;
|
|
37
|
+
}
|
|
38
|
+
function K(e) {
|
|
39
|
+
return new Array(12).fill(void 0).map((t, a) => {
|
|
40
|
+
const s = u(new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
|
|
41
|
+
return Intl.DateTimeFormat(e, {
|
|
42
|
+
month: "long"
|
|
43
|
+
}).format(s);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function C(e) {
|
|
47
|
+
return T(e, 1);
|
|
48
|
+
}
|
|
49
|
+
function N(e) {
|
|
50
|
+
const t = new Date(e);
|
|
51
|
+
return t.setMonth(t.getMonth() + 1), t;
|
|
52
|
+
}
|
|
53
|
+
function B(e) {
|
|
54
|
+
const t = new Date(e);
|
|
55
|
+
return t.setFullYear(t.getFullYear() + 1), t;
|
|
56
|
+
}
|
|
57
|
+
function y(e) {
|
|
58
|
+
return A(e, 1);
|
|
59
|
+
}
|
|
60
|
+
function Y(e) {
|
|
61
|
+
const t = new Date(e);
|
|
62
|
+
return t.setMonth(t.getMonth() - 1), t;
|
|
63
|
+
}
|
|
64
|
+
function x(e) {
|
|
65
|
+
const t = new Date(e);
|
|
66
|
+
return t.setFullYear(t.getFullYear() - 1), t;
|
|
67
|
+
}
|
|
68
|
+
function j(e, t) {
|
|
69
|
+
return new Array(7).fill(void 0).map((a, s) => (e + s) % 7 + 1).map((a) => {
|
|
70
|
+
const s = u(new Date(`2006-01-0${a}`));
|
|
71
|
+
return [
|
|
72
|
+
Intl.DateTimeFormat(t, {
|
|
73
|
+
weekday: "short"
|
|
74
|
+
}).format(s),
|
|
75
|
+
Intl.DateTimeFormat(t, {
|
|
76
|
+
weekday: "long"
|
|
77
|
+
}).format(s)
|
|
78
|
+
];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function P(e) {
|
|
82
|
+
return e.getFullYear();
|
|
83
|
+
}
|
|
84
|
+
function U(e, t) {
|
|
85
|
+
if (!e || !t || !t.from || !t.to)
|
|
86
|
+
return !1;
|
|
87
|
+
const a = t.from < t.to ? t.from : t.to, s = t.from < t.to ? t.to : t.from;
|
|
88
|
+
return e >= a && e <= s;
|
|
89
|
+
}
|
|
90
|
+
function o(e, t) {
|
|
91
|
+
return !e || !t ? !1 : e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
92
|
+
}
|
|
93
|
+
function u(e) {
|
|
94
|
+
const t = new Date(e);
|
|
95
|
+
return t.setMinutes(t.getMinutes() + t.getTimezoneOffset()), t;
|
|
96
|
+
}
|
|
97
|
+
function A(e, t) {
|
|
98
|
+
const a = new Date(e);
|
|
99
|
+
return a.setDate(a.getDate() - t), a;
|
|
100
|
+
}
|
|
101
|
+
const z = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%)}", q = {
|
|
102
|
+
clearButton: "Clear value",
|
|
103
|
+
monthSelect: "Select month",
|
|
104
|
+
nextMonthButton: "Next month",
|
|
105
|
+
nextYearButton: "Next year",
|
|
106
|
+
picker: "Choose date",
|
|
107
|
+
previousMonthButton: "Previous month",
|
|
108
|
+
previousYearButton: "Previous year",
|
|
109
|
+
todayButton: "Show today",
|
|
110
|
+
yearSelect: "Select year"
|
|
111
|
+
}, G = class {
|
|
112
|
+
constructor(e) {
|
|
113
|
+
R(this, e), this.selectDate = S(this, "selectDate", 7), this.changeMonth = S(this, "changeMonth", 7), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.labels = q, this.locale = (navigator == null ? void 0 : navigator.language) || "en-US", this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = h(new Date()), this.init = () => {
|
|
114
|
+
this.currentDate = this.startDate ? u(new Date(this.startDate)) : new Date(), this.updateWeekdays();
|
|
115
|
+
}, this.nextMonth = () => {
|
|
116
|
+
this.updateCurrentDate(N(this.currentDate));
|
|
117
|
+
}, this.nextYear = () => {
|
|
118
|
+
this.updateCurrentDate(B(this.currentDate));
|
|
119
|
+
}, this.previousMonth = () => {
|
|
120
|
+
this.updateCurrentDate(Y(this.currentDate));
|
|
121
|
+
}, this.previousYear = () => {
|
|
122
|
+
this.updateCurrentDate(x(this.currentDate));
|
|
123
|
+
}, this.showToday = () => {
|
|
124
|
+
this.updateCurrentDate(new Date());
|
|
125
|
+
}, this.clear = () => {
|
|
126
|
+
this.value = void 0, this.selectDate.emit(void 0);
|
|
127
|
+
}, this.onClick = (t) => {
|
|
128
|
+
if (this.disabled)
|
|
129
|
+
return;
|
|
130
|
+
const a = t.target.closest("[data-date]");
|
|
131
|
+
if (!Boolean(a))
|
|
132
|
+
return;
|
|
133
|
+
const s = u(new Date(a.dataset.date));
|
|
134
|
+
this.updateCurrentDate(s), this.onSelectDate(s);
|
|
135
|
+
}, this.onMonthSelect = (t) => {
|
|
136
|
+
const a = +t.target.value - 1, s = new Date(this.currentDate);
|
|
137
|
+
s.setMonth(a), this.updateCurrentDate(s);
|
|
138
|
+
}, this.onYearSelect = (t) => {
|
|
139
|
+
const a = +t.target.value, s = new Date(this.currentDate);
|
|
140
|
+
s.setFullYear(a), this.updateCurrentDate(s);
|
|
141
|
+
}, this.onKeyDown = (t) => {
|
|
142
|
+
this.disabled || (t.code === "ArrowLeft" ? (t.preventDefault(), this.updateCurrentDate(y(this.currentDate), !0)) : t.code === "ArrowRight" ? (t.preventDefault(), this.updateCurrentDate(C(this.currentDate), !0)) : t.code === "ArrowUp" ? (t.preventDefault(), this.updateCurrentDate(A(this.currentDate, 7), !0)) : t.code === "ArrowDown" ? (t.preventDefault(), this.updateCurrentDate(T(this.currentDate, 7), !0)) : t.code === "PageUp" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(x(this.currentDate), !0) : this.updateCurrentDate(Y(this.currentDate), !0)) : t.code === "PageDown" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(B(this.currentDate), !0) : this.updateCurrentDate(N(this.currentDate), !0)) : t.code === "Home" ? (t.preventDefault(), this.updateCurrentDate(b(this.currentDate), !0)) : t.code === "End" ? (t.preventDefault(), this.updateCurrentDate(F(this.currentDate), !0)) : (t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.onSelectDate(this.currentDate)));
|
|
143
|
+
}, this.onMouseEnter = (t) => {
|
|
144
|
+
if (this.disabled)
|
|
145
|
+
return;
|
|
146
|
+
const a = u(new Date(t.target.closest("td").dataset.date));
|
|
147
|
+
this.hoveredDate = a;
|
|
148
|
+
}, this.onMouseLeave = () => {
|
|
149
|
+
this.hoveredDate = void 0;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
componentWillLoad() {
|
|
153
|
+
this.init();
|
|
154
|
+
}
|
|
155
|
+
watchFirstDayOfWeek() {
|
|
156
|
+
this.updateWeekdays();
|
|
157
|
+
}
|
|
158
|
+
watchLocale() {
|
|
159
|
+
Boolean(this.locale) || (this.locale = (navigator == null ? void 0 : navigator.language) || "en-US"), this.updateWeekdays();
|
|
160
|
+
}
|
|
161
|
+
watchRange() {
|
|
162
|
+
this.value = void 0, this.selectDate.emit(void 0);
|
|
163
|
+
}
|
|
164
|
+
watchStartDate() {
|
|
165
|
+
this.currentDate = this.startDate ? u(new Date(this.startDate)) : new Date();
|
|
166
|
+
}
|
|
167
|
+
watchValue() {
|
|
168
|
+
Boolean(this.value) && (Array.isArray(this.value) && this.value.length >= 1 ? this.currentDate = this.value[0] : this.value instanceof Date && (this.currentDate = this.value));
|
|
169
|
+
}
|
|
170
|
+
componentDidRender() {
|
|
171
|
+
this.moveFocusAfterMonthChanged && (this.focusDate(this.currentDate), this.moveFocusAfterMonthChanged = !1);
|
|
172
|
+
}
|
|
173
|
+
updateWeekdays() {
|
|
174
|
+
this.weekdays = j(this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek, this.locale);
|
|
175
|
+
}
|
|
176
|
+
getClassName(e) {
|
|
177
|
+
return Boolean(e) ? `${this.elementClassName}__${e}` : this.elementClassName;
|
|
178
|
+
}
|
|
179
|
+
getCalendarRows() {
|
|
180
|
+
const e = V(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), t = [];
|
|
181
|
+
for (let a = 0; a < e.length; a += 7) {
|
|
182
|
+
const s = e.slice(a, a + 7);
|
|
183
|
+
t.push(s);
|
|
184
|
+
}
|
|
185
|
+
return t;
|
|
186
|
+
}
|
|
187
|
+
getTitle() {
|
|
188
|
+
if (!!Boolean(this.currentDate))
|
|
189
|
+
return Intl.DateTimeFormat(this.locale, {
|
|
190
|
+
day: "numeric",
|
|
191
|
+
month: "long",
|
|
192
|
+
year: "numeric"
|
|
193
|
+
}).format(this.currentDate);
|
|
194
|
+
}
|
|
195
|
+
focusDate(e) {
|
|
196
|
+
var t;
|
|
197
|
+
(t = this.el.querySelector(`[data-date="${h(e)}"]`)) === null || t === void 0 || t.focus();
|
|
198
|
+
}
|
|
199
|
+
updateCurrentDate(e, t) {
|
|
200
|
+
const a = e.getMonth(), s = e.getFullYear();
|
|
201
|
+
(a !== this.currentDate.getMonth() || s !== this.currentDate.getFullYear()) && (this.changeMonth.emit({ month: O(e), year: P(e) }), t && (this.moveFocusAfterMonthChanged = !0)), this.currentDate = e, t && this.focusDate(this.currentDate);
|
|
202
|
+
}
|
|
203
|
+
onSelectDate(e) {
|
|
204
|
+
var t, a;
|
|
205
|
+
if (!this.disableDate(e))
|
|
206
|
+
if (this.isRangeValue(this.value)) {
|
|
207
|
+
const s = ((t = this.value) === null || t === void 0 ? void 0 : t[0]) === void 0 || this.value.length === 2 ? [e] : [this.value[0], e];
|
|
208
|
+
s.length === 2 && s[0] > s[1] && s.reverse();
|
|
209
|
+
const i = s[1] === void 0 ? [h(s[0])] : [h(s[0]), h(s[1])];
|
|
210
|
+
this.value = s, this.selectDate.emit(i);
|
|
211
|
+
} else {
|
|
212
|
+
if (((a = this.value) === null || a === void 0 ? void 0 : a.getTime()) === e.getTime())
|
|
213
|
+
return;
|
|
214
|
+
this.value = e, this.selectDate.emit(h(e));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
isRangeValue(e) {
|
|
218
|
+
return this.range;
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
const e = this.showTodayButton || this.showClearButton;
|
|
222
|
+
return n(H, null, n("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
|
|
223
|
+
[this.getClassName()]: !0,
|
|
224
|
+
[`${this.getClassName()}--disabled`]: this.disabled
|
|
225
|
+
}, role: "group" }, n("div", { class: this.getClassName("header") }, n("span", { "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle()), this.showYearStepper && n("button", { "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), disabled: this.disabled, innerHTML: this.previousYearButtonContent || void 0, onClick: this.previousYear, type: "button" }, n("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, n("polyline", { points: "11 17 6 12 11 7" }), n("polyline", { points: "18 17 13 12 18 7" }))), this.showMonthStepper && n("button", { "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), disabled: this.disabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, n("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, n("polyline", { points: "15 18 9 12 15 6" }))), n("span", { class: this.getClassName("current-month") }, n("select", { "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), disabled: this.disabled, name: "month", onChange: this.onMonthSelect }, K(this.locale).map((t, a) => n("option", { key: t, selected: this.currentDate.getMonth() === a, value: a + 1 }, t))), n("input", { "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: 9999, min: 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && n("button", { "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), disabled: this.disabled, innerHTML: this.nextMonthButtonContent || void 0, onClick: this.nextMonth, type: "button" }, n("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, n("polyline", { points: "9 18 15 12 9 6" }))), this.showYearStepper && n("button", { "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), disabled: this.disabled, innerHTML: this.nextYearButtonContent || void 0, onClick: this.nextYear, type: "button" }, n("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, n("polyline", { points: "13 17 18 12 13 7" }), n("polyline", { points: "6 17 11 12 6 7" })))), n("div", { class: this.getClassName("body") }, n("table", { class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid" }, n("thead", { class: this.getClassName("calendar-header") }, n("tr", { class: this.getClassName("weekday-row") }, this.weekdays.map((t) => n("th", { abbr: t[1], class: this.getClassName("weekday"), key: t[0], scope: "col" }, n("span", null, t[0]))))), n("tbody", null, this.getCalendarRows().map((t) => {
|
|
226
|
+
const a = `row-${t[0].getMonth()}-${t[0].getDate()}`;
|
|
227
|
+
return n("tr", { class: this.getClassName("calendar-row"), key: a }, t.map((s) => {
|
|
228
|
+
var i, d, l, D, g;
|
|
229
|
+
const f = o(s, this.currentDate), v = s.getMonth() !== this.currentDate.getMonth(), r = Array.isArray(this.value) ? o(s, this.value[0]) || o(s, this.value[1]) : o(s, this.value), M = this.isRangeValue ? U(s, {
|
|
230
|
+
from: (i = this.value) === null || i === void 0 ? void 0 : i[0],
|
|
231
|
+
to: ((d = this.value) === null || d === void 0 ? void 0 : d[1]) || this.hoveredDate || this.currentDate
|
|
232
|
+
}) : !1, p = Boolean((l = this.value) === null || l === void 0 ? void 0 : l[0]) ? [
|
|
233
|
+
(D = this.value) === null || D === void 0 ? void 0 : D[0],
|
|
234
|
+
((g = this.value) === null || g === void 0 ? void 0 : g[1]) || this.hoveredDate
|
|
235
|
+
].sort((_, I) => _ - I) : [], m = this.range && o(p[0], s), k = this.range && o(p[1], s), w = o(s, new Date()), c = this.disableDate(s), L = `cell-${s.getMonth()}-${s.getDate()}`, $ = {
|
|
236
|
+
[this.getClassName("date")]: !0,
|
|
237
|
+
[this.getClassName("date--current")]: f,
|
|
238
|
+
[this.getClassName("date--disabled")]: c,
|
|
239
|
+
[this.getClassName("date--overflowing")]: v,
|
|
240
|
+
[this.getClassName("date--today")]: w,
|
|
241
|
+
[this.getClassName("date--selected")]: r,
|
|
242
|
+
[this.getClassName("date--in-range")]: M,
|
|
243
|
+
[this.getClassName("date--start")]: m,
|
|
244
|
+
[this.getClassName("date--end")]: k
|
|
245
|
+
}, W = r ? "strong" : w ? "em" : "span";
|
|
246
|
+
return n("td", { "aria-disabled": String(c), "aria-selected": r ? "true" : void 0, class: $, "data-date": h(s), key: L, onClick: this.onClick, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "gridcell", tabIndex: o(s, this.currentDate) && !this.disabled ? 0 : -1 }, n(W, { "aria-hidden": "true" }, s.getDate()), n("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
|
|
247
|
+
day: "numeric",
|
|
248
|
+
month: "long"
|
|
249
|
+
}).format(s)));
|
|
250
|
+
}));
|
|
251
|
+
})))), e && n("div", { class: this.getClassName("footer") }, this.showTodayButton && n("button", { class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || void 0, onClick: this.showToday, type: "button" }, this.labels.todayButton), this.showClearButton && n("button", { class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || void 0, onClick: this.clear, type: "button" }, this.labels.clearButton))));
|
|
252
|
+
}
|
|
253
|
+
get el() {
|
|
254
|
+
return E(this);
|
|
255
|
+
}
|
|
256
|
+
static get watchers() {
|
|
257
|
+
return {
|
|
258
|
+
firstDayOfWeek: ["watchFirstDayOfWeek"],
|
|
259
|
+
locale: ["watchLocale"],
|
|
260
|
+
range: ["watchRange"],
|
|
261
|
+
startDate: ["watchStartDate"],
|
|
262
|
+
value: ["watchValue"]
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
G.style = z;
|
|
267
|
+
export {
|
|
268
|
+
G as wc_datepicker
|
|
269
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getflip/swirl-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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.13.0",
|
|
22
22
|
"react": "^18.2.0",
|
|
23
23
|
"react-dom": "^18.2.0"
|
|
24
24
|
},
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { r as o, h as e, H as n } from "./index.6f8c9509.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const a = {
|
|
5
|
-
directories: [
|
|
6
|
-
{
|
|
7
|
-
name: "Development",
|
|
8
|
-
description: "Updated 2 days ago.",
|
|
9
|
-
children: [
|
|
10
|
-
{
|
|
11
|
-
description: "1.02 MB, updated 2 days ago.",
|
|
12
|
-
name: "sample.pdf",
|
|
13
|
-
type: "application/pdf",
|
|
14
|
-
url: "/sample.pdf"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
description: "124 KB, updated a month ago.",
|
|
18
|
-
name: "sample.jpg",
|
|
19
|
-
type: "image/jpeg",
|
|
20
|
-
url: "/sample.jpg"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: "People",
|
|
26
|
-
description: "Updated just now.",
|
|
27
|
-
children: []
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}, c = class {
|
|
31
|
-
constructor(t) {
|
|
32
|
-
o(this, t), this.selectItem = (i) => {
|
|
33
|
-
"type" in i ? (this.selectedFile = i, this.layout.changeMobileView("body")) : this.selectedDirectory = i;
|
|
34
|
-
}, this.resetSelectedDirectory = () => {
|
|
35
|
-
this.selectedDirectory = void 0;
|
|
36
|
-
}, this.toggleSidebar = () => {
|
|
37
|
-
var i;
|
|
38
|
-
(i = this.layout) === null || i === void 0 || i.toggleSidebar();
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
renderNavigation() {
|
|
42
|
-
const t = Boolean(this.selectedDirectory) ? this.selectedDirectory.children : a.directories;
|
|
43
|
-
return t.length > 0 ? t.map((i) => e("flip-resource-list-item", {
|
|
44
|
-
description: i.description,
|
|
45
|
-
key: i.name,
|
|
46
|
-
label: i.name,
|
|
47
|
-
media: "type" in i ? "<flip-icon-file></flip-icon-file>" : "<flip-icon-folder-shared></flip-icon-folder-shared>",
|
|
48
|
-
onClick: () => this.selectItem(i)
|
|
49
|
-
})) : e("flip-box", { padding: "16" }, e("flip-text", { color: "subdued", weight: "medium" }, "This directory is empty."));
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
var t, i;
|
|
53
|
-
return e(n, null, e("flip-app-layout", { appName: "Documents", backToNavigationViewButtonLabel: "Back to documents list", ctaIcon: "<flip-icon-add></flip-icon-add>", ctaLabel: "Upload file", heading: (t = this.selectedFile) === null || t === void 0 ? void 0 : t.name, navigationLabel: "Documents", onNavigationBackButtonClick: this.resetSelectedDirectory, ref: (l) => this.layout = l, sidebarCloseButtonLabel: "Close file info", sidebarHeading: "File info", showNavigationBackButton: Boolean(this.selectedDirectory), subheading: (i = this.selectedFile) === null || i === void 0 ? void 0 : i.description, transitionStyle: "dialog" }, e("flip-resource-list", { label: "Documents", slot: "navigation" }, this.renderNavigation()), e("flip-button", { id: "sort-button", label: "Sort items", slot: "navigation-controls" }), Boolean(this.selectedFile) ? e("flip-file-viewer", { file: this.selectedFile.url, slot: "content", type: this.selectedFile.type }) : e("flip-box", { cover: !0, centerBlock: !0, centerInline: !0, padding: "16", slot: "content" }, e("flip-empty-state", { heading: "Nothing to see here.", illustration: "/images/empty-state-1.svg" }, "Please select a file from the list.")), e("div", { slot: "app-bar-controls" }, this.selectedFile && e("flip-button", { "hide-label": !0, class: "info-button", icon: "<flip-icon-info></flip-icon-info>", label: "Open file info", onClick: this.toggleSidebar })), e("flip-box", { padding: "16", slot: "sidebar" }, e("flip-text", { color: "subdued", weight: "medium" }, "File info goes here \u2026"))), e("flip-popover", { label: "Sort items", popoverId: "sort-menu", trigger: "sort-button" }, e("flip-option-list", { value: ["ascending"] }, e("flip-option-list-item", { icon: "<flip-icon-expand-less></flip-icon-expand-less>", label: "Ascending", value: "ascending" }), e("flip-option-list-item", { icon: "<flip-icon-expand-more></flip-icon-expand-more>", label: "Descending", value: "descending" }), e("flip-option-list-item", { icon: "<flip-icon-time-outlined></flip-icon-time-outlined>", label: "By date", value: "date" }))));
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
c as file_manager
|
|
58
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as e, h as i, H as a } from "./index.6f8c9509.js";
|
|
2
|
-
import { c as o } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const l = ":host{display:block}:host *{box-sizing:border-box}.action-list-item{display:inline-flex;width:100%;min-width:15rem;margin:0;padding:var(--s-space-12) var(--s-space-16);justify-content:flex-start;align-items:center;border:none;color:var(--s-text-default);background-color:var(--s-surface-overlay-default);font:inherit;line-height:var(--s-line-height-base);text-align:left;cursor:pointer;gap:var(--s-space-12)}.action-list-item:hover{background-color:var(--s-surface-overlay-hovered)}.action-list-item:focus{outline:none}.action-list-item:focus-visible{background-color:var(--s-surface-overlay-hovered)}.action-list-item:active{background-color:var(--s-surface-overlay-pressed)}.action-list-item:disabled{background-color:var(--s-surface-overlay-default);cursor:default}.action-list-item:disabled .action-list-item__label,.action-list-item:disabled .action-list-item__description{color:var(--s-text-disabled)}.action-list-item:disabled .action-list-item__icon{color:var(--s-icon-disabled)}.action-list-item--size-l{padding:var(--s-space-16)}.action-list-item--intent-critical ::part(icon){color:var(--s-icon-critical)}.action-list-item--intent-critical:not(:disabled) .action-list-item__label{color:var(--s-text-critical)}.action-list-item--intent-critical:not(:disabled) .action-list-item__icon{color:var(--s-icon-critical)}.action-list-item__icon{display:inline-flex;flex-shrink:0;color:var(--s-icon-default)}.action-list-item__label-container{display:inline-flex;min-width:0;flex-grow:1;align-items:flex-start;flex-direction:column}.action-list-item__label{overflow:hidden;max-width:100%;padding-top:0.0625rem;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.action-list-item__description{color:var(--s-text-subdued)}.action-list-item__suffix{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}", n = class {
|
|
7
|
-
constructor(t) {
|
|
8
|
-
e(this, t), this.intent = "default", this.size = "m";
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
const t = Boolean(this.suffix) && !this.disabled, s = o("action-list-item", `action-list-item--intent-${this.intent}`, `action-list-item--size-${this.size}`);
|
|
12
|
-
return i(a, null, i("button", { class: s, disabled: this.disabled, role: "menuitem", tabIndex: -1, type: "button" }, this.icon && i("span", { class: "action-list-item__icon", innerHTML: this.icon }), i("span", { class: "action-list-item__label-container" }, i("span", { class: "action-list-item__label" }, this.label), this.description && i("span", { class: "action-list-item__description" }, this.description)), t && i("span", { class: "action-list-item__suffix", innerHTML: this.suffix })));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
n.style = l;
|
|
16
|
-
export {
|
|
17
|
-
n as flip_action_list_item
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as i, h as t, H as o } from "./index.6f8c9509.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const e = ":host{display:block}:host *{box-sizing:border-box}.action-list-section{background-color:var(--s-surface-overlay-default)}.action-list-section__label{display:block;width:100%;padding:var(--s-space-8) var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default);color:var(--s-text-subdued);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}", l = class {
|
|
5
|
-
constructor(s) {
|
|
6
|
-
i(this, s);
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t(o, null, t("div", { "aria-labelledby": "label", class: "action-list-section", role: "group" }, t("span", { class: "action-list-section__label", id: "label" }, this.label), t("div", { class: "action-list-section__items" }, t("slot", null))));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
l.style = e;
|
|
13
|
-
export {
|
|
14
|
-
l as flip_action_list_section
|
|
15
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { r as n, c, h as o, H as u, g as r } from "./index.6f8c9509.js";
|
|
2
|
-
import { a as h, c as p, o as d } from "./floating-ui.dom.esm-1a4e8b8a.87557233.js";
|
|
3
|
-
import { c as m } from "./index-6d2e18c6.289636d4.js";
|
|
4
|
-
import { d as f } from "./utils-39b2afe8.37b54ba4.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
8
|
-
const b = ".sc-flip-autocomplete-h{display:block}.sc-flip-autocomplete-h *.sc-flip-autocomplete{box-sizing:border-box}.autocomplete--inactive.sc-flip-autocomplete .autocomplete__listbox-container.sc-flip-autocomplete{display:none}.autocomplete__listbox-container.sc-flip-autocomplete{position:fixed;z-index:var(--s-z-40);overflow:hidden;border-radius:var(--s-border-radius-sm);background-color:var(--s-surface-overlay-default);box-shadow:var(--s-shadow-level-1)}.autocomplete__spinner.sc-flip-autocomplete{display:flex;padding:var(--s-space-16);justify-content:center;align-items:center}", g = class {
|
|
9
|
-
constructor(s) {
|
|
10
|
-
n(this, s), this.valueChange = c(this, "valueChange", 7), this.clearable = !0, this.clearButtonLabel = "Clear input", this.generateSuggestions = async () => [], this.menuLabel = "Suggestions", this.active = !1, this.loading = !1, this.suggestions = [], this.onChange = f(async (t) => {
|
|
11
|
-
this.value = t.detail, this.valueChange.emit(this.value), this.updateSuggestions(), this.open();
|
|
12
|
-
}, 250, !1), this.onSelect = (t) => {
|
|
13
|
-
var i;
|
|
14
|
-
Boolean(t.detail[0]) && (this.value = t.detail[0], this.valueChange.emit(this.value)), (i = this.inputEl.querySelector("input")) === null || i === void 0 || i.focus(), this.close();
|
|
15
|
-
}, this.onFocusOut = (t) => {
|
|
16
|
-
const i = t.relatedTarget;
|
|
17
|
-
Boolean(i) && !this.el.contains(i) && this.close();
|
|
18
|
-
}, this.onFocus = () => {
|
|
19
|
-
this.updateSuggestions(), this.open();
|
|
20
|
-
}, this.onKeyDown = (t) => {
|
|
21
|
-
t.code === "Escape" && (t.preventDefault(), this.inputEl.querySelector("input").focus(), this.close());
|
|
22
|
-
}, this.onInputKeyDown = (t) => {
|
|
23
|
-
t.code === "ArrowDown" && (t.preventDefault(), this.listboxEl.querySelector('[role="listbox"]').focus());
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
componentWillLoad() {
|
|
27
|
-
const s = document.querySelectorAll("flip-datepicker").length;
|
|
28
|
-
this.id = `autocomplete-${s}`;
|
|
29
|
-
}
|
|
30
|
-
onWindowClick(s) {
|
|
31
|
-
const t = s.target;
|
|
32
|
-
this.el.contains(t) || this.close();
|
|
33
|
-
}
|
|
34
|
-
async close() {
|
|
35
|
-
!this.active || (this.disableAutoUpdate && this.disableAutoUpdate(), this.active = !1);
|
|
36
|
-
}
|
|
37
|
-
async open() {
|
|
38
|
-
this.active || (this.active = !0, requestAnimationFrame(async () => {
|
|
39
|
-
await this.reposition(), this.disableAutoUpdate && this.disableAutoUpdate(), this.disableAutoUpdate = h(this.inputEl, this.listboxContainerEl, this.reposition.bind(this)), this.listboxContainerEl.scrollTop = 0;
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
async reposition() {
|
|
43
|
-
!Boolean(this.listboxContainerEl) || (this.position = await p(this.inputEl, this.listboxContainerEl, {
|
|
44
|
-
middleware: [d({ crossAxis: -16, mainAxis: 16 })],
|
|
45
|
-
placement: "bottom-start",
|
|
46
|
-
strategy: "fixed"
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
async updateSuggestions() {
|
|
50
|
-
this.loading = !0, this.suggestions = [], this.suggestions = await this.generateSuggestions(this.value), this.loading = !1;
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
var s, t, i;
|
|
54
|
-
const l = `${this.id}-suggestions`, a = m("autocomplete", {
|
|
55
|
-
"autocomplete--inactive": !this.active
|
|
56
|
-
});
|
|
57
|
-
return o(u, null, o("div", { class: a, onFocusout: this.onFocusOut, onKeyDown: this.onKeyDown }, o("flip-text-input", { autoSelect: this.autoSelect, class: "autocomplete__input", clearable: this.clearable, clearButtonLabel: this.clearButtonLabel, disabled: this.disabled, disableDynamicWidth: !0, flipAriaAutocomplete: "list", flipAriaControls: l, flipAriaDescribedby: this.flipAriaDescribedby, flipAriaExpanded: String(this.active), flipRole: "combobox", id: this.id, invalid: this.invalid, onInputFocus: this.onFocus, onKeyDown: this.onInputKeyDown, onValueChange: this.onChange, maxLength: this.maxLength, mode: this.mode, ref: (e) => this.inputEl = e, required: this.required, spellCheck: this.spellCheck, value: this.value }), o("div", { class: "autocomplete__listbox-container", ref: (e) => this.listboxContainerEl = e, style: {
|
|
58
|
-
top: Boolean(this.position) ? `${(s = this.position) === null || s === void 0 ? void 0 : s.y}px` : "",
|
|
59
|
-
left: Boolean(this.position) ? `${(t = this.position) === null || t === void 0 ? void 0 : t.x}px` : "",
|
|
60
|
-
width: `${((i = this.inputEl) === null || i === void 0 ? void 0 : i.getBoundingClientRect().width) + 32}px`
|
|
61
|
-
} }, this.loading && o("div", { class: "autocomplete__spinner" }, o("flip-spinner", null)), o("flip-option-list", { label: this.menuLabel, onValueChange: this.onSelect, optionListId: l, ref: (e) => this.listboxEl = e, value: [this.value] }, this.suggestions.map((e) => o("flip-option-list-item", { selected: this.value === e.label, key: e.id, disabled: e.disabled, label: e.label, value: e.label }))))));
|
|
62
|
-
}
|
|
63
|
-
get el() {
|
|
64
|
-
return r(this);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
g.style = b;
|
|
68
|
-
export {
|
|
69
|
-
g as flip_autocomplete
|
|
70
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { r as i, h as a, H as s } from "./index.6f8c9509.js";
|
|
2
|
-
import { c as e } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const d = ":host{display:inline-flex}:host *{box-sizing:border-box}.avatar-group{position:relative;display:inline-grid;grid-template-rows:repeat(8, 1fr);grid-template-columns:repeat(8, 1fr)}.avatar-group ::slotted(*:first-of-type){z-index:1;display:inline-flex;border:0.25rem solid var(--flip-avatar-group-border-color);border-radius:50%;grid-column-start:1;grid-column-end:7;grid-row-start:3;grid-row-end:9}.avatar-group ::slotted(*:nth-of-type(2)){z-index:0;display:inline-flex;border:0.25rem solid var(--flip-avatar-group-border-color);border-radius:50%;grid-column-start:3;grid-column-end:9;grid-row-start:1;grid-row-end:7}.avatar-group__badge{position:absolute;z-index:2;right:0;bottom:0;display:inline-flex;width:1.5rem;height:1.5rem}", l = class {
|
|
7
|
-
constructor(r) {
|
|
8
|
-
i(this, r);
|
|
9
|
-
}
|
|
10
|
-
componentDidLoad() {
|
|
11
|
-
this.forceBadgeProps();
|
|
12
|
-
}
|
|
13
|
-
forceBadgeProps() {
|
|
14
|
-
if (!Boolean(this.badge))
|
|
15
|
-
return;
|
|
16
|
-
const r = this.badgeEl.querySelector("flip-badge");
|
|
17
|
-
r == null || r.setAttribute("size", "m");
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
const r = e("avatar-group", {
|
|
21
|
-
"avatar-group--has-badge": Boolean(this.badge)
|
|
22
|
-
}), o = e("avatar-group__badge");
|
|
23
|
-
return a(s, null, a("div", { class: r, role: "group" }, a("slot", null), this.badge && a("span", { class: o, innerHTML: this.badge, ref: (t) => this.badgeEl = t })));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
l.style = d;
|
|
27
|
-
export {
|
|
28
|
-
l as flip_avatar_group
|
|
29
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { r as t, h as e, H as i } from "./index.6f8c9509.js";
|
|
2
|
-
import { c as r } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const s = ":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border:0.25rem solid var(--flip-badge-border-color);border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium)}.badge--size-s{min-width:1.5rem;height:1.5rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.1875rem;padding-left:0.1875rem}.badge--size-s .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-m{min-width:2rem;height:2rem}.badge--size-m .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--variant-dot{width:1.25rem;min-width:0;height:1.25rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__label,.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}", n = class {
|
|
7
|
-
constructor(a) {
|
|
8
|
-
t(this, a), this.intent = "critical", this.size = "m", this.variant = "default";
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
const a = r("badge", `badge--intent-${this.intent}`, `badge--size-${this.size}`, `badge--variant-${this.variant}`, {
|
|
12
|
-
"badge--has-icon": this.icon
|
|
13
|
-
});
|
|
14
|
-
return e(i, { role: "status" }, e("span", { class: a }, this.icon && e("span", { class: "badge__icon", innerHTML: this.icon }), this.icon === void 0 && e("span", { class: "badge__label" }, this.label)));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
n.style = s;
|
|
18
|
-
export {
|
|
19
|
-
n as flip_badge
|
|
20
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { r, c as a, h as n, H as o, g as c } from "./index.6f8c9509.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 b = ":host{display:block}:host *{box-sizing:border-box}.banner{display:flex;max-width:100%;padding:var(--s-space-12);align-items:flex-start}.banner:focus:not(:focus-visible){outline:none}.banner:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-4)}@media (min-width: 768px){.banner{padding:var(--s-space-16)}}.banner--intent-default .banner__icon,.banner--intent-default .banner__content,.banner--intent-default .banner__action-button,.banner--intent-default .banner__dismiss-button,.banner--intent-critical .banner__icon,.banner--intent-critical .banner__content,.banner--intent-critical .banner__action-button,.banner--intent-critical .banner__dismiss-button,.banner--intent-success .banner__icon,.banner--intent-success .banner__content,.banner--intent-success .banner__action-button,.banner--intent-success .banner__dismiss-button,.banner--intent-info .banner__icon,.banner--intent-info .banner__content,.banner--intent-info .banner__action-button,.banner--intent-info .banner__dismiss-button{color:var(--s-text-on-status)}.banner--intent-default{background-color:var(--s-surface-neutral-default)}.banner--intent-critical{background-color:var(--s-surface-critical-default)}.banner--intent-success{background-color:var(--s-surface-success-default)}.banner--intent-info{background-color:var(--s-surface-info-default)}.banner--intent-warning{background-color:var(--s-surface-warning-default)}.banner--intent-warning .banner__icon{color:var(--s-icon-strong)}.banner--intent-warning .banner__content,.banner--intent-warning .banner__action-button,.banner--intent-warning .banner__dismiss-button{color:var(--s-text-default)}@media (min-width: 375px){.banner--has-icon .banner__content{padding-top:var(--s-space-2)}}.banner__icon{display:none;margin-right:var(--s-space-8);color:var(--s-icon-on-status)}@media (min-width: 375px){.banner__icon{display:inline-flex}}.banner__content{min-height:1.5rem;margin-right:var(--s-space-12);flex-grow:1;line-height:var(--s-line-height-base)}.banner__controls{display:inline-flex;margin-left:var(--s-space-16);align-items:center;line-height:var(--s-line-height-base);gap:var(--s-space-16)}@media (min-width: 768px){.banner__controls{gap:var(--s-space-24)}}.banner__action-button,.banner__dismiss-button{display:inline-flex;overflow:hidden;max-width:7rem;height:1.5rem;padding:0;flex-shrink:0;align-items:center;border:none;background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.banner__action-button:focus,.banner__dismiss-button:focus{outline-color:var(--s-focus-default)}@media (min-width: 768px){.banner__action-button,.banner__dismiss-button{max-width:12rem}}", d = {
|
|
7
|
-
default: void 0,
|
|
8
|
-
critical: "<flip-icon-error></flip-icon-error>",
|
|
9
|
-
success: "<flip-icon-check-circle></flip-icon-check-circle>",
|
|
10
|
-
warning: "<flip-icon-warning></flip-icon-warning>",
|
|
11
|
-
info: "<flip-icon-info></flip-icon-info>"
|
|
12
|
-
}, u = class {
|
|
13
|
-
constructor(i) {
|
|
14
|
-
r(this, i), this.action = a(this, "action", 7), this.dismiss = a(this, "dismiss", 7), this.dismissable = !1, this.dismissLabel = "Dismiss", this.importance = "status", this.intent = "default", this.showIcon = !1, this.onAction = (t) => {
|
|
15
|
-
this.action.emit(t);
|
|
16
|
-
}, this.onDismiss = (t) => {
|
|
17
|
-
this.dismiss.emit(t);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
const i = d[this.intent], t = Boolean(this.actionLabel) || this.dismissable, e = this.showIcon && Boolean(i), s = l("banner", `banner--intent-${this.intent}`, {
|
|
22
|
-
"banner--has-icon": e
|
|
23
|
-
});
|
|
24
|
-
return n(o, null, n("div", { "aria-describedby": "content", class: s, role: this.importance, tabIndex: 0 }, e && n("span", { "aria-hidden": "true", class: "banner__icon", innerHTML: i }), n("span", { class: "banner__content", id: "content" }, this.content), t && n("span", { class: "banner__controls" }, this.actionLabel && n("button", { class: "banner__action-button", onClick: this.onAction, type: "button" }, this.actionLabel), this.dismissable && n("button", { "aria-label": this.dismissLabel, class: "banner__dismiss-button", onClick: this.onDismiss, type: "button" }, n("flip-icon-close", null)))));
|
|
25
|
-
}
|
|
26
|
-
get element() {
|
|
27
|
-
return c(this);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
u.style = b;
|
|
31
|
-
export {
|
|
32
|
-
u as flip_banner
|
|
33
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { r as i, h as o, H as e } from "./index.6f8c9509.js";
|
|
2
|
-
import { c as s } 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}.button-group--segmented ::slotted(*:not(:last-child)){position:relative}.button-group--segmented ::slotted(*:not(:last-child)):after{position:absolute;z-index:1;top:50%;left:100%;width:var(--s-border-width-default);height:calc(100% - var(--s-space-16));background-color:var(--s-border-strong);content:"";transform:translate3d(-50%, -50%, 0);pointer-events:none}.button-group--segmented ::slotted(*:not(:last-child):not([disabled])[intent="primary"]):after{background-color:var(--s-text-on-action-primary)}.button-group--segmented ::slotted(*:not(:last-child)[disabled="false"][intent="primary"]):after{background-color:var(--s-text-on-action-primary)}.button-group--segmented ::slotted(*:not(:first-child):not(:last-child)){--flip-button-border-top-right-radius:0;--flip-button-border-top-left-radius:0;--flip-button-border-bottom-right-radius:0;--flip-button-border-bottom-left-radius:0;--flip-icon-button-border-top-right-radius:0;--flip-icon-button-border-top-left-radius:0;--flip-icon-button-border-bottom-right-radius:0;--flip-icon-button-border-bottom-left-radius:0}.button-group--segmented ::slotted(*:first-child){--flip-button-border-top-right-radius:0;--flip-button-border-bottom-right-radius:0;--flip-icon-button-border-top-right-radius:0;--flip-icon-button-border-bottom-right-radius:0;--flip-icon-button-border-top-left-radius:var(--s-border-radius-base);--flip-icon-button-border-bottom-left-radius:var(--s-border-radius-base)}.button-group--segmented ::slotted(*:last-child){--flip-button-border-top-left-radius:0;--flip-button-border-bottom-left-radius:0;--flip-icon-button-border-top-right-radius:var(--s-border-radius-base);--flip-icon-button-border-bottom-right-radius:var(--s-border-radius-base);--flip-icon-button-border-top-left-radius:0;--flip-icon-button-border-bottom-left-radius:0}', a = class {
|
|
7
|
-
constructor(t) {
|
|
8
|
-
i(this, t), this.orientation = "horizontal";
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
const t = this.segmented ? "0" : "8", r = s("button-group", {
|
|
12
|
-
"button-group--segmented": this.segmented
|
|
13
|
-
});
|
|
14
|
-
return o(e, null, o("flip-stack", { align: this.orientation === "vertical" && this.stretch ? "stretch" : "start", class: r, justify: this.orientation === "horizontal" && this.stretch ? "stretch" : "start", orientation: this.orientation, role: "group", spacing: t, wrap: this.wrap }, o("slot", null)));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
a.style = n;
|
|
18
|
-
export {
|
|
19
|
-
a as flip_button_group
|
|
20
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as e, h as n, H as l } from "./index.6f8c9509.js";
|
|
2
|
-
import { c as s } from "./index-6d2e18c6.289636d4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "./_commonjsHelpers-44457d8d.ba94af77.js";
|
|
6
|
-
const c = `.sc-flip-button-h{display:inline-block;max-width:100%;flex-shrink:0}.sc-flip-button-h *.sc-flip-button{box-sizing:border-box}.button.sc-flip-button{display:inline-flex;width:100%;padding:var(--s-space-8) var(--s-space-16);justify-content:center;align-items:center;border:none;border-top-left-radius:var(--flip-button-border-top-left-radius);border-top-right-radius:var(--flip-button-border-top-right-radius);border-bottom-right-radius:var(--flip-button-border-bottom-right-radius);border-bottom-left-radius:var(--flip-button-border-bottom-left-radius);color:var(--s-text-subdued);background-color:var(--flip-ghost-button-background-default);font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-lg);text-decoration:none;cursor:pointer;gap:var(--s-space-8)}.button.sc-flip-button:hover{background-color:var(--flip-ghost-button-background-hovered)}.button.sc-flip-button:active{background-color:var(--flip-ghost-button-background-pressed)}.button.sc-flip-button:disabled{color:var(--s-text-disabled);background-color:var(--flip-ghost-button-background-default);cursor:default}.button.sc-flip-button:disabled .button__icon.sc-flip-button{color:var(--s-icon-disabled)}.button.sc-flip-button:focus:not(:focus-visible){outline:none}.button.sc-flip-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.button--variant-ghost.button--intent-primary.sc-flip-button:not(:disabled){color:var(--s-text-highlight)}.button--variant-ghost.button--intent-primary.sc-flip-button:not(:disabled) .button__icon.sc-flip-button{color:var(--s-icon-highlight)}.button--variant-ghost.button--intent-critical.sc-flip-button:not(:disabled){color:var(--s-text-critical)}.button--variant-ghost.button--intent-critical.sc-flip-button:not(:disabled) .button__icon.sc-flip-button{color:var(--s-icon-critical)}.button--variant-ghost.button--size-l.sc-flip-button{padding:var(--s-space-12) var(--s-space-20)}.button--variant-ghost.button--size-l.button--icon-only.sc-flip-button{padding:var(--s-space-12)}.button--variant-flat.sc-flip-button{color:var(--s-text-default);background-color:var(--s-action-neutral-default)}.button--variant-flat.sc-flip-button:hover{background-color:var(--s-action-neutral-hovered)}.button--variant-flat.sc-flip-button:active{background-color:var(--s-action-neutral-pressed)}.button--variant-flat.sc-flip-button:disabled{background-color:var(--s-action-neutral-disabled)}.button--variant-flat.button--intent-primary.sc-flip-button:not(:disabled){color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.button--variant-flat.button--intent-primary.sc-flip-button:not(:disabled):hover{background-color:var(--s-action-primary-hovered)}.button--variant-flat.button--intent-primary.sc-flip-button:not(:disabled):active{background-color:var(--s-action-primary-pressed)}.button--variant-flat.button--intent-primary.sc-flip-button:not(:disabled) .button__icon.sc-flip-button{color:var(--s-icon-on-action-primary)}.button--variant-flat.sc-flip-button .button__icon.sc-flip-button{color:var(--s-icon-strong)}.button--variant-plain.sc-flip-button{padding:0;border-radius:0;color:var(--s-interactive-neutral-default);background-color:transparent}.button--variant-plain.sc-flip-button:hover:not(:disabled){color:var(--s-interactive-neutral-default);background-color:transparent;text-decoration:underline;text-underline-offset:var(--s-space-4)}.button--variant-plain.sc-flip-button:hover:not(:disabled) .button__icon.sc-flip-button{color:var(--s-interactive-neutral-default)}.button--variant-plain.sc-flip-button:active:not(:disabled){color:var(--s-interactive-neutral-hovered);background-color:transparent}.button--variant-plain.sc-flip-button:active:not(:disabled) .button__icon.sc-flip-button{color:var(--s-interactive-neutral-hovered)}.button--variant-plain.sc-flip-button:disabled{color:var(--s-interactive-neutral-disabled);background-color:transparent}.button--variant-plain.sc-flip-button:disabled .button__icon.sc-flip-button{color:var(--s-interactive-neutral-disabled)}.button--variant-plain.button--intent-primary.sc-flip-button{color:var(--s-interactive-primary-default)}.button--variant-plain.button--intent-primary.sc-flip-button:hover{color:var(--s-interactive-primary-default)}.button--variant-plain.button--intent-primary.sc-flip-button:hover .button__icon.sc-flip-button{color:var(--s-interactive-primary-default)}.button--variant-plain.button--intent-primary.sc-flip-button:active{color:var(--s-interactive-primary-hovered)}.button--variant-plain.button--intent-primary.sc-flip-button:active .button__icon.sc-flip-button{color:var(--s-interactive-primary-hovered)}.button--variant-plain.button--intent-primary.sc-flip-button:disabled{color:var(--s-interactive-primary-disabled)}.button--variant-plain.button--intent-primary.sc-flip-button:disabled .button__icon.sc-flip-button{color:var(--s-interactive-primary-disabled)}.button--variant-plain.button--intent-primary.sc-flip-button .button__icon.sc-flip-button{color:var(--s-interactive-primary-default)}.button--variant-plain.sc-flip-button .button__icon.sc-flip-button{color:var(--s-interactive-neutral-default)}.button--variant-on-image.sc-flip-button{color:var(--s-text-on-image);background:linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
|
|
7
|
-
rgba(255, 255, 255, 0.3)}.button--variant-on-image.sc-flip-button:hover{background:linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
|
|
8
|
-
rgba(255, 255, 255, 0.4)}.button--variant-on-image.sc-flip-button:active{background:linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
|
9
|
-
rgba(255, 255, 255, 0.5)}.button--variant-on-image.sc-flip-button:disabled{color:var(--s-text-on-image);background:linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
|
|
10
|
-
rgba(255, 255, 255, 0.3)}.button--variant-on-image.sc-flip-button:disabled .button__icon.sc-flip-button{color:var(--s-icon-on-image)}.button--variant-on-image.sc-flip-button .button__icon.sc-flip-button{color:var(--s-icon-on-image)}.button--variant-floating.sc-flip-button{color:var(--s-text-default);background-color:var(--s-surface-overlay-default);box-shadow:var(--s-shadow-level-1)}.button--variant-floating.sc-flip-button:hover{color:var(--s-text-on-action-primary);background-color:var(--s-surface-overlay-hovered)}.button--variant-floating.sc-flip-button:active{color:var(--s-text-on-action-primary);background-color:var(--s-surface-overlay-pressed)}.button--variant-floating.button--icon-only.sc-flip-button{padding:var(--s-space-12)}.button--variant-floating.button--intent-primary.sc-flip-button{padding:var(--s-space-12) var(--s-space-20);border-radius:1.5rem;color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.button--variant-floating.button--intent-primary.sc-flip-button:hover:not(:disabled){color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-hovered)}.button--variant-floating.button--intent-primary.sc-flip-button:active:not(:disabled){color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-pressed)}.button--variant-floating.button--intent-primary.sc-flip-button:disabled{color:var(--s-text-on-action-primary)}.button--variant-floating.button--intent-primary.sc-flip-button:disabled .button__icon.sc-flip-button{color:var(--s-icon-on-action-primary)}.button--variant-floating.button--intent-primary.button--icon-only.sc-flip-button{padding:var(--s-space-12)}.button--variant-floating.button--intent-primary.sc-flip-button .button__icon.sc-flip-button{color:var(--s-icon-on-action-primary)}.button--variant-floating.sc-flip-button .button__icon.sc-flip-button{color:var(--s-icon-strong)}.button--icon-position-end.sc-flip-button .button__icon.sc-flip-button{margin-right:calc(-1 * var(--s-space-4));margin-left:0;order:2}.button--icon-only.sc-flip-button{padding:var(--s-space-8);border-top-left-radius:var(--flip-icon-button-border-top-left-radius);border-top-right-radius:var(--flip-icon-button-border-top-right-radius);border-bottom-right-radius:var(
|
|
11
|
-
--flip-icon-button-border-bottom-right-radius
|
|
12
|
-
);border-bottom-left-radius:var(--flip-icon-button-border-bottom-left-radius)}.button--icon-only.sc-flip-button .button__icon.sc-flip-button{margin-right:0;margin-left:0}.button__icon.sc-flip-button{display:inline-flex;margin-left:calc(-1 * var(--s-space-4));color:var(--s-icon-default);order:0}.button__label.sc-flip-button{overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis;order:1}`, b = class {
|
|
13
|
-
constructor(t) {
|
|
14
|
-
e(this, t), this.iconPosition = "start", this.intent = "default", this.size = "m", this.type = "button", this.variant = "ghost";
|
|
15
|
-
}
|
|
16
|
-
componentDidLoad() {
|
|
17
|
-
this.forceIconProps();
|
|
18
|
-
}
|
|
19
|
-
forceIconProps() {
|
|
20
|
-
if (!Boolean(this.iconEl))
|
|
21
|
-
return;
|
|
22
|
-
const t = this.iconEl.children[0];
|
|
23
|
-
t == null || t.setAttribute("size", "24");
|
|
24
|
-
}
|
|
25
|
-
getAriaLabel(t) {
|
|
26
|
-
if (Boolean(this.flipAriaLabel))
|
|
27
|
-
return this.flipAriaLabel;
|
|
28
|
-
if (t)
|
|
29
|
-
return this.label;
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
const t = this.hideLabel && Boolean(this.icon) || this.variant === "floating" && this.intent === "default", o = Boolean(this.href), i = this.getAriaLabel(t), a = s("button", `button--icon-position-${this.iconPosition}`, `button--intent-${this.intent}`, `button--size-${this.size}`, `button--variant-${this.variant}`, {
|
|
33
|
-
"button--icon-only": t
|
|
34
|
-
});
|
|
35
|
-
return n(l, null, n(o ? "a" : "button", { "aria-describedby": this.flipAriaDescribedby, "aria-disabled": this.disabled && !o ? "true" : void 0, "aria-expanded": this.flipAriaExpanded, "aria-label": i, class: a, disabled: o ? void 0 : this.disabled, download: o ? void 0 : this.download, form: o ? void 0 : this.form, href: this.href, name: o ? void 0 : this.name, target: o ? this.target : void 0, type: o ? void 0 : this.type, value: o ? void 0 : this.value }, this.icon && n("span", { class: "button__icon", innerHTML: this.icon, ref: (r) => this.iconEl = r }), !t && n("span", { class: "button__label" }, this.label)));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
b.style = c;
|
|
39
|
-
export {
|
|
40
|
-
b as flip_button
|
|
41
|
-
};
|