@sekiui/elements 0.0.82 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/p-BgtjDG0h.js +45 -0
- package/dist/cdn/{p-BgpxFAwm.js → p-BuBiWSGh.js} +18 -3
- package/dist/cdn/{p-o_nleCju.js → p-Cs0DgQw5.js} +25 -8
- package/dist/cdn/p-D50kwTtW.js +160 -0
- package/dist/cdn/p-DuJp0Kp6.js +63 -0
- package/dist/cdn/seki-accordion-content.js +10 -8
- package/dist/cdn/seki-accordion-item.js +12 -10
- package/dist/cdn/seki-accordion-trigger.js +12 -10
- package/dist/cdn/seki-alert-dialog-action.js +1 -1
- package/dist/cdn/seki-alert-dialog-cancel.js +1 -1
- package/dist/cdn/seki-alert-dialog-content.js +23 -21
- package/dist/cdn/seki-alert-dialog.js +1 -1
- package/dist/cdn/seki-button.js +1 -1
- package/dist/cdn/seki-calendar.js +1 -1
- package/dist/cdn/seki-carousel-dots.js +3 -3
- package/dist/cdn/seki-carousel-next.js +3 -3
- package/dist/cdn/seki-carousel-previous.js +3 -3
- package/dist/cdn/seki-carousel.js +22 -4
- package/dist/cdn/seki-collapsible-content.js +9 -5
- package/dist/cdn/seki-combobox-item.js +9 -2
- package/dist/cdn/seki-command-group.js +9 -7
- package/dist/cdn/seki-context-menu-content.js +17 -15
- package/dist/cdn/seki-context-menu.js +11 -2
- package/dist/cdn/seki-data-table.js +19 -16
- package/dist/cdn/seki-date-picker.js +1 -1
- package/dist/cdn/seki-dialog-content.js +23 -21
- package/dist/cdn/seki-dialog-overlay.js +10 -8
- package/dist/cdn/seki-dialog.js +1 -1
- package/dist/cdn/seki-dropdown-menu-content.js +23 -68
- package/dist/cdn/seki-dropdown-menu-radio.js +11 -9
- package/dist/cdn/seki-dropdown-menu-trigger.js +11 -9
- package/dist/cdn/seki-dropdown-menu.js +11 -2
- package/dist/cdn/seki-menubar-content.js +24 -42
- package/dist/cdn/seki-menubar-radio.js +11 -9
- package/dist/cdn/seki-menubar-trigger.js +12 -10
- package/dist/cdn/seki-menubar.js +11 -2
- package/dist/cdn/seki-navigation-menu-content.js +8 -3
- package/dist/cdn/seki-navigation-menu-item.js +2 -2
- package/dist/cdn/seki-navigation-menu-link.js +8 -3
- package/dist/cdn/seki-navigation-menu-list.js +7 -2
- package/dist/cdn/seki-navigation-menu-trigger.js +3 -3
- package/dist/cdn/seki-navigation-menu.js +5 -5
- package/dist/cdn/seki-popover-content.js +20 -65
- package/dist/cdn/seki-popover.js +13 -3
- package/dist/cdn/seki-scroll-bar.js +6 -2
- package/dist/cdn/seki-select-option.js +29 -13
- package/dist/cdn/seki-select.js +79 -33
- package/dist/cdn/seki-sidebar-menu-sub.js +17 -16
- package/dist/cdn/seki-sidebar-provider.js +13 -4
- package/dist/cdn/seki-sidebar-rail.js +7 -2
- package/dist/cdn/seki-slider.js +36 -4
- package/dist/cdn/seki-spinner.js +2 -2
- package/dist/cdn/seki-table-body.js +1 -1
- package/dist/cdn/seki-table-caption.js +1 -1
- package/dist/cdn/seki-table-footer.js +1 -1
- package/dist/cdn/seki-table-header.js +1 -1
- package/dist/cdn/seki-table-row.js +2 -2
- package/dist/cdn/seki-table.js +1 -1
- package/dist/cdn/seki-tabs-content.js +12 -10
- package/dist/cdn/seki-tabs-list.js +2 -2
- package/dist/cdn/seki-tabs-trigger.js +12 -10
- package/dist/cdn/seki-tabs.js +2 -2
- package/dist/cdn/seki-textarea.js +1 -1
- package/dist/cdn/seki-toggle-group.js +1 -1
- package/dist/cdn/seki-toggle.js +1 -1
- package/dist/cdn/seki-tooltip.js +16 -3
- package/dist/cjs/ancestor-attrs-CnUfqtWw.js +47 -0
- package/dist/cjs/focus-trap-CFl79SjZ.js +165 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/positioning-LQZBWMS6.js +65 -0
- package/dist/cjs/seki-accordion-content.cjs.entry.js +10 -8
- package/dist/cjs/seki-accordion-item.cjs.entry.js +12 -10
- package/dist/cjs/seki-accordion-trigger.cjs.entry.js +12 -10
- package/dist/cjs/seki-alert-dialog-action.cjs.entry.js +1 -1
- package/dist/cjs/seki-alert-dialog-cancel.cjs.entry.js +1 -1
- package/dist/cjs/seki-alert-dialog-content.cjs.entry.js +23 -21
- package/dist/cjs/seki-button.cjs.entry.js +1 -1
- package/dist/cjs/seki-calendar.cjs.entry.js +25 -8
- package/dist/cjs/seki-carousel-dots.cjs.entry.js +3 -3
- package/dist/cjs/seki-carousel-next.cjs.entry.js +3 -3
- package/dist/cjs/seki-carousel-previous.cjs.entry.js +3 -3
- package/dist/cjs/seki-carousel.cjs.entry.js +22 -4
- package/dist/cjs/seki-collapsible-content.cjs.entry.js +9 -5
- package/dist/cjs/seki-combobox-item.cjs.entry.js +9 -2
- package/dist/cjs/seki-command-group.cjs.entry.js +9 -7
- package/dist/cjs/seki-context-menu-content.cjs.entry.js +17 -15
- package/dist/cjs/seki-context-menu.cjs.entry.js +11 -2
- package/dist/cjs/seki-data-table.cjs.entry.js +19 -16
- package/dist/cjs/seki-dialog-content.cjs.entry.js +23 -21
- package/dist/cjs/seki-dialog-overlay.cjs.entry.js +10 -8
- package/dist/cjs/seki-dialog.cjs.entry.js +15 -2
- package/dist/cjs/seki-dropdown-menu-content.cjs.entry.js +23 -68
- package/dist/cjs/seki-dropdown-menu-radio.cjs.entry.js +11 -9
- package/dist/cjs/seki-dropdown-menu-trigger.cjs.entry.js +11 -9
- package/dist/cjs/seki-dropdown-menu.cjs.entry.js +11 -2
- package/dist/cjs/seki-menubar-content.cjs.entry.js +24 -42
- package/dist/cjs/seki-menubar-radio.cjs.entry.js +11 -9
- package/dist/cjs/seki-menubar-trigger.cjs.entry.js +12 -10
- package/dist/cjs/seki-menubar.cjs.entry.js +11 -2
- package/dist/cjs/seki-navigation-menu-content.cjs.entry.js +8 -3
- package/dist/cjs/seki-navigation-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/seki-navigation-menu-link.cjs.entry.js +8 -3
- package/dist/cjs/seki-navigation-menu-list.cjs.entry.js +7 -2
- package/dist/cjs/seki-navigation-menu-trigger.cjs.entry.js +3 -3
- package/dist/cjs/seki-navigation-menu.cjs.entry.js +5 -5
- package/dist/cjs/seki-popover-content.cjs.entry.js +20 -65
- package/dist/cjs/seki-popover.cjs.entry.js +13 -3
- package/dist/cjs/seki-scroll-bar.cjs.entry.js +6 -2
- package/dist/cjs/seki-select-option.cjs.entry.js +29 -13
- package/dist/cjs/seki-select.cjs.entry.js +81 -30
- package/dist/cjs/seki-sidebar-menu-sub.cjs.entry.js +17 -16
- package/dist/cjs/seki-sidebar-provider.cjs.entry.js +13 -4
- package/dist/cjs/seki-sidebar-rail.cjs.entry.js +7 -2
- package/dist/cjs/seki-slider.cjs.entry.js +36 -1
- package/dist/cjs/seki-spinner.cjs.entry.js +2 -2
- package/dist/cjs/seki-table-body.cjs.entry.js +1 -1
- package/dist/cjs/seki-table-caption.cjs.entry.js +1 -1
- package/dist/cjs/seki-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/seki-table-header.cjs.entry.js +1 -1
- package/dist/cjs/seki-table-row.cjs.entry.js +2 -2
- package/dist/cjs/seki-table.cjs.entry.js +1 -1
- package/dist/cjs/seki-tabs-content.cjs.entry.js +12 -10
- package/dist/cjs/seki-tabs-list.cjs.entry.js +2 -2
- package/dist/cjs/seki-tabs-trigger.cjs.entry.js +12 -10
- package/dist/cjs/seki-tabs.cjs.entry.js +2 -2
- package/dist/cjs/seki-textarea.cjs.entry.js +1 -1
- package/dist/cjs/seki-toggle-group.cjs.entry.js +1 -1
- package/dist/cjs/seki-toggle.cjs.entry.js +1 -1
- package/dist/cjs/seki-tooltip.cjs.entry.js +16 -3
- package/dist/cjs/sekiui.cjs.js +1 -1
- package/dist/collection/components/accordion/seki-accordion-content.js +10 -8
- package/dist/collection/components/accordion/seki-accordion-item.js +12 -10
- package/dist/collection/components/accordion/seki-accordion-trigger.js +12 -10
- package/dist/collection/components/alert-dialog/seki-alert-dialog-action.css +5 -5
- package/dist/collection/components/alert-dialog/seki-alert-dialog-cancel.css +4 -4
- package/dist/collection/components/alert-dialog/seki-alert-dialog-content.js +22 -20
- package/dist/collection/components/button/seki-button.css +9 -9
- package/dist/collection/components/calendar/seki-calendar.js +14 -5
- package/dist/collection/components/carousel/seki-carousel-dots.js +3 -3
- package/dist/collection/components/carousel/seki-carousel-next.js +3 -3
- package/dist/collection/components/carousel/seki-carousel-previous.js +3 -3
- package/dist/collection/components/carousel/seki-carousel.js +22 -4
- package/dist/collection/components/collapsible/seki-collapsible-content.js +9 -5
- package/dist/collection/components/combobox-item/seki-combobox-item.js +9 -2
- package/dist/collection/components/command/seki-command-group.js +9 -7
- package/dist/collection/components/context-menu/seki-context-menu-content.js +17 -15
- package/dist/collection/components/context-menu/seki-context-menu.js +11 -2
- package/dist/collection/components/data-table/seki-data-table.css +5 -5
- package/dist/collection/components/data-table/seki-data-table.js +18 -15
- package/dist/collection/components/dialog/seki-dialog-content.js +22 -20
- package/dist/collection/components/dialog/seki-dialog-overlay.js +10 -8
- package/dist/collection/components/dialog/seki-dialog.js +17 -1
- package/dist/collection/components/dropdown-menu/seki-dropdown-menu-content.js +23 -68
- package/dist/collection/components/dropdown-menu/seki-dropdown-menu-radio.js +11 -9
- package/dist/collection/components/dropdown-menu/seki-dropdown-menu-trigger.js +11 -9
- package/dist/collection/components/dropdown-menu/seki-dropdown-menu.js +11 -2
- package/dist/collection/components/menubar/seki-menubar-content.js +24 -42
- package/dist/collection/components/menubar/seki-menubar-radio.js +11 -9
- package/dist/collection/components/menubar/seki-menubar-trigger.js +12 -10
- package/dist/collection/components/menubar/seki-menubar.js +11 -2
- package/dist/collection/components/navigation-menu/seki-navigation-menu-content.css +1 -1
- package/dist/collection/components/navigation-menu/seki-navigation-menu-content.js +7 -2
- package/dist/collection/components/navigation-menu/seki-navigation-menu-item.js +2 -2
- package/dist/collection/components/navigation-menu/seki-navigation-menu-link.css +1 -1
- package/dist/collection/components/navigation-menu/seki-navigation-menu-link.js +7 -2
- package/dist/collection/components/navigation-menu/seki-navigation-menu-list.css +1 -1
- package/dist/collection/components/navigation-menu/seki-navigation-menu-list.js +6 -1
- package/dist/collection/components/navigation-menu/seki-navigation-menu-trigger.js +3 -3
- package/dist/collection/components/navigation-menu/seki-navigation-menu.js +5 -5
- package/dist/collection/components/popover/seki-popover-content.js +20 -65
- package/dist/collection/components/popover/seki-popover.js +13 -3
- package/dist/collection/components/scroll-area/seki-scroll-bar.css +5 -5
- package/dist/collection/components/scroll-area/seki-scroll-bar.js +5 -1
- package/dist/collection/components/select/seki-select.js +77 -30
- package/dist/collection/components/select-option/seki-select-option.js +29 -13
- package/dist/collection/components/sidebar/seki-sidebar-menu-sub.js +17 -16
- package/dist/collection/components/sidebar/seki-sidebar-provider.js +13 -4
- package/dist/collection/components/sidebar/seki-sidebar-rail.css +6 -6
- package/dist/collection/components/sidebar/seki-sidebar-rail.js +6 -1
- package/dist/collection/components/slider/seki-slider.js +36 -2
- package/dist/collection/components/spinner/seki-spinner.js +2 -2
- package/dist/collection/components/table/seki-table-body.js +1 -1
- package/dist/collection/components/table/seki-table-caption.js +1 -1
- package/dist/collection/components/table/seki-table-footer.js +1 -1
- package/dist/collection/components/table/seki-table-header.js +1 -1
- package/dist/collection/components/table/seki-table-row.js +2 -2
- package/dist/collection/components/table/seki-table.js +1 -1
- package/dist/collection/components/tabs/seki-tabs-content.js +12 -10
- package/dist/collection/components/tabs/seki-tabs-list.js +2 -2
- package/dist/collection/components/tabs/seki-tabs-trigger.js +12 -10
- package/dist/collection/components/tabs/seki-tabs.js +2 -2
- package/dist/collection/components/textarea/seki-textarea.js +1 -1
- package/dist/collection/components/toggle/seki-toggle.js +1 -1
- package/dist/collection/components/toggle-group/seki-toggle-group.js +1 -1
- package/dist/collection/components/tooltip/seki-tooltip.js +16 -3
- package/dist/collection/utils/ancestor-attrs.js +43 -0
- package/dist/collection/utils/calendar/date-utils.js +12 -4
- package/dist/collection/utils/dialog/focus-trap.js +110 -21
- package/dist/collection/utils/positioning.js +61 -0
- package/dist/components/p-BgtjDG0h.js +45 -0
- package/dist/components/{p-tgCyk_Am.js → p-C87BOunl.js} +18 -3
- package/dist/components/p-D50kwTtW.js +160 -0
- package/dist/components/{p-DKbSEP4m.js → p-DFfIiiRa.js} +25 -8
- package/dist/components/p-DuJp0Kp6.js +63 -0
- package/dist/components/seki-accordion-content.js +10 -8
- package/dist/components/seki-accordion-item.js +12 -10
- package/dist/components/seki-accordion-trigger.js +12 -10
- package/dist/components/seki-alert-dialog-action.js +1 -1
- package/dist/components/seki-alert-dialog-cancel.js +1 -1
- package/dist/components/seki-alert-dialog-content.js +23 -21
- package/dist/components/seki-alert-dialog.js +1 -1
- package/dist/components/seki-button.js +1 -1
- package/dist/components/seki-calendar.js +1 -1
- package/dist/components/seki-carousel-dots.js +3 -3
- package/dist/components/seki-carousel-next.js +3 -3
- package/dist/components/seki-carousel-previous.js +3 -3
- package/dist/components/seki-carousel.js +22 -4
- package/dist/components/seki-collapsible-content.js +9 -5
- package/dist/components/seki-combobox-item.js +9 -2
- package/dist/components/seki-command-group.js +9 -7
- package/dist/components/seki-context-menu-content.js +17 -15
- package/dist/components/seki-context-menu.js +11 -2
- package/dist/components/seki-data-table.js +19 -16
- package/dist/components/seki-date-picker.js +1 -1
- package/dist/components/seki-dialog-content.js +23 -21
- package/dist/components/seki-dialog-overlay.js +10 -8
- package/dist/components/seki-dialog.js +1 -1
- package/dist/components/seki-dropdown-menu-content.js +23 -68
- package/dist/components/seki-dropdown-menu-radio.js +11 -9
- package/dist/components/seki-dropdown-menu-trigger.js +11 -9
- package/dist/components/seki-dropdown-menu.js +11 -2
- package/dist/components/seki-menubar-content.js +24 -42
- package/dist/components/seki-menubar-radio.js +11 -9
- package/dist/components/seki-menubar-trigger.js +12 -10
- package/dist/components/seki-menubar.js +11 -2
- package/dist/components/seki-navigation-menu-content.js +8 -3
- package/dist/components/seki-navigation-menu-item.js +2 -2
- package/dist/components/seki-navigation-menu-link.js +8 -3
- package/dist/components/seki-navigation-menu-list.js +7 -2
- package/dist/components/seki-navigation-menu-trigger.js +3 -3
- package/dist/components/seki-navigation-menu.js +5 -5
- package/dist/components/seki-popover-content.js +20 -65
- package/dist/components/seki-popover.js +13 -3
- package/dist/components/seki-scroll-bar.js +6 -2
- package/dist/components/seki-select-option.js +29 -13
- package/dist/components/seki-select.js +79 -33
- package/dist/components/seki-sidebar-menu-sub.js +17 -16
- package/dist/components/seki-sidebar-provider.js +13 -4
- package/dist/components/seki-sidebar-rail.js +7 -2
- package/dist/components/seki-slider.js +36 -4
- package/dist/components/seki-spinner.js +2 -2
- package/dist/components/seki-table-body.js +1 -1
- package/dist/components/seki-table-caption.js +1 -1
- package/dist/components/seki-table-footer.js +1 -1
- package/dist/components/seki-table-header.js +1 -1
- package/dist/components/seki-table-row.js +2 -2
- package/dist/components/seki-table.js +1 -1
- package/dist/components/seki-tabs-content.js +12 -10
- package/dist/components/seki-tabs-list.js +2 -2
- package/dist/components/seki-tabs-trigger.js +12 -10
- package/dist/components/seki-tabs.js +2 -2
- package/dist/components/seki-textarea.js +1 -1
- package/dist/components/seki-toggle-group.js +1 -1
- package/dist/components/seki-toggle.js +1 -1
- package/dist/components/seki-tooltip.js +16 -3
- package/dist/esm/ancestor-attrs-BgtjDG0h.js +45 -0
- package/dist/esm/focus-trap-D50kwTtW.js +160 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/positioning-DuJp0Kp6.js +63 -0
- package/dist/esm/seki-accordion-content.entry.js +10 -8
- package/dist/esm/seki-accordion-item.entry.js +12 -10
- package/dist/esm/seki-accordion-trigger.entry.js +12 -10
- package/dist/esm/seki-alert-dialog-action.entry.js +1 -1
- package/dist/esm/seki-alert-dialog-cancel.entry.js +1 -1
- package/dist/esm/seki-alert-dialog-content.entry.js +23 -21
- package/dist/esm/seki-button.entry.js +1 -1
- package/dist/esm/seki-calendar.entry.js +25 -8
- package/dist/esm/seki-carousel-dots.entry.js +3 -3
- package/dist/esm/seki-carousel-next.entry.js +3 -3
- package/dist/esm/seki-carousel-previous.entry.js +3 -3
- package/dist/esm/seki-carousel.entry.js +22 -4
- package/dist/esm/seki-collapsible-content.entry.js +9 -5
- package/dist/esm/seki-combobox-item.entry.js +9 -2
- package/dist/esm/seki-command-group.entry.js +9 -7
- package/dist/esm/seki-context-menu-content.entry.js +17 -15
- package/dist/esm/seki-context-menu.entry.js +11 -2
- package/dist/esm/seki-data-table.entry.js +19 -16
- package/dist/esm/seki-dialog-content.entry.js +23 -21
- package/dist/esm/seki-dialog-overlay.entry.js +10 -8
- package/dist/esm/seki-dialog.entry.js +15 -2
- package/dist/esm/seki-dropdown-menu-content.entry.js +23 -68
- package/dist/esm/seki-dropdown-menu-radio.entry.js +11 -9
- package/dist/esm/seki-dropdown-menu-trigger.entry.js +11 -9
- package/dist/esm/seki-dropdown-menu.entry.js +11 -2
- package/dist/esm/seki-menubar-content.entry.js +24 -42
- package/dist/esm/seki-menubar-radio.entry.js +11 -9
- package/dist/esm/seki-menubar-trigger.entry.js +12 -10
- package/dist/esm/seki-menubar.entry.js +11 -2
- package/dist/esm/seki-navigation-menu-content.entry.js +8 -3
- package/dist/esm/seki-navigation-menu-item.entry.js +2 -2
- package/dist/esm/seki-navigation-menu-link.entry.js +8 -3
- package/dist/esm/seki-navigation-menu-list.entry.js +7 -2
- package/dist/esm/seki-navigation-menu-trigger.entry.js +3 -3
- package/dist/esm/seki-navigation-menu.entry.js +5 -5
- package/dist/esm/seki-popover-content.entry.js +20 -65
- package/dist/esm/seki-popover.entry.js +13 -3
- package/dist/esm/seki-scroll-bar.entry.js +6 -2
- package/dist/esm/seki-select-option.entry.js +29 -13
- package/dist/esm/seki-select.entry.js +81 -30
- package/dist/esm/seki-sidebar-menu-sub.entry.js +17 -16
- package/dist/esm/seki-sidebar-provider.entry.js +13 -4
- package/dist/esm/seki-sidebar-rail.entry.js +7 -2
- package/dist/esm/seki-slider.entry.js +36 -1
- package/dist/esm/seki-spinner.entry.js +2 -2
- package/dist/esm/seki-table-body.entry.js +1 -1
- package/dist/esm/seki-table-caption.entry.js +1 -1
- package/dist/esm/seki-table-footer.entry.js +1 -1
- package/dist/esm/seki-table-header.entry.js +1 -1
- package/dist/esm/seki-table-row.entry.js +2 -2
- package/dist/esm/seki-table.entry.js +1 -1
- package/dist/esm/seki-tabs-content.entry.js +12 -10
- package/dist/esm/seki-tabs-list.entry.js +2 -2
- package/dist/esm/seki-tabs-trigger.entry.js +12 -10
- package/dist/esm/seki-tabs.entry.js +2 -2
- package/dist/esm/seki-textarea.entry.js +1 -1
- package/dist/esm/seki-toggle-group.entry.js +1 -1
- package/dist/esm/seki-toggle.entry.js +1 -1
- package/dist/esm/seki-tooltip.entry.js +16 -3
- package/dist/esm/sekiui.js +1 -1
- package/dist/sekiui/{p-40458a33.entry.js → p-01420aec.entry.js} +1 -1
- package/dist/sekiui/{p-9643e1d8.entry.js → p-021cb880.entry.js} +1 -1
- package/dist/sekiui/p-0ab43c7f.entry.js +1 -0
- package/dist/sekiui/p-14b6774a.entry.js +1 -0
- package/dist/sekiui/{p-d02efcf2.entry.js → p-1b8d2288.entry.js} +1 -1
- package/dist/sekiui/{p-67fffcd0.entry.js → p-1eb709fb.entry.js} +1 -1
- package/dist/sekiui/{p-24ea0d3d.entry.js → p-2de73747.entry.js} +1 -1
- package/dist/sekiui/p-32569d7d.entry.js +1 -0
- package/dist/sekiui/p-367d9a7f.entry.js +1 -0
- package/dist/sekiui/p-40c40d4f.entry.js +1 -0
- package/dist/sekiui/p-4572d290.entry.js +1 -0
- package/dist/sekiui/p-49024e9e.entry.js +1 -0
- package/dist/sekiui/{p-0c2344d1.entry.js → p-4bf8c2fa.entry.js} +1 -1
- package/dist/sekiui/p-4e60d2d0.entry.js +1 -0
- package/dist/sekiui/{p-5a853b23.entry.js → p-51b11242.entry.js} +1 -1
- package/dist/sekiui/{p-541f1dbb.entry.js → p-57e7685a.entry.js} +1 -1
- package/dist/sekiui/p-677a1751.entry.js +1 -0
- package/dist/sekiui/{p-66b1c2ac.entry.js → p-695a4986.entry.js} +1 -1
- package/dist/sekiui/p-71f6da8b.entry.js +1 -0
- package/dist/sekiui/{p-96073eae.entry.js → p-75d46bc7.entry.js} +1 -1
- package/dist/sekiui/p-7cd76bbb.entry.js +1 -0
- package/dist/sekiui/p-80b79cc0.entry.js +1 -0
- package/dist/sekiui/p-835f723b.entry.js +1 -0
- package/dist/sekiui/p-851d1c50.entry.js +1 -0
- package/dist/sekiui/{p-b664489e.entry.js → p-887b559d.entry.js} +1 -1
- package/dist/sekiui/{p-7bf379c4.entry.js → p-8c369957.entry.js} +1 -1
- package/dist/sekiui/{p-41f5488e.entry.js → p-8c57364a.entry.js} +1 -1
- package/dist/sekiui/p-8d888e3d.entry.js +1 -0
- package/dist/sekiui/{p-4c1b29de.entry.js → p-92b0241d.entry.js} +1 -1
- package/dist/sekiui/{p-fc6d6133.entry.js → p-966b2358.entry.js} +1 -1
- package/dist/sekiui/p-9a00c59c.entry.js +1 -0
- package/dist/sekiui/{p-b14ba603.entry.js → p-9af630c4.entry.js} +1 -1
- package/dist/sekiui/p-BgtjDG0h.js +1 -0
- package/dist/sekiui/p-D50kwTtW.js +1 -0
- package/dist/sekiui/p-DuJp0Kp6.js +1 -0
- package/dist/sekiui/p-a29160bc.entry.js +1 -0
- package/dist/sekiui/p-a6ae5c4b.entry.js +1 -0
- package/dist/sekiui/{p-c1bf976b.entry.js → p-b0d1e077.entry.js} +1 -1
- package/dist/sekiui/{p-73cbd067.entry.js → p-b2a60e91.entry.js} +1 -1
- package/dist/sekiui/{p-a5edaf79.entry.js → p-b43f9720.entry.js} +1 -1
- package/dist/sekiui/p-b5c242a0.entry.js +1 -0
- package/dist/sekiui/{p-d5b616c5.entry.js → p-bac67676.entry.js} +1 -1
- package/dist/sekiui/p-bc611a3d.entry.js +1 -0
- package/dist/sekiui/p-c004f467.entry.js +1 -0
- package/dist/sekiui/{p-41fae140.entry.js → p-cb657adb.entry.js} +1 -1
- package/dist/sekiui/{p-fa9a68be.entry.js → p-cfac56e7.entry.js} +1 -1
- package/dist/sekiui/{p-bf52433b.entry.js → p-d1a06cbc.entry.js} +1 -1
- package/dist/sekiui/p-d1f6efac.entry.js +1 -0
- package/dist/sekiui/{p-67aaf0f1.entry.js → p-d4ed816d.entry.js} +1 -1
- package/dist/sekiui/p-eaf626e5.entry.js +1 -0
- package/dist/sekiui/p-ed9034e4.entry.js +1 -0
- package/dist/sekiui/p-edd02332.entry.js +1 -0
- package/dist/sekiui/{p-bd9d106a.entry.js → p-ee40575b.entry.js} +1 -1
- package/dist/sekiui/{p-8344563b.entry.js → p-ef3679b0.entry.js} +1 -1
- package/dist/sekiui/p-f07b430e.entry.js +1 -0
- package/dist/sekiui/p-f3c69359.entry.js +1 -0
- package/dist/sekiui/p-f53b37e2.entry.js +1 -0
- package/dist/sekiui/p-f587cd57.entry.js +1 -0
- package/dist/sekiui/p-f7e1fdf0.entry.js +1 -0
- package/dist/sekiui/p-fb1370a9.entry.js +1 -0
- package/dist/sekiui/p-fde2877f.entry.js +1 -0
- package/dist/sekiui/p-fed3a547.entry.js +1 -0
- package/dist/sekiui/sekiui.esm.js +1 -1
- package/dist/types/components/accordion/seki-accordion-content.d.ts +2 -0
- package/dist/types/components/accordion/seki-accordion-item.d.ts +2 -0
- package/dist/types/components/accordion/seki-accordion-trigger.d.ts +2 -0
- package/dist/types/components/alert-dialog/seki-alert-dialog-content.d.ts +2 -0
- package/dist/types/components/carousel/seki-carousel.d.ts +3 -0
- package/dist/types/components/collapsible/seki-collapsible-content.d.ts +2 -0
- package/dist/types/components/combobox-item/seki-combobox-item.d.ts +1 -0
- package/dist/types/components/command/seki-command-group.d.ts +2 -0
- package/dist/types/components/context-menu/seki-context-menu-content.d.ts +2 -0
- package/dist/types/components/context-menu/seki-context-menu.d.ts +1 -0
- package/dist/types/components/dialog/seki-dialog-content.d.ts +2 -0
- package/dist/types/components/dialog/seki-dialog-overlay.d.ts +2 -0
- package/dist/types/components/dialog/seki-dialog.d.ts +1 -0
- package/dist/types/components/dropdown-menu/seki-dropdown-menu-content.d.ts +2 -0
- package/dist/types/components/dropdown-menu/seki-dropdown-menu-radio.d.ts +2 -0
- package/dist/types/components/dropdown-menu/seki-dropdown-menu-trigger.d.ts +2 -0
- package/dist/types/components/dropdown-menu/seki-dropdown-menu.d.ts +1 -0
- package/dist/types/components/menubar/seki-menubar-content.d.ts +2 -0
- package/dist/types/components/menubar/seki-menubar-radio.d.ts +2 -0
- package/dist/types/components/menubar/seki-menubar-trigger.d.ts +2 -0
- package/dist/types/components/menubar/seki-menubar.d.ts +1 -0
- package/dist/types/components/navigation-menu/seki-navigation-menu-content.d.ts +1 -0
- package/dist/types/components/navigation-menu/seki-navigation-menu-link.d.ts +1 -0
- package/dist/types/components/navigation-menu/seki-navigation-menu-list.d.ts +1 -0
- package/dist/types/components/popover/seki-popover-content.d.ts +2 -0
- package/dist/types/components/popover/seki-popover.d.ts +1 -0
- package/dist/types/components/scroll-area/seki-scroll-bar.d.ts +1 -0
- package/dist/types/components/select/seki-select.d.ts +8 -1
- package/dist/types/components/select-option/seki-select-option.d.ts +3 -1
- package/dist/types/components/sidebar/seki-sidebar-menu-sub.d.ts +2 -0
- package/dist/types/components/sidebar/seki-sidebar-rail.d.ts +1 -0
- package/dist/types/components/slider/seki-slider.d.ts +9 -0
- package/dist/types/components/tabs/seki-tabs-content.d.ts +2 -0
- package/dist/types/components/tabs/seki-tabs-trigger.d.ts +2 -0
- package/dist/types/components/tooltip/seki-tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +32 -32
- package/dist/types/utils/ancestor-attrs.d.ts +18 -0
- package/dist/types/utils/calendar/date-utils.d.ts +9 -0
- package/dist/types/utils/dialog/focus-trap.d.ts +18 -7
- package/dist/types/utils/positioning.d.ts +34 -0
- package/package.json +25 -2
- package/dist/cdn/p-CP7ZtKCE.js +0 -71
- package/dist/cjs/focus-trap-C7ukllRZ.js +0 -76
- package/dist/components/p-CP7ZtKCE.js +0 -71
- package/dist/esm/focus-trap-CP7ZtKCE.js +0 -71
- package/dist/sekiui/p-107bdce6.entry.js +0 -1
- package/dist/sekiui/p-2548d7c3.entry.js +0 -1
- package/dist/sekiui/p-307a0de3.entry.js +0 -1
- package/dist/sekiui/p-397fb20e.entry.js +0 -1
- package/dist/sekiui/p-3e01b3c9.entry.js +0 -1
- package/dist/sekiui/p-4617d9c5.entry.js +0 -1
- package/dist/sekiui/p-4896a497.entry.js +0 -1
- package/dist/sekiui/p-4a47ea19.entry.js +0 -1
- package/dist/sekiui/p-4b0ee9e5.entry.js +0 -1
- package/dist/sekiui/p-598f9c5b.entry.js +0 -1
- package/dist/sekiui/p-635ca5ab.entry.js +0 -1
- package/dist/sekiui/p-63b3a53c.entry.js +0 -1
- package/dist/sekiui/p-63ffc38a.entry.js +0 -1
- package/dist/sekiui/p-6416552b.entry.js +0 -1
- package/dist/sekiui/p-66b59a4c.entry.js +0 -1
- package/dist/sekiui/p-70f149c3.entry.js +0 -1
- package/dist/sekiui/p-79062829.entry.js +0 -1
- package/dist/sekiui/p-7bf7ee5f.entry.js +0 -1
- package/dist/sekiui/p-8067a8f3.entry.js +0 -1
- package/dist/sekiui/p-884bde18.entry.js +0 -1
- package/dist/sekiui/p-91d532fa.entry.js +0 -1
- package/dist/sekiui/p-95749f03.entry.js +0 -1
- package/dist/sekiui/p-9d5b807f.entry.js +0 -1
- package/dist/sekiui/p-CP7ZtKCE.js +0 -1
- package/dist/sekiui/p-ac321aeb.entry.js +0 -1
- package/dist/sekiui/p-adc3cfff.entry.js +0 -1
- package/dist/sekiui/p-b945fc54.entry.js +0 -1
- package/dist/sekiui/p-bdb2d304.entry.js +0 -1
- package/dist/sekiui/p-c0ce45c3.entry.js +0 -1
- package/dist/sekiui/p-d2951ab4.entry.js +0 -1
- package/dist/sekiui/p-db37e4d2.entry.js +0 -1
- package/dist/sekiui/p-e51d76de.entry.js +0 -1
- package/dist/sekiui/p-f0bb516d.entry.js +0 -1
- package/dist/sekiui/p-f82ead84.entry.js +0 -1
|
@@ -11,6 +11,17 @@ export function getWeekDays(weekStartsOn = 0) {
|
|
|
11
11
|
}
|
|
12
12
|
return days;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Whether a date is disabled by the min/max bounds or the explicit disabled list.
|
|
16
|
+
* Single source of truth shared by the grid generator and keyboard handlers.
|
|
17
|
+
*/
|
|
18
|
+
export function isDateDisabled(date, options = {}) {
|
|
19
|
+
const { minDate = null, maxDate = null, disabledDates = [] } = options;
|
|
20
|
+
const disabledByRange = (minDate && isBefore(date, startOfDay(minDate))) ||
|
|
21
|
+
(maxDate && isAfter(date, startOfDay(maxDate)));
|
|
22
|
+
const disabledByList = disabledDates.some(d => isSameDay(date, d));
|
|
23
|
+
return Boolean(disabledByRange || disabledByList);
|
|
24
|
+
}
|
|
14
25
|
/**
|
|
15
26
|
* Get all days to display in a calendar month grid (6 weeks)
|
|
16
27
|
*/
|
|
@@ -24,9 +35,6 @@ export function getCalendarDays(month, options = {}) {
|
|
|
24
35
|
const weeks = [];
|
|
25
36
|
let currentWeek = [];
|
|
26
37
|
for (const date of allDays) {
|
|
27
|
-
const isDisabledByRange = (minDate && isBefore(date, startOfDay(minDate))) ||
|
|
28
|
-
(maxDate && isAfter(date, startOfDay(maxDate)));
|
|
29
|
-
const isDisabledByList = disabledDates.some(d => isSameDay(date, d));
|
|
30
38
|
const isSelected = selectedDate ? isSameDay(date, selectedDate) : false;
|
|
31
39
|
let isInRange = false;
|
|
32
40
|
let isRangeStart = false;
|
|
@@ -50,7 +58,7 @@ export function getCalendarDays(month, options = {}) {
|
|
|
50
58
|
isInRange,
|
|
51
59
|
isRangeStart,
|
|
52
60
|
isRangeEnd,
|
|
53
|
-
isDisabled:
|
|
61
|
+
isDisabled: isDateDisabled(date, { minDate, maxDate, disabledDates }),
|
|
54
62
|
};
|
|
55
63
|
currentWeek.push(day);
|
|
56
64
|
if (currentWeek.length === 7) {
|
|
@@ -1,23 +1,87 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Focus trap utility for dialog and modal components
|
|
2
|
+
* Focus trap utility for dialog and modal components.
|
|
3
|
+
*
|
|
4
|
+
* These helpers walk the *composed* (flattened) tree rather than a single
|
|
5
|
+
* shadow root. Dialog content is projected through a `<slot>`, so the actual
|
|
6
|
+
* focusable elements live in the host's light DOM — and custom elements like
|
|
7
|
+
* `seki-button` keep their focusable `<button>` inside their own shadow root.
|
|
8
|
+
* A plain `container.querySelectorAll()` never sees either, which is why the
|
|
9
|
+
* trap previously matched nothing.
|
|
3
10
|
*/
|
|
4
11
|
const FOCUSABLE_SELECTOR = [
|
|
12
|
+
'a[href]',
|
|
5
13
|
'button:not([disabled])',
|
|
6
|
-
'[href]',
|
|
7
14
|
'input:not([disabled])',
|
|
8
15
|
'select:not([disabled])',
|
|
9
16
|
'textarea:not([disabled])',
|
|
10
17
|
'[tabindex]:not([tabindex="-1"])',
|
|
18
|
+
'audio[controls]',
|
|
19
|
+
'video[controls]',
|
|
20
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
11
21
|
].join(', ');
|
|
22
|
+
function isFocusableCandidate(el) {
|
|
23
|
+
return el instanceof HTMLElement && el.matches(FOCUSABLE_SELECTOR);
|
|
24
|
+
}
|
|
25
|
+
function isHidden(el) {
|
|
26
|
+
return (el.hidden === true ||
|
|
27
|
+
el.getAttribute('aria-hidden') === 'true');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Recursively collect focusable elements in composed-tree (DOM) order,
|
|
31
|
+
* descending through shadow roots and resolving `<slot>` assignments.
|
|
32
|
+
*/
|
|
33
|
+
function collectFocusable(node, out) {
|
|
34
|
+
// Resolve slots to their assigned (projected) elements.
|
|
35
|
+
if (node.tagName === 'SLOT') {
|
|
36
|
+
const assigned = node.assignedElements({ flatten: true });
|
|
37
|
+
for (const el of assigned) {
|
|
38
|
+
collectFocusable(el, out);
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Skip hidden subtrees entirely.
|
|
43
|
+
if (isHidden(node))
|
|
44
|
+
return;
|
|
45
|
+
if (isFocusableCandidate(node)) {
|
|
46
|
+
out.push(node);
|
|
47
|
+
}
|
|
48
|
+
// When an element hosts a shadow root, its rendered subtree is the shadow
|
|
49
|
+
// tree (light children only surface via slots inside it). Otherwise walk
|
|
50
|
+
// the light children directly.
|
|
51
|
+
const children = node.shadowRoot
|
|
52
|
+
? Array.from(node.shadowRoot.children)
|
|
53
|
+
: Array.from(node.children);
|
|
54
|
+
for (const child of children) {
|
|
55
|
+
collectFocusable(child, out);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
12
58
|
/**
|
|
13
|
-
* Get all focusable elements within a container
|
|
59
|
+
* Get all focusable elements within a container, crossing shadow-DOM and slot
|
|
60
|
+
* boundaries so projected content and nested web components are included.
|
|
14
61
|
*/
|
|
15
62
|
export function getFocusableElements(container) {
|
|
16
|
-
|
|
17
|
-
|
|
63
|
+
var _a;
|
|
64
|
+
const out = [];
|
|
65
|
+
const root = (_a = container.shadowRoot) !== null && _a !== void 0 ? _a : container;
|
|
66
|
+
for (const child of Array.from(root.children)) {
|
|
67
|
+
collectFocusable(child, out);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resolve the deepest active element, descending into nested shadow roots.
|
|
73
|
+
* `document.activeElement` only reports the outermost shadow host.
|
|
74
|
+
*/
|
|
75
|
+
function getDeepActiveElement() {
|
|
76
|
+
var _a;
|
|
77
|
+
let active = document.activeElement;
|
|
78
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) {
|
|
79
|
+
active = active.shadowRoot.activeElement;
|
|
80
|
+
}
|
|
81
|
+
return active;
|
|
18
82
|
}
|
|
19
83
|
/**
|
|
20
|
-
* Focus the first focusable element in a container
|
|
84
|
+
* Focus the first focusable element in a container.
|
|
21
85
|
*/
|
|
22
86
|
export function focusFirst(container) {
|
|
23
87
|
const focusables = getFocusableElements(container);
|
|
@@ -26,7 +90,7 @@ export function focusFirst(container) {
|
|
|
26
90
|
}
|
|
27
91
|
}
|
|
28
92
|
/**
|
|
29
|
-
* Focus the last focusable element in a container
|
|
93
|
+
* Focus the last focusable element in a container.
|
|
30
94
|
*/
|
|
31
95
|
export function focusLast(container) {
|
|
32
96
|
const focusables = getFocusableElements(container);
|
|
@@ -35,44 +99,69 @@ export function focusLast(container) {
|
|
|
35
99
|
}
|
|
36
100
|
}
|
|
37
101
|
/**
|
|
38
|
-
* Trap focus within a container during Tab key navigation
|
|
102
|
+
* Trap focus within a container during Tab key navigation.
|
|
39
103
|
*/
|
|
40
104
|
export function trapFocus(container, event) {
|
|
41
105
|
if (event.key !== 'Tab')
|
|
42
106
|
return;
|
|
43
107
|
const focusables = getFocusableElements(container);
|
|
44
|
-
if (focusables.length === 0)
|
|
108
|
+
if (focusables.length === 0) {
|
|
109
|
+
// Nothing focusable inside — keep focus from escaping the modal.
|
|
110
|
+
event.preventDefault();
|
|
45
111
|
return;
|
|
112
|
+
}
|
|
46
113
|
const first = focusables[0];
|
|
47
114
|
const last = focusables[focusables.length - 1];
|
|
48
|
-
const active =
|
|
115
|
+
const active = getDeepActiveElement();
|
|
116
|
+
// `contains()` does not cross shadow boundaries, so detect "escaped" focus by
|
|
117
|
+
// membership in the composed focusables list instead.
|
|
118
|
+
const isInside = active !== null && focusables.indexOf(active) !== -1;
|
|
49
119
|
if (event.shiftKey) {
|
|
50
|
-
|
|
51
|
-
if (active === first || !container.contains(active)) {
|
|
120
|
+
if (active === first || !isInside) {
|
|
52
121
|
event.preventDefault();
|
|
53
122
|
last.focus();
|
|
54
123
|
}
|
|
55
124
|
}
|
|
56
125
|
else {
|
|
57
|
-
|
|
58
|
-
if (active === last || !container.contains(active)) {
|
|
126
|
+
if (active === last || !isInside) {
|
|
59
127
|
event.preventDefault();
|
|
60
128
|
first.focus();
|
|
61
129
|
}
|
|
62
130
|
}
|
|
63
131
|
}
|
|
132
|
+
// ---------------------------------------------------------------------------
|
|
133
|
+
// Body scroll lock (reference-counted so stacked modals don't unlock early).
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
let scrollLockCount = 0;
|
|
136
|
+
let savedOverflow = '';
|
|
137
|
+
let savedPaddingRight = '';
|
|
64
138
|
/**
|
|
65
|
-
* Lock body scroll when modal is
|
|
139
|
+
* Lock body scroll when a modal opens. Safe to nest: the lock is only applied
|
|
140
|
+
* on the first call and the original inline styles are restored on the last
|
|
141
|
+
* matching unlock.
|
|
66
142
|
*/
|
|
67
143
|
export function lockBodyScroll() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
144
|
+
if (scrollLockCount === 0) {
|
|
145
|
+
savedOverflow = document.body.style.overflow;
|
|
146
|
+
savedPaddingRight = document.body.style.paddingRight;
|
|
147
|
+
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
148
|
+
document.body.style.overflow = 'hidden';
|
|
149
|
+
if (scrollbarWidth > 0) {
|
|
150
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
scrollLockCount++;
|
|
71
154
|
}
|
|
72
155
|
/**
|
|
73
|
-
* Unlock body scroll when modal
|
|
156
|
+
* Unlock body scroll when a modal closes. Only the final unlock restores the
|
|
157
|
+
* original inline styles.
|
|
74
158
|
*/
|
|
75
159
|
export function unlockBodyScroll() {
|
|
76
|
-
|
|
77
|
-
|
|
160
|
+
if (scrollLockCount === 0)
|
|
161
|
+
return;
|
|
162
|
+
scrollLockCount--;
|
|
163
|
+
if (scrollLockCount === 0) {
|
|
164
|
+
document.body.style.overflow = savedOverflow;
|
|
165
|
+
document.body.style.paddingRight = savedPaddingRight;
|
|
166
|
+
}
|
|
78
167
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared anchored-positioning math for popover-like overlays (popover,
|
|
3
|
+
* dropdown-menu, menubar content). Computes a fixed-position {top,left} for a
|
|
4
|
+
* floating element relative to a trigger, given a side + alignment + offsets,
|
|
5
|
+
* then clamps the result into the viewport.
|
|
6
|
+
*
|
|
7
|
+
* This is the simple "place + clamp" strategy (no side flipping). Components
|
|
8
|
+
* that flip based on available space (e.g. hover-card, tooltip 'auto') keep
|
|
9
|
+
* their own collision logic.
|
|
10
|
+
*/
|
|
11
|
+
export function computeAnchoredPosition(triggerRect, contentRect, options) {
|
|
12
|
+
const { side, align, sideOffset = 0, alignOffset = 0, viewport = { width: window.innerWidth, height: window.innerHeight }, margin = 8, } = options;
|
|
13
|
+
let top = 0;
|
|
14
|
+
let left = 0;
|
|
15
|
+
// Position along the side axis.
|
|
16
|
+
switch (side) {
|
|
17
|
+
case 'top':
|
|
18
|
+
top = triggerRect.top - contentRect.height - sideOffset;
|
|
19
|
+
break;
|
|
20
|
+
case 'bottom':
|
|
21
|
+
top = triggerRect.bottom + sideOffset;
|
|
22
|
+
break;
|
|
23
|
+
case 'left':
|
|
24
|
+
left = triggerRect.left - contentRect.width - sideOffset;
|
|
25
|
+
break;
|
|
26
|
+
case 'right':
|
|
27
|
+
left = triggerRect.right + sideOffset;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
// Position along the alignment (cross) axis.
|
|
31
|
+
if (side === 'top' || side === 'bottom') {
|
|
32
|
+
switch (align) {
|
|
33
|
+
case 'start':
|
|
34
|
+
left = triggerRect.left + alignOffset;
|
|
35
|
+
break;
|
|
36
|
+
case 'center':
|
|
37
|
+
left = triggerRect.left + (triggerRect.width - contentRect.width) / 2 + alignOffset;
|
|
38
|
+
break;
|
|
39
|
+
case 'end':
|
|
40
|
+
left = triggerRect.right - contentRect.width + alignOffset;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
switch (align) {
|
|
46
|
+
case 'start':
|
|
47
|
+
top = triggerRect.top + alignOffset;
|
|
48
|
+
break;
|
|
49
|
+
case 'center':
|
|
50
|
+
top = triggerRect.top + (triggerRect.height - contentRect.height) / 2 + alignOffset;
|
|
51
|
+
break;
|
|
52
|
+
case 'end':
|
|
53
|
+
top = triggerRect.bottom - contentRect.height + alignOffset;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Clamp into the viewport.
|
|
58
|
+
left = Math.max(margin, Math.min(left, viewport.width - contentRect.width - margin));
|
|
59
|
+
top = Math.max(margin, Math.min(top, viewport.height - contentRect.height - margin));
|
|
60
|
+
return { top, left, side };
|
|
61
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const NOOP_MIRROR = { disconnect() { } };
|
|
2
|
+
function mirrorAncestorAttributes(host, ancestorSelector, attributes, options = {}) {
|
|
3
|
+
const ancestor = host.closest(ancestorSelector);
|
|
4
|
+
if (!ancestor)
|
|
5
|
+
return NOOP_MIRROR;
|
|
6
|
+
const sync = () => {
|
|
7
|
+
for (const attr of attributes) {
|
|
8
|
+
const value = ancestor.getAttribute(attr);
|
|
9
|
+
if (value === null) {
|
|
10
|
+
host.removeAttribute(attr);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
host.setAttribute(attr, value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
// Reflect current state, then keep it in sync with future attribute changes.
|
|
18
|
+
sync();
|
|
19
|
+
// MutationObserver is absent in non-DOM/test environments; the initial sync
|
|
20
|
+
// still runs, we just skip live updates there.
|
|
21
|
+
let observer;
|
|
22
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
23
|
+
observer = new MutationObserver(sync);
|
|
24
|
+
observer.observe(ancestor, { attributes: true, attributeFilter: attributes });
|
|
25
|
+
}
|
|
26
|
+
let onEnter;
|
|
27
|
+
let onLeave;
|
|
28
|
+
if (options.trackHover) {
|
|
29
|
+
onEnter = () => host.setAttribute('data-parent-hover', '');
|
|
30
|
+
onLeave = () => host.removeAttribute('data-parent-hover');
|
|
31
|
+
ancestor.addEventListener('mouseenter', onEnter);
|
|
32
|
+
ancestor.addEventListener('mouseleave', onLeave);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
disconnect() {
|
|
36
|
+
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
37
|
+
if (onEnter)
|
|
38
|
+
ancestor.removeEventListener('mouseenter', onEnter);
|
|
39
|
+
if (onLeave)
|
|
40
|
+
ancestor.removeEventListener('mouseleave', onLeave);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { mirrorAncestorAttributes as m };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, d as registerThemeSync, u as unregisterThemeSync, h, e as Host } from './p-CmYbI_bV.js';
|
|
2
|
-
import { l as lockBodyScroll, u as unlockBodyScroll } from './p-
|
|
2
|
+
import { l as lockBodyScroll, u as unlockBodyScroll } from './p-D50kwTtW.js';
|
|
3
3
|
|
|
4
4
|
const sekiDialogCss = ":host{--seki-neutral-50:hsl(0, 0%, 98%);--seki-neutral-100:hsl(0, 0%, 96.1%);--seki-neutral-200:hsl(0, 0%, 89.8%);--seki-neutral-300:hsl(0, 0%, 83.1%);--seki-neutral-400:hsl(0, 0%, 63.9%);--seki-neutral-500:hsl(0, 0%, 45.1%);--seki-neutral-600:hsl(0, 0%, 32.2%);--seki-neutral-700:hsl(0, 0%, 25.1%);--seki-neutral-800:hsl(0, 0%, 14.9%);--seki-neutral-900:hsl(0, 0%, 9%);--seki-neutral-950:hsl(0, 0%, 3.9%);--seki-primary-50:hsl(210, 100%, 97%);--seki-primary-100:hsl(210, 95%, 93%);--seki-primary-200:hsl(210, 95%, 85%);--seki-primary-300:hsl(210, 90%, 73%);--seki-primary-400:hsl(210, 85%, 58%);--seki-primary-500:hsl(210, 80%, 48%);--seki-primary-600:hsl(210, 75%, 40%);--seki-primary-700:hsl(210, 70%, 32%);--seki-primary-800:hsl(210, 65%, 25%);--seki-primary-900:hsl(210, 60%, 18%);--seki-primary-950:hsl(210, 55%, 10%);--seki-success-500:hsl(142, 71%, 45%);--seki-success-600:hsl(142, 71%, 35%);--seki-warning-500:hsl(38, 92%, 50%);--seki-warning-600:hsl(38, 92%, 40%);--seki-destructive-500:hsl(0, 84.2%, 60.2%);--seki-destructive-600:hsl(0, 72%, 41%);--seki-chart-1:hsl(12, 76%, 61%);--seki-chart-2:hsl(173, 58%, 39%);--seki-chart-3:hsl(197, 37%, 24%);--seki-chart-4:hsl(43, 74%, 66%);--seki-chart-5:hsl(27, 87%, 67%)}:host{--seki-background:hsl(0, 0%, 100%);--seki-foreground:hsl(0, 0%, 3.9%);--seki-muted:hsl(0, 0%, 96.1%);--seki-muted-foreground:hsl(0, 0%, 45.1%);--seki-card:hsl(0, 0%, 100%);--seki-card-foreground:hsl(0, 0%, 3.9%);--seki-popover:hsl(0, 0%, 100%);--seki-popover-foreground:hsl(0, 0%, 3.9%);--seki-border:hsl(0, 0%, 89.8%);--seki-input:hsl(0, 0%, 89.8%);--seki-primary:hsl(0, 0%, 9%);--seki-primary-foreground:hsl(0, 0%, 98%);--seki-secondary:hsl(0, 0%, 96.1%);--seki-secondary-foreground:hsl(0, 0%, 9%);--seki-accent:hsl(0, 0%, 96.1%);--seki-accent-foreground:hsl(0, 0%, 9%);--seki-destructive:hsl(0, 84.2%, 60.2%);--seki-destructive-foreground:hsl(0, 0%, 98%);--seki-ring:hsl(0, 0%, 3.9%);--seki-bg-primary:var(--seki-background);--seki-bg-secondary:var(--seki-muted);--seki-bg-tertiary:var(--seki-accent);--seki-text-primary:var(--seki-foreground);--seki-text-secondary:var(--seki-muted-foreground);--seki-text-tertiary:var(--seki-neutral-400);--seki-border-default:var(--seki-border);--seki-border-emphasis:var(--seki-neutral-300)}:host([data-theme='dark']){--seki-background:hsl(0, 0%, 3.9%);--seki-foreground:hsl(0, 0%, 98%);--seki-muted:hsl(0, 0%, 14.9%);--seki-muted-foreground:hsl(0, 0%, 63.9%);--seki-card:hsl(0, 0%, 3.9%);--seki-card-foreground:hsl(0, 0%, 98%);--seki-popover:hsl(0, 0%, 3.9%);--seki-popover-foreground:hsl(0, 0%, 98%);--seki-border:hsl(0, 0%, 14.9%);--seki-input:hsl(0, 0%, 14.9%);--seki-primary:hsl(0, 0%, 98%);--seki-primary-foreground:hsl(0, 0%, 9%);--seki-secondary:hsl(0, 0%, 14.9%);--seki-secondary-foreground:hsl(0, 0%, 98%);--seki-accent:hsl(0, 0%, 14.9%);--seki-accent-foreground:hsl(0, 0%, 98%);--seki-destructive:hsl(0, 62.8%, 30.6%);--seki-destructive-foreground:hsl(0, 0%, 98%);--seki-ring:hsl(0, 0%, 83.1%);--seki-bg-primary:var(--seki-background);--seki-bg-secondary:var(--seki-muted);--seki-bg-tertiary:var(--seki-accent);--seki-text-primary:var(--seki-foreground);--seki-text-secondary:var(--seki-muted-foreground);--seki-text-tertiary:var(--seki-neutral-600);--seki-border-default:var(--seki-border);--seki-border-emphasis:var(--seki-neutral-700);--seki-button-primary-hover-bg:hsl(0, 0%, 98%, 0.9);--seki-button-secondary-hover-bg:hsl(0, 0%, 14.9%, 0.8)}:host{--seki-button-primary-bg:var(--seki-primary);--seki-button-primary-text:var(--seki-primary-foreground);--seki-button-primary-border:transparent;--seki-button-primary-hover-bg:hsl(0, 0%, 9%, 0.9);--seki-button-primary-hover-text:var(--seki-primary-foreground);--seki-button-primary-hover-border:transparent;--seki-button-secondary-bg:var(--seki-secondary);--seki-button-secondary-text:var(--seki-secondary-foreground);--seki-button-secondary-border:transparent;--seki-button-secondary-hover-bg:hsl(0, 0%, 96.1%, 0.8);--seki-button-secondary-hover-text:var(--seki-secondary-foreground);--seki-button-secondary-hover-border:transparent;--seki-button-outline-bg:transparent;--seki-button-outline-text:var(--seki-foreground);--seki-button-outline-border:var(--seki-input);--seki-button-outline-hover-bg:var(--seki-accent);--seki-button-outline-hover-text:var(--seki-accent-foreground);--seki-button-outline-hover-border:var(--seki-input);--seki-button-ghost-bg:transparent;--seki-button-ghost-text:var(--seki-foreground);--seki-button-ghost-border:transparent;--seki-button-ghost-hover-bg:var(--seki-accent);--seki-button-ghost-hover-text:var(--seki-accent-foreground);--seki-button-ghost-hover-border:transparent;--seki-button-destructive-bg:var(--seki-destructive);--seki-button-destructive-text:var(--seki-destructive-foreground);--seki-button-destructive-border:transparent;--seki-button-destructive-hover-bg:hsl(0, 84.2%, 60.2%, 0.9);--seki-button-destructive-hover-border:transparent;--seki-button-sm-padding-x:var(--seki-spacing-3, 0.75rem);--seki-button-sm-padding-y:0.375rem;--seki-button-sm-font-size:var(--seki-text-sm, 0.875rem);--seki-button-sm-height:2.25rem;--seki-button-md-padding-x:var(--seki-spacing-4, 1rem);--seki-button-md-padding-y:var(--seki-spacing-2, 0.5rem);--seki-button-md-font-size:var(--seki-text-base, 1rem);--seki-button-md-height:2.5rem;--seki-button-lg-padding-x:2rem;--seki-button-lg-padding-y:0.5rem;--seki-button-lg-font-size:1rem;--seki-button-lg-height:2.75rem;--seki-button-icon-sm-size:2rem;--seki-button-icon-size:2.5rem;--seki-button-icon-lg-size:3rem;--seki-button-icon-gap:0.5rem;--seki-button-link-bg:transparent;--seki-button-link-text:var(--seki-primary);--seki-button-link-border:transparent;--seki-button-link-hover-bg:transparent;--seki-button-link-hover-text:var(--seki-primary);--seki-button-link-hover-border:transparent;--seki-button-radius:var(--seki-radius-md, 0.375rem);--seki-button-font-weight:var(--seki-font-medium, 500);--seki-button-transition-duration:150ms;--seki-button-transition-timing:ease-in-out;--seki-button-shadow:var(--seki-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));--seki-button-shadow-hover:var(--seki-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));--seki-button-disabled-opacity:0.5;--seki-input-bg:var(--seki-background);--seki-input-border:var(--seki-border);--seki-input-text:var(--seki-foreground);--seki-input-placeholder:var(--seki-muted-foreground);--seki-input-ring:var(--seki-ring);--seki-input-invalid-border:var(--seki-destructive);--seki-input-invalid-ring:var(--seki-destructive);--seki-input-disabled-opacity:0.5;--seki-input-radius:var(--seki-radius-md);--seki-input-ring-offset:2px;--seki-select-trigger-bg:var(--seki-background);--seki-select-trigger-border:1px solid var(--seki-border);--seki-select-trigger-bg-hover:var(--seki-muted);--seki-select-trigger-radius:var(--seki-radius-md);--seki-select-trigger-min-height:2.5rem;--seki-select-trigger-padding:0.5rem 0.75rem;--seki-select-trigger-gap:0.5rem;--seki-select-content-bg:var(--seki-popover);--seki-select-content-border:1px solid var(--seki-border);--seki-select-content-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1);--seki-select-content-radius:var(--seki-radius-md);--seki-select-content-padding:0.5rem 0;--seki-select-option-padding:0.5rem 0.75rem;--seki-select-option-gap:0.5rem;--seki-select-option-radius:var(--seki-radius-sm);--seki-select-option-bg-hover:var(--seki-muted);--seki-select-option-bg-selected:var(--seki-muted);--seki-select-group-label-padding:0.5rem 0.75rem;--seki-select-group-label-font-size:var(--seki-font-size-xs);--seki-select-group-label-font-weight:var(--seki-font-semibold);--seki-select-group-label-color:var(--seki-muted-foreground);--seki-select-group-separator:1px solid var(--seki-border)}:host{--seki-spacing-0:0;--seki-spacing-0-5:0.125rem;--seki-spacing-1:0.25rem;--seki-spacing-1-5:0.375rem;--seki-spacing-2:0.5rem;--seki-spacing-2-5:0.625rem;--seki-spacing-3:0.75rem;--seki-spacing-3-5:0.875rem;--seki-spacing-4:1rem;--seki-spacing-5:1.25rem;--seki-spacing-6:1.5rem;--seki-spacing-8:2rem;--seki-spacing-10:2.5rem;--seki-spacing-12:3rem;--seki-spacing-16:4rem;--seki-spacing-20:5rem;--seki-spacing-24:6rem;--seki-input-height-sm:2rem;--seki-input-height-md:2.5rem;--seki-input-height-lg:3rem;--seki-input-padding-x:0.75rem;--seki-input-padding-y:0.5rem;--seki-input-font-size:0.875rem;--seki-input-ring-offset:2px}:host{--seki-shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);--seki-shadow-md:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--seki-shadow-lg:0 10px 15px -3px rgb(0 0 0 / 0.15), 0 4px 6px -4px rgb(0 0 0 / 0.1)}:host{--seki-font-sans:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',\n Arial, sans-serif;--seki-font-mono:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;--seki-text-xs:0.75rem;--seki-text-sm:0.875rem;--seki-text-base:1rem;--seki-text-lg:1.125rem;--seki-text-xl:1.25rem;--seki-text-2xl:1.5rem;--seki-text-3xl:1.875rem;--seki-text-4xl:2.25rem;--seki-font-normal:400;--seki-font-medium:500;--seki-font-semibold:600;--seki-font-bold:700;--seki-leading-none:1;--seki-leading-tight:1.25;--seki-leading-normal:1.5;--seki-leading-relaxed:1.75}:host{--seki-radius-sm:0.25rem;--seki-radius-md:0.375rem;--seki-radius-lg:0.5rem;--seki-radius-xl:1rem;}:host{--seki-sidebar-width:16rem;--seki-sidebar-width-icon:3rem;--seki-sidebar-width-mobile:18rem;--seki-sidebar-background:hsl(0, 0%, 98%);--seki-sidebar-foreground:hsl(240, 5.3%, 26.1%);--seki-sidebar-primary:hsl(240, 5.9%, 10%);--seki-sidebar-primary-foreground:hsl(0, 0%, 98%);--seki-sidebar-accent:hsl(240, 4.8%, 95.9%);--seki-sidebar-accent-foreground:hsl(240, 5.9%, 10%);--seki-sidebar-border:hsl(220, 13%, 91%);--seki-sidebar-ring:hsl(217.2, 91.2%, 59.8%);--seki-sidebar-muted-foreground:hsl(240, 3.8%, 46.1%);--seki-sidebar-menu-button-height:2rem;--seki-sidebar-menu-button-height-lg:3rem;--seki-sidebar-menu-button-padding:0.5rem;--seki-sidebar-menu-button-gap:0.5rem;--seki-sidebar-menu-button-radius:var(--seki-radius-md, 0.375rem);--seki-sidebar-menu-sub-padding-left:1.75rem;--seki-sidebar-menu-sub-border-width:1px;--seki-sidebar-group-padding:0.5rem;--seki-sidebar-group-label-height:2rem;--seki-sidebar-group-label-padding:0.5rem;--seki-sidebar-header-height:auto;--seki-sidebar-footer-height:auto;--seki-sidebar-header-padding:0.5rem;--seki-sidebar-footer-padding:0.5rem;--seki-sidebar-content-padding:0.5rem;--seki-sidebar-rail-width:1rem;--seki-sidebar-transition-duration:200ms;--seki-sidebar-transition-timing:ease-in-out;--seki-sidebar-mobile-breakpoint:768px;--seki-sidebar-overlay-bg:hsla(0, 0%, 0%, 0.8)}:host([data-theme='dark']){--seki-sidebar-background:hsl(240, 5.9%, 10%);--seki-sidebar-foreground:hsl(240, 4.8%, 95.9%);--seki-sidebar-primary:hsl(0, 0%, 98%);--seki-sidebar-primary-foreground:hsl(240, 5.9%, 10%);--seki-sidebar-accent:hsl(240, 3.7%, 15.9%);--seki-sidebar-accent-foreground:hsl(240, 4.8%, 95.9%);--seki-sidebar-border:hsl(240, 3.7%, 15.9%);--seki-sidebar-ring:hsl(217.2, 91.2%, 59.8%);--seki-sidebar-muted-foreground:hsl(240, 5%, 64.9%)}:host{--seki-animation-fast:150ms;--seki-animation-normal:200ms;--seki-animation-slow:300ms;--seki-ease-in:cubic-bezier(0.4, 0, 1, 1);--seki-ease-out:cubic-bezier(0, 0, 0.2, 1);--seki-ease-in-out:cubic-bezier(0.4, 0, 0.2, 1);--seki-accordion-content-height:auto}@keyframes seki-fade-in{from{opacity:0}to{opacity:1}}@keyframes seki-fade-out{from{opacity:1}to{opacity:0}}@keyframes seki-scale-in{from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)}}@keyframes seki-scale-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.95)}}@keyframes seki-slide-in-from-top{from{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes seki-slide-out-to-top{from{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes seki-slide-in-from-bottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes seki-slide-out-to-bottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes seki-slide-in-from-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes seki-slide-out-to-left{from{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes seki-slide-in-from-right{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes seki-slide-out-to-right{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes seki-accordion-down{from{height:0;opacity:0}to{height:var(--seki-accordion-content-height);opacity:1}}@keyframes seki-accordion-up{from{height:var(--seki-accordion-content-height);opacity:1}to{height:0;opacity:0}}@keyframes seki-zoom-in{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}@keyframes seki-zoom-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.96)}}@keyframes seki-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes seki-pulse{0%,100%{opacity:1}50%{opacity:0.5}}@keyframes seki-bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}@keyframes seki-collapsible-open{from{height:0;overflow:hidden}to{height:var(--seki-collapsible-content-height, auto)}}@keyframes seki-collapsible-close{from{height:var(--seki-collapsible-content-height, auto)}to{height:0;overflow:hidden}}@keyframes seki-toast-slide-in-right{from{transform:translateX(calc(100% + 1rem))}to{transform:translateX(0)}}@keyframes seki-toast-slide-out-right{from{transform:translateX(0)}to{transform:translateX(calc(100% + 1rem))}}@keyframes seki-toast-swipe-out{from{transform:translateX(var(--seki-toast-swipe-end-x, 0))}to{transform:translateX(calc(100% + 1rem))}}.seki-animate-fade-in{animation:seki-fade-in var(--seki-animation-normal) var(--seki-ease-out)}.seki-animate-fade-out{animation:seki-fade-out var(--seki-animation-normal) var(--seki-ease-in)}.seki-animate-scale-in{animation:seki-scale-in var(--seki-animation-normal) var(--seki-ease-out)}.seki-animate-scale-out{animation:seki-scale-out var(--seki-animation-normal) var(--seki-ease-in)}.seki-animate-spin{animation:seki-spin 1s linear infinite}.seki-animate-pulse{animation:seki-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.seki-animate-bounce{animation:seki-bounce 1s infinite}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important}}:host{display:contents}.dialog{display:contents}";
|
|
5
5
|
|
|
@@ -32,6 +32,16 @@ const SekiDialog = /*@__PURE__*/ proxyCustomElement(class SekiDialog extends H {
|
|
|
32
32
|
componentWillLoad() {
|
|
33
33
|
this._isOpen = this.open || this.defaultOpen;
|
|
34
34
|
}
|
|
35
|
+
handleOpenPropChange(newValue) {
|
|
36
|
+
// Honour controlled `open` updates after first render. Without this, setting
|
|
37
|
+
// dialog.open = true later did nothing (open was only read in componentWillLoad).
|
|
38
|
+
if (newValue && !this._isOpen) {
|
|
39
|
+
this.openDialog();
|
|
40
|
+
}
|
|
41
|
+
else if (!newValue && this._isOpen) {
|
|
42
|
+
this.closeDialog();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
35
45
|
get titleId() {
|
|
36
46
|
return `seki-dialog-title-${this.instanceId}`;
|
|
37
47
|
}
|
|
@@ -105,9 +115,12 @@ const SekiDialog = /*@__PURE__*/ proxyCustomElement(class SekiDialog extends H {
|
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
118
|
+
return (h(Host, { key: '185a05b13663a81dc152b76009f9befd201ec8db', "data-state": this._isOpen ? 'open' : 'closed' }, h("div", { key: 'b172f05f25d1ee05dc43e2b50e95a6c1c0e8ad60', part: "dialog", class: "dialog" }, h("slot", { key: '5d73235cd76ea9b95b793661940553bc0685ed96' }))));
|
|
109
119
|
}
|
|
110
120
|
get el() { return this; }
|
|
121
|
+
static get watchers() { return {
|
|
122
|
+
"open": ["handleOpenPropChange"]
|
|
123
|
+
}; }
|
|
111
124
|
static get style() { return sekiDialogCss; }
|
|
112
125
|
}, [257, "seki-dialog", {
|
|
113
126
|
"open": [1540],
|
|
@@ -116,7 +129,9 @@ const SekiDialog = /*@__PURE__*/ proxyCustomElement(class SekiDialog extends H {
|
|
|
116
129
|
"_isOpen": [32],
|
|
117
130
|
"openDialog": [64],
|
|
118
131
|
"closeDialog": [64]
|
|
119
|
-
}, [[0, "sekiDialogTriggerClick", "handleTriggerClick"], [0, "sekiDialogClose", "handleCloseRequest"]]
|
|
132
|
+
}, [[0, "sekiDialogTriggerClick", "handleTriggerClick"], [0, "sekiDialogClose", "handleCloseRequest"]], {
|
|
133
|
+
"open": ["handleOpenPropChange"]
|
|
134
|
+
}]);
|
|
120
135
|
SekiDialog.instanceCount = 0;
|
|
121
136
|
function defineCustomElement() {
|
|
122
137
|
if (typeof customElements === "undefined") {
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus trap utility for dialog and modal components.
|
|
3
|
+
*
|
|
4
|
+
* These helpers walk the *composed* (flattened) tree rather than a single
|
|
5
|
+
* shadow root. Dialog content is projected through a `<slot>`, so the actual
|
|
6
|
+
* focusable elements live in the host's light DOM — and custom elements like
|
|
7
|
+
* `seki-button` keep their focusable `<button>` inside their own shadow root.
|
|
8
|
+
* A plain `container.querySelectorAll()` never sees either, which is why the
|
|
9
|
+
* trap previously matched nothing.
|
|
10
|
+
*/
|
|
11
|
+
const FOCUSABLE_SELECTOR = [
|
|
12
|
+
'a[href]',
|
|
13
|
+
'button:not([disabled])',
|
|
14
|
+
'input:not([disabled])',
|
|
15
|
+
'select:not([disabled])',
|
|
16
|
+
'textarea:not([disabled])',
|
|
17
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
18
|
+
'audio[controls]',
|
|
19
|
+
'video[controls]',
|
|
20
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
21
|
+
].join(', ');
|
|
22
|
+
function isFocusableCandidate(el) {
|
|
23
|
+
return el instanceof HTMLElement && el.matches(FOCUSABLE_SELECTOR);
|
|
24
|
+
}
|
|
25
|
+
function isHidden(el) {
|
|
26
|
+
return (el.hidden === true ||
|
|
27
|
+
el.getAttribute('aria-hidden') === 'true');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Recursively collect focusable elements in composed-tree (DOM) order,
|
|
31
|
+
* descending through shadow roots and resolving `<slot>` assignments.
|
|
32
|
+
*/
|
|
33
|
+
function collectFocusable(node, out) {
|
|
34
|
+
// Resolve slots to their assigned (projected) elements.
|
|
35
|
+
if (node.tagName === 'SLOT') {
|
|
36
|
+
const assigned = node.assignedElements({ flatten: true });
|
|
37
|
+
for (const el of assigned) {
|
|
38
|
+
collectFocusable(el, out);
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Skip hidden subtrees entirely.
|
|
43
|
+
if (isHidden(node))
|
|
44
|
+
return;
|
|
45
|
+
if (isFocusableCandidate(node)) {
|
|
46
|
+
out.push(node);
|
|
47
|
+
}
|
|
48
|
+
// When an element hosts a shadow root, its rendered subtree is the shadow
|
|
49
|
+
// tree (light children only surface via slots inside it). Otherwise walk
|
|
50
|
+
// the light children directly.
|
|
51
|
+
const children = node.shadowRoot
|
|
52
|
+
? Array.from(node.shadowRoot.children)
|
|
53
|
+
: Array.from(node.children);
|
|
54
|
+
for (const child of children) {
|
|
55
|
+
collectFocusable(child, out);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get all focusable elements within a container, crossing shadow-DOM and slot
|
|
60
|
+
* boundaries so projected content and nested web components are included.
|
|
61
|
+
*/
|
|
62
|
+
function getFocusableElements(container) {
|
|
63
|
+
var _a;
|
|
64
|
+
const out = [];
|
|
65
|
+
const root = (_a = container.shadowRoot) !== null && _a !== void 0 ? _a : container;
|
|
66
|
+
for (const child of Array.from(root.children)) {
|
|
67
|
+
collectFocusable(child, out);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resolve the deepest active element, descending into nested shadow roots.
|
|
73
|
+
* `document.activeElement` only reports the outermost shadow host.
|
|
74
|
+
*/
|
|
75
|
+
function getDeepActiveElement() {
|
|
76
|
+
var _a;
|
|
77
|
+
let active = document.activeElement;
|
|
78
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) {
|
|
79
|
+
active = active.shadowRoot.activeElement;
|
|
80
|
+
}
|
|
81
|
+
return active;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Focus the first focusable element in a container.
|
|
85
|
+
*/
|
|
86
|
+
function focusFirst(container) {
|
|
87
|
+
const focusables = getFocusableElements(container);
|
|
88
|
+
if (focusables.length > 0) {
|
|
89
|
+
focusables[0].focus();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Trap focus within a container during Tab key navigation.
|
|
94
|
+
*/
|
|
95
|
+
function trapFocus(container, event) {
|
|
96
|
+
if (event.key !== 'Tab')
|
|
97
|
+
return;
|
|
98
|
+
const focusables = getFocusableElements(container);
|
|
99
|
+
if (focusables.length === 0) {
|
|
100
|
+
// Nothing focusable inside — keep focus from escaping the modal.
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const first = focusables[0];
|
|
105
|
+
const last = focusables[focusables.length - 1];
|
|
106
|
+
const active = getDeepActiveElement();
|
|
107
|
+
// `contains()` does not cross shadow boundaries, so detect "escaped" focus by
|
|
108
|
+
// membership in the composed focusables list instead.
|
|
109
|
+
const isInside = active !== null && focusables.indexOf(active) !== -1;
|
|
110
|
+
if (event.shiftKey) {
|
|
111
|
+
if (active === first || !isInside) {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
last.focus();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (active === last || !isInside) {
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
first.focus();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
// Body scroll lock (reference-counted so stacked modals don't unlock early).
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
let scrollLockCount = 0;
|
|
127
|
+
let savedOverflow = '';
|
|
128
|
+
let savedPaddingRight = '';
|
|
129
|
+
/**
|
|
130
|
+
* Lock body scroll when a modal opens. Safe to nest: the lock is only applied
|
|
131
|
+
* on the first call and the original inline styles are restored on the last
|
|
132
|
+
* matching unlock.
|
|
133
|
+
*/
|
|
134
|
+
function lockBodyScroll() {
|
|
135
|
+
if (scrollLockCount === 0) {
|
|
136
|
+
savedOverflow = document.body.style.overflow;
|
|
137
|
+
savedPaddingRight = document.body.style.paddingRight;
|
|
138
|
+
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
139
|
+
document.body.style.overflow = 'hidden';
|
|
140
|
+
if (scrollbarWidth > 0) {
|
|
141
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
scrollLockCount++;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Unlock body scroll when a modal closes. Only the final unlock restores the
|
|
148
|
+
* original inline styles.
|
|
149
|
+
*/
|
|
150
|
+
function unlockBodyScroll() {
|
|
151
|
+
if (scrollLockCount === 0)
|
|
152
|
+
return;
|
|
153
|
+
scrollLockCount--;
|
|
154
|
+
if (scrollLockCount === 0) {
|
|
155
|
+
document.body.style.overflow = savedOverflow;
|
|
156
|
+
document.body.style.paddingRight = savedPaddingRight;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export { focusFirst as f, lockBodyScroll as l, trapFocus as t, unlockBodyScroll as u };
|
|
@@ -22152,6 +22152,17 @@ function getWeekDays(weekStartsOn = 0) {
|
|
|
22152
22152
|
}
|
|
22153
22153
|
return days;
|
|
22154
22154
|
}
|
|
22155
|
+
/**
|
|
22156
|
+
* Whether a date is disabled by the min/max bounds or the explicit disabled list.
|
|
22157
|
+
* Single source of truth shared by the grid generator and keyboard handlers.
|
|
22158
|
+
*/
|
|
22159
|
+
function isDateDisabled(date, options = {}) {
|
|
22160
|
+
const { minDate = null, maxDate = null, disabledDates = [] } = options;
|
|
22161
|
+
const disabledByRange = (minDate && dateFnsExports.isBefore(date, dateFnsExports.startOfDay(minDate))) ||
|
|
22162
|
+
(maxDate && dateFnsExports.isAfter(date, dateFnsExports.startOfDay(maxDate)));
|
|
22163
|
+
const disabledByList = disabledDates.some(d => dateFnsExports.isSameDay(date, d));
|
|
22164
|
+
return Boolean(disabledByRange || disabledByList);
|
|
22165
|
+
}
|
|
22155
22166
|
/**
|
|
22156
22167
|
* Get all days to display in a calendar month grid (6 weeks)
|
|
22157
22168
|
*/
|
|
@@ -22165,9 +22176,6 @@ function getCalendarDays(month, options = {}) {
|
|
|
22165
22176
|
const weeks = [];
|
|
22166
22177
|
let currentWeek = [];
|
|
22167
22178
|
for (const date of allDays) {
|
|
22168
|
-
const isDisabledByRange = (minDate && dateFnsExports.isBefore(date, dateFnsExports.startOfDay(minDate))) ||
|
|
22169
|
-
(maxDate && dateFnsExports.isAfter(date, dateFnsExports.startOfDay(maxDate)));
|
|
22170
|
-
const isDisabledByList = disabledDates.some(d => dateFnsExports.isSameDay(date, d));
|
|
22171
22179
|
const isSelected = selectedDate ? dateFnsExports.isSameDay(date, selectedDate) : false;
|
|
22172
22180
|
let isInRange = false;
|
|
22173
22181
|
let isRangeStart = false;
|
|
@@ -22191,7 +22199,7 @@ function getCalendarDays(month, options = {}) {
|
|
|
22191
22199
|
isInRange,
|
|
22192
22200
|
isRangeStart,
|
|
22193
22201
|
isRangeEnd,
|
|
22194
|
-
isDisabled:
|
|
22202
|
+
isDisabled: isDateDisabled(date, { minDate, maxDate, disabledDates }),
|
|
22195
22203
|
};
|
|
22196
22204
|
currentWeek.push(day);
|
|
22197
22205
|
if (currentWeek.length === 7) {
|
|
@@ -22338,9 +22346,11 @@ const SekiCalendar = /*@__PURE__*/ proxyCustomElement(class SekiCalendar extends
|
|
|
22338
22346
|
}
|
|
22339
22347
|
};
|
|
22340
22348
|
this.handleKeyDown = (event) => {
|
|
22341
|
-
|
|
22349
|
+
// Anchor navigation on the currently focused day first so arrow keys move
|
|
22350
|
+
// the focus freely instead of snapping back to the selected date each press.
|
|
22351
|
+
const selectedDate = this.focusedDate ||
|
|
22352
|
+
this.parseDate(this.selected) ||
|
|
22342
22353
|
this.parseDate(this.rangeFrom) ||
|
|
22343
|
-
this.focusedDate ||
|
|
22344
22354
|
new Date();
|
|
22345
22355
|
let newDate = null;
|
|
22346
22356
|
switch (event.key) {
|
|
@@ -22360,6 +22370,13 @@ const SekiCalendar = /*@__PURE__*/ proxyCustomElement(class SekiCalendar extends
|
|
|
22360
22370
|
case ' ':
|
|
22361
22371
|
if (this.focusedDate) {
|
|
22362
22372
|
event.preventDefault();
|
|
22373
|
+
// Compute the real disabled state so keyboard selection honours
|
|
22374
|
+
// min/max bounds and disabledDates, matching mouse behaviour.
|
|
22375
|
+
const isDisabled = isDateDisabled(this.focusedDate, {
|
|
22376
|
+
minDate: this.parseDate(this.minDate),
|
|
22377
|
+
maxDate: this.parseDate(this.maxDate),
|
|
22378
|
+
disabledDates: this.parseDateArray(this.disabledDates),
|
|
22379
|
+
});
|
|
22363
22380
|
this.handleDayClick({
|
|
22364
22381
|
date: this.focusedDate,
|
|
22365
22382
|
dayOfMonth: this.focusedDate.getDate(),
|
|
@@ -22369,7 +22386,7 @@ const SekiCalendar = /*@__PURE__*/ proxyCustomElement(class SekiCalendar extends
|
|
|
22369
22386
|
isInRange: false,
|
|
22370
22387
|
isRangeStart: false,
|
|
22371
22388
|
isRangeEnd: false,
|
|
22372
|
-
isDisabled
|
|
22389
|
+
isDisabled,
|
|
22373
22390
|
});
|
|
22374
22391
|
}
|
|
22375
22392
|
return;
|
|
@@ -22467,7 +22484,7 @@ const SekiCalendar = /*@__PURE__*/ proxyCustomElement(class SekiCalendar extends
|
|
|
22467
22484
|
});
|
|
22468
22485
|
const monthLabel = getMonthLabel(this.displayMonth);
|
|
22469
22486
|
const yearLabel = getYearLabel(this.displayMonth);
|
|
22470
|
-
return (h("div", { key: '
|
|
22487
|
+
return (h("div", { key: '02f3870b94d5acf0966ee58f6df9c454debf0504', class: "seki-calendar", role: "application", "aria-label": "Calendar", onKeyDown: this.handleKeyDown }, h("div", { key: '79966e3b0ddbe472309a4a93925efb39a71f7553', class: "seki-calendar__header" }, h("button", { key: '0defe4096d1c5e42e49c25e2b932fd90468b2314', type: "button", class: "seki-calendar__nav-button", "aria-label": "Go to previous month", onClick: this.handlePreviousMonth }, h("svg", { key: '58496bf79b7acf41619d722013639ff3ad7620e4', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: 'f631919367d32c2f64d83237225c1405d287b7ec', d: "m15 18-6-6 6-6" }))), h("div", { key: '42ce8be0497074129c0cbc418962e8cd16aa421e', class: "seki-calendar__heading" }, h("span", { key: 'd8af2466b5593af31e1dfcac7aac63423ca89439', class: "seki-calendar__month" }, monthLabel), h("span", { key: '00d175575d2e077f4a748b15cddc2ad32a59f42d', class: "seki-calendar__year" }, yearLabel)), h("button", { key: 'd42e541f90f6f64a16dee27f0bd3b141cc51b09d', type: "button", class: "seki-calendar__nav-button", "aria-label": "Go to next month", onClick: this.handleNextMonth }, h("svg", { key: 'e22466278dc8b5c843423bc5e4d1919be87697ad', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '7d45d7db43e300697412862dcb1a983ba7e2114e', d: "m9 18 6-6-6-6" })))), h("table", { key: '21a3537b31cc36f175f29f5187df536ef7f13d47', class: "seki-calendar__table", role: "grid", "aria-label": `${monthLabel} ${yearLabel}` }, h("thead", { key: '976bf05093602c5297a295614bab28980c9929fb' }, h("tr", { key: '362733daf798b535d94a03e1c30d52c75aeac421', class: "seki-calendar__weekdays" }, this.weekDays.map(day => (h("th", { class: "seki-calendar__weekday", scope: "col", "aria-label": day }, day.slice(0, 2)))))), h("tbody", { key: '2764ea48c5e32439655f1990702ba8eb5b6eb3e3' }, weeks.map((week, weekIndex) => (h("tr", { key: weekIndex, class: "seki-calendar__week" }, week.map((day, dayIndex) => (h("td", { key: dayIndex, class: "seki-calendar__cell", role: "gridcell", "aria-selected": day.isSelected || day.isRangeStart || day.isRangeEnd, "aria-disabled": day.isDisabled }, h("button", { type: "button", class: this.getDayClasses(day), tabIndex: day.isSelected || day.isToday ? 0 : -1, disabled: day.isDisabled, onClick: () => this.handleDayClick(day), "aria-label": day.date.toDateString() }, day.dayOfMonth)))))))))));
|
|
22471
22488
|
}
|
|
22472
22489
|
get el() { return this; }
|
|
22473
22490
|
static get watchers() { return {
|