@shineuix/ssr 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +111 -2
- package/THIRD-PARTY-NOTICES.md +256 -0
- package/dist/components/index.d.ts +329 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-0NNDSmh0.js +1 -0
- package/dist/components/p-1XW6gKXd.js +1 -0
- package/dist/components/p-2OGp7Y2F.js +1 -0
- package/dist/components/p-3rGcn3Dk.js +1 -0
- package/dist/components/p-B-eMraLN.js +1 -0
- package/dist/components/p-B1-k9bVs.js +1 -0
- package/dist/components/p-B3hr5-fa.js +1 -0
- package/dist/components/p-BB3IbuND.js +1 -0
- package/dist/components/p-BBNN1byS.js +1 -0
- package/dist/components/p-BE4gZZNA.js +1 -0
- package/dist/components/p-BHB1Wprj.js +1 -0
- package/dist/components/p-BJYToX7G.js +1 -0
- package/dist/components/p-BLK-elHV.js +1 -0
- package/dist/components/p-BLxI_QCP.js +1 -0
- package/dist/components/p-BM1Zzj1H.js +1 -0
- package/dist/components/p-BOdn2vI7.js +1 -0
- package/dist/components/p-BQJXtvhG.js +1 -0
- package/dist/components/p-BSSeip34.js +1 -0
- package/dist/components/p-BU3LJP5B.js +1 -0
- package/dist/components/p-BUqcDxTK.js +1 -0
- package/dist/components/p-BWkzTEZX.js +1 -0
- package/dist/components/p-BeYfX4rQ.js +1 -0
- package/dist/components/p-BfkKvKcf.js +1 -0
- package/dist/components/p-BglXr2C4.js +1 -0
- package/dist/components/p-BirQihPv.js +1 -0
- package/dist/components/p-BkdpcGfq.js +1 -0
- package/dist/components/p-BnZU02lM.js +1 -0
- package/dist/components/p-Bpr2o3vT.js +1 -0
- package/dist/components/p-BpxmwysK.js +1 -0
- package/dist/components/p-Bt5Kx3zM.js +1 -0
- package/dist/components/p-BtgC2u2Q.js +1 -0
- package/dist/components/p-Btp15dVO.js +1 -0
- package/dist/components/p-BuyjS5bS.js +1 -0
- package/dist/components/p-BwHBOv1l.js +1 -0
- package/dist/components/p-BwkaZsaT.js +1 -0
- package/dist/components/p-Bzu70qWq.js +1 -0
- package/dist/components/p-C-6_KLLy.js +1 -0
- package/dist/components/p-C-tuu2jV.js +1 -0
- package/dist/components/p-C2EJFbyf.js +1 -0
- package/dist/components/p-C5TSOOMd.js +1 -0
- package/dist/components/p-C6J9xhWE.js +1 -0
- package/dist/components/p-C6hsDVJk.js +1 -0
- package/dist/components/p-CBiEHE-i.js +1 -0
- package/dist/components/p-CDaU9b47.js +1 -0
- package/dist/components/p-CDiy2nTd.js +1 -0
- package/dist/components/p-CFn_q23Q.js +1 -0
- package/dist/components/p-CGWvlrv_.js +1 -0
- package/dist/components/p-CJT4wCXG.js +47 -0
- package/dist/components/p-CSPVrtqf.js +1 -0
- package/dist/components/p-CUB_NKYi.js +1 -0
- package/dist/components/p-CYlxvoVo.js +1 -0
- package/dist/components/p-CZ4DDtn8.js +1 -0
- package/dist/components/p-CZWUeOlG.js +1 -0
- package/dist/components/p-CaekSnKG.js +1 -0
- package/dist/components/p-Cb1wtfPJ.js +1 -0
- package/dist/components/p-Cb50ss23.js +1 -0
- package/dist/components/p-Cbd6cMaD.js +1 -0
- package/dist/components/p-CeVlau-G.js +1 -0
- package/dist/components/p-CiFpI_XW.js +1 -0
- package/dist/components/p-CmEfiaNv.js +1 -0
- package/dist/components/p-CmqQjlaI.js +1 -0
- package/dist/components/p-CqvOA-0K.js +1 -0
- package/dist/components/p-CrVcfwMC.js +1 -0
- package/dist/components/p-D00-pPuH.js +1 -0
- package/dist/components/p-D0BIoHLP.js +1 -0
- package/dist/components/p-D0WdoZzs.js +1 -0
- package/dist/components/p-D1HckqwW.js +1 -0
- package/dist/components/p-D3Vt3xcn.js +1 -0
- package/dist/components/p-DAfCbU7H.js +1 -0
- package/dist/components/p-DDyzuLfq.js +1 -0
- package/dist/components/p-DIvvXo_w.js +1 -0
- package/dist/components/p-DNXYH-fW.js +1 -0
- package/dist/components/p-DRMr6xXH.js +1 -0
- package/dist/components/p-DW6x7zfX.js +1 -0
- package/dist/components/p-DWqzHMCu.js +1 -0
- package/dist/components/p-DX9wgxoJ.js +1 -0
- package/dist/components/p-DZRA7Q7l.js +1 -0
- package/dist/components/p-D_S99uS1.js +1 -0
- package/dist/components/p-Da6TsjCG.js +1 -0
- package/dist/components/p-DbF8ArKE.js +1 -0
- package/dist/components/p-Dh0O8nfH.js +1 -0
- package/dist/components/p-DpbLhd6d.js +1 -0
- package/dist/components/p-DquILvXX.js +1 -0
- package/dist/components/p-DsHK25q3.js +1 -0
- package/dist/components/p-DthM6mDw.js +1 -0
- package/dist/components/p-DuYxgKgU.js +1 -0
- package/dist/components/p-ES48zkCT.js +1 -0
- package/dist/components/p-FKYMQPFB.js +1 -0
- package/dist/components/p-G2jDNXXR.js +1 -0
- package/dist/components/p-GAnFXayY.js +1 -0
- package/dist/components/p-M0fYQCIv.js +1 -0
- package/dist/components/p-MsqFuhDd.js +1 -0
- package/dist/components/p-U06fVoGD.js +1 -0
- package/dist/components/p-UtUl_rX-.js +1 -0
- package/dist/components/p-VFpQ6hXH.js +1 -0
- package/dist/components/p-b5Ks_pUg.js +1 -0
- package/dist/components/p-czkAmPgI.js +1 -0
- package/dist/components/p-hbVWBG4S.js +1 -0
- package/dist/components/p-kDhmjEYc.js +1 -0
- package/dist/components/p-lu4HWrMJ.js +1 -0
- package/dist/components/p-mEOcDy5S.js +1 -0
- package/dist/components/p-nX8XMRk5.js +1 -0
- package/dist/components/p-piEUki9n.js +1 -0
- package/dist/components/p-q0JbXN8q.js +1 -0
- package/dist/components/p-qjuvplfX.js +1 -0
- package/dist/components/p-qtQ1008P.js +1 -0
- package/dist/components/p-qut9RP2y.js +1 -0
- package/dist/components/p-wknHx00K.js +1 -0
- package/dist/components/sui-accordion-item.d.ts +11 -0
- package/dist/components/sui-accordion-item.js +1 -0
- package/dist/components/sui-accordion.d.ts +11 -0
- package/dist/components/sui-accordion.js +1 -0
- package/dist/components/sui-anchor.d.ts +11 -0
- package/dist/components/sui-anchor.js +1 -0
- package/dist/components/sui-auto-complete.d.ts +11 -0
- package/dist/components/sui-auto-complete.js +1 -0
- package/dist/components/sui-avatar-group.d.ts +11 -0
- package/dist/components/sui-avatar-group.js +1 -0
- package/dist/components/sui-avatar.d.ts +11 -0
- package/dist/components/sui-avatar.js +1 -0
- package/dist/components/sui-badge.d.ts +11 -0
- package/dist/components/sui-badge.js +1 -0
- package/dist/components/sui-block-ui.d.ts +11 -0
- package/dist/components/sui-block-ui.js +1 -0
- package/dist/components/sui-board.d.ts +11 -0
- package/dist/components/sui-board.js +1 -0
- package/dist/components/sui-bottom-nav.d.ts +11 -0
- package/dist/components/sui-bottom-nav.js +1 -0
- package/dist/components/sui-breadcrumb.d.ts +11 -0
- package/dist/components/sui-breadcrumb.js +1 -0
- package/dist/components/sui-button-group.d.ts +11 -0
- package/dist/components/sui-button-group.js +1 -0
- package/dist/components/sui-button.d.ts +11 -0
- package/dist/components/sui-button.js +1 -0
- package/dist/components/sui-calendar.d.ts +11 -0
- package/dist/components/sui-calendar.js +1 -0
- package/dist/components/sui-card.d.ts +11 -0
- package/dist/components/sui-card.js +1 -0
- package/dist/components/sui-carousel.d.ts +11 -0
- package/dist/components/sui-carousel.js +1 -0
- package/dist/components/sui-cascade-select.d.ts +11 -0
- package/dist/components/sui-cascade-select.js +1 -0
- package/dist/components/sui-chart-bar.d.ts +11 -0
- package/dist/components/sui-chart-bar.js +1 -0
- package/dist/components/sui-chart-candlestick.d.ts +11 -0
- package/dist/components/sui-chart-candlestick.js +1 -0
- package/dist/components/sui-chart-combo.d.ts +11 -0
- package/dist/components/sui-chart-combo.js +1 -0
- package/dist/components/sui-chart-gauge.d.ts +11 -0
- package/dist/components/sui-chart-gauge.js +1 -0
- package/dist/components/sui-chart-heatmap.d.ts +11 -0
- package/dist/components/sui-chart-heatmap.js +1 -0
- package/dist/components/sui-chart-line.d.ts +11 -0
- package/dist/components/sui-chart-line.js +1 -0
- package/dist/components/sui-chart-navigator.d.ts +11 -0
- package/dist/components/sui-chart-navigator.js +1 -0
- package/dist/components/sui-chart-pie.d.ts +11 -0
- package/dist/components/sui-chart-pie.js +1 -0
- package/dist/components/sui-chart-radar.d.ts +11 -0
- package/dist/components/sui-chart-radar.js +1 -0
- package/dist/components/sui-chart-scatter.d.ts +11 -0
- package/dist/components/sui-chart-scatter.js +1 -0
- package/dist/components/sui-chart-synced.d.ts +11 -0
- package/dist/components/sui-chart-synced.js +1 -0
- package/dist/components/sui-chart-treemap.d.ts +11 -0
- package/dist/components/sui-chart-treemap.js +1 -0
- package/dist/components/sui-chart-waterfall.d.ts +11 -0
- package/dist/components/sui-chart-waterfall.js +1 -0
- package/dist/components/sui-checkbox-group.d.ts +11 -0
- package/dist/components/sui-checkbox-group.js +1 -0
- package/dist/components/sui-checkbox.d.ts +11 -0
- package/dist/components/sui-checkbox.js +1 -0
- package/dist/components/sui-chip.d.ts +11 -0
- package/dist/components/sui-chip.js +1 -0
- package/dist/components/sui-choice-cards.d.ts +11 -0
- package/dist/components/sui-choice-cards.js +1 -0
- package/dist/components/sui-code-block.d.ts +11 -0
- package/dist/components/sui-code-block.js +1 -0
- package/dist/components/sui-color-editor.d.ts +11 -0
- package/dist/components/sui-color-editor.js +1 -0
- package/dist/components/sui-color-picker.d.ts +11 -0
- package/dist/components/sui-color-picker.js +1 -0
- package/dist/components/sui-command-palette.d.ts +11 -0
- package/dist/components/sui-command-palette.js +1 -0
- package/dist/components/sui-config-list.d.ts +11 -0
- package/dist/components/sui-config-list.js +1 -0
- package/dist/components/sui-config-row.d.ts +11 -0
- package/dist/components/sui-config-row.js +1 -0
- package/dist/components/sui-confirm-dialog.d.ts +11 -0
- package/dist/components/sui-confirm-dialog.js +1 -0
- package/dist/components/sui-confirm-popup.d.ts +11 -0
- package/dist/components/sui-confirm-popup.js +1 -0
- package/dist/components/sui-context-menu.d.ts +11 -0
- package/dist/components/sui-context-menu.js +1 -0
- package/dist/components/sui-copy-button.d.ts +11 -0
- package/dist/components/sui-copy-button.js +1 -0
- package/dist/components/sui-data-grid.d.ts +11 -0
- package/dist/components/sui-data-grid.js +1 -0
- package/dist/components/sui-data-table.d.ts +11 -0
- package/dist/components/sui-data-table.js +1 -0
- package/dist/components/sui-data-view.d.ts +11 -0
- package/dist/components/sui-data-view.js +1 -0
- package/dist/components/sui-date-picker.d.ts +11 -0
- package/dist/components/sui-date-picker.js +1 -0
- package/dist/components/sui-description-list.d.ts +11 -0
- package/dist/components/sui-description-list.js +1 -0
- package/dist/components/sui-dialog.d.ts +11 -0
- package/dist/components/sui-dialog.js +1 -0
- package/dist/components/sui-divider.d.ts +11 -0
- package/dist/components/sui-divider.js +1 -0
- package/dist/components/sui-dock.d.ts +11 -0
- package/dist/components/sui-dock.js +1 -0
- package/dist/components/sui-drawer.d.ts +11 -0
- package/dist/components/sui-drawer.js +1 -0
- package/dist/components/sui-edit-box.d.ts +11 -0
- package/dist/components/sui-edit-box.js +1 -0
- package/dist/components/sui-empty-state.d.ts +11 -0
- package/dist/components/sui-empty-state.js +1 -0
- package/dist/components/sui-fieldset.d.ts +11 -0
- package/dist/components/sui-fieldset.js +1 -0
- package/dist/components/sui-file-upload.d.ts +11 -0
- package/dist/components/sui-file-upload.js +1 -0
- package/dist/components/sui-filter-builder.d.ts +11 -0
- package/dist/components/sui-filter-builder.js +1 -0
- package/dist/components/sui-filter-panel.d.ts +11 -0
- package/dist/components/sui-filter-panel.js +1 -0
- package/dist/components/sui-float-label.d.ts +11 -0
- package/dist/components/sui-float-label.js +1 -0
- package/dist/components/sui-fluid.d.ts +11 -0
- package/dist/components/sui-fluid.js +1 -0
- package/dist/components/sui-form-actions.d.ts +11 -0
- package/dist/components/sui-form-actions.js +1 -0
- package/dist/components/sui-form-layout.d.ts +11 -0
- package/dist/components/sui-form-layout.js +1 -0
- package/dist/components/sui-form.d.ts +11 -0
- package/dist/components/sui-form.js +1 -0
- package/dist/components/sui-galleria.d.ts +11 -0
- package/dist/components/sui-galleria.js +1 -0
- package/dist/components/sui-icon-button.d.ts +11 -0
- package/dist/components/sui-icon-button.js +1 -0
- package/dist/components/sui-icon-field.d.ts +11 -0
- package/dist/components/sui-icon-field.js +1 -0
- package/dist/components/sui-ifta-label.d.ts +11 -0
- package/dist/components/sui-ifta-label.js +1 -0
- package/dist/components/sui-image-compare.d.ts +11 -0
- package/dist/components/sui-image-compare.js +1 -0
- package/dist/components/sui-image.d.ts +11 -0
- package/dist/components/sui-image.js +1 -0
- package/dist/components/sui-inplace.d.ts +11 -0
- package/dist/components/sui-inplace.js +1 -0
- package/dist/components/sui-input-group-addon.d.ts +11 -0
- package/dist/components/sui-input-group-addon.js +1 -0
- package/dist/components/sui-input-group.d.ts +11 -0
- package/dist/components/sui-input-group.js +1 -0
- package/dist/components/sui-input-mask.d.ts +11 -0
- package/dist/components/sui-input-mask.js +1 -0
- package/dist/components/sui-input-number.d.ts +11 -0
- package/dist/components/sui-input-number.js +1 -0
- package/dist/components/sui-input-otp.d.ts +11 -0
- package/dist/components/sui-input-otp.js +1 -0
- package/dist/components/sui-input-tags.d.ts +11 -0
- package/dist/components/sui-input-tags.js +1 -0
- package/dist/components/sui-input-text.d.ts +11 -0
- package/dist/components/sui-input-text.js +1 -0
- package/dist/components/sui-kbd.d.ts +11 -0
- package/dist/components/sui-kbd.js +1 -0
- package/dist/components/sui-knob.d.ts +11 -0
- package/dist/components/sui-knob.js +1 -0
- package/dist/components/sui-list.d.ts +11 -0
- package/dist/components/sui-list.js +1 -0
- package/dist/components/sui-listbox.d.ts +11 -0
- package/dist/components/sui-listbox.js +1 -0
- package/dist/components/sui-mega-menu.d.ts +11 -0
- package/dist/components/sui-mega-menu.js +1 -0
- package/dist/components/sui-menu.d.ts +11 -0
- package/dist/components/sui-menu.js +1 -0
- package/dist/components/sui-menubar.d.ts +11 -0
- package/dist/components/sui-menubar.js +1 -0
- package/dist/components/sui-message.d.ts +11 -0
- package/dist/components/sui-message.js +1 -0
- package/dist/components/sui-meter-group.d.ts +11 -0
- package/dist/components/sui-meter-group.js +1 -0
- package/dist/components/sui-mini-toolbar.d.ts +11 -0
- package/dist/components/sui-mini-toolbar.js +1 -0
- package/dist/components/sui-multi-select.d.ts +11 -0
- package/dist/components/sui-multi-select.js +1 -0
- package/dist/components/sui-notification-center.d.ts +11 -0
- package/dist/components/sui-notification-center.js +1 -0
- package/dist/components/sui-order-list.d.ts +11 -0
- package/dist/components/sui-order-list.js +1 -0
- package/dist/components/sui-org-chart.d.ts +11 -0
- package/dist/components/sui-org-chart.js +1 -0
- package/dist/components/sui-overlay-badge.d.ts +11 -0
- package/dist/components/sui-overlay-badge.js +1 -0
- package/dist/components/sui-page-header.d.ts +11 -0
- package/dist/components/sui-page-header.js +1 -0
- package/dist/components/sui-paginator.d.ts +11 -0
- package/dist/components/sui-paginator.js +1 -0
- package/dist/components/sui-panel-menu.d.ts +11 -0
- package/dist/components/sui-panel-menu.js +1 -0
- package/dist/components/sui-panel.d.ts +11 -0
- package/dist/components/sui-panel.js +1 -0
- package/dist/components/sui-password.d.ts +11 -0
- package/dist/components/sui-password.js +1 -0
- package/dist/components/sui-persona.d.ts +11 -0
- package/dist/components/sui-persona.js +1 -0
- package/dist/components/sui-pick-list.d.ts +11 -0
- package/dist/components/sui-pick-list.js +1 -0
- package/dist/components/sui-popover.d.ts +11 -0
- package/dist/components/sui-popover.js +1 -0
- package/dist/components/sui-progress-bar.d.ts +11 -0
- package/dist/components/sui-progress-bar.js +1 -0
- package/dist/components/sui-progress-ring.d.ts +11 -0
- package/dist/components/sui-progress-ring.js +1 -0
- package/dist/components/sui-progress-spinner.d.ts +11 -0
- package/dist/components/sui-progress-spinner.js +1 -0
- package/dist/components/sui-qr-code.d.ts +11 -0
- package/dist/components/sui-qr-code.js +1 -0
- package/dist/components/sui-radio-button.d.ts +11 -0
- package/dist/components/sui-radio-button.js +1 -0
- package/dist/components/sui-radio-group.d.ts +11 -0
- package/dist/components/sui-radio-group.js +1 -0
- package/dist/components/sui-rating.d.ts +11 -0
- package/dist/components/sui-rating.js +1 -0
- package/dist/components/sui-rich-text-editor.d.ts +11 -0
- package/dist/components/sui-rich-text-editor.js +1 -0
- package/dist/components/sui-save-status.d.ts +11 -0
- package/dist/components/sui-save-status.js +1 -0
- package/dist/components/sui-scheduler-builder.d.ts +11 -0
- package/dist/components/sui-scheduler-builder.js +1 -0
- package/dist/components/sui-scroll-panel.d.ts +11 -0
- package/dist/components/sui-scroll-panel.js +1 -0
- package/dist/components/sui-scroll-top.d.ts +11 -0
- package/dist/components/sui-scroll-top.js +1 -0
- package/dist/components/sui-select-button.d.ts +11 -0
- package/dist/components/sui-select-button.js +1 -0
- package/dist/components/sui-select.d.ts +11 -0
- package/dist/components/sui-select.js +1 -0
- package/dist/components/sui-side-nav.d.ts +11 -0
- package/dist/components/sui-side-nav.js +1 -0
- package/dist/components/sui-skeleton-card.d.ts +11 -0
- package/dist/components/sui-skeleton-card.js +1 -0
- package/dist/components/sui-skeleton.d.ts +11 -0
- package/dist/components/sui-skeleton.js +1 -0
- package/dist/components/sui-slider.d.ts +11 -0
- package/dist/components/sui-slider.js +1 -0
- package/dist/components/sui-sparkline.d.ts +11 -0
- package/dist/components/sui-sparkline.js +1 -0
- package/dist/components/sui-speed-dial.d.ts +11 -0
- package/dist/components/sui-speed-dial.js +1 -0
- package/dist/components/sui-split-button.d.ts +11 -0
- package/dist/components/sui-split-button.js +1 -0
- package/dist/components/sui-splitter.d.ts +11 -0
- package/dist/components/sui-splitter.js +1 -0
- package/dist/components/sui-spoiler.d.ts +11 -0
- package/dist/components/sui-spoiler.js +1 -0
- package/dist/components/sui-stat-card.d.ts +11 -0
- package/dist/components/sui-stat-card.js +1 -0
- package/dist/components/sui-stepper.d.ts +11 -0
- package/dist/components/sui-stepper.js +1 -0
- package/dist/components/sui-tab.d.ts +11 -0
- package/dist/components/sui-tab.js +1 -0
- package/dist/components/sui-tabs.d.ts +11 -0
- package/dist/components/sui-tabs.js +1 -0
- package/dist/components/sui-tag.d.ts +11 -0
- package/dist/components/sui-tag.js +1 -0
- package/dist/components/sui-terminal.d.ts +11 -0
- package/dist/components/sui-terminal.js +1 -0
- package/dist/components/sui-textarea.d.ts +11 -0
- package/dist/components/sui-textarea.js +1 -0
- package/dist/components/sui-theme-picker.d.ts +11 -0
- package/dist/components/sui-theme-picker.js +1 -0
- package/dist/components/sui-tiered-menu.d.ts +11 -0
- package/dist/components/sui-tiered-menu.js +1 -0
- package/dist/components/sui-time-picker.d.ts +11 -0
- package/dist/components/sui-time-picker.js +1 -0
- package/dist/components/sui-timeline.d.ts +11 -0
- package/dist/components/sui-timeline.js +1 -0
- package/dist/components/sui-toast-host.d.ts +11 -0
- package/dist/components/sui-toast-host.js +1 -0
- package/dist/components/sui-toggle-button.d.ts +11 -0
- package/dist/components/sui-toggle-button.js +1 -0
- package/dist/components/sui-toggle-switch.d.ts +11 -0
- package/dist/components/sui-toggle-switch.js +1 -0
- package/dist/components/sui-toolbar.d.ts +11 -0
- package/dist/components/sui-toolbar.js +1 -0
- package/dist/components/sui-tooltip.d.ts +11 -0
- package/dist/components/sui-tooltip.js +1 -0
- package/dist/components/sui-tour.d.ts +11 -0
- package/dist/components/sui-tour.js +1 -0
- package/dist/components/sui-tree-select.d.ts +11 -0
- package/dist/components/sui-tree-select.js +1 -0
- package/dist/components/sui-tree-table.d.ts +11 -0
- package/dist/components/sui-tree-table.js +1 -0
- package/dist/components/sui-tree.d.ts +11 -0
- package/dist/components/sui-tree.js +1 -0
- package/dist/components/sui-trend.d.ts +11 -0
- package/dist/components/sui-trend.js +1 -0
- package/dist/components/sui-virtual-scroller.d.ts +11 -0
- package/dist/components/sui-virtual-scroller.js +1 -0
- package/dist/hydrate/index.d.ts +287 -0
- package/dist/hydrate/index.js +1 -0
- package/dist/hydrate/index.mjs +1 -0
- package/dist/hydrate/package.json +13 -0
- package/dist/index.cjs +55 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.mjs +59 -0
- package/package.json +131 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as i,c as s,h as t,a as d,t as r}from"./p-CeVlau-G.js";import{p as n}from"./p-qut9RP2y.js";import{i as u,d as o,j as l,g as a,k as c,c as h,n as v,o as b,p}from"./p-czkAmPgI.js";import{formatTimeOfDay as f,uses24HourClock as m}from"./p-CSPVrtqf.js";import{G as y,y as w}from"./p-BeYfX4rQ.js";import{u as g}from"./p-U06fVoGD.js";import{d as k}from"./p-BHB1Wprj.js";import{i as x,a as D,l as C,u as M}from"./p-BuyjS5bS.js";import{d as j}from"./p-hbVWBG4S.js";import{d as S}from"./p-CqvOA-0K.js";import{d as O}from"./p-G2jDNXXR.js";import{defineCustomElement as z}from"./p-CBiEHE-i.js";import{defineCustomElement as T}from"./p-FKYMQPFB.js";import{defineCustomElement as W}from"./p-CDiy2nTd.js";import{d as A}from"./p-BkdpcGfq.js";import{d as E}from"./p-Cb1wtfPJ.js";import{d as N}from"./p-b5Ks_pUg.js";const F=[["Mo","Monday",1],["Tu","Tuesday",2],["We","Wednesday",3],["Th","Thursday",4],["Fr","Friday",5],["Sa","Saturday",6],["Su","Sunday",0]],B=["January","February","March","April","May","June","July","August","September","October","November","December"],H=["first","second","third","fourth","last"],J=["minute","hour","day","week","month","year"],R=["as-scheduled","previous","next","skip"],P=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),I=(e,i)=>Math.round((Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5),G=e=>0===e.getDay()||6===e.getDay();function U(e){if(null==e||""===e)return null;if(e instanceof Date)return isNaN(e.getTime())?null:P(e);const i=/^(\d{4})-(\d{2})-(\d{2})/.exec((e+"").trim());if(!i)return null;const s=new Date(+i[1],+i[2]-1,+i[3]);return isNaN(s.getTime())?null:s}function Y(e){const i=/^(\d{1,2}):(\d{2})\s*(AM|PM)?$/i.exec((e||"").trim());if(!i)return 0;let s=+i[1];const t=+i[2];return i[3]&&(s%=12,/pm/i.test(i[3])&&(s+=12)),s>23||t>59?0:60*s+t}function q(e){const i=Math.floor(e/60)%24,s=i>=12?"PM":"AM";return(i%12==0?12:i%12)+":"+n(e%60)+" "+s}function L(e){return F.filter((i=>e.includes(i[0]))).map((e=>e[1]))}function V(e){return F.find((i=>i[2]===e))[1]}function $(e,i,s,t){const d=new Date(e,i,1),r=d.getFullYear(),n=d.getMonth(),u=F.find((e=>e[1]===t));if(!u)return null;const l=u[2];if("last"===s){let e=new Date(r,n+1,0);for(;e.getDay()!==l;)e=o(e,-1);return e}const a={first:1,second:2,third:3,fourth:4}[s];let c=new Date(r,n,1),h=0;for(;c.getMonth()===n;){if(c.getDay()===l&&(h++,h===a))return c;c=o(c,1)}return null}function K(e,i){if(!G(e))return e;if("skip"===i)return null;const s="previous"===i?-1:"next"===i?1:0;if(!s)return e;let t=e;for(;G(t);)t=o(t,s);return t}const X=(e,i,s)=>i.includes(e)?e:s,Q=(e,i)=>"string"==typeof e&&/^\d{1,2}:\d{2}\s*(AM|PM)?$/i.test(e.trim())?q(Y(e)):i,_=(e,i)=>{const s="number"==typeof e?e:parseFloat(e+"");return isFinite(s)&&s>=1?Math.floor(s):i},Z=e=>"minute"===e||"hour"===e,ee=e=>"day"===e||"month"===e||"year"===e;function ie(e,i){const s=L(e.weekdays),t=Z(e.unit),d={every:e.every,unit:e.unit};return"week"===e.unit&&(d.weekdays=s),t&&(d.window={from:e.windowFrom,to:e.windowTo},s.length&&s.length<7&&(d.weekdays=s)),"month"===e.unit&&(d.monthly="day"===e.monthlyMode?{mode:"dayOfMonth",day:e.dayOfMonth}:{mode:"nthWeekday",ordinal:e.ordinal,weekday:e.weekday}),"year"===e.unit&&(d.annual={month:B[e.month],day:e.day}),{version:2,timezone:i,start:{date:u(e.startDate),time:e.startTime},repeat:d,businessDays:{rule:ee(e.unit)?e.businessDays:"as-scheduled"},end:"never"===e.endType?{type:"never"}:"on"===e.endType?{type:"onDate",date:e.endDate?u(e.endDate):null}:{type:"afterRuns",count:e.endCount}}}const se=(e,i)=>f(60*Y(e),i,m(i)),te=(e,i)=>{try{return new Intl.ListFormat(i,{type:"conjunction",style:"long"}).format(e)}catch{return e.join(", ")}},de=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.suiChange=s(this,"suiChange",7)}get host(){return this}variant="desktop";label;timezone;config;todayDate;disabled=!1;hideJson=!1;suiChange;s;jsonOpen=!1;fieldId=g("sui-scheduler-builder");writing=!1;resolvedFrom;zone(){if(this.timezone)return this.timezone;try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e)return e}catch(e){}return"UTC"}componentWillLoad(){this.resolve()}componentWillRender(){this.config!==this.resolvedFrom&&this.resolve()}componentDidLoad(){this.emit()}onConfigChange(){this.writing||this.resolve()}onTodayChange(){this.config&&this.config.startDate||this.resolve()}async getConfig(){return ie(this.s,this.zone())}async setFocus(){const e=this.firstControl();e&&"function"==typeof e.setFocus?await e.setFocus():e?.focus()}connectedCallback(){k(this.host,(()=>this.firstControl()))}firstControl(){return this.host.querySelector(".field.date sui-date-picker")}today(){return U(this.todayDate)||new Date}resolve(){this.resolvedFrom=this.config,this.s=function(e,i=new Date){const s=e||{},t=F.map((e=>e[0])),d=Array.isArray(s.weekdays)?t.filter((e=>s.weekdays.includes(e))):["Mo","We","Fr"];return{startDate:U(s.startDate)||P(i),startTime:Q(s.startTime,"9:00 AM"),every:_(s.every,1),unit:X(s.unit,J,"week"),weekdays:d,monthlyMode:X(s.monthlyMode,["day","nth"],"day"),dayOfMonth:Math.min(31,_(s.dayOfMonth,15)),ordinal:X(s.ordinal,H,"first"),weekday:X(s.weekday,F.map((e=>e[1])),"Monday"),month:"number"==typeof s.month&&s.month>=0&&s.month<=11?Math.floor(s.month):0,day:Math.min(31,_(s.day,15)),windowFrom:Q(s.windowFrom,"8:00 AM"),windowTo:Q(s.windowTo,"6:00 PM"),businessDays:X(s.businessDays,R,"as-scheduled"),endType:X(s.endType,["never","on","after"],"never"),endDate:U(s.endDate),endCount:_(s.endCount,12)}}(this.config,this.today())}emit(){this.suiChange.emit({config:ie(this.s,this.zone()),sentence:this.sentence(x())})}update(e){this.s={...this.s,...e},this.writing=!0,this.config=this.resolvedFrom=function(e){return{startDate:u(e.startDate),startTime:e.startTime,every:e.every,unit:e.unit,weekdays:[...e.weekdays],monthlyMode:e.monthlyMode,dayOfMonth:e.dayOfMonth,ordinal:e.ordinal,weekday:e.weekday,month:e.month,day:e.day,windowFrom:e.windowFrom,windowTo:e.windowTo,businessDays:e.businessDays,endType:e.endType,endDate:e.endDate?u(e.endDate):void 0,endCount:e.endCount}}(this.s),this.writing=!1,this.emit()}on(e){return i=>{i.stopPropagation(),e(i.detail)}}swallow=e=>e.stopPropagation();setNumber(e,i){return this.on((s=>{if(null==s||!isFinite(s))return;let t=Math.max(1,Math.floor(s));null!=i&&(t=Math.min(i,t)),this.update({[e]:t})}))}setWeekdays=this.on((e=>{const i=Array.isArray(e)?e:e?[e]:[];this.update({weekdays:F.map((e=>e[0])).filter((e=>i.includes(e)))})}));unitWord(e,i){switch(e){case"minute":return i?D(void 0,"scheduler-builder.unitMinutes",void 0,"minutes"):D(void 0,"scheduler-builder.unitMinute",void 0,"minute");case"hour":return i?D(void 0,"scheduler-builder.unitHours",void 0,"hours"):D(void 0,"scheduler-builder.unitHour",void 0,"hour");case"day":return i?D(void 0,"scheduler-builder.unitDays",void 0,"days"):D(void 0,"scheduler-builder.unitDay",void 0,"day");case"week":return i?D(void 0,"scheduler-builder.unitWeeks",void 0,"weeks"):D(void 0,"scheduler-builder.unitWeek",void 0,"week");case"month":return i?D(void 0,"scheduler-builder.unitMonths",void 0,"months"):D(void 0,"scheduler-builder.unitMonth",void 0,"month");default:return i?D(void 0,"scheduler-builder.unitYears",void 0,"years"):D(void 0,"scheduler-builder.unitYear",void 0,"year")}}ordinalWord(e){switch(e){case"second":return D(void 0,"scheduler-builder.second",void 0,"second");case"third":return D(void 0,"scheduler-builder.third",void 0,"third");case"fourth":return D(void 0,"scheduler-builder.fourth",void 0,"fourth");case"last":return D(void 0,"scheduler-builder.last",void 0,"last");default:return D(void 0,"scheduler-builder.first",void 0,"first")}}cadence(){const e=this.s.every,i=1===e;switch(this.s.unit){case"minute":return i?D(void 0,"scheduler-builder.everyMinute",void 0,"every minute"):C(void 0,"scheduler-builder.everyMinutes",void 0,"every {n} minutes",{n:e});case"hour":return i?D(void 0,"scheduler-builder.everyHour",void 0,"every hour"):C(void 0,"scheduler-builder.everyHours",void 0,"every {n} hours",{n:e});case"day":return i?D(void 0,"scheduler-builder.everyDay",void 0,"every day"):C(void 0,"scheduler-builder.everyDays",void 0,"every {n} days",{n:e});case"week":return i?D(void 0,"scheduler-builder.everyWeek",void 0,"every week"):C(void 0,"scheduler-builder.everyWeeks",void 0,"every {n} weeks",{n:e});case"month":return i?D(void 0,"scheduler-builder.everyMonth",void 0,"every month"):C(void 0,"scheduler-builder.everyMonths",void 0,"every {n} months",{n:e});default:return i?D(void 0,"scheduler-builder.everyYear",void 0,"every year"):C(void 0,"scheduler-builder.everyYears",void 0,"every {n} years",{n:e})}}onNthWeekday(e,i){switch(this.s.ordinal){case"second":return C(void 0,"scheduler-builder.repeatOnSecond",void 0,"{repeat} on the second {weekday}",{repeat:e,weekday:i});case"third":return C(void 0,"scheduler-builder.repeatOnThird",void 0,"{repeat} on the third {weekday}",{repeat:e,weekday:i});case"fourth":return C(void 0,"scheduler-builder.repeatOnFourth",void 0,"{repeat} on the fourth {weekday}",{repeat:e,weekday:i});case"last":return C(void 0,"scheduler-builder.repeatOnLast",void 0,"{repeat} on the last {weekday}",{repeat:e,weekday:i});default:return C(void 0,"scheduler-builder.repeatOnFirst",void 0,"{repeat} on the first {weekday}",{repeat:e,weekday:i})}}sentence(e){const i=this.s,s=Z(i.unit),t=F.filter((e=>i.weekdays.includes(e[0]))).map((i=>a(e)[i[2]]));let d=this.cadence();if(s){const s={repeat:d,from:se(i.windowFrom,e),to:se(i.windowTo,e)};d=t.length&&t.length<7?C(void 0,"scheduler-builder.repeatBetweenOnDays",void 0,"{repeat} between {from} and {to} on {days}",{...s,days:te(t,e)}):C(void 0,"scheduler-builder.repeatBetween",void 0,"{repeat} between {from} and {to}",s)}else"week"===i.unit?d=t.length?C(void 0,"scheduler-builder.repeatOnDays",void 0,"{repeat} on {days}",{repeat:d,days:te(t,e)}):C(void 0,"scheduler-builder.repeatNoDays",void 0,"{repeat} (pick at least one day)",{repeat:d}):"month"===i.unit?d="day"===i.monthlyMode?C(void 0,"scheduler-builder.repeatOnDay",void 0,"{repeat} on day {day}",{repeat:d,day:i.dayOfMonth}):this.onNthWeekday(d,((e,i)=>{const s=F.find((i=>i[1]===e));return s?a(i)[s[2]]:e})(i.weekday,e)):"year"===i.unit&&(d=C(void 0,"scheduler-builder.repeatOnDate",void 0,"{repeat} on {date}",{repeat:d,date:c(i.month,i.day,e)}));ee(i.unit)&&("previous"===i.businessDays?d=C(void 0,"scheduler-builder.movesPrevious",void 0,"{schedule}, moving weekend runs to the previous business day",{schedule:d}):"next"===i.businessDays?d=C(void 0,"scheduler-builder.movesNext",void 0,"{schedule}, moving weekend runs to the next business day",{schedule:d}):"skip"===i.businessDays&&(d=C(void 0,"scheduler-builder.skipsWeekends",void 0,"{schedule}, skipping weekend runs",{schedule:d}))),d="never"===i.endType?C(void 0,"scheduler-builder.endsNever",void 0,"{schedule}, forever",{schedule:d}):"on"===i.endType?i.endDate?C(void 0,"scheduler-builder.endsOn",void 0,"{schedule}, until {date}",{schedule:d,date:h(i.endDate,e,"medium")}):C(void 0,"scheduler-builder.endsOnUnset",void 0,"{schedule}, until the chosen end date",{schedule:d}):M(i.endCount,void 0,["scheduler-builder.endsAfterOne","scheduler-builder.endsAfter"])?C(void 0,"scheduler-builder.endsAfterOne",void 0,"{schedule}, for {count} run",{schedule:d,count:i.endCount}):C(void 0,"scheduler-builder.endsAfter",void 0,"{schedule}, for {count} runs",{schedule:d,count:i.endCount});const r=h(i.startDate,e,"medium");return s?C(void 0,"scheduler-builder.sentence",void 0,"Starting {date}, this schedule runs {schedule}.",{date:r,schedule:d}):C(void 0,"scheduler-builder.sentenceAt",void 0,"Starting {date} at {time}, this schedule runs {schedule}.",{date:r,time:se(i.startTime,e),schedule:d})}field(e,i,s){const d=`${this.fieldId}-${i}`;return t("div",{class:{field:!0,[i]:!0},role:"group","aria-labelledby":d},t("div",{class:"flabel",id:d},e),s)}weekdayPicker(e){const i=v(e),s=F.map((e=>({label:i[e[2]],value:e[0]})));return t("sui-select-button",{multiple:!0,pill:!1,size:"sm",disabled:this.disabled,options:s,value:[...this.s.weekdays],onSuiChange:this.setWeekdays})}startControl(){const e=this.s,i=D(void 0,"scheduler-builder.date",void 0,"Date"),s=D(void 0,"scheduler-builder.time",void 0,"Time");return t("div",{class:"flex-row wide"},this.field(i,"date",t("sui-date-picker",{"aria-label":i,value:e.startDate,disabled:this.disabled,todayDate:this.todayDate,onSuiChange:this.on((e=>{const i=U(Array.isArray(e)?e[0]:e);i&&this.update({startDate:i})}))})),Z(e.unit)?null:this.field(s,"time",t("sui-time-picker",{"aria-label":s,value:e.startTime,step:30,disabled:this.disabled,onSuiChange:this.on((e=>{e&&this.update({startTime:e})}))})))}repeatControl(e){const i=this.s,s=Z(i.unit),d=J.map((e=>({label:this.unitWord(e,1!==i.every),value:e}))),r=D(void 0,"scheduler-builder.every",void 0,"Every"),n=D(void 0,"scheduler-builder.unit",void 0,"Unit"),u=D(void 0,"scheduler-builder.onDays",void 0,"On days"),o=D(void 0,"scheduler-builder.between",void 0,"Between"),l=D(void 0,"scheduler-builder.and",void 0,"And"),c=D(void 0,"scheduler-builder.onDay",void 0,"On day"),h=D(void 0,"scheduler-builder.ordinal",void 0,"Ordinal"),v=D(void 0,"scheduler-builder.weekday",void 0,"Weekday"),p=D(void 0,"scheduler-builder.month",void 0,"Month"),f=D(void 0,"scheduler-builder.day",void 0,"Day"),m=[{label:D(void 0,"scheduler-builder.dayOfMonth",void 0,"Day of month"),value:"day"},{label:D(void 0,"scheduler-builder.nthWeekday",void 0,"Nth weekday"),value:"nth"}],y=a(e),w=b(e);return t("div",{class:"stack"},t("div",{class:"flex-row"},this.field(r,"every",t("sui-input-number",{"aria-label":r,size:"md",min:1,disabled:this.disabled,value:i.every,onSuiChange:this.setNumber("every"),onSuiInput:this.swallow})),this.field(n,"unit",t("sui-select",{"aria-label":n,options:d,disabled:this.disabled,value:i.unit,onSuiChange:this.on((e=>{J.includes(e)&&this.update({unit:e})}))}))),"week"===i.unit?this.field(u,"days",this.weekdayPicker(e)):null,s?t("div",{class:"flex-row",key:"win"},this.field(o,"window-from",t("sui-time-picker",{"aria-label":o,value:i.windowFrom,step:30,disabled:this.disabled,onSuiChange:this.on((e=>{e&&this.update({windowFrom:e})}))})),this.field(l,"window-to",t("sui-time-picker",{"aria-label":l,value:i.windowTo,step:30,disabled:this.disabled,onSuiChange:this.on((e=>{e&&this.update({windowTo:e})}))}))):null,s?this.field(u,"days",this.weekdayPicker(e)):null,"month"===i.unit?t("div",{class:"stack tight",key:"mo"},t("sui-select-button",{size:"sm",disabled:this.disabled,options:m,value:i.monthlyMode,onSuiChange:this.on((e=>{"day"!==e&&"nth"!==e||this.update({monthlyMode:e})}))}),"day"===i.monthlyMode?this.field(c,"day-of-month",t("sui-input-number",{"aria-label":c,size:"md",min:1,max:31,disabled:this.disabled,value:i.dayOfMonth,onSuiChange:this.setNumber("dayOfMonth",31),onSuiInput:this.swallow})):t("div",{class:"flex-row"},this.field(h,"ordinal",t("sui-select",{"aria-label":h,options:H.map((e=>({label:this.ordinalWord(e),value:e}))),disabled:this.disabled,value:i.ordinal,onSuiChange:this.on((e=>{H.includes(e)&&this.update({ordinal:e})}))})),this.field(v,"weekday",t("sui-select",{"aria-label":v,options:F.map((e=>({label:y[e[2]],value:e[1]}))),disabled:this.disabled,value:i.weekday,onSuiChange:this.on((e=>{F.some((i=>i[1]===e))&&this.update({weekday:e})}))})))):null,"year"===i.unit?t("div",{class:"flex-row",key:"yr"},this.field(p,"month",t("sui-select",{"aria-label":p,options:w.map(((e,i)=>({label:e,value:i+""}))),disabled:this.disabled,value:i.month+"",onSuiChange:this.on((e=>{const i=parseInt(e,10);i>=0&&i<=11&&this.update({month:i})}))})),this.field(f,"day",t("sui-input-number",{"aria-label":f,size:"md",min:1,max:31,disabled:this.disabled,value:i.day,onSuiChange:this.setNumber("day",31),onSuiInput:this.swallow}))):null)}businessControl(){const e=[{label:D(void 0,"scheduler-builder.asScheduled",void 0,"Run as scheduled"),value:"as-scheduled"},{label:D(void 0,"scheduler-builder.previousBusinessDay",void 0,"Move to previous business day"),value:"previous"},{label:D(void 0,"scheduler-builder.nextBusinessDay",void 0,"Move to next business day"),value:"next"},{label:D(void 0,"scheduler-builder.skipRun",void 0,"Skip the run"),value:"skip"}];return t("div",{class:"biz"},t("sui-select",{"aria-label":D(void 0,"scheduler-builder.businessDays",void 0,"Business days"),options:e,disabled:this.disabled,value:this.s.businessDays,onSuiChange:this.on((e=>{R.includes(e)&&this.update({businessDays:e})}))}))}endControl(){const e=this.s,i=[{label:D(void 0,"scheduler-builder.never",void 0,"Never"),value:"never"},{label:D(void 0,"scheduler-builder.onDate",void 0,"On date"),value:"on"},{label:D(void 0,"scheduler-builder.afterRuns",void 0,"After runs"),value:"after"}],s=D(void 0,"scheduler-builder.endDate",void 0,"End date"),d=D(void 0,"scheduler-builder.runs",void 0,"Runs");return t("div",{class:"stack"},t("sui-select-button",{options:i,disabled:this.disabled,value:e.endType,onSuiChange:this.on((e=>{"never"!==e&&"on"!==e&&"after"!==e||this.update({endType:e})}))}),"on"===e.endType?this.field(s,"end-date",t("sui-date-picker",{"aria-label":s,value:e.endDate||void 0,disabled:this.disabled,todayDate:this.todayDate,onSuiChange:this.on((e=>{this.update({endDate:U(Array.isArray(e)?e[0]:e)})}))})):null,"after"===e.endType?this.field(d,"runs",t("sui-input-number",{"aria-label":d,size:"md",min:1,disabled:this.disabled,value:e.endCount,onSuiChange:this.setNumber("endCount"),onSuiInput:this.swallow})):null)}configList(e,i){const s=ee(this.s.unit);return t("sui-config-list",{variant:"mobile"===e?"mobile":void 0},t("sui-config-row",{key:"start",term:D(void 0,"scheduler-builder.start",void 0,"Start"),description:D(void 0,"scheduler-builder.startHint",void 0,"When should this schedule begin running?")},t("div",{slot:"control"},this.startControl())),t("sui-config-row",{key:"repeat",term:D(void 0,"scheduler-builder.repeat",void 0,"Repeat"),description:D(void 0,"scheduler-builder.repeatHint",void 0,"How often it repeats, and on what mechanics.")},t("div",{slot:"control"},this.repeatControl(i))),s?t("sui-config-row",{key:"biz",term:D(void 0,"scheduler-builder.businessDays",void 0,"Business days"),description:D(void 0,"scheduler-builder.businessDaysHint",void 0,"What happens when a run lands on a weekend.")},t("div",{slot:"control"},this.businessControl())):null,t("sui-config-row",{key:"end",term:D(void 0,"scheduler-builder.end",void 0,"End"),description:D(void 0,"scheduler-builder.endHint",void 0,"When should it stop?")},t("div",{slot:"control"},this.endControl())))}translation(e){return t("div",{class:"translation",role:"status","aria-live":"polite"},t("div",{class:"eyebrow"},D(void 0,"scheduler-builder.translation",void 0,"Translation")),t("div",{class:"sentence"},e))}nextRuns(e){const i=function(e,i=5){const s="after"===e.endType?Math.min(i,e.endCount):i,t="on"===e.endType&&e.endDate?e.endDate:null,d=[],r=P(e.startDate),n=L(e.weekdays),a=ee(e.unit)?e.businessDays:"as-scheduled",c=(i,r)=>!(t&&i>t)&&(d.push({date:i,iso:u(i),time:r||e.startTime}),d.length<s);if(s<=0)return d;if(Z(e.unit)){const i=Math.max(1,"minute"===e.unit?e.every:60*e.every),u=Y(e.windowFrom),l=Y(e.windowTo),a=e=>!n.length||n.includes(V(e.getDay()));let h=r;for(let e=0;e<40&&d.length<s;e++){if(a(h))for(let e=u;e<=l&&d.length<s&&c(h,q(e));e+=i);if(h=o(h,1),t&&h>t)break}}else if("day"===e.unit){let i=r;for(let r=0;r<400&&d.length<s;r++){const s=K(i,a);if(s&&!c(s))break;if(i=o(i,e.every),t&&i>t)break}}else if("week"===e.unit){const i=o(r,-(r.getDay()+6)%7);let u=r;for(let r=0;r<800&&d.length<s&&n.length&&(Math.floor(I(i,u)/7)%e.every!=0||!n.includes(V(u.getDay()))||c(u))&&(u=o(u,1),!(t&&u>t));r++);}else if("month"===e.unit)for(let i=0,n=0;i<60&&d.length<s;i++,n+=e.every){const i=r.getFullYear(),s=r.getMonth()+n;let d="day"===e.monthlyMode?new Date(i,s,Math.min(e.dayOfMonth,l(i,s))):$(i,s,e.ordinal,e.weekday);if(d&&d>=r&&(d=K(d,a),d&&!c(d)))break;if(t&&new Date(i,s,1)>t)break}else for(let i=0,t=0;i<20&&d.length<s;i++,t+=e.every){const i=r.getFullYear()+t;let s=new Date(i,e.month,Math.min(e.day,l(i,e.month)));if(s>=r&&(s=K(s,a),s&&!c(s)))break}return d}(this.s,5);return t("div",{class:"runs",role:"status","aria-live":"polite"},t("div",{class:"eyebrow faint"},D(void 0,"scheduler-builder.nextRuns",void 0,"Next runs")),0===i.length?t("div",{class:"empty"},D(void 0,"scheduler-builder.noUpcomingRunsMatchTheseMechanics",void 0,"No upcoming runs match these mechanics.")):t("ul",{class:"run-list"},i.map(((i,s)=>t("li",{class:{run:!0,first:0===s},key:i.iso+i.time},t("span",{class:"dot","aria-hidden":"true"}),t("span",{class:"when"},p(i.date,e)),t("span",{class:"at"},se(i.time,e)))))),t("div",{class:"tz"},this.zone()))}jsonBlock(e){return t("sui-code-block",{class:"json",key:"json-block",language:"json",size:"sm",code:e,maxHeight:240})}render(){const e=x(),i=this.sentence(e),s=this.hideJson?"":function(e){return JSON.stringify(e,null,2)}(ie(this.s,this.zone())),r=this.fieldId+"-json";return t(d,null,"compact"===this.variant?t("div",{class:"builder compact"},""===this.label?null:t("div",{class:"label"},D(void 0,"scheduler-builder.label",this.label,"Schedule")),this.translation(i),this.configList("mobile",e),this.nextRuns(e),this.hideJson?null:[t("div",{class:"json-row",key:"json-row"},t("button",{type:"button",class:"json-toggle","aria-expanded":this.jsonOpen?"true":"false","aria-controls":r,onClick:()=>this.jsonOpen=!this.jsonOpen},t(y,{glyph:w,class:this.jsonOpen?"chev open":"chev"}),this.jsonOpen?D(void 0,"scheduler-builder.hideJson",void 0,"Hide configuration JSON"):D(void 0,"scheduler-builder.showJson",void 0,"Show configuration JSON"))),t("div",{id:r,class:"json-pane",key:"json-pane",hidden:!this.jsonOpen},this.jsonOpen?this.jsonBlock(s):null)]):t("div",{class:"builder desktop"},t("div",{class:"main"},""===this.label?null:t("div",{class:"label"},D(void 0,"scheduler-builder.label",this.label,"Schedule")),this.configList("desktop",e)),t("div",{class:{side:!0,"with-label":""!==this.label}},this.translation(i),this.nextRuns(e),this.hideJson?null:[t("div",{class:"json-head",key:"json-head"},t("span",{class:"eyebrow faint"},D(void 0,"scheduler-builder.configurationJson",void 0,"Configuration JSON"))),this.jsonBlock(s)])))}static get watchers(){return{config:[{onConfigChange:0}],todayDate:[{onTodayChange:0}]}}static get style(){return".sc-sui-scheduler-builder-h{display:block;font-family:var(--font-sans);color:var(--ink)}.builder.desktop.sc-sui-scheduler-builder{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}.builder.desktop.sc-sui-scheduler-builder .main.sc-sui-scheduler-builder{flex:1 1 480px;min-width:0}.builder.desktop.sc-sui-scheduler-builder .label.sc-sui-scheduler-builder{margin-bottom:10px}.side.sc-sui-scheduler-builder{width:300px;max-width:100%;flex-shrink:0;display:flex;flex-direction:column;gap:10px}.side.with-label.sc-sui-scheduler-builder{padding-top:30px}.builder.compact.sc-sui-scheduler-builder{display:flex;flex-direction:column;gap:10px}.label.sc-sui-scheduler-builder{font-size:14.5px;font-weight:720;letter-spacing:var(--tracking-tight)}.flex-row.sc-sui-scheduler-builder{display:flex;gap:12px;flex-wrap:wrap}.flex-row.wide.sc-sui-scheduler-builder{gap:14px}.stack.sc-sui-scheduler-builder{display:flex;flex-direction:column;gap:12px}.stack.tight.sc-sui-scheduler-builder{gap:10px}.field.sc-sui-scheduler-builder{flex-shrink:0;min-width:0;max-width:100%}.flabel.sc-sui-scheduler-builder{font-size:11px;font-weight:650;letter-spacing:0.05em;text-transform:uppercase;color:var(--ink-muted);margin-bottom:5px}.field.date.sc-sui-scheduler-builder,.field.end-date.sc-sui-scheduler-builder{width:178px}.field.time.sc-sui-scheduler-builder{width:148px}.field.every.sc-sui-scheduler-builder,.field.day-of-month.sc-sui-scheduler-builder,.field.day.sc-sui-scheduler-builder,.field.runs.sc-sui-scheduler-builder{width:92px}.field.unit.sc-sui-scheduler-builder{width:132px}.field.window-from.sc-sui-scheduler-builder,.field.window-to.sc-sui-scheduler-builder,.field.weekday.sc-sui-scheduler-builder{width:140px}.field.ordinal.sc-sui-scheduler-builder{width:118px}.field.month.sc-sui-scheduler-builder{width:150px}.biz.sc-sui-scheduler-builder{width:268px;max-width:100%}.eyebrow.sc-sui-scheduler-builder{font-size:10.5px;font-weight:650;letter-spacing:0.08em;text-transform:uppercase;color:var(--ink-muted);margin-bottom:6px}.eyebrow.faint.sc-sui-scheduler-builder{color:var(--ink-faint)}.translation.sc-sui-scheduler-builder{background:var(--brand-soft);border-radius:var(--radius-md);padding:12px 14px}.sentence.sc-sui-scheduler-builder{font-size:13px;line-height:1.6;font-weight:550;text-wrap:pretty}.runs.sc-sui-scheduler-builder{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 12px}.run-list.sc-sui-scheduler-builder{list-style:none;margin:0;padding:0}.run.sc-sui-scheduler-builder{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:12px;font-feature-settings:'tnum'}.dot.sc-sui-scheduler-builder{width:6px;height:6px;border-radius:50%;background:var(--border-strong);flex-shrink:0}.run.first.sc-sui-scheduler-builder .dot.sc-sui-scheduler-builder{background:var(--accent)}.when.sc-sui-scheduler-builder{flex:1;min-width:0;font-weight:460}.run.first.sc-sui-scheduler-builder .when.sc-sui-scheduler-builder{font-weight:650}.at.sc-sui-scheduler-builder{color:var(--ink-muted)}.empty.sc-sui-scheduler-builder{font-size:12px;color:var(--ink-faint)}.tz.sc-sui-scheduler-builder{font-size:10.5px;color:var(--ink-faint);margin-top:6px}.json-head.sc-sui-scheduler-builder{display:flex;align-items:center;justify-content:space-between;min-height:26px}.json-head.sc-sui-scheduler-builder .eyebrow.sc-sui-scheduler-builder{margin-bottom:0}.json-row.sc-sui-scheduler-builder{display:flex;align-items:center;gap:8px}.json-toggle.sc-sui-scheduler-builder{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:2px 4px;margin:-2px -4px;font-size:12px;font-weight:650;font-family:var(--font-sans);color:var(--link);cursor:pointer;border-radius:var(--radius-sm)}.json-toggle.sc-sui-scheduler-builder:hover{text-decoration:underline}.json-toggle.sc-sui-scheduler-builder:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.chev.sc-sui-scheduler-builder{font-size:9px;transition:transform var(--duration-fast) var(--ease-out)}.chev.open.sc-sui-scheduler-builder{transform:rotate(180deg)}.json-pane[hidden].sc-sui-scheduler-builder{display:none}@media (forced-colors: active){.dot.sc-sui-scheduler-builder{box-sizing:border-box;border:1px solid CanvasText}.run.first.sc-sui-scheduler-builder .dot.sc-sui-scheduler-builder{background:CanvasText}}"}},[514,"sui-scheduler-builder",{variant:[513],label:[1],timezone:[1],config:[1040],todayDate:[1,"today-date"],disabled:[516],hideJson:[516,"hide-json"],s:[32],jsonOpen:[32],getConfig:[64],setFocus:[64]},void 0,{config:[{onConfigChange:0}],todayDate:[{onTodayChange:0}]}]),re=de,ne=function(){"undefined"!=typeof customElements&&["sui-scheduler-builder","sui-code-block","sui-config-list","sui-config-row","sui-date-picker","sui-input-number","sui-select","sui-select-button","sui-time-picker","sui-tooltip"].forEach((e=>{switch(e){case"sui-scheduler-builder":customElements.get(r(e))||customElements.define(r(e),de);break;case"sui-code-block":customElements.get(r(e))||j();break;case"sui-config-list":customElements.get(r(e))||S();break;case"sui-config-row":customElements.get(r(e))||O();break;case"sui-date-picker":customElements.get(r(e))||z();break;case"sui-input-number":customElements.get(r(e))||T();break;case"sui-select":customElements.get(r(e))||W();break;case"sui-select-button":customElements.get(r(e))||A();break;case"sui-time-picker":customElements.get(r(e))||E();break;case"sui-tooltip":customElements.get(r(e))||N()}}))};export{re as SuiSchedulerBuilder,ne as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiScrollPanel extends Components.SuiScrollPanel, HTMLElement {}
|
|
4
|
+
export const SuiScrollPanel: {
|
|
5
|
+
prototype: SuiScrollPanel;
|
|
6
|
+
new (): SuiScrollPanel;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,h as e,a as i,t as o}from"./p-CeVlau-G.js";import{i as a}from"./p-wknHx00K.js";import{d as r}from"./p-BHB1Wprj.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get host(){return this}height=200;atTop=!0;atBottom=!0;overflowing=!1;hostLabel;viewport;content;ro;stopAria;connectedCallback(){r(this.host,(()=>this.focusTarget())),this.stopAria?.(),this.stopAria=a(this.host,(t=>{this.hostLabel=t})),this.content&&this.watchContent(!0)}componentDidLoad(){this.nextFrame((()=>this.measure())),this.watchContent()}disconnectedCallback(){this.ro?.disconnect(),this.ro=void 0,this.stopAria?.()}watchContent(t=!1){this.ro?.disconnect(),this.ro=void 0,"undefined"!=typeof ResizeObserver&&this.content&&(this.ro=new ResizeObserver((()=>this.measure())),this.ro.observe(this.content)),t&&Promise.resolve().then((()=>{this.host.isConnected&&this.measure()}))}onHeight(){this.nextFrame((()=>this.measure()))}async setFocus(){this.focusTarget()?.focus()}focusTarget(){return this.viewport&&this.viewport.hasAttribute("tabindex")?this.viewport:null}async scrollToBottom(){const t=this.viewport;t&&(t.scrollTop=t.scrollHeight,this.measure())}nextFrame(t){"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()}measure=()=>{const t=this.viewport;if(!t)return;const s=t.scrollHeight-t.clientHeight;if(this.overflowing=s>0,!(s>0))return this.atTop=!0,void(this.atBottom=!0);this.atTop=t.scrollTop<=4,this.atBottom=t.scrollTop>=s-4};render(){return e(i,{key:"8988eecd590ae436c6d76013e1072f2b8310cfcd"},e("div",{key:"a5f3079b2be410e78aafa26fb9f2ebb413fdc8ce",class:"viewport",ref:t=>this.viewport=t,style:{height:this.height+"px"},tabindex:this.overflowing?"0":void 0,role:this.hostLabel?"region":void 0,"aria-label":this.hostLabel||void 0,onScroll:this.measure},e("div",{key:"9d20f67cdc37a42a350895908ad3a866b487f857",class:"content",ref:t=>this.content=t},e("slot",{key:"ad8de745a31baac43902021700e474b77a278ad1"}))),e("div",{key:"9a312926faf4d7f3fbe298fc7c8a0f4994483a3c",class:{fade:!0,top:!0,on:!this.atTop},"aria-hidden":"true"}),e("div",{key:"8a732de0e1e7686438b9e01c2cc7035e8d36a161",class:{fade:!0,bottom:!0,on:!this.atBottom},"aria-hidden":"true"}))}static get watchers(){return{height:[{onHeight:0}]}}static get style(){return".sc-sui-scroll-panel-h{display:block;position:relative;box-sizing:border-box;font-family:var(--font-sans);color:var(--ink);border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);overflow:hidden}.viewport.sc-sui-scroll-panel{box-sizing:border-box;overflow-y:auto;padding:14px 16px}.viewport.sc-sui-scroll-panel:focus-visible{outline:none}.sc-sui-scroll-panel-h:has(.viewport:focus-visible){outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.fade.sc-sui-scroll-panel{position:absolute;left:0;right:0;height:22px;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.fade.on.sc-sui-scroll-panel{opacity:1}.fade.top.sc-sui-scroll-panel{top:0;background:linear-gradient(var(--surface), transparent)}.fade.bottom.sc-sui-scroll-panel{bottom:0;background:linear-gradient(transparent, var(--surface))}"}},[774,"sui-scroll-panel",{height:[2],atTop:[32],atBottom:[32],overflowing:[32],hostLabel:[32],setFocus:[64],scrollToBottom:[64]},void 0,{height:[{onHeight:0}]}]),c=n,l=function(){"undefined"!=typeof customElements&&["sui-scroll-panel"].forEach((t=>{"sui-scroll-panel"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))};export{c as SuiScrollPanel,l as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiScrollTop extends Components.SuiScrollTop, HTMLElement {}
|
|
4
|
+
export const SuiScrollTop: {
|
|
5
|
+
prototype: SuiScrollTop;
|
|
6
|
+
new (): SuiScrollTop;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as t,c as o,h as i,a as e,t as n}from"./p-CeVlau-G.js";import{d as r}from"./p-BHB1Wprj.js";import{G as l,h as a}from"./p-BeYfX4rQ.js";import{a as c}from"./p-BuyjS5bS.js";import{s as u}from"./p-CZ4DDtn8.js";const h=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiVisibleChange=o(this,"suiVisibleChange",3)}get host(){return this}threshold=300;target;visible=!1;suiVisibleChange;inside=!1;bound;loaded=!1;connectedCallback(){r(this.host,(()=>this.host.querySelector("button.sui-scroll-top"))),this.loaded&&(this.unbind(),this.bind(),this.visible||this.onScroll())}componentDidLoad(){this.loaded=!0,this.bind(),this.visible||this.onScroll()}disconnectedCallback(){this.unbind()}async setFocus(){this.host.querySelector("button.sui-scroll-top")?.focus()}onTargetChange(){this.unbind(),this.bind(),this.onScroll()}resolve(){if("undefined"!=typeof window)return"string"==typeof this.target?(this.target?document.querySelector(this.target):null)||window:this.target||window}targetScrollTop(){const s=this.bound;return s?s===window?window.scrollY||0:s.scrollTop||0:0}bind(){this.bound=this.resolve(),this.bound?.addEventListener("scroll",this.onScroll,{passive:!0});const s=this.bound;this.inside=!!s&&s!==("undefined"!=typeof window?window:void 0)&&"function"==typeof s.contains&&s.contains(this.host)}unbind(){this.bound?.removeEventListener("scroll",this.onScroll),this.bound=void 0}onScroll=()=>{const s=this.targetScrollTop()>this.threshold;s!==this.visible&&(this.visible=s,this.suiVisibleChange.emit(s))};smooth(){return u()}toTop=()=>{const s=this.bound||this.resolve();s&&("function"==typeof s.scrollTo?s.scrollTo({top:0,behavior:this.smooth()}):s.scrollTop=0)};render(){return i(e,{key:"63e7a26a0330440bb7218970290a07a50702ef6c"},this.visible?i("button",{type:"button",class:{"sui-scroll-top":!0,inside:this.inside},"aria-label":c(void 0,"scroll-top.backToTop",void 0,"Back to top"),onClick:this.toTop},i(l,{glyph:a})):null)}static get watchers(){return{target:[{onTargetChange:0}]}}static get style(){return".sc-sui-scroll-top-h{display:contents;font-family:var(--font-sans)}.sui-scroll-top.sc-sui-scroll-top{position:fixed;inset-inline-end:18px;bottom:18px;z-index:var(--z-overlay);width:42px;height:42px;border-radius:50%;border:none;background:var(--brand);color:var(--brand-contrast);box-shadow:var(--shadow-pop);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background var(--duration-fast) var(--ease-out)}.sui-scroll-top.inside.sc-sui-scroll-top{position:sticky;inset-inline-end:auto;bottom:18px;z-index:var(--z-sticky);margin-block:18px 0;margin-inline:auto 18px}.sui-scroll-top.sc-sui-scroll-top:hover{background:var(--brand-hover)}.sui-scroll-top.sc-sui-scroll-top:active{background:var(--brand-active)}.sui-scroll-top.sc-sui-scroll-top:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.sui-scroll-top.sc-sui-scroll-top .sui-glyph.sc-sui-scroll-top{font-size:14px}@media (forced-colors: active){.sui-scroll-top.sc-sui-scroll-top{border:1px solid ButtonText}}"}},[514,"sui-scroll-top",{threshold:[2],target:[1],visible:[1540],inside:[32],setFocus:[64]},void 0,{target:[{onTargetChange:0}]}]),p=h,d=function(){"undefined"!=typeof customElements&&["sui-scroll-top"].forEach((s=>{"sui-scroll-top"===s&&(customElements.get(n(s))||customElements.define(n(s),h))}))};export{p as SuiScrollTop,d as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSelectButton extends Components.SuiSelectButton, HTMLElement {}
|
|
4
|
+
export const SuiSelectButton: {
|
|
5
|
+
prototype: SuiSelectButton;
|
|
6
|
+
new (): SuiSelectButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as o,d as p}from"./p-BkdpcGfq.js";const s=o,r=p;export{s as SuiSelectButton,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSelect extends Components.SuiSelect, HTMLElement {}
|
|
4
|
+
export const SuiSelect: {
|
|
5
|
+
prototype: SuiSelect;
|
|
6
|
+
new (): SuiSelect;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SuiSelect as e,defineCustomElement as t}from"./p-CDiy2nTd.js";const o=e,s=t;export{o as SuiSelect,s as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSideNav extends Components.SuiSideNav, HTMLElement {}
|
|
4
|
+
export const SuiSideNav: {
|
|
5
|
+
prototype: SuiSideNav;
|
|
6
|
+
new (): SuiSideNav;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as i,c as t,h as e,a,t as n}from"./p-CeVlau-G.js";import{G as o,y as r,r as l,o as d}from"./p-BeYfX4rQ.js";import{i as c}from"./p-wknHx00K.js";import{o as h,h as u,a as v}from"./p-BWkzTEZX.js";import{k as p,o as f,p as g,a as x,b as m,m as b,l as y,t as k}from"./p-DsHK25q3.js";import{f as w}from"./p-BtgC2u2Q.js";import{d as C}from"./p-BHB1Wprj.js";import{a as j}from"./p-BuyjS5bS.js";import{u as F}from"./p-U06fVoGD.js";import{i as z}from"./p-GAnFXayY.js";const T=s(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiNavigate=t(this,"suiNavigate",7),this.suiActiveChange=t(this,"suiActiveChange",3),this.suiExpandedChange=t(this,"suiExpandedChange",3),this.suiOpen=t(this,"suiOpen",3),this.suiClose=t(this,"suiClose",3)}get host(){return this}sections=[];collapsed=!1;active;height;tone="canvas";variant="card";width;collapsedWidth;expanded=[];collapsedBadges="hide";collapseControl="footer";suiNavigate;suiActiveChange;suiExpandedChange;suiOpen;suiClose;hostLabel;stopAria;hasIcon=!1;hasBrand=!1;hasHeader=!1;hasHeaderCollapsed=!1;hasFooter=!1;hasFooterCollapsed=!1;tip=null;tipAnchor=null;fly=null;flyClosing=!1;flyAnchor=null;flyPanel;flyDisposers=[];flyEscape=p((()=>this.closeFly(!0)));demoteFly;flyExit=f((()=>this.flyExited()));pickingFly;dispose;stopReposition;stopKeys;fieldId=F("sui-side-nav");loaded=!1;connectedCallback(){C(this.host,(()=>this.focusTarget())),this.stopAria?.(),this.stopAria=c(this.host,(s=>{this.hostLabel=s})),this.loaded&&this.watch(!0)}async setFocus(){this.focusTarget()?.focus()}focusTarget(){const s=this.host.querySelector("nav.scroll");return s?.querySelector(".item.on:not([disabled])")??s?.querySelector(".item:not([disabled])")??null}componentWillLoad(){this.syncSlots(),this.openActiveGroup(!1)}componentDidLoad(){this.loaded=!0,this.watch()}watch(s=!1){this.dispose?.(),this.dispose=h(this.host,(()=>this.syncSlots())),s&&Promise.resolve().then((()=>{this.host.isConnected&&this.syncSlots()}))}componentDidRender(){this.fly&&!this.flyClosing&&this.afterFlyOpen()}disconnectedCallback(){this.dispose?.(),this.dispose=void 0,this.hideTip(),this.stopAria?.(),this.teardownFly(),this.flyExit.cancel(),this.flyExited()}async toggle(s){this.setCollapsed("boolean"==typeof s?s:!this.collapsed)}onSections(){this.closeFly(!1),this.openActiveGroup(!1)}onActive(){void 0!==this.pickingFly&&this.active===this.pickingFly||this.openActiveGroup(!0)}syncSlots(){this.hasIcon=u(this.host,"icon"),this.hasBrand=u(this.host,"brand"),this.hasHeader=v(this.host,"header").length>0,this.hasHeaderCollapsed=u(this.host,"header-collapsed"),this.hasFooter=v(this.host,"footer").length>0,this.hasFooterCollapsed=u(this.host,"footer-collapsed")}setCollapsed(s){s!==this.collapsed&&(s&&this.suiClose.emit("trigger").defaultPrevented||(this.collapsed=s,this.hideTip(),this.closeFly(!1),s||this.suiOpen.emit()))}keyOf(s){return s.key||s.label}kids(s){return Array.isArray(s.children)?s.children:[]}isGroup(s){return this.kids(s).length>0}openKeys(){return Array.isArray(this.expanded)?this.expanded:[]}holdsActive(s){return null!=this.active&&this.kids(s).some((s=>this.keyOf(s)===this.active))}openActiveGroup(s){const i=(this.sections||[]).reduce(((s,i)=>s.concat(i.items||[])),[]).find((s=>this.isGroup(s)&&this.holdsActive(s)));if(!i)return;const t=this.keyOf(i),e=this.openKeys();e.includes(t)||(this.expanded=e.concat(t),s&&this.suiExpandedChange.emit(this.expanded))}toggleGroup(s,i){const t=this.keyOf(s),e=this.openKeys();this.collapsed?this.fly&&!this.flyClosing&&this.keyOf(this.fly)===t?this.closeFly(!0):this.openFly(s,i):(this.expanded=e.includes(t)?e.filter((s=>s!==t)):e.concat(t),this.suiExpandedChange.emit(this.expanded))}openFly(s,i){this.hideTip(),this.flyExit.cancel(),this.teardownFly(),this.flyAnchor=i,this.flyClosing=!1,this.fly=s,this.flyEscape.arm()}afterFlyOpen(){const s=this.flyPanel;s&&this.flyAnchor&&!this.flyDisposers.length&&this.host.isConnected&&(this.demoteFly||(this.demoteFly=g(s)),this.placeFly(),this.flyDisposers.push(x((()=>[this.host,s]),(()=>this.closeFly(!1))),m((()=>this.placeFly()))),this.flyEscape.arm(),w(s)?.focus({preventScroll:!0}))}placeFly(){const s=this.flyAnchor,i=this.flyPanel;s&&i&&(s.isConnected&&this.collapsed?b(i,y(s,i,z(s)?"left":"right",8,"start")):this.closeFly(!1))}teardownFly(){this.flyEscape.disarm(),this.flyDisposers.forEach((s=>s())),this.flyDisposers=[]}closeFly(s){this.fly&&!this.flyClosing&&(this.teardownFly(),s&&this.flyAnchor?.focus({preventScroll:!0}),this.flyExit.begin(this.flyPanel)?this.flyClosing=!0:this.flyExited())}flyExited(){this.demoteFly?.(),this.demoteFly=void 0,this.flyAnchor=null,this.flyClosing=!1,this.fly=null}pickFly(s){if(s.disabled)return;const i=!!this.flyPanel&&"undefined"!=typeof document&&this.flyPanel.contains(document.activeElement);this.pickingFly=this.keyOf(s);try{this.navigate(s)}finally{this.pickingFly=void 0}this.closeFly(i)}onFlyKey=s=>{k(s,this.flyPanel,(()=>this.closeFly(!0)))};navigate(s){if(s.disabled)return;const i=this.keyOf(s);i!==this.active&&(this.active=i,this.suiActiveChange.emit(i)),this.suiNavigate.emit(i),s.command?.()}showTip(s,i){this.collapsed&&!this.fly&&(this.tipAnchor=s.currentTarget,this.tip={label:i,...this.tipPoint(this.tipAnchor)},this.stopReposition||(this.stopReposition=m((()=>this.placeTip()))),this.stopKeys||(window.addEventListener("keydown",this.onTipKey),this.stopKeys=()=>window.removeEventListener("keydown",this.onTipKey)))}onTipKey=s=>{"Escape"===s.key&&this.tip&&this.hideTip()};tipPoint(s){const i=s.getBoundingClientRect();return{x:z(s)?i.left-10:i.right+10,y:i.top+i.height/2}}placeTip(){const s=this.tipAnchor;if(!this.tip||!s)return;if(!this.collapsed||!s.isConnected)return void this.hideTip();const i=this.tipPoint(s);i.x===this.tip.x&&i.y===this.tip.y||(this.tip={label:this.tip.label,...i})}hideTip=()=>{this.tip=null,this.tipAnchor=null,this.stopReposition?.(),this.stopReposition=void 0,this.stopKeys?.(),this.stopKeys=void 0};renderItem(s,i,t,a=!1){const n=this.collapsed&&!a,l=!i&&!a&&this.isGroup(s),d=l&&!n&&this.openKeys().includes(this.keyOf(s)),c=l&&n&&!!this.fly&&!this.flyClosing&&this.keyOf(this.fly)===this.keyOf(s),h=l?this.holdsActive(s)&&!d:this.active===this.keyOf(s),u=!!s.disabled,v=!!s.href&&!l&&!u,p=n&&null!=s.badge&&"dot"===this.collapsedBadges,f=null!=s.badge&&(p||!n);return e("li",null,e(v?"a":"button",{type:v?void 0:"button",role:v||l?void 0:"link",href:v?s.href:void 0,target:v?s.target:void 0,rel:v&&"_blank"===s.target?"noopener":void 0,disabled:v?void 0:u,class:{item:!0,on:h,sub:i},"aria-current":h&&!l?"page":null,"aria-label":n||f?f?`${s.label}, ${s.badge}`:s.label:null,"aria-expanded":l?d||c?"true":"false":null,"aria-controls":d?t:c?this.fieldId+"-fly":null,onClick:i=>a?this.pickFly(s):l?this.toggleGroup(s,i.currentTarget):this.navigate(s),onMouseEnter:i=>this.showTip(i,s.label),onMouseLeave:this.hideTip,onFocus:i=>this.showTip(i,s.label),onBlur:this.hideTip},s.icon?e("i",{class:s.icon+" icon","aria-hidden":"true"}):null,n?null:e("span",{class:"label"},s.label),n||null==s.badge?null:e("span",{class:"badge","aria-hidden":"true"},s.badge),!n&&l?e(o,{glyph:r,class:d?"chev":"chev closed"}):null,p?e("span",{class:"dot","aria-hidden":"true"}):null),d?e("ul",{class:"sub-list",id:t},this.kids(s).map((s=>this.renderItem(s,!0)))):null)}render(){const s=this.collapsed,i="brand"===this.tone||"surface"===this.tone?this.tone:"canvas",t=s?this.hasHeaderCollapsed:this.hasHeader,n=s?this.hasFooterCollapsed:this.hasFooter,r="none"!==this.collapseControl,c=this.hasIcon||!s&&this.hasBrand,h=this.sections||[],u=h.findIndex((s=>!!s.bottom)),v=s?this.collapsedWidth:this.width,p=this.fieldId+"-nav",f=s?j(void 0,"side-nav.expandNavigation",void 0,"Expand navigation"):j(void 0,"side-nav.collapseNavigation",void 0,"Collapse navigation");return e(a,{key:"16b2629bb9eb89ddd61ba200d8da1aff615b7c4b",class:{flush:"flush"===this.variant},style:null!=this.height?{height:this.height+"px"}:void 0},e("div",{key:"e871e5ad05ab29c50244703bf336140db92014c5",class:{rail:!0,collapsed:s,brand:"brand"===i,surface:"surface"===i,canvas:"canvas"===i,flush:"flush"===this.variant},style:null!=v?{width:v+"px"}:void 0},c?e("div",{class:"brand-row"},this.hasIcon?e("span",{class:"mark"},e("slot",{name:"icon"})):null,!s&&this.hasBrand?e("span",{class:"word"},e("slot",{name:"brand"})):null):null,t?e("div",{class:"head-slot"},e("slot",s?{name:"header-collapsed"}:{name:"header"})):null,e("nav",{key:"ccea0536de10f80dc7a76ef1108f86b284a942ac",class:{scroll:!0,"has-bottom":u>=0},id:p,"data-scroll":"brand"===i?"navy":null,"aria-label":this.hostLabel||j(void 0,"side-nav.primary",void 0,"Primary")},h.map(((i,t)=>e("div",{class:{section:!0,push:u===t}},t>0&&(i.divider||i.heading&&s)?e("div",{class:"rule"}):null,i.heading&&!s?e("div",{class:"heading"},i.heading):null,e("ul",{class:"list"},(i.items||[]).map(((s,i)=>this.renderItem(s,!1,`${this.fieldId}-g${t}-${i}`)))))))),n||r?e("div",{class:"foot"},n?e("div",{class:"foot-slot",key:"foot-slot"},e("slot",s?{name:"footer-collapsed"}:{name:"footer"})):null,r?e("button",{type:"button",class:"ctl",key:"collapse","aria-label":f,"aria-expanded":s?"false":"true","aria-controls":p,onClick:()=>this.setCollapsed(!s),onMouseEnter:s=>this.showTip(s,f),onMouseLeave:this.hideTip,onFocus:s=>this.showTip(s,f),onBlur:this.hideTip},e(o,{glyph:s?l:d})):null):null),s&&this.tip?e("span",{class:"tip",role:"presentation",style:{left:this.tip.x+"px",top:this.tip.y+"px"}},this.tip.label):null,this.fly?e("div",{class:{fly:!0,closing:this.flyClosing,brand:"brand"===i,surface:"surface"===i,canvas:"canvas"===i},id:this.fieldId+"-fly",ref:s=>this.flyPanel=s,onKeyDown:this.onFlyKey},e("div",{class:"heading"},this.fly.label),e("ul",{class:"list"},this.kids(this.fly).map((s=>this.renderItem(s,!1,void 0,!0))))):null)}static get watchers(){return{sections:[{onSections:0}],active:[{onActive:0}]}}static get style(){return".sc-sui-side-nav-h{display:inline-block;vertical-align:top;font-family:var(--font-sans)}.flush.sc-sui-side-nav-h{display:block;align-self:stretch}.rail.sc-sui-side-nav,.fly.sc-sui-side-nav{--sn-ground:var(--surface-navy);--sn-ink:var(--ink-inverse);--sn-quiet:var(--ink-inverse-muted);--sn-hair:var(--border-inverse);--sn-wash:color-mix(in srgb, var(--ink-inverse) 7%, transparent);--sn-fill:var(--surface-navy-current);--sn-off:color-mix(in srgb, var(--ink-inverse) 34%, transparent);--sn-mark:var(--accent-inverse)}.rail.sc-sui-side-nav{width:var(--sidebar-w);height:100%;box-sizing:border-box;flex-shrink:0;background:var(--sn-ground);color:var(--sn-ink);display:flex;flex-direction:column;overflow:hidden;border-radius:var(--radius-lg);transition:width var(--duration-base) var(--ease-out)}.rail.brand.sc-sui-side-nav,.fly.brand.sc-sui-side-nav{--focus-ring:var(--ink-inverse);--focus-shadow:none}.rail.brand.sc-sui-side-nav{--logo-quiet:color-mix(in srgb, currentColor var(--logo-quiet-inverse, 82%), transparent);--logo-spark:var(--logo-spark-inverse)}.rail.surface.sc-sui-side-nav,.fly.surface.sc-sui-side-nav{--sn-ground:var(--surface);--sn-ink:var(--ink);--sn-quiet:var(--ink-muted);--sn-hair:var(--hairline);--sn-wash:var(--surface-hover);--sn-fill:var(--surface-current);--sn-off:var(--ink-placeholder);--sn-mark:var(--accent-mark)}.rail.canvas.sc-sui-side-nav,.fly.canvas.sc-sui-side-nav{--sn-ground:var(--canvas);--sn-ink:var(--ink);--sn-quiet:var(--ink-muted);--sn-hair:var(--border);--sn-wash:var(--surface-hover);--sn-fill:var(--surface-current);--sn-off:var(--ink-placeholder);--sn-mark:var(--accent-mark)}.rail.surface.sc-sui-side-nav,.rail.canvas.sc-sui-side-nav{border:1px solid var(--border)}.rail.flush.sc-sui-side-nav{border-radius:0}.rail.surface.flush.sc-sui-side-nav,.rail.canvas.flush.sc-sui-side-nav{border-width:0;border-inline-end-width:1px}.rail.collapsed.sc-sui-side-nav{width:60px}.brand-row.sc-sui-side-nav{display:flex;align-items:center;gap:10px;padding-block:13px 11px;padding-inline:10.5px 12px;min-height:30px}.rail.collapsed.sc-sui-side-nav .brand-row.sc-sui-side-nav{padding:13px 0 11px;justify-content:center;gap:0}.mark.sc-sui-side-nav{width:28px;height:28px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.mark.sc-sui-side-nav-s>*,.mark .sc-sui-side-nav-s>*{display:block;max-width:28px;max-height:28px}.word.sc-sui-side-nav{flex:1;min-width:0;display:flex;align-items:center;white-space:nowrap;overflow:hidden}.head-slot.sc-sui-side-nav{padding:0 12px 10px}.rail.collapsed.sc-sui-side-nav .head-slot.sc-sui-side-nav{padding:0 8px 8px;display:flex;justify-content:center}.scroll.sc-sui-side-nav{flex:1;overflow-x:hidden;overflow-y:auto;padding:2px 0 10px}.scroll.has-bottom.sc-sui-side-nav{display:flex;flex-direction:column}.section.push.sc-sui-side-nav{margin-top:auto}.heading.sc-sui-side-nav{padding:13px 16px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:650;letter-spacing:var(--tracking-wider);text-transform:uppercase;color:var(--sn-quiet)}.rule.sc-sui-side-nav{height:1px;background:var(--sn-hair);margin:8px 12px}.list.sc-sui-side-nav{list-style:none;margin:0;padding:0}.item.sc-sui-side-nav{position:relative;display:flex;align-items:center;gap:10px;width:calc(100% - 16px);box-sizing:border-box;padding-block:7.5px;padding-inline:8px 6px;justify-content:flex-start;margin:2px 8px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--sn-quiet);font-family:var(--font-sans);font-size:13.5px;font-weight:460;line-height:normal;text-align:start;cursor:pointer;user-select:none;text-decoration:none;transition:background var(--duration-fast) var(--ease-out)}a.item.sc-sui-side-nav,a.item.sc-sui-side-nav:hover,a.item.sc-sui-side-nav:visited{color:var(--sn-quiet);text-decoration:none}a.item.on.sc-sui-side-nav,a.item.on.sc-sui-side-nav:hover,a.item.on.sc-sui-side-nav:visited{color:var(--sn-ink)}.item.sc-sui-side-nav:hover{--ink-faint:var(--ink-muted);background:var(--sn-wash)}.item.on.sc-sui-side-nav{--ink-muted:var(--ink-muted-on-wash);--ink-faint:var(--ink-muted);background:var(--sn-fill);color:var(--sn-ink);font-weight:650}.item.sc-sui-side-nav:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.item.sub.sc-sui-side-nav{padding-inline-start:35px}.item[disabled].sc-sui-side-nav,.item[disabled].sc-sui-side-nav:hover{--ink-muted:var(--ink-placeholder);--ink-faint:var(--ink-placeholder);--accent:var(--surface-sunken);--accent-contrast:var(--ink-placeholder);color:var(--sn-off);background:transparent;cursor:not-allowed}.rail.collapsed.sc-sui-side-nav .item.sc-sui-side-nav{padding:9px 0;justify-content:center}.icon.sc-sui-side-nav{font-size:13px;width:17px;text-align:center;color:inherit}.item.on.sc-sui-side-nav .icon.sc-sui-side-nav{color:inherit}.label.sc-sui-side-nav{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge.sc-sui-side-nav{min-width:17px;height:17px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:var(--accent);color:var(--accent-contrast);font-size:10px;font-weight:720;font-feature-settings:'tnum';display:inline-flex;align-items:center;justify-content:center}.dot.sc-sui-side-nav{position:absolute;top:8px;inset-inline-end:7px;width:6px;height:6px;border-radius:50%;background:var(--sn-mark)}.chev.sc-sui-side-nav{font-size:9px;width:10px;text-align:center;color:inherit;transition:transform var(--duration-base) var(--ease-out)}.chev.closed.sc-sui-side-nav{transform:rotate(-90deg)}.chev.closed.sc-sui-side-nav:dir(rtl){transform:rotate(90deg)}.sub-list.sc-sui-side-nav{list-style:none;margin:0;padding:0}.foot.sc-sui-side-nav{border-top:1px solid var(--sn-hair);display:flex;align-items:center;gap:10px;padding-block:9px;padding-inline:16px 10px}.foot-slot.sc-sui-side-nav{flex:1;min-width:0;display:flex;align-items:center;white-space:nowrap;overflow:hidden}.rail.collapsed.sc-sui-side-nav .foot.sc-sui-side-nav{flex-direction:column;gap:8px;padding:9px 0}.rail.collapsed.sc-sui-side-nav .foot-slot.sc-sui-side-nav{flex:none;justify-content:center}.ctl.sc-sui-side-nav{width:var(--control-sm);height:var(--control-sm);flex-shrink:0;border:none;border-radius:var(--radius-md);padding:0;background:transparent;color:var(--sn-quiet);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.ctl.sc-sui-side-nav .sui-glyph.sc-sui-side-nav{font-size:11px}.ctl.sc-sui-side-nav .sui-glyph.sc-sui-side-nav:dir(rtl){transform:scaleX(-1)}.ctl.sc-sui-side-nav:hover{background:var(--sn-wash);color:var(--sn-ink)}.ctl.sc-sui-side-nav:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.tip.sc-sui-side-nav{position:fixed;transform:translateY(-50%);z-index:var(--z-tooltip);white-space:nowrap;background:var(--surface-raised);color:var(--ink);border:1px solid var(--border);font-size:11px;font-weight:620;padding:5px 9px;border-radius:6px;box-shadow:var(--shadow-pop);pointer-events:none}.tip.sc-sui-side-nav:dir(rtl){transform:translate(-100%, -50%)}.fly.sc-sui-side-nav{position:fixed;z-index:var(--z-dropdown);min-width:200px;max-width:280px;box-sizing:border-box;padding:4px 0 6px;background:var(--sn-ground);color:var(--sn-ink);border:1px solid var(--sn-hair);border-radius:var(--radius-md);box-shadow:var(--shadow-pop);font-family:var(--font-sans);animation:sui-side-nav-in var(--duration-fast) var(--ease-out)}.fly.surface.sc-sui-side-nav,.fly.canvas.sc-sui-side-nav{border-color:var(--border)}.fly.closing.sc-sui-side-nav{animation:sui-side-nav-out var(--duration-fast) var(--ease-out) forwards;pointer-events:none}.fly.sc-sui-side-nav .heading.sc-sui-side-nav{padding-top:9px}@keyframes sui-side-nav-in{from{opacity:0}}@keyframes sui-side-nav-out{to{opacity:0}}@media (forced-colors: active){.rail.sc-sui-side-nav,.fly.sc-sui-side-nav{border:1px solid CanvasText}.rail.flush.sc-sui-side-nav{border-width:0;border-inline-end-width:1px}.rule.sc-sui-side-nav{background:CanvasText}.item.on.sc-sui-side-nav{forced-color-adjust:none;background:Highlight;color:HighlightText}a.item.on.sc-sui-side-nav,a.item.on.sc-sui-side-nav:hover,a.item.on.sc-sui-side-nav:visited{color:HighlightText}.item.sc-sui-side-nav:focus-visible{outline-color:CanvasText;box-shadow:none}.item.on.sc-sui-side-nav .icon.sc-sui-side-nav{color:HighlightText}.badge.sc-sui-side-nav{background:Canvas;color:CanvasText;border:1px solid CanvasText}.dot.sc-sui-side-nav{background:CanvasText}.item.on.sc-sui-side-nav .dot.sc-sui-side-nav{background:HighlightText}}"}},[774,"sui-side-nav",{sections:[16],collapsed:[1540],active:[1025],height:[2],tone:[513],variant:[513],width:[2],collapsedWidth:[2,"collapsed-width"],expanded:[1040],collapsedBadges:[513,"collapsed-badges"],collapseControl:[513,"collapse-control"],hostLabel:[32],hasIcon:[32],hasBrand:[32],hasHeader:[32],hasHeaderCollapsed:[32],hasFooter:[32],hasFooterCollapsed:[32],tip:[32],fly:[32],flyClosing:[32],setFocus:[64],toggle:[64]},void 0,{sections:[{onSections:0}],active:[{onActive:0}]}]),A=T,E=function(){"undefined"!=typeof customElements&&["sui-side-nav"].forEach((s=>{"sui-side-nav"===s&&(customElements.get(n(s))||customElements.define(n(s),T))}))};export{A as SuiSideNav,E as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSkeletonCard extends Components.SuiSkeletonCard, HTMLElement {}
|
|
4
|
+
export const SuiSkeletonCard: {
|
|
5
|
+
prototype: SuiSkeletonCard;
|
|
6
|
+
new (): SuiSkeletonCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as s,h as a,a as i,t}from"./p-CeVlau-G.js";import{d}from"./p-CmEfiaNv.js";const n=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost()}animation="wave";render(){return a(i,{key:"0c8b4d548822a419276bc08781bbf0d5b0c025ed","aria-hidden":"true"},a("div",{key:"302b6d8997b04d738d50879eeacfada18c215e6c",class:"head"},a("sui-skeleton",{key:"51e5817ecb935abe16338d2763839a67485eb5c0",shape:"circle",animation:this.animation}),a("div",{key:"c22de1c1361dab18b641d94775f45c3652098a73",class:"titles"},a("sui-skeleton",{key:"7e867fabca19489ff1be797b9eecb6cae3981bf2",shape:"title",width:"55%",animation:this.animation}),a("sui-skeleton",{key:"3b9834becaeed495e1bf602041cdd5db2402766b",width:"35%",animation:this.animation}))),a("div",{key:"ef3d8248eaa8e51d59e9dc60b1d51678f22d0487",class:"lines"},a("sui-skeleton",{key:"097dcb1d91db47eb81de8d4c01d4ba04f71ad20a",animation:this.animation}),a("sui-skeleton",{key:"31bf568ca26782af3f7932b69a8f5b6a0cef2092",width:"88%",animation:this.animation}),a("sui-skeleton",{key:"6914722e0e9d31b2d39e735b7e3906ddf47fac00",width:"62%",animation:this.animation})))}static get style(){return".sc-sui-skeleton-card-h{display:block;box-sizing:border-box;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px 18px;font-family:var(--font-sans)}.head.sc-sui-skeleton-card{display:flex;gap:11px;align-items:center;margin-bottom:13px}.titles.sc-sui-skeleton-card{flex:1;display:flex;flex-direction:column;gap:7px}.lines.sc-sui-skeleton-card{display:flex;flex-direction:column;gap:8px}"}},[514,"sui-skeleton-card",{animation:[513]}]),c=n,o=function(){"undefined"!=typeof customElements&&["sui-skeleton-card","sui-skeleton"].forEach((e=>{switch(e){case"sui-skeleton-card":customElements.get(t(e))||customElements.define(t(e),n);break;case"sui-skeleton":customElements.get(t(e))||d()}}))};export{c as SuiSkeletonCard,o as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSkeleton extends Components.SuiSkeleton, HTMLElement {}
|
|
4
|
+
export const SuiSkeleton: {
|
|
5
|
+
prototype: SuiSkeleton;
|
|
6
|
+
new (): SuiSkeleton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as o,d as s}from"./p-CmEfiaNv.js";const a=o,m=s;export{a as SuiSkeleton,m as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSlider extends Components.SuiSlider, HTMLElement {}
|
|
4
|
+
export const SuiSlider: {
|
|
5
|
+
prototype: SuiSlider;
|
|
6
|
+
new (): SuiSlider;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as i,c as e,h as t,t as r}from"./p-CeVlau-G.js";import{F as a,d as l}from"./p-piEUki9n.js";import{u as n}from"./p-U06fVoGD.js";import{i as d,d as o,s as h,r as u}from"./p-BHB1Wprj.js";import{b as c,c as f}from"./p-qut9RP2y.js";import{i as b}from"./p-GAnFXayY.js";import{a as p}from"./p-BuyjS5bS.js";import{f as m}from"./p-CGWvlrv_.js";const g=s=>null==s||""===s||"number"==typeof s&&Number.isNaN(s),v=s(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiInput=e(this,"suiInput",7),this.suiChange=e(this,"suiChange",7),this.internals=this.attachInternals()}get host(){return this}internals;label;help;error;required=!1;min=0;max=100;step=1;value=50;range=!1;minGap=0;orientation="horizontal";disabled=!1;readOnly=!1;showValue=!1;format;name;suiInput;suiChange;dragging=-1;formDisabled=!1;get isDisabled(){return this.disabled||this.formDisabled}get isInert(){return this.isDisabled||this.readOnly}get vertical(){return"vertical"===this.orientation}fieldId=n("sui-slider");track;handles=[];initial=50;async setFocus(){this.handles[0]?.focus()}connectedCallback(){d(this.host,this.internals),o(this.host,(()=>this.handles[0]))}componentWillLoad(){this.value=this.shaped(this.value),this.initial=Array.isArray(this.value)?[...this.value]:this.value,this.syncForm()}disconnectedCallback(){this.stopDrag(!1)}componentDidRender(){this.syncForm()}onValue(){const s=this.shaped(this.value);s!==this.value?this.value=s:this.syncForm()}syncForm(){const s=this.empty;h(this.internals,this.isDisabled?null:s?"":this.range?`${this.pair[0]},${this.pair[1]}`:this.one+""),u(this.internals,this.required&&!this.isDisabled&&!this.readOnly,s,this.label,this.handles[0],this.error)}shaped(s){if(g(s))return null;if(this.range)return Array.isArray(s)&&s.length>=2&&Number.isFinite(s[0])&&Number.isFinite(s[1])?2===s.length?s:[Number(s[0]),Number(s[1])]:[this.min,this.max];const i=Number(Array.isArray(s)?s[0]:s);return Number.isFinite(i)?i===s?s:i:null}get empty(){return g(this.value)}get one(){const s=this.value,i=Array.isArray(s)?s[0]:s;return"number"==typeof i&&Number.isFinite(i)?i:this.min}get pair(){const s=this.value;return Array.isArray(s)?[s[0],s[1]]:[this.min,this.max]}componentDidLoad(){this.syncForm()}formResetCallback(){this.value=Array.isArray(this.initial)?[...this.initial]:this.initial}formDisabledCallback(s){this.formDisabled=m(this.host,this.disabled,s),this.syncForm()}fmt(s){return this.format?this.format(s):c(s)}pct(s){const i=this.max-this.min;return i>0?f((s-this.min)/i*100,0,100):0}get stepSize(){return this.step>0?this.step:1}get decimals(){return((this.stepSize+"").split(".")[1]||"").length}snap(s){const i=this.stepSize;return f(Number((this.min+Math.round((s-this.min)/i)*i).toFixed(this.decimals)),this.min,this.max)}get gap(){if(!(this.minGap>0))return 0;const s=this.stepSize;return Number((Math.ceil(this.minGap/s-1e-9)*s).toFixed(this.decimals))}fromPointer(s){if(!this.track)return this.min;const i=this.track.getBoundingClientRect(),e=b(this.track)?i.right-s.clientX:s.clientX-i.left,t=this.vertical?i.height>0?f((i.bottom-s.clientY)/i.height,0,1):0:i.width>0?f(e/i.width,0,1):0;return this.snap(this.min+t*(this.max-this.min))}detail(){return this.range?this.pair:this.one}setHandle(s,i){let e=this.snap(i);const t=this.empty;if(this.range){const i=this.pair,r=this.gap,a=Number(0===s?(i[1]-r).toFixed(this.decimals):(i[0]+r).toFixed(this.decimals));return e=0===s?Math.min(e,a):Math.max(e,a),e=f(e,this.min,this.max),!(0===s?e>a:e<a)&&!(i[s]===e&&!t||(i[s]=e,this.value=i,0))}return!(this.one===e&&!t||(this.value=e,0))}onMove=s=>{this.dragging<0||this.setHandle(this.dragging,this.fromPointer(s))&&this.suiInput.emit(this.detail())};onUp=()=>this.stopDrag(!0);startDrag(s){this.dragging=s,this.handles[s]?.focus(),document.addEventListener("pointermove",this.onMove),document.addEventListener("pointerup",this.onUp),document.addEventListener("pointercancel",this.onUp)}stopDrag(s){"undefined"!=typeof document&&(document.removeEventListener("pointermove",this.onMove),document.removeEventListener("pointerup",this.onUp),document.removeEventListener("pointercancel",this.onUp)),this.dragging<0||(this.dragging=-1,s&&this.suiChange.emit(this.detail()))}onHandleDown=s=>i=>{this.isInert||(i.preventDefault(),i.stopPropagation(),this.startDrag(s))};nearestHandle(s){if(!this.range)return 0;const[i,e]=this.pair;return Math.abs(s-i)<=Math.abs(s-e)?0:1}onTrackDown=s=>{if(this.isInert)return;s.preventDefault();const i=this.fromPointer(s),e=this.nearestHandle(i);this.setHandle(e,i)&&this.suiInput.emit(this.detail()),this.startDrag(e)};onHandleKey=s=>i=>{if(this.isInert)return;const e=this.range?this.pair[s]:this.one,t=this.stepSize,r=!this.vertical&&b(this.host)?"ArrowLeft":"ArrowRight";let a;switch(i.key){case r:case"ArrowUp":a=e+t;break;case"ArrowLeft"===r?"ArrowRight":"ArrowLeft":case"ArrowDown":a=e-t;break;case"PageUp":a=e+10*t;break;case"PageDown":a=e-10*t;break;case"Home":a=this.min;break;case"End":a=this.max;break;default:return}i.preventDefault(),this.setHandle(s,a)&&(this.suiInput.emit(this.detail()),this.suiChange.emit(this.detail()))};renderHandle(s,i){const e=this.pct(s),r=e+"%";return t("div",{key:i,ref:s=>this.handles[i]=s,class:{handle:!0,dragging:this.dragging===i},role:"slider",tabIndex:this.isDisabled?-1:0,"aria-label":(this.range?`${this.label?this.label+" ":""}${0===i?"minimum":"maximum"}`:this.label)||void 0,"aria-orientation":this.vertical?"vertical":null,"aria-valuenow":s,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuetext":this.empty?p(void 0,"slider.noValue",void 0,"No value"):this.fmt(s),"aria-disabled":this.isDisabled?"true":null,"aria-readonly":this.readOnly?"true":null,"aria-invalid":this.error?"true":null,"aria-describedby":l(this.fieldId,this.help,this.error),style:this.vertical?{bottom:r,zIndex:this.range&&0===i&&e>50?"2":"1"}:{insetInlineStart:r,zIndex:this.range&&0===i&&e>50?"2":"1"},onPointerDown:this.onHandleDown(i),onKeyDown:this.onHandleKey(i)})}render(){const[s,i]=this.pair,e=this.range?this.pct(s):0,r=this.range?this.pct(i):this.empty?0:this.pct(this.one),l=s=>t("span",{key:"f2234063bf300aa93bfba689f1dd64dd378f92d4",class:"figure"},this.fmt(s)),n=this.empty?null:this.range?[l(s)," – ",l(i)]:l(this.one),d=this.vertical,o=d?{bottom:e+"%",height:Math.max(0,r-e)+"%"}:{insetInlineStart:e+"%",width:Math.max(0,r-e)+"%"};return t(a,{key:"38901a2efc3e1def330e8b665f42d053742cfd0e",help:this.help,error:this.error,descId:this.fieldId},t("div",{key:"657b5db8dc5081158d6f8caabb905dd6903d203c",class:{"sui-slider":!0,disabled:this.isDisabled,"read-only":this.readOnly,invalid:!!this.error,range:this.range,vertical:d,empty:this.empty}},this.label||this.showValue&&!d?t("div",{class:"head"},t("span",{class:"label"},this.label,this.label&&this.required?t("span",{class:"sui-field-req","aria-hidden":"true"},"*"):null),this.showValue&&!d?t("span",{class:"readout"},n):null):null,t("div",{key:"d5e525c5760ccd32112508a8dd6655764a362a0e",ref:s=>this.track=s,class:"track",onPointerDown:this.onTrackDown},t("div",{key:"ac96a6b31831cdb35bd37728f529a51b2aece8b5",class:"rail"}),t("div",{key:"f1450666108aaf93441d948327226d0397ffd562",class:"fill",style:o}),this.range?[this.renderHandle(s,0),this.renderHandle(i,1)]:this.renderHandle(this.one,0)),d&&this.showValue?t("div",{class:"foot"},t("span",{class:"readout"},n)):null))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValue:0}],range:[{onValue:0}],required:[{syncForm:0}],error:[{syncForm:0}],label:[{syncForm:0}],disabled:[{syncForm:0}],readOnly:[{syncForm:0}]}}static get style(){return".sc-sui-slider-h{display:block;font-family:var(--font-sans)}[orientation='vertical'].sc-sui-slider-h{display:inline-block;height:180px}[orientation='vertical'].sc-sui-slider-h .sui-field.sc-sui-slider{height:100%}[orientation='vertical'].sc-sui-slider-h .sui-slider.sc-sui-slider{flex:1 1 auto;min-height:0}.sui-slider.sc-sui-slider{display:flex;flex-direction:column;gap:8px}.head.sc-sui-slider{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.label.sc-sui-slider{font-size:12.5px;font-weight:620;color:var(--ink);line-height:1.3}.readout.sc-sui-slider{font-size:12.5px;font-weight:650;color:var(--ink-muted);font-feature-settings:'tnum';white-space:nowrap}.figure.sc-sui-slider{direction:ltr;unicode-bidi:plaintext}.track.sc-sui-slider{position:relative;height:16px;cursor:pointer;touch-action:none}.read-only.sc-sui-slider .track.sc-sui-slider,.read-only.sc-sui-slider .handle.sc-sui-slider{cursor:default}.disabled.sc-sui-slider .track.sc-sui-slider{cursor:not-allowed}.rail.sc-sui-slider,.fill.sc-sui-slider{position:absolute;top:50%;transform:translateY(-50%);height:4px;border-radius:2px}.rail.sc-sui-slider{left:0;right:0;background:var(--brand-soft)}.fill.sc-sui-slider{background:var(--brand)}.disabled.sc-sui-slider .fill.sc-sui-slider{background:var(--border-strong)}.empty.sc-sui-slider .fill.sc-sui-slider{visibility:hidden}.handle.sc-sui-slider{position:absolute;top:50%;margin-inline-start:-8px;transform:translateY(-50%);box-sizing:border-box;width:16px;height:16px;border-radius:50%;--sui-slider-tint:var(--brand);--sui-slider-lift:0 1px 3px color-mix(in srgb, var(--sui-slider-tint) 25%, transparent);background:var(--surface);border:2px solid var(--sui-slider-tint);box-shadow:var(--sui-slider-lift);cursor:grab;touch-action:none}.handle.dragging.sc-sui-slider{cursor:grabbing}.handle.sc-sui-slider:hover{box-shadow:var(--sui-slider-lift), 0 0 0 6px var(--surface-hover)}.handle.sc-sui-slider:active,.handle.dragging.sc-sui-slider{box-shadow:var(--sui-slider-lift), 0 0 0 6px var(--surface-pressed)}.handle.sc-sui-slider:focus{outline:none}.handle.sc-sui-slider:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.invalid.sc-sui-slider:not(.disabled) .rail.sc-sui-slider{background:var(--danger-soft)}.invalid.sc-sui-slider:not(.disabled) .fill.sc-sui-slider{background:var(--danger)}.invalid.sc-sui-slider:not(.disabled) .handle.sc-sui-slider{--sui-slider-tint:var(--danger)}.invalid.sc-sui-slider .handle.sc-sui-slider:focus-visible{outline-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent)}.disabled.sc-sui-slider .handle.sc-sui-slider{border-color:var(--border-strong);cursor:not-allowed}.disabled.sc-sui-slider .handle.sc-sui-slider:hover,.read-only.sc-sui-slider .handle.sc-sui-slider:hover{box-shadow:var(--sui-slider-lift)}.vertical.sc-sui-slider{align-items:center}.vertical.sc-sui-slider .head.sc-sui-slider,.vertical.sc-sui-slider .foot.sc-sui-slider{flex:none;justify-content:center}.vertical.sc-sui-slider .track.sc-sui-slider{flex:1 1 auto;height:auto;width:16px;min-height:48px}.vertical.sc-sui-slider .rail.sc-sui-slider,.vertical.sc-sui-slider .fill.sc-sui-slider{top:auto;left:50%;transform:translateX(-50%);width:4px;height:auto}.vertical.sc-sui-slider .rail.sc-sui-slider{top:0;bottom:0}.vertical.sc-sui-slider .handle.sc-sui-slider{top:auto;left:50%;margin-inline-start:0;transform:translate(-50%, 50%)}@media (forced-colors: active){.rail.sc-sui-slider{box-sizing:border-box;border:1px solid CanvasText}.fill.sc-sui-slider,.invalid.sc-sui-slider:not(.disabled) .fill.sc-sui-slider{background:Highlight}.handle.sc-sui-slider{background:ButtonText;border-color:ButtonText}.disabled.sc-sui-slider .fill.sc-sui-slider{background:GrayText}.disabled.sc-sui-slider .handle.sc-sui-slider{background:GrayText;border-color:GrayText}.disabled.sc-sui-slider .label.sc-sui-slider,.disabled.sc-sui-slider .readout.sc-sui-slider{color:GrayText}}.sui-field.sc-sui-slider{display:flex;flex-direction:column;gap:6px;font-family:var(--font-sans);min-width:0}.sui-field-label.sc-sui-slider{font-size:12.5px;font-weight:620;color:var(--ink);line-height:1.3}.sui-field.invalid.sc-sui-slider .sui-field-label.sc-sui-slider{color:var(--danger)}.sui-field-req.sc-sui-slider{color:var(--danger);margin-inline-start:3px}.sui-field-help.sc-sui-slider{font-size:12px;color:var(--ink-faint);line-height:1.4}.sui-field-error.sc-sui-slider{font-size:12px;font-weight:600;color:var(--danger);display:flex;align-items:center;gap:5px;line-height:1.4}.sui-field-error.sc-sui-slider .sui-glyph.sc-sui-slider{font-size:11px}"}},[578,"sui-slider",{label:[1],help:[1],error:[1],required:[516],min:[2],max:[2],step:[2],value:[1026],range:[516],minGap:[2,"min-gap"],orientation:[513],disabled:[516],readOnly:[516,"readonly"],showValue:[516,"show-value"],format:[16],name:[513],dragging:[32],formDisabled:[32],setFocus:[64]},void 0,{value:[{onValue:0}],range:[{onValue:0}],required:[{syncForm:0}],error:[{syncForm:0}],label:[{syncForm:0}],disabled:[{syncForm:0}],readOnly:[{syncForm:0}]}]),x=v,y=function(){"undefined"!=typeof customElements&&["sui-slider"].forEach((s=>{"sui-slider"===s&&(customElements.get(r(s))||customElements.define(r(s),v))}))};export{x as SuiSlider,y as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSparkline extends Components.SuiSparkline, HTMLElement {}
|
|
4
|
+
export const SuiSparkline: {
|
|
5
|
+
prototype: SuiSparkline;
|
|
6
|
+
new (): SuiSparkline;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as o,d as s}from"./p-BwHBOv1l.js";const p=o,r=s;export{p as SuiSparkline,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSpeedDial extends Components.SuiSpeedDial, HTMLElement {}
|
|
4
|
+
export const SuiSpeedDial: {
|
|
5
|
+
prototype: SuiSpeedDial;
|
|
6
|
+
new (): SuiSpeedDial;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as i,c as e,h as t,a,t as o}from"./p-CeVlau-G.js";import{i as r}from"./p-wknHx00K.js";import{d}from"./p-BHB1Wprj.js";import{o as n,a as l}from"./p-DsHK25q3.js";import{k as c}from"./p-CYlxvoVo.js";import{u}from"./p-U06fVoGD.js";import{a as p,l as h}from"./p-BuyjS5bS.js";import{i as f}from"./p-GAnFXayY.js";const b=["up","down","left","right"],v=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],m={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"},g={ArrowUp:"ArrowDown",ArrowDown:"ArrowUp",ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"},w=s(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiOpen=e(this,"suiOpen",3),this.suiClose=e(this,"suiClose",3),this.suiPick=e(this,"suiPick",7)}get host(){return this}items=[];disabled=!1;icon="fa-solid fa-plus";iconOpen;direction="up";open=!1;suiOpen;suiClose;suiPick;hostLabel;closing=!1;launcher;satsEl;fieldId=u("sui-speed-dial");stopOutside;stopAria;exit=n((()=>this.closing=!1));pendingFocus;get fanned(){return this.open&&!this.disabled}get fanDirection(){return b.includes(this.direction)?this.direction:"up"}connectedCallback(){d(this.host,(()=>this.launcher)),this.stopAria?.(),this.stopAria=r(this.host,(s=>{this.hostLabel=s})),this.launcher&&this.armOutside()}componentDidLoad(){this.armOutside()}componentDidUpdate(){this.armOutside()}componentDidRender(){if(!this.pendingFocus)return;const s=this.pendingFocus;this.pendingFocus=void 0,this.fanned&&this.focusSat(this.step(-1,"first"===s?1:-1))}disconnectedCallback(){this.stopAria?.(),this.stopAria=void 0,this.stopOutside?.(),this.stopOutside=void 0,this.exit.active&&(this.exit.cancel(),this.closing=!1)}onFanChange(){if(this.fanned)return this.exit.cancel(),void(this.closing=!1);!this.closing&&this.satsEl&&(this.closing=this.exit.begin(this.satsEl))}armOutside(){this.fanned&&!this.stopOutside&&this.host.isConnected?this.stopOutside=l((()=>[this.host]),(()=>this.requestClose("outside"))):!this.fanned&&this.stopOutside&&(this.stopOutside(),this.stopOutside=void 0)}onDisabled(s){s&&this.requestClose("cancel")}async setFocus(){this.launcher?.focus()}show(){this.open||(this.open=!0,c(this.host,this.launcher),this.suiOpen.emit())}requestClose(s,i=!1){this.open&&(this.suiClose.emit(s).defaultPrevented||(this.open=!1,i&&this.launcher?.focus()))}toggle=()=>{this.disabled||(this.open?this.requestClose("trigger"):this.show())};pick(s){s.disabled||(this.requestClose("pick",!0),this.suiPick.emit(s),s.command?.())}onFocusOut=s=>{if(!this.fanned)return;const i=s.relatedTarget;i&&!this.host.contains(i)&&this.requestClose("outside")};step(s,i){const e=this.items||[],t=e.length;if(!t)return-1;const a=s=>!e[s]?.disabled;if(s<0){for(let s=0;s<t;s++){const e=i>0?s:t-1-s;if(a(e))return e}return-1}let o=s;for(let s=0;s<t;s++)if(o=(o+i+t)%t,a(o))return o;return-1}sats(){return Array.from(this.host.querySelectorAll("button.sat"))}focusSat(s){s<0||this.sats()[s]?.focus()}arrowStep(s){const i=m[this.fanDirection];if(s===i)return 1;if(s===g[i])return-1;const e=f(this.host)?"ArrowLeft":"ArrowRight";return"ArrowDown"===s||s===e?1:"ArrowUp"===s||s===g[e]?-1:0}onKeyDown=s=>{if("Escape"===s.key){if(!this.fanned)return;return s.preventDefault(),s.stopPropagation(),void this.requestClose("escape",!0)}if(this.disabled)return;const i=s.target;if(i===this.launcher){if(!v.includes(s.key))return;s.preventDefault();const i=s.key===g[m[this.fanDirection]]?"last":"first";return void(this.fanned?this.focusSat(this.step(-1,"first"===i?1:-1)):(this.pendingFocus=i,this.show()))}const e=i&&"function"==typeof i.closest?i.closest("button.sat"):null;if(!e||!this.fanned)return;const t=this.sats().indexOf(e);if("Home"===s.key)return s.preventDefault(),void this.focusSat(this.step(-1,1));if("End"===s.key)return s.preventDefault(),void this.focusSat(this.step(-1,-1));const a=this.arrowStep(s.key);a&&(s.preventDefault(),this.focusSat(this.step(t,a)))};render(){const s=this.fanDirection,i=this.hostLabel||p(void 0,"speed-dial.quickActions",void 0,"Quick actions"),e=this.fieldId+"-sats",o=this.items||[],r=this.fanned;return t(a,{key:"049709302f2b68fa4e2a94259d077b5f77cd37ec"},t("div",{key:"27404c8506c31124c983c99dcb916e4e1c0080cc",class:{dial:!0,[s]:!0,open:r,spin:!this.iconOpen},onKeyDown:this.onKeyDown,onFocusout:this.onFocusOut},t("button",{key:"21a53903f4dc8e1a3670ac15f3c178947a51b479",ref:s=>this.launcher=s,type:"button",class:"launcher",disabled:this.disabled,"aria-label":i,"aria-expanded":r?"true":"false","aria-controls":r?e:null,onClick:this.toggle},t("i",{key:"ed24963a9341f2c0174b2b52b7a3a2abf9984f4b",class:r&&this.iconOpen?this.iconOpen:this.icon,"aria-hidden":"true"})),r||this.closing?t("div",{class:{sats:!0,closing:this.closing},inert:this.closing,id:e,role:"group","aria-label":i,ref:s=>this.satsEl=s},o.map(((s,i)=>t("div",{class:"sat-wrap",key:i},t("button",{type:"button",class:"sat",disabled:this.disabled||!!s.disabled,"aria-label":s.label||h(void 0,"speed-dial.action",void 0,"Action {n}",{n:i+1}),onClick:()=>this.pick(s)},t("i",{class:s.icon,"aria-hidden":"true"})),s.label?t("span",{class:"cap","aria-hidden":"true"},s.label):null)))):null))}static get watchers(){return{open:[{onFanChange:0}],disabled:[{onFanChange:0},{onDisabled:0}]}}static get style(){return".sc-sui-speed-dial-h{position:relative;display:inline-block;vertical-align:middle;font-family:var(--font-sans)}.dial.sc-sui-speed-dial{position:relative;display:flex;flex-direction:column;align-items:center}.sats.sc-sui-speed-dial{position:absolute;left:50%;transform:translateX(-50%);z-index:var(--z-dropdown);display:flex;flex-direction:column-reverse;align-items:center;gap:10px;bottom:calc(100% + 10px)}.dial.down.sc-sui-speed-dial .sats.sc-sui-speed-dial{top:calc(100% + 10px);bottom:auto;flex-direction:column}.dial.left.sc-sui-speed-dial .sats.sc-sui-speed-dial,.dial.right.sc-sui-speed-dial .sats.sc-sui-speed-dial{left:auto;bottom:auto;top:50%;transform:translateY(-50%);flex-direction:row;align-items:center}.dial.left.sc-sui-speed-dial .sats.sc-sui-speed-dial{right:calc(100% + 10px);flex-direction:row-reverse}.dial.right.sc-sui-speed-dial .sats.sc-sui-speed-dial{left:calc(100% + 10px)}.launcher.sc-sui-speed-dial{width:48px;height:48px;padding:0;margin:0;border:none;border-radius:50%;cursor:pointer;background:var(--accent);color:var(--accent-contrast);box-shadow:var(--shadow-pop);display:flex;align-items:center;justify-content:center;transition:transform var(--duration-base) var(--ease-out), background var(--duration-fast) var(--ease-out)}.launcher.sc-sui-speed-dial i.sc-sui-speed-dial{font-size:17px}.dial.open.spin.sc-sui-speed-dial .launcher.sc-sui-speed-dial{transform:rotate(45deg)}.launcher.sc-sui-speed-dial:hover{background:var(--accent-hover)}.launcher.sc-sui-speed-dial:active{background:var(--accent-active)}.launcher.sc-sui-speed-dial:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.launcher.sc-sui-speed-dial:disabled,.sat.sc-sui-speed-dial:disabled{background:var(--disabled-bg);color:var(--disabled-ink);cursor:not-allowed;box-shadow:none}.launcher.sc-sui-speed-dial:disabled:hover,.sat.sc-sui-speed-dial:disabled:hover{background:var(--disabled-bg)}.sat-wrap.sc-sui-speed-dial{position:relative;display:flex;align-items:center;animation:sui-speed-dial-in var(--duration-overlay) var(--ease-out)}.dial.down.sc-sui-speed-dial .sat-wrap.sc-sui-speed-dial{animation-name:sui-speed-dial-in-down}.dial.left.sc-sui-speed-dial .sat-wrap.sc-sui-speed-dial{animation-name:sui-speed-dial-in-left}.dial.right.sc-sui-speed-dial .sat-wrap.sc-sui-speed-dial{animation-name:sui-speed-dial-in-right}.sats.closing.sc-sui-speed-dial{pointer-events:none}.sats.closing.sc-sui-speed-dial .sat-wrap.sc-sui-speed-dial{animation:sui-speed-dial-out var(--duration-fast) var(--ease-out) forwards}.sat.sc-sui-speed-dial{width:40px;height:40px;padding:0;margin:0;border:none;border-radius:50%;cursor:pointer;background:var(--brand);color:var(--brand-contrast);box-shadow:var(--shadow-raised);display:flex;align-items:center;justify-content:center;transition:background var(--duration-fast) var(--ease-out)}.sat.sc-sui-speed-dial i.sc-sui-speed-dial{font-size:14px}.sat.sc-sui-speed-dial:hover,.sat.sc-sui-speed-dial:focus-visible{background:var(--brand-hover)}.sat.sc-sui-speed-dial:active{background:var(--brand-active)}.sat.sc-sui-speed-dial:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.cap.sc-sui-speed-dial{display:none;position:absolute;inset-inline-end:calc(100% + 10px);white-space:nowrap;background:var(--brand);color:var(--brand-contrast);font-size:11.5px;font-weight:620;padding:5px 9px;border-radius:var(--radius-sm);box-shadow:var(--shadow-pop);pointer-events:none}.sat.sc-sui-speed-dial:hover+.cap.sc-sui-speed-dial,.sat.sc-sui-speed-dial:focus-visible+.cap.sc-sui-speed-dial{display:inline-block}.dial.left.sc-sui-speed-dial .cap.sc-sui-speed-dial,.dial.right.sc-sui-speed-dial .cap.sc-sui-speed-dial{inset-inline:auto;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%)}@keyframes sui-speed-dial-in{from{opacity:0;transform:translateY(4px)}}@keyframes sui-speed-dial-in-down{from{opacity:0;transform:translateY(-4px)}}@keyframes sui-speed-dial-in-left{from{opacity:0;transform:translateX(4px)}}@keyframes sui-speed-dial-in-right{from{opacity:0;transform:translateX(-4px)}}@keyframes sui-speed-dial-out{to{opacity:0}}@media (forced-colors: active){.launcher.sc-sui-speed-dial,.sat.sc-sui-speed-dial{border:1px solid ButtonText}.launcher.sc-sui-speed-dial:disabled,.sat.sc-sui-speed-dial:disabled{border-color:GrayText}.cap.sc-sui-speed-dial{border:1px solid CanvasText}}"}},[514,"sui-speed-dial",{items:[16],disabled:[516],icon:[1],iconOpen:[1,"icon-open"],direction:[513],open:[1540],hostLabel:[32],closing:[32],setFocus:[64]},void 0,{open:[{onFanChange:0}],disabled:[{onFanChange:0},{onDisabled:0}]}]),x=w,y=function(){"undefined"!=typeof customElements&&["sui-speed-dial"].forEach((s=>{"sui-speed-dial"===s&&(customElements.get(o(s))||customElements.define(o(s),w))}))};export{x as SuiSpeedDial,y as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSplitButton extends Components.SuiSplitButton, HTMLElement {}
|
|
4
|
+
export const SuiSplitButton: {
|
|
5
|
+
prototype: SuiSplitButton;
|
|
6
|
+
new (): SuiSplitButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,c as s,f as n,h as e,a as o,t as a}from"./p-CeVlau-G.js";import{f as r,a as u,l as c,m as l,M as d}from"./p-lu4HWrMJ.js";import{G as p,y as b}from"./p-BeYfX4rQ.js";import{o as h,p as m,a as v,b as f,m as g,l as x}from"./p-DsHK25q3.js";import{k}from"./p-CYlxvoVo.js";import{t as y}from"./p-CDaU9b47.js";import{u as w}from"./p-U06fVoGD.js";import{d as z}from"./p-BHB1Wprj.js";import{l as C,a as j}from"./p-BuyjS5bS.js";import{i as D}from"./p-GAnFXayY.js";import{defineCustomElement as H}from"./p-DquILvXX.js";const I=["accent","brand","outline"],T=["sm","md","lg"],A=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.suiPick=s(this,"suiPick",7),this.suiOpen=s(this,"suiOpen",3),this.suiClose=s(this,"suiClose",3)}get host(){return this}label;icon;items=[];variant="accent";size="md";disabled=!1;loading=!1;open=!1;menuAlign="start";type="button";name;value;form;menuWidth=200;suiPick;suiOpen;suiClose;active=-1;closing=!1;fieldId=w("sui-split");control;chev;panel;menu;disposers=[];exit=h((()=>this.closing=!1));pendingFocus=-1;raised;demote;get menuOpen(){return this.open&&!this.disabled&&!this.loading}connectedCallback(){z(this.host,(()=>this.mainButton())),this.control&&this.menuOpen&&n(this)}componentWillRender(){!this.raised||this.menuOpen||this.closing||this.lowerPanel()}componentDidRender(){if((this.menuOpen||this.closing)&&this.panel&&this.raised!==this.panel&&(this.lowerPanel(),this.demote=m(this.panel),this.raised=this.panel),this.menuOpen&&(this.reposition(),this.afterOpen()),this.pendingFocus>=0&&this.menu){const t=this.pendingFocus;this.pendingFocus=-1,r(this.menu,t)}}disconnectedCallback(){this.teardown(),this.exit.cancel(),this.lowerPanel(),this.closing=!1}lowerPanel(){const t=this.demote;this.demote=void 0,this.raised=void 0,t?.()}onInertChange(t){t&&this.requestClose("cancel")}onOpenChange(t){if(t)return this.exit.cancel(),void(this.closing=!1);this.teardown(),this.active=-1,this.closing=this.exit.begin(this.panel)}async setFocus(){this.mainButton()?.focus()}mainButton(){return this.host.querySelector("sui-button.main .sui-btn")}afterOpen(){this.open&&this.panel&&!this.disposers.length&&this.host.isConnected&&this.disposers.push(v((()=>[this.host,this.panel]),(()=>this.requestClose("outside"))),f((()=>this.reposition())))}reposition(){if(!this.control||!this.panel)return;const t="left"===this.menuAlign||"right"===this.menuAlign?"right"===this.menuAlign!==D(this.host)?"end":"start":"end"===this.menuAlign?"end":"start";g(this.panel,x(this.control,this.panel,"bottom",6,t))}teardown(){this.disposers.forEach((t=>t())),this.disposers=[]}show(){this.open||(this.open=!0,k(this.host,this.chev),this.suiOpen.emit())}requestClose(t,i=!1){return!this.open||!this.suiClose.emit(t).defaultPrevented&&(this.open=!1,i&&this.chev?.focus(),!0)}openAt(t){this.active=t,this.pendingFocus=t,this.show()}pick=t=>{this.requestClose("pick",!0),this.suiPick.emit(t),t.command?.()};stopClick=t=>{t.stopPropagation()};toggle=t=>{t.stopPropagation(),this.disabled||this.loading||(this.open?this.requestClose("trigger"):this.show())};onControlKey=t=>{if(this.disabled||this.loading)return;const i=this.items;"ArrowDown"===t.key?(t.preventDefault(),this.open?r(this.menu,this.active>=0?this.active:u(i)):this.openAt(u(i))):"ArrowUp"===t.key?(t.preventDefault(),this.open||this.openAt(c(i))):"Escape"===t.key&&this.open&&(t.preventDefault(),this.requestClose("escape",!0))};onMenuKey=t=>{if(y(t,this.panel,(()=>this.requestClose("outside",!0)?this.chev:null),!0))return;const i=this.items,s=l(t,i,this.active);if("move"===s.action&&s.index>=0)this.active=s.index,r(this.menu,s.index);else if("activate"===s.action){const t=i[this.active];!t||t.disabled||t.separator||this.pick(t)}else"escape"===s.action&&(t.stopPropagation(),this.requestClose("escape",!0))};render(){const t=this.fieldId+"-menu",i=I.includes(this.variant)?this.variant:"accent",s=T.includes(this.size)?this.size:"md",n=this.disabled||this.loading,a=this.label?C(void 0,"split-button.optionsFor",void 0,"{label} options",{label:this.label}):j(void 0,"split-button.moreActions",void 0,"More actions");return e(o,{key:"cdd5e546552e655c615952f9342965468bb5d807"},e("div",{key:"642d2459b7a2b3e3f6b50dc5ef383cee46c918df",ref:t=>this.control=t,class:"split",onKeyDown:this.onControlKey},e("sui-button",{key:"82d45a4d11c2bfdb2bba5dda30391c3d4ad0b521",class:"main",variant:i,size:s,label:this.label,icon:this.icon,disabled:this.disabled,loading:this.loading,type:this.type,form:this.form,name:this.name,value:this.value}),e("button",{key:"350ef9a36246b917b8d752bfac3090b4b37259a7",ref:t=>this.chev=t,type:"button",class:{chev:!0,[i]:!0,[s]:!0,loading:this.loading},disabled:n,"aria-label":a,"aria-haspopup":"menu","aria-expanded":this.menuOpen?"true":"false","aria-controls":this.menuOpen?t:null,onClick:this.toggle},e(p,{key:"b30e906434528be5597b5be790bcf65870e9ecb6",glyph:b}))),this.menuOpen||this.closing?e("div",{ref:t=>this.panel=t,id:t,class:{panel:!0,closing:this.closing},inert:this.closing,onClick:this.stopClick},e(d,{items:this.items,width:this.menuWidth,activeIndex:this.active,idBase:this.fieldId,ariaLabel:a,menuRef:t=>this.menu=t,onPick:this.pick,onHover:t=>this.active=t,onLeave:()=>this.active=-1,onKeyDown:this.onMenuKey})):null)}static get watchers(){return{disabled:[{onInertChange:0}],loading:[{onInertChange:0}],open:[{onOpenChange:0}]}}static get style(){return".sc-sui-split-button-h{display:inline-block;vertical-align:middle;font-family:var(--font-sans)}.split.sc-sui-split-button{display:inline-flex;align-items:stretch;position:relative}.main.sc-sui-split-button{position:relative;z-index:0;--sui-button-radius:var(--radius-md) 0 0 var(--radius-md);--sui-button-hover-border:color-mix(in srgb, var(--ink) 30%, var(--control-border))}.main.sc-sui-split-button:dir(rtl){--sui-button-radius:0 var(--radius-md) var(--radius-md) 0}.main.sc-sui-split-button:focus-within{z-index:2}.chev.sc-sui-split-button{position:relative;z-index:1;box-sizing:border-box;margin:0;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:0;border-start-end-radius:var(--radius-md);border-end-end-radius:var(--radius-md);font-family:var(--font-sans);line-height:1;cursor:pointer;user-select:none;transition:background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.chev.sc-sui-split-button::before{content:'';position:absolute;top:-1px;bottom:-1px;inset-inline-start:0;width:1px;background:color-mix(in srgb, var(--brand) 18%, transparent)}.chev.sc-sui-split-button:hover:not(:disabled)::before,.chev.sc-sui-split-button:active:not(:disabled)::before{background:transparent}.chev.sc-sui-split-button .sui-glyph.sc-sui-split-button{font-size:10px}.chev.sc-sui-split-button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow);z-index:2}.chev.sm.sc-sui-split-button{height:var(--control-sm)}.chev.md.sc-sui-split-button{height:var(--control-md)}.chev.lg.sc-sui-split-button{height:var(--control-lg)}.chev.accent.sc-sui-split-button{background:var(--accent);color:var(--accent-contrast)}.chev.accent.sc-sui-split-button:hover:not(:disabled){background:var(--accent-hover)}.chev.accent.sc-sui-split-button:active:not(:disabled){background:var(--accent-active)}.chev.brand.sc-sui-split-button{background:var(--brand);color:var(--brand-contrast)}.chev.brand.sc-sui-split-button:hover:not(:disabled){background:var(--brand-hover)}.chev.brand.sc-sui-split-button:not(:disabled)::before{background:var(--border-inverse)}.chev.brand.sc-sui-split-button:active:not(:disabled){background:var(--brand-active)}.chev.outline.sc-sui-split-button{background:var(--surface);color:var(--ink);border-color:var(--control-border);border-left-width:0;background-clip:padding-box}.chev.outline.sc-sui-split-button:hover:not(:disabled){background:var(--brand-soft)}.chev.outline.sc-sui-split-button:active:not(:disabled){background:color-mix(in srgb, var(--brand-soft) 84%, var(--ink))}.chev.outline.sc-sui-split-button::before{content:none}.chev.outline.sc-sui-split-button:disabled:not(.loading)::before{content:'';background:var(--border)}.chev.sc-sui-split-button:disabled:not(.loading){cursor:not-allowed;color:var(--disabled-ink);border-color:transparent;background:var(--disabled-bg)}.chev.outline.sc-sui-split-button:disabled:not(.loading){background:var(--surface);border-color:var(--border);border-left-width:0}.chev.loading.sc-sui-split-button{cursor:progress}.panel.sc-sui-split-button{position:fixed;top:0;left:0;z-index:var(--z-dropdown);box-sizing:border-box;background:var(--surface-raised);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-pop);animation:sui-split-in var(--duration-overlay) var(--ease-out)}.panel[data-side='top'].sc-sui-split-button{animation-name:sui-split-in-top}.panel.closing.sc-sui-split-button{animation:sui-split-out var(--duration-fast) var(--ease-out) forwards;pointer-events:none}@keyframes sui-split-in{from{opacity:0;transform:translateY(-4px)}}@keyframes sui-split-in-top{from{opacity:0;transform:translateY(4px)}}@keyframes sui-split-out{to{opacity:0}}.sui-menu-list.sc-sui-split-button{box-sizing:border-box;padding:5px;font-family:var(--font-sans);color:var(--ink);background:transparent;border:none;border-radius:0;box-shadow:none}.sui-menu-list.fill.sc-sui-split-button{width:auto}.sui-menu-list.sc-sui-split-button:focus{outline:none}.sui-menu-row.sc-sui-split-button{position:relative}.sui-menu-fly.sc-sui-split-button{position:fixed;z-index:var(--z-dropdown);box-sizing:border-box;background:var(--surface-raised);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-pop);animation:sui-menu-fly-in var(--duration-overlay) var(--ease-out)}.sui-menu-fly[data-side='left'].sc-sui-split-button{animation-name:sui-menu-fly-in-left}@keyframes sui-menu-fly-in{from{opacity:0;margin-left:-4px}}@keyframes sui-menu-fly-in-left{from{opacity:0;margin-left:4px}}.sui-menu-sep.sc-sui-split-button{height:1px;background:var(--hairline);margin:5px 4px}.sui-menu-backbar.sc-sui-split-button{padding:5px 5px 0}.sui-menu-back.sc-sui-split-button{display:flex;align-items:center;gap:9px;width:100%;box-sizing:border-box;margin:0;padding:7.5px 10px;border:0;border-radius:6px;background:transparent;cursor:pointer;font:650 13px var(--font-sans);color:var(--ink);text-align:start;transition:background var(--duration-fast) var(--ease-out)}.sui-menu-back.sc-sui-split-button:hover{--ink-faint:var(--ink-muted);background:var(--surface-hover)}.sui-menu-back.sc-sui-split-button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.sui-menu-back.sc-sui-split-button .sui-glyph.sc-sui-split-button{font-size:11px;width:15px;color:var(--ink-muted);flex-shrink:0}.sui-menu-back.sc-sui-split-button .sui-glyph.sc-sui-split-button:dir(rtl){transform:scaleX(-1)}.sui-menu-backbar.sc-sui-split-button .sui-menu-sep.sc-sui-split-button{margin:5px 4px 0}.sui-menu-section.sc-sui-split-button{padding:8px 10px 4px;font-size:10.5px;font-weight:650;letter-spacing:0.09em;text-transform:uppercase;color:var(--ink-faint)}.sui-menu-item.sc-sui-split-button{display:flex;align-items:center;gap:9px;padding:7.5px 10px;border-radius:6px;font-size:13px;font-weight:550;line-height:normal;color:var(--ink);background:transparent;cursor:pointer;user-select:none;outline:none;text-decoration:none;transition:background var(--duration-fast) var(--ease-out)}a.sui-menu-item.sc-sui-split-button,a.sui-menu-item.sc-sui-split-button:hover,a.sui-menu-item.sc-sui-split-button:visited{color:var(--ink);text-decoration:none}.sui-menu-item.active.sc-sui-split-button,.sui-menu-item.open.sc-sui-split-button{--ink-faint:var(--ink-muted);background:var(--surface-hover)}.sui-menu-item.danger.sc-sui-split-button,a.sui-menu-item.danger.sc-sui-split-button,a.sui-menu-item.danger.sc-sui-split-button:hover,a.sui-menu-item.danger.sc-sui-split-button:visited{color:var(--danger);font-weight:620}.sui-menu-item.danger.active.sc-sui-split-button,.sui-menu-item.danger.sc-sui-split-button:hover,a.sui-menu-item.danger.sc-sui-split-button:hover{background:var(--danger-soft);color:var(--danger-soft-ink)}.sui-menu-item.disabled.sc-sui-split-button{--ink-muted:var(--ink-placeholder);--ink-faint:var(--ink-placeholder);--accent:var(--surface-sunken);--accent-contrast:var(--ink-placeholder);color:var(--disabled-ink);cursor:not-allowed;background:transparent}.sui-menu-item.current.sc-sui-split-button{font-weight:650}.sui-menu-item.sc-sui-split-button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.sui-menu-icon.sc-sui-split-button{font-size:12px;width:15px;text-align:center;color:var(--ink-muted);flex-shrink:0}.sui-menu-check.sc-sui-split-button{display:inline-flex;align-items:center;justify-content:center;width:15px;flex-shrink:0;font-size:11px;color:var(--ink)}.sui-menu-item.danger.sc-sui-split-button .sui-menu-icon.sc-sui-split-button{color:var(--danger)}.sui-menu-item.danger.sc-sui-split-button:hover .sui-menu-icon.sc-sui-split-button,.sui-menu-item.danger.active.sc-sui-split-button .sui-menu-icon.sc-sui-split-button{color:var(--danger-soft-ink)}.sui-menu-item.disabled.sc-sui-split-button .sui-menu-icon.sc-sui-split-button{color:var(--disabled-ink)}.sui-menu-label.sc-sui-split-button{flex:1;min-width:0}.sui-menu-badge.sc-sui-split-button{min-width:17px;height:17px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:var(--accent);color:var(--accent-contrast);font-size:10px;font-weight:720;display:inline-flex;align-items:center;justify-content:center;font-feature-settings:'tnum'}.sui-menu-shortcut.sc-sui-split-button{font-size:11px;color:var(--ink-faint);font-feature-settings:'tnum';white-space:nowrap}.sui-menu-chev.sc-sui-split-button{font-size:9px;color:var(--ink-faint)}.sui-menu-chev.sc-sui-split-button:dir(rtl){transform:scaleX(-1)}@media (forced-colors: active){.sui-menu-sep.sc-sui-split-button{background:CanvasText}.sui-menu-item.active.sc-sui-split-button,.sui-menu-item.open.sc-sui-split-button,.sui-menu-item.danger.active.sc-sui-split-button{forced-color-adjust:none;background:Highlight;color:HighlightText}a.sui-menu-item.active.sc-sui-split-button,a.sui-menu-item.open.sc-sui-split-button,a.sui-menu-item.danger.active.sc-sui-split-button{color:HighlightText}.sui-menu-item.disabled.sc-sui-split-button{color:GrayText}.sui-menu-item.current.sc-sui-split-button{outline:2px solid Highlight;outline-offset:-2px}.sui-menu-item.sc-sui-split-button:focus-visible{outline-color:CanvasText;box-shadow:none}.sui-menu-icon.sc-sui-split-button,.sui-menu-shortcut.sc-sui-split-button,.sui-menu-chev.sc-sui-split-button,.sui-menu-item.danger.sc-sui-split-button .sui-menu-icon.sc-sui-split-button{color:inherit}.sui-menu-item.disabled.sc-sui-split-button .sui-menu-icon.sc-sui-split-button{color:GrayText}.sui-menu-badge.sc-sui-split-button{background:Canvas;color:CanvasText;border:1px solid CanvasText}}"}},[514,"sui-split-button",{label:[1],icon:[1],items:[16],variant:[513],size:[513],disabled:[516],loading:[516],open:[1540],menuAlign:[513,"menu-align"],type:[513],name:[1],value:[1],form:[1],menuWidth:[2,"menu-width"],active:[32],closing:[32],setFocus:[64]},void 0,{disabled:[{onInertChange:0}],loading:[{onInertChange:0}],open:[{onOpenChange:0}]}]),O=A,B=function(){"undefined"!=typeof customElements&&["sui-split-button","sui-button"].forEach((t=>{switch(t){case"sui-split-button":customElements.get(a(t))||customElements.define(a(t),A);break;case"sui-button":customElements.get(a(t))||H()}}))};export{O as SuiSplitButton,B as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSplitter extends Components.SuiSplitter, HTMLElement {}
|
|
4
|
+
export const SuiSplitter: {
|
|
5
|
+
prototype: SuiSplitter;
|
|
6
|
+
new (): SuiSplitter;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,c as s,h as e,a as r,t as o}from"./p-CeVlau-G.js";import{i as a}from"./p-wknHx00K.js";import{d as n}from"./p-BHB1Wprj.js";import{a as h}from"./p-BuyjS5bS.js";import{i as c}from"./p-GAnFXayY.js";const u=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.suiResize=s(this,"suiResize",3),this.suiResizeEnd=s(this,"suiResizeEnd",3)}get host(){return this}ratio=.5;minRatio=.2;height=220;orientation="horizontal";collapsible=!1;flush=!1;suiResize;suiResizeEnd;hostLabel;overflowStart=!1;overflowEnd=!1;paneStart;paneEnd;gutterEl;ro;dragging=!1;moved=!1;box;lastOpen;stopAria;connectedCallback(){n(this.host,(()=>this.gutterEl)),this.stopAria?.(),this.stopAria=a(this.host,(t=>{this.hostLabel=t})),this.paneStart&&this.watchPanes(!0)}componentDidLoad(){this.measurePanes(!0),this.watchPanes()}async setFocus(){this.gutterEl?.focus()}watchPanes(t=!1){this.ro?.disconnect(),this.ro=void 0,"undefined"!=typeof ResizeObserver&&(this.ro=new ResizeObserver((()=>this.measurePanes())),this.paneStart&&this.ro.observe(this.paneStart),this.paneEnd&&this.ro.observe(this.paneEnd)),t&&this.measurePanes(!0)}componentDidUpdate(){this.measurePanes(!0)}disconnectedCallback(){this.stopDrag(!1),this.stopAria?.(),this.ro?.disconnect(),this.ro=void 0}scrolls(t){return!!t&&(t.scrollHeight>t.clientHeight+1||t.scrollWidth>t.clientWidth+1)}measurePanes=(t=!1)=>{const i=this.scrolls(this.paneStart),s=this.scrolls(this.paneEnd);if(i===this.overflowStart&&s===this.overflowEnd)return;const e=()=>{i!==this.overflowStart&&(this.overflowStart=i),s!==this.overflowEnd&&(this.overflowEnd=s)};t?Promise.resolve().then(e):e()};get vertical(){return"vertical"===this.orientation}get min(){return Math.min(Math.max(this.minRatio,0),.5)}open(t){return t>0&&t<1}clamp(t){const i=this.min;if(this.collapsible){if(t<i/2)return 0;if(t>1-i/2)return 1}return Math.min(1-i,Math.max(i,t))}set(t){const i=Math.round(1e3*this.clamp(t))/1e3;return i!==this.ratio&&(this.ratio=i,!0)}remember(){this.open(this.ratio)&&(this.lastOpen=this.ratio)}onPointerDown=t=>{t.preventDefault(),this.dragging=!0,this.moved=!1,this.remember(),this.box=this.host.getBoundingClientRect(),this.host.classList.add("dragging"),document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp),document.addEventListener("pointercancel",this.onPointerUp)};onPointerMove=t=>{const i=this.box;if(!this.dragging||!i)return;const s=this.vertical?i.height:i.width;if(!s)return;const e=this.vertical?t.clientY-i.top:c(this.host)?i.right-t.clientX:t.clientX-i.left;this.set(e/s)&&(this.moved=!0,this.suiResize.emit(this.ratio))};onPointerUp=()=>this.stopDrag(!0);stopDrag(t){this.dragging&&(this.dragging=!1,this.box=void 0,this.host.classList.remove("dragging"),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("pointercancel",this.onPointerUp),this.remember(),t&&this.moved&&this.suiResizeEnd.emit(this.ratio))}step(t){const i=this.ratio,s=this.min;if(this.collapsible){const e=void 0!==this.lastOpen&&this.lastOpen>=s&&this.lastOpen<=1-s?this.lastOpen:void 0;if(i<=0&&t>0)return e??s;if(i>=1&&t<0)return e??1-s;if(t<0&&i<=s)return 0;if(t>0&&i>=1-s)return 1}return i+.02*t}onKeyDown=t=>{const i=!this.vertical&&c(this.host),s=this.vertical?"ArrowDown":i?"ArrowLeft":"ArrowRight";let e=null;t.key===(this.vertical?"ArrowUp":i?"ArrowRight":"ArrowLeft")?e=this.step(-1):t.key===s?e=this.step(1):"Home"===t.key?e=0:"End"===t.key&&(e=1),null!==e&&(t.preventDefault(),this.remember(),this.set(e)&&(this.remember(),this.suiResize.emit(this.ratio),this.suiResizeEnd.emit(this.ratio)))};render(){const t=this.vertical,i=this.clamp(this.ratio),s=Math.round(1e3*i)/10,o=this.collapsible?0:Math.round(1e3*this.min)/10,a=this.collapsible&&i<=0,n=this.collapsible&&i>=1;return e(r,{key:"c61dca21eb218382e50571fa3c695989898ddb6f",class:{vertical:t,"shut-start":a,"shut-end":n},style:{height:this.height+"px"}},e("div",{key:"7aebd14c18045dfa73c8be98826baa22a16c44f7",class:{pane:!0,start:!0,padded:!this.flush,shut:a},ref:t=>this.paneStart=t,style:t?{height:s+"%"}:{width:s+"%"},tabindex:this.overflowStart?"0":void 0},e("slot",{key:"ba250273b79eeb8e9d66d575554284b8148390c8",name:"start"})),e("div",{key:"ba266175a6fea5e6b6e8d9656c97f4997a9bdb2e",class:"gutter",ref:t=>this.gutterEl=t,role:"separator","aria-orientation":t?"horizontal":"vertical","aria-label":this.hostLabel||h(void 0,"splitter.resizePanes",void 0,"Resize panes"),"aria-valuenow":s+"","aria-valuemin":o+"","aria-valuemax":100-o+"",tabIndex:0,onPointerDown:this.onPointerDown,onKeyDown:this.onKeyDown},e("span",{key:"0f2014baa56b4ee46002b5296b4ee9454c920e11",class:"grip","aria-hidden":"true"})),e("div",{key:"c64936a278aebab0b7ec63bf57db7b593c83fe3c",class:{pane:!0,end:!0,padded:!this.flush,shut:n},ref:t=>this.paneEnd=t,tabindex:this.overflowEnd?"0":void 0},e("slot",{key:"e80e65cceb4bae35023114f95c40dbca4f5cdc0b",name:"end"})))}static get style(){return".sc-sui-splitter-h{display:flex;box-sizing:border-box;font-family:var(--font-sans);color:var(--ink);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface)}.vertical.sc-sui-splitter-h{flex-direction:column}.dragging.sc-sui-splitter-h{user-select:none}.pane.sc-sui-splitter{overflow:auto;font-size:13px;background:var(--surface);box-sizing:border-box;min-width:0;min-height:0}.pane.padded.sc-sui-splitter{padding:14px 16px}.pane.start.sc-sui-splitter{flex:0 1 auto}.pane.end.sc-sui-splitter{flex:1}.pane.shut.sc-sui-splitter{display:none}.pane.sc-sui-splitter:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.gutter.sc-sui-splitter{position:relative;z-index:1;width:1px;flex-shrink:0;box-sizing:border-box;cursor:col-resize;touch-action:none;background:var(--hairline);display:flex;align-items:center;justify-content:center;transition:background var(--duration-fast) var(--ease-out)}.gutter.sc-sui-splitter::before{content:'';position:absolute;top:0;bottom:0;left:-3px;right:-3px}.gutter.sc-sui-splitter:hover,.gutter.sc-sui-splitter:focus-visible,.dragging.sc-sui-splitter-h .gutter.sc-sui-splitter{background:var(--border-strong)}.gutter.sc-sui-splitter:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.grip.sc-sui-splitter{position:relative;display:block;flex-shrink:0;width:3px;height:22px;border-radius:var(--radius-pill);background:var(--control-border);opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.gutter.sc-sui-splitter:hover .grip.sc-sui-splitter,.gutter.sc-sui-splitter:focus-visible .grip.sc-sui-splitter,.dragging.sc-sui-splitter-h .grip.sc-sui-splitter{opacity:1}.vertical.sc-sui-splitter-h .gutter.sc-sui-splitter{width:auto;height:1px;cursor:row-resize}.vertical.sc-sui-splitter-h .gutter.sc-sui-splitter::before{top:-3px;bottom:-3px;left:0;right:0}.vertical.sc-sui-splitter-h .grip.sc-sui-splitter{width:22px;height:3px}@media (forced-colors: active){.gutter.sc-sui-splitter,.gutter.sc-sui-splitter:hover,.gutter.sc-sui-splitter:focus-visible,.dragging.sc-sui-splitter-h .gutter.sc-sui-splitter{background:CanvasText}.grip.sc-sui-splitter{background:CanvasText}}"}},[774,"sui-splitter",{ratio:[1026],minRatio:[2,"min-ratio"],height:[2],orientation:[513],collapsible:[516],flush:[516],hostLabel:[32],overflowStart:[32],overflowEnd:[32],setFocus:[64]}]),l=u,p=function(){"undefined"!=typeof customElements&&["sui-splitter"].forEach((t=>{"sui-splitter"===t&&(customElements.get(o(t))||customElements.define(o(t),u))}))};export{l as SuiSplitter,p as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiSpoiler extends Components.SuiSpoiler, HTMLElement {}
|
|
4
|
+
export const SuiSpoiler: {
|
|
5
|
+
prototype: SuiSpoiler;
|
|
6
|
+
new (): SuiSpoiler;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as e,c as i,h as t,a as o,t as r}from"./p-CeVlau-G.js";import{d as l}from"./p-BHB1Wprj.js";import{G as a,y as n}from"./p-BeYfX4rQ.js";import{u as p}from"./p-U06fVoGD.js";import{a as u}from"./p-BuyjS5bS.js";const d=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiOpen=i(this,"suiOpen",3),this.suiClose=i(this,"suiClose",3)}get host(){return this}lines=3;moreLabel;lessLabel;open=!1;suiOpen;suiClose;clampsContent=!0;bodyId=p("sui-spoiler-body");bodyEl;resizeObserver;connectedCallback(){l(this.host,(()=>this.host.querySelector("button.sui-spoiler-toggle"))),this.bodyEl&&this.watchBody(!0)}componentDidLoad(){this.watchBody(),this.measure(!0)}watchBody(s=!1){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,"undefined"!=typeof ResizeObserver&&this.bodyEl&&(this.resizeObserver=new ResizeObserver((()=>this.measure())),this.resizeObserver.observe(this.bodyEl)),s&&this.measure(!0)}componentDidUpdate(){this.measure(!0)}async setFocus(){this.host.querySelector("button.sui-spoiler-toggle")?.focus()}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}measure(s=!1){const e=this.bodyEl;if(!e)return;let i;if(this.open){const s="function"==typeof getComputedStyle?getComputedStyle(e):null,t=s?parseFloat(s.lineHeight)||1.2*(parseFloat(s.fontSize)||0):0,o=e.scrollHeight||0;if(!t||!o)return;i=o>t*this.lines+1}else{const s=e.clientHeight||0;i=!s||(e.scrollHeight||0)>s}i!==this.clampsContent&&(s?Promise.resolve().then((()=>{this.clampsContent=i})):this.clampsContent=i)}toggle=()=>{if(this.open){if(this.suiClose.emit("trigger").defaultPrevented)return;this.open=!1}else this.open=!0,this.suiOpen.emit()};render(){return t(o,{key:"2c6dded66be8a85a9a9c97c510b30a55f4475113"},t("div",{key:"6d6a9f2c6eee302866ee9edfbd57651c51e1fe57",id:this.bodyId,class:{"sui-spoiler-body":!0,clamped:!this.open},style:{"--sui-spoiler-lines":this.lines+""},ref:s=>this.bodyEl=s},t("slot",{key:"c86362e724db9afbeba1397cddcead93e5abf0eb"})),this.clampsContent?t("button",{type:"button",class:"sui-spoiler-toggle","aria-expanded":this.open?"true":"false","aria-controls":this.bodyId,onClick:this.toggle},this.open?u(void 0,"spoiler.less",this.lessLabel,"Show less"):u(void 0,"spoiler.more",this.moreLabel,"Show more"),t(a,{glyph:n,class:this.open?"up":void 0})):null)}static get style(){return".sc-sui-spoiler-h{display:block;font-family:var(--font-sans)}.sui-spoiler-body.sc-sui-spoiler{min-width:0}.sui-spoiler-body.clamped.sc-sui-spoiler{display:-webkit-box;-webkit-line-clamp:var(--sui-spoiler-lines, 3);-webkit-box-orient:vertical;overflow:hidden;position:relative}.sui-spoiler-toggle.sc-sui-spoiler{display:inline-flex;align-items:center;gap:5px;border:none;background:transparent;padding:0;margin-top:5px;color:var(--link);font-size:12.5px;font-weight:620;font-family:var(--font-sans);cursor:pointer;border-radius:var(--radius-xs)}.sui-spoiler-toggle.sc-sui-spoiler:hover{text-decoration:underline}.sui-spoiler-toggle.sc-sui-spoiler:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.sui-spoiler-toggle.sc-sui-spoiler .sui-glyph.sc-sui-spoiler{font-size:9px;transition:transform var(--duration-base) var(--ease-out)}.sui-spoiler-toggle.sc-sui-spoiler .sui-glyph.up.sc-sui-spoiler{transform:rotate(180deg)}"}},[774,"sui-spoiler",{lines:[2],moreLabel:[1,"more-label"],lessLabel:[1,"less-label"],open:[1540],clampsContent:[32],setFocus:[64]}]),c=d,h=function(){"undefined"!=typeof customElements&&["sui-spoiler"].forEach((s=>{"sui-spoiler"===s&&(customElements.get(r(s))||customElements.define(r(s),d))}))};export{c as SuiSpoiler,h as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiStatCard extends Components.SuiStatCard, HTMLElement {}
|
|
4
|
+
export const SuiStatCard: {
|
|
5
|
+
prototype: SuiStatCard;
|
|
6
|
+
new (): SuiStatCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as a,c as s,h as e,a as i,t as r}from"./p-CeVlau-G.js";import{T as c}from"./p-D00-pPuH.js";import{d as n}from"./p-BHB1Wprj.js";import{a as o}from"./p-BuyjS5bS.js";import{d}from"./p-BwHBOv1l.js";const l=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.suiLink=s(this,"suiLink",7)}get host(){return this}label="";value="";size="md";delta;deltaDirection;severity="positive";note;data;scaleMin;scaleMax;href;linkLabel;command=!1;accent=!1;suiLink;get destination(){return this.href||void 0}get control(){return this.host.querySelector(".card.control")}connectedCallback(){n(this.host,(()=>this.control))}async setFocus(){this.control?.focus()}activate=t=>{this.suiLink.emit({href:this.destination}).defaultPrevented&&t.preventDefault()};onKeyDown=t=>{" "===t.key&&(t.preventDefault(),t.currentTarget.click())};render(){const t=this.destination,a=!!t,s=a||this.command;return e(i,{key:"50dc68d2b2fca6269135c231347261392b842c8e"},e(a?"a":s?"button":"div",{key:"ce109635344899611ed07cf44432e08c5ba45586",class:{card:!0,control:s,lg:"lg"===this.size},href:a?t:void 0,type:!a&&s?"button":void 0,role:!a&&s?"link":void 0,onClick:s?this.activate:void 0,onKeyDown:a?this.onKeyDown:void 0},e("div",{key:"fe93aca725fd942885db9e73676cf379af4363ec",class:"label"},this.label),e("div",{key:"de7ae13e335bace6e657c4ce0fc390344efcbd3a",class:"row"},e("div",{key:"a216197288984f55b9b8da84924893c369114a1f",class:"value"},this.value),this.data&&this.data.length?e("sui-sparkline",{data:this.data,accent:this.accent,min:this.scaleMin,max:this.scaleMax}):null),this.delta||this.note?e("div",{class:"meta"},e(c,{value:this.delta,direction:this.deltaDirection,severity:this.severity,note:this.note,unfavorable:o(void 0,"stat-card.unfavorable",void 0,"unfavorable")})):null,a?e("span",{class:"link"},o(void 0,"stat-card.link",this.linkLabel,"View")," ","→"):null))}static get style(){return".sc-sui-stat-card-h{display:block;font-family:var(--font-sans);color:var(--ink)}.card.sc-sui-stat-card{box-sizing:border-box;height:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px 18px;display:flex;flex-direction:column;gap:7px}.card.control.sc-sui-stat-card{width:100%;margin:0;font:inherit;color:inherit;text-align:start;text-decoration:none;cursor:pointer;appearance:none;transition:border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out)}.card.control.sc-sui-stat-card:hover{--ink-faint:var(--ink-muted);border-color:var(--border-strong);box-shadow:var(--shadow-raised);background:linear-gradient(var(--surface-hover) 0 0) var(--surface)}.card.control.sc-sui-stat-card:active{--ink-muted:var(--ink-muted-on-wash);--ink-faint:var(--ink-muted);box-shadow:none;background:linear-gradient(var(--surface-pressed) 0 0) var(--surface)}.card.control.sc-sui-stat-card:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.label.sc-sui-stat-card{font-size:11.5px;font-weight:640;letter-spacing:0.05em;text-transform:uppercase;color:var(--ink-muted)}.row.sc-sui-stat-card{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.value.sc-sui-stat-card{font-size:23px;font-weight:730;letter-spacing:-0.01em;line-height:1}.card.lg.sc-sui-stat-card .value.sc-sui-stat-card{font-size:30px;letter-spacing:var(--tracking-tight)}.value.sc-sui-stat-card{direction:ltr;unicode-bidi:plaintext;text-align:-webkit-match-parent;text-align:match-parent}.meta.sc-sui-stat-card{display:flex;align-items:center;gap:8px;font-size:12px}.link.sc-sui-stat-card{font-size:12px;font-weight:620;margin-top:auto;padding-top:2px;color:var(--link);align-self:flex-start}.card.control.sc-sui-stat-card:hover .link.sc-sui-stat-card{text-decoration:underline}.delta.sc-sui-stat-card{display:inline-flex;align-items:center;gap:4px;font-weight:700;color:var(--status-positive-ink);font-feature-settings:'tnum'}.delta.critical.sc-sui-stat-card{color:var(--danger)}.delta.neutral.sc-sui-stat-card{color:var(--ink-muted);font-weight:var(--w-regular)}.delta.sc-sui-stat-card .sui-glyph.sc-sui-stat-card{font-size:10px}.delta.critical.sc-sui-stat-card .sui-glyph.sc-sui-stat-card{box-sizing:border-box;width:16px;height:16px;padding:2.5px;border:1.5px solid currentColor;border-radius:var(--radius-pill)}.figure.sc-sui-stat-card{direction:ltr;unicode-bidi:plaintext;text-align:-webkit-match-parent;text-align:match-parent}.sr-only.sc-sui-stat-card{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.note.sc-sui-stat-card{color:var(--ink-faint)}"}},[514,"sui-stat-card",{label:[1],value:[1],size:[513],delta:[1],deltaDirection:[513,"delta-direction"],severity:[513],note:[1],data:[16],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],href:[1],linkLabel:[1,"link-label"],command:[516],accent:[516],setFocus:[64]}]),u=l,p=function(){"undefined"!=typeof customElements&&["sui-stat-card","sui-sparkline"].forEach((t=>{switch(t){case"sui-stat-card":customElements.get(r(t))||customElements.define(r(t),l);break;case"sui-sparkline":customElements.get(r(t))||d()}}))};export{u as SuiStatCard,p as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiStepper extends Components.SuiStepper, HTMLElement {}
|
|
4
|
+
export const SuiStepper: {
|
|
5
|
+
prototype: SuiStepper;
|
|
6
|
+
new (): SuiStepper;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as e,c as t,h as i,a as r,t as p}from"./p-CeVlau-G.js";import{d as n}from"./p-BHB1Wprj.js";import{G as a,k as c}from"./p-BeYfX4rQ.js";import{b as o,o as l,d as u}from"./p-BWkzTEZX.js";import{a as h}from"./p-BuyjS5bS.js";const d=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.suiActiveChange=t(this,"suiActiveChange",3)}get host(){return this}steps=[];active=0;orientation="horizontal";linear=!1;readOnly=!1;suiActiveChange;hasBody=!1;compact=!1;bodyEl;dispose;resizeObserver;loaded=!1;connectedCallback(){n(this.host,(()=>this.focusTarget())),this.loaded&&this.watch(!0)}async setFocus(){this.focusTarget()?.focus()}focusTarget(){return this.host.querySelector("button.hit[aria-current]")??this.host.querySelector("button.hit")}componentWillLoad(){this.hasBody=o(this.host)}componentDidLoad(){this.loaded=!0,this.watch(),this.measure()}disconnectedCallback(){this.dispose?.(),this.dispose=void 0,this.resizeObserver?.disconnect(),this.resizeObserver=void 0}watch(s=!1){this.dispose?.(),this.resizeObserver?.disconnect(),this.dispose=l(this.host,(()=>this.detect())),this.resizeObserver="undefined"!=typeof ResizeObserver?new ResizeObserver((()=>this.measure())):void 0,this.resizeObserver?.observe(this.host),s&&Promise.resolve().then((()=>{this.host.isConnected&&(this.detect(),this.measure())}))}measure(){const s=Array.isArray(this.steps)?this.steps.length:0,e=this.host.clientWidth||0;if(!e)return;const t="vertical"!==this.orientation&&s>1&&e<78*s+16*(s-1);t!==this.compact&&(this.compact=t)}detect(){const s=u(this.host).filter((s=>s.classList.contains("steps")||s.classList.contains("caption")||s.classList.contains("body")));this.hasBody=o(this.host,this.bodyEl,s)}pick(s){this.reachable(s)&&s!==this.active&&(this.active=s,this.suiActiveChange.emit(s))}reachable(s){return!this.readOnly&&(!this.linear||s<=this.active)}circle(s){const e=s<this.active;return i("span",{class:{circle:!0,done:e,cur:s===this.active}},e?i(a,{glyph:c}):s+1+"")}labels(s,e){return i("span",{class:"labels"},i("span",{class:{label:!0,cur:s===this.active,reached:s<=this.active}},e.label),e.description?i("span",{class:"desc"},e.description):null)}hit(s,e,t){const r=s===this.active;return this.reachable(s)?i("button",{type:"button",class:"hit","aria-label":t,"aria-current":r?"step":null,onClick:()=>this.pick(s)},e):i("span",{class:"hit static","aria-current":r?"step":null},e)}caption(s){const e=Math.min(Math.max(this.active,0),s.length-1),t=s[e];if(!t)return null;const r=h(void 0,"stepper.progress",void 0,"Step {current} of {total}").replace("{current}",e+1+"").replace("{total}",s.length+"");return i("div",{class:"caption","aria-hidden":"true"},i("span",{class:"count"},r),i("span",{class:"label cur reached"},t.label),t.description?i("span",{class:"desc"},t.description):null)}render(){const s=Array.isArray(this.steps)?this.steps:[],e=s.length-1,t=i("div",{class:"body",ref:s=>this.bodyEl=s},i("slot",null));return"vertical"===this.orientation?i(r,null,i("ol",{class:"steps v"},s.map(((s,r)=>i("li",{class:"step"},i("span",{class:"rail"},this.hit(r,this.circle(r),s.label),r<e?i("span",{class:{vline:!0,done:r<this.active}}):null),i("span",{class:"content"},this.labels(r,s),r===this.active&&this.hasBody?t:null)))))):i(r,null,i("ol",{class:{steps:!0,h:!0,compact:this.compact}},s.map(((s,t)=>i("li",{class:"step"},this.hit(t,[this.circle(t),this.labels(t,s)]),t<e?i("span",{class:{hline:!0,done:t<this.active}}):null)))),this.compact?this.caption(s):null,this.hasBody?t:null)}static get watchers(){return{steps:[{measure:0}],orientation:[{measure:0}]}}static get style(){return".sc-sui-stepper-h{display:block;font-family:var(--font-sans);color:var(--ink)}.steps.sc-sui-stepper{list-style:none;margin:0;padding:0;display:flex}.steps.h.sc-sui-stepper{align-items:flex-start}.steps.v.sc-sui-stepper{flex-direction:column}.step.sc-sui-stepper{display:flex;align-items:flex-start;flex:1;min-width:0}.steps.h.sc-sui-stepper .step.sc-sui-stepper:last-child{flex:none}.steps.v.sc-sui-stepper .step.sc-sui-stepper{gap:12px;flex:none}.hit.sc-sui-stepper{display:flex;flex-direction:column;align-items:center;gap:7px;margin:-4px -6px;padding:4px 6px;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--font-sans);cursor:pointer;text-align:center}.hit.static.sc-sui-stepper{cursor:default}.steps.h.sc-sui-stepper .hit.sc-sui-stepper{min-width:min(90px, 100% - 4px)}.steps.h.sc-sui-stepper .hit.static.sc-sui-stepper{min-width:min(90px, 100% - 16px)}.steps.h.sc-sui-stepper .step.sc-sui-stepper:last-child .hit.sc-sui-stepper{min-width:90px}.steps.h.compact.sc-sui-stepper .hit.sc-sui-stepper,.steps.h.compact.sc-sui-stepper .step.sc-sui-stepper:last-child .hit.sc-sui-stepper{min-width:0;margin:-3px;padding:3px}.steps.h.compact.sc-sui-stepper .labels.sc-sui-stepper{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.steps.h.compact.sc-sui-stepper .hline.sc-sui-stepper{margin-inline:8px}.caption.sc-sui-stepper{display:block;margin-top:10px}.caption.sc-sui-stepper .count.sc-sui-stepper{display:block;font-size:11.5px;color:var(--ink-faint);font-feature-settings:'tnum'}.caption.sc-sui-stepper .label.sc-sui-stepper{margin-top:2px}.steps.v.sc-sui-stepper .hit.sc-sui-stepper{margin:-3px;padding:3px}.hit.sc-sui-stepper:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow);border-radius:var(--radius-md)}.circle.sc-sui-stepper{width:28px;height:28px;border-radius:50%;flex-shrink:0;box-sizing:border-box;background:var(--surface);border:1px solid var(--control-border);color:var(--ink-faint);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:720;font-feature-settings:'tnum';transition:background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.circle.done.sc-sui-stepper{background:var(--brand);border:none;color:var(--brand-contrast)}.circle.cur.sc-sui-stepper{background:var(--accent);border:none;color:var(--accent-contrast)}.circle.sc-sui-stepper .sui-glyph.sc-sui-stepper{font-size:10px}.labels.sc-sui-stepper{display:block;text-align:center;overflow-wrap:break-word}.steps.v.sc-sui-stepper .labels.sc-sui-stepper{text-align:start}.label.sc-sui-stepper{display:block;font-size:12.5px;font-weight:620;color:var(--ink-faint)}.label.reached.sc-sui-stepper{color:var(--ink)}.label.cur.sc-sui-stepper{font-weight:700}.desc.sc-sui-stepper{display:block;font-size:11.5px;color:var(--ink-faint);margin-top:1px}.steps.h.sc-sui-stepper .label.sc-sui-stepper,.steps.h.sc-sui-stepper .desc.sc-sui-stepper{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.hline.sc-sui-stepper{flex:1;min-width:16px;height:2px;background:var(--border);margin-top:13px}.hline.done.sc-sui-stepper{background:var(--brand)}.rail.sc-sui-stepper{display:flex;flex-direction:column;align-items:center;align-self:stretch}.vline.sc-sui-stepper{width:2px;flex:1;min-height:18px;background:var(--border);margin:8px 0}.vline.done.sc-sui-stepper{background:var(--brand)}.content.sc-sui-stepper{flex:1;min-width:0;padding-bottom:20px}.steps.h.sc-sui-stepper+.body.sc-sui-stepper,.caption.sc-sui-stepper+.body.sc-sui-stepper{margin-top:16px}.content.sc-sui-stepper .body.sc-sui-stepper{margin-top:10px}@media (forced-colors: active){.circle.done.sc-sui-stepper{border:1px solid CanvasText}.circle.cur.sc-sui-stepper{forced-color-adjust:none;background:Highlight;border:1px solid Highlight;color:HighlightText}.hline.sc-sui-stepper,.vline.sc-sui-stepper{background:CanvasText}.hline.done.sc-sui-stepper,.vline.done.sc-sui-stepper{background:Highlight}}"}},[774,"sui-stepper",{steps:[16],active:[1026],orientation:[513],linear:[516],readOnly:[516,"readonly"],hasBody:[32],compact:[32],setFocus:[64]},void 0,{steps:[{measure:0}],orientation:[{measure:0}]}]),b=d,f=function(){"undefined"!=typeof customElements&&["sui-stepper"].forEach((s=>{"sui-stepper"===s&&(customElements.get(p(s))||customElements.define(p(s),d))}))};export{b as SuiStepper,f as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiTab extends Components.SuiTab, HTMLElement {}
|
|
4
|
+
export const SuiTab: {
|
|
5
|
+
prototype: SuiTab;
|
|
6
|
+
new (): SuiTab;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,h as n,t as a,a as s}from"./p-CeVlau-G.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get host(){return this}label="";badge;icon;disabled=!1;notifyParent(){const t=this.host.closest("sui-tabs");t&&"function"==typeof t.refresh&&t.refresh()}render(){return n(s,{key:"90419666339872f8e34f28622e34375cecea47e8"})}static get watchers(){return{label:[{notifyParent:0}],badge:[{notifyParent:0}],icon:[{notifyParent:0}],disabled:[{notifyParent:0}]}}static get style(){return".sc-sui-tab-h{display:block;font-family:var(--font-sans)}[hidden].sc-sui-tab-h{display:none}"}},[514,"sui-tab",{label:[1],badge:[8],icon:[1],disabled:[516]},void 0,{label:[{notifyParent:0}],badge:[{notifyParent:0}],icon:[{notifyParent:0}],disabled:[{notifyParent:0}]}]),o=i,r=function(){"undefined"!=typeof customElements&&["sui-tab"].forEach((t=>{"sui-tab"===t&&(customElements.get(a(t))||customElements.define(a(t),i))}))};export{o as SuiTab,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "@shineuix/core";
|
|
2
|
+
|
|
3
|
+
interface SuiTabs extends Components.SuiTabs, HTMLElement {}
|
|
4
|
+
export const SuiTabs: {
|
|
5
|
+
prototype: SuiTabs;
|
|
6
|
+
new (): SuiTabs;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|