@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,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
3
|
+
const CHECKS = [
|
|
4
|
+
{ test: (password) => password.length >= 8, label: "At least 8 characters" },
|
|
5
|
+
{
|
|
6
|
+
test: (password) => /[a-z]/.test(password) && /[A-Z]/.test(password),
|
|
7
|
+
label: "Upper & lowercase letters",
|
|
8
|
+
},
|
|
9
|
+
{ test: (password) => /\d/.test(password), label: "At least one number" },
|
|
10
|
+
{
|
|
11
|
+
test: (password) => /[^a-zA-Z0-9]/.test(password),
|
|
12
|
+
label: "At least one symbol",
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
const LABELS = ["Very weak", "Weak", "Fair", "Good", "Strong"];
|
|
16
|
+
const COLORS = [
|
|
17
|
+
"bg-destructive",
|
|
18
|
+
"bg-destructive",
|
|
19
|
+
"bg-amber-500 dark:bg-amber-400",
|
|
20
|
+
"bg-amber-500 dark:bg-amber-400",
|
|
21
|
+
"bg-green-600 dark:bg-green-400",
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* A visual strength meter for a password, pairs with `PasswordInput` —
|
|
25
|
+
* scores against four common heuristics (length, case mix, digit, symbol)
|
|
26
|
+
* rather than a full password-strength library, since those checks are
|
|
27
|
+
* what every reference source actually surfaces to the user anyway.
|
|
28
|
+
*
|
|
29
|
+
* @see https://www.rigidui.com/docs/components/strength-meter
|
|
30
|
+
*
|
|
31
|
+
* @version 0.1.0
|
|
32
|
+
* @author Forth
|
|
33
|
+
* @copyright 2026 Forth
|
|
34
|
+
*/
|
|
35
|
+
export function PasswordStrengthMeter({ password, className, }) {
|
|
36
|
+
const score = CHECKS.filter((check) => check.test(password)).length;
|
|
37
|
+
const failedChecks = CHECKS.filter((check) => !check.test(password));
|
|
38
|
+
return (_jsxs("div", { "data-slot": "password-strength-meter", className: cn("grid gap-1.5", className), children: [_jsx("div", { className: "flex gap-1", children: CHECKS.map((check, index) => (_jsx("div", { className: cn("h-1.5 flex-1 rounded-full transition-colors", index < score ? COLORS[score] : "bg-muted") }, check.label))) }), password.length > 0 && (_jsxs("p", { className: "text-muted-foreground text-xs", children: [LABELS[score], failedChecks.length > 0 &&
|
|
39
|
+
` — missing: ${failedChecks.map((check) => check.label).join(", ")}`] }))] }));
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Progress } from "./progress";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { Progress as ProgressPrimitive } from "@forthtilliath/shadcn-ui/components/progress";
|
|
3
|
+
import type { ProgressVariants } from "./variants";
|
|
4
|
+
export type ProgressProps = React.ComponentProps<typeof ProgressPrimitive> & ProgressVariants & {
|
|
5
|
+
/** A label rendered above the bar, on the left. */
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Shows the numeric `value` (rounded, with a `%` suffix) above the bar,
|
|
9
|
+
* on the right.
|
|
10
|
+
*/
|
|
11
|
+
showValue?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Displays an indicator showing the completion progress of a task.
|
|
15
|
+
*
|
|
16
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
17
|
+
* @see https://ui.shadcn.com/docs/components/progress
|
|
18
|
+
* @see https://ktui.io/docs/progress
|
|
19
|
+
*
|
|
20
|
+
* @version 0.1.0
|
|
21
|
+
* @author Forth
|
|
22
|
+
* @copyright 2026 Forth
|
|
23
|
+
*/
|
|
24
|
+
export declare function Progress({ className, variant, size, label, showValue, value, ...props }: ProgressProps): React.JSX.Element;
|
|
25
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAG7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,GACxE,gBAAgB,GAAG;IACjB,mDAAmD;IACnD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,SAAiB,EACjB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,qBA8Bf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Progress as ProgressPrimitive } from "@forthtilliath/shadcn-ui/components/progress";
|
|
3
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
4
|
+
import { progressVariants } from "./variants";
|
|
5
|
+
/**
|
|
6
|
+
* Displays an indicator showing the completion progress of a task.
|
|
7
|
+
*
|
|
8
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
9
|
+
* @see https://ui.shadcn.com/docs/components/progress
|
|
10
|
+
* @see https://ktui.io/docs/progress
|
|
11
|
+
*
|
|
12
|
+
* @version 0.1.0
|
|
13
|
+
* @author Forth
|
|
14
|
+
* @copyright 2026 Forth
|
|
15
|
+
*/
|
|
16
|
+
export function Progress({ className, variant, size, label, showValue = false, value, ...props }) {
|
|
17
|
+
const bar = (_jsx(ProgressPrimitive, { className: cn(progressVariants({ variant, size }), className), value: value, ...props }));
|
|
18
|
+
const hasLabel = label !== undefined && label !== null;
|
|
19
|
+
if (!hasLabel && !showValue) {
|
|
20
|
+
return bar;
|
|
21
|
+
}
|
|
22
|
+
return (_jsxs("div", { className: "w-full space-y-1.5", children: [(hasLabel || showValue) && (_jsxs("div", { className: "flex items-center justify-between text-sm", children: [hasLabel && _jsx("span", { children: label }), showValue && (_jsxs("span", { className: "text-muted-foreground tabular-nums", children: [Math.round(value ?? 0), "%"] }))] })), bar] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const progressVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "primary" | "success" | "warning" | "info" | "destructive" | null | undefined;
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type ProgressVariants = VariantProps<typeof progressVariants>;
|
|
7
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/progress/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAM7D,eAAO,MAAM,gBAAgB;;;8EAuB3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// shadcn-ui's own Progress hardcodes the indicator's color with no prop to
|
|
3
|
+
// override it — targeted here via its `data-slot="progress-indicator"`
|
|
4
|
+
// attribute from the outer className instead of forking the primitive.
|
|
5
|
+
export const progressVariants = cva("", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "",
|
|
9
|
+
primary: "bg-primary/20 [&>[data-slot=progress-indicator]]:bg-primary",
|
|
10
|
+
success: "bg-green-600/20 [&>[data-slot=progress-indicator]]:bg-green-600",
|
|
11
|
+
warning: "bg-amber-500/20 [&>[data-slot=progress-indicator]]:bg-amber-500",
|
|
12
|
+
info: "bg-sky-600/20 [&>[data-slot=progress-indicator]]:bg-sky-600",
|
|
13
|
+
destructive: "bg-destructive/20 [&>[data-slot=progress-indicator]]:bg-destructive",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "h-1.5",
|
|
17
|
+
default: "h-2",
|
|
18
|
+
lg: "h-3",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "default",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/qr-code/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { QrCode } from "./qr-code";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export interface QrCodeProps extends Omit<React.SVGProps<SVGSVGElement>, "viewBox"> {
|
|
3
|
+
/** The data to encode. */
|
|
4
|
+
value: string;
|
|
5
|
+
/**
|
|
6
|
+
* Error correction level — higher values tolerate more damage/occlusion
|
|
7
|
+
* at the cost of a denser code.
|
|
8
|
+
* @default "M"
|
|
9
|
+
*/
|
|
10
|
+
robustness?: "L" | "M" | "Q" | "H";
|
|
11
|
+
/** @default "currentColor" */
|
|
12
|
+
foreground?: string;
|
|
13
|
+
/** @default "transparent" */
|
|
14
|
+
background?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Generates a QR code from a string, rendered as SVG (no canvas — works in
|
|
18
|
+
* Server Components too).
|
|
19
|
+
*
|
|
20
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
21
|
+
* @see https://www.kibo-ui.com/components/qr-code
|
|
22
|
+
*
|
|
23
|
+
* @version 0.1.0
|
|
24
|
+
* @author Forth
|
|
25
|
+
* @copyright 2026 Forth
|
|
26
|
+
*/
|
|
27
|
+
export declare function QrCode({ value, robustness, foreground, background, className, ...props }: QrCodeProps): React.JSX.Element;
|
|
28
|
+
//# sourceMappingURL=qr-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qr-code.d.ts","sourceRoot":"","sources":["../../../src/components/qr-code/qr-code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC7B,SAAS,CACV;IACC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACnC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,UAAgB,EAChB,UAA2B,EAC3B,UAA0B,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,qBAiCb"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { create } from "qrcode";
|
|
3
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
4
|
+
/**
|
|
5
|
+
* Generates a QR code from a string, rendered as SVG (no canvas — works in
|
|
6
|
+
* Server Components too).
|
|
7
|
+
*
|
|
8
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
9
|
+
* @see https://www.kibo-ui.com/components/qr-code
|
|
10
|
+
*
|
|
11
|
+
* @version 0.1.0
|
|
12
|
+
* @author Forth
|
|
13
|
+
* @copyright 2026 Forth
|
|
14
|
+
*/
|
|
15
|
+
export function QrCode({ value, robustness = "M", foreground = "currentColor", background = "transparent", className, ...props }) {
|
|
16
|
+
const { modules } = create(value, { errorCorrectionLevel: robustness });
|
|
17
|
+
const size = modules.size;
|
|
18
|
+
const cells = [];
|
|
19
|
+
for (let row = 0; row < size; row++) {
|
|
20
|
+
for (let col = 0; col < size; col++) {
|
|
21
|
+
if (modules.get(row, col)) {
|
|
22
|
+
cells.push(_jsx("rect", { x: col, y: row, width: 1, height: 1 }, `${row.toString()}-${col.toString()}`));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return (_jsxs("svg", { viewBox: `0 0 ${size.toString()} ${size.toString()}`, role: "img", "aria-label": `QR code encoding: ${value}`, className: cn("size-32", className), ...props, children: [_jsx("rect", { width: size, height: size, fill: background }), _jsx("g", { fill: foreground, children: cells })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/radio/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioCard } from "./radio-card";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
export type RadioCardProps = React.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A card-style `RadioGroup` item — the whole card is the clickable target,
|
|
10
|
+
* showing label/description/an optional icon plus a checkmark once
|
|
11
|
+
* selected. shadcn-ui's own `RadioGroupItem` only renders the small circle
|
|
12
|
+
* (its `children` prop is discarded in favor of a hardcoded indicator), so
|
|
13
|
+
* this is built directly on the Radix primitive instead. Use it in place
|
|
14
|
+
* of `RadioGroupItem` inside the same shadcn-ui `RadioGroup`.
|
|
15
|
+
*
|
|
16
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
17
|
+
* @see https://ui.shadcn.com/docs/components/radio-group
|
|
18
|
+
* @see https://www.kibo-ui.com/components/choicebox
|
|
19
|
+
*
|
|
20
|
+
* @version 0.1.0
|
|
21
|
+
* @author Forth
|
|
22
|
+
* @copyright 2026 Forth
|
|
23
|
+
*/
|
|
24
|
+
export declare function RadioCard({ label, description, icon, className, ...props }: RadioCardProps): React.JSX.Element;
|
|
25
|
+
//# sourceMappingURL=radio-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-card.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAKnE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAC/C,OAAO,mBAAmB,CAAC,IAAI,CAChC,GAAG;IACF,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBAsBhB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
6
|
+
/**
|
|
7
|
+
* A card-style `RadioGroup` item — the whole card is the clickable target,
|
|
8
|
+
* showing label/description/an optional icon plus a checkmark once
|
|
9
|
+
* selected. shadcn-ui's own `RadioGroupItem` only renders the small circle
|
|
10
|
+
* (its `children` prop is discarded in favor of a hardcoded indicator), so
|
|
11
|
+
* this is built directly on the Radix primitive instead. Use it in place
|
|
12
|
+
* of `RadioGroupItem` inside the same shadcn-ui `RadioGroup`.
|
|
13
|
+
*
|
|
14
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
15
|
+
* @see https://ui.shadcn.com/docs/components/radio-group
|
|
16
|
+
* @see https://www.kibo-ui.com/components/choicebox
|
|
17
|
+
*
|
|
18
|
+
* @version 0.1.0
|
|
19
|
+
* @author Forth
|
|
20
|
+
* @copyright 2026 Forth
|
|
21
|
+
*/
|
|
22
|
+
export function RadioCard({ label, description, icon, className, ...props }) {
|
|
23
|
+
return (_jsxs(RadioGroupPrimitive.Item, { "data-slot": "radio-card", className: cn("border-input hover:bg-accent/50 focus-visible:ring-ring/50 data-[state=checked]:border-primary data-[state=checked]:ring-primary/20 relative flex items-start gap-3 rounded-lg border p-4 text-left shadow-xs transition-colors outline-none focus-visible:ring-[3px] data-[state=checked]:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: [icon, _jsxs("div", { className: "grid gap-1", children: [_jsx("span", { className: "text-sm leading-none font-medium", children: label }), description !== undefined && (_jsx("span", { className: "text-muted-foreground text-sm", children: description }))] }), _jsx(RadioGroupPrimitive.Indicator, { className: "absolute top-3 right-3", children: _jsx(CheckIcon, { className: "text-primary size-4" }) })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rating/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Rating } from "./rating";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RatingProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
onValueChange?: (value: number) => void;
|
|
6
|
+
max?: number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
size?: "sm" | "default" | "lg";
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A star rating control with keyboard navigation (each star is a `radio`
|
|
14
|
+
* in a `radiogroup`) and hover preview.
|
|
15
|
+
*
|
|
16
|
+
* @see https://www.kibo-ui.com/components/rating
|
|
17
|
+
*
|
|
18
|
+
* @version 0.1.0
|
|
19
|
+
* @author Forth
|
|
20
|
+
* @copyright 2026 Forth
|
|
21
|
+
*/
|
|
22
|
+
export declare function Rating({ value, defaultValue, onValueChange, max, disabled, readOnly, size, className, }: RatingProps): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=rating.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/components/rating/rating.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,YAAgB,EAChB,aAAa,EACb,GAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,IAAgB,EAChB,SAAS,GACV,EAAE,WAAW,qBA0Db"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { StarIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
6
|
+
const SIZE_CLASSES = {
|
|
7
|
+
sm: "size-4",
|
|
8
|
+
default: "size-5",
|
|
9
|
+
lg: "size-6",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A star rating control with keyboard navigation (each star is a `radio`
|
|
13
|
+
* in a `radiogroup`) and hover preview.
|
|
14
|
+
*
|
|
15
|
+
* @see https://www.kibo-ui.com/components/rating
|
|
16
|
+
*
|
|
17
|
+
* @version 0.1.0
|
|
18
|
+
* @author Forth
|
|
19
|
+
* @copyright 2026 Forth
|
|
20
|
+
*/
|
|
21
|
+
export function Rating({ value, defaultValue = 0, onValueChange, max = 5, disabled = false, readOnly = false, size = "default", className, }) {
|
|
22
|
+
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue);
|
|
23
|
+
const [hoverValue, setHoverValue] = React.useState(null);
|
|
24
|
+
const current = value ?? uncontrolledValue;
|
|
25
|
+
const displayValue = hoverValue ?? current;
|
|
26
|
+
function commit(next) {
|
|
27
|
+
setUncontrolledValue(next);
|
|
28
|
+
onValueChange?.(next);
|
|
29
|
+
}
|
|
30
|
+
return (_jsx("div", { role: "radiogroup", "aria-disabled": disabled, "data-slot": "rating", className: cn("inline-flex items-center gap-0.5", (disabled || readOnly) && "pointer-events-none", className), onMouseLeave: () => {
|
|
31
|
+
setHoverValue(null);
|
|
32
|
+
}, children: Array.from({ length: max }, (_, i) => i + 1).map((starValue) => (_jsx("button", { type: "button", role: "radio", "aria-checked": current === starValue, "aria-label": `${starValue.toString()} star${starValue > 1 ? "s" : ""}`, disabled: disabled, tabIndex: readOnly ? -1 : 0, onMouseEnter: () => {
|
|
33
|
+
setHoverValue(starValue);
|
|
34
|
+
}, onClick: () => {
|
|
35
|
+
if (!readOnly) {
|
|
36
|
+
commit(starValue);
|
|
37
|
+
}
|
|
38
|
+
}, className: "disabled:cursor-not-allowed disabled:opacity-50", children: _jsx(StarIcon, { className: cn(SIZE_CLASSES[size], "transition-colors", starValue <= displayValue
|
|
39
|
+
? "fill-amber-400 text-amber-400"
|
|
40
|
+
: "fill-none text-muted-foreground") }) }, starValue))) }));
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/relative-time/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RelativeTime } from "./relative-time";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RelativeTimeProps {
|
|
3
|
+
/**
|
|
4
|
+
* Controlled time. Omit for an auto-updating live clock (ticks every
|
|
5
|
+
* second).
|
|
6
|
+
*/
|
|
7
|
+
date?: Date;
|
|
8
|
+
/**
|
|
9
|
+
* IANA timezone (e.g. `"America/New_York"`). Defaults to the viewer's
|
|
10
|
+
* local timezone.
|
|
11
|
+
*/
|
|
12
|
+
timeZone?: string;
|
|
13
|
+
/** A label shown above the time, e.g. `"EST"`. */
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
/** Passed through to `Intl.DateTimeFormat`. */
|
|
16
|
+
formatOptions?: Intl.DateTimeFormatOptions;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Displays a time — live-updating and defaulting to the local timezone
|
|
21
|
+
* unless given a fixed `date`/`timeZone`, e.g. for showing several
|
|
22
|
+
* teammates' local times side by side.
|
|
23
|
+
*
|
|
24
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
25
|
+
* @see https://www.kibo-ui.com/components/relative-time
|
|
26
|
+
*
|
|
27
|
+
* @version 0.1.0
|
|
28
|
+
* @author Forth
|
|
29
|
+
* @copyright 2026 Forth
|
|
30
|
+
*/
|
|
31
|
+
export declare function RelativeTime({ date, timeZone, label, formatOptions, className, }: RelativeTimeProps): React.JSX.Element;
|
|
32
|
+
//# sourceMappingURL=relative-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../../src/components/relative-time/relative-time.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,qBAsDnB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
5
|
+
const TICK_MS = 1000;
|
|
6
|
+
const DEFAULT_FORMAT = {
|
|
7
|
+
hour: "2-digit",
|
|
8
|
+
minute: "2-digit",
|
|
9
|
+
second: "2-digit",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Displays a time — live-updating and defaulting to the local timezone
|
|
13
|
+
* unless given a fixed `date`/`timeZone`, e.g. for showing several
|
|
14
|
+
* teammates' local times side by side.
|
|
15
|
+
*
|
|
16
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
17
|
+
* @see https://www.kibo-ui.com/components/relative-time
|
|
18
|
+
*
|
|
19
|
+
* @version 0.1.0
|
|
20
|
+
* @author Forth
|
|
21
|
+
* @copyright 2026 Forth
|
|
22
|
+
*/
|
|
23
|
+
export function RelativeTime({ date, timeZone, label, formatOptions, className, }) {
|
|
24
|
+
// `liveNow` starts `undefined` (not computed from `new Date()`) on
|
|
25
|
+
// purpose: this component is server-rendered by Next.js like any "use
|
|
26
|
+
// client" component, and the server's clock read would almost certainly
|
|
27
|
+
// disagree with the client's first tick, causing a hydration mismatch.
|
|
28
|
+
// `now` is derived from it rather than synced into its own state — the
|
|
29
|
+
// effect below only ever subscribes to the external timer, it never
|
|
30
|
+
// mirrors the `date` prop.
|
|
31
|
+
const [liveNow, setLiveNow] = React.useState(undefined);
|
|
32
|
+
const now = date ?? liveNow;
|
|
33
|
+
const hasLabel = label !== undefined && label !== null;
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
if (date) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
// The first tick has to happen synchronously here, not just future
|
|
39
|
+
// ones — there's no way to read "now" during render without
|
|
40
|
+
// reintroducing the hydration mismatch this state is starting
|
|
41
|
+
// `undefined` to avoid.
|
|
42
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect, react-hooks/set-state-in-effect
|
|
43
|
+
setLiveNow(new Date());
|
|
44
|
+
const interval = setInterval(() => {
|
|
45
|
+
setLiveNow(new Date());
|
|
46
|
+
}, TICK_MS);
|
|
47
|
+
return () => {
|
|
48
|
+
clearInterval(interval);
|
|
49
|
+
};
|
|
50
|
+
}, [date]);
|
|
51
|
+
const formatted = React.useMemo(() => {
|
|
52
|
+
if (!now) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
56
|
+
...DEFAULT_FORMAT,
|
|
57
|
+
...formatOptions,
|
|
58
|
+
timeZone,
|
|
59
|
+
}).format(now);
|
|
60
|
+
}, [now, timeZone, formatOptions]);
|
|
61
|
+
return (_jsxs("div", { className: cn("flex flex-col items-center gap-0.5", className), suppressHydrationWarning: true, children: [hasLabel && (_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label })), _jsx("span", { className: "font-mono text-sm tabular-nums", children: formatted })] }));
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/reparent/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Reparent } from "./reparent";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ReparentTarget {
|
|
3
|
+
/**
|
|
4
|
+
* A CSS media query (e.g. `"(min-width: 640px)"`). Checked in array
|
|
5
|
+
* order — the first match wins. Omit on one entry (typically the last)
|
|
6
|
+
* to use it as the fallback when nothing else matches.
|
|
7
|
+
*/
|
|
8
|
+
query?: string;
|
|
9
|
+
/** Where `children` gets portaled into when this entry is active. */
|
|
10
|
+
container: React.RefObject<HTMLElement | null>;
|
|
11
|
+
}
|
|
12
|
+
export interface ReparentProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
targets: ReparentTarget[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Moves `children` between different container elements at different
|
|
18
|
+
* screen sizes — e.g. a search box that lives in a mobile menu on small
|
|
19
|
+
* screens and in the header on larger ones — without unmounting it (so its
|
|
20
|
+
* internal state survives the move), via a `createPortal` whose target
|
|
21
|
+
* swaps based on `matchMedia`.
|
|
22
|
+
*
|
|
23
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
24
|
+
* @see https://ktui.io/docs/reparent
|
|
25
|
+
*
|
|
26
|
+
* @version 0.1.0
|
|
27
|
+
* @author Forth
|
|
28
|
+
* @copyright 2026 Forth
|
|
29
|
+
*/
|
|
30
|
+
export declare function Reparent({ children, targets }: ReparentProps): React.ReactPortal | null;
|
|
31
|
+
//# sourceMappingURL=reparent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reparent.d.ts","sourceRoot":"","sources":["../../../src/components/reparent/reparent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,aAAa,4BAyC5D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
/**
|
|
5
|
+
* Moves `children` between different container elements at different
|
|
6
|
+
* screen sizes — e.g. a search box that lives in a mobile menu on small
|
|
7
|
+
* screens and in the header on larger ones — without unmounting it (so its
|
|
8
|
+
* internal state survives the move), via a `createPortal` whose target
|
|
9
|
+
* swaps based on `matchMedia`.
|
|
10
|
+
*
|
|
11
|
+
* _Inspired from multiple sources, to make a consistent and reusable component._
|
|
12
|
+
* @see https://ktui.io/docs/reparent
|
|
13
|
+
*
|
|
14
|
+
* @version 0.1.0
|
|
15
|
+
* @author Forth
|
|
16
|
+
* @copyright 2026 Forth
|
|
17
|
+
*/
|
|
18
|
+
export function Reparent({ children, targets }) {
|
|
19
|
+
const [activeIndex, setActiveIndex] = React.useState(null);
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
const queries = targets
|
|
22
|
+
.map((target) => (target.query ? window.matchMedia(target.query) : null))
|
|
23
|
+
.filter((mql) => mql !== null);
|
|
24
|
+
function evaluate() {
|
|
25
|
+
const index = targets.findIndex((target) => !target.query || window.matchMedia(target.query).matches);
|
|
26
|
+
// Determines which target is active right now — there's no way to
|
|
27
|
+
// know this from render alone (matchMedia is a browser-only API), so
|
|
28
|
+
// the first evaluation has to happen synchronously here, not just on
|
|
29
|
+
// subsequent "change" events.
|
|
30
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect
|
|
31
|
+
setActiveIndex(index === -1 ? null : index);
|
|
32
|
+
}
|
|
33
|
+
evaluate();
|
|
34
|
+
queries.forEach((mql) => {
|
|
35
|
+
mql.addEventListener("change", evaluate);
|
|
36
|
+
});
|
|
37
|
+
return () => {
|
|
38
|
+
queries.forEach((mql) => {
|
|
39
|
+
mql.removeEventListener("change", evaluate);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
}, [targets]);
|
|
43
|
+
if (activeIndex === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const container = targets[activeIndex]?.container.current;
|
|
47
|
+
if (!container) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return createPortal(children, container);
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/repeat/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./repeat";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface RepeatProps {
|
|
3
|
+
/**
|
|
4
|
+
* Number of times to repeat the content
|
|
5
|
+
*/
|
|
6
|
+
count: number;
|
|
7
|
+
/**
|
|
8
|
+
* Function to generate a unique key for each item
|
|
9
|
+
*/
|
|
10
|
+
keyItem?: (index: number) => React.Key;
|
|
11
|
+
/**
|
|
12
|
+
* Function to render each item
|
|
13
|
+
*/
|
|
14
|
+
renderItem: (index: number) => React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Repeat a component a specified number of times.
|
|
18
|
+
*
|
|
19
|
+
* @param {RepeatProps} props - The props for the Repeat component.
|
|
20
|
+
* @param {number} props.count - The number of times to repeat the component.
|
|
21
|
+
* @param {(index: number) => React.Key} [props.keyItem] - A function to generate a unique key for each item.
|
|
22
|
+
* @param {(index: number) => React.ReactNode} props.renderItem - A function to render each item.
|
|
23
|
+
*
|
|
24
|
+
* @returns {React.ReactNode[]} An array of React components, each rendered with the renderItem function.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Repeat({ count, keyItem, renderItem, }: RepeatProps): React.ReactNode[];
|
|
27
|
+
//# sourceMappingURL=repeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../src/components/repeat/repeat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CAChD;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAkB,EAClB,UAAU,GACX,EAAE,WAAW,GAAG,KAAK,CAAC,SAAS,EAAE,CAIjC"}
|