@forthtilliath/forth-ui 0.3.0 → 0.4.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/README.md +75 -22
- package/dist/components/accordion/accordion-items.d.ts +1 -1
- package/dist/components/accordion/accordion-items.d.ts.map +1 -1
- package/dist/components/accordion/accordion-items.js +3 -2
- package/dist/components/accordion/accordion-multiple.d.ts +1 -1
- package/dist/components/accordion/accordion-multiple.d.ts.map +1 -1
- package/dist/components/accordion/accordion-multiple.js +2 -2
- package/dist/components/accordion/accordion-single.d.ts +1 -1
- package/dist/components/accordion/accordion-single.d.ts.map +1 -1
- package/dist/components/accordion/accordion-single.js +2 -2
- package/dist/components/accordion/accordion-trigger.d.ts +15 -0
- package/dist/components/accordion/accordion-trigger.d.ts.map +1 -0
- package/dist/components/accordion/accordion-trigger.js +25 -0
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +2 -2
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/types.d.ts +1 -1
- package/dist/components/accordion/types.d.ts.map +1 -1
- package/dist/components/alert/alert.d.ts +8 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +5 -3
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/alert/index.d.ts.map +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/alert/variants.d.ts.map +1 -1
- package/dist/components/alert/variants.js +11 -4
- package/dist/components/avatar/avatar-group.d.ts +1 -1
- package/dist/components/avatar/avatar-group.d.ts.map +1 -1
- package/dist/components/avatar/avatar-group.js +1 -1
- package/dist/components/avatar/avatar.d.ts +9 -3
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +7 -4
- package/dist/components/avatar/index.d.ts +4 -4
- package/dist/components/avatar/index.d.ts.map +1 -1
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/variants.d.ts.map +1 -1
- package/dist/components/avatar/variants.js +39 -39
- package/dist/components/badge/badge.d.ts +8 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +5 -3
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/index.d.ts.map +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/variants.d.ts.map +1 -1
- package/dist/components/badge/variants.js +8 -4
- package/dist/components/banner/banner.d.ts +8 -2
- package/dist/components/banner/banner.d.ts.map +1 -1
- package/dist/components/banner/banner.js +5 -3
- package/dist/components/banner/index.d.ts +3 -3
- package/dist/components/banner/index.d.ts.map +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/bento-grid/index.d.ts +2 -2
- package/dist/components/bento-grid/index.d.ts.map +1 -1
- package/dist/components/bento-grid/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +8 -3
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/index.d.ts +5 -5
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/chip.d.ts +2 -2
- package/dist/components/chip/chip.d.ts.map +1 -1
- package/dist/components/chip/chip.js +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/index.d.ts.map +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/code-block/code-block.d.ts +7 -1
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +4 -2
- package/dist/components/code-block/index.d.ts +2 -2
- package/dist/components/code-block/index.d.ts.map +1 -1
- package/dist/components/code-block/index.js +1 -1
- package/dist/components/collapsible/index.d.ts +6 -6
- package/dist/components/collapsible/index.d.ts.map +1 -1
- package/dist/components/collapsible/index.js +3 -3
- package/dist/components/color-picker/color-picker.d.ts +7 -1
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/color-picker.js +5 -3
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/column-menu/column-menu.d.ts +1 -1
- package/dist/components/column-menu/column-menu.d.ts.map +1 -1
- package/dist/components/column-menu/column-menu.js +3 -3
- package/dist/components/column-menu/index.d.ts +5 -5
- package/dist/components/column-menu/index.d.ts.map +1 -1
- package/dist/components/column-menu/index.js +3 -3
- package/dist/components/column-menu/sortable-column-row.d.ts +1 -1
- package/dist/components/column-menu/sortable-column-row.d.ts.map +1 -1
- package/dist/components/column-menu/sortable-column-row.js +1 -1
- package/dist/components/combobox/combobox.d.ts +16 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +7 -3
- package/dist/components/combobox/index.d.ts +4 -4
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/multi-select.d.ts +17 -2
- package/dist/components/combobox/multi-select.d.ts.map +1 -1
- package/dist/components/combobox/multi-select.js +8 -4
- package/dist/components/command-palette/command-palette.d.ts +7 -1
- package/dist/components/command-palette/command-palette.d.ts.map +1 -1
- package/dist/components/command-palette/command-palette.js +6 -2
- package/dist/components/command-palette/index.d.ts +2 -2
- package/dist/components/command-palette/index.d.ts.map +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +7 -1
- package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.js +12 -6
- package/dist/components/confirm-dialog/index.d.ts +3 -3
- package/dist/components/confirm-dialog/index.d.ts.map +1 -1
- package/dist/components/confirm-dialog/index.js +2 -2
- package/dist/components/confirm-dialog/use-confirm.d.ts +1 -1
- package/dist/components/confirm-dialog/use-confirm.d.ts.map +1 -1
- package/dist/components/confirm-dialog/use-confirm.js +1 -1
- package/dist/components/copy-menu-item/copy-menu-item.d.ts +18 -0
- package/dist/components/copy-menu-item/copy-menu-item.d.ts.map +1 -0
- package/dist/components/copy-menu-item/copy-menu-item.js +23 -0
- package/dist/components/copy-menu-item/index.d.ts +3 -0
- package/dist/components/copy-menu-item/index.d.ts.map +1 -0
- package/dist/components/copy-menu-item/index.js +1 -0
- package/dist/components/count-animation/index.d.ts +2 -2
- package/dist/components/count-animation/index.d.ts.map +1 -1
- package/dist/components/count-animation/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +7 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +6 -3
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/description-list/index.d.ts +1 -1
- package/dist/components/description-list/index.d.ts.map +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dropdrawer/index.d.ts +2 -2
- package/dist/components/dropdrawer/index.d.ts.map +1 -1
- package/dist/components/dropdrawer/index.js +1 -1
- package/dist/components/dropzone/dropzone.d.ts +7 -1
- package/dist/components/dropzone/dropzone.d.ts.map +1 -1
- package/dist/components/dropzone/dropzone.js +5 -3
- package/dist/components/dropzone/index.d.ts +2 -2
- package/dist/components/dropzone/index.d.ts.map +1 -1
- package/dist/components/dropzone/index.js +1 -1
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/field/index.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/file-list/file-list.d.ts +4 -1
- package/dist/components/file-list/file-list.d.ts.map +1 -1
- package/dist/components/file-list/file-list.js +4 -1
- package/dist/components/file-list/index.d.ts +2 -2
- package/dist/components/file-list/index.d.ts.map +1 -1
- package/dist/components/file-list/index.js +1 -1
- package/dist/components/gradient-frame/index.d.ts +2 -2
- package/dist/components/gradient-frame/index.d.ts.map +1 -1
- package/dist/components/gradient-frame/index.js +1 -1
- package/dist/components/grid/context.d.ts.map +1 -1
- package/dist/components/grid/context.js +1 -0
- package/dist/components/grid/grid-item.d.ts +1 -1
- package/dist/components/grid/grid-item.d.ts.map +1 -1
- package/dist/components/grid/grid-item.js +3 -2
- package/dist/components/grid/grid.d.ts +3 -3
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +4 -3
- package/dist/components/grid/index.d.ts +2 -2
- package/dist/components/grid/index.d.ts.map +1 -1
- package/dist/components/grid/index.js +2 -2
- package/dist/components/grid/variants.d.ts +1 -1
- package/dist/components/icon-bubble/icon-bubble.d.ts +1 -1
- package/dist/components/icon-bubble/icon-bubble.d.ts.map +1 -1
- package/dist/components/icon-bubble/icon-bubble.js +1 -1
- package/dist/components/icon-bubble/index.d.ts +3 -3
- package/dist/components/icon-bubble/index.d.ts.map +1 -1
- package/dist/components/icon-bubble/index.js +1 -1
- package/dist/components/image-input/image-input.d.ts +7 -1
- package/dist/components/image-input/image-input.d.ts.map +1 -1
- package/dist/components/image-input/image-input.js +4 -2
- package/dist/components/image-input/index.d.ts +2 -2
- package/dist/components/image-input/index.d.ts.map +1 -1
- package/dist/components/image-input/index.js +1 -1
- package/dist/components/infinite-scroll/index.d.ts +2 -2
- package/dist/components/infinite-scroll/index.d.ts.map +1 -1
- package/dist/components/infinite-scroll/index.js +1 -1
- package/dist/components/kbd/index.d.ts +1 -1
- package/dist/components/kbd/index.d.ts.map +1 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/link/index.d.ts +6 -6
- package/dist/components/link/index.d.ts.map +1 -1
- package/dist/components/link/index.js +3 -3
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/link.js +1 -1
- package/dist/components/marquee/index.d.ts +2 -2
- package/dist/components/marquee/index.d.ts.map +1 -1
- package/dist/components/marquee/index.js +1 -1
- package/dist/components/mode-toggle/index.d.ts +4 -0
- package/dist/components/mode-toggle/index.d.ts.map +1 -0
- package/dist/components/mode-toggle/index.js +2 -0
- package/dist/components/mode-toggle/mode-toggle.d.ts +22 -0
- package/dist/components/mode-toggle/mode-toggle.d.ts.map +1 -0
- package/dist/components/mode-toggle/mode-toggle.js +26 -0
- package/dist/components/mode-toggle/theme-provider.d.ts +13 -0
- package/dist/components/mode-toggle/theme-provider.d.ts.map +1 -0
- package/dist/components/mode-toggle/theme-provider.js +15 -0
- package/dist/components/multi-step-loader/index.d.ts +2 -2
- package/dist/components/multi-step-loader/index.d.ts.map +1 -1
- package/dist/components/multi-step-loader/index.js +1 -1
- package/dist/components/multi-step-loader/multi-step-loader.js +2 -2
- package/dist/components/navbar/index.d.ts +4 -4
- package/dist/components/navbar/index.d.ts.map +1 -1
- package/dist/components/navbar/index.js +2 -2
- package/dist/components/navbar/navbar-mobile-menu.d.ts +7 -1
- package/dist/components/navbar/navbar-mobile-menu.d.ts.map +1 -1
- package/dist/components/navbar/navbar-mobile-menu.js +5 -3
- package/dist/components/notification-center/index.d.ts +2 -2
- package/dist/components/notification-center/index.d.ts.map +1 -1
- package/dist/components/notification-center/index.js +1 -1
- package/dist/components/notification-center/notification-center.d.ts +7 -1
- package/dist/components/notification-center/notification-center.d.ts.map +1 -1
- package/dist/components/notification-center/notification-center.js +7 -4
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/number-input/index.d.ts.map +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +7 -1
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/number-input/number-input.js +6 -4
- package/dist/components/pagination/index.d.ts +4 -4
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/index.js +2 -2
- package/dist/components/pagination/pagination.d.ts +8 -2
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +12 -9
- package/dist/components/password-input/index.d.ts +4 -4
- package/dist/components/password-input/index.d.ts.map +1 -1
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/password-input/password-input.d.ts +9 -2
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/password-input/password-input.js +4 -2
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/index.d.ts.map +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +5 -2
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +5 -3
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/qr-code/index.d.ts.map +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/qr-code.d.ts +7 -1
- package/dist/components/qr-code/qr-code.d.ts.map +1 -1
- package/dist/components/qr-code/qr-code.js +5 -2
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/rating/index.d.ts +2 -2
- package/dist/components/rating/index.d.ts.map +1 -1
- package/dist/components/rating/index.js +1 -1
- package/dist/components/rating/rating.d.ts +7 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +23 -2
- package/dist/components/relative-time/index.d.ts +2 -2
- package/dist/components/relative-time/index.d.ts.map +1 -1
- package/dist/components/relative-time/index.js +1 -1
- package/dist/components/reparent/index.d.ts +2 -2
- package/dist/components/reparent/index.d.ts.map +1 -1
- package/dist/components/reparent/index.js +1 -1
- package/dist/components/repeat/index.d.ts +1 -1
- package/dist/components/repeat/index.d.ts.map +1 -1
- package/dist/components/repeat/index.js +1 -1
- package/dist/components/scroll-progress/index.d.ts +2 -2
- package/dist/components/scroll-progress/index.d.ts.map +1 -1
- package/dist/components/scroll-progress/index.js +1 -1
- package/dist/components/scroll-shadow/index.d.ts +2 -2
- package/dist/components/scroll-shadow/index.d.ts.map +1 -1
- package/dist/components/scroll-shadow/index.js +1 -1
- package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -1
- package/dist/components/scroll-shadow/scroll-shadow.js +3 -1
- package/dist/components/scrollspy/index.d.ts +2 -2
- package/dist/components/scrollspy/index.d.ts.map +1 -1
- package/dist/components/scrollspy/index.js +1 -1
- package/dist/components/separator/index.d.ts +2 -2
- package/dist/components/separator/index.d.ts.map +1 -1
- package/dist/components/separator/index.js +1 -1
- package/dist/components/snippet/index.d.ts +2 -2
- package/dist/components/snippet/index.d.ts.map +1 -1
- package/dist/components/snippet/index.js +1 -1
- package/dist/components/snippet/snippet.d.ts +7 -1
- package/dist/components/snippet/snippet.d.ts.map +1 -1
- package/dist/components/snippet/snippet.js +6 -2
- package/dist/components/sortable/index.d.ts +2 -2
- package/dist/components/sortable/index.d.ts.map +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/spacer/index.d.ts +2 -2
- package/dist/components/spacer/index.d.ts.map +1 -1
- package/dist/components/spacer/index.js +1 -1
- package/dist/components/spinner/index.d.ts +3 -3
- package/dist/components/spinner/index.d.ts.map +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts +8 -2
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +6 -3
- package/dist/components/stepper/index.d.ts +2 -2
- package/dist/components/stepper/index.d.ts.map +1 -1
- package/dist/components/stepper/index.js +1 -1
- package/dist/components/submit-button/index.d.ts +2 -2
- package/dist/components/submit-button/index.d.ts.map +1 -1
- package/dist/components/submit-button/index.js +1 -1
- package/dist/components/submit-button/submit-button.d.ts +1 -1
- package/dist/components/submit-button/submit-button.d.ts.map +1 -1
- package/dist/components/submit-button/submit-button.js +1 -1
- package/dist/components/tags-input/index.d.ts +2 -2
- package/dist/components/tags-input/index.d.ts.map +1 -1
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/tags-input.d.ts +14 -1
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/tags-input.js +7 -4
- package/dist/components/theme-image/index.d.ts +3 -0
- package/dist/components/theme-image/index.d.ts.map +1 -0
- package/dist/components/theme-image/index.js +1 -0
- package/dist/components/theme-image/theme-image.d.ts +25 -0
- package/dist/components/theme-image/theme-image.d.ts.map +1 -0
- package/dist/components/theme-image/theme-image.js +19 -0
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline/index.d.ts.map +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle-switch/index.d.ts +3 -3
- package/dist/components/toggle-switch/index.d.ts.map +1 -1
- package/dist/components/toggle-switch/index.js +1 -1
- package/dist/components/toggle-switch/toggle-switch.d.ts +1 -1
- package/dist/components/toggle-switch/toggle-switch.d.ts.map +1 -1
- package/dist/components/toggle-switch/toggle-switch.js +1 -1
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.d.ts.map +1 -1
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree/tree.js +1 -1
- package/dist/globals.css +1188 -72
- package/dist/locale/UiLocaleProvider.d.ts +19 -0
- package/dist/locale/UiLocaleProvider.d.ts.map +1 -0
- package/dist/locale/UiLocaleProvider.js +17 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +3 -0
- package/dist/locale/locale.d.ts +15 -0
- package/dist/locale/locale.d.ts.map +1 -0
- package/dist/locale/locale.js +19 -0
- package/dist/locale/messages.d.ts +98 -0
- package/dist/locale/messages.d.ts.map +1 -0
- package/dist/locale/messages.js +99 -0
- package/package.json +30 -14
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { DropdownMenuItem } from "@forthtilliath/shadcn-ui/components/dropdown-menu";
|
|
3
|
+
export type CopyMenuItemProps = Omit<React.ComponentProps<typeof DropdownMenuItem>, "children"> & {
|
|
4
|
+
/** Text copied to the clipboard on select. */
|
|
5
|
+
value: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A `DropdownMenuItem` that copies `value` to the clipboard on select and
|
|
10
|
+
* shows a checkmark for a couple of seconds — the menu stays open (its
|
|
11
|
+
* `onSelect` default is prevented) so the user sees the confirmation.
|
|
12
|
+
*
|
|
13
|
+
* @version 0.1.0
|
|
14
|
+
* @author Forth
|
|
15
|
+
* @copyright 2026 Forth
|
|
16
|
+
*/
|
|
17
|
+
export declare function CopyMenuItem({ value, children, onSelect, ...props }: CopyMenuItemProps): React.JSX.Element;
|
|
18
|
+
//# sourceMappingURL=copy-menu-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-menu-item.d.ts","sourceRoot":"","sources":["../../../src/components/copy-menu-item/copy-menu-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,EAC7C,UAAU,CACX,GAAG;IACF,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAiBnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
4
|
+
import { useCopyToClipboard } from "@forthtilliath/react-kit/useCopyToClipboard";
|
|
5
|
+
import { DropdownMenuItem } from "@forthtilliath/shadcn-ui/components/dropdown-menu";
|
|
6
|
+
/**
|
|
7
|
+
* A `DropdownMenuItem` that copies `value` to the clipboard on select and
|
|
8
|
+
* shows a checkmark for a couple of seconds — the menu stays open (its
|
|
9
|
+
* `onSelect` default is prevented) so the user sees the confirmation.
|
|
10
|
+
*
|
|
11
|
+
* @version 0.1.0
|
|
12
|
+
* @author Forth
|
|
13
|
+
* @copyright 2026 Forth
|
|
14
|
+
*/
|
|
15
|
+
export function CopyMenuItem({ value, children, onSelect, ...props }) {
|
|
16
|
+
const [copiedText, copy] = useCopyToClipboard();
|
|
17
|
+
const copied = copiedText === value;
|
|
18
|
+
return (_jsxs(DropdownMenuItem, { ...props, onSelect: (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
void copy(value);
|
|
21
|
+
onSelect?.(event);
|
|
22
|
+
}, children: [copied ? _jsx(CheckIcon, {}) : _jsx(CopyIcon, {}), children] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/copy-menu-item/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CopyMenuItem } from "./copy-menu-item.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { CountAnimationProps } from "./count-animation";
|
|
2
|
-
export { CountAnimation } from "./count-animation";
|
|
1
|
+
export type { CountAnimationProps } from "./count-animation.js";
|
|
2
|
+
export { CountAnimation } from "./count-animation.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/count-animation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/count-animation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CountAnimation } from "./count-animation";
|
|
1
|
+
export { CountAnimation } from "./count-animation.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type UiLocale } from "../../locale/locale.js";
|
|
2
3
|
export interface DatePickerProps {
|
|
3
4
|
value?: Date;
|
|
4
5
|
defaultValue?: Date;
|
|
@@ -8,6 +9,11 @@ export interface DatePickerProps {
|
|
|
8
9
|
className?: string;
|
|
9
10
|
/** Passed through to `Date.prototype.toLocaleDateString`. */
|
|
10
11
|
formatOptions?: Intl.DateTimeFormatOptions;
|
|
12
|
+
/**
|
|
13
|
+
* Language of the built-in labels — French by default, or the nearest
|
|
14
|
+
* `UiLocaleProvider`'s. Explicit text props still win.
|
|
15
|
+
*/
|
|
16
|
+
locale?: UiLocale;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
19
|
* A single-date picker — shadcn-ui's own docs describe this as a recipe
|
|
@@ -23,5 +29,5 @@ export interface DatePickerProps {
|
|
|
23
29
|
* @author Forth
|
|
24
30
|
* @copyright 2026 Forth
|
|
25
31
|
*/
|
|
26
|
-
export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, className, formatOptions, }: DatePickerProps): React.JSX.Element;
|
|
32
|
+
export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, className, formatOptions, locale, }: DatePickerProps): React.JSX.Element;
|
|
27
33
|
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAGtE,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,QAAgB,EAChB,SAAS,EACT,aAAsC,EACtC,MAAM,GACP,EAAE,eAAe,qBA6CjB"}
|
|
@@ -5,7 +5,8 @@ import { CalendarIcon } from "lucide-react";
|
|
|
5
5
|
import { Calendar } from "@forthtilliath/shadcn-ui/components/calendar";
|
|
6
6
|
import { Popover, PopoverContent, PopoverTrigger, } from "@forthtilliath/shadcn-ui/components/popover";
|
|
7
7
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
8
|
-
import {
|
|
8
|
+
import { useUiMessages } from "../../locale/locale.js";
|
|
9
|
+
import { Button } from "../button/index.js";
|
|
9
10
|
const DEFAULT_FORMAT_OPTIONS = {
|
|
10
11
|
dateStyle: "long",
|
|
11
12
|
};
|
|
@@ -23,13 +24,15 @@ const DEFAULT_FORMAT_OPTIONS = {
|
|
|
23
24
|
* @author Forth
|
|
24
25
|
* @copyright 2026 Forth
|
|
25
26
|
*/
|
|
26
|
-
export function DatePicker({ value, defaultValue, onValueChange, placeholder
|
|
27
|
+
export function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled = false, className, formatOptions = DEFAULT_FORMAT_OPTIONS, locale, }) {
|
|
28
|
+
const messages = useUiMessages(locale);
|
|
29
|
+
const placeholderText = placeholder ?? messages.datePicker.placeholder;
|
|
27
30
|
const [open, setOpen] = React.useState(false);
|
|
28
31
|
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue);
|
|
29
32
|
const selected = value ?? uncontrolledValue;
|
|
30
33
|
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, className: cn("w-full justify-start text-left font-normal", selected === undefined && "text-muted-foreground", className), children: [_jsx(CalendarIcon, {}), selected !== undefined
|
|
31
34
|
? selected.toLocaleDateString(undefined, formatOptions)
|
|
32
|
-
:
|
|
35
|
+
: placeholderText] }) }), _jsx(PopoverContent, { "aria-label": placeholderText, className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", selected: selected, onSelect: (date) => {
|
|
33
36
|
setUncontrolledValue(date);
|
|
34
37
|
onValueChange?.(date);
|
|
35
38
|
setOpen(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { DatePickerProps } from "./date-picker";
|
|
2
|
-
export { DatePicker } from "./date-picker";
|
|
1
|
+
export type { DatePickerProps } from "./date-picker.js";
|
|
2
|
+
export { DatePicker } from "./date-picker.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DatePicker } from "./date-picker";
|
|
1
|
+
export { DatePicker } from "./date-picker.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DescriptionDetail, DescriptionGroup, DescriptionList, DescriptionTerm, } from "./description-list";
|
|
1
|
+
export { DescriptionDetail, DescriptionGroup, DescriptionList, DescriptionTerm, } from "./description-list.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/description-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/description-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DescriptionDetail, DescriptionGroup, DescriptionList, DescriptionTerm, } from "./description-list";
|
|
1
|
+
export { DescriptionDetail, DescriptionGroup, DescriptionList, DescriptionTerm, } from "./description-list.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { DropdrawerItem, DropdrawerProps } from "./dropdrawer";
|
|
2
|
-
export { Dropdrawer } from "./dropdrawer";
|
|
1
|
+
export type { DropdrawerItem, DropdrawerProps } from "./dropdrawer.js";
|
|
2
|
+
export { Dropdrawer } from "./dropdrawer.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdrawer/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdrawer/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dropdrawer } from "./dropdrawer";
|
|
1
|
+
export { Dropdrawer } from "./dropdrawer.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type UiLocale } from "../../locale/locale.js";
|
|
2
3
|
export interface DropzoneProps {
|
|
3
4
|
value?: File[];
|
|
4
5
|
defaultValue?: File[];
|
|
@@ -10,6 +11,11 @@ export interface DropzoneProps {
|
|
|
10
11
|
maxSize?: number;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Language of the built-in labels — French by default, or the nearest
|
|
16
|
+
* `UiLocaleProvider`'s. Explicit text props still win.
|
|
17
|
+
*/
|
|
18
|
+
locale?: UiLocale;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* A drag-and-drop file upload zone, listing accepted files below via
|
|
@@ -23,5 +29,5 @@ export interface DropzoneProps {
|
|
|
23
29
|
* @author Forth
|
|
24
30
|
* @copyright 2026 Forth
|
|
25
31
|
*/
|
|
26
|
-
export declare function Dropzone({ value, defaultValue, onValueChange, accept, multiple, maxFiles, maxSize, disabled, className, }: DropzoneProps): React.JSX.Element;
|
|
32
|
+
export declare function Dropzone({ value, defaultValue, onValueChange, accept, multiple, maxFiles, maxSize, disabled, className, locale, }: DropzoneProps): React.JSX.Element;
|
|
27
33
|
//# sourceMappingURL=dropzone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone.d.ts","sourceRoot":"","sources":["../../../src/components/dropzone/dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dropzone.d.ts","sourceRoot":"","sources":["../../../src/components/dropzone/dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAatE,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAkBD;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,QAAe,EACf,QAAQ,EACR,OAAO,EACP,QAAgB,EAChB,SAAS,EACT,MAAM,GACP,EAAE,aAAa,qBA+Hf"}
|
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { FileIcon, UploadIcon, XIcon } from "lucide-react";
|
|
5
5
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
6
|
-
import {
|
|
6
|
+
import { useUiMessages } from "../../locale/locale.js";
|
|
7
|
+
import { FileList, FileListAction, FileListActions, FileListDescription, FileListHeader, FileListIcon, FileListInfo, FileListItem, FileListName, } from "../file-list/index.js";
|
|
7
8
|
function formatBytes(bytes) {
|
|
8
9
|
if (bytes === 0) {
|
|
9
10
|
return "0 B";
|
|
@@ -27,7 +28,8 @@ function fileKey(file) {
|
|
|
27
28
|
* @author Forth
|
|
28
29
|
* @copyright 2026 Forth
|
|
29
30
|
*/
|
|
30
|
-
export function Dropzone({ value, defaultValue, onValueChange, accept, multiple = true, maxFiles, maxSize, disabled = false, className, }) {
|
|
31
|
+
export function Dropzone({ value, defaultValue, onValueChange, accept, multiple = true, maxFiles, maxSize, disabled = false, className, locale, }) {
|
|
32
|
+
const messages = useUiMessages(locale);
|
|
31
33
|
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue ?? []);
|
|
32
34
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
33
35
|
const inputRef = React.useRef(null);
|
|
@@ -79,5 +81,5 @@ export function Dropzone({ value, defaultValue, onValueChange, accept, multiple
|
|
|
79
81
|
e.target.value = "";
|
|
80
82
|
} })] }), files.length > 0 && (_jsx(FileList, { children: files.map((file) => (_jsx(FileListItem, { children: _jsxs(FileListHeader, { children: [_jsx(FileListIcon, { children: _jsx(FileIcon, {}) }), _jsxs(FileListInfo, { children: [_jsx(FileListName, { children: file.name }), _jsx(FileListDescription, { children: formatBytes(file.size) })] }), _jsx(FileListActions, { children: _jsx(FileListAction, { onClick: () => {
|
|
81
83
|
removeFile(file);
|
|
82
|
-
}, "aria-label":
|
|
84
|
+
}, "aria-label": messages.dropzone.removeFile, children: _jsx(XIcon, {}) }) })] }) }, fileKey(file)))) }))] }));
|
|
83
85
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { DropzoneProps } from "./dropzone";
|
|
2
|
-
export { Dropzone } from "./dropzone";
|
|
1
|
+
export type { DropzoneProps } from "./dropzone.js";
|
|
2
|
+
export { Dropzone } from "./dropzone.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropzone/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropzone/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dropzone } from "./dropzone";
|
|
1
|
+
export { Dropzone } from "./dropzone.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { FieldProps } from "./field";
|
|
2
|
-
export { Field } from "./field";
|
|
1
|
+
export type { FieldProps } from "./field.js";
|
|
2
|
+
export { Field } from "./field.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/field/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/field/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Field } from "./field";
|
|
1
|
+
export { Field } from "./field.js";
|
|
@@ -24,6 +24,9 @@ export declare function FileListActions({ className, ...props }: React.Component
|
|
|
24
24
|
export declare function FileListAction({ className, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
25
25
|
export declare function FileListContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
26
26
|
export type FileListProgressProps = React.ComponentProps<typeof Progress>;
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Wraps shadcn-ui's `Progress` for the upload-progress row. Give it an
|
|
29
|
+
* `aria-label` (e.g. "Uploading report.pdf"): a progress bar needs a name.
|
|
30
|
+
*/
|
|
28
31
|
export declare function FileListProgress(props: FileListProgressProps): React.JSX.Element;
|
|
29
32
|
//# sourceMappingURL=file-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-list.d.ts","sourceRoot":"","sources":["../../../src/components/file-list/file-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAGxE;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ3E;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ3B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW3B;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAYhC;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAI7B;AAED,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"file-list.d.ts","sourceRoot":"","sources":["../../../src/components/file-list/file-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAGxE;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ3E;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ3B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW3B;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAYhC;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAI7B;AAED,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAE5D"}
|
|
@@ -46,7 +46,10 @@ export function FileListAction({ className, ...props }) {
|
|
|
46
46
|
export function FileListContent({ className, ...props }) {
|
|
47
47
|
return (_jsx("div", { "data-slot": "file-list-content", className: cn(className), ...props }));
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Wraps shadcn-ui's `Progress` for the upload-progress row. Give it an
|
|
51
|
+
* `aria-label` (e.g. "Uploading report.pdf"): a progress bar needs a name.
|
|
52
|
+
*/
|
|
50
53
|
export function FileListProgress(props) {
|
|
51
54
|
return _jsx(Progress, { "data-slot": "file-list-progress", ...props });
|
|
52
55
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { FileListProgressProps } from "./file-list";
|
|
2
|
-
export { FileList, FileListAction, FileListActions, FileListContent, FileListDescription, FileListDescriptionSeparator, FileListHeader, FileListIcon, FileListInfo, FileListItem, FileListName, FileListProgress, } from "./file-list";
|
|
1
|
+
export type { FileListProgressProps } from "./file-list.js";
|
|
2
|
+
export { FileList, FileListAction, FileListActions, FileListContent, FileListDescription, FileListDescriptionSeparator, FileListHeader, FileListIcon, FileListInfo, FileListItem, FileListName, FileListProgress, } from "./file-list.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-list/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-list/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,4BAA4B,EAC5B,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FileList, FileListAction, FileListActions, FileListContent, FileListDescription, FileListDescriptionSeparator, FileListHeader, FileListIcon, FileListInfo, FileListItem, FileListName, FileListProgress, } from "./file-list";
|
|
1
|
+
export { FileList, FileListAction, FileListActions, FileListContent, FileListDescription, FileListDescriptionSeparator, FileListHeader, FileListIcon, FileListInfo, FileListItem, FileListName, FileListProgress, } from "./file-list.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { GradientFrameProps } from "./gradient-frame";
|
|
2
|
-
export { GradientFrame } from "./gradient-frame";
|
|
1
|
+
export type { GradientFrameProps } from "./gradient-frame.js";
|
|
2
|
+
export { GradientFrame } from "./gradient-frame.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/gradient-frame/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/gradient-frame/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GradientFrame } from "./gradient-frame";
|
|
1
|
+
export { GradientFrame } from "./gradient-frame.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/grid/context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/grid/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,gBAAgB;IAC3B,8BAA8B;YACtB,OAAO;mBACA,OAAO;EAGtB,CAAC;AAEH,eAAO,MAAM,mBAAmB;IAP9B,8BAA8B;YACtB,OAAO;mBACA,OAAO;CAK4C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import type { Prettify } from "@forthtilliath/ts-types/object";
|
|
3
|
-
import { type GridItemVariants } from "./variants";
|
|
3
|
+
import { type GridItemVariants } from "./variants.js";
|
|
4
4
|
type Props = Prettify<GridItemVariants & React.ComponentProps<"div"> & {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-item.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid-item.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid-item.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,eAAe,CAAC;AAEvB,KAAK,KAAK,GAAG,QAAQ,CACnB,gBAAgB,GACd,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CACJ,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkB3B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
3
|
-
import { useGridDebugContext } from "./context";
|
|
4
|
-
import { gridItemDebugVariants, gridItemVariants, } from "./variants";
|
|
4
|
+
import { useGridDebugContext } from "./context.js";
|
|
5
|
+
import { gridItemDebugVariants, gridItemVariants, } from "./variants.js";
|
|
5
6
|
/**
|
|
6
7
|
* A GridItem is a component that represents an item inside a Grid.
|
|
7
8
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { ClassValue } from "clsx";
|
|
3
3
|
import { type Prettify } from "@forthtilliath/ts-types/object";
|
|
4
|
-
import { GridItem } from "./grid-item";
|
|
5
|
-
import type { GridVariants } from "./variants";
|
|
4
|
+
import { GridItem } from "./grid-item.js";
|
|
5
|
+
import type { GridVariants } from "./variants.js";
|
|
6
6
|
export type GridProps = Prettify<{
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
debug?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,QAAQ,CAC9B;IACE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB,GAAG,YAAY,GACd,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,CAC1D,CAAC;AAEF,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAc,EACd,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,SAAS,qBAqBX;yBA7Be,IAAI"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useMemo, useState } from "react";
|
|
3
4
|
import { useKeyListener } from "@forthtilliath/react-kit/useKeyListener";
|
|
4
5
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
5
|
-
import { GridDebugContext } from "./context";
|
|
6
|
-
import { GridItem } from "./grid-item";
|
|
7
|
-
import { gridVariants } from "./variants";
|
|
6
|
+
import { GridDebugContext } from "./context.js";
|
|
7
|
+
import { GridItem } from "./grid-item.js";
|
|
8
|
+
import { gridVariants } from "./variants.js";
|
|
8
9
|
export function Grid({ children, className, debug, debugKey = "g", cols, spacing, ...props }) {
|
|
9
10
|
const [isDebugActive, setIsDebugActive] = useState(true);
|
|
10
11
|
const contextValue = useMemo(() => ({ debug, isDebugActive }), [debug, isDebugActive]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./grid";
|
|
2
|
-
export * from "./grid-item";
|
|
1
|
+
export * from "./grid.js";
|
|
2
|
+
export * from "./grid-item.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./grid";
|
|
2
|
-
export * from "./grid-item";
|
|
1
|
+
export * from "./grid.js";
|
|
2
|
+
export * from "./grid-item.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VariantProps } from "class-variance-authority";
|
|
2
2
|
export declare const gridVariants: (props?: ({
|
|
3
3
|
cols?: 1 | 2 | 3 | 7 | 10 | 5 | 12 | 4 | 6 | 8 | 9 | 11 | null | undefined;
|
|
4
|
-
spacing?: "
|
|
4
|
+
spacing?: "none" | "sm" | "lg" | "xs" | "md" | "xl" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export type GridVariants = VariantProps<typeof gridVariants>;
|
|
7
7
|
export declare const gridItemVariants: (props?: ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type { IconBubbleVariants } from "./variants";
|
|
2
|
+
import type { IconBubbleVariants } from "./variants.js";
|
|
3
3
|
export type IconBubbleProps = Omit<React.ComponentProps<"span">, "children"> & IconBubbleVariants & {
|
|
4
4
|
/** Icon component, e.g. a `lucide-react` icon. Decorative (`aria-hidden`). */
|
|
5
5
|
icon: React.ComponentType<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-bubble.d.ts","sourceRoot":"","sources":["../../../src/components/icon-bubble/icon-bubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"icon-bubble.d.ts","sourceRoot":"","sources":["../../../src/components/icon-bubble/icon-bubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAC1E,kBAAkB,GAAG;IACnB,8EAA8E;IAC9E,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;KAC5C,CAAC,CAAC;CACJ,CAAC;AAEJ;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EAAE,IAAI,EACV,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,qBAajB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
3
|
-
import { ICON_BUBBLE_ICON_SIZES, iconBubbleVariants } from "./variants";
|
|
3
|
+
import { ICON_BUBBLE_ICON_SIZES, iconBubbleVariants } from "./variants.js";
|
|
4
4
|
/**
|
|
5
5
|
* An icon inside a round, tinted bubble — e.g. to lead an information line
|
|
6
6
|
* (date, place…). Tinted with `primary` by default; override both the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { IconBubbleProps } from "./icon-bubble";
|
|
2
|
-
export { IconBubble } from "./icon-bubble";
|
|
3
|
-
export type { IconBubbleVariants } from "./variants";
|
|
1
|
+
export type { IconBubbleProps } from "./icon-bubble.js";
|
|
2
|
+
export { IconBubble } from "./icon-bubble.js";
|
|
3
|
+
export type { IconBubbleVariants } from "./variants.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon-bubble/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon-bubble/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IconBubble } from "./icon-bubble";
|
|
1
|
+
export { IconBubble } from "./icon-bubble.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type UiLocale } from "../../locale/locale.js";
|
|
2
3
|
export interface ImageInputProps {
|
|
3
4
|
/** An existing image URL to preview (e.g. editing something that already has one). */
|
|
4
5
|
value?: string | null;
|
|
@@ -7,6 +8,11 @@ export interface ImageInputProps {
|
|
|
7
8
|
className?: string;
|
|
8
9
|
/** @default "16/9" */
|
|
9
10
|
aspectRatio?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Language of the built-in labels — French by default, or the nearest
|
|
13
|
+
* `UiLocaleProvider`'s. Explicit text props still win.
|
|
14
|
+
*/
|
|
15
|
+
locale?: UiLocale;
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
12
18
|
* A click-to-upload image picker with a live preview.
|
|
@@ -17,5 +23,5 @@ export interface ImageInputProps {
|
|
|
17
23
|
* @author Forth
|
|
18
24
|
* @copyright 2026 Forth
|
|
19
25
|
*/
|
|
20
|
-
export declare function ImageInput({ value, onFileChange, disabled, className, aspectRatio, }: ImageInputProps): React.JSX.Element;
|
|
26
|
+
export declare function ImageInput({ value, onFileChange, disabled, className, aspectRatio, locale, }: ImageInputProps): React.JSX.Element;
|
|
21
27
|
//# sourceMappingURL=image-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-input.d.ts","sourceRoot":"","sources":["../../../src/components/image-input/image-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"image-input.d.ts","sourceRoot":"","sources":["../../../src/components/image-input/image-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,YAAY,EACZ,QAAgB,EAChB,SAAS,EACT,WAAoB,EACpB,MAAM,GACP,EAAE,eAAe,qBA6EjB"}
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ImageIcon, XIcon } from "lucide-react";
|
|
5
5
|
import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
6
|
+
import { useUiMessages } from "../../locale/locale.js";
|
|
6
7
|
/**
|
|
7
8
|
* A click-to-upload image picker with a live preview.
|
|
8
9
|
*
|
|
@@ -12,7 +13,8 @@ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
|
|
|
12
13
|
* @author Forth
|
|
13
14
|
* @copyright 2026 Forth
|
|
14
15
|
*/
|
|
15
|
-
export function ImageInput({ value, onFileChange, disabled = false, className, aspectRatio = "16/9", }) {
|
|
16
|
+
export function ImageInput({ value, onFileChange, disabled = false, className, aspectRatio = "16/9", locale, }) {
|
|
17
|
+
const messages = useUiMessages(locale);
|
|
16
18
|
const [file, setFile] = React.useState(null);
|
|
17
19
|
const [objectUrl, setObjectUrl] = React.useState(null);
|
|
18
20
|
const inputRef = React.useRef(null);
|
|
@@ -36,7 +38,7 @@ export function ImageInput({ value, onFileChange, disabled = false, className, a
|
|
|
36
38
|
}
|
|
37
39
|
return (_jsxs("div", { "data-slot": "image-input", className: cn("border-input relative flex items-center justify-center overflow-hidden rounded-lg border border-dashed", disabled && "pointer-events-none opacity-50", className), style: { aspectRatio }, children: [preview !== null ? (_jsxs(_Fragment, { children: [_jsx("img", { src: preview, alt: "", className: "size-full object-cover" }), _jsx("button", { type: "button", onClick: () => {
|
|
38
40
|
handleFile(null);
|
|
39
|
-
}, "aria-label":
|
|
41
|
+
}, "aria-label": messages.imageInput.remove, className: "bg-background/80 text-foreground hover:bg-background absolute top-2 right-2 rounded-full p-1 shadow-xs", children: _jsx(XIcon, { className: "size-4" }) })] })) : (_jsxs("button", { type: "button", onClick: () => {
|
|
40
42
|
inputRef.current?.click();
|
|
41
43
|
}, disabled: disabled, className: "text-muted-foreground hover:text-foreground flex flex-col items-center gap-2 p-8 text-sm", children: [_jsx(ImageIcon, { className: "size-8" }), "Click to upload an image"] })), _jsx("input", { ref: inputRef, type: "file", accept: "image/*", disabled: disabled, className: "hidden", onChange: (e) => {
|
|
42
44
|
handleFile(e.target.files?.[0] ?? null);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { ImageInputProps } from "./image-input";
|
|
2
|
-
export { ImageInput } from "./image-input";
|
|
1
|
+
export type { ImageInputProps } from "./image-input.js";
|
|
2
|
+
export { ImageInput } from "./image-input.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/image-input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/image-input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ImageInput } from "./image-input";
|
|
1
|
+
export { ImageInput } from "./image-input.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { InfiniteScrollProps } from "./infinite-scroll";
|
|
2
|
-
export { InfiniteScroll } from "./infinite-scroll";
|
|
1
|
+
export type { InfiniteScrollProps } from "./infinite-scroll.js";
|
|
2
|
+
export { InfiniteScroll } from "./infinite-scroll.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|