@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
|
@@ -18,7 +18,7 @@ export const MIN_THUMB_CLASSES = [
|
|
|
18
18
|
export const MAX_THUMB_CLASSES = [
|
|
19
19
|
...SHARED_THUMB_CLASSES,
|
|
20
20
|
'[&::-webkit-slider-thumb]:-mt-1',
|
|
21
|
-
'[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[
|
|
22
|
-
'[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-[
|
|
21
|
+
'[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--muted)_var(--min-percent),var(--primary)_var(--min-percent)_var(--max-percent),var(--muted)_var(--max-percent))]',
|
|
22
|
+
'[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-[linear-gradient(to_right,var(--muted)_var(--min-percent),var(--primary)_var(--min-percent)_var(--max-percent),var(--muted)_var(--max-percent))]',
|
|
23
23
|
];
|
|
24
24
|
//# sourceMappingURL=range-slider-thumb-base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-slider-thumb-base.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/range-slider/range-slider-thumb-base.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG;IAC3B,gGAAgG;IAChG,kDAAkD;IAClD,qRAAqR;IACrR,sFAAsF;IACtF,yPAAyP;IACzP,kFAAkF;IAClF,yHAAyH;IACzH,0FAA0F;CAClF,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,oBAAoB;IACvB,MAAM;IACN,mCAAmC;IACnC,6IAA6I;IAC7I,gEAAgE;CACxD,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,oBAAoB;IACvB,iCAAiC;IACjC
|
|
1
|
+
{"version":3,"file":"range-slider-thumb-base.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/range-slider/range-slider-thumb-base.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG;IAC3B,gGAAgG;IAChG,kDAAkD;IAClD,qRAAqR;IACrR,sFAAsF;IACtF,yPAAyP;IACzP,kFAAkF;IAClF,yHAAyH;IACzH,0FAA0F;CAClF,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,oBAAoB;IACvB,MAAM;IACN,mCAAmC;IACnC,6IAA6I;IAC7I,gEAAgE;CACxD,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,oBAAoB;IACvB,iCAAiC;IACjC,+QAA+Q;IAC/Q,wOAAwO;CAChO,CAAC","sourcesContent":["const SHARED_THUMB_CLASSES = [\n 'pointer-events-none absolute top-0 h-full w-full cursor-pointer appearance-none bg-transparent',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:size-3 [&::-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]:pointer-events-auto [&::-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] as const;\n\nexport const MIN_THUMB_CLASSES = [\n ...SHARED_THUMB_CLASSES,\n 'z-10',\n '[&::-webkit-slider-thumb]:-mt-1.5',\n '[&::-webkit-slider-runnable-track]:appearance-none [&::-webkit-slider-runnable-track]:h-0 [&::-webkit-slider-runnable-track]:bg-transparent',\n '[&::-moz-range-track]:h-0 [&::-moz-range-track]:bg-transparent',\n] as const;\n\nexport const MAX_THUMB_CLASSES = [\n ...SHARED_THUMB_CLASSES,\n '[&::-webkit-slider-thumb]:-mt-1',\n '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--muted)_var(--min-percent),var(--primary)_var(--min-percent)_var(--max-percent),var(--muted)_var(--max-percent))]',\n '[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-[linear-gradient(to_right,var(--muted)_var(--min-percent),var(--primary)_var(--min-percent)_var(--max-percent),var(--muted)_var(--max-percent))]',\n] as const;\n"]}
|
|
@@ -44,10 +44,10 @@ export class ScRangeSlider {
|
|
|
44
44
|
clampMax(val) {
|
|
45
45
|
return Math.max(val, this.minValue());
|
|
46
46
|
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
48
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScRangeSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
48
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScRangeSlider, isStandalone: true, selector: "div[scRangeSlider]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { minValue: "minValueChange", maxValue: "maxValueChange" }, host: { listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "class": "class()", "style.--min-percent": "minPercentCss()", "style.--max-percent": "maxPercentCss()" } }, ngImport: i0 });
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScRangeSlider, decorators: [{
|
|
51
51
|
type: Directive,
|
|
52
52
|
args: [{
|
|
53
53
|
selector: 'div[scRangeSlider]',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './resizable.types';\nexport * from './resizable-panel-group';\nexport * from './resizable-panel';\nexport * from './resizable-handle';\nexport * from './resizable-handle-indicator';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScResizableHandleIndicator {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizableHandleIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScResizableHandleIndicator, isStandalone: true, selector: "[scResizableHandleIndicator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "resizable-handle-indicator" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizableHandleIndicator, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: '[scResizableHandleIndicator]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'resizable-handle-indicator',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=resizable-handle-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-handle-indicator.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/resizable-handle-indicator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,0BAA0B;IAC5B,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,iDAAiD,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACzE,CAAC;uGALS,0BAA0B;2FAA1B,0BAA0B;;2FAA1B,0BAA0B;kBAPtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,8BAA8B;oBACxC,IAAI,EAAE;wBACJ,WAAW,EAAE,4BAA4B;wBACzC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { computed, Directive, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: '[scResizableHandleIndicator]',\n host: {\n 'data-slot': 'resizable-handle-indicator',\n '[class]': 'class()',\n },\n})\nexport class ScResizableHandleIndicator {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg', this.classInput()),\n );\n}\n"]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, ElementRef, inject, input, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScResizableHandleIndicator } from './resizable-handle-indicator';
|
|
4
|
+
import { ScResizablePanelGroup } from './resizable-panel-group';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class ScResizableHandle {
|
|
7
|
+
group = inject(ScResizablePanelGroup);
|
|
8
|
+
elementRef = inject(ElementRef);
|
|
9
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
10
|
+
withHandle = input(false, ...(ngDevMode ? [{ debugName: "withHandle" }] : []));
|
|
11
|
+
dragging = false;
|
|
12
|
+
startPos = 0;
|
|
13
|
+
startSizes = [];
|
|
14
|
+
class = computed(() => cn('bg-border focus-visible:ring-ring ring-offset-background relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=vertical]:cursor-ew-resize aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:cursor-ns-resize aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
15
|
+
onMouseDown(event) {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
this.startDrag(event.clientX, event.clientY);
|
|
18
|
+
const onMouseMove = (e) => this.onDrag(e.clientX, e.clientY);
|
|
19
|
+
const onMouseUp = () => {
|
|
20
|
+
this.dragging = false;
|
|
21
|
+
document.removeEventListener('mousemove', onMouseMove);
|
|
22
|
+
document.removeEventListener('mouseup', onMouseUp);
|
|
23
|
+
};
|
|
24
|
+
document.addEventListener('mousemove', onMouseMove);
|
|
25
|
+
document.addEventListener('mouseup', onMouseUp);
|
|
26
|
+
}
|
|
27
|
+
onTouchStart(event) {
|
|
28
|
+
if (event.touches.length !== 1)
|
|
29
|
+
return;
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
const touch = event.touches[0];
|
|
32
|
+
this.startDrag(touch.clientX, touch.clientY);
|
|
33
|
+
const onTouchMove = (e) => {
|
|
34
|
+
if (e.touches.length !== 1)
|
|
35
|
+
return;
|
|
36
|
+
const t = e.touches[0];
|
|
37
|
+
this.onDrag(t.clientX, t.clientY);
|
|
38
|
+
};
|
|
39
|
+
const onTouchEnd = () => {
|
|
40
|
+
this.dragging = false;
|
|
41
|
+
document.removeEventListener('touchmove', onTouchMove);
|
|
42
|
+
document.removeEventListener('touchend', onTouchEnd);
|
|
43
|
+
};
|
|
44
|
+
document.addEventListener('touchmove', onTouchMove, { passive: false });
|
|
45
|
+
document.addEventListener('touchend', onTouchEnd);
|
|
46
|
+
}
|
|
47
|
+
startDrag(clientX, clientY) {
|
|
48
|
+
this.dragging = true;
|
|
49
|
+
const isHorizontal = this.group.direction() === 'horizontal';
|
|
50
|
+
this.startPos = isHorizontal ? clientX : clientY;
|
|
51
|
+
const panels = this.group.getPanels();
|
|
52
|
+
this.startSizes = panels.map((p) => p.size());
|
|
53
|
+
}
|
|
54
|
+
onDrag(clientX, clientY) {
|
|
55
|
+
if (!this.dragging)
|
|
56
|
+
return;
|
|
57
|
+
const isHorizontal = this.group.direction() === 'horizontal';
|
|
58
|
+
const currentPos = isHorizontal ? clientX : clientY;
|
|
59
|
+
const delta = currentPos - this.startPos;
|
|
60
|
+
const panels = this.group.getPanels();
|
|
61
|
+
const handles = this.group.getHandles();
|
|
62
|
+
const handleIndex = handles.indexOf(this);
|
|
63
|
+
if (handleIndex === -1 || panels.length < 2)
|
|
64
|
+
return;
|
|
65
|
+
const container = this.elementRef.nativeElement.parentElement;
|
|
66
|
+
if (!container)
|
|
67
|
+
return;
|
|
68
|
+
const containerSize = isHorizontal
|
|
69
|
+
? container.offsetWidth
|
|
70
|
+
: container.offsetHeight;
|
|
71
|
+
const deltaPercent = (delta / containerSize) * 100;
|
|
72
|
+
const leftPanelIndex = handleIndex;
|
|
73
|
+
const rightPanelIndex = handleIndex + 1;
|
|
74
|
+
if (leftPanelIndex >= 0 && rightPanelIndex < panels.length) {
|
|
75
|
+
const leftPanel = panels[leftPanelIndex];
|
|
76
|
+
const rightPanel = panels[rightPanelIndex];
|
|
77
|
+
const newLeftSize = this.startSizes[leftPanelIndex] + deltaPercent;
|
|
78
|
+
const newRightSize = this.startSizes[rightPanelIndex] - deltaPercent;
|
|
79
|
+
if (newLeftSize >= leftPanel.minSize() &&
|
|
80
|
+
newLeftSize <= leftPanel.maxSize() &&
|
|
81
|
+
newRightSize >= rightPanel.minSize() &&
|
|
82
|
+
newRightSize <= rightPanel.maxSize()) {
|
|
83
|
+
leftPanel.setSize(newLeftSize);
|
|
84
|
+
rightPanel.setSize(newRightSize);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizableHandle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ScResizableHandle, isStandalone: true, selector: "[scResizableHandle]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, withHandle: { classPropertyName: "withHandle", publicName: "withHandle", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "resizable-handle" }, listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)" }, properties: { "class": "class()", "attr.aria-orientation": "group.direction() === \"horizontal\" ? \"vertical\" : \"horizontal\"" } }, ngImport: i0, template: `
|
|
90
|
+
@if (withHandle()) {
|
|
91
|
+
<div scResizableHandleIndicator></div>
|
|
92
|
+
}
|
|
93
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: ScResizableHandleIndicator, selector: "[scResizableHandleIndicator]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizableHandle, decorators: [{
|
|
96
|
+
type: Component,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: '[scResizableHandle]',
|
|
99
|
+
imports: [ScResizableHandleIndicator],
|
|
100
|
+
host: {
|
|
101
|
+
'data-slot': 'resizable-handle',
|
|
102
|
+
'[class]': 'class()',
|
|
103
|
+
'[attr.aria-orientation]': 'group.direction() === "horizontal" ? "vertical" : "horizontal"',
|
|
104
|
+
'(mousedown)': 'onMouseDown($event)',
|
|
105
|
+
'(touchstart)': 'onTouchStart($event)',
|
|
106
|
+
},
|
|
107
|
+
template: `
|
|
108
|
+
@if (withHandle()) {
|
|
109
|
+
<div scResizableHandleIndicator></div>
|
|
110
|
+
}
|
|
111
|
+
`,
|
|
112
|
+
encapsulation: ViewEncapsulation.None,
|
|
113
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
|
+
}]
|
|
115
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], withHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "withHandle", required: false }] }] } });
|
|
116
|
+
//# sourceMappingURL=resizable-handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-handle.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/resizable-handle.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScResizableHandleIndicator } from './resizable-handle-indicator';\nimport { ScResizablePanelGroup } from './resizable-panel-group';\n\n@Component({\n selector: '[scResizableHandle]',\n imports: [ScResizableHandleIndicator],\n host: {\n 'data-slot': 'resizable-handle',\n '[class]': 'class()',\n '[attr.aria-orientation]':\n 'group.direction() === \"horizontal\" ? \"vertical\" : \"horizontal\"',\n '(mousedown)': 'onMouseDown($event)',\n '(touchstart)': 'onTouchStart($event)',\n },\n template: `\n @if (withHandle()) {\n <div scResizableHandleIndicator></div>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScResizableHandle {\n readonly group = inject(ScResizablePanelGroup);\n private readonly elementRef = inject(ElementRef);\n\n readonly classInput = input<string>('', { alias: 'class' });\n readonly withHandle = input<boolean>(false);\n\n private dragging = false;\n private startPos = 0;\n private startSizes: number[] = [];\n\n protected readonly class = computed(() =>\n cn(\n 'bg-border focus-visible:ring-ring ring-offset-background relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=vertical]:cursor-ew-resize aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:cursor-ns-resize aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n this.classInput(),\n ),\n );\n\n protected onMouseDown(event: MouseEvent): void {\n event.preventDefault();\n this.startDrag(event.clientX, event.clientY);\n\n const onMouseMove = (e: MouseEvent) => this.onDrag(e.clientX, e.clientY);\n const onMouseUp = () => {\n this.dragging = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n }\n\n protected onTouchStart(event: TouchEvent): void {\n if (event.touches.length !== 1) return;\n event.preventDefault();\n const touch = event.touches[0];\n this.startDrag(touch.clientX, touch.clientY);\n\n const onTouchMove = (e: TouchEvent) => {\n if (e.touches.length !== 1) return;\n const t = e.touches[0];\n this.onDrag(t.clientX, t.clientY);\n };\n const onTouchEnd = () => {\n this.dragging = false;\n document.removeEventListener('touchmove', onTouchMove);\n document.removeEventListener('touchend', onTouchEnd);\n };\n\n document.addEventListener('touchmove', onTouchMove, { passive: false });\n document.addEventListener('touchend', onTouchEnd);\n }\n\n private startDrag(clientX: number, clientY: number): void {\n this.dragging = true;\n const isHorizontal = this.group.direction() === 'horizontal';\n this.startPos = isHorizontal ? clientX : clientY;\n\n const panels = this.group.getPanels();\n this.startSizes = panels.map((p) => p.size());\n }\n\n private onDrag(clientX: number, clientY: number): void {\n if (!this.dragging) return;\n\n const isHorizontal = this.group.direction() === 'horizontal';\n const currentPos = isHorizontal ? clientX : clientY;\n const delta = currentPos - this.startPos;\n\n const panels = this.group.getPanels();\n const handles = this.group.getHandles();\n const handleIndex = handles.indexOf(this);\n\n if (handleIndex === -1 || panels.length < 2) return;\n\n const container = this.elementRef.nativeElement.parentElement;\n if (!container) return;\n\n const containerSize = isHorizontal\n ? container.offsetWidth\n : container.offsetHeight;\n const deltaPercent = (delta / containerSize) * 100;\n\n const leftPanelIndex = handleIndex;\n const rightPanelIndex = handleIndex + 1;\n\n if (leftPanelIndex >= 0 && rightPanelIndex < panels.length) {\n const leftPanel = panels[leftPanelIndex];\n const rightPanel = panels[rightPanelIndex];\n\n const newLeftSize = this.startSizes[leftPanelIndex] + deltaPercent;\n const newRightSize = this.startSizes[rightPanelIndex] - deltaPercent;\n\n if (\n newLeftSize >= leftPanel.minSize() &&\n newLeftSize <= leftPanel.maxSize() &&\n newRightSize >= rightPanel.minSize() &&\n newRightSize <= rightPanel.maxSize()\n ) {\n leftPanel.setSize(newLeftSize);\n rightPanel.setSize(newRightSize);\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { computed, Directive, input, contentChildren } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScResizablePanel } from './resizable-panel';
|
|
4
|
+
import { ScResizableHandle } from './resizable-handle';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class ScResizablePanelGroup {
|
|
7
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
|
+
direction = input('horizontal', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
9
|
+
allPanels = contentChildren(ScResizablePanel, { ...(ngDevMode ? { debugName: "allPanels" } : {}), descendants: true });
|
|
10
|
+
allHandles = contentChildren(ScResizableHandle, { ...(ngDevMode ? { debugName: "allHandles" } : {}), descendants: true });
|
|
11
|
+
ownPanels = computed(() => this.allPanels().filter((p) => p.group === this), ...(ngDevMode ? [{ debugName: "ownPanels" }] : []));
|
|
12
|
+
ownHandles = computed(() => this.allHandles().filter((h) => h.group === this), ...(ngDevMode ? [{ debugName: "ownHandles" }] : []));
|
|
13
|
+
class = computed(() => cn('flex h-full w-full overflow-hidden aria-[orientation=vertical]:flex-col', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14
|
+
getPanels() {
|
|
15
|
+
return this.ownPanels();
|
|
16
|
+
}
|
|
17
|
+
getHandles() {
|
|
18
|
+
return this.ownHandles();
|
|
19
|
+
}
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizablePanelGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.0", type: ScResizablePanelGroup, isStandalone: true, selector: "[scResizablePanelGroup]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "resizable-panel-group" }, properties: { "class": "class()", "attr.aria-orientation": "direction()" } }, queries: [{ propertyName: "allPanels", predicate: ScResizablePanel, descendants: true, isSignal: true }, { propertyName: "allHandles", predicate: ScResizableHandle, descendants: true, isSignal: true }], ngImport: i0 });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizablePanelGroup, decorators: [{
|
|
24
|
+
type: Directive,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: '[scResizablePanelGroup]',
|
|
27
|
+
host: {
|
|
28
|
+
'data-slot': 'resizable-panel-group',
|
|
29
|
+
'[class]': 'class()',
|
|
30
|
+
'[attr.aria-orientation]': 'direction()',
|
|
31
|
+
},
|
|
32
|
+
}]
|
|
33
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], allPanels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ScResizablePanel), { ...{
|
|
34
|
+
descendants: true,
|
|
35
|
+
}, isSignal: true }] }], allHandles: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ScResizableHandle), { ...{
|
|
36
|
+
descendants: true,
|
|
37
|
+
}, isSignal: true }] }] } });
|
|
38
|
+
//# sourceMappingURL=resizable-panel-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-panel-group.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/resizable-panel-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;;AAUvD,MAAM,OAAO,qBAAqB;IACvB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IACnD,SAAS,GAAG,KAAK,CAAuB,YAAY,qDAAC,CAAC;IAE9C,SAAS,GAAG,eAAe,CAAC,gBAAgB,sDAC3D,WAAW,EAAE,IAAI,GACjB,CAAC;IACc,UAAU,GAAG,eAAe,CAAC,iBAAiB,uDAC7D,WAAW,EAAE,IAAI,GACjB,CAAC;IAEc,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CACzC,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,qDACjD,CAAC;IACe,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC1C,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,sDAClD,CAAC;IAEiB,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,yEAAyE,EACzE,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;IAEF,SAAS;QACP,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;uGA/BU,qBAAqB;2FAArB,qBAAqB,2gBAIa,gBAAgB,gFAGf,iBAAiB;;2FAPpD,qBAAqB;kBARjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,IAAI,EAAE;wBACJ,WAAW,EAAE,uBAAuB;wBACpC,SAAS,EAAE,SAAS;wBACpB,yBAAyB,EAAE,aAAa;qBACzC;iBACF;kSAK8C,gBAAgB,QAAE;4BAC7D,WAAW,EAAE,IAAI;yBAClB,4FAC6C,iBAAiB,QAAE;4BAC/D,WAAW,EAAE,IAAI;yBAClB","sourcesContent":["import { computed, Directive, input, contentChildren } from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScResizableDirection } from './resizable.types';\nimport { ScResizablePanel } from './resizable-panel';\nimport { ScResizableHandle } from './resizable-handle';\n\n@Directive({\n selector: '[scResizablePanelGroup]',\n host: {\n 'data-slot': 'resizable-panel-group',\n '[class]': 'class()',\n '[attr.aria-orientation]': 'direction()',\n },\n})\nexport class ScResizablePanelGroup {\n readonly classInput = input<string>('', { alias: 'class' });\n readonly direction = input<ScResizableDirection>('horizontal');\n\n private readonly allPanels = contentChildren(ScResizablePanel, {\n descendants: true,\n });\n private readonly allHandles = contentChildren(ScResizableHandle, {\n descendants: true,\n });\n\n private readonly ownPanels = computed(() =>\n this.allPanels().filter((p) => p.group === this),\n );\n private readonly ownHandles = computed(() =>\n this.allHandles().filter((h) => h.group === this),\n );\n\n protected readonly class = computed(() =>\n cn(\n 'flex h-full w-full overflow-hidden aria-[orientation=vertical]:flex-col',\n this.classInput(),\n ),\n );\n\n getPanels() {\n return this.ownPanels();\n }\n\n getHandles() {\n return this.ownHandles();\n }\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { computed, Directive, inject, input, linkedSignal, } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScResizablePanelGroup } from './resizable-panel-group';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class ScResizablePanel {
|
|
6
|
+
group = inject(ScResizablePanelGroup);
|
|
7
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
|
+
defaultSize = input(50, ...(ngDevMode ? [{ debugName: "defaultSize" }] : []));
|
|
9
|
+
minSize = input(0, ...(ngDevMode ? [{ debugName: "minSize" }] : []));
|
|
10
|
+
maxSize = input(100, ...(ngDevMode ? [{ debugName: "maxSize" }] : []));
|
|
11
|
+
size = linkedSignal(() => this.defaultSize(), ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
12
|
+
class = computed(() => cn('overflow-hidden', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
13
|
+
minSizePx = computed(() => `${this.minSize()}%`, ...(ngDevMode ? [{ debugName: "minSizePx" }] : []));
|
|
14
|
+
maxSizePx = computed(() => `${this.maxSize()}%`, ...(ngDevMode ? [{ debugName: "maxSizePx" }] : []));
|
|
15
|
+
setSize(newSize) {
|
|
16
|
+
const clamped = Math.max(this.minSize(), Math.min(this.maxSize(), newSize));
|
|
17
|
+
this.size.set(clamped);
|
|
18
|
+
}
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizablePanel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScResizablePanel, isStandalone: true, selector: "[scResizablePanel]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, defaultSize: { classPropertyName: "defaultSize", publicName: "defaultSize", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "resizable-panel" }, properties: { "class": "class()", "style.flex-grow": "size()", "style.flex-shrink": "1", "style.flex-basis": "\"0%\"", "style.min-width": "group.direction() === \"horizontal\" ? minSizePx() : undefined", "style.min-height": "group.direction() === \"vertical\" ? minSizePx() : undefined", "style.max-width": "group.direction() === \"horizontal\" ? maxSizePx() : undefined", "style.max-height": "group.direction() === \"vertical\" ? maxSizePx() : undefined" } }, ngImport: i0 });
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScResizablePanel, decorators: [{
|
|
23
|
+
type: Directive,
|
|
24
|
+
args: [{
|
|
25
|
+
selector: '[scResizablePanel]',
|
|
26
|
+
host: {
|
|
27
|
+
'data-slot': 'resizable-panel',
|
|
28
|
+
'[class]': 'class()',
|
|
29
|
+
'[style.flex-grow]': 'size()',
|
|
30
|
+
'[style.flex-shrink]': '1',
|
|
31
|
+
'[style.flex-basis]': '"0%"',
|
|
32
|
+
'[style.min-width]': 'group.direction() === "horizontal" ? minSizePx() : undefined',
|
|
33
|
+
'[style.min-height]': 'group.direction() === "vertical" ? minSizePx() : undefined',
|
|
34
|
+
'[style.max-width]': 'group.direction() === "horizontal" ? maxSizePx() : undefined',
|
|
35
|
+
'[style.max-height]': 'group.direction() === "vertical" ? maxSizePx() : undefined',
|
|
36
|
+
},
|
|
37
|
+
}]
|
|
38
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], defaultSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSize", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }] } });
|
|
39
|
+
//# sourceMappingURL=resizable-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-panel.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/resizable-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,EACL,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;;AAoBhE,MAAM,OAAO,gBAAgB;IAClB,KAAK,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAEtC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IACnD,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC,CAAC;IAChC,OAAO,GAAG,KAAK,CAAS,CAAC,mDAAC,CAAC;IAC3B,OAAO,GAAG,KAAK,CAAS,GAAG,mDAAC,CAAC;IAE7B,IAAI,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,gDAAC,CAAC;IAEpC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,iBAAiB,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACzC,CAAC;IAEiB,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,qDAAC,CAAC;IACjD,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,qDAAC,CAAC;IAEpE,OAAO,CAAC,OAAe;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;uGApBU,gBAAgB;2FAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAlB5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,IAAI,EAAE;wBACJ,WAAW,EAAE,iBAAiB;wBAC9B,SAAS,EAAE,SAAS;wBACpB,mBAAmB,EAAE,QAAQ;wBAC7B,qBAAqB,EAAE,GAAG;wBAC1B,oBAAoB,EAAE,MAAM;wBAC5B,mBAAmB,EACjB,8DAA8D;wBAChE,oBAAoB,EAClB,4DAA4D;wBAC9D,mBAAmB,EACjB,8DAA8D;wBAChE,oBAAoB,EAClB,4DAA4D;qBAC/D;iBACF","sourcesContent":["import {\n computed,\n Directive,\n inject,\n input,\n linkedSignal,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScResizablePanelGroup } from './resizable-panel-group';\n\n@Directive({\n selector: '[scResizablePanel]',\n host: {\n 'data-slot': 'resizable-panel',\n '[class]': 'class()',\n '[style.flex-grow]': 'size()',\n '[style.flex-shrink]': '1',\n '[style.flex-basis]': '\"0%\"',\n '[style.min-width]':\n 'group.direction() === \"horizontal\" ? minSizePx() : undefined',\n '[style.min-height]':\n 'group.direction() === \"vertical\" ? minSizePx() : undefined',\n '[style.max-width]':\n 'group.direction() === \"horizontal\" ? maxSizePx() : undefined',\n '[style.max-height]':\n 'group.direction() === \"vertical\" ? maxSizePx() : undefined',\n },\n})\nexport class ScResizablePanel {\n readonly group = inject(ScResizablePanelGroup);\n\n readonly classInput = input<string>('', { alias: 'class' });\n readonly defaultSize = input<number>(50);\n readonly minSize = input<number>(0);\n readonly maxSize = input<number>(100);\n\n readonly size = linkedSignal(() => this.defaultSize());\n\n protected readonly class = computed(() =>\n cn('overflow-hidden', this.classInput()),\n );\n\n protected readonly minSizePx = computed(() => `${this.minSize()}%`);\n protected readonly maxSizePx = computed(() => `${this.maxSize()}%`);\n\n setSize(newSize: number): void {\n const clamped = Math.max(this.minSize(), Math.min(this.maxSize(), newSize));\n this.size.set(clamped);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=resizable.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.types.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/resizable/resizable.types.ts"],"names":[],"mappings":"","sourcesContent":["export type ScResizableDirection = 'horizontal' | 'vertical';\n"]}
|
|
@@ -4,12 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScScrollArea {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('overflow-auto', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
8
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScScrollArea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScScrollArea, isStandalone: true, selector: "div[scScrollArea]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "scroll-area" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
9
9
|
<ng-content />
|
|
10
10
|
`, isInline: true, styles: ["[data-slot=scroll-area]{scrollbar-width:thin;scrollbar-color:transparent transparent}[data-slot=scroll-area]:hover{scrollbar-color:var(--color-border) transparent}[data-slot=scroll-area]::-webkit-scrollbar{width:8px;height:8px}[data-slot=scroll-area]::-webkit-scrollbar-thumb{background-color:transparent;border-radius:9999px}[data-slot=scroll-area]:hover::-webkit-scrollbar-thumb{background-color:var(--color-border)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScScrollArea, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{ selector: 'div[scScrollArea]', host: {
|
|
15
15
|
'data-slot': 'scroll-area',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ScSelect } from './select';
|
|
2
2
|
export { ScSelectItemIcon } from './select-item-icon';
|
|
3
3
|
export { ScSelectTrigger } from './select-trigger';
|
|
4
|
-
export {
|
|
4
|
+
export { ScSelectLabel } from './select-label';
|
|
5
5
|
export { ScSelectPortal } from './select-portal';
|
|
6
6
|
export { ScSelectPopup } from './select-popup';
|
|
7
7
|
export { ScSelectList } from './select-list';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { ScSelect } from './select';\nexport { ScSelectItemIcon } from './select-item-icon';\nexport { ScSelectTrigger } from './select-trigger';\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { ScSelect } from './select';\nexport { ScSelectItemIcon } from './select-item-icon';\nexport { ScSelectTrigger } from './select-trigger';\nexport { ScSelectLabel } from './select-label';\nexport { ScSelectPortal } from './select-portal';\nexport { ScSelectPopup } from './select-popup';\nexport { ScSelectList } from './select-list';\nexport { ScSelectItem } from './select-item';\nexport { ScSelectGroup } from './select-group';\nexport { ScSelectGroupLabel } from './select-group-label';\nexport { ScSelectSeparator } from './select-separator';\n"]}
|
|
@@ -4,12 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScSelectGroupLabel {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('text-muted-foreground px-2 py-1.5 text-xs font-medium', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
8
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectGroupLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectGroupLabel, isStandalone: true, selector: "div[scSelectGroupLabel]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-group-label" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
9
9
|
<ng-content />
|
|
10
10
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectGroupLabel, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'div[scSelectGroupLabel]',
|
|
@@ -4,12 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScSelectGroup {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('flex flex-col', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
8
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectGroup, isStandalone: true, selector: "div[scSelectGroup]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-group" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
9
9
|
<ng-content />
|
|
10
10
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectGroup, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'div[scSelectGroup]',
|
|
@@ -6,10 +6,10 @@ import * as i1 from "@angular/aria/combobox";
|
|
|
6
6
|
export class ScSelectInput {
|
|
7
7
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
8
|
class = computed(() => cn('absolute inset-0 h-full w-full cursor-pointer border-none bg-transparent opacity-0 outline-none', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
9
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
10
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectInput, isStandalone: true, selector: "input[scSelectInput]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-input" }, properties: { "class": "class()" } }, hostDirectives: [{ directive: i1.ComboboxInput }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectInput, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'input[scSelectInput]',
|
|
@@ -4,10 +4,10 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScSelectItemIcon {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('text-muted-foreground size-4 shrink-0', 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: ScSelectItemIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectItemIcon, isStandalone: true, selector: "svg[scSelectItemIcon]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-item-icon", "aria-hidden": "true" }, 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: ScSelectItemIcon, decorators: [{
|
|
11
11
|
type: Directive,
|
|
12
12
|
args: [{
|
|
13
13
|
selector: 'svg[scSelectItemIcon]',
|
|
@@ -4,10 +4,10 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class ScSelectItemIndicator {
|
|
5
5
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
6
|
class = computed(() => cn('pointer-events-none absolute right-2 flex size-4 items-center justify-center opacity-0 [[aria-selected=true]>&]:opacity-100', 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: ScSelectItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectItemIndicator, isStandalone: true, selector: "svg[scSelectItemIndicator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-item-indicator" }, 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: ScSelectItemIndicator, decorators: [{
|
|
11
11
|
type: Directive,
|
|
12
12
|
args: [{
|
|
13
13
|
selector: 'svg[scSelectItemIndicator]',
|
|
@@ -9,6 +9,8 @@ export class ScSelectItem {
|
|
|
9
9
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
10
10
|
option = inject(Option);
|
|
11
11
|
elementRef = inject(ElementRef);
|
|
12
|
+
itemValue = computed(() => this.option.value(), ...(ngDevMode ? [{ debugName: "itemValue" }] : []));
|
|
13
|
+
itemLabel = computed(() => this.option.label() || '', ...(ngDevMode ? [{ debugName: "itemLabel" }] : []));
|
|
12
14
|
constructor() {
|
|
13
15
|
effect(() => {
|
|
14
16
|
if (this.option.active()) {
|
|
@@ -17,13 +19,13 @@ export class ScSelectItem {
|
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
class = computed(() => cn('relative flex w-full cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden', 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground', 'aria-selected:bg-accent/50 aria-selected:text-accent-foreground', 'data-disabled:pointer-events-none data-disabled:opacity-50', '[&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
20
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
21
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectItem, isStandalone: true, selector: "div[scSelectItem]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-item" }, properties: { "class": "class()" } }, hostDirectives: [{ directive: i1.Option, inputs: ["value", "value", "label", "label"] }], ngImport: i0, template: `
|
|
22
24
|
<ng-content />
|
|
23
25
|
<svg scSelectItemIndicator siCheckIcon aria-hidden="true"></svg>
|
|
24
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: ScSelectItemIndicator, selector: "svg[scSelectItemIndicator]", inputs: ["class"] }, { kind: "component", type: SiCheckIcon, selector: "svg[siCheckIcon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
26
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: ScSelectItemIndicator, selector: "svg[scSelectItemIndicator]", inputs: ["class"] }, { kind: "component", type: SiCheckIcon, selector: "svg[siCheckIcon]", inputs: ["ariaHidden", "width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
25
27
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectItem, decorators: [{
|
|
27
29
|
type: Component,
|
|
28
30
|
args: [{
|
|
29
31
|
selector: 'div[scSelectItem]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-item.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;;;AAsBhE,MAAM,OAAO,YAAY;IACd,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE3C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"select-item.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;;;AAsBhE,MAAM,OAAO,YAAY;IACd,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE3C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IAEjE,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,qDAAC,CAAC;IAChD,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,qDAAC,CAAC;IAE/D;QACE,MAAM,CAAC,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;gBACzB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEkB,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,yHAAyH,EACzH,wEAAwE,EACxE,iEAAiE,EACjE,4DAA4D,EAC5D,iFAAiF,EACjF,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGA1BS,YAAY;2FAAZ,YAAY,+YAjBb;;;GAGT,4DAJS,qBAAqB,0FAAE,WAAW;;2FAkBjC,YAAY;kBApBxB,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,CAAC,qBAAqB,EAAE,WAAW,CAAC;oBAC7C,QAAQ,EAAE;;;GAGT;oBACD,cAAc,EAAE;wBACd;4BACE,SAAS,EAAE,MAAM;4BACjB,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;yBAC3B;qBACF;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,aAAa;wBAC1B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { Option } from '@angular/aria/listbox';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SiCheckIcon } from '@semantic-icons/lucide-icons';\nimport { cn } from '../../utils';\n\nimport { ScSelectItemIndicator } from './select-item-indicator';\n\n@Component({\n selector: 'div[scSelectItem]',\n imports: [ScSelectItemIndicator, SiCheckIcon],\n template: `\n <ng-content />\n <svg scSelectItemIndicator siCheckIcon aria-hidden=\"true\"></svg>\n `,\n hostDirectives: [\n {\n directive: Option,\n inputs: ['value', 'label'],\n },\n ],\n host: {\n 'data-slot': 'select-item',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectItem {\n readonly classInput = input<string>('', { alias: 'class' });\n\n private readonly option = inject(Option);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly itemValue = computed(() => this.option.value());\n readonly itemLabel = computed(() => this.option.label() || '');\n\n constructor() {\n effect(() => {\n if (this.option.active()) {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n });\n }\n\n protected readonly class = computed(() =>\n cn(\n 'relative flex w-full cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden',\n 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground',\n 'aria-selected:bg-accent/50 aria-selected:text-accent-foreground',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n '[&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n this.classInput(),\n ),\n );\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScSelect } from './select';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class ScSelectLabel {
|
|
6
|
+
select = inject(ScSelect);
|
|
7
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
|
+
class = computed(() => cn('truncate pointer-events-none', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ScSelectLabel, isStandalone: true, selector: "span[scSelectLabel], div[scSelectLabel]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-label" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
11
|
+
{{ select.label() }}
|
|
12
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ScSelectLabel, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{
|
|
17
|
+
selector: 'span[scSelectLabel], div[scSelectLabel]',
|
|
18
|
+
template: `
|
|
19
|
+
{{ select.label() }}
|
|
20
|
+
`,
|
|
21
|
+
host: {
|
|
22
|
+
'data-slot': 'select-label',
|
|
23
|
+
'[class]': 'class()',
|
|
24
|
+
},
|
|
25
|
+
encapsulation: ViewEncapsulation.None,
|
|
26
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
}]
|
|
28
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
29
|
+
//# sourceMappingURL=select-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-label.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-label.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;AAcpC,MAAM,OAAO,aAAa;IACL,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEpC,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;uGAPS,aAAa;2FAAb,aAAa,4UAVd;;GAET;;2FAQU,aAAa;kBAZzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,yCAAyC;oBACnD,QAAQ,EAAE;;GAET;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,cAAc;wBAC3B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScSelect } from './select';\n\n@Component({\n selector: 'span[scSelectLabel], div[scSelectLabel]',\n template: `\n {{ select.label() }}\n `,\n host: {\n 'data-slot': 'select-label',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectLabel {\n protected readonly select = inject(ScSelect);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('truncate pointer-events-none', this.classInput()),\n );\n}\n"]}
|