@semantic-components/ui 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/accordion/accordion-body.js +3 -3
- package/esm2022/lib/components/accordion/accordion-content.js +3 -3
- package/esm2022/lib/components/accordion/accordion-group.js +3 -3
- package/esm2022/lib/components/accordion/accordion-header.js +3 -3
- package/esm2022/lib/components/accordion/accordion-item.js +3 -3
- package/esm2022/lib/components/accordion/accordion-panel.js +3 -3
- package/esm2022/lib/components/accordion/accordion-trigger.js +4 -4
- package/esm2022/lib/components/accordion/accordion-trigger.js.map +1 -1
- package/esm2022/lib/components/alert/alert-action.js +3 -3
- package/esm2022/lib/components/alert/alert-description.js +3 -3
- package/esm2022/lib/components/alert/alert-title.js +3 -3
- package/esm2022/lib/components/alert/alert.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-action.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-cancel.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-description.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-footer.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-header.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-media.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-portal.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-provider.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-title.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog-trigger.js +3 -3
- package/esm2022/lib/components/alert-dialog/alert-dialog.js +3 -3
- package/esm2022/lib/components/aspect-ratio/aspect-ratio.js +3 -3
- package/esm2022/lib/components/avatar/avatar-badge.js +3 -3
- package/esm2022/lib/components/avatar/avatar-fallback.js +3 -3
- package/esm2022/lib/components/avatar/avatar-group-count.js +3 -3
- package/esm2022/lib/components/avatar/avatar-group.js +3 -3
- package/esm2022/lib/components/avatar/avatar-image.js +3 -3
- package/esm2022/lib/components/avatar/avatar.js +3 -3
- package/esm2022/lib/components/backdrop/backdrop.js +3 -3
- package/esm2022/lib/components/badge/badge.js +3 -3
- package/esm2022/lib/components/breadcrumb/breadcrumb-ellipsis.js +4 -4
- package/esm2022/lib/components/breadcrumb/breadcrumb-item.js +3 -3
- package/esm2022/lib/components/breadcrumb/breadcrumb-link.js +3 -3
- package/esm2022/lib/components/breadcrumb/breadcrumb-list.js +4 -4
- package/esm2022/lib/components/breadcrumb/breadcrumb-list.js.map +1 -1
- package/esm2022/lib/components/breadcrumb/breadcrumb-page.js +3 -3
- package/esm2022/lib/components/breadcrumb/breadcrumb-separator.js +4 -4
- package/esm2022/lib/components/breadcrumb/breadcrumb.js +3 -3
- package/esm2022/lib/components/button/button.js +3 -3
- package/esm2022/lib/components/button-group/button-group-separator.js +3 -3
- package/esm2022/lib/components/button-group/button-group-text.js +3 -3
- package/esm2022/lib/components/button-group/button-group.js +3 -3
- package/esm2022/lib/components/calendar/calendar-day-view.js +6 -6
- package/esm2022/lib/components/calendar/calendar-day-view.js.map +1 -1
- package/esm2022/lib/components/calendar/calendar-header.js +4 -4
- package/esm2022/lib/components/calendar/calendar-header.js.map +1 -1
- package/esm2022/lib/components/calendar/calendar-month-view.js +4 -4
- package/esm2022/lib/components/calendar/calendar-year-view.js +4 -4
- package/esm2022/lib/components/calendar/calendar.js +3 -3
- package/esm2022/lib/components/card/card-action.js +3 -3
- package/esm2022/lib/components/card/card-body.js +3 -3
- package/esm2022/lib/components/card/card-description.js +3 -3
- package/esm2022/lib/components/card/card-footer.js +3 -3
- package/esm2022/lib/components/card/card-header.js +3 -3
- package/esm2022/lib/components/card/card-title.js +3 -3
- package/esm2022/lib/components/card/card.js +3 -3
- package/esm2022/lib/components/checkbox/checkbox-field.js +3 -3
- package/esm2022/lib/components/checkbox/checkbox-visual.js +4 -4
- package/esm2022/lib/components/checkbox/checkbox-visual.js.map +1 -1
- package/esm2022/lib/components/checkbox/checkbox.js +3 -3
- package/esm2022/lib/components/collapsible/collapsible-body.js +3 -3
- package/esm2022/lib/components/collapsible/collapsible-content.js +3 -3
- package/esm2022/lib/components/collapsible/collapsible-panel.js +3 -3
- package/esm2022/lib/components/collapsible/collapsible-trigger.js +3 -3
- package/esm2022/lib/components/collapsible/collapsible.js +3 -3
- package/esm2022/lib/components/date-picker/date-picker.js +4 -4
- package/esm2022/lib/components/dialog/dialog-close.js +3 -3
- package/esm2022/lib/components/dialog/dialog-description.js +3 -3
- package/esm2022/lib/components/dialog/dialog-footer.js +3 -3
- package/esm2022/lib/components/dialog/dialog-header.js +3 -3
- package/esm2022/lib/components/dialog/dialog-portal.js +3 -3
- package/esm2022/lib/components/dialog/dialog-provider.js +3 -3
- package/esm2022/lib/components/dialog/dialog-title.js +3 -3
- package/esm2022/lib/components/dialog/dialog-trigger.js +3 -3
- package/esm2022/lib/components/dialog/dialog.js +3 -3
- package/esm2022/lib/components/drawer/drawer-close.js +3 -3
- package/esm2022/lib/components/drawer/drawer-description.js +3 -3
- package/esm2022/lib/components/drawer/drawer-footer.js +3 -3
- package/esm2022/lib/components/drawer/drawer-handle.js +3 -3
- package/esm2022/lib/components/drawer/drawer-header.js +3 -3
- package/esm2022/lib/components/drawer/drawer-portal.js +3 -3
- package/esm2022/lib/components/drawer/drawer-provider.js +3 -3
- package/esm2022/lib/components/drawer/drawer-title.js +3 -3
- package/esm2022/lib/components/drawer/drawer-trigger.js +3 -3
- package/esm2022/lib/components/drawer/drawer.js +3 -3
- package/esm2022/lib/components/empty/empty-body.js +3 -3
- package/esm2022/lib/components/empty/empty-description.js +3 -3
- package/esm2022/lib/components/empty/empty-header.js +3 -3
- package/esm2022/lib/components/empty/empty-media.js +3 -3
- package/esm2022/lib/components/empty/empty-title.js +3 -3
- package/esm2022/lib/components/empty/empty.js +3 -3
- package/esm2022/lib/components/field/field-body.js +3 -3
- package/esm2022/lib/components/field/field-description.js +4 -4
- package/esm2022/lib/components/field/field-description.js.map +1 -1
- package/esm2022/lib/components/field/field-error.js +3 -3
- package/esm2022/lib/components/field/field-group.js +4 -4
- package/esm2022/lib/components/field/field-group.js.map +1 -1
- package/esm2022/lib/components/field/field-separator.js +3 -3
- package/esm2022/lib/components/field/field-title.js +3 -3
- package/esm2022/lib/components/field/field.js +6 -6
- package/esm2022/lib/components/field/field.js.map +1 -1
- package/esm2022/lib/components/field/fieldset.js +3 -3
- package/esm2022/lib/components/field/legend.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-dropzone.js +4 -4
- package/esm2022/lib/components/file-upload/file-upload-dropzone.js.map +1 -1
- package/esm2022/lib/components/file-upload/file-upload-item-delete.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-item-name.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-item-preview.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-item-progress.js +5 -5
- package/esm2022/lib/components/file-upload/file-upload-item-progress.js.map +1 -1
- package/esm2022/lib/components/file-upload/file-upload-item-size.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-item.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-list.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload-trigger.js +3 -3
- package/esm2022/lib/components/file-upload/file-upload.js +3 -3
- package/esm2022/lib/components/hover-card/hover-card-portal.js +3 -3
- package/esm2022/lib/components/hover-card/hover-card-provider.js +3 -3
- package/esm2022/lib/components/hover-card/hover-card-trigger.js +3 -3
- package/esm2022/lib/components/hover-card/hover-card.js +3 -3
- package/esm2022/lib/components/index.js +2 -0
- package/esm2022/lib/components/index.js.map +1 -1
- package/esm2022/lib/components/input/input.js +3 -3
- package/esm2022/lib/components/input-group/input-group-addon.js +3 -3
- package/esm2022/lib/components/input-group/input-group-button.js +3 -3
- package/esm2022/lib/components/input-group/input-group-text.js +3 -3
- package/esm2022/lib/components/input-group/input-group.js +3 -3
- package/esm2022/lib/components/item/item-actions.js +3 -3
- package/esm2022/lib/components/item/item-body.js +3 -3
- package/esm2022/lib/components/item/item-description.js +3 -3
- package/esm2022/lib/components/item/item-footer.js +3 -3
- package/esm2022/lib/components/item/item-group.js +3 -3
- package/esm2022/lib/components/item/item-header.js +3 -3
- package/esm2022/lib/components/item/item-media.js +3 -3
- package/esm2022/lib/components/item/item-separator.js +3 -3
- package/esm2022/lib/components/item/item-title.js +3 -3
- package/esm2022/lib/components/item/item.js +3 -3
- package/esm2022/lib/components/kbd/kbd-group.js +3 -3
- package/esm2022/lib/components/kbd/kbd.js +3 -3
- package/esm2022/lib/components/label/label.js +4 -4
- package/esm2022/lib/components/label/label.js.map +1 -1
- package/esm2022/lib/components/link/link.js +3 -3
- package/esm2022/lib/components/menu/menu-content.js +3 -3
- package/esm2022/lib/components/menu/menu-item.js +3 -3
- package/esm2022/lib/components/menu/menu-portal.js +3 -3
- package/esm2022/lib/components/menu/menu-provider.js +3 -3
- package/esm2022/lib/components/menu/menu-separator.js +3 -3
- package/esm2022/lib/components/menu/menu-trigger.js +5 -9
- package/esm2022/lib/components/menu/menu-trigger.js.map +1 -1
- package/esm2022/lib/components/menu/menu.js +5 -5
- package/esm2022/lib/components/menu/menu.js.map +1 -1
- package/esm2022/lib/components/menu-bar/menu-bar-item.js +3 -3
- package/esm2022/lib/components/menu-bar/menu-bar.js +3 -3
- package/esm2022/lib/components/native-select/native-select-container.js +3 -3
- package/esm2022/lib/components/native-select/native-select-icon.js +3 -3
- package/esm2022/lib/components/native-select/native-select-optgroup.js +3 -3
- package/esm2022/lib/components/native-select/native-select-option.js +3 -3
- package/esm2022/lib/components/native-select/native-select.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-content.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-grid.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-item.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-link.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-list.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-portal.js +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js +4 -4
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js.map +1 -1
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js +4 -4
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js.map +1 -1
- package/esm2022/lib/components/navigation-menu/navigation-menu.js +3 -3
- package/esm2022/lib/components/pagination/pagination-ellipsis.js +3 -3
- package/esm2022/lib/components/pagination/pagination-first.js +3 -3
- package/esm2022/lib/components/pagination/pagination-item.js +3 -3
- package/esm2022/lib/components/pagination/pagination-last.js +3 -3
- package/esm2022/lib/components/pagination/pagination-link.js +3 -3
- package/esm2022/lib/components/pagination/pagination-list.js +3 -3
- package/esm2022/lib/components/pagination/pagination-next.js +3 -3
- package/esm2022/lib/components/pagination/pagination-page-size-select.js +3 -3
- package/esm2022/lib/components/pagination/pagination-previous.js +3 -3
- package/esm2022/lib/components/pagination/pagination.js +4 -4
- package/esm2022/lib/components/pagination/pagination.js.map +1 -1
- package/esm2022/lib/components/popover/popover-close.js +3 -3
- package/esm2022/lib/components/popover/popover-description.js +3 -3
- package/esm2022/lib/components/popover/popover-header.js +3 -3
- package/esm2022/lib/components/popover/popover-portal.js +3 -3
- package/esm2022/lib/components/popover/popover-provider.js +3 -3
- package/esm2022/lib/components/popover/popover-title.js +3 -3
- package/esm2022/lib/components/popover/popover-trigger.js +3 -3
- package/esm2022/lib/components/popover/popover.js +3 -3
- package/esm2022/lib/components/progress/progress-indicator.js +3 -3
- package/esm2022/lib/components/progress/progress.js +3 -3
- package/esm2022/lib/components/radio-group/radio-field.js +3 -3
- package/esm2022/lib/components/radio-group/radio-group.js +3 -3
- package/esm2022/lib/components/radio-group/radio.js +3 -3
- package/esm2022/lib/components/range-slider/range-slider-max.js +3 -3
- package/esm2022/lib/components/range-slider/range-slider-min.js +3 -3
- package/esm2022/lib/components/range-slider/range-slider-thumb-base.js +2 -2
- package/esm2022/lib/components/range-slider/range-slider-thumb-base.js.map +1 -1
- package/esm2022/lib/components/range-slider/range-slider.js +3 -3
- package/esm2022/lib/components/resizable/index.js +6 -0
- package/esm2022/lib/components/resizable/index.js.map +1 -0
- package/esm2022/lib/components/resizable/resizable-handle-indicator.js +20 -0
- package/esm2022/lib/components/resizable/resizable-handle-indicator.js.map +1 -0
- package/esm2022/lib/components/resizable/resizable-handle.js +116 -0
- package/esm2022/lib/components/resizable/resizable-handle.js.map +1 -0
- package/esm2022/lib/components/resizable/resizable-panel-group.js +38 -0
- package/esm2022/lib/components/resizable/resizable-panel-group.js.map +1 -0
- package/esm2022/lib/components/resizable/resizable-panel.js +39 -0
- package/esm2022/lib/components/resizable/resizable-panel.js.map +1 -0
- package/esm2022/lib/components/resizable/resizable.types.js +1 -0
- package/esm2022/lib/components/resizable/resizable.types.js.map +1 -0
- package/esm2022/lib/components/scroll-area/scroll-area.js +3 -3
- package/esm2022/lib/components/select/index.js +1 -1
- package/esm2022/lib/components/select/index.js.map +1 -1
- package/esm2022/lib/components/select/select-group-label.js +3 -3
- package/esm2022/lib/components/select/select-group.js +3 -3
- package/esm2022/lib/components/select/select-input.js +3 -3
- package/esm2022/lib/components/select/select-item-icon.js +3 -3
- package/esm2022/lib/components/select/select-item-indicator.js +3 -3
- package/esm2022/lib/components/select/select-item.js +6 -4
- package/esm2022/lib/components/select/select-item.js.map +1 -1
- package/esm2022/lib/components/select/select-label.js +29 -0
- package/esm2022/lib/components/select/select-label.js.map +1 -0
- package/esm2022/lib/components/select/select-list.js +11 -5
- package/esm2022/lib/components/select/select-list.js.map +1 -1
- package/esm2022/lib/components/select/select-popup.js +3 -3
- package/esm2022/lib/components/select/select-portal.js +3 -3
- package/esm2022/lib/components/select/select-separator.js +3 -3
- package/esm2022/lib/components/select/select-trigger-icon.js +3 -3
- package/esm2022/lib/components/select/select-trigger.js +7 -7
- package/esm2022/lib/components/select/select-trigger.js.map +1 -1
- package/esm2022/lib/components/select/select.js +19 -10
- package/esm2022/lib/components/select/select.js.map +1 -1
- package/esm2022/lib/components/separator/separator.js +3 -3
- package/esm2022/lib/components/sheet/sheet-close.js +3 -3
- package/esm2022/lib/components/sheet/sheet-description.js +3 -3
- package/esm2022/lib/components/sheet/sheet-footer.js +3 -3
- package/esm2022/lib/components/sheet/sheet-header.js +3 -3
- package/esm2022/lib/components/sheet/sheet-portal.js +3 -3
- package/esm2022/lib/components/sheet/sheet-provider.js +3 -3
- package/esm2022/lib/components/sheet/sheet-title.js +3 -3
- package/esm2022/lib/components/sheet/sheet-trigger.js +3 -3
- package/esm2022/lib/components/sheet/sheet.js +3 -3
- package/esm2022/lib/components/sidebar/index.js +28 -0
- package/esm2022/lib/components/sidebar/index.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-body.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-body.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-container.js +26 -0
- package/esm2022/lib/components/sidebar/sidebar-container.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-footer.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-footer.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-gap.js +23 -0
- package/esm2022/lib/components/sidebar/sidebar-gap.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-group-action.js +21 -0
- package/esm2022/lib/components/sidebar/sidebar-group-action.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-group-content.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-group-content.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-group-label.js +21 -0
- package/esm2022/lib/components/sidebar/sidebar-group-label.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-group.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-group.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-header.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-header.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-inner.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-inner.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-input.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-input.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-inset.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-inset.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-action.js +24 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-action.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-badge.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-badge.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-button.js +47 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-button.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-item.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-item.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-skeleton.js +45 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-skeleton.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub-button.js +31 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub-button.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub-item.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub-item.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-menu-sub.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-menu.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-menu.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-provider.js +102 -0
- package/esm2022/lib/components/sidebar/sidebar-provider.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-rail.js +27 -0
- package/esm2022/lib/components/sidebar/sidebar-rail.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-separator.js +20 -0
- package/esm2022/lib/components/sidebar/sidebar-separator.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-state.js +32 -0
- package/esm2022/lib/components/sidebar/sidebar-state.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar-trigger.js +36 -0
- package/esm2022/lib/components/sidebar/sidebar-trigger.js.map +1 -0
- package/esm2022/lib/components/sidebar/sidebar.js +137 -0
- package/esm2022/lib/components/sidebar/sidebar.js.map +1 -0
- package/esm2022/lib/components/skeleton/skeleton.js +3 -3
- package/esm2022/lib/components/slider/slider.js +4 -4
- package/esm2022/lib/components/slider/slider.js.map +1 -1
- package/esm2022/lib/components/spinner/spinner.js +3 -3
- package/esm2022/lib/components/switch/switch-field.js +4 -4
- package/esm2022/lib/components/switch/switch-field.js.map +1 -1
- package/esm2022/lib/components/switch/switch-visual.js +3 -3
- package/esm2022/lib/components/switch/switch.js +3 -3
- package/esm2022/lib/components/table/table-body.js +3 -3
- package/esm2022/lib/components/table/table-caption.js +3 -3
- package/esm2022/lib/components/table/table-cell.js +3 -3
- package/esm2022/lib/components/table/table-footer.js +3 -3
- package/esm2022/lib/components/table/table-header-cell.js +3 -3
- package/esm2022/lib/components/table/table-header.js +3 -3
- package/esm2022/lib/components/table/table-row.js +3 -3
- package/esm2022/lib/components/table/table.js +3 -3
- package/esm2022/lib/components/tabs/tab-content.js +3 -3
- package/esm2022/lib/components/tabs/tab-list.js +3 -3
- package/esm2022/lib/components/tabs/tab-panel.js +4 -4
- package/esm2022/lib/components/tabs/tab-panel.js.map +1 -1
- package/esm2022/lib/components/tabs/tab.js +3 -3
- package/esm2022/lib/components/tabs/tabs.js +3 -3
- package/esm2022/lib/components/textarea/textarea.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-hours-input.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-input.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-minutes-input.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-period-am.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-period-pm.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-period.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-seconds-input.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker-separator.js +3 -3
- package/esm2022/lib/components/time-picker/time-picker.js +3 -3
- package/esm2022/lib/components/toast/toast-action.js +3 -3
- package/esm2022/lib/components/toast/toast-close.js +3 -3
- package/esm2022/lib/components/toast/toast-description.js +3 -3
- package/esm2022/lib/components/toast/toast-stack.js +4 -4
- package/esm2022/lib/components/toast/toast-stack.js.map +1 -1
- package/esm2022/lib/components/toast/toast-title.js +3 -3
- package/esm2022/lib/components/toast/toast.js +3 -3
- package/esm2022/lib/components/toast/toaster.js +3 -3
- package/esm2022/lib/components/toggle/toggle.js +3 -3
- package/esm2022/lib/components/toggle-group/toggle-group-item.js +3 -3
- package/esm2022/lib/components/toggle-group/toggle-group.js +3 -3
- package/esm2022/lib/components/toolbar/toolbar-separator.js +3 -3
- package/esm2022/lib/components/toolbar/toolbar-widget-group.js +3 -3
- package/esm2022/lib/components/toolbar/toolbar-widget.js +3 -3
- package/esm2022/lib/components/toolbar/toolbar.js +3 -3
- package/esm2022/lib/components/tooltip/tooltip-manager.js +3 -3
- package/esm2022/lib/components/tooltip/tooltip-trigger.js +3 -3
- package/esm2022/lib/components/tooltip/tooltip.js +5 -13
- package/esm2022/lib/components/tooltip/tooltip.js.map +1 -1
- package/esm2022/lib/components/typography/heading.js +3 -3
- package/lib/components/index.d.ts +2 -0
- package/lib/components/menu/menu-trigger.d.ts +1 -3
- package/lib/components/menu/menu.d.ts +1 -1
- package/lib/components/pagination/pagination.d.ts +1 -1
- package/lib/components/range-slider/range-slider-thumb-base.d.ts +1 -1
- package/lib/components/resizable/index.d.ts +5 -0
- package/lib/components/resizable/resizable-handle-indicator.d.ts +7 -0
- package/lib/components/resizable/resizable-handle.d.ts +18 -0
- package/lib/components/resizable/resizable-panel-group.d.ts +17 -0
- package/lib/components/resizable/resizable-panel.d.ts +16 -0
- package/lib/components/resizable/resizable.types.d.ts +1 -0
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/select-item.d.ts +2 -0
- package/lib/components/select/select-label.d.ts +9 -0
- package/lib/components/select/select-list.d.ts +3 -1
- package/lib/components/select/select-trigger.d.ts +2 -2
- package/lib/components/select/select.d.ts +5 -4
- package/lib/components/sidebar/index.d.ts +27 -0
- package/lib/components/sidebar/sidebar-body.d.ts +7 -0
- package/lib/components/sidebar/sidebar-container.d.ts +8 -0
- package/lib/components/sidebar/sidebar-footer.d.ts +7 -0
- package/lib/components/sidebar/sidebar-gap.d.ts +8 -0
- package/lib/components/sidebar/sidebar-group-action.d.ts +8 -0
- package/lib/components/sidebar/sidebar-group-content.d.ts +7 -0
- package/lib/components/sidebar/sidebar-group-label.d.ts +8 -0
- package/lib/components/sidebar/sidebar-group.d.ts +7 -0
- package/lib/components/sidebar/sidebar-header.d.ts +7 -0
- package/lib/components/sidebar/sidebar-inner.d.ts +7 -0
- package/lib/components/sidebar/sidebar-input.d.ts +7 -0
- package/lib/components/sidebar/sidebar-inset.d.ts +7 -0
- package/lib/components/sidebar/sidebar-menu-action.d.ts +9 -0
- package/lib/components/sidebar/sidebar-menu-badge.d.ts +7 -0
- package/lib/components/sidebar/sidebar-menu-button.d.ts +18 -0
- package/lib/components/sidebar/sidebar-menu-item.d.ts +7 -0
- package/lib/components/sidebar/sidebar-menu-skeleton.d.ts +9 -0
- package/lib/components/sidebar/sidebar-menu-sub-button.d.ts +9 -0
- package/lib/components/sidebar/sidebar-menu-sub-item.d.ts +7 -0
- package/lib/components/sidebar/sidebar-menu-sub.d.ts +7 -0
- package/lib/components/sidebar/sidebar-menu.d.ts +7 -0
- package/lib/components/sidebar/sidebar-provider.d.ts +19 -0
- package/lib/components/sidebar/sidebar-rail.d.ts +9 -0
- package/lib/components/sidebar/sidebar-separator.d.ts +7 -0
- package/lib/components/sidebar/sidebar-state.d.ts +14 -0
- package/lib/components/sidebar/sidebar-trigger.d.ts +12 -0
- package/lib/components/sidebar/sidebar.d.ts +11 -0
- package/package.json +1 -1
- package/esm2022/lib/components/select/select-value.js +0 -28
- package/esm2022/lib/components/select/select-value.js.map +0 -1
- package/lib/components/select/select-value.d.ts +0 -7
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScSidebarMenuSubItem {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('group/menu-sub-item relative', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenuSubItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarMenuSubItem, isStandalone: true, selector: "li[scSidebarMenuSubItem]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-sub-item" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenuSubItem, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: 'li[scSidebarMenuSubItem]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'sidebar-menu-sub-item',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=sidebar-menu-sub-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-menu-sub-item.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-menu-sub-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,oBAAoB;IACtB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,8BAA8B,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACtD,CAAC;uGALS,oBAAoB;2FAApB,oBAAoB;;2FAApB,oBAAoB;kBAPhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,IAAI,EAAE;wBACJ,WAAW,EAAE,uBAAuB;wBACpC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'li[scSidebarMenuSubItem]',\n host: {\n 'data-slot': 'sidebar-menu-sub-item',\n '[class]': 'class()',\n },\n})\nexport class ScSidebarMenuSubItem {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('group/menu-sub-item relative', this.classInput()),\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScSidebarMenuSub {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarMenuSub, isStandalone: true, selector: "ul[scSidebarMenuSub]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-sub" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenuSub, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: 'ul[scSidebarMenuSub]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'sidebar-menu-sub',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=sidebar-menu-sub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-menu-sub.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-menu-sub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,gBAAgB;IAClB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,gGAAgG,EAChG,sCAAsC,EACtC,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGATS,gBAAgB;2FAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAP5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,IAAI,EAAE;wBACJ,WAAW,EAAE,kBAAkB;wBAC/B,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'ul[scSidebarMenuSub]',\n host: {\n 'data-slot': 'sidebar-menu-sub',\n '[class]': 'class()',\n },\n})\nexport class ScSidebarMenuSub {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn(\n 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n this.classInput(),\n ),\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScSidebarMenu {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('flex w-full min-w-0 flex-col gap-0', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarMenu, isStandalone: true, selector: "ul[scSidebarMenu]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarMenu, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: 'ul[scSidebarMenu]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'sidebar-menu',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=sidebar-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-menu.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,aAAa;IACf,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,oCAAoC,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDAC5D,CAAC;uGALS,aAAa;2FAAb,aAAa;;2FAAb,aAAa;kBAPzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,IAAI,EAAE;wBACJ,WAAW,EAAE,cAAc;wBAC3B,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'ul[scSidebarMenu]',\n host: {\n 'data-slot': 'sidebar-menu',\n '[class]': 'class()',\n },\n})\nexport class ScSidebarMenu {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('flex w-full min-w-0 flex-col gap-0', this.classInput()),\n );\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Component, computed, effect, inject, input, model, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
+
import { NavigationEnd, Router } from '@angular/router';
|
|
4
|
+
import { filter } from 'rxjs';
|
|
5
|
+
import { cn } from '../../utils';
|
|
6
|
+
import { ScSidebarState } from './sidebar-state';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
const SIDEBAR_STORAGE_KEY = 'sc-sidebar-state';
|
|
9
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
10
|
+
const MOBILE_BREAKPOINT = 768;
|
|
11
|
+
export class ScSidebarProvider {
|
|
12
|
+
state = inject(ScSidebarState);
|
|
13
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14
|
+
// Two-way binding support
|
|
15
|
+
open = model(true, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
16
|
+
class = computed(() => cn('group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
17
|
+
keydownHandler;
|
|
18
|
+
resizeHandler;
|
|
19
|
+
router = inject(Router);
|
|
20
|
+
constructor() {
|
|
21
|
+
// Sync model with state
|
|
22
|
+
effect(() => this.state.setOpen(this.open()));
|
|
23
|
+
effect(() => this.open.set(this.state.open()));
|
|
24
|
+
// Save to localStorage when state changes
|
|
25
|
+
effect(() => {
|
|
26
|
+
this.saveToStorage(this.state.open());
|
|
27
|
+
});
|
|
28
|
+
// Close mobile sidebar on navigation
|
|
29
|
+
this.router.events
|
|
30
|
+
.pipe(filter((event) => event instanceof NavigationEnd), filter(() => this.state.isMobile() && this.state.openMobile()), takeUntilDestroyed())
|
|
31
|
+
.subscribe(() => this.state.setOpenMobile(false));
|
|
32
|
+
}
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
// Load initial state from localStorage
|
|
35
|
+
const savedState = this.loadFromStorage();
|
|
36
|
+
if (savedState !== null) {
|
|
37
|
+
this.open.set(savedState);
|
|
38
|
+
}
|
|
39
|
+
// Setup keyboard shortcut (Cmd/Ctrl + B)
|
|
40
|
+
this.keydownHandler = (event) => {
|
|
41
|
+
if ((event.metaKey || event.ctrlKey) &&
|
|
42
|
+
event.key === SIDEBAR_KEYBOARD_SHORTCUT) {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
this.state.toggle();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
window.addEventListener('keydown', this.keydownHandler);
|
|
48
|
+
// Setup mobile detection
|
|
49
|
+
this.resizeHandler = () => {
|
|
50
|
+
const isMobile = window.innerWidth < MOBILE_BREAKPOINT;
|
|
51
|
+
this.state.setIsMobile(isMobile);
|
|
52
|
+
};
|
|
53
|
+
this.resizeHandler(); // Initial check
|
|
54
|
+
window.addEventListener('resize', this.resizeHandler);
|
|
55
|
+
}
|
|
56
|
+
ngOnDestroy() {
|
|
57
|
+
if (this.keydownHandler) {
|
|
58
|
+
window.removeEventListener('keydown', this.keydownHandler);
|
|
59
|
+
}
|
|
60
|
+
if (this.resizeHandler) {
|
|
61
|
+
window.removeEventListener('resize', this.resizeHandler);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
saveToStorage(open) {
|
|
65
|
+
try {
|
|
66
|
+
localStorage.setItem(SIDEBAR_STORAGE_KEY, String(open));
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
// localStorage unavailable
|
|
70
|
+
console.warn('Unable to save sidebar state to localStorage:', error);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
loadFromStorage() {
|
|
74
|
+
try {
|
|
75
|
+
const value = localStorage.getItem(SIDEBAR_STORAGE_KEY);
|
|
76
|
+
return value !== null ? value === 'true' : null;
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
console.warn('Unable to load sidebar state from localStorage:', error);
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarProvider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarProvider, isStandalone: true, selector: "div[scSidebarProvider]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { attributes: { "data-slot": "sidebar-wrapper" }, properties: { "class": "class()", "style.--sidebar-width": "\"16rem\"", "style.--sidebar-width-mobile": "\"18rem\"", "style.--sidebar-width-icon": "\"3rem\"" } }, providers: [ScSidebarState], ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarProvider, decorators: [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{
|
|
89
|
+
selector: 'div[scSidebarProvider]',
|
|
90
|
+
template: '<ng-content />',
|
|
91
|
+
providers: [ScSidebarState],
|
|
92
|
+
host: {
|
|
93
|
+
'data-slot': 'sidebar-wrapper',
|
|
94
|
+
'[class]': 'class()',
|
|
95
|
+
'[style.--sidebar-width]': '"16rem"',
|
|
96
|
+
'[style.--sidebar-width-mobile]': '"18rem"',
|
|
97
|
+
'[style.--sidebar-width-icon]': '"3rem"',
|
|
98
|
+
},
|
|
99
|
+
encapsulation: ViewEncapsulation.None,
|
|
100
|
+
}]
|
|
101
|
+
}], ctorParameters: () => [], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
|
|
102
|
+
//# sourceMappingURL=sidebar-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-provider.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,KAAK,EAGL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;;AAEjD,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAC/C,MAAM,yBAAyB,GAAG,GAAG,CAAC;AACtC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAe9B,MAAM,OAAO,iBAAiB;IACnB,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAE/B,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE5D,0BAA0B;IACjB,IAAI,GAAG,KAAK,CAAU,IAAI,gDAAC,CAAC;IAElB,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,iFAAiF,EACjF,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;IAEM,cAAc,CAAkC;IAChD,aAAa,CAAc;IAElB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAEzC;QACE,wBAAwB;QACxB,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/C,0CAA0C;QAC1C,MAAM,CAAC,GAAG,EAAE;YACV,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,qCAAqC;QACrC,IAAI,CAAC,MAAM,CAAC,MAAM;aACf,IAAI,CACH,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,YAAY,aAAa,CAAC,EACjD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,EAC9D,kBAAkB,EAAE,CACrB;aACA,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,QAAQ;QACN,uCAAuC;QACvC,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC1C,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC;QAED,yCAAyC;QACzC,IAAI,CAAC,cAAc,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC7C,IACE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;gBAChC,KAAK,CAAC,GAAG,KAAK,yBAAyB,EACvC,CAAC;gBACD,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;QACH,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAExD,yBAAyB;QACzB,IAAI,CAAC,aAAa,GAAG,GAAG,EAAE;YACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,GAAG,iBAAiB,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,CAAC;QACF,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,gBAAgB;QACtC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,IAAa;QACjC,IAAI,CAAC;YACH,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,2BAA2B;YAC3B,OAAO,CAAC,IAAI,CAAC,+CAA+C,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAEO,eAAe;QACrB,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACxD,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAClD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,iDAAiD,EAAE,KAAK,CAAC,CAAC;YACvE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;uGA9FU,iBAAiB;2FAAjB,iBAAiB,okBAVjB,CAAC,cAAc,CAAC,0BADjB,gBAAgB;;2FAWf,iBAAiB;kBAb7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,cAAc,CAAC;oBAC3B,IAAI,EAAE;wBACJ,WAAW,EAAE,iBAAiB;wBAC9B,SAAS,EAAE,SAAS;wBACpB,yBAAyB,EAAE,SAAS;wBACpC,gCAAgC,EAAE,SAAS;wBAC3C,8BAA8B,EAAE,QAAQ;qBACzC;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC","sourcesContent":["import {\n Component,\n computed,\n effect,\n inject,\n input,\n model,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs';\nimport { cn } from '../../utils';\nimport { ScSidebarState } from './sidebar-state';\n\nconst SIDEBAR_STORAGE_KEY = 'sc-sidebar-state';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\nconst MOBILE_BREAKPOINT = 768;\n\n@Component({\n selector: 'div[scSidebarProvider]',\n template: '<ng-content />',\n providers: [ScSidebarState],\n host: {\n 'data-slot': 'sidebar-wrapper',\n '[class]': 'class()',\n '[style.--sidebar-width]': '\"16rem\"',\n '[style.--sidebar-width-mobile]': '\"18rem\"',\n '[style.--sidebar-width-icon]': '\"3rem\"',\n },\n encapsulation: ViewEncapsulation.None,\n})\nexport class ScSidebarProvider implements OnInit, OnDestroy {\n readonly state = inject(ScSidebarState);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n // Two-way binding support\n readonly open = model<boolean>(true);\n\n protected readonly class = computed(() =>\n cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n this.classInput(),\n ),\n );\n\n private keydownHandler?: (event: KeyboardEvent) => void;\n private resizeHandler?: () => void;\n\n private readonly router = inject(Router);\n\n constructor() {\n // Sync model with state\n effect(() => this.state.setOpen(this.open()));\n effect(() => this.open.set(this.state.open()));\n\n // Save to localStorage when state changes\n effect(() => {\n this.saveToStorage(this.state.open());\n });\n\n // Close mobile sidebar on navigation\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n filter(() => this.state.isMobile() && this.state.openMobile()),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.state.setOpenMobile(false));\n }\n\n ngOnInit(): void {\n // Load initial state from localStorage\n const savedState = this.loadFromStorage();\n if (savedState !== null) {\n this.open.set(savedState);\n }\n\n // Setup keyboard shortcut (Cmd/Ctrl + B)\n this.keydownHandler = (event: KeyboardEvent) => {\n if (\n (event.metaKey || event.ctrlKey) &&\n event.key === SIDEBAR_KEYBOARD_SHORTCUT\n ) {\n event.preventDefault();\n this.state.toggle();\n }\n };\n window.addEventListener('keydown', this.keydownHandler);\n\n // Setup mobile detection\n this.resizeHandler = () => {\n const isMobile = window.innerWidth < MOBILE_BREAKPOINT;\n this.state.setIsMobile(isMobile);\n };\n this.resizeHandler(); // Initial check\n window.addEventListener('resize', this.resizeHandler);\n }\n\n ngOnDestroy(): void {\n if (this.keydownHandler) {\n window.removeEventListener('keydown', this.keydownHandler);\n }\n if (this.resizeHandler) {\n window.removeEventListener('resize', this.resizeHandler);\n }\n }\n\n private saveToStorage(open: boolean): void {\n try {\n localStorage.setItem(SIDEBAR_STORAGE_KEY, String(open));\n } catch (error) {\n // localStorage unavailable\n console.warn('Unable to save sidebar state to localStorage:', error);\n }\n }\n\n private loadFromStorage(): boolean | null {\n try {\n const value = localStorage.getItem(SIDEBAR_STORAGE_KEY);\n return value !== null ? value === 'true' : null;\n } catch (error) {\n console.warn('Unable to load sidebar state from localStorage:', error);\n return null;\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, computed, inject, input, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScSidebarState } from './sidebar-state';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class ScSidebarRail {
|
|
6
|
+
state = inject(ScSidebarState);
|
|
7
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
|
+
class = computed(() => cn('absolute inset-y-0 z-20 hidden w-4 ltr:-translate-x-1/2 rtl:-translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex', 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarRail, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarRail, isStandalone: true, selector: "button[scSidebarRail]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-rail", "tabindex": "-1", "title": "Toggle Sidebar" }, listeners: { "click": "state.toggle()" }, properties: { "class": "class()" } }, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarRail, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{
|
|
15
|
+
selector: 'button[scSidebarRail]',
|
|
16
|
+
template: '',
|
|
17
|
+
host: {
|
|
18
|
+
'data-slot': 'sidebar-rail',
|
|
19
|
+
'[class]': 'class()',
|
|
20
|
+
'(click)': 'state.toggle()',
|
|
21
|
+
tabindex: '-1',
|
|
22
|
+
title: 'Toggle Sidebar',
|
|
23
|
+
},
|
|
24
|
+
encapsulation: ViewEncapsulation.None,
|
|
25
|
+
}]
|
|
26
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
27
|
+
//# sourceMappingURL=sidebar-rail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-rail.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-rail.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;;AAcjD,MAAM,OAAO,aAAa;IACf,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAE/B,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,2QAA2Q,EAC3Q,0EAA0E,EAC1E,wHAAwH,EACxH,yJAAyJ,EACzJ,2DAA2D,EAC3D,2DAA2D,EAC3D,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAfS,aAAa;2FAAb,aAAa,iZAVd,EAAE;;2FAUD,aAAa;kBAZzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,QAAQ,EAAE,EAAE;oBACZ,IAAI,EAAE;wBACJ,WAAW,EAAE,cAAc;wBAC3B,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,gBAAgB;wBAC3B,QAAQ,EAAE,IAAI;wBACd,KAAK,EAAE,gBAAgB;qBACxB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC","sourcesContent":["import {\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScSidebarState } from './sidebar-state';\n\n@Component({\n selector: 'button[scSidebarRail]',\n template: '',\n host: {\n 'data-slot': 'sidebar-rail',\n '[class]': 'class()',\n '(click)': 'state.toggle()',\n tabindex: '-1',\n title: 'Toggle Sidebar',\n },\n encapsulation: ViewEncapsulation.None,\n})\nexport class ScSidebarRail {\n readonly state = inject(ScSidebarState);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn(\n 'absolute inset-y-0 z-20 hidden w-4 ltr:-translate-x-1/2 rtl:-translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n this.classInput(),\n ),\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScSidebarSeparator {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('mx-2 w-auto bg-sidebar-border', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarSeparator, isStandalone: true, selector: "div[scSidebarSeparator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-separator" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarSeparator, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: 'div[scSidebarSeparator]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'sidebar-separator',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=sidebar-separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-separator.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,kBAAkB;IACpB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,+BAA+B,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACvD,CAAC;uGALS,kBAAkB;2FAAlB,kBAAkB;;2FAAlB,kBAAkB;kBAP9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,IAAI,EAAE;wBACJ,WAAW,EAAE,mBAAmB;wBAChC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'div[scSidebarSeparator]',\n host: {\n 'data-slot': 'sidebar-separator',\n '[class]': 'class()',\n },\n})\nexport class ScSidebarSeparator {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('mx-2 w-auto bg-sidebar-border', this.classInput()),\n );\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Injectable, computed, signal } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ScSidebarState {
|
|
4
|
+
// Signals for reactive state
|
|
5
|
+
open = signal(true, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
6
|
+
openMobile = signal(false, ...(ngDevMode ? [{ debugName: "openMobile" }] : []));
|
|
7
|
+
isMobile = signal(false, ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
|
|
8
|
+
// Computed state
|
|
9
|
+
state = computed(() => (this.open() ? 'expanded' : 'collapsed'), ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
10
|
+
// Methods
|
|
11
|
+
toggle() {
|
|
12
|
+
this.open.update((value) => !value);
|
|
13
|
+
}
|
|
14
|
+
toggleMobile() {
|
|
15
|
+
this.openMobile.update((value) => !value);
|
|
16
|
+
}
|
|
17
|
+
setOpen(value) {
|
|
18
|
+
this.open.set(value);
|
|
19
|
+
}
|
|
20
|
+
setOpenMobile(value) {
|
|
21
|
+
this.openMobile.set(value);
|
|
22
|
+
}
|
|
23
|
+
setIsMobile(value) {
|
|
24
|
+
this.isMobile.set(value);
|
|
25
|
+
}
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarState });
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarState, decorators: [{
|
|
30
|
+
type: Injectable
|
|
31
|
+
}] });
|
|
32
|
+
//# sourceMappingURL=sidebar-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-state.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;AAG7D,MAAM,OAAO,cAAc;IACzB,6BAA6B;IACpB,IAAI,GAAG,MAAM,CAAC,IAAI,gDAAC,CAAC;IACpB,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC,CAAC;IAC3B,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC,CAAC;IAElC,iBAAiB;IACR,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,iDAAC,CAAC;IAE1E,UAAU;IACV,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,CAAC,KAAc;QACpB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,aAAa,CAAC,KAAc;QAC1B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,WAAW,CAAC,KAAc;QACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;uGA5BU,cAAc;2GAAd,cAAc;;2FAAd,cAAc;kBAD1B,UAAU","sourcesContent":["import { Injectable, computed, signal } from '@angular/core';\n\n@Injectable()\nexport class ScSidebarState {\n // Signals for reactive state\n readonly open = signal(true);\n readonly openMobile = signal(false);\n readonly isMobile = signal(false);\n\n // Computed state\n readonly state = computed(() => (this.open() ? 'expanded' : 'collapsed'));\n\n // Methods\n toggle(): void {\n this.open.update((value) => !value);\n }\n\n toggleMobile(): void {\n this.openMobile.update((value) => !value);\n }\n\n setOpen(value: boolean): void {\n this.open.set(value);\n }\n\n setOpenMobile(value: boolean): void {\n this.openMobile.set(value);\n }\n\n setIsMobile(value: boolean): void {\n this.isMobile.set(value);\n }\n}\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Directive, computed, inject, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { buttonVariants } from '../button';
|
|
4
|
+
import { ScSidebarState } from './sidebar-state';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class ScSidebarTrigger {
|
|
7
|
+
state = inject(ScSidebarState);
|
|
8
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
9
|
+
variant = input('ghost', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
10
|
+
size = input('icon-sm', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
11
|
+
class = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
12
|
+
onClick(event) {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
if (this.state.isMobile()) {
|
|
15
|
+
this.state.toggleMobile();
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.state.toggle();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
22
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSidebarTrigger, isStandalone: true, selector: "button[scSidebarTrigger]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-trigger", "type": "button" }, listeners: { "click": "onClick($event)" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebarTrigger, decorators: [{
|
|
25
|
+
type: Directive,
|
|
26
|
+
args: [{
|
|
27
|
+
selector: 'button[scSidebarTrigger]',
|
|
28
|
+
host: {
|
|
29
|
+
'data-slot': 'sidebar-trigger',
|
|
30
|
+
type: 'button',
|
|
31
|
+
'[class]': 'class()',
|
|
32
|
+
'(click)': 'onClick($event)',
|
|
33
|
+
},
|
|
34
|
+
}]
|
|
35
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
36
|
+
//# sourceMappingURL=sidebar-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-trigger.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAoB,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;;AAWjD,MAAM,OAAO,gBAAgB;IAClB,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAE/B,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEnD,OAAO,GAAG,KAAK,CAA8B,OAAO,mDAAC,CAAC;IACtD,IAAI,GAAG,KAAK,CAA2B,SAAS,gDAAC,CAAC;IAExC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAC9D,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;IAEQ,OAAO,CAAC,KAAiB;QACjC,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;uGAtBU,gBAAgB;2FAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAT5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,IAAI,EAAE;wBACJ,WAAW,EAAE,iBAAiB;wBAC9B,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,iBAAiB;qBAC7B;iBACF","sourcesContent":["import { Directive, computed, inject, input } from '@angular/core';\nimport { cn } from '../../utils';\nimport { buttonVariants, ScButtonVariants } from '../button';\nimport { ScSidebarState } from './sidebar-state';\n\n@Directive({\n selector: 'button[scSidebarTrigger]',\n host: {\n 'data-slot': 'sidebar-trigger',\n type: 'button',\n '[class]': 'class()',\n '(click)': 'onClick($event)',\n },\n})\nexport class ScSidebarTrigger {\n readonly state = inject(ScSidebarState);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n readonly variant = input<ScButtonVariants['variant']>('ghost');\n readonly size = input<ScButtonVariants['size']>('icon-sm');\n\n protected readonly class = computed(() =>\n cn(\n buttonVariants({ variant: this.variant(), size: this.size() }),\n this.classInput(),\n ),\n );\n\n protected onClick(event: MouseEvent): void {\n event.preventDefault();\n if (this.state.isMobile()) {\n this.state.toggleMobile();\n } else {\n this.state.toggle();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import { Component, computed, inject, input, ViewEncapsulation, } from '@angular/core';
|
|
3
|
+
import { SiXIcon } from '@semantic-icons/lucide-icons';
|
|
4
|
+
import { ScSheet, ScSheetClose, ScSheetPortal, ScSheetProvider, } from '../sheet';
|
|
5
|
+
import { ScSidebarContainer } from './sidebar-container';
|
|
6
|
+
import { ScSidebarGap } from './sidebar-gap';
|
|
7
|
+
import { ScSidebarInner } from './sidebar-inner';
|
|
8
|
+
import { ScSidebarState } from './sidebar-state';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export class ScSidebar {
|
|
11
|
+
state = inject(ScSidebarState);
|
|
12
|
+
side = input('left', ...(ngDevMode ? [{ debugName: "side" }] : []));
|
|
13
|
+
variant = input('sidebar', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
14
|
+
collapsible = input('offcanvas', ...(ngDevMode ? [{ debugName: "collapsible" }] : []));
|
|
15
|
+
isMobile = computed(() => this.state.isMobile(), ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ScSidebar, isStandalone: true, selector: "div[scSidebar]", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar" }, properties: { "attr.data-state": "state.state()", "attr.data-variant": "variant()", "attr.data-side": "side()", "attr.data-collapsible": "collapsible()" } }, ngImport: i0, template: `
|
|
18
|
+
<ng-template #content>
|
|
19
|
+
<ng-content />
|
|
20
|
+
</ng-template>
|
|
21
|
+
|
|
22
|
+
<!-- Mobile sidebar uses default width from sheet component -->
|
|
23
|
+
@if (isMobile()) {
|
|
24
|
+
<div scSheetProvider [(open)]="state.openMobile" [side]="side()">
|
|
25
|
+
<ng-template scSheetPortal>
|
|
26
|
+
<div
|
|
27
|
+
scSheet
|
|
28
|
+
class="bg-sidebar text-sidebar-foreground flex h-full flex-col p-0"
|
|
29
|
+
>
|
|
30
|
+
<button scSheetClose>
|
|
31
|
+
<svg siXIcon></svg>
|
|
32
|
+
<span class="sr-only">Close</span>
|
|
33
|
+
</button>
|
|
34
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
35
|
+
</div>
|
|
36
|
+
</ng-template>
|
|
37
|
+
</div>
|
|
38
|
+
} @else if (collapsible() === 'none') {
|
|
39
|
+
<div
|
|
40
|
+
scSidebarInner
|
|
41
|
+
class="bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col"
|
|
42
|
+
>
|
|
43
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
44
|
+
</div>
|
|
45
|
+
} @else {
|
|
46
|
+
<div
|
|
47
|
+
class="group peer text-sidebar-foreground hidden md:block"
|
|
48
|
+
[attr.data-state]="state.state()"
|
|
49
|
+
[attr.data-collapsible]="
|
|
50
|
+
state.state() === 'collapsed' ? collapsible() : ''
|
|
51
|
+
"
|
|
52
|
+
[attr.data-variant]="variant()"
|
|
53
|
+
[attr.data-side]="side()"
|
|
54
|
+
>
|
|
55
|
+
<div scSidebarGap [variant]="variant()"></div>
|
|
56
|
+
<div scSidebarContainer [variant]="variant()">
|
|
57
|
+
<div scSidebarInner>
|
|
58
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
}
|
|
63
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ScSheetProvider, selector: "div[scSheetProvider]", inputs: ["class", "side", "open"], outputs: ["openChange"] }, { kind: "directive", type: ScSheetPortal, selector: "ng-template[scSheetPortal]" }, { kind: "component", type: ScSheet, selector: "div[scSheet]", inputs: ["class"] }, { kind: "directive", type: ScSheetClose, selector: "button[scSheetClose]", inputs: ["class", "variant", "size"] }, { kind: "component", type: SiXIcon, selector: "svg[siXIcon]", inputs: ["ariaHidden", "width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ScSidebarContainer, selector: "div[scSidebarContainer]", inputs: ["class", "variant"] }, { kind: "directive", type: ScSidebarGap, selector: "div[scSidebarGap]", inputs: ["class", "variant"] }, { kind: "directive", type: ScSidebarInner, selector: "div[scSidebarInner]", inputs: ["class"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSidebar, decorators: [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: 'div[scSidebar]',
|
|
69
|
+
imports: [
|
|
70
|
+
ScSheetProvider,
|
|
71
|
+
ScSheetPortal,
|
|
72
|
+
ScSheet,
|
|
73
|
+
ScSheetClose,
|
|
74
|
+
SiXIcon,
|
|
75
|
+
NgTemplateOutlet,
|
|
76
|
+
ScSidebarContainer,
|
|
77
|
+
ScSidebarGap,
|
|
78
|
+
ScSidebarInner,
|
|
79
|
+
],
|
|
80
|
+
template: `
|
|
81
|
+
<ng-template #content>
|
|
82
|
+
<ng-content />
|
|
83
|
+
</ng-template>
|
|
84
|
+
|
|
85
|
+
<!-- Mobile sidebar uses default width from sheet component -->
|
|
86
|
+
@if (isMobile()) {
|
|
87
|
+
<div scSheetProvider [(open)]="state.openMobile" [side]="side()">
|
|
88
|
+
<ng-template scSheetPortal>
|
|
89
|
+
<div
|
|
90
|
+
scSheet
|
|
91
|
+
class="bg-sidebar text-sidebar-foreground flex h-full flex-col p-0"
|
|
92
|
+
>
|
|
93
|
+
<button scSheetClose>
|
|
94
|
+
<svg siXIcon></svg>
|
|
95
|
+
<span class="sr-only">Close</span>
|
|
96
|
+
</button>
|
|
97
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
98
|
+
</div>
|
|
99
|
+
</ng-template>
|
|
100
|
+
</div>
|
|
101
|
+
} @else if (collapsible() === 'none') {
|
|
102
|
+
<div
|
|
103
|
+
scSidebarInner
|
|
104
|
+
class="bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col"
|
|
105
|
+
>
|
|
106
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
107
|
+
</div>
|
|
108
|
+
} @else {
|
|
109
|
+
<div
|
|
110
|
+
class="group peer text-sidebar-foreground hidden md:block"
|
|
111
|
+
[attr.data-state]="state.state()"
|
|
112
|
+
[attr.data-collapsible]="
|
|
113
|
+
state.state() === 'collapsed' ? collapsible() : ''
|
|
114
|
+
"
|
|
115
|
+
[attr.data-variant]="variant()"
|
|
116
|
+
[attr.data-side]="side()"
|
|
117
|
+
>
|
|
118
|
+
<div scSidebarGap [variant]="variant()"></div>
|
|
119
|
+
<div scSidebarContainer [variant]="variant()">
|
|
120
|
+
<div scSidebarInner>
|
|
121
|
+
<ng-container *ngTemplateOutlet="content" />
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
}
|
|
126
|
+
`,
|
|
127
|
+
host: {
|
|
128
|
+
'data-slot': 'sidebar',
|
|
129
|
+
'[attr.data-state]': 'state.state()',
|
|
130
|
+
'[attr.data-variant]': 'variant()',
|
|
131
|
+
'[attr.data-side]': 'side()',
|
|
132
|
+
'[attr.data-collapsible]': 'collapsible()',
|
|
133
|
+
},
|
|
134
|
+
encapsulation: ViewEncapsulation.None,
|
|
135
|
+
}]
|
|
136
|
+
}], propDecorators: { side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }] } });
|
|
137
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/sidebar/sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EACL,OAAO,EACP,YAAY,EACZ,aAAa,EACb,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;;AAuEjD,MAAM,OAAO,SAAS;IACX,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAE/B,IAAI,GAAG,KAAK,CAAmB,MAAM,gDAAC,CAAC;IACvC,OAAO,GAAG,KAAK,CAAmC,SAAS,mDAAC,CAAC;IAC7D,WAAW,GAAG,KAAK,CAAgC,WAAW,uDAAC,CAAC;IAEtD,QAAQ,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,oDAAC,CAAC;uGAPzD,SAAS;2FAAT,SAAS,iqBAxDV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,4DAxDC,eAAe,6HACf,aAAa,uEACb,OAAO,4EACP,YAAY,uGACZ,OAAO,sLACP,gBAAgB,oJAChB,kBAAkB,kGAClB,YAAY,4FACZ,cAAc;;2FA0DL,SAAS;kBArErB,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,OAAO,EAAE;wBACP,eAAe;wBACf,aAAa;wBACb,OAAO;wBACP,YAAY;wBACZ,OAAO;wBACP,gBAAgB;wBAChB,kBAAkB;wBAClB,YAAY;wBACZ,cAAc;qBACf;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,SAAS;wBACtB,mBAAmB,EAAE,eAAe;wBACpC,qBAAqB,EAAE,WAAW;wBAClC,kBAAkB,EAAE,QAAQ;wBAC5B,yBAAyB,EAAE,eAAe;qBAC3C;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC","sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SiXIcon } from '@semantic-icons/lucide-icons';\nimport {\n ScSheet,\n ScSheetClose,\n ScSheetPortal,\n ScSheetProvider,\n} from '../sheet';\nimport { ScSidebarContainer } from './sidebar-container';\nimport { ScSidebarGap } from './sidebar-gap';\nimport { ScSidebarInner } from './sidebar-inner';\nimport { ScSidebarState } from './sidebar-state';\n\n@Component({\n selector: 'div[scSidebar]',\n imports: [\n ScSheetProvider,\n ScSheetPortal,\n ScSheet,\n ScSheetClose,\n SiXIcon,\n NgTemplateOutlet,\n ScSidebarContainer,\n ScSidebarGap,\n ScSidebarInner,\n ],\n template: `\n <ng-template #content>\n <ng-content />\n </ng-template>\n\n <!-- Mobile sidebar uses default width from sheet component -->\n @if (isMobile()) {\n <div scSheetProvider [(open)]=\"state.openMobile\" [side]=\"side()\">\n <ng-template scSheetPortal>\n <div\n scSheet\n class=\"bg-sidebar text-sidebar-foreground flex h-full flex-col p-0\"\n >\n <button scSheetClose>\n <svg siXIcon></svg>\n <span class=\"sr-only\">Close</span>\n </button>\n <ng-container *ngTemplateOutlet=\"content\" />\n </div>\n </ng-template>\n </div>\n } @else if (collapsible() === 'none') {\n <div\n scSidebarInner\n class=\"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </div>\n } @else {\n <div\n class=\"group peer text-sidebar-foreground hidden md:block\"\n [attr.data-state]=\"state.state()\"\n [attr.data-collapsible]=\"\n state.state() === 'collapsed' ? collapsible() : ''\n \"\n [attr.data-variant]=\"variant()\"\n [attr.data-side]=\"side()\"\n >\n <div scSidebarGap [variant]=\"variant()\"></div>\n <div scSidebarContainer [variant]=\"variant()\">\n <div scSidebarInner>\n <ng-container *ngTemplateOutlet=\"content\" />\n </div>\n </div>\n </div>\n }\n `,\n host: {\n 'data-slot': 'sidebar',\n '[attr.data-state]': 'state.state()',\n '[attr.data-variant]': 'variant()',\n '[attr.data-side]': 'side()',\n '[attr.data-collapsible]': 'collapsible()',\n },\n encapsulation: ViewEncapsulation.None,\n})\nexport class ScSidebar {\n readonly state = inject(ScSidebarState);\n\n readonly side = input<'left' | 'right'>('left');\n readonly variant = input<'sidebar' | 'floating' | 'inset'>('sidebar');\n readonly collapsible = input<'offcanvas' | 'icon' | 'none'>('offcanvas');\n\n protected readonly isMobile = computed(() => this.state.isMobile());\n}\n"]}
|
|
@@ -4,10 +4,10 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScSkeleton {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('animate-pulse rounded-md bg-muted', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
8
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSkeleton, isStandalone: true, selector: "div[scSkeleton]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "skeleton" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSkeleton, decorators: [{
|
|
11
11
|
type: Directive,
|
|
12
12
|
args: [{
|
|
13
13
|
selector: 'div[scSkeleton]',
|
|
@@ -10,7 +10,7 @@ export class ScSlider {
|
|
|
10
10
|
idInput = input('', { ...(ngDevMode ? { debugName: "idInput" } : {}), alias: 'id' });
|
|
11
11
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
12
12
|
id = computed(() => this.idInput() || this.field?.id() || this.fallbackId, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
13
|
-
class = computed(() => cn('w-full cursor-pointer appearance-none bg-transparent disabled:pointer-events-none disabled:opacity-50', '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[
|
|
13
|
+
class = computed(() => cn('w-full cursor-pointer appearance-none bg-transparent disabled:pointer-events-none disabled:opacity-50', '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--primary)_var(--fill-percent,0%),var(--muted)_var(--fill-percent,0%))]', '[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-muted', '[&::-moz-range-progress]:h-1 [&::-moz-range-progress]:rounded-full [&::-moz-range-progress]:bg-primary', '[&::-webkit-slider-thumb]:size-3 [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:transition-shadow', '[&::-webkit-slider-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', '[&::-moz-range-thumb]:size-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:transition-shadow', '[&::-moz-range-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', 'focus-visible:outline-none [&:focus-visible::-webkit-slider-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', '[&:focus-visible::-moz-range-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14
14
|
constructor() {
|
|
15
15
|
afterNextRender(() => {
|
|
16
16
|
this.updateFillPercent();
|
|
@@ -27,10 +27,10 @@ export class ScSlider {
|
|
|
27
27
|
const percent = ((value - min) / (max - min)) * 100;
|
|
28
28
|
el.style.setProperty('--fill-percent', `${percent}%`);
|
|
29
29
|
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
31
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSlider, isStandalone: true, selector: "input[scSlider]", inputs: { idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "range", "data-slot": "slider" }, listeners: { "input": "onInput()" }, properties: { "attr.id": "id()", "class": "class()" } }, ngImport: i0 });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSlider, decorators: [{
|
|
34
34
|
type: Directive,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: 'input[scSlider]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,SAAS,EACT,UAAU,EACV,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;AAYpC,MAAM,OAAO,QAAQ;IACF,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACtD,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC,CAAC;IAE9D,OAAO,GAAG,KAAK,CAAC,EAAE,oDAAI,KAAK,EAAE,IAAI,GAAG,CAAC;IACrC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEnD,EAAE,GAAG,QAAQ,CACpB,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,UAAU,8CAC5D,CAAC;IAEiB,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,uGAAuG,EACvG,
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,SAAS,EACT,UAAU,EACV,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;AAYpC,MAAM,OAAO,QAAQ;IACF,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACtD,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC,CAAC;IAE9D,OAAO,GAAG,KAAK,CAAC,EAAE,oDAAI,KAAK,EAAE,IAAI,GAAG,CAAC;IACrC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEnD,EAAE,GAAG,QAAQ,CACpB,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,UAAU,8CAC5D,CAAC;IAEiB,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,uGAAuG,EACvG,oOAAoO,EACpO,6FAA6F,EAC7F,wGAAwG,EACxG,uQAAuQ,EACvQ,sFAAsF,EACtF,+MAA+M,EAC/M,kFAAkF,EAClF,yHAAyH,EACzH,0FAA0F,EAC1F,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;IAEF;QACE,eAAe,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC;IAES,OAAO;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAEO,iBAAiB;QACvB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QACjC,MAAM,GAAG,GAAG,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,GAAG,GAAG,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;QACtC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;QAEpD,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC;IACxD,CAAC;uGA9CU,QAAQ;2FAAR,QAAQ;;2FAAR,QAAQ;kBAVpB,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,IAAI,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,QAAQ;wBACrB,WAAW,EAAE,MAAM;wBACnB,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,WAAW;qBACvB;iBACF","sourcesContent":["import { _IdGenerator } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { SC_FIELD } from '../field';\n\n@Directive({\n selector: 'input[scSlider]',\n host: {\n type: 'range',\n 'data-slot': 'slider',\n '[attr.id]': 'id()',\n '[class]': 'class()',\n '(input)': 'onInput()',\n },\n})\nexport class ScSlider {\n private readonly field = inject(SC_FIELD, { optional: true });\n private readonly fallbackId = inject(_IdGenerator).getId('sc-slider-');\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n readonly idInput = input('', { alias: 'id' });\n readonly classInput = input<string>('', { alias: 'class' });\n\n readonly id = computed(\n () => this.idInput() || this.field?.id() || this.fallbackId,\n );\n\n protected readonly class = computed(() =>\n cn(\n 'w-full cursor-pointer appearance-none bg-transparent disabled:pointer-events-none disabled:opacity-50',\n '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--primary)_var(--fill-percent,0%),var(--muted)_var(--fill-percent,0%))]',\n '[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-muted',\n '[&::-moz-range-progress]:h-1 [&::-moz-range-progress]:rounded-full [&::-moz-range-progress]:bg-primary',\n '[&::-webkit-slider-thumb]:size-3 [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:transition-shadow',\n '[&::-webkit-slider-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n '[&::-moz-range-thumb]:size-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:transition-shadow',\n '[&::-moz-range-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n 'focus-visible:outline-none [&:focus-visible::-webkit-slider-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n '[&:focus-visible::-moz-range-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n this.classInput(),\n ),\n );\n\n constructor() {\n afterNextRender(() => {\n this.updateFillPercent();\n });\n }\n\n protected onInput() {\n this.updateFillPercent();\n }\n\n private updateFillPercent() {\n const el = this.el.nativeElement;\n const min = parseFloat(el.min) || 0;\n const max = parseFloat(el.max) || 100;\n const value = parseFloat(el.value) || 0;\n const percent = ((value - min) / (max - min)) * 100;\n\n el.style.setProperty('--fill-percent', `${percent}%`);\n }\n}\n"]}
|
|
@@ -5,10 +5,10 @@ export class ScSpinner {
|
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
ariaLabel = input('Loading', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
7
7
|
class = computed(() => cn('size-4 animate-spin', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
9
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSpinner, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSpinner, isStandalone: true, selector: "svg[scSpinner]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "spinner", "role": "status" }, properties: { "attr.aria-label": "ariaLabel()", "class": "class()" } }, ngImport: i0 });
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSpinner, decorators: [{
|
|
12
12
|
type: Directive,
|
|
13
13
|
args: [{
|
|
14
14
|
selector: 'svg[scSpinner]',
|