@winkintel/bootstrap-svelte 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +202 -0
- package/README.md +221 -0
- package/dist/Accordion/accordion-body.svelte +8 -0
- package/dist/Accordion/accordion-body.svelte.d.ts +4 -0
- package/dist/Accordion/accordion-button.svelte +25 -0
- package/dist/Accordion/accordion-button.svelte.d.ts +4 -0
- package/dist/Accordion/accordion-collapse.svelte +18 -0
- package/dist/Accordion/accordion-collapse.svelte.d.ts +4 -0
- package/dist/Accordion/accordion-header.svelte +8 -0
- package/dist/Accordion/accordion-header.svelte.d.ts +4 -0
- package/dist/Accordion/accordion-item.svelte +33 -0
- package/dist/Accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/Accordion/accordion.svelte +65 -0
- package/dist/Accordion/accordion.svelte.d.ts +51 -0
- package/dist/Accordion/accordion.svelte.js +139 -0
- package/dist/Accordion/composition.d.ts +7 -0
- package/dist/Accordion/composition.js +6 -0
- package/dist/Accordion/index.d.ts +1 -0
- package/dist/Accordion/index.js +1 -0
- package/dist/Accordion/types.d.ts +15 -0
- package/dist/Accordion/types.js +1 -0
- package/dist/Alert/alert.svelte +73 -0
- package/dist/Alert/alert.svelte.d.ts +46 -0
- package/dist/Alert/index.d.ts +2 -0
- package/dist/Alert/index.js +2 -0
- package/dist/Alert/types.d.ts +11 -0
- package/dist/Alert/types.js +1 -0
- package/dist/Badge/badge.svelte +42 -0
- package/dist/Badge/badge.svelte.d.ts +36 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Badge/types.d.ts +28 -0
- package/dist/Badge/types.js +24 -0
- package/dist/Breadcrumb/breadcrumb-item.svelte +66 -0
- package/dist/Breadcrumb/breadcrumb-item.svelte.d.ts +30 -0
- package/dist/Breadcrumb/breadcrumb.svelte +57 -0
- package/dist/Breadcrumb/breadcrumb.svelte.d.ts +34 -0
- package/dist/Breadcrumb/breadcrumb.svelte.js +41 -0
- package/dist/Breadcrumb/composition.d.ts +3 -0
- package/dist/Breadcrumb/composition.js +2 -0
- package/dist/Breadcrumb/index.d.ts +1 -0
- package/dist/Breadcrumb/index.js +1 -0
- package/dist/Breadcrumb/types.d.ts +9 -0
- package/dist/Breadcrumb/types.js +1 -0
- package/dist/BreakpointListener/breakpoint-listener.svelte +54 -0
- package/dist/BreakpointListener/breakpoint-listener.svelte.d.ts +4 -0
- package/dist/BreakpointListener/index.d.ts +2 -0
- package/dist/BreakpointListener/index.js +2 -0
- package/dist/BreakpointListener/types.d.ts +30 -0
- package/dist/BreakpointListener/types.js +20 -0
- package/dist/Button/button.svelte +87 -0
- package/dist/Button/button.svelte.d.ts +59 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Button/index.js +2 -0
- package/dist/Button/types.d.ts +26 -0
- package/dist/Button/types.js +1 -0
- package/dist/ButtonGroup/button-check.svelte +70 -0
- package/dist/ButtonGroup/button-check.svelte.d.ts +35 -0
- package/dist/ButtonGroup/button-group.svelte +51 -0
- package/dist/ButtonGroup/button-group.svelte.d.ts +43 -0
- package/dist/ButtonGroup/button-toolbar.svelte +36 -0
- package/dist/ButtonGroup/button-toolbar.svelte.d.ts +28 -0
- package/dist/ButtonGroup/index.d.ts +4 -0
- package/dist/ButtonGroup/index.js +4 -0
- package/dist/ButtonGroup/types.d.ts +21 -0
- package/dist/ButtonGroup/types.js +1 -0
- package/dist/Card/card-body.svelte +10 -0
- package/dist/Card/card-body.svelte.d.ts +3 -0
- package/dist/Card/card-footer.svelte +10 -0
- package/dist/Card/card-footer.svelte.d.ts +3 -0
- package/dist/Card/card-group.svelte +10 -0
- package/dist/Card/card-group.svelte.d.ts +3 -0
- package/dist/Card/card-header.svelte +10 -0
- package/dist/Card/card-header.svelte.d.ts +3 -0
- package/dist/Card/card-img-overlay.svelte +10 -0
- package/dist/Card/card-img-overlay.svelte.d.ts +3 -0
- package/dist/Card/card-img.svelte +12 -0
- package/dist/Card/card-img.svelte.d.ts +4 -0
- package/dist/Card/card-link.svelte +10 -0
- package/dist/Card/card-link.svelte.d.ts +4 -0
- package/dist/Card/card-subtitle.svelte +11 -0
- package/dist/Card/card-subtitle.svelte.d.ts +4 -0
- package/dist/Card/card-text.svelte +10 -0
- package/dist/Card/card-text.svelte.d.ts +3 -0
- package/dist/Card/card-title.svelte +11 -0
- package/dist/Card/card-title.svelte.d.ts +4 -0
- package/dist/Card/card.svelte +45 -0
- package/dist/Card/card.svelte.d.ts +38 -0
- package/dist/Card/composition.d.ts +12 -0
- package/dist/Card/composition.js +11 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Card/index.js +1 -0
- package/dist/Card/types.d.ts +22 -0
- package/dist/Card/types.js +1 -0
- package/dist/Carousel/carousel-caption.svelte +30 -0
- package/dist/Carousel/carousel-caption.svelte.d.ts +22 -0
- package/dist/Carousel/carousel-control-next.svelte +35 -0
- package/dist/Carousel/carousel-control-next.svelte.d.ts +21 -0
- package/dist/Carousel/carousel-control-prev.svelte +35 -0
- package/dist/Carousel/carousel-control-prev.svelte.d.ts +21 -0
- package/dist/Carousel/carousel-indicator-button.svelte +41 -0
- package/dist/Carousel/carousel-indicator-button.svelte.d.ts +21 -0
- package/dist/Carousel/carousel-indicators.svelte +33 -0
- package/dist/Carousel/carousel-indicators.svelte.d.ts +25 -0
- package/dist/Carousel/carousel-inner.svelte +30 -0
- package/dist/Carousel/carousel-inner.svelte.d.ts +22 -0
- package/dist/Carousel/carousel-item.svelte +138 -0
- package/dist/Carousel/carousel-item.svelte.d.ts +28 -0
- package/dist/Carousel/carousel.svelte +140 -0
- package/dist/Carousel/carousel.svelte.d.ts +46 -0
- package/dist/Carousel/carousel.svelte.js +551 -0
- package/dist/Carousel/composition.d.ts +9 -0
- package/dist/Carousel/composition.js +8 -0
- package/dist/Carousel/index.d.ts +1 -0
- package/dist/Carousel/index.js +1 -0
- package/dist/Carousel/types.d.ts +74 -0
- package/dist/Carousel/types.js +1 -0
- package/dist/CloseButton/close-button.svelte +32 -0
- package/dist/CloseButton/close-button.svelte.d.ts +29 -0
- package/dist/CloseButton/index.d.ts +2 -0
- package/dist/CloseButton/index.js +2 -0
- package/dist/CloseButton/types.d.ts +6 -0
- package/dist/CloseButton/types.js +1 -0
- package/dist/Col/col.svelte +133 -0
- package/dist/Col/col.svelte.d.ts +60 -0
- package/dist/Col/index.d.ts +2 -0
- package/dist/Col/index.js +2 -0
- package/dist/Col/types.d.ts +30 -0
- package/dist/Col/types.js +1 -0
- package/dist/Collapse/collapse-aria-attachment.svelte.d.ts +3 -0
- package/dist/Collapse/collapse-aria-attachment.svelte.js +32 -0
- package/dist/Collapse/collapse.svelte +63 -0
- package/dist/Collapse/collapse.svelte.d.ts +45 -0
- package/dist/Collapse/index.d.ts +3 -0
- package/dist/Collapse/index.js +3 -0
- package/dist/Collapse/transition.d.ts +5 -0
- package/dist/Collapse/transition.js +75 -0
- package/dist/Collapse/types.d.ts +18 -0
- package/dist/Collapse/types.js +1 -0
- package/dist/Container/container.svelte +46 -0
- package/dist/Container/container.svelte.d.ts +36 -0
- package/dist/Container/index.d.ts +2 -0
- package/dist/Container/index.js +2 -0
- package/dist/Container/types.d.ts +8 -0
- package/dist/Container/types.js +1 -0
- package/dist/Dropdown/composition.d.ts +8 -0
- package/dist/Dropdown/composition.js +7 -0
- package/dist/Dropdown/dropdown-divider.svelte +23 -0
- package/dist/Dropdown/dropdown-divider.svelte.d.ts +18 -0
- package/dist/Dropdown/dropdown-header.svelte +27 -0
- package/dist/Dropdown/dropdown-header.svelte.d.ts +19 -0
- package/dist/Dropdown/dropdown-item-text.svelte +26 -0
- package/dist/Dropdown/dropdown-item-text.svelte.d.ts +18 -0
- package/dist/Dropdown/dropdown-item.svelte +86 -0
- package/dist/Dropdown/dropdown-item.svelte.d.ts +24 -0
- package/dist/Dropdown/dropdown-menu.svelte +82 -0
- package/dist/Dropdown/dropdown-menu.svelte.d.ts +27 -0
- package/dist/Dropdown/dropdown-toggle.svelte +67 -0
- package/dist/Dropdown/dropdown-toggle.svelte.d.ts +24 -0
- package/dist/Dropdown/dropdown.svelte +106 -0
- package/dist/Dropdown/dropdown.svelte.d.ts +34 -0
- package/dist/Dropdown/dropdown.svelte.js +435 -0
- package/dist/Dropdown/index.d.ts +1 -0
- package/dist/Dropdown/index.js +1 -0
- package/dist/Dropdown/types.d.ts +47 -0
- package/dist/Dropdown/types.js +1 -0
- package/dist/Form/composition.d.ts +34 -0
- package/dist/Form/composition.js +33 -0
- package/dist/Form/form-check-input.svelte +92 -0
- package/dist/Form/form-check-input.svelte.d.ts +48 -0
- package/dist/Form/form-check-label.svelte +26 -0
- package/dist/Form/form-check-label.svelte.d.ts +21 -0
- package/dist/Form/form-check.svelte +55 -0
- package/dist/Form/form-check.svelte.d.ts +50 -0
- package/dist/Form/form-color-input.svelte +54 -0
- package/dist/Form/form-color-input.svelte.d.ts +30 -0
- package/dist/Form/form-date-input.svelte +64 -0
- package/dist/Form/form-date-input.svelte.d.ts +46 -0
- package/dist/Form/form-datetime-local-input.svelte +60 -0
- package/dist/Form/form-datetime-local-input.svelte.d.ts +45 -0
- package/dist/Form/form-email-input.svelte +64 -0
- package/dist/Form/form-email-input.svelte.d.ts +46 -0
- package/dist/Form/form-feedback.svelte +36 -0
- package/dist/Form/form-feedback.svelte.d.ts +26 -0
- package/dist/Form/form-file-input.svelte +43 -0
- package/dist/Form/form-file-input.svelte.d.ts +30 -0
- package/dist/Form/form-floating.svelte +44 -0
- package/dist/Form/form-floating.svelte.d.ts +38 -0
- package/dist/Form/form-helper-text.svelte +35 -0
- package/dist/Form/form-helper-text.svelte.d.ts +29 -0
- package/dist/Form/form-hidden-input.svelte +18 -0
- package/dist/Form/form-hidden-input.svelte.d.ts +16 -0
- package/dist/Form/form-image-input.svelte +30 -0
- package/dist/Form/form-image-input.svelte.d.ts +26 -0
- package/dist/Form/form-input-group-text.svelte +47 -0
- package/dist/Form/form-input-group-text.svelte.d.ts +42 -0
- package/dist/Form/form-input-group.svelte +52 -0
- package/dist/Form/form-input-group.svelte.d.ts +43 -0
- package/dist/Form/form-input-label.svelte +33 -0
- package/dist/Form/form-input-label.svelte.d.ts +28 -0
- package/dist/Form/form-month-input.svelte +63 -0
- package/dist/Form/form-month-input.svelte.d.ts +48 -0
- package/dist/Form/form-number-input.svelte +62 -0
- package/dist/Form/form-number-input.svelte.d.ts +47 -0
- package/dist/Form/form-password-input.svelte +60 -0
- package/dist/Form/form-password-input.svelte.d.ts +41 -0
- package/dist/Form/form-radio-input.svelte +47 -0
- package/dist/Form/form-radio-input.svelte.d.ts +41 -0
- package/dist/Form/form-radio-label.svelte +41 -0
- package/dist/Form/form-radio-label.svelte.d.ts +35 -0
- package/dist/Form/form-range-input.svelte +43 -0
- package/dist/Form/form-range-input.svelte.d.ts +39 -0
- package/dist/Form/form-search-input.svelte +63 -0
- package/dist/Form/form-search-input.svelte.d.ts +45 -0
- package/dist/Form/form-select.svelte +85 -0
- package/dist/Form/form-select.svelte.d.ts +59 -0
- package/dist/Form/form-switch-input.svelte +54 -0
- package/dist/Form/form-switch-input.svelte.d.ts +41 -0
- package/dist/Form/form-switch-label.svelte +25 -0
- package/dist/Form/form-switch-label.svelte.d.ts +19 -0
- package/dist/Form/form-telephone-input.svelte +129 -0
- package/dist/Form/form-telephone-input.svelte.d.ts +55 -0
- package/dist/Form/form-text-area.svelte +57 -0
- package/dist/Form/form-text-area.svelte.d.ts +38 -0
- package/dist/Form/form-text-input.svelte +55 -0
- package/dist/Form/form-text-input.svelte.d.ts +37 -0
- package/dist/Form/form-time-input.svelte +62 -0
- package/dist/Form/form-time-input.svelte.d.ts +47 -0
- package/dist/Form/form-url-input.svelte +60 -0
- package/dist/Form/form-url-input.svelte.d.ts +45 -0
- package/dist/Form/form-week-Input.svelte +62 -0
- package/dist/Form/form-week-Input.svelte.d.ts +47 -0
- package/dist/Form/form.svelte +37 -0
- package/dist/Form/form.svelte.d.ts +23 -0
- package/dist/Form/index.d.ts +1 -0
- package/dist/Form/index.js +1 -0
- package/dist/Form/types.d.ts +168 -0
- package/dist/Form/types.js +1 -0
- package/dist/ListGroup/composition.d.ts +4 -0
- package/dist/ListGroup/composition.js +3 -0
- package/dist/ListGroup/index.d.ts +1 -0
- package/dist/ListGroup/index.js +1 -0
- package/dist/ListGroup/list-group-item-action.svelte +50 -0
- package/dist/ListGroup/list-group-item-action.svelte.d.ts +23 -0
- package/dist/ListGroup/list-group-item.svelte +58 -0
- package/dist/ListGroup/list-group-item.svelte.d.ts +51 -0
- package/dist/ListGroup/list-group.svelte +83 -0
- package/dist/ListGroup/list-group.svelte.d.ts +68 -0
- package/dist/ListGroup/types.d.ts +20 -0
- package/dist/ListGroup/types.js +1 -0
- package/dist/Modal/composition.d.ts +8 -0
- package/dist/Modal/composition.js +7 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.js +1 -0
- package/dist/Modal/modal-body.svelte +27 -0
- package/dist/Modal/modal-body.svelte.d.ts +19 -0
- package/dist/Modal/modal-content.svelte +35 -0
- package/dist/Modal/modal-content.svelte.d.ts +27 -0
- package/dist/Modal/modal-dialog.svelte +65 -0
- package/dist/Modal/modal-dialog.svelte.d.ts +52 -0
- package/dist/Modal/modal-footer.svelte +28 -0
- package/dist/Modal/modal-footer.svelte.d.ts +20 -0
- package/dist/Modal/modal-header.svelte +50 -0
- package/dist/Modal/modal-header.svelte.d.ts +29 -0
- package/dist/Modal/modal-title.svelte +45 -0
- package/dist/Modal/modal-title.svelte.d.ts +26 -0
- package/dist/Modal/modal.svelte +233 -0
- package/dist/Modal/modal.svelte.d.ts +52 -0
- package/dist/Modal/modal.svelte.js +86 -0
- package/dist/Modal/types.d.ts +31 -0
- package/dist/Modal/types.js +1 -0
- package/dist/Nav/composition.d.ts +4 -0
- package/dist/Nav/composition.js +3 -0
- package/dist/Nav/index.d.ts +1 -0
- package/dist/Nav/index.js +1 -0
- package/dist/Nav/nav-item.svelte +25 -0
- package/dist/Nav/nav-item.svelte.d.ts +18 -0
- package/dist/Nav/nav-link.svelte +77 -0
- package/dist/Nav/nav-link.svelte.d.ts +22 -0
- package/dist/Nav/nav.svelte +93 -0
- package/dist/Nav/nav.svelte.d.ts +56 -0
- package/dist/Nav/types.d.ts +26 -0
- package/dist/Nav/types.js +1 -0
- package/dist/Navbar/composition.d.ts +8 -0
- package/dist/Navbar/composition.js +7 -0
- package/dist/Navbar/index.d.ts +1 -0
- package/dist/Navbar/index.js +1 -0
- package/dist/Navbar/navbar-brand.svelte +55 -0
- package/dist/Navbar/navbar-brand.svelte.d.ts +48 -0
- package/dist/Navbar/navbar-collapse.svelte +76 -0
- package/dist/Navbar/navbar-collapse.svelte.d.ts +55 -0
- package/dist/Navbar/navbar-nav.svelte +66 -0
- package/dist/Navbar/navbar-nav.svelte.d.ts +53 -0
- package/dist/Navbar/navbar-text.svelte +36 -0
- package/dist/Navbar/navbar-text.svelte.d.ts +28 -0
- package/dist/Navbar/navbar-toggler-icon.svelte +34 -0
- package/dist/Navbar/navbar-toggler-icon.svelte.d.ts +28 -0
- package/dist/Navbar/navbar-toggler.svelte +75 -0
- package/dist/Navbar/navbar-toggler.svelte.d.ts +48 -0
- package/dist/Navbar/navbar.svelte +116 -0
- package/dist/Navbar/navbar.svelte.d.ts +88 -0
- package/dist/Navbar/types.d.ts +23 -0
- package/dist/Navbar/types.js +1 -0
- package/dist/Offcanvas/composition.d.ts +5 -0
- package/dist/Offcanvas/composition.js +4 -0
- package/dist/Offcanvas/index.d.ts +1 -0
- package/dist/Offcanvas/index.js +1 -0
- package/dist/Offcanvas/offcanvas-body.svelte +25 -0
- package/dist/Offcanvas/offcanvas-body.svelte.d.ts +19 -0
- package/dist/Offcanvas/offcanvas-header.svelte +39 -0
- package/dist/Offcanvas/offcanvas-header.svelte.d.ts +20 -0
- package/dist/Offcanvas/offcanvas-title.svelte +31 -0
- package/dist/Offcanvas/offcanvas-title.svelte.d.ts +25 -0
- package/dist/Offcanvas/offcanvas.svelte +220 -0
- package/dist/Offcanvas/offcanvas.svelte.d.ts +61 -0
- package/dist/Offcanvas/types.d.ts +25 -0
- package/dist/Offcanvas/types.js +1 -0
- package/dist/Pagination/composition.d.ts +4 -0
- package/dist/Pagination/composition.js +3 -0
- package/dist/Pagination/index.d.ts +1 -0
- package/dist/Pagination/index.js +1 -0
- package/dist/Pagination/pagination-item.svelte +81 -0
- package/dist/Pagination/pagination-item.svelte.d.ts +35 -0
- package/dist/Pagination/pagination-link.svelte +45 -0
- package/dist/Pagination/pagination-link.svelte.d.ts +25 -0
- package/dist/Pagination/pagination.svelte +60 -0
- package/dist/Pagination/pagination.svelte.d.ts +37 -0
- package/dist/Pagination/pagination.svelte.js +117 -0
- package/dist/Pagination/types.d.ts +19 -0
- package/dist/Pagination/types.js +1 -0
- package/dist/Placeholder/composition.d.ts +3 -0
- package/dist/Placeholder/composition.js +2 -0
- package/dist/Placeholder/index.d.ts +1 -0
- package/dist/Placeholder/index.js +1 -0
- package/dist/Placeholder/placeholder-item.svelte +53 -0
- package/dist/Placeholder/placeholder-item.svelte.d.ts +48 -0
- package/dist/Placeholder/placeholder.svelte +37 -0
- package/dist/Placeholder/placeholder.svelte.d.ts +32 -0
- package/dist/Placeholder/types.d.ts +12 -0
- package/dist/Placeholder/types.js +1 -0
- package/dist/Popover/composition.d.ts +4 -0
- package/dist/Popover/composition.js +3 -0
- package/dist/Popover/index.d.ts +1 -0
- package/dist/Popover/index.js +1 -0
- package/dist/Popover/popover-body.svelte +10 -0
- package/dist/Popover/popover-body.svelte.d.ts +3 -0
- package/dist/Popover/popover-header.svelte +11 -0
- package/dist/Popover/popover-header.svelte.d.ts +4 -0
- package/dist/Popover/popover.svelte +74 -0
- package/dist/Popover/popover.svelte.d.ts +53 -0
- package/dist/Popover/types.d.ts +20 -0
- package/dist/Popover/types.js +1 -0
- package/dist/Portal/index.d.ts +2 -0
- package/dist/Portal/index.js +2 -0
- package/dist/Portal/portal-host.svelte +5 -0
- package/dist/Portal/portal-host.svelte.d.ts +7 -0
- package/dist/Portal/portal.svelte +69 -0
- package/dist/Portal/portal.svelte.d.ts +32 -0
- package/dist/Portal/types.d.ts +6 -0
- package/dist/Portal/types.js +1 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +3 -0
- package/dist/Progress/progress-bar.svelte +101 -0
- package/dist/Progress/progress-bar.svelte.d.ts +39 -0
- package/dist/Progress/progress-stacked.svelte +34 -0
- package/dist/Progress/progress-stacked.svelte.d.ts +24 -0
- package/dist/Progress/progress.svelte.d.ts +31 -0
- package/dist/Progress/progress.svelte.js +52 -0
- package/dist/Progress/types.d.ts +40 -0
- package/dist/Progress/types.js +1 -0
- package/dist/Row/index.d.ts +2 -0
- package/dist/Row/index.js +2 -0
- package/dist/Row/row.svelte +75 -0
- package/dist/Row/row.svelte.d.ts +46 -0
- package/dist/Row/types.d.ts +12 -0
- package/dist/Row/types.js +1 -0
- package/dist/Scrollspy/index.d.ts +2 -0
- package/dist/Scrollspy/index.js +2 -0
- package/dist/Scrollspy/scrollspy-attachment.svelte.d.ts +10 -0
- package/dist/Scrollspy/scrollspy-attachment.svelte.js +122 -0
- package/dist/Scrollspy/types.d.ts +9 -0
- package/dist/Scrollspy/types.js +1 -0
- package/dist/Spinner/index.d.ts +2 -0
- package/dist/Spinner/index.js +2 -0
- package/dist/Spinner/spinner.svelte +77 -0
- package/dist/Spinner/spinner.svelte.d.ts +70 -0
- package/dist/Spinner/types.d.ts +9 -0
- package/dist/Spinner/types.js +1 -0
- package/dist/Tab/composition.d.ts +5 -0
- package/dist/Tab/composition.js +4 -0
- package/dist/Tab/index.d.ts +1 -0
- package/dist/Tab/index.js +1 -0
- package/dist/Tab/tab-content.svelte +29 -0
- package/dist/Tab/tab-content.svelte.d.ts +23 -0
- package/dist/Tab/tab-nav-link.svelte +69 -0
- package/dist/Tab/tab-nav-link.svelte.d.ts +22 -0
- package/dist/Tab/tab-pane.svelte +72 -0
- package/dist/Tab/tab-pane.svelte.d.ts +26 -0
- package/dist/Tab/tab.svelte +63 -0
- package/dist/Tab/tab.svelte.d.ts +50 -0
- package/dist/Tab/types.d.ts +18 -0
- package/dist/Tab/types.js +1 -0
- package/dist/Table/composition.d.ts +9 -0
- package/dist/Table/composition.js +8 -0
- package/dist/Table/index.d.ts +1 -0
- package/dist/Table/index.js +1 -0
- package/dist/Table/table-body.svelte +30 -0
- package/dist/Table/table-body.svelte.d.ts +23 -0
- package/dist/Table/table-caption.svelte +20 -0
- package/dist/Table/table-caption.svelte.d.ts +15 -0
- package/dist/Table/table-data.svelte +30 -0
- package/dist/Table/table-data.svelte.d.ts +19 -0
- package/dist/Table/table-foot.svelte +31 -0
- package/dist/Table/table-foot.svelte.d.ts +24 -0
- package/dist/Table/table-head.svelte +31 -0
- package/dist/Table/table-head.svelte.d.ts +24 -0
- package/dist/Table/table-header.svelte +38 -0
- package/dist/Table/table-header.svelte.d.ts +17 -0
- package/dist/Table/table-row.svelte +34 -0
- package/dist/Table/table-row.svelte.d.ts +23 -0
- package/dist/Table/table.svelte +154 -0
- package/dist/Table/table.svelte.d.ts +98 -0
- package/dist/Table/table.svelte.js +92 -0
- package/dist/Table/types.d.ts +43 -0
- package/dist/Table/types.js +1 -0
- package/dist/Toast/composition.d.ts +5 -0
- package/dist/Toast/composition.js +4 -0
- package/dist/Toast/index.d.ts +1 -0
- package/dist/Toast/index.js +1 -0
- package/dist/Toast/toast-body.svelte +26 -0
- package/dist/Toast/toast-body.svelte.d.ts +18 -0
- package/dist/Toast/toast-container.svelte +44 -0
- package/dist/Toast/toast-container.svelte.d.ts +36 -0
- package/dist/Toast/toast-header.svelte +56 -0
- package/dist/Toast/toast-header.svelte.d.ts +36 -0
- package/dist/Toast/toast.svelte +112 -0
- package/dist/Toast/toast.svelte.d.ts +54 -0
- package/dist/Toast/toast.svelte.js +83 -0
- package/dist/Toast/types.d.ts +53 -0
- package/dist/Toast/types.js +19 -0
- package/dist/Tooltip/composition.d.ts +3 -0
- package/dist/Tooltip/composition.js +2 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/index.js +1 -0
- package/dist/Tooltip/tooltip-inner.svelte +10 -0
- package/dist/Tooltip/tooltip-inner.svelte.d.ts +4 -0
- package/dist/Tooltip/tooltip.svelte +213 -0
- package/dist/Tooltip/tooltip.svelte.d.ts +54 -0
- package/dist/Tooltip/types.d.ts +43 -0
- package/dist/Tooltip/types.js +1 -0
- package/dist/common/context.d.ts +47 -0
- package/dist/common/context.js +70 -0
- package/dist/common/css.d.ts +71 -0
- package/dist/common/css.js +133 -0
- package/dist/common/dom.d.ts +51 -0
- package/dist/common/dom.js +98 -0
- package/dist/common/index.d.ts +6 -0
- package/dist/common/index.js +5 -0
- package/dist/common/nav-tab.svelte.d.ts +88 -0
- package/dist/common/nav-tab.svelte.js +188 -0
- package/dist/common/navbar-offcanvas.svelte.d.ts +101 -0
- package/dist/common/navbar-offcanvas.svelte.js +228 -0
- package/dist/common/noop.d.ts +4 -0
- package/dist/common/noop.js +4 -0
- package/dist/common/scrollbar.d.ts +20 -0
- package/dist/common/scrollbar.js +53 -0
- package/dist/common/types.d.ts +143 -0
- package/dist/common/types.js +40 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/package.json +105 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Navbar, Offcanvas } from '../index.js';
|
|
2
|
+
import type { OffcanvasBackdrop, OffcanvasBreakpoint } from '../Offcanvas/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* NavbarRootState is the state of the Navbar component.
|
|
5
|
+
* It is used to manage the state of the Navbar and its children.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NavbarRootState {
|
|
8
|
+
#private;
|
|
9
|
+
readonly props: Navbar.RootProps;
|
|
10
|
+
ariaControls: string | undefined;
|
|
11
|
+
transitionDuration: number;
|
|
12
|
+
constructor(props: Navbar.RootProps);
|
|
13
|
+
get isExpanded(): boolean;
|
|
14
|
+
toggleIsExpanded(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* NavbarTogglerState is the state of the Navbar.Toggler component.
|
|
18
|
+
* It is used to manage the state of the Navbar.Toggler and its children.
|
|
19
|
+
*/
|
|
20
|
+
export declare class NavbarTogglerState {
|
|
21
|
+
readonly props: Navbar.TogglerProps;
|
|
22
|
+
readonly root: NavbarRootState;
|
|
23
|
+
isExpanded: boolean;
|
|
24
|
+
constructor(props: Navbar.TogglerProps, root: NavbarRootState);
|
|
25
|
+
onclick(): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* NavbarCollapseState is the state of the Navbar.Collapse component.
|
|
29
|
+
* It is used to manage the state of the Navbar.Collapse and its children.
|
|
30
|
+
*/
|
|
31
|
+
export declare class NavbarCollapseState {
|
|
32
|
+
readonly props: Navbar.CollapseProps;
|
|
33
|
+
readonly root: NavbarRootState;
|
|
34
|
+
isExpanded: boolean;
|
|
35
|
+
constructor(props: Navbar.CollapseProps, root: NavbarRootState);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* OffcanvasRootState is the state of the Offcanvas component.
|
|
39
|
+
* It is used to manage the state of the Offcanvas and its children.
|
|
40
|
+
*/
|
|
41
|
+
export declare class OffcanvasRootState {
|
|
42
|
+
#private;
|
|
43
|
+
readonly props: Offcanvas.RootProps;
|
|
44
|
+
readonly isMediaQueryMatched: boolean;
|
|
45
|
+
readonly transitionDuration: number;
|
|
46
|
+
constructor(props: Offcanvas.RootProps);
|
|
47
|
+
get isShown(): boolean;
|
|
48
|
+
get useBackdrop(): OffcanvasBackdrop;
|
|
49
|
+
set useBackdrop(value: OffcanvasBackdrop);
|
|
50
|
+
get showOnBreakpoint(): OffcanvasBreakpoint | undefined;
|
|
51
|
+
set showOnBreakpoint(value: OffcanvasBreakpoint | undefined);
|
|
52
|
+
get isBackdropShown(): boolean;
|
|
53
|
+
toggleIsShown(): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* OffcanvasHeaderState is the state of the Offcanvas.Header component.
|
|
57
|
+
* It is used to manage the state of the Offcanvas.Header and its children.
|
|
58
|
+
*/
|
|
59
|
+
export declare class OffcanvasHeaderState {
|
|
60
|
+
readonly props: Offcanvas.HeaderProps;
|
|
61
|
+
readonly root: OffcanvasRootState;
|
|
62
|
+
isShown: boolean;
|
|
63
|
+
isDismissible: boolean;
|
|
64
|
+
constructor(props: Offcanvas.HeaderProps, root: OffcanvasRootState);
|
|
65
|
+
onclick(): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new NavbarRootState and sets it in the NavbarRootContext.
|
|
69
|
+
* It should be called in the root Navbar component.
|
|
70
|
+
* @param props The props of the Navbar component.
|
|
71
|
+
* @returns The created NavbarRootState instance.
|
|
72
|
+
*/
|
|
73
|
+
export declare function initNavbarRootState(props: Navbar.RootProps): NavbarRootState;
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new NavbarItemState and sets it in the NavbarItemContext.
|
|
76
|
+
* It should be called in the NavbarItem component.
|
|
77
|
+
* @param props The props of the Navbar.Toggler component.
|
|
78
|
+
* @returns The created NavbarTogglerState instance.
|
|
79
|
+
*/
|
|
80
|
+
export declare function initNavbarTogglerState(props: Navbar.TogglerProps): NavbarTogglerState;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new NavbarCollapseState and sets it in the NavbarCollapseContext.
|
|
83
|
+
* It should be called in the Navbar.Collapse component.
|
|
84
|
+
* @param props The props of the Navbar.Collapse component.
|
|
85
|
+
* @returns The created NavbarCollapseState instance.
|
|
86
|
+
*/
|
|
87
|
+
export declare function initNavbarCollapseState(props: Navbar.CollapseProps): NavbarCollapseState;
|
|
88
|
+
/**
|
|
89
|
+
* Creates a new OffcanvasRootState and sets it in the OffcanvasRootContext.
|
|
90
|
+
* This is used to manage the state of the Offcanvas component and its children.
|
|
91
|
+
* @param props The props of the Offcanvas component.
|
|
92
|
+
* @returns The created OffcanvasRootState.
|
|
93
|
+
*/
|
|
94
|
+
export declare function initOffcanvasRootState(props: Offcanvas.RootProps): OffcanvasRootState;
|
|
95
|
+
/**
|
|
96
|
+
* Creates a new OffcanvasHeaderState and sets it in the OffcanvasHeaderContext.
|
|
97
|
+
* This is used to manage the state of the Offcanvas.Header component and its children.
|
|
98
|
+
* @param props The props of the Offcanvas.Header component.
|
|
99
|
+
* @returns The created OffcanvasHeaderState.
|
|
100
|
+
*/
|
|
101
|
+
export declare function initOffcanvasHeaderState(props: Offcanvas.HeaderProps): OffcanvasHeaderState;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Context } from './index.js';
|
|
2
|
+
import { BreakpointMinimumMediaQuery } from './types.js';
|
|
3
|
+
import { tick } from 'svelte';
|
|
4
|
+
import { MediaQuery } from 'svelte/reactivity';
|
|
5
|
+
/**
|
|
6
|
+
* NavbarRootState is the state of the Navbar component.
|
|
7
|
+
* It is used to manage the state of the Navbar and its children.
|
|
8
|
+
*/
|
|
9
|
+
export class NavbarRootState {
|
|
10
|
+
props;
|
|
11
|
+
// Private
|
|
12
|
+
#isExpanded = $state(false);
|
|
13
|
+
#expandOnBreakpoint = $state('xs');
|
|
14
|
+
#mediaQuery = $state(undefined);
|
|
15
|
+
// Public
|
|
16
|
+
ariaControls = $state(undefined);
|
|
17
|
+
transitionDuration = $state(0);
|
|
18
|
+
constructor(props) {
|
|
19
|
+
this.props = props;
|
|
20
|
+
this.toggleIsExpanded = this.toggleIsExpanded.bind(this);
|
|
21
|
+
this.#expandOnBreakpoint = this.props.expandOnBreakpoint || 'xs';
|
|
22
|
+
if (typeof window !== 'undefined' && this.#expandOnBreakpoint) {
|
|
23
|
+
const query = BreakpointMinimumMediaQuery[this.#expandOnBreakpoint];
|
|
24
|
+
this.#mediaQuery = new MediaQuery(query || '');
|
|
25
|
+
}
|
|
26
|
+
// Reset the explicit-expanded flag when we cross from inline mode
|
|
27
|
+
// (media query matched) back into collapsed/offcanvas mode. Without
|
|
28
|
+
// this, a previous toggle keeps the offcanvas appearing pre-opened on
|
|
29
|
+
// the next downward cross.
|
|
30
|
+
let previousMediaQueryMatched = undefined;
|
|
31
|
+
$effect(() => {
|
|
32
|
+
const matched = this.#mediaQuery?.current;
|
|
33
|
+
if (previousMediaQueryMatched === true && matched === false && this.#isExpanded) {
|
|
34
|
+
this.#isExpanded = false;
|
|
35
|
+
}
|
|
36
|
+
previousMediaQueryMatched = matched;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
get isExpanded() {
|
|
40
|
+
return this.#isExpanded || this.#mediaQuery?.current || false;
|
|
41
|
+
}
|
|
42
|
+
toggleIsExpanded() {
|
|
43
|
+
this.#isExpanded = !this.#isExpanded;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* NavbarTogglerState is the state of the Navbar.Toggler component.
|
|
48
|
+
* It is used to manage the state of the Navbar.Toggler and its children.
|
|
49
|
+
*/
|
|
50
|
+
export class NavbarTogglerState {
|
|
51
|
+
props;
|
|
52
|
+
root;
|
|
53
|
+
isExpanded = $derived.by(() => this.root.isExpanded);
|
|
54
|
+
constructor(props, root) {
|
|
55
|
+
this.props = props;
|
|
56
|
+
this.root = root;
|
|
57
|
+
this.onclick = this.onclick.bind(this);
|
|
58
|
+
}
|
|
59
|
+
onclick() {
|
|
60
|
+
// When the Navbar is collapsed, we need to set the `transitionDuration` prop to 350 before we toggle the collapse
|
|
61
|
+
// to ensure that the transition is smooth. Otherwise, the transition will be instant.
|
|
62
|
+
if (this.isExpanded === false) {
|
|
63
|
+
this.root.transitionDuration = 350;
|
|
64
|
+
// We need to allow the `transitionDuration` reactivity to be complete before we toggle the collapse...
|
|
65
|
+
tick().then(() => {
|
|
66
|
+
this.root.toggleIsExpanded();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.root.toggleIsExpanded();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* NavbarCollapseState is the state of the Navbar.Collapse component.
|
|
76
|
+
* It is used to manage the state of the Navbar.Collapse and its children.
|
|
77
|
+
*/
|
|
78
|
+
export class NavbarCollapseState {
|
|
79
|
+
props;
|
|
80
|
+
root;
|
|
81
|
+
isExpanded = $derived.by(() => this.root.isExpanded);
|
|
82
|
+
constructor(props, root) {
|
|
83
|
+
this.props = props;
|
|
84
|
+
this.root = root;
|
|
85
|
+
if (!this.props.id) {
|
|
86
|
+
console.warn('props.id is required for the Navbar.Collapse to set accessibility correctly');
|
|
87
|
+
}
|
|
88
|
+
this.root.ariaControls = this.props.id || undefined;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* OffcanvasRootState is the state of the Offcanvas component.
|
|
93
|
+
* It is used to manage the state of the Offcanvas and its children.
|
|
94
|
+
*/
|
|
95
|
+
export class OffcanvasRootState {
|
|
96
|
+
props;
|
|
97
|
+
// Private
|
|
98
|
+
#isShown = $state(false);
|
|
99
|
+
#useBackdrop = $state(true);
|
|
100
|
+
#mediaQuery = $state(undefined);
|
|
101
|
+
#showOnBreakpoint = $state(undefined);
|
|
102
|
+
#navbarRootState = $state(undefined);
|
|
103
|
+
// Public
|
|
104
|
+
isMediaQueryMatched = $derived(this.#mediaQuery?.current || false);
|
|
105
|
+
transitionDuration = $derived(this.#mediaQuery?.current ? 0 : 350);
|
|
106
|
+
constructor(props) {
|
|
107
|
+
this.props = props;
|
|
108
|
+
this.toggleIsShown = this.toggleIsShown.bind(this);
|
|
109
|
+
this.#isShown = this.props.isShown ?? false;
|
|
110
|
+
this.#useBackdrop = this.props.useBackdrop ?? true;
|
|
111
|
+
if (NavbarRootContext.exists()) {
|
|
112
|
+
this.#navbarRootState = NavbarRootContext.get();
|
|
113
|
+
this.showOnBreakpoint = this.#navbarRootState.props.expandOnBreakpoint;
|
|
114
|
+
$effect(() => {
|
|
115
|
+
if (this.#navbarRootState && this.#isShown !== this.#navbarRootState.isExpanded) {
|
|
116
|
+
const navbarIsExpanded = this.#navbarRootState.isExpanded;
|
|
117
|
+
// Because the transition is asynchronous, we need to wait for the next tick before toggling the state...
|
|
118
|
+
tick().then(() => {
|
|
119
|
+
this.#isShown = navbarIsExpanded;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.showOnBreakpoint = this.props.showOnBreakpoint;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
get isShown() {
|
|
129
|
+
return this.#isShown || this.#mediaQuery?.current || false;
|
|
130
|
+
}
|
|
131
|
+
get useBackdrop() {
|
|
132
|
+
return this.#useBackdrop;
|
|
133
|
+
}
|
|
134
|
+
set useBackdrop(value) {
|
|
135
|
+
this.#useBackdrop = value;
|
|
136
|
+
}
|
|
137
|
+
get showOnBreakpoint() {
|
|
138
|
+
return this.#showOnBreakpoint;
|
|
139
|
+
}
|
|
140
|
+
set showOnBreakpoint(value) {
|
|
141
|
+
this.#showOnBreakpoint = value;
|
|
142
|
+
if (typeof window !== 'undefined' && this.#showOnBreakpoint) {
|
|
143
|
+
const query = BreakpointMinimumMediaQuery[this.#showOnBreakpoint];
|
|
144
|
+
this.#mediaQuery = new MediaQuery(query || '');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
get isBackdropShown() {
|
|
148
|
+
return this.isShown && this.#useBackdrop && !this.isMediaQueryMatched;
|
|
149
|
+
}
|
|
150
|
+
toggleIsShown() {
|
|
151
|
+
if (this.#navbarRootState) {
|
|
152
|
+
this.#navbarRootState.toggleIsExpanded();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.#isShown = !this.#isShown;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* OffcanvasHeaderState is the state of the Offcanvas.Header component.
|
|
161
|
+
* It is used to manage the state of the Offcanvas.Header and its children.
|
|
162
|
+
*/
|
|
163
|
+
export class OffcanvasHeaderState {
|
|
164
|
+
props;
|
|
165
|
+
root;
|
|
166
|
+
isShown = $derived.by(() => this.root.isShown);
|
|
167
|
+
isDismissible = $state(false);
|
|
168
|
+
constructor(props, root) {
|
|
169
|
+
this.props = props;
|
|
170
|
+
this.root = root;
|
|
171
|
+
this.isDismissible = this.props.isDismissible ?? false;
|
|
172
|
+
}
|
|
173
|
+
onclick() {
|
|
174
|
+
this.root.toggleIsShown();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const NavbarRootContext = new Context('navbar-root');
|
|
178
|
+
const OffcanvasRootContext = new Context('offcanvas-root');
|
|
179
|
+
/**
|
|
180
|
+
* Creates a new NavbarRootState and sets it in the NavbarRootContext.
|
|
181
|
+
* It should be called in the root Navbar component.
|
|
182
|
+
* @param props The props of the Navbar component.
|
|
183
|
+
* @returns The created NavbarRootState instance.
|
|
184
|
+
*/
|
|
185
|
+
export function initNavbarRootState(props) {
|
|
186
|
+
const rootState = new NavbarRootState(props);
|
|
187
|
+
return NavbarRootContext.set(rootState);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Creates a new NavbarItemState and sets it in the NavbarItemContext.
|
|
191
|
+
* It should be called in the NavbarItem component.
|
|
192
|
+
* @param props The props of the Navbar.Toggler component.
|
|
193
|
+
* @returns The created NavbarTogglerState instance.
|
|
194
|
+
*/
|
|
195
|
+
export function initNavbarTogglerState(props) {
|
|
196
|
+
const rootState = NavbarRootContext.get();
|
|
197
|
+
return new NavbarTogglerState(props, rootState);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Creates a new NavbarCollapseState and sets it in the NavbarCollapseContext.
|
|
201
|
+
* It should be called in the Navbar.Collapse component.
|
|
202
|
+
* @param props The props of the Navbar.Collapse component.
|
|
203
|
+
* @returns The created NavbarCollapseState instance.
|
|
204
|
+
*/
|
|
205
|
+
export function initNavbarCollapseState(props) {
|
|
206
|
+
const rootState = NavbarRootContext.get();
|
|
207
|
+
return new NavbarCollapseState(props, rootState);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Creates a new OffcanvasRootState and sets it in the OffcanvasRootContext.
|
|
211
|
+
* This is used to manage the state of the Offcanvas component and its children.
|
|
212
|
+
* @param props The props of the Offcanvas component.
|
|
213
|
+
* @returns The created OffcanvasRootState.
|
|
214
|
+
*/
|
|
215
|
+
export function initOffcanvasRootState(props) {
|
|
216
|
+
const rootState = new OffcanvasRootState(props);
|
|
217
|
+
return OffcanvasRootContext.set(rootState);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Creates a new OffcanvasHeaderState and sets it in the OffcanvasHeaderContext.
|
|
221
|
+
* This is used to manage the state of the Offcanvas.Header component and its children.
|
|
222
|
+
* @param props The props of the Offcanvas.Header component.
|
|
223
|
+
* @returns The created OffcanvasHeaderState.
|
|
224
|
+
*/
|
|
225
|
+
export function initOffcanvasHeaderState(props) {
|
|
226
|
+
const rootState = OffcanvasRootContext.get();
|
|
227
|
+
return new OffcanvasHeaderState(props, rootState);
|
|
228
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the width of the browser's scrollbar
|
|
3
|
+
*
|
|
4
|
+
* @returns {number} The width of the scrollbar in pixels
|
|
5
|
+
*/
|
|
6
|
+
export declare const getScrollbarWidth: () => number;
|
|
7
|
+
/**
|
|
8
|
+
* Disables body scrolling by setting overflow to hidden and
|
|
9
|
+
* adjusting padding to prevent layout shift from scrollbar removal
|
|
10
|
+
*
|
|
11
|
+
* @param {HTMLElement} bodyElement - The body element to disable scrolling on
|
|
12
|
+
*/
|
|
13
|
+
export declare const disableBodyScrolling: (bodyElement: HTMLElement) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Restores body scrolling by resetting overflow and padding-right to their
|
|
16
|
+
* original values before scrolling was disabled
|
|
17
|
+
*
|
|
18
|
+
* @param {HTMLElement} bodyElement - The body element to restore scrolling on
|
|
19
|
+
*/
|
|
20
|
+
export declare const resetBodyScrolling: (bodyElement: HTMLElement) => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { hasAttribute, isRTL, setAttribute } from './dom.js';
|
|
2
|
+
const SCROLLBAR_INITIAL_OVERFLOW = 'data-scrollbar-initial-overflow-value';
|
|
3
|
+
const SCROLLBAR_INITIAL_PADDING = 'data-scrollbar-initial-padding-value';
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the width of the browser's scrollbar
|
|
6
|
+
*
|
|
7
|
+
* @returns {number} The width of the scrollbar in pixels
|
|
8
|
+
*/
|
|
9
|
+
export const getScrollbarWidth = () => {
|
|
10
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
11
|
+
return Math.abs(window.innerWidth - documentWidth);
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Disables body scrolling by setting overflow to hidden and
|
|
15
|
+
* adjusting padding to prevent layout shift from scrollbar removal
|
|
16
|
+
*
|
|
17
|
+
* @param {HTMLElement} bodyElement - The body element to disable scrolling on
|
|
18
|
+
*/
|
|
19
|
+
export const disableBodyScrolling = (bodyElement) => {
|
|
20
|
+
const paddingPropName = isRTL() ? 'padding-left' : 'padding-right';
|
|
21
|
+
const scrollbarWidth = getScrollbarWidth();
|
|
22
|
+
// Save initial style values as data attributes
|
|
23
|
+
const initialOverflow = bodyElement.style.getPropertyValue('overflow');
|
|
24
|
+
const initialPadding = bodyElement.style.getPropertyValue(paddingPropName);
|
|
25
|
+
setAttribute(bodyElement, SCROLLBAR_INITIAL_OVERFLOW, initialOverflow);
|
|
26
|
+
setAttribute(bodyElement, SCROLLBAR_INITIAL_PADDING, initialPadding);
|
|
27
|
+
// Set the overflow to hidden and add padding-right to prevent layout shift
|
|
28
|
+
const newPaddingRight = parseInt(initialPadding || '0', 10) + scrollbarWidth;
|
|
29
|
+
bodyElement.style.setProperty('overflow', 'hidden');
|
|
30
|
+
bodyElement.style.setProperty(paddingPropName, `${newPaddingRight}px`);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Restores body scrolling by resetting overflow and padding-right to their
|
|
34
|
+
* original values before scrolling was disabled
|
|
35
|
+
*
|
|
36
|
+
* @param {HTMLElement} bodyElement - The body element to restore scrolling on
|
|
37
|
+
*/
|
|
38
|
+
export const resetBodyScrolling = (bodyElement) => {
|
|
39
|
+
// Skip reset if data attributes aren't present (scrolling was never disabled)
|
|
40
|
+
if (!hasAttribute(bodyElement, SCROLLBAR_INITIAL_OVERFLOW) || !hasAttribute(bodyElement, SCROLLBAR_INITIAL_PADDING)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// Get the initial values from the data attributes
|
|
44
|
+
const initialOverflow = bodyElement.getAttribute(SCROLLBAR_INITIAL_OVERFLOW);
|
|
45
|
+
const initialPadding = bodyElement.getAttribute(SCROLLBAR_INITIAL_PADDING);
|
|
46
|
+
// Reset the overflow and padding-right values to their initial values
|
|
47
|
+
const paddingPropName = isRTL() ? 'padding-left' : 'padding-right';
|
|
48
|
+
bodyElement.style.setProperty('overflow', initialOverflow || '');
|
|
49
|
+
bodyElement.style.setProperty(paddingPropName, initialPadding || '');
|
|
50
|
+
// Remove the data attributes
|
|
51
|
+
bodyElement.removeAttribute(SCROLLBAR_INITIAL_OVERFLOW);
|
|
52
|
+
bodyElement.removeAttribute(SCROLLBAR_INITIAL_PADDING);
|
|
53
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLFormAttributes, HTMLImgAttributes, HTMLInputAttributes, HTMLLabelAttributes, HTMLLiAttributes, HTMLSelectAttributes, HTMLTableAttributes, HTMLTdAttributes, HTMLTextareaAttributes, HTMLThAttributes } from 'svelte/elements';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the background color variants available in Bootstrap 5.
|
|
4
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/utilities/background/#background-color
|
|
5
|
+
*/
|
|
6
|
+
export type BackgroundColorVariant = 'bg-primary' | 'bg-secondary' | 'bg-success' | 'bg-danger' | 'bg-warning' | 'bg-info' | 'bg-light' | 'bg-dark' | 'bg-body' | 'bg-body-secondary' | 'bg-body-tertiary' | 'bg-white' | 'bg-black' | 'bg-transparent';
|
|
7
|
+
/**
|
|
8
|
+
* Represents the subtle background color variants available in Bootstrap 5.
|
|
9
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/utilities/background/#background-color
|
|
10
|
+
*/
|
|
11
|
+
export type BackgroundSubtleColorVariant = 'bg-primary-subtle' | 'bg-secondary-subtle' | 'bg-success-subtle' | 'bg-danger-subtle' | 'bg-warning-subtle' | 'bg-info-subtle' | 'bg-light-subtle' | 'bg-dark-subtle';
|
|
12
|
+
/**
|
|
13
|
+
* Represents the theme colors available in Bootstrap 5.
|
|
14
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/customize/color/
|
|
15
|
+
*/
|
|
16
|
+
export type BaseColorVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
17
|
+
/**
|
|
18
|
+
* Represents the breakpoints available in Bootstrap 5.
|
|
19
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
20
|
+
*/
|
|
21
|
+
export type BaseBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
22
|
+
/**
|
|
23
|
+
* Represents the border color variants available in Bootstrap 5.
|
|
24
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/utilities/borders/#border-color
|
|
25
|
+
*/
|
|
26
|
+
export type BorderColorVariant = 'border-primary' | 'border-primary-subtle' | 'border-secondary' | 'border-secondary-subtle' | 'border-success' | 'border-success-subtle' | 'border-danger' | 'border-danger-subtle' | 'border-warning' | 'border-warning-subtle' | 'border-info' | 'border-info-subtle' | 'border-light' | 'border-light-subtle' | 'border-dark' | 'border-dark-subtle' | 'border-white' | 'border-black';
|
|
27
|
+
/**
|
|
28
|
+
* Represents the media queries available in Bootstrap 5.
|
|
29
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
30
|
+
* The reason for using *.98px is to ensure that the media query is inclusive of the breakpoint.
|
|
31
|
+
* See https://stackoverflow.com/a/54596322/22025584
|
|
32
|
+
*/
|
|
33
|
+
export declare const BreakpointBoxedMediaQuery: {
|
|
34
|
+
[index: string]: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Represents the media queries available in Bootstrap 5.
|
|
38
|
+
* Only the maximum media queries are used.
|
|
39
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
40
|
+
*/
|
|
41
|
+
export declare const BreakpointMaximumMediaQuery: {
|
|
42
|
+
[index: string]: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Represents the media queries available in Bootstrap 5.
|
|
46
|
+
* Only the minimum media queries are used.
|
|
47
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
48
|
+
*/
|
|
49
|
+
export declare const BreakpointMinimumMediaQuery: {
|
|
50
|
+
[index: string]: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Represents the row-col options for bootstrap grid system.
|
|
54
|
+
* Values should be numbers between 1 and 6.
|
|
55
|
+
*/
|
|
56
|
+
export type OneToSix = 1 | 2 | 3 | 4 | 5 | 6;
|
|
57
|
+
export type ZeroToFive = 0 | 1 | 2 | 3 | 4 | 5;
|
|
58
|
+
/**
|
|
59
|
+
* Represents the sizing options for bootstrap grid system.
|
|
60
|
+
* Values should be numbers between 1 and 12.
|
|
61
|
+
*/
|
|
62
|
+
export type OneToTwelve = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
63
|
+
export type ZeroToEleven = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
64
|
+
/**
|
|
65
|
+
* Represents the options for auto or asterisk in Bootstrap.
|
|
66
|
+
*/
|
|
67
|
+
export type AutoOrAsterisk = 'auto' | '*';
|
|
68
|
+
export type FirstOrLast = 'first' | 'last';
|
|
69
|
+
/**
|
|
70
|
+
* Represents the form control sizing options available in Bootstrap 5.
|
|
71
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/forms/form-control/#sizing
|
|
72
|
+
*/
|
|
73
|
+
export type FormControlSize = 'sm' | 'lg';
|
|
74
|
+
/**
|
|
75
|
+
* Represents the input group sizing options available in Bootstrap 5.
|
|
76
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/forms/input-group/#sizing
|
|
77
|
+
*/
|
|
78
|
+
export type FormInputGroupSize = 'sm' | 'lg';
|
|
79
|
+
/**
|
|
80
|
+
* Represents the levels of headings available in HTML's h1 to h6.
|
|
81
|
+
* See HTML documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
|
|
82
|
+
*/
|
|
83
|
+
export type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
|
|
84
|
+
/**
|
|
85
|
+
* Represents the placement options available in Bootstrap 5.
|
|
86
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/components/popovers/#four-directions
|
|
87
|
+
*/
|
|
88
|
+
export type PopperPlacement = 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
89
|
+
/**
|
|
90
|
+
* Represents the offset options available in Bootstrap 5.
|
|
91
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/components/popovers/#offsets
|
|
92
|
+
* See Popper.js documentation: https://popper.js.org/docs/v2/modifiers/offset/#options
|
|
93
|
+
* The basic offset accepts an array with two numbers in the form [skidding, distance].
|
|
94
|
+
*/
|
|
95
|
+
export type PopperOffset = [number, number];
|
|
96
|
+
/**
|
|
97
|
+
* Represents the background color variants available in Bootstrap 5.
|
|
98
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/helpers/color-background/#overview
|
|
99
|
+
*/
|
|
100
|
+
export type TextBackgroundColorVariant = 'text-bg-primary' | 'text-bg-secondary' | 'text-bg-success' | 'text-bg-danger' | 'text-bg-warning' | 'text-bg-info' | 'text-bg-light' | 'text-bg-dark';
|
|
101
|
+
export type TextColorVariant = 'text-primary' | 'text-secondary' | 'text-success' | 'text-danger' | 'text-warning' | 'text-info' | 'text-light' | 'text-dark' | 'text-black' | 'text-white' | 'text-body' | 'text-body-secondary' | 'text-body-tertiary' | 'text-muted';
|
|
102
|
+
export type TextDirection = 'ltr' | 'rtl';
|
|
103
|
+
export type TextEmphasisColorVariant = 'text-primary-emphasis' | 'text-secondary-emphasis' | 'text-success-emphasis' | 'text-danger-emphasis' | 'text-warning-emphasis' | 'text-info-emphasis' | 'text-light-emphasis' | 'text-dark-emphasis';
|
|
104
|
+
export type TextDecoration = 'underline' | 'line-through' | 'none';
|
|
105
|
+
/**
|
|
106
|
+
* Represents the text decoration options available in Bootstrap 5.
|
|
107
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/utilities/vertical-align/
|
|
108
|
+
*/
|
|
109
|
+
export type VerticalAlign = 'baseline' | 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom';
|
|
110
|
+
/**
|
|
111
|
+
* The `WithElementRef` type is a utility type that extends a given type `T` with an optional `ref` property.
|
|
112
|
+
*/
|
|
113
|
+
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
|
|
114
|
+
elementRef?: U | null;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Represents the HTML elements that can be used in Bootstrap components.
|
|
118
|
+
* These elements are typically used as props in Svelte components to specify the type of element to render.
|
|
119
|
+
*/
|
|
120
|
+
export type AnchorElement = WithElementRef<HTMLAnchorAttributes>;
|
|
121
|
+
export type ButtonElement = WithElementRef<HTMLButtonAttributes>;
|
|
122
|
+
export type CaptionElement = WithElementRef<HTMLAttributes<HTMLElement>>;
|
|
123
|
+
export type DivElement = WithElementRef<HTMLAttributes<HTMLDivElement>>;
|
|
124
|
+
export type FormElement = WithElementRef<HTMLFormAttributes>;
|
|
125
|
+
export type HeadingElement = WithElementRef<HTMLAttributes<HTMLHeadingElement>>;
|
|
126
|
+
export type ImgElement = WithElementRef<HTMLImgAttributes>;
|
|
127
|
+
export type InputElement = WithElementRef<HTMLInputAttributes>;
|
|
128
|
+
export type LabelElement = WithElementRef<HTMLLabelAttributes>;
|
|
129
|
+
export type ListElement = OListElement | UListElement;
|
|
130
|
+
export type ListItemElement = WithElementRef<HTMLLiAttributes>;
|
|
131
|
+
export type NavElement = WithElementRef<HTMLAttributes<HTMLElement>>;
|
|
132
|
+
export type OListElement = WithElementRef<HTMLAttributes<HTMLOListElement>>;
|
|
133
|
+
export type SelectElement = WithElementRef<HTMLSelectAttributes>;
|
|
134
|
+
export type SpanElement = WithElementRef<HTMLAttributes<HTMLSpanElement>>;
|
|
135
|
+
export type TableDataElement = WithElementRef<HTMLTdAttributes>;
|
|
136
|
+
export type TableElement = WithElementRef<HTMLTableAttributes>;
|
|
137
|
+
export type TableFootElement = WithElementRef<HTMLAttributes<HTMLTableSectionElement>>;
|
|
138
|
+
export type TableHeadElement = WithElementRef<HTMLAttributes<HTMLTableSectionElement>>;
|
|
139
|
+
export type TableHeaderElement = WithElementRef<HTMLThAttributes>;
|
|
140
|
+
export type TableBodyElement = WithElementRef<HTMLAttributes<HTMLTableSectionElement>>;
|
|
141
|
+
export type TableRowElement = WithElementRef<HTMLAttributes<HTMLTableRowElement>>;
|
|
142
|
+
export type TextAreaElement = WithElementRef<HTMLTextareaAttributes>;
|
|
143
|
+
export type UListElement = WithElementRef<HTMLAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the media queries available in Bootstrap 5.
|
|
3
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
4
|
+
* The reason for using *.98px is to ensure that the media query is inclusive of the breakpoint.
|
|
5
|
+
* See https://stackoverflow.com/a/54596322/22025584
|
|
6
|
+
*/
|
|
7
|
+
export const BreakpointBoxedMediaQuery = {
|
|
8
|
+
xs: '(max-width: 575.98px)',
|
|
9
|
+
sm: '(min-width: 576px) and (max-width: 767.98px)',
|
|
10
|
+
md: '(min-width: 768px) and (max-width: 991.98px)',
|
|
11
|
+
lg: '(min-width: 992px) and (max-width: 1199.98px)',
|
|
12
|
+
xl: '(min-width: 1200px) and (max-width: 1399.98px)',
|
|
13
|
+
xxl: '(min-width: 1400px)'
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Represents the media queries available in Bootstrap 5.
|
|
17
|
+
* Only the maximum media queries are used.
|
|
18
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
19
|
+
*/
|
|
20
|
+
export const BreakpointMaximumMediaQuery = {
|
|
21
|
+
xs: '(max-width: 575.98px)',
|
|
22
|
+
sm: '(max-width: 576px)',
|
|
23
|
+
md: '(max-width: 768px)',
|
|
24
|
+
lg: '(max-width: 992px)',
|
|
25
|
+
xl: '(max-width: 1200px)',
|
|
26
|
+
xxl: '(max-width: 1400px)'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Represents the media queries available in Bootstrap 5.
|
|
30
|
+
* Only the minimum media queries are used.
|
|
31
|
+
* See Bootstrap 5 documentation: https://getbootstrap.com/docs/5.3/layout/breakpoints/
|
|
32
|
+
*/
|
|
33
|
+
export const BreakpointMinimumMediaQuery = {
|
|
34
|
+
xs: '(max-width: 575.98px)',
|
|
35
|
+
sm: '(min-width: 576px)',
|
|
36
|
+
md: '(min-width: 768px)',
|
|
37
|
+
lg: '(min-width: 992px)',
|
|
38
|
+
xl: '(min-width: 1200px)',
|
|
39
|
+
xxl: '(min-width: 1400px)'
|
|
40
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './Accordion/index.js';
|
|
2
|
+
export * from './Alert/index.js';
|
|
3
|
+
export * from './Badge/index.js';
|
|
4
|
+
export * from './Breadcrumb/index.js';
|
|
5
|
+
export * from './BreakpointListener/index.js';
|
|
6
|
+
export * from './Button/index.js';
|
|
7
|
+
export * from './ButtonGroup/index.js';
|
|
8
|
+
export * from './Card/index.js';
|
|
9
|
+
export * from './Carousel/index.js';
|
|
10
|
+
export * from './CloseButton/index.js';
|
|
11
|
+
export * from './Col/index.js';
|
|
12
|
+
export * from './Collapse/index.js';
|
|
13
|
+
export * from './common/index.js';
|
|
14
|
+
export * from './Container/index.js';
|
|
15
|
+
export * from './Dropdown/index.js';
|
|
16
|
+
export * from './Form/index.js';
|
|
17
|
+
export * from './ListGroup/index.js';
|
|
18
|
+
export * from './Modal/index.js';
|
|
19
|
+
export * from './Nav/index.js';
|
|
20
|
+
export * from './Navbar/index.js';
|
|
21
|
+
export * from './Offcanvas/index.js';
|
|
22
|
+
export * from './Pagination/index.js';
|
|
23
|
+
export * from './Placeholder/index.js';
|
|
24
|
+
export * from './Popover/index.js';
|
|
25
|
+
export * from './Portal/index.js';
|
|
26
|
+
export * from './Progress/index.js';
|
|
27
|
+
export * from './Row/index.js';
|
|
28
|
+
export * from './Scrollspy/index.js';
|
|
29
|
+
export * from './Spinner/index.js';
|
|
30
|
+
export * from './Tab/index.js';
|
|
31
|
+
export * from './Table/index.js';
|
|
32
|
+
export * from './Toast/index.js';
|
|
33
|
+
export * from './Tooltip/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './Accordion/index.js';
|
|
2
|
+
export * from './Alert/index.js';
|
|
3
|
+
export * from './Badge/index.js';
|
|
4
|
+
export * from './Breadcrumb/index.js';
|
|
5
|
+
export * from './BreakpointListener/index.js';
|
|
6
|
+
export * from './Button/index.js';
|
|
7
|
+
export * from './ButtonGroup/index.js';
|
|
8
|
+
export * from './Card/index.js';
|
|
9
|
+
export * from './Carousel/index.js';
|
|
10
|
+
export * from './CloseButton/index.js';
|
|
11
|
+
export * from './Col/index.js';
|
|
12
|
+
export * from './Collapse/index.js';
|
|
13
|
+
export * from './common/index.js';
|
|
14
|
+
export * from './Container/index.js';
|
|
15
|
+
export * from './Dropdown/index.js';
|
|
16
|
+
export * from './Form/index.js';
|
|
17
|
+
export * from './ListGroup/index.js';
|
|
18
|
+
export * from './Modal/index.js';
|
|
19
|
+
export * from './Nav/index.js';
|
|
20
|
+
export * from './Navbar/index.js';
|
|
21
|
+
export * from './Offcanvas/index.js';
|
|
22
|
+
export * from './Pagination/index.js';
|
|
23
|
+
export * from './Placeholder/index.js';
|
|
24
|
+
export * from './Popover/index.js';
|
|
25
|
+
export * from './Portal/index.js';
|
|
26
|
+
export * from './Progress/index.js';
|
|
27
|
+
export * from './Row/index.js';
|
|
28
|
+
export * from './Scrollspy/index.js';
|
|
29
|
+
export * from './Spinner/index.js';
|
|
30
|
+
export * from './Tab/index.js';
|
|
31
|
+
export * from './Table/index.js';
|
|
32
|
+
export * from './Toast/index.js';
|
|
33
|
+
export * from './Tooltip/index.js';
|