@forthtilliath/forth-ui 0.2.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/LICENSE +21 -0
- package/README.md +279 -0
- package/dist/components/accordion/accordion-items.d.ts +3 -0
- package/dist/components/accordion/accordion-items.d.ts.map +1 -0
- package/dist/components/accordion/accordion-items.js +18 -0
- package/dist/components/accordion/accordion-multiple.d.ts +3 -0
- package/dist/components/accordion/accordion-multiple.d.ts.map +1 -0
- package/dist/components/accordion/accordion-multiple.js +8 -0
- package/dist/components/accordion/accordion-single.d.ts +3 -0
- package/dist/components/accordion/accordion-single.d.ts.map +1 -0
- package/dist/components/accordion/accordion-single.js +8 -0
- package/dist/components/accordion/accordion.d.ts +17 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +23 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/types.d.ts +100 -0
- package/dist/components/accordion/types.d.ts.map +1 -0
- package/dist/components/accordion/types.js +1 -0
- package/dist/components/accordion/variants.d.ts +25 -0
- package/dist/components/accordion/variants.d.ts.map +1 -0
- package/dist/components/accordion/variants.js +96 -0
- package/dist/components/alert/alert.d.ts +38 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +32 -0
- package/dist/components/alert/index.d.ts +5 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +4 -0
- package/dist/components/alert/variants.d.ts +8 -0
- package/dist/components/alert/variants.d.ts.map +1 -0
- package/dist/components/alert/variants.js +110 -0
- package/dist/components/avatar/avatar-group.d.ts +26 -0
- package/dist/components/avatar/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar/avatar-group.js +29 -0
- package/dist/components/avatar/avatar.d.ts +107 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +26 -0
- package/dist/components/avatar/constants.d.ts +13 -0
- package/dist/components/avatar/constants.d.ts.map +1 -0
- package/dist/components/avatar/constants.js +8 -0
- package/dist/components/avatar/index.d.ts +5 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar/variants.d.ts +31 -0
- package/dist/components/avatar/variants.d.ts.map +1 -0
- package/dist/components/avatar/variants.js +147 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +33 -0
- package/dist/components/badge/index.d.ts +4 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/variants.d.ts +12 -0
- package/dist/components/badge/variants.d.ts.map +1 -0
- package/dist/components/badge/variants.js +134 -0
- package/dist/components/banner/banner.d.ts +43 -0
- package/dist/components/banner/banner.d.ts.map +1 -0
- package/dist/components/banner/banner.js +44 -0
- package/dist/components/banner/index.d.ts +4 -0
- package/dist/components/banner/index.d.ts.map +1 -0
- package/dist/components/banner/index.js +1 -0
- package/dist/components/banner/variants.d.ts +9 -0
- package/dist/components/banner/variants.d.ts.map +1 -0
- package/dist/components/banner/variants.js +111 -0
- package/dist/components/bento-grid/bento-grid.d.ts +23 -0
- package/dist/components/bento-grid/bento-grid.d.ts.map +1 -0
- package/dist/components/bento-grid/bento-grid.js +30 -0
- package/dist/components/bento-grid/index.d.ts +3 -0
- package/dist/components/bento-grid/index.d.ts.map +1 -0
- package/dist/components/bento-grid/index.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +28 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/button-group.d.ts +16 -0
- package/dist/components/button/button-group.d.ts.map +1 -0
- package/dist/components/button/button-group.js +13 -0
- package/dist/components/button/button.d.ts +28 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +20 -0
- package/dist/components/button/index.d.ts +6 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/variants.d.ts +7 -0
- package/dist/components/button/variants.d.ts.map +1 -0
- package/dist/components/button/variants.js +27 -0
- package/dist/components/checkbox/checkbox-group.d.ts +30 -0
- package/dist/components/checkbox/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox-group.js +32 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/chip.d.ts +27 -0
- package/dist/components/chip/chip.d.ts.map +1 -0
- package/dist/components/chip/chip.js +18 -0
- package/dist/components/chip/index.d.ts +3 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/code-block/code-block.d.ts +31 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +57 -0
- package/dist/components/code-block/index.d.ts +3 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/collapsible/collapsible.d.ts +41 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.js +50 -0
- package/dist/components/collapsible/index.d.ts +7 -0
- package/dist/components/collapsible/index.d.ts.map +1 -0
- package/dist/components/collapsible/index.js +3 -0
- package/dist/components/color-picker/color-picker.d.ts +24 -0
- package/dist/components/color-picker/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.js +40 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/color-picker/index.d.ts.map +1 -0
- package/dist/components/color-picker/index.js +1 -0
- package/dist/components/combobox/combobox.d.ts +31 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +30 -0
- package/dist/components/combobox/index.d.ts +5 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/combobox/multi-select.d.ts +30 -0
- package/dist/components/combobox/multi-select.d.ts.map +1 -0
- package/dist/components/combobox/multi-select.js +53 -0
- package/dist/components/command-palette/command-palette.d.ts +37 -0
- package/dist/components/command-palette/command-palette.d.ts.map +1 -0
- package/dist/components/command-palette/command-palette.js +46 -0
- package/dist/components/command-palette/index.d.ts +3 -0
- package/dist/components/command-palette/index.d.ts.map +1 -0
- package/dist/components/command-palette/index.js +1 -0
- package/dist/components/confirm-dialog/confirm-context.d.ts +15 -0
- package/dist/components/confirm-dialog/confirm-context.d.ts.map +1 -0
- package/dist/components/confirm-dialog/confirm-context.js +2 -0
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +18 -0
- package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/dist/components/confirm-dialog/confirm-dialog.js +40 -0
- package/dist/components/confirm-dialog/index.d.ts +4 -0
- package/dist/components/confirm-dialog/index.d.ts.map +1 -0
- package/dist/components/confirm-dialog/index.js +2 -0
- package/dist/components/confirm-dialog/use-confirm.d.ts +4 -0
- package/dist/components/confirm-dialog/use-confirm.d.ts.map +1 -0
- package/dist/components/confirm-dialog/use-confirm.js +10 -0
- package/dist/components/count-animation/count-animation.d.ts +20 -0
- package/dist/components/count-animation/count-animation.d.ts.map +1 -0
- package/dist/components/count-animation/count-animation.js +42 -0
- package/dist/components/count-animation/index.d.ts +3 -0
- package/dist/components/count-animation/index.d.ts.map +1 -0
- package/dist/components/count-animation/index.js +1 -0
- package/dist/components/date-picker/date-picker.d.ts +27 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.js +37 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/description-list/description-list.d.ts +16 -0
- package/dist/components/description-list/description-list.d.ts.map +1 -0
- package/dist/components/description-list/description-list.js +24 -0
- package/dist/components/description-list/index.d.ts +2 -0
- package/dist/components/description-list/index.d.ts.map +1 -0
- package/dist/components/description-list/index.js +1 -0
- package/dist/components/dropdrawer/dropdrawer.d.ts +27 -0
- package/dist/components/dropdrawer/dropdrawer.d.ts.map +1 -0
- package/dist/components/dropdrawer/dropdrawer.js +26 -0
- package/dist/components/dropdrawer/index.d.ts +3 -0
- package/dist/components/dropdrawer/index.d.ts.map +1 -0
- package/dist/components/dropdrawer/index.js +1 -0
- package/dist/components/dropzone/dropzone.d.ts +27 -0
- package/dist/components/dropzone/dropzone.d.ts.map +1 -0
- package/dist/components/dropzone/dropzone.js +83 -0
- package/dist/components/dropzone/index.d.ts +3 -0
- package/dist/components/dropzone/index.d.ts.map +1 -0
- package/dist/components/dropzone/index.js +1 -0
- package/dist/components/field/field.d.ts +41 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.js +48 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/file-list/file-list.d.ts +29 -0
- package/dist/components/file-list/file-list.d.ts.map +1 -0
- package/dist/components/file-list/file-list.js +52 -0
- package/dist/components/file-list/index.d.ts +3 -0
- package/dist/components/file-list/index.d.ts.map +1 -0
- package/dist/components/file-list/index.js +1 -0
- package/dist/components/grid/context.d.ts +12 -0
- package/dist/components/grid/context.d.ts.map +1 -0
- package/dist/components/grid/context.js +5 -0
- package/dist/components/grid/grid-item.d.ts +14 -0
- package/dist/components/grid/grid-item.d.ts.map +1 -0
- package/dist/components/grid/grid-item.js +13 -0
- package/dist/components/grid/grid.d.ts +16 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/grid/grid.js +19 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +2 -0
- package/dist/components/grid/variants.d.ts +16 -0
- package/dist/components/grid/variants.d.ts.map +1 -0
- package/dist/components/grid/variants.js +74 -0
- package/dist/components/image-input/image-input.d.ts +21 -0
- package/dist/components/image-input/image-input.d.ts.map +1 -0
- package/dist/components/image-input/image-input.js +45 -0
- package/dist/components/image-input/index.d.ts +3 -0
- package/dist/components/image-input/index.d.ts.map +1 -0
- package/dist/components/image-input/index.js +1 -0
- package/dist/components/infinite-scroll/index.d.ts +3 -0
- package/dist/components/infinite-scroll/index.d.ts.map +1 -0
- package/dist/components/infinite-scroll/index.js +1 -0
- package/dist/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/dist/components/infinite-scroll/infinite-scroll.d.ts.map +1 -0
- package/dist/components/infinite-scroll/infinite-scroll.js +33 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/index.d.ts.map +1 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +15 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/kbd.js +19 -0
- package/dist/components/link/index.d.ts +7 -0
- package/dist/components/link/index.d.ts.map +1 -0
- package/dist/components/link/index.js +3 -0
- package/dist/components/link/link-preview.d.ts +36 -0
- package/dist/components/link/link-preview.d.ts.map +1 -0
- package/dist/components/link/link-preview.js +27 -0
- package/dist/components/link/link.d.ts +27 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/link.js +39 -0
- package/dist/components/link/variants.d.ts +8 -0
- package/dist/components/link/variants.d.ts.map +1 -0
- package/dist/components/link/variants.js +26 -0
- package/dist/components/marquee/index.d.ts +3 -0
- package/dist/components/marquee/index.d.ts.map +1 -0
- package/dist/components/marquee/index.js +1 -0
- package/dist/components/marquee/marquee.d.ts +22 -0
- package/dist/components/marquee/marquee.d.ts.map +1 -0
- package/dist/components/marquee/marquee.js +19 -0
- package/dist/components/multi-step-loader/index.d.ts +3 -0
- package/dist/components/multi-step-loader/index.d.ts.map +1 -0
- package/dist/components/multi-step-loader/index.js +1 -0
- package/dist/components/multi-step-loader/multi-step-loader.d.ts +41 -0
- package/dist/components/multi-step-loader/multi-step-loader.d.ts.map +1 -0
- package/dist/components/multi-step-loader/multi-step-loader.js +53 -0
- package/dist/components/navbar/index.d.ts +5 -0
- package/dist/components/navbar/index.d.ts.map +1 -0
- package/dist/components/navbar/index.js +2 -0
- package/dist/components/navbar/navbar-mobile-menu.d.ts +24 -0
- package/dist/components/navbar/navbar-mobile-menu.d.ts.map +1 -0
- package/dist/components/navbar/navbar-mobile-menu.js +18 -0
- package/dist/components/navbar/navbar.d.ts +24 -0
- package/dist/components/navbar/navbar.d.ts.map +1 -0
- package/dist/components/navbar/navbar.js +33 -0
- package/dist/components/notification-center/index.d.ts +3 -0
- package/dist/components/notification-center/index.d.ts.map +1 -0
- package/dist/components/notification-center/index.js +1 -0
- package/dist/components/notification-center/notification-center.d.ts +28 -0
- package/dist/components/notification-center/notification-center.d.ts.map +1 -0
- package/dist/components/notification-center/notification-center.js +24 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/index.d.ts.map +1 -0
- package/dist/components/number-input/index.js +1 -0
- package/dist/components/number-input/number-input.d.ts +22 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/number-input/number-input.js +37 -0
- package/dist/components/pagination/index.d.ts +5 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination-range.d.ts +17 -0
- package/dist/components/pagination/pagination-range.d.ts.map +1 -0
- package/dist/components/pagination/pagination-range.js +30 -0
- package/dist/components/pagination/pagination.d.ts +26 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +48 -0
- package/dist/components/password-input/index.d.ts +5 -0
- package/dist/components/password-input/index.d.ts.map +1 -0
- package/dist/components/password-input/index.js +2 -0
- package/dist/components/password-input/password-input.d.ts +15 -0
- package/dist/components/password-input/password-input.d.ts.map +1 -0
- package/dist/components/password-input/password-input.js +23 -0
- package/dist/components/password-input/password-strength-meter.d.ts +18 -0
- package/dist/components/password-input/password-strength-meter.d.ts.map +1 -0
- package/dist/components/password-input/password-strength-meter.js +40 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +25 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +23 -0
- package/dist/components/progress/variants.d.ts +7 -0
- package/dist/components/progress/variants.d.ts.map +1 -0
- package/dist/components/progress/variants.js +25 -0
- package/dist/components/qr-code/index.d.ts +3 -0
- package/dist/components/qr-code/index.d.ts.map +1 -0
- package/dist/components/qr-code/index.js +1 -0
- package/dist/components/qr-code/qr-code.d.ts +28 -0
- package/dist/components/qr-code/qr-code.d.ts.map +1 -0
- package/dist/components/qr-code/qr-code.js +27 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio/radio-card.d.ts +25 -0
- package/dist/components/radio/radio-card.d.ts.map +1 -0
- package/dist/components/radio/radio-card.js +24 -0
- package/dist/components/rating/index.d.ts +3 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/rating/index.js +1 -0
- package/dist/components/rating/rating.d.ts +23 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/rating/rating.js +41 -0
- package/dist/components/relative-time/index.d.ts +3 -0
- package/dist/components/relative-time/index.d.ts.map +1 -0
- package/dist/components/relative-time/index.js +1 -0
- package/dist/components/relative-time/relative-time.d.ts +32 -0
- package/dist/components/relative-time/relative-time.d.ts.map +1 -0
- package/dist/components/relative-time/relative-time.js +62 -0
- package/dist/components/reparent/index.d.ts +3 -0
- package/dist/components/reparent/index.d.ts.map +1 -0
- package/dist/components/reparent/index.js +1 -0
- package/dist/components/reparent/reparent.d.ts +31 -0
- package/dist/components/reparent/reparent.d.ts.map +1 -0
- package/dist/components/reparent/reparent.js +51 -0
- package/dist/components/repeat/index.d.ts +2 -0
- package/dist/components/repeat/index.d.ts.map +1 -0
- package/dist/components/repeat/index.js +1 -0
- package/dist/components/repeat/repeat.d.ts +27 -0
- package/dist/components/repeat/repeat.d.ts.map +1 -0
- package/dist/components/repeat/repeat.js +15 -0
- package/dist/components/scroll-progress/index.d.ts +3 -0
- package/dist/components/scroll-progress/index.d.ts.map +1 -0
- package/dist/components/scroll-progress/index.js +1 -0
- package/dist/components/scroll-progress/scroll-progress.d.ts +19 -0
- package/dist/components/scroll-progress/scroll-progress.d.ts.map +1 -0
- package/dist/components/scroll-progress/scroll-progress.js +36 -0
- package/dist/components/scroll-shadow/index.d.ts +3 -0
- package/dist/components/scroll-shadow/index.d.ts.map +1 -0
- package/dist/components/scroll-shadow/index.js +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +20 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.js +44 -0
- package/dist/components/scrollspy/index.d.ts +3 -0
- package/dist/components/scrollspy/index.d.ts.map +1 -0
- package/dist/components/scrollspy/index.js +1 -0
- package/dist/components/scrollspy/use-scrollspy.d.ts +30 -0
- package/dist/components/scrollspy/use-scrollspy.d.ts.map +1 -0
- package/dist/components/scrollspy/use-scrollspy.js +35 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +22 -0
- package/dist/components/separator/separator.d.ts.map +1 -0
- package/dist/components/separator/separator.js +21 -0
- package/dist/components/snippet/index.d.ts +3 -0
- package/dist/components/snippet/index.d.ts.map +1 -0
- package/dist/components/snippet/index.js +1 -0
- package/dist/components/snippet/snippet.d.ts +25 -0
- package/dist/components/snippet/snippet.d.ts.map +1 -0
- package/dist/components/snippet/snippet.js +33 -0
- package/dist/components/sortable/index.d.ts +3 -0
- package/dist/components/sortable/index.d.ts.map +1 -0
- package/dist/components/sortable/index.js +1 -0
- package/dist/components/sortable/sortable.d.ts +22 -0
- package/dist/components/sortable/sortable.d.ts.map +1 -0
- package/dist/components/sortable/sortable.js +47 -0
- package/dist/components/spacer/index.d.ts +3 -0
- package/dist/components/spacer/index.d.ts.map +1 -0
- package/dist/components/spacer/index.js +1 -0
- package/dist/components/spacer/spacer.d.ts +24 -0
- package/dist/components/spacer/spacer.d.ts.map +1 -0
- package/dist/components/spacer/spacer.js +23 -0
- package/dist/components/spinner/index.d.ts +4 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +22 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +19 -0
- package/dist/components/spinner/variants.d.ts +6 -0
- package/dist/components/spinner/variants.d.ts.map +1 -0
- package/dist/components/spinner/variants.js +13 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/components/stepper/index.js +1 -0
- package/dist/components/stepper/stepper.d.ts +26 -0
- package/dist/components/stepper/stepper.d.ts.map +1 -0
- package/dist/components/stepper/stepper.js +27 -0
- package/dist/components/submit-button/index.d.ts +3 -0
- package/dist/components/submit-button/index.d.ts.map +1 -0
- package/dist/components/submit-button/index.js +1 -0
- package/dist/components/submit-button/submit-button.d.ts +19 -0
- package/dist/components/submit-button/submit-button.d.ts.map +1 -0
- package/dist/components/submit-button/submit-button.js +23 -0
- package/dist/components/tags-input/index.d.ts +3 -0
- package/dist/components/tags-input/index.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +1 -0
- package/dist/components/tags-input/tags-input.d.ts +26 -0
- package/dist/components/tags-input/tags-input.d.ts.map +1 -0
- package/dist/components/tags-input/tags-input.js +61 -0
- package/dist/components/timeline/index.d.ts +3 -0
- package/dist/components/timeline/index.d.ts.map +1 -0
- package/dist/components/timeline/index.js +1 -0
- package/dist/components/timeline/timeline.d.ts +24 -0
- package/dist/components/timeline/timeline.d.ts.map +1 -0
- package/dist/components/timeline/timeline.js +21 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/index.js +1 -0
- package/dist/components/tree/tree.d.ts +26 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree/tree.js +32 -0
- package/dist/globals.css +3004 -0
- package/package.json +63 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { DEFAULT_BADGE_POSITION, DEFAULT_SHAPE } from "./constants";
|
|
3
|
+
export const avatarVariants = cva("size-10", {
|
|
4
|
+
variants: {
|
|
5
|
+
ring: {
|
|
6
|
+
false: "",
|
|
7
|
+
true: "ring-2 ring-green-500 ring-offset-[3px] ring-offset-background",
|
|
8
|
+
},
|
|
9
|
+
shape: {
|
|
10
|
+
square: "rounded-none",
|
|
11
|
+
rounded: "rounded-md",
|
|
12
|
+
circle: "",
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
xs: "size-6",
|
|
16
|
+
sm: "size-8",
|
|
17
|
+
md: "size-10",
|
|
18
|
+
lg: "size-14",
|
|
19
|
+
xl: "size-20",
|
|
20
|
+
"2xl": "size-40",
|
|
21
|
+
"3xl": "size-60",
|
|
22
|
+
// @container ? for ring and border
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
ring: false,
|
|
27
|
+
shape: DEFAULT_SHAPE,
|
|
28
|
+
size: "md",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
export const statusVariants = cva("", {
|
|
32
|
+
variants: {
|
|
33
|
+
status: {
|
|
34
|
+
online: "bg-green-500",
|
|
35
|
+
offline: "bg-gray-500",
|
|
36
|
+
away: "bg-yellow-500",
|
|
37
|
+
busy: "bg-red-500",
|
|
38
|
+
},
|
|
39
|
+
position: {
|
|
40
|
+
"top-right": "absolute right-0.25 top-0.25",
|
|
41
|
+
"bottom-right": "absolute right-0.25 bottom-0.25",
|
|
42
|
+
"top-left": "absolute left-0.25 top-0.25",
|
|
43
|
+
"bottom-left": "absolute left-0.25 bottom-0.25",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
position: "bottom-right",
|
|
48
|
+
},
|
|
49
|
+
compoundVariants: [
|
|
50
|
+
{
|
|
51
|
+
status: ["online", "offline", "away", "busy"],
|
|
52
|
+
className: "border-background size-3/12 rounded-full border-2",
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* A badge overlay for arbitrary content (notification count, icon), distinct
|
|
58
|
+
* from `statusVariants`' plain color dot — positioned independently so both
|
|
59
|
+
* can be shown on the same avatar at once (e.g. status bottom-right, badge
|
|
60
|
+
* top-right).
|
|
61
|
+
*/
|
|
62
|
+
export const badgeVariants = cva("border-background absolute flex h-5 min-w-5 items-center justify-center rounded-full border-2 px-1 text-[10px] leading-none font-medium", {
|
|
63
|
+
variants: {
|
|
64
|
+
badgeVariant: {
|
|
65
|
+
default: "bg-primary text-primary-foreground",
|
|
66
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
67
|
+
destructive: "bg-destructive text-white",
|
|
68
|
+
outline: "bg-background text-foreground",
|
|
69
|
+
},
|
|
70
|
+
position: {
|
|
71
|
+
"top-right": "-top-1 -right-1",
|
|
72
|
+
"bottom-right": "-bottom-1 -right-1",
|
|
73
|
+
"top-left": "-top-1 -left-1",
|
|
74
|
+
"bottom-left": "-bottom-1 -left-1",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
badgeVariant: "default",
|
|
79
|
+
position: DEFAULT_BADGE_POSITION,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
export const fallbackVariants = cva("", {
|
|
83
|
+
variants: {
|
|
84
|
+
fallbackVariant: {
|
|
85
|
+
default: "",
|
|
86
|
+
amber: "bg-amber-500",
|
|
87
|
+
blue: "bg-blue-500",
|
|
88
|
+
cyan: "bg-cyan-500",
|
|
89
|
+
emerald: "bg-emerald-500",
|
|
90
|
+
fuchsia: "bg-fuchsia-500",
|
|
91
|
+
gray: "bg-gray-500",
|
|
92
|
+
green: "bg-green-500",
|
|
93
|
+
indigo: "bg-indigo-500",
|
|
94
|
+
lime: "bg-lime-500",
|
|
95
|
+
orange: "bg-orange-500",
|
|
96
|
+
pink: "bg-pink-500",
|
|
97
|
+
purple: "bg-purple-500",
|
|
98
|
+
red: "bg-red-500",
|
|
99
|
+
rose: "bg-rose-500",
|
|
100
|
+
slate: "bg-slate-500",
|
|
101
|
+
sky: "bg-sky-500",
|
|
102
|
+
teal: "bg-teal-500",
|
|
103
|
+
violet: "bg-violet-500",
|
|
104
|
+
yellow: "bg-yellow-500",
|
|
105
|
+
"amber-full": "bg-amber-500/25 text-amber-500",
|
|
106
|
+
"blue-full": "bg-blue-500/25 text-blue-500",
|
|
107
|
+
"cyan-full": "bg-cyan-500/25 text-cyan-500",
|
|
108
|
+
"emerald-full": "bg-emerald-500/25 text-emerald-500",
|
|
109
|
+
"fuchsia-full": "bg-fuchsia-500/25 text-fuchsia-500",
|
|
110
|
+
"gray-full": "bg-gray-500/25 text-gray-500",
|
|
111
|
+
"green-full": "bg-green-500/25 text-green-500",
|
|
112
|
+
"indigo-full": "bg-indigo-500/25 text-indigo-500",
|
|
113
|
+
"lime-full": "bg-lime-500/25 text-lime-500",
|
|
114
|
+
"orange-full": "bg-orange-500/25 text-orange-500",
|
|
115
|
+
"pink-full": "bg-pink-500/25 text-pink-500",
|
|
116
|
+
"purple-full": "bg-purple-500/25 text-purple-500",
|
|
117
|
+
"red-full": "bg-red-500/25 text-red-500",
|
|
118
|
+
"rose-full": "bg-rose-500/25 text-rose-500",
|
|
119
|
+
"slate-full": "bg-slate-500/25 text-slate-500",
|
|
120
|
+
"sky-full": "bg-sky-500/25 text-sky-500",
|
|
121
|
+
"teal-full": "bg-teal-500/25 text-teal-500",
|
|
122
|
+
"violet-full": "bg-violet-500/25 text-violet-500",
|
|
123
|
+
"yellow-full": "bg-yellow-500/25 text-yellow-500",
|
|
124
|
+
},
|
|
125
|
+
shape: {
|
|
126
|
+
square: "rounded-none",
|
|
127
|
+
rounded: "rounded-lg",
|
|
128
|
+
circle: "",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
defaultVariants: {
|
|
132
|
+
fallbackVariant: "default",
|
|
133
|
+
shape: DEFAULT_SHAPE,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
export const tooltipTriggerVariants = cva("ring-background ring-2 hover:z-10", {
|
|
137
|
+
variants: {
|
|
138
|
+
shape: {
|
|
139
|
+
square: "rounded-none",
|
|
140
|
+
rounded: "rounded-md",
|
|
141
|
+
circle: "rounded-full",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
defaultVariants: {
|
|
145
|
+
shape: DEFAULT_SHAPE,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Badge as BadgePrimitive } from "@forthtilliath/shadcn-ui/components/badge";
|
|
3
|
+
import type { BadgeVariants } from "./variants";
|
|
4
|
+
export type BadgeProps = Omit<React.ComponentProps<typeof BadgePrimitive>, "variant"> & BadgeVariants & {
|
|
5
|
+
/**
|
|
6
|
+
* Show a small colored dot before the content instead of filling the
|
|
7
|
+
* whole badge — pairs best with `look="soft"` or `"outline"`, where the
|
|
8
|
+
* dot itself carries the color signal.
|
|
9
|
+
*/
|
|
10
|
+
dot?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Adds an animated ping ring around the `dot`, for a live/status
|
|
13
|
+
* indicator. Ignored without `dot`.
|
|
14
|
+
*/
|
|
15
|
+
pulse?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Shows a close button. Uncontrolled by default (the badge hides itself
|
|
18
|
+
* once dismissed) — pass `open`/`onOpenChange` to control it instead.
|
|
19
|
+
*
|
|
20
|
+
* Not meant to be combined with `asChild`: `Slot` requires a single
|
|
21
|
+
* child, and the close button renders as an extra sibling.
|
|
22
|
+
*/
|
|
23
|
+
dismissible?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Controlled visibility. Omit for uncontrolled (self-managed via
|
|
26
|
+
* `dismissible`'s internal state).
|
|
27
|
+
*/
|
|
28
|
+
open?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Called when the badge is dismissed, whether controlled or not.
|
|
31
|
+
*/
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Displays a badge or a component that looks like a badge.
|
|
36
|
+
*
|
|
37
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
38
|
+
* @see https://ui.shadcn.com/docs/components/badge
|
|
39
|
+
* @see https://ktui.io/docs/badge
|
|
40
|
+
* @see https://www.shadcnui-blocks.com/components/badge
|
|
41
|
+
* @see https://www.kibo-ui.com/components/status
|
|
42
|
+
*
|
|
43
|
+
* @version 0.1.0
|
|
44
|
+
* @author Forth
|
|
45
|
+
* @copyright 2026 Forth
|
|
46
|
+
*/
|
|
47
|
+
export declare function Badge({ className, variant, look, shape, size, dot, pulse, dismissible, open, onOpenChange, children, ...props }: BadgeProps): React.JSX.Element | null;
|
|
48
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAGpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAC3C,SAAS,CACV,GACC,aAAa,GAAG;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,GAAW,EACX,KAAa,EACb,WAAmB,EACnB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,4BA6CZ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { Badge as BadgePrimitive } from "@forthtilliath/shadcn-ui/components/badge";
|
|
6
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
7
|
+
import { badgeVariants, dotVariants } from "./variants";
|
|
8
|
+
/**
|
|
9
|
+
* Displays a badge or a component that looks like a badge.
|
|
10
|
+
*
|
|
11
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
12
|
+
* @see https://ui.shadcn.com/docs/components/badge
|
|
13
|
+
* @see https://ktui.io/docs/badge
|
|
14
|
+
* @see https://www.shadcnui-blocks.com/components/badge
|
|
15
|
+
* @see https://www.kibo-ui.com/components/status
|
|
16
|
+
*
|
|
17
|
+
* @version 0.1.0
|
|
18
|
+
* @author Forth
|
|
19
|
+
* @copyright 2026 Forth
|
|
20
|
+
*/
|
|
21
|
+
export function Badge({ className, variant, look, shape, size, dot = false, pulse = false, dismissible = false, open, onOpenChange, children, ...props }) {
|
|
22
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(true);
|
|
23
|
+
const isOpen = open ?? uncontrolledOpen;
|
|
24
|
+
function handleDismiss(event) {
|
|
25
|
+
event.stopPropagation();
|
|
26
|
+
setUncontrolledOpen(false);
|
|
27
|
+
onOpenChange?.(false);
|
|
28
|
+
}
|
|
29
|
+
if (!isOpen) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return (_jsxs(BadgePrimitive, { className: cn(badgeVariants({ variant, look, shape, size }), className), ...props, children: [dot && (_jsxs("span", { className: "relative inline-flex size-1.5", children: [pulse && (_jsx("span", { className: cn(dotVariants({ variant }), "absolute inline-flex size-full animate-ping opacity-75") })), _jsx("span", { className: cn(dotVariants({ variant }), "relative") })] })), children, dismissible && (_jsx("button", { type: "button", onClick: handleDismiss, "aria-label": "Dismiss", className: "-mr-0.5 ml-0.5 rounded-full opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current [&>svg]:size-2.5", children: _jsx(X, {}) }))] }));
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/badge/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from "./badge";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const badgeVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "primary" | "success" | "warning" | "info" | "destructive" | "secondary" | null | undefined;
|
|
4
|
+
look?: "outline" | "solid" | "soft" | null | undefined;
|
|
5
|
+
shape?: "square" | "rounded" | "pill" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
9
|
+
export declare const dotVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "primary" | "success" | "warning" | "info" | "destructive" | "secondary" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/badge/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,eAAO,MAAM,aAAa;;;;;8EA2HzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,eAAO,MAAM,WAAW;;8EAetB,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// Tailwind's scanner needs literal class strings in source — no
|
|
3
|
+
// runtime-templated `bg-${color}-600` here, it wouldn't be picked up.
|
|
4
|
+
export const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
8
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
9
|
+
primary: "",
|
|
10
|
+
success: "",
|
|
11
|
+
warning: "",
|
|
12
|
+
info: "",
|
|
13
|
+
destructive: "",
|
|
14
|
+
},
|
|
15
|
+
look: {
|
|
16
|
+
solid: "",
|
|
17
|
+
soft: "",
|
|
18
|
+
outline: "bg-transparent",
|
|
19
|
+
},
|
|
20
|
+
shape: {
|
|
21
|
+
rounded: "rounded-md",
|
|
22
|
+
pill: "rounded-full",
|
|
23
|
+
square: "rounded-sm",
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
sm: "px-1.5 py-0 text-[10px] [&>svg]:size-2.5",
|
|
27
|
+
default: "",
|
|
28
|
+
lg: "px-2.5 py-1 text-sm [&>svg]:size-3.5",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
look: "solid",
|
|
34
|
+
shape: "rounded",
|
|
35
|
+
size: "default",
|
|
36
|
+
},
|
|
37
|
+
compoundVariants: [
|
|
38
|
+
// default/secondary ignore `look` — like Alert's neutral variant,
|
|
39
|
+
// none of the reference sources show a "soft"/"outline" neutral
|
|
40
|
+
// badge distinct from `outline` itself already being a variant
|
|
41
|
+
// upstream. Only the semantic colors vary by look here.
|
|
42
|
+
{
|
|
43
|
+
variant: "primary",
|
|
44
|
+
look: "solid",
|
|
45
|
+
className: "bg-primary text-primary-foreground border-transparent",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
variant: "primary",
|
|
49
|
+
look: "soft",
|
|
50
|
+
className: "bg-primary/10 text-primary border-transparent",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
variant: "primary",
|
|
54
|
+
look: "outline",
|
|
55
|
+
className: "text-primary border-primary/50",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
variant: "success",
|
|
59
|
+
look: "solid",
|
|
60
|
+
className: "bg-green-600 text-white border-transparent",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
variant: "success",
|
|
64
|
+
look: "soft",
|
|
65
|
+
className: "bg-green-50 text-green-700 border-transparent dark:bg-green-950 dark:text-green-300",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: "success",
|
|
69
|
+
look: "outline",
|
|
70
|
+
className: "text-green-700 border-green-300 dark:text-green-300 dark:border-green-800",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
variant: "warning",
|
|
74
|
+
look: "solid",
|
|
75
|
+
className: "bg-amber-500 text-white border-transparent",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
variant: "warning",
|
|
79
|
+
look: "soft",
|
|
80
|
+
className: "bg-amber-50 text-amber-700 border-transparent dark:bg-amber-950 dark:text-amber-300",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
variant: "warning",
|
|
84
|
+
look: "outline",
|
|
85
|
+
className: "text-amber-700 border-amber-300 dark:text-amber-300 dark:border-amber-800",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
variant: "info",
|
|
89
|
+
look: "solid",
|
|
90
|
+
className: "bg-sky-600 text-white border-transparent",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
variant: "info",
|
|
94
|
+
look: "soft",
|
|
95
|
+
className: "bg-sky-50 text-sky-700 border-transparent dark:bg-sky-950 dark:text-sky-300",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
variant: "info",
|
|
99
|
+
look: "outline",
|
|
100
|
+
className: "text-sky-700 border-sky-300 dark:text-sky-300 dark:border-sky-800",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
variant: "destructive",
|
|
104
|
+
look: "solid",
|
|
105
|
+
className: "bg-destructive text-white border-transparent",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
variant: "destructive",
|
|
109
|
+
look: "soft",
|
|
110
|
+
className: "bg-destructive/10 text-destructive border-transparent",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
variant: "destructive",
|
|
114
|
+
look: "outline",
|
|
115
|
+
className: "text-destructive border-destructive/50",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
});
|
|
119
|
+
export const dotVariants = cva("size-1.5 shrink-0 rounded-full", {
|
|
120
|
+
variants: {
|
|
121
|
+
variant: {
|
|
122
|
+
default: "bg-current",
|
|
123
|
+
secondary: "bg-current",
|
|
124
|
+
primary: "bg-primary",
|
|
125
|
+
success: "bg-green-600 dark:bg-green-400",
|
|
126
|
+
warning: "bg-amber-500 dark:bg-amber-400",
|
|
127
|
+
info: "bg-sky-600 dark:bg-sky-400",
|
|
128
|
+
destructive: "bg-destructive",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
defaultVariants: {
|
|
132
|
+
variant: "default",
|
|
133
|
+
},
|
|
134
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { BannerVariants } from "./variants";
|
|
3
|
+
export type BannerProps = React.ComponentProps<"div"> & BannerVariants & {
|
|
4
|
+
/**
|
|
5
|
+
* Shows a close button. Uncontrolled by default (the banner hides
|
|
6
|
+
* itself once dismissed) — pass `open`/`onOpenChange` to control it
|
|
7
|
+
* instead.
|
|
8
|
+
*/
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Controlled visibility. Omit for uncontrolled (self-managed via
|
|
12
|
+
* `dismissible`'s internal state).
|
|
13
|
+
*/
|
|
14
|
+
open?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Called when the banner is dismissed, whether controlled or not.
|
|
17
|
+
*/
|
|
18
|
+
onOpenChange?: (open: boolean) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Extra action content (e.g. a link or button) rendered after the
|
|
21
|
+
* message, before the close button when `dismissible` is also set.
|
|
22
|
+
*/
|
|
23
|
+
action?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Hides the banner once the page has scrolled past ~40px. Only
|
|
26
|
+
* meaningful when `sticky` is also set.
|
|
27
|
+
*/
|
|
28
|
+
hideOnScroll?: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A full-width, page-level announcement bar — as opposed to `Alert`, which
|
|
32
|
+
* is an inline callout within page content.
|
|
33
|
+
*
|
|
34
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
35
|
+
* @see https://www.kibo-ui.com/components/banner
|
|
36
|
+
* @see https://ui.aceternity.com/components/sticky-banner
|
|
37
|
+
*
|
|
38
|
+
* @version 0.1.0
|
|
39
|
+
* @author Forth
|
|
40
|
+
* @copyright 2026 Forth
|
|
41
|
+
*/
|
|
42
|
+
export declare function Banner({ className, variant, look, inset, sticky, dismissible, open, onOpenChange, hideOnScroll, action, children, ...props }: BannerProps): React.JSX.Element | null;
|
|
43
|
+
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GACnD,cAAc,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAIJ;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,WAAmB,EACnB,IAAI,EACJ,YAAY,EACZ,YAAoB,EACpB,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,4BAmDb"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
6
|
+
import { bannerVariants } from "./variants";
|
|
7
|
+
const HIDE_ON_SCROLL_THRESHOLD = 40;
|
|
8
|
+
/**
|
|
9
|
+
* A full-width, page-level announcement bar — as opposed to `Alert`, which
|
|
10
|
+
* is an inline callout within page content.
|
|
11
|
+
*
|
|
12
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
13
|
+
* @see https://www.kibo-ui.com/components/banner
|
|
14
|
+
* @see https://ui.aceternity.com/components/sticky-banner
|
|
15
|
+
*
|
|
16
|
+
* @version 0.1.0
|
|
17
|
+
* @author Forth
|
|
18
|
+
* @copyright 2026 Forth
|
|
19
|
+
*/
|
|
20
|
+
export function Banner({ className, variant, look, inset, sticky, dismissible = false, open, onOpenChange, hideOnScroll = false, action, children, ...props }) {
|
|
21
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(true);
|
|
22
|
+
const [scrolledPast, setScrolledPast] = React.useState(false);
|
|
23
|
+
const isOpen = (open ?? uncontrolledOpen) && !scrolledPast;
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (!hideOnScroll) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
function onScroll() {
|
|
29
|
+
setScrolledPast(window.scrollY > HIDE_ON_SCROLL_THRESHOLD);
|
|
30
|
+
}
|
|
31
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
32
|
+
return () => {
|
|
33
|
+
window.removeEventListener("scroll", onScroll);
|
|
34
|
+
};
|
|
35
|
+
}, [hideOnScroll]);
|
|
36
|
+
function handleDismiss() {
|
|
37
|
+
setUncontrolledOpen(false);
|
|
38
|
+
onOpenChange?.(false);
|
|
39
|
+
}
|
|
40
|
+
if (!isOpen) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return (_jsxs("div", { "data-slot": "banner", role: "region", className: cn(bannerVariants({ variant, look, inset, sticky }), className), ...props, children: [children, action, dismissible && (_jsx("button", { type: "button", onClick: handleDismiss, "aria-label": "Dismiss", className: "ml-1 shrink-0 rounded-sm opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current", children: _jsx(X, { className: "size-4" }) }))] }));
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/banner/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Banner } from "./banner";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const bannerVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "primary" | "success" | "warning" | "info" | "destructive" | null | undefined;
|
|
4
|
+
look?: "outline" | "solid" | "soft" | null | undefined;
|
|
5
|
+
inset?: boolean | null | undefined;
|
|
6
|
+
sticky?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type BannerVariants = VariantProps<typeof bannerVariants>;
|
|
9
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/banner/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,eAAO,MAAM,cAAc;;;;;8EAmH1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// Tailwind's scanner needs literal class strings in source — no
|
|
3
|
+
// runtime-templated `bg-${color}-600` here, it wouldn't be picked up.
|
|
4
|
+
export const bannerVariants = cva("relative flex w-full items-center justify-center gap-x-3 px-4 py-2.5 text-sm [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground border-b",
|
|
8
|
+
primary: "",
|
|
9
|
+
success: "",
|
|
10
|
+
warning: "",
|
|
11
|
+
info: "",
|
|
12
|
+
destructive: "",
|
|
13
|
+
},
|
|
14
|
+
look: {
|
|
15
|
+
solid: "",
|
|
16
|
+
soft: "",
|
|
17
|
+
outline: "border-b bg-transparent",
|
|
18
|
+
},
|
|
19
|
+
inset: {
|
|
20
|
+
false: "",
|
|
21
|
+
true: "mx-4 mt-4 w-auto rounded-lg border",
|
|
22
|
+
},
|
|
23
|
+
sticky: {
|
|
24
|
+
false: "",
|
|
25
|
+
true: "sticky top-0 z-50",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
look: "solid",
|
|
31
|
+
inset: false,
|
|
32
|
+
sticky: false,
|
|
33
|
+
},
|
|
34
|
+
compoundVariants: [
|
|
35
|
+
{
|
|
36
|
+
variant: "primary",
|
|
37
|
+
look: "solid",
|
|
38
|
+
className: "bg-primary text-primary-foreground",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
variant: "primary",
|
|
42
|
+
look: "soft",
|
|
43
|
+
className: "bg-primary/10 text-primary",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
variant: "primary",
|
|
47
|
+
look: "outline",
|
|
48
|
+
className: "text-primary border-primary/50",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
variant: "success",
|
|
52
|
+
look: "solid",
|
|
53
|
+
className: "bg-green-600 text-white",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
variant: "success",
|
|
57
|
+
look: "soft",
|
|
58
|
+
className: "bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
variant: "success",
|
|
62
|
+
look: "outline",
|
|
63
|
+
className: "text-green-700 border-green-300 dark:text-green-300 dark:border-green-800",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
variant: "warning",
|
|
67
|
+
look: "solid",
|
|
68
|
+
className: "bg-amber-500 text-white",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
variant: "warning",
|
|
72
|
+
look: "soft",
|
|
73
|
+
className: "bg-amber-50 text-amber-700 dark:bg-amber-950 dark:text-amber-300",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
variant: "warning",
|
|
77
|
+
look: "outline",
|
|
78
|
+
className: "text-amber-700 border-amber-300 dark:text-amber-300 dark:border-amber-800",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
variant: "info",
|
|
82
|
+
look: "solid",
|
|
83
|
+
className: "bg-sky-600 text-white",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
variant: "info",
|
|
87
|
+
look: "soft",
|
|
88
|
+
className: "bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
variant: "info",
|
|
92
|
+
look: "outline",
|
|
93
|
+
className: "text-sky-700 border-sky-300 dark:text-sky-300 dark:border-sky-800",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
variant: "destructive",
|
|
97
|
+
look: "solid",
|
|
98
|
+
className: "bg-destructive text-white",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
variant: "destructive",
|
|
102
|
+
look: "soft",
|
|
103
|
+
className: "bg-destructive/10 text-destructive",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
variant: "destructive",
|
|
107
|
+
look: "outline",
|
|
108
|
+
className: "text-destructive border-destructive/50",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export declare function BentoGrid({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
export type BentoGridItemProps = React.ComponentProps<"div"> & {
|
|
4
|
+
/** Columns (out of the grid's 3) this item spans. @default 1 */
|
|
5
|
+
colSpan?: 1 | 2 | 3;
|
|
6
|
+
/** Rows this item spans. @default 1 */
|
|
7
|
+
rowSpan?: 1 | 2;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A CSS-grid layout for unevenly-sized cards ("bento box" layouts) — a
|
|
11
|
+
* lightweight layout helper (`grid`+`col-span`/`row-span`), not a
|
|
12
|
+
* dependency-driven masonry/packing algorithm.
|
|
13
|
+
*
|
|
14
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
15
|
+
* @see https://ui.aceternity.com/components/bento-grid
|
|
16
|
+
* @see https://blocks.mvp-subha.me/docs/grids/bento
|
|
17
|
+
*
|
|
18
|
+
* @version 0.1.0
|
|
19
|
+
* @author Forth
|
|
20
|
+
* @copyright 2026 Forth
|
|
21
|
+
*/
|
|
22
|
+
export declare function BentoGridItem({ colSpan, rowSpan, className, ...props }: BentoGridItemProps): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=bento-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-grid.d.ts","sourceRoot":"","sources":["../../../src/components/bento-grid/bento-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7D,gEAAgE;IAChE,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,uCAAuC;IACvC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB,CAAC;AAmBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAW,EACX,OAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAapB"}
|