@gunkin/uiify 0.0.19-alpha → 0.0.22-alpha
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/agents/components.md +14 -1
- package/agents/index.md +32 -1
- package/agents/reference/components/alert.md +44 -0
- package/agents/reference/components/aspect-ratio.md +26 -0
- package/agents/reference/components/avatar.md +32 -0
- package/agents/reference/components/badge.md +31 -0
- package/agents/reference/components/breadcrumb.md +11 -1
- package/agents/reference/components/button.md +4 -4
- package/agents/reference/components/candle-chart.md +20 -1
- package/agents/reference/components/card.md +24 -0
- package/agents/reference/components/carousel.md +3 -2
- package/agents/reference/components/checkbox.md +2 -0
- package/agents/reference/components/combobox.md +2 -1
- package/agents/reference/components/date-picker.md +23 -0
- package/agents/reference/components/description-list.md +38 -0
- package/agents/reference/components/drawer.md +8 -1
- package/agents/reference/components/dropdown-menu.md +1 -1
- package/agents/reference/components/empty.md +45 -0
- package/agents/reference/components/fieldset.md +31 -0
- package/agents/reference/components/file-upload.md +12 -1
- package/agents/reference/components/form-error-summary.md +33 -0
- package/agents/reference/components/input-group.md +33 -0
- package/agents/reference/components/item.md +52 -0
- package/agents/reference/components/line-chart.md +1 -0
- package/agents/reference/components/modal.md +8 -1
- package/agents/reference/components/number-field.md +14 -3
- package/agents/reference/components/pagination.md +22 -1
- package/agents/reference/components/progress.md +16 -0
- package/agents/reference/components/slider.md +9 -1
- package/agents/reference/components/spinner.md +8 -1
- package/agents/reference/components/toast.md +14 -1
- package/dist/components/alert/Alert.d.ts +15 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +61 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +7 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/alert/types.d.ts +20 -0
- package/dist/components/alert/types.d.ts.map +1 -0
- package/dist/components/alert/types.js +1 -0
- package/dist/components/alert/types.js.map +1 -0
- package/dist/components/alert.d.ts +1 -0
- package/dist/components/alert.js +1 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts +7 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/AspectRatio.js +26 -0
- package/dist/components/aspect-ratio/AspectRatio.js.map +1 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.d.ts.map +1 -0
- package/dist/components/aspect-ratio/index.js +5 -0
- package/dist/components/aspect-ratio/index.js.map +1 -0
- package/dist/components/aspect-ratio/types.d.ts +9 -0
- package/dist/components/aspect-ratio/types.d.ts.map +1 -0
- package/dist/components/aspect-ratio/types.js +1 -0
- package/dist/components/aspect-ratio/types.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +1 -0
- package/dist/components/aspect-ratio.js +1 -0
- package/dist/components/avatar/Avatar.d.ts +7 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +24 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +5 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/avatar/types.d.ts +12 -0
- package/dist/components/avatar/types.d.ts.map +1 -0
- package/dist/components/avatar/types.js +1 -0
- package/dist/components/avatar/types.js.map +1 -0
- package/dist/components/avatar.d.ts +1 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +21 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +5 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/badge/types.d.ts +11 -0
- package/dist/components/badge/types.d.ts.map +1 -0
- package/dist/components/badge/types.js +1 -0
- package/dist/components/badge/types.js.map +1 -0
- package/dist/components/badge.d.ts +1 -0
- package/dist/components/badge.js +1 -0
- package/dist/components/behavior.css +21 -9
- package/dist/components/behavior.css.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +21 -4
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/breadcrumb/types.d.ts +7 -0
- package/dist/components/breadcrumb/types.d.ts.map +1 -1
- package/dist/components/button/types.d.ts +4 -0
- package/dist/components/button/types.d.ts.map +1 -1
- package/dist/components/candle-chart/CandleChart.d.ts +1 -1
- package/dist/components/candle-chart/CandleChart.d.ts.map +1 -1
- package/dist/components/candle-chart/CandleChart.js +81 -46
- package/dist/components/candle-chart/CandleChart.js.map +1 -1
- package/dist/components/candle-chart/client/CandleChartClient.d.ts.map +1 -1
- package/dist/components/candle-chart/client/CandleChartClient.js +5 -0
- package/dist/components/candle-chart/client/CandleChartClient.js.map +1 -1
- package/dist/components/candle-chart/index.d.ts +1 -1
- package/dist/components/candle-chart/index.d.ts.map +1 -1
- package/dist/components/candle-chart/index.js.map +1 -1
- package/dist/components/candle-chart/types.d.ts +17 -0
- package/dist/components/candle-chart/types.d.ts.map +1 -1
- package/dist/components/card/Card.d.ts +7 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +16 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +5 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/card/types.d.ts +7 -0
- package/dist/components/card/types.d.ts.map +1 -0
- package/dist/components/card/types.js +1 -0
- package/dist/components/card/types.js.map +1 -0
- package/dist/components/card.d.ts +1 -0
- package/dist/components/card.js +1 -0
- package/dist/components/carousel/CarouselMarkup.d.ts.map +1 -1
- package/dist/components/carousel/CarouselMarkup.js +20 -3
- package/dist/components/carousel/CarouselMarkup.js.map +1 -1
- package/dist/components/carousel/carousel-markup.js +2 -2
- package/dist/components/carousel/carousel-markup.js.map +1 -1
- package/dist/components/carousel/types.d.ts +3 -2
- package/dist/components/carousel/types.d.ts.map +1 -1
- package/dist/components/checkbox/types.d.ts +2 -0
- package/dist/components/checkbox/types.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +37 -23
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/combobox/combobox-store.d.ts.map +1 -1
- package/dist/components/combobox/combobox-store.js +5 -2
- package/dist/components/combobox/combobox-store.js.map +1 -1
- package/dist/components/combobox/types.d.ts +2 -3
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/context-menu/ContextMenu.d.ts.map +1 -1
- package/dist/components/context-menu/ContextMenu.js +25 -5
- package/dist/components/context-menu/ContextMenu.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +7 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.js +19 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -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 +5 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-picker/types.d.ts +5 -0
- package/dist/components/date-picker/types.d.ts.map +1 -0
- package/dist/components/date-picker/types.js +1 -0
- package/dist/components/date-picker/types.js.map +1 -0
- package/dist/components/date-picker.d.ts +1 -0
- package/dist/components/date-picker.js +1 -0
- package/dist/components/description-list/DescriptionList.d.ts +15 -0
- package/dist/components/description-list/DescriptionList.d.ts.map +1 -0
- package/dist/components/description-list/DescriptionList.js +48 -0
- package/dist/components/description-list/DescriptionList.js.map +1 -0
- package/dist/components/description-list/index.d.ts +3 -0
- package/dist/components/description-list/index.d.ts.map +1 -0
- package/dist/components/description-list/index.js +7 -0
- package/dist/components/description-list/index.js.map +1 -0
- package/dist/components/description-list/types.d.ts +15 -0
- package/dist/components/description-list/types.d.ts.map +1 -0
- package/dist/components/description-list/types.js +1 -0
- package/dist/components/description-list/types.js.map +1 -0
- package/dist/components/description-list.d.ts +1 -0
- package/dist/components/description-list.js +1 -0
- package/dist/components/drawer/DrawerNative.d.ts +1 -1
- package/dist/components/drawer/DrawerNative.d.ts.map +1 -1
- package/dist/components/drawer/DrawerNative.js +5 -2
- package/dist/components/drawer/DrawerNative.js.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/types.d.ts +4 -0
- package/dist/components/drawer/types.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.js +31 -15
- package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuBar.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuBar.js +7 -5
- package/dist/components/dropdown-menu/DropdownMenuBar.js.map +1 -1
- package/dist/components/dropdown-menu/types.d.ts +1 -1
- package/dist/components/dropdown-menu/types.d.ts.map +1 -1
- package/dist/components/empty/Empty.d.ts +19 -0
- package/dist/components/empty/Empty.d.ts.map +1 -0
- package/dist/components/empty/Empty.js +56 -0
- package/dist/components/empty/Empty.js.map +1 -0
- package/dist/components/empty/index.d.ts +3 -0
- package/dist/components/empty/index.d.ts.map +1 -0
- package/dist/components/empty/index.js +8 -0
- package/dist/components/empty/index.js.map +1 -0
- package/dist/components/empty/types.d.ts +19 -0
- package/dist/components/empty/types.d.ts.map +1 -0
- package/dist/components/empty/types.js +1 -0
- package/dist/components/empty/types.js.map +1 -0
- package/dist/components/empty.d.ts +1 -0
- package/dist/components/empty.js +1 -0
- package/dist/components/fieldset/Fieldset.d.ts +11 -0
- package/dist/components/fieldset/Fieldset.d.ts.map +1 -0
- package/dist/components/fieldset/Fieldset.js +38 -0
- package/dist/components/fieldset/Fieldset.js.map +1 -0
- package/dist/components/fieldset/index.d.ts +3 -0
- package/dist/components/fieldset/index.d.ts.map +1 -0
- package/dist/components/fieldset/index.js +6 -0
- package/dist/components/fieldset/index.js.map +1 -0
- package/dist/components/fieldset/types.d.ts +11 -0
- package/dist/components/fieldset/types.d.ts.map +1 -0
- package/dist/components/fieldset/types.js +1 -0
- package/dist/components/fieldset/types.js.map +1 -0
- package/dist/components/fieldset.d.ts +1 -0
- package/dist/components/fieldset.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -1
- package/dist/components/file-upload/FileUpload.js +11 -4
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/file-upload/FileUploadRoot.d.ts +1 -1
- package/dist/components/file-upload/FileUploadRoot.d.ts.map +1 -1
- package/dist/components/file-upload/FileUploadRoot.js +9 -0
- package/dist/components/file-upload/FileUploadRoot.js.map +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.d.ts.map +1 -1
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/file-upload/types.d.ts +8 -0
- package/dist/components/file-upload/types.d.ts.map +1 -1
- package/dist/components/form-error-summary/FormErrorSummary.d.ts +7 -0
- package/dist/components/form-error-summary/FormErrorSummary.d.ts.map +1 -0
- package/dist/components/form-error-summary/FormErrorSummary.js +25 -0
- package/dist/components/form-error-summary/FormErrorSummary.js.map +1 -0
- package/dist/components/form-error-summary/index.d.ts +3 -0
- package/dist/components/form-error-summary/index.d.ts.map +1 -0
- package/dist/components/form-error-summary/index.js +5 -0
- package/dist/components/form-error-summary/index.js.map +1 -0
- package/dist/components/form-error-summary/types.d.ts +12 -0
- package/dist/components/form-error-summary/types.d.ts.map +1 -0
- package/dist/components/form-error-summary/types.js +1 -0
- package/dist/components/form-error-summary/types.js.map +1 -0
- package/dist/components/form-error-summary.d.ts +1 -0
- package/dist/components/form-error-summary.js +1 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input-group/InputGroup.d.ts +5 -0
- package/dist/components/input-group/InputGroup.d.ts.map +1 -0
- package/dist/components/input-group/InputGroup.js +37 -0
- package/dist/components/input-group/InputGroup.js.map +1 -0
- package/dist/components/input-group/index.d.ts +3 -0
- package/dist/components/input-group/index.d.ts.map +1 -0
- package/dist/components/input-group/index.js +6 -0
- package/dist/components/input-group/index.js.map +1 -0
- package/dist/components/input-group/types.d.ts +12 -0
- package/dist/components/input-group/types.d.ts.map +1 -0
- package/dist/components/input-group/types.js +1 -0
- package/dist/components/input-group/types.js.map +1 -0
- package/dist/components/input-group.d.ts +1 -0
- package/dist/components/input-group.js +1 -0
- package/dist/components/internal/native-check-control/NativeCheckControl.d.ts.map +1 -1
- package/dist/components/internal/native-check-control/NativeCheckControl.js +4 -0
- package/dist/components/internal/native-check-control/NativeCheckControl.js.map +1 -1
- package/dist/components/internal/native-check-control/types.d.ts +2 -0
- package/dist/components/internal/native-check-control/types.d.ts.map +1 -1
- package/dist/components/item/Item.d.ts +23 -0
- package/dist/components/item/Item.d.ts.map +1 -0
- package/dist/components/item/Item.js +64 -0
- package/dist/components/item/Item.js.map +1 -0
- package/dist/components/item/index.d.ts +3 -0
- package/dist/components/item/index.d.ts.map +1 -0
- package/dist/components/item/index.js +9 -0
- package/dist/components/item/index.js.map +1 -0
- package/dist/components/item/types.d.ts +23 -0
- package/dist/components/item/types.d.ts.map +1 -0
- package/dist/components/item/types.js +1 -0
- package/dist/components/item/types.js.map +1 -0
- package/dist/components/item.d.ts +1 -0
- package/dist/components/item.js +1 -0
- package/dist/components/line-chart/LineChart.d.ts.map +1 -1
- package/dist/components/line-chart/LineChart.js +3 -2
- package/dist/components/line-chart/LineChart.js.map +1 -1
- package/dist/components/line-chart/line-chart-geometry.d.ts +2 -2
- package/dist/components/line-chart/line-chart-geometry.d.ts.map +1 -1
- package/dist/components/line-chart/line-chart-geometry.js +6 -6
- package/dist/components/line-chart/line-chart-geometry.js.map +1 -1
- package/dist/components/line-chart/types.d.ts +2 -0
- package/dist/components/line-chart/types.d.ts.map +1 -1
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +5 -2
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/types.d.ts +4 -0
- package/dist/components/modal/types.d.ts.map +1 -1
- package/dist/components/number-field/NumberField.d.ts +1 -1
- package/dist/components/number-field/NumberField.d.ts.map +1 -1
- package/dist/components/number-field/NumberField.js +25 -5
- package/dist/components/number-field/NumberField.js.map +1 -1
- package/dist/components/number-field/format.d.ts +1 -1
- package/dist/components/number-field/format.d.ts.map +1 -1
- package/dist/components/number-field/format.js +32 -7
- package/dist/components/number-field/format.js.map +1 -1
- package/dist/components/number-field/index.d.ts +1 -1
- package/dist/components/number-field/index.d.ts.map +1 -1
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/number-field/types.d.ts +11 -2
- package/dist/components/number-field/types.d.ts.map +1 -1
- package/dist/components/otp-input/OtpInput.d.ts.map +1 -1
- package/dist/components/otp-input/OtpInput.js +2 -0
- package/dist/components/otp-input/OtpInput.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +93 -29
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/PaginationShell.d.ts +2 -1
- package/dist/components/pagination/PaginationShell.d.ts.map +1 -1
- package/dist/components/pagination/PaginationShell.js +44 -9
- package/dist/components/pagination/PaginationShell.js.map +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/index.js.map +1 -1
- package/dist/components/pagination/types.d.ts +18 -0
- package/dist/components/pagination/types.d.ts.map +1 -1
- package/dist/components/progress/Progress.d.ts +7 -0
- package/dist/components/progress/Progress.d.ts.map +1 -0
- package/dist/components/progress/Progress.js +9 -0
- package/dist/components/progress/Progress.js.map +1 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +5 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progress/types.d.ts +3 -0
- package/dist/components/progress/types.d.ts.map +1 -0
- package/dist/components/progress/types.js +1 -0
- package/dist/components/progress/types.js.map +1 -0
- package/dist/components/progress.d.ts +1 -0
- package/dist/components/progress.js +1 -0
- package/dist/components/slider/client/SliderClient.d.ts.map +1 -1
- package/dist/components/slider/client/SliderClient.js +11 -2
- package/dist/components/slider/client/SliderClient.js.map +1 -1
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/types.d.ts +5 -0
- package/dist/components/slider/types.d.ts.map +1 -1
- package/dist/components/spinner/Spinner.d.ts.map +1 -1
- package/dist/components/spinner/Spinner.js +6 -3
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/index.d.ts.map +1 -1
- package/dist/components/spinner/index.js.map +1 -1
- package/dist/components/spinner/types.d.ts +4 -0
- package/dist/components/spinner/types.d.ts.map +1 -1
- package/dist/components/tags-input/TagsInput.d.ts.map +1 -1
- package/dist/components/tags-input/TagsInput.js +2 -0
- package/dist/components/tags-input/TagsInput.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +33 -29
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/ToastElements.d.ts.map +1 -1
- package/dist/components/toast/ToastElements.js +24 -12
- package/dist/components/toast/ToastElements.js.map +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.d.ts.map +1 -1
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/types.d.ts +10 -0
- package/dist/components/toast/types.d.ts.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +2 -2
- package/dist/components/toolbar/Toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/Toolbar.js +8 -4
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/core/direction.d.ts +2 -0
- package/dist/core/direction.d.ts.map +1 -1
- package/dist/core/direction.js +8 -3
- package/dist/core/direction.js.map +1 -1
- package/dist/core/dismissable-layer-registry.d.ts.map +1 -1
- package/dist/core/dismissable-layer-registry.js +3 -1
- package/dist/core/dismissable-layer-registry.js.map +1 -1
- package/dist/core/format-label.d.ts +2 -0
- package/dist/core/format-label.d.ts.map +1 -0
- package/dist/core/format-label.js +13 -0
- package/dist/core/format-label.js.map +1 -0
- package/dist/core/ime.d.ts +16 -0
- package/dist/core/ime.d.ts.map +1 -0
- package/dist/core/ime.js +7 -0
- package/dist/core/ime.js.map +1 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/roving-focus-store.d.ts +3 -2
- package/dist/core/roving-focus-store.d.ts.map +1 -1
- package/dist/core/roving-focus-store.js +5 -3
- package/dist/core/roving-focus-store.js.map +1 -1
- package/dist/core/roving-focus.d.ts.map +1 -1
- package/dist/core/roving-focus.js +10 -5
- package/dist/core/roving-focus.js.map +1 -1
- package/dist/core/text-direction.d.ts +7 -0
- package/dist/core/text-direction.d.ts.map +1 -0
- package/dist/core/text-direction.js +7 -0
- package/dist/core/text-direction.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/package.json +2 -1
- package/skills/uiify/SKILL.md +43 -34
- package/skills/uiify/references/elements/alert-modal.md +5 -5
- package/skills/uiify/references/elements/aspect-ratio.md +59 -0
- package/skills/uiify/references/elements/avatar.md +10 -19
- package/skills/uiify/references/elements/badge.md +11 -19
- package/skills/uiify/references/elements/button.md +5 -5
- package/skills/uiify/references/elements/candle-chart.md +2 -0
- package/skills/uiify/references/elements/card.md +10 -21
- package/skills/uiify/references/elements/carousel.md +2 -0
- package/skills/uiify/references/elements/checkbox.md +1 -1
- package/skills/uiify/references/elements/date-picker.md +11 -15
- package/skills/uiify/references/elements/description-list.md +38 -0
- package/skills/uiify/references/elements/empty-state.md +12 -23
- package/skills/uiify/references/elements/field.md +2 -2
- package/skills/uiify/references/elements/fieldset.md +39 -0
- package/skills/uiify/references/elements/form-error-summary.md +39 -0
- package/skills/uiify/references/elements/inline-alert.md +11 -19
- package/skills/uiify/references/elements/input-group.md +39 -0
- package/skills/uiify/references/elements/item.md +39 -0
- package/skills/uiify/references/elements/modal.md +1 -1
- package/skills/uiify/references/elements/number-field.md +2 -0
- package/skills/uiify/references/elements/pagination.md +2 -0
- package/skills/uiify/references/elements/progress-bar.md +11 -20
- package/skills/uiify/references/elements/select.md +1 -1
- package/skills/uiify/references/examples/alert-confirmation.md +21 -9
- package/skills/uiify/references/examples/field-validation.md +2 -2
- package/skills/uiify/references/examples/select-basic.md +1 -1
- package/skills/uiify/references/examples/table-controls.md +3 -2
- package/skills/uiify/references/guides/i18n.md +21 -0
- package/skills/uiify/references/guides/verification.md +9 -0
- package/skills/uiify/scripts/static.mjs +79 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ElementType, ReactElement } from "react";
|
|
2
|
+
import type { FieldsetLegendProps, FieldsetRootProps } from "./types.js";
|
|
3
|
+
export declare function Fieldset<TAs extends ElementType = "fieldset">(props: FieldsetRootProps<TAs>): ReactElement | null;
|
|
4
|
+
export declare namespace Fieldset {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function FieldsetLegend<TAs extends ElementType = "legend">(props: FieldsetLegendProps<TAs>): ReactElement | null;
|
|
8
|
+
export declare namespace FieldsetLegend {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Fieldset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEzE,wBAAgB,QAAQ,CAAC,GAAG,SAAS,WAAW,GAAG,UAAU,EAC3D,KAAK,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAC5B,YAAY,GAAG,IAAI,CAerB;yBAjBe,QAAQ;;;AAqBxB,wBAAgB,cAAc,CAAC,GAAG,SAAS,WAAW,GAAG,QAAQ,EAC/D,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAC9B,YAAY,GAAG,IAAI,CAerB;yBAjBe,cAAc"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useRenderElement } from "@gunkin/uiify/core/render";
|
|
2
|
+
function Fieldset(props) {
|
|
3
|
+
const { as, render, children, ...consumerProps } = props;
|
|
4
|
+
return useRenderElement({
|
|
5
|
+
as,
|
|
6
|
+
defaultTag: "fieldset",
|
|
7
|
+
props: {
|
|
8
|
+
...consumerProps,
|
|
9
|
+
children,
|
|
10
|
+
"data-uiify-fieldset": "",
|
|
11
|
+
"data-part": "root"
|
|
12
|
+
},
|
|
13
|
+
render,
|
|
14
|
+
state: {}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
Fieldset.displayName = "Fieldset";
|
|
18
|
+
function FieldsetLegend(props) {
|
|
19
|
+
const { as, render, children, ...consumerProps } = props;
|
|
20
|
+
return useRenderElement({
|
|
21
|
+
as,
|
|
22
|
+
defaultTag: "legend",
|
|
23
|
+
props: {
|
|
24
|
+
...consumerProps,
|
|
25
|
+
children,
|
|
26
|
+
"data-uiify-fieldset-legend": "",
|
|
27
|
+
"data-part": "legend"
|
|
28
|
+
},
|
|
29
|
+
render,
|
|
30
|
+
state: {}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
FieldsetLegend.displayName = "FieldsetLegend";
|
|
34
|
+
export {
|
|
35
|
+
Fieldset,
|
|
36
|
+
FieldsetLegend
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fieldset/Fieldset.tsx"],"sourcesContent":["import type { ElementType, ReactElement } from \"react\";\nimport { useRenderElement } from \"@gunkin/uiify/core/render\";\nimport type { FieldsetLegendProps, FieldsetRootProps } from \"./types.js\";\n\nexport function Fieldset<TAs extends ElementType = \"fieldset\">(\n props: FieldsetRootProps<TAs>,\n): ReactElement | null {\n const { as, render, children, ...consumerProps } = props as FieldsetRootProps<\"fieldset\">;\n\n return useRenderElement({\n as,\n defaultTag: \"fieldset\",\n props: {\n ...consumerProps,\n children,\n \"data-uiify-fieldset\": \"\",\n \"data-part\": \"root\",\n },\n render,\n state: {},\n });\n}\n\nFieldset.displayName = \"Fieldset\";\n\nexport function FieldsetLegend<TAs extends ElementType = \"legend\">(\n props: FieldsetLegendProps<TAs>,\n): ReactElement | null {\n const { as, render, children, ...consumerProps } = props as FieldsetLegendProps<\"legend\">;\n\n return useRenderElement({\n as,\n defaultTag: \"legend\",\n props: {\n ...consumerProps,\n children,\n \"data-uiify-fieldset-legend\": \"\",\n \"data-part\": \"legend\",\n },\n render,\n state: {},\n });\n}\n\nFieldsetLegend.displayName = \"FieldsetLegend\";\n"],"mappings":"AACA,SAAS,wBAAwB;AAG1B,SAAS,SACd,OACqB;AACrB,QAAM,EAAE,IAAI,QAAQ,UAAU,GAAG,cAAc,IAAI;AAEnD,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,uBAAuB;AAAA,MACvB,aAAa;AAAA,IACf;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,EACV,CAAC;AACH;AAEA,SAAS,cAAc;AAEhB,SAAS,eACd,OACqB;AACrB,QAAM,EAAE,IAAI,QAAQ,UAAU,GAAG,cAAc,IAAI;AAEnD,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,8BAA8B;AAAA,MAC9B,aAAa;AAAA,IACf;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,EACV,CAAC;AACH;AAEA,eAAe,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fieldset/index.ts"],"sourcesContent":["export { Fieldset, FieldsetLegend } from \"./Fieldset.js\";\nexport type { FieldsetLegendProps, FieldsetRootProps } from \"./types.js\";\n"],"mappings":"AAAA,SAAS,UAAU,sBAAsB;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
|
+
import type { RenderableProps } from "@gunkin/uiify/core/render";
|
|
3
|
+
export interface FieldsetRootOwnProps {
|
|
4
|
+
readonly children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export type FieldsetRootProps<TAs extends ElementType = "fieldset"> = RenderableProps<TAs, FieldsetRootOwnProps, Record<string, never>, HTMLFieldSetElement>;
|
|
7
|
+
export interface FieldsetLegendOwnProps {
|
|
8
|
+
readonly children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export type FieldsetLegendProps<TAs extends ElementType = "legend"> = RenderableProps<TAs, FieldsetLegendOwnProps, Record<string, never>, HTMLLegendElement>;
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,MAAM,iBAAiB,CAAC,GAAG,SAAS,WAAW,GAAG,UAAU,IAAI,eAAe,CACnF,GAAG,EACH,oBAAoB,EACpB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB,mBAAmB,CACpB,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,MAAM,mBAAmB,CAAC,GAAG,SAAS,WAAW,GAAG,QAAQ,IAAI,eAAe,CACnF,GAAG,EACH,sBAAsB,EACtB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB,iBAAiB,CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./fieldset/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./fieldset/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/FileUpload.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAa,YAAY,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/FileUpload.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAa,YAAY,EAAkB,MAAM,OAAO,CAAC;AAIlF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC;AAEvE,wBAAgB,iBAAiB,CAAC,GAAG,SAAS,WAAW,GAAG,OAAO,EACjE,KAAK,EAAE,sBAAsB,CAAC,GAAG,CAAC,GACjC,YAAY,GAAG,IAAI,CAmCrB;AAED,wBAAgB,kBAAkB,CAAC,GAAG,SAAS,WAAW,GAAG,KAAK,EAChE,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC,GAClC,YAAY,GAAG,IAAI,CAgCrB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,GAAG,IAAI,CAajF;AAED,wBAAgB,cAAc,CAAC,GAAG,SAAS,WAAW,GAAG,IAAI,EAC3D,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAC9B,YAAY,GAAG,IAAI,CAuBrB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,4BAA4B,GAAG,YAAY,GAAG,IAAI,CAoC7F;AAED,eAAO,MAAM,UAAU;;;;;;;;CAQtB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { composeEventHandlers } from "@gunkin/uiify/core/compose-event-handlers";
|
|
3
3
|
import { useRenderElement } from "@gunkin/uiify/core/render";
|
|
4
|
+
import { formatLabel } from "@gunkin/uiify/core/format-label";
|
|
4
5
|
import { FileUploadRoot, FileUploadRootClient } from "./FileUploadRoot.js";
|
|
5
6
|
import { FileUploadHiddenInput } from "./FileUploadInput.js";
|
|
6
7
|
import { useFileUploadContext } from "./file-upload-context.js";
|
|
@@ -35,7 +36,7 @@ function FileUploadTrigger(props) {
|
|
|
35
36
|
}
|
|
36
37
|
function FileUploadDropzone(props) {
|
|
37
38
|
const { as, render, className, children, ...consumerProps } = props;
|
|
38
|
-
const { disabled, processFiles } = useFileUploadContext("Dropzone");
|
|
39
|
+
const { disabled, labels, processFiles } = useFileUploadContext("Dropzone");
|
|
39
40
|
const { onDragOver: consumerOnDragOver, onDrop: consumerOnDrop } = consumerProps;
|
|
40
41
|
return useRenderElement({
|
|
41
42
|
as,
|
|
@@ -44,7 +45,7 @@ function FileUploadDropzone(props) {
|
|
|
44
45
|
...consumerProps,
|
|
45
46
|
role: "region",
|
|
46
47
|
"data-part": "dropzone",
|
|
47
|
-
"aria-label":
|
|
48
|
+
"aria-label": labels.dropzone,
|
|
48
49
|
"data-disabled": disabled ? "" : void 0,
|
|
49
50
|
onDragOver: composeEventHandlers(consumerOnDragOver, (event) => {
|
|
50
51
|
event.preventDefault();
|
|
@@ -104,14 +105,20 @@ function FileUploadItemRemove(props) {
|
|
|
104
105
|
children = "\xD7",
|
|
105
106
|
...consumerProps
|
|
106
107
|
} = props;
|
|
107
|
-
const {
|
|
108
|
+
const {
|
|
109
|
+
disabled: rootDisabled,
|
|
110
|
+
files,
|
|
111
|
+
labels,
|
|
112
|
+
removeAt,
|
|
113
|
+
removeLabel
|
|
114
|
+
} = useFileUploadContext("ItemRemove");
|
|
108
115
|
const disabled = rootDisabled || consumerDisabled;
|
|
109
116
|
return useRenderElement({
|
|
110
117
|
defaultTag: "button",
|
|
111
118
|
props: {
|
|
112
119
|
type: "button",
|
|
113
120
|
...consumerProps,
|
|
114
|
-
"aria-label": consumerProps["aria-label"] ?? "
|
|
121
|
+
"aria-label": consumerProps["aria-label"] ?? (removeLabel !== void 0 ? formatLabel(removeLabel, { name: files[index]?.name ?? "" }) : labels.removeFallback),
|
|
115
122
|
children,
|
|
116
123
|
"data-part": "remove",
|
|
117
124
|
disabled: disabled || void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/file-upload/FileUpload.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, DragEvent, ReactElement, SyntheticEvent } from \"react\";\nimport { composeEventHandlers } from \"@gunkin/uiify/core/compose-event-handlers\";\nimport { useRenderElement } from \"@gunkin/uiify/core/render\";\nimport { FileUploadRoot, FileUploadRootClient } from \"./FileUploadRoot.js\";\nimport { FileUploadHiddenInput } from \"./FileUploadInput.js\";\nimport { useFileUploadContext } from \"./file-upload-context.js\";\nimport type {\n FileUploadTriggerProps,\n FileUploadDropzoneProps,\n FileUploadListOwnProps,\n FileUploadItemProps,\n FileUploadItemRemoveOwnProps,\n} from \"./types.js\";\nexport { FileUploadRoot, FileUploadRootClient, FileUploadHiddenInput };\n\nexport function FileUploadTrigger<TAs extends ElementType = \"label\">(\n props: FileUploadTriggerProps<TAs>,\n): ReactElement | null {\n const { as, render, className, children, ...consumerProps } =\n props as FileUploadTriggerProps<ElementType>;\n const { disabled, inputId, openPicker } = useFileUploadContext(\"Trigger\");\n const tag = typeof as === \"string\" ? as : undefined;\n const { onClick: consumerOnClick } = consumerProps as {\n onClick?: (event: SyntheticEvent<HTMLElement>) => void;\n };\n const interactiveProps =\n tag === \"button\"\n ? {\n type: \"button\" as const,\n \"data-uiify-button\": \"\",\n \"aria-controls\": inputId,\n disabled: disabled || undefined,\n onClick: composeEventHandlers(consumerOnClick, openPicker),\n }\n : {\n htmlFor: inputId,\n \"aria-controls\": inputId,\n };\n\n return useRenderElement({\n as,\n defaultTag: \"label\",\n props: {\n ...consumerProps,\n ...interactiveProps,\n \"data-part\": \"trigger\",\n ...(className ? { className } : {}),\n children,\n },\n render,\n state: { disabled },\n });\n}\n\nexport function FileUploadDropzone<TAs extends ElementType = \"div\">(\n props: FileUploadDropzoneProps<TAs>,\n): ReactElement | null {\n const { as, render, className, children, ...consumerProps } =\n props as FileUploadDropzoneProps<\"div\">;\n const { disabled, processFiles } = useFileUploadContext(\"Dropzone\");\n const { onDragOver: consumerOnDragOver, onDrop: consumerOnDrop } = consumerProps as {\n onDragOver?: (event: DragEvent<HTMLElement>) => void;\n onDrop?: (event: DragEvent<HTMLElement>) => void;\n };\n\n return useRenderElement({\n as,\n defaultTag: \"div\",\n props: {\n ...consumerProps,\n role: \"region\",\n \"data-part\": \"dropzone\",\n \"aria-label\":
|
|
1
|
+
{"version":3,"sources":["../../../src/components/file-upload/FileUpload.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, DragEvent, ReactElement, SyntheticEvent } from \"react\";\nimport { composeEventHandlers } from \"@gunkin/uiify/core/compose-event-handlers\";\nimport { useRenderElement } from \"@gunkin/uiify/core/render\";\nimport { formatLabel } from \"@gunkin/uiify/core/format-label\";\nimport { FileUploadRoot, FileUploadRootClient } from \"./FileUploadRoot.js\";\nimport { FileUploadHiddenInput } from \"./FileUploadInput.js\";\nimport { useFileUploadContext } from \"./file-upload-context.js\";\nimport type {\n FileUploadTriggerProps,\n FileUploadDropzoneProps,\n FileUploadListOwnProps,\n FileUploadItemProps,\n FileUploadItemRemoveOwnProps,\n} from \"./types.js\";\nexport { FileUploadRoot, FileUploadRootClient, FileUploadHiddenInput };\n\nexport function FileUploadTrigger<TAs extends ElementType = \"label\">(\n props: FileUploadTriggerProps<TAs>,\n): ReactElement | null {\n const { as, render, className, children, ...consumerProps } =\n props as FileUploadTriggerProps<ElementType>;\n const { disabled, inputId, openPicker } = useFileUploadContext(\"Trigger\");\n const tag = typeof as === \"string\" ? as : undefined;\n const { onClick: consumerOnClick } = consumerProps as {\n onClick?: (event: SyntheticEvent<HTMLElement>) => void;\n };\n const interactiveProps =\n tag === \"button\"\n ? {\n type: \"button\" as const,\n \"data-uiify-button\": \"\",\n \"aria-controls\": inputId,\n disabled: disabled || undefined,\n onClick: composeEventHandlers(consumerOnClick, openPicker),\n }\n : {\n htmlFor: inputId,\n \"aria-controls\": inputId,\n };\n\n return useRenderElement({\n as,\n defaultTag: \"label\",\n props: {\n ...consumerProps,\n ...interactiveProps,\n \"data-part\": \"trigger\",\n ...(className ? { className } : {}),\n children,\n },\n render,\n state: { disabled },\n });\n}\n\nexport function FileUploadDropzone<TAs extends ElementType = \"div\">(\n props: FileUploadDropzoneProps<TAs>,\n): ReactElement | null {\n const { as, render, className, children, ...consumerProps } =\n props as FileUploadDropzoneProps<\"div\">;\n const { disabled, labels, processFiles } = useFileUploadContext(\"Dropzone\");\n const { onDragOver: consumerOnDragOver, onDrop: consumerOnDrop } = consumerProps as {\n onDragOver?: (event: DragEvent<HTMLElement>) => void;\n onDrop?: (event: DragEvent<HTMLElement>) => void;\n };\n\n return useRenderElement({\n as,\n defaultTag: \"div\",\n props: {\n ...consumerProps,\n role: \"region\",\n \"data-part\": \"dropzone\",\n \"aria-label\": labels.dropzone,\n \"data-disabled\": disabled ? \"\" : undefined,\n onDragOver: composeEventHandlers(consumerOnDragOver, (event: DragEvent<HTMLElement>) => {\n event.preventDefault();\n }),\n onDrop: composeEventHandlers(consumerOnDrop, (event: DragEvent<HTMLElement>) => {\n event.preventDefault();\n if (disabled) return;\n processFiles(event.dataTransfer.files);\n }),\n ...(className ? { className } : {}),\n children,\n },\n render,\n state: { disabled },\n });\n}\n\nexport function FileUploadList(props: FileUploadListOwnProps): ReactElement | null {\n const { children, ...consumerProps } = props;\n const { files } = useFileUploadContext(\"List\");\n return useRenderElement({\n defaultTag: \"ul\",\n props: {\n ...consumerProps,\n role: \"list\",\n \"data-part\": \"list\",\n children: typeof children === \"function\" ? children(files) : children,\n },\n state: {},\n });\n}\n\nexport function FileUploadItem<TAs extends ElementType = \"li\">(\n props: FileUploadItemProps<TAs>,\n): ReactElement | null {\n const { as, render, children, className, index, ...consumerProps } =\n props as FileUploadItemProps<\"li\">;\n const { files } = useFileUploadContext(\"Item\");\n const file = files[index];\n\n const element = useRenderElement({\n as,\n defaultTag: \"li\",\n props: {\n ...consumerProps,\n role: \"listitem\",\n \"data-part\": \"item\",\n \"data-name\": file?.name,\n ...(className ? { className } : {}),\n children: children ?? file?.name,\n },\n render,\n state: { index },\n });\n\n if (!file) return null;\n return element;\n}\n\nexport function FileUploadItemRemove(props: FileUploadItemRemoveOwnProps): ReactElement | null {\n const {\n index,\n onClick,\n disabled: consumerDisabled = false,\n children = \"×\",\n ...consumerProps\n } = props;\n const {\n disabled: rootDisabled,\n files,\n labels,\n removeAt,\n removeLabel,\n } = useFileUploadContext(\"ItemRemove\");\n\n const disabled = rootDisabled || consumerDisabled;\n return useRenderElement({\n defaultTag: \"button\",\n props: {\n type: \"button\",\n ...consumerProps,\n \"aria-label\":\n consumerProps[\"aria-label\"] ??\n (removeLabel !== undefined\n ? formatLabel(removeLabel, { name: files[index]?.name ?? \"\" })\n : labels.removeFallback),\n children,\n \"data-part\": \"remove\",\n disabled: disabled || undefined,\n onClick: composeEventHandlers(onClick, () => {\n if (!disabled) removeAt(index);\n }),\n },\n state: { disabled },\n });\n}\n\nexport const FileUpload = {\n Dropzone: FileUploadDropzone,\n HiddenInput: FileUploadHiddenInput,\n Item: FileUploadItem,\n ItemRemove: FileUploadItemRemove,\n List: FileUploadList,\n Root: FileUploadRoot,\n Trigger: FileUploadTrigger,\n};\n"],"mappings":";AAGA,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB,4BAA4B;AACrD,SAAS,6BA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AAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB,YAAY;AAErC,QAAM,WAAW,gBAAgB;AACjC,SAAO,iBAAiB;AAAA,IACtB,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,GAAG;AAAA,MACH,cACE,cAAc,YAAY,MACzB,gBAAgB,SACb,YAAY,aAAa,EAAE,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,CAAC,IAC3D,OAAO;AAAA,MACb;AAAA,MACA,aAAa;AAAA,MACb,UAAU,YAAY;AAAA,MACtB,SAAS,qBAAqB,SAAS,MAAM;AAC3C,YAAI,CAAC,SAAU,UAAS,KAAK;AAAA,MAC/B,CAAC;AAAA,IACH;AAAA,IACA,OAAO,EAAE,SAAS;AAAA,EACpB,CAAC;AACH;AAEO,MAAM,aAAa;AAAA,EACxB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import type { FileUploadRootProps } from "./types.js";
|
|
3
|
-
export declare function FileUploadRootClient({ accept, children, defaultValue, disabled, maxFiles, maxSize, minSize, multiple, onValueChange, onReject, value, ...consumerProps }: FileUploadRootProps): ReactElement;
|
|
3
|
+
export declare function FileUploadRootClient({ accept, children, defaultValue, disabled, maxFiles, maxSize, labels, minSize, multiple, onValueChange, onReject, value, ...consumerProps }: FileUploadRootProps): ReactElement;
|
|
4
4
|
export declare namespace FileUploadRootClient {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadRoot.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/FileUploadRoot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"FileUploadRoot.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/FileUploadRoot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,KAAK,EAAoB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAQxE,wBAAgB,oBAAoB,CAAC,EACnC,MAAW,EACX,QAAQ,EACR,YAAiB,EACjB,QAAgB,EAChB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAgB,EAChB,aAAa,EACb,QAAQ,EACR,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,mBAAmB,GAAG,YAAY,CAkDpC;yBAhEe,oBAAoB;;;AAkEpC,eAAO,MAAM,cAAc,6BAAuB,CAAC"}
|
|
@@ -4,6 +4,11 @@ import { useRef } from "react";
|
|
|
4
4
|
import { useControllableState, useId } from "@gunkin/uiify/hooks";
|
|
5
5
|
import { FileUploadProvider } from "./file-upload-context.js";
|
|
6
6
|
import { validateFiles } from "./file-upload-store.js";
|
|
7
|
+
const DEFAULT_FILE_UPLOAD_LABELS = {
|
|
8
|
+
dropzone: "Drop files here",
|
|
9
|
+
remove: "Remove {name}",
|
|
10
|
+
removeFallback: "Remove file"
|
|
11
|
+
};
|
|
7
12
|
function FileUploadRootClient({
|
|
8
13
|
accept = [],
|
|
9
14
|
children,
|
|
@@ -11,6 +16,7 @@ function FileUploadRootClient({
|
|
|
11
16
|
disabled = false,
|
|
12
17
|
maxFiles,
|
|
13
18
|
maxSize,
|
|
19
|
+
labels,
|
|
14
20
|
minSize,
|
|
15
21
|
multiple = false,
|
|
16
22
|
onValueChange,
|
|
@@ -18,6 +24,7 @@ function FileUploadRootClient({
|
|
|
18
24
|
value,
|
|
19
25
|
...consumerProps
|
|
20
26
|
}) {
|
|
27
|
+
const resolvedLabels = { ...DEFAULT_FILE_UPLOAD_LABELS, ...labels };
|
|
21
28
|
const inputId = useId();
|
|
22
29
|
const hiddenInputRef = useRef(null);
|
|
23
30
|
const [files, setFiles] = useControllableState({
|
|
@@ -44,6 +51,8 @@ function FileUploadRootClient({
|
|
|
44
51
|
accept,
|
|
45
52
|
disabled,
|
|
46
53
|
files,
|
|
54
|
+
labels: resolvedLabels,
|
|
55
|
+
...labels?.remove !== void 0 ? { removeLabel: labels.remove } : {},
|
|
47
56
|
hiddenInputRef,
|
|
48
57
|
inputId,
|
|
49
58
|
multiple,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/file-upload/FileUploadRoot.tsx"],"sourcesContent":["\"use client\";\nimport { useRef, type ReactElement } from \"react\";\nimport { useControllableState, useId } from \"@gunkin/uiify/hooks\";\nimport { FileUploadProvider } from \"./file-upload-context.js\";\nimport { validateFiles } from \"./file-upload-store.js\";\nimport type { FileUploadRootProps } from \"./types.js\";\n\nexport function FileUploadRootClient({\n accept = [],\n children,\n defaultValue = [],\n disabled = false,\n maxFiles,\n maxSize,\n minSize,\n multiple = false,\n onValueChange,\n onReject,\n value,\n ...consumerProps\n}: FileUploadRootProps): ReactElement {\n const inputId = useId();\n const hiddenInputRef = useRef<HTMLInputElement | null>(null);\n const [files, setFiles] = useControllableState<readonly File[]>({\n value,\n defaultValue,\n onChange: (next) => onValueChange?.([...next]),\n });\n const processFiles = (list: FileList | readonly File[]) => {\n if (disabled) return;\n const { accepted, rejected } = validateFiles(Array.from(list), {\n accept,\n multiple,\n ...(maxFiles === undefined\n ? {}\n : { maxFiles: multiple ? Math.max(0, maxFiles - files.length) : maxFiles }),\n ...(maxSize === undefined ? {} : { maxSize }),\n ...(minSize === undefined ? {} : { minSize }),\n });\n if (rejected.length) onReject?.(rejected);\n if (accepted.length) setFiles(multiple ? [...files, ...accepted] : accepted);\n };\n return (\n <div {...consumerProps} data-uiify-file-upload=\"\" data-disabled={disabled ? \"\" : undefined}>\n <FileUploadProvider\n value={{\n accept,\n disabled,\n files,\n hiddenInputRef,\n inputId,\n multiple,\n processFiles,\n reset: () => setFiles([]),\n openPicker: () => {\n if (!disabled) hiddenInputRef.current?.click();\n },\n removeAt: (index) => {\n if (!disabled && index >= 0 && index < files.length)\n setFiles(files.filter((_, i) => i !== index));\n },\n }}\n >\n {children}\n </FileUploadProvider>\n </div>\n );\n}\nFileUploadRootClient.displayName = \"FileUploadRootClient\";\nexport const FileUploadRoot = FileUploadRootClient;\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../../src/components/file-upload/FileUploadRoot.tsx"],"sourcesContent":["\"use client\";\nimport { useRef, type ReactElement } from \"react\";\nimport { useControllableState, useId } from \"@gunkin/uiify/hooks\";\nimport { FileUploadProvider } from \"./file-upload-context.js\";\nimport { validateFiles } from \"./file-upload-store.js\";\nimport type { FileUploadLabels, FileUploadRootProps } from \"./types.js\";\n\nconst DEFAULT_FILE_UPLOAD_LABELS: FileUploadLabels = {\n dropzone: \"Drop files here\",\n remove: \"Remove {name}\",\n removeFallback: \"Remove file\",\n};\n\nexport function FileUploadRootClient({\n accept = [],\n children,\n defaultValue = [],\n disabled = false,\n maxFiles,\n maxSize,\n labels,\n minSize,\n multiple = false,\n onValueChange,\n onReject,\n value,\n ...consumerProps\n}: FileUploadRootProps): ReactElement {\n const resolvedLabels = { ...DEFAULT_FILE_UPLOAD_LABELS, ...labels };\n const inputId = useId();\n const hiddenInputRef = useRef<HTMLInputElement | null>(null);\n const [files, setFiles] = useControllableState<readonly File[]>({\n value,\n defaultValue,\n onChange: (next) => onValueChange?.([...next]),\n });\n const processFiles = (list: FileList | readonly File[]) => {\n if (disabled) return;\n const { accepted, rejected } = validateFiles(Array.from(list), {\n accept,\n multiple,\n ...(maxFiles === undefined\n ? {}\n : { maxFiles: multiple ? Math.max(0, maxFiles - files.length) : maxFiles }),\n ...(maxSize === undefined ? {} : { maxSize }),\n ...(minSize === undefined ? {} : { minSize }),\n });\n if (rejected.length) onReject?.(rejected);\n if (accepted.length) setFiles(multiple ? [...files, ...accepted] : accepted);\n };\n return (\n <div {...consumerProps} data-uiify-file-upload=\"\" data-disabled={disabled ? \"\" : undefined}>\n <FileUploadProvider\n value={{\n accept,\n disabled,\n files,\n labels: resolvedLabels,\n ...(labels?.remove !== undefined ? { removeLabel: labels.remove } : {}),\n hiddenInputRef,\n inputId,\n multiple,\n processFiles,\n reset: () => setFiles([]),\n openPicker: () => {\n if (!disabled) hiddenInputRef.current?.click();\n },\n removeAt: (index) => {\n if (!disabled && index >= 0 && index < files.length)\n setFiles(files.filter((_, i) => i !== index));\n },\n }}\n >\n {children}\n </FileUploadProvider>\n </div>\n );\n}\nFileUploadRootClient.displayName = \"FileUploadRootClient\";\nexport const FileUploadRoot = FileUploadRootClient;\n"],"mappings":";AAoDM;AAnDN,SAAS,cAAiC;AAC1C,SAAS,sBAAsB,aAAa;AAC5C,SAAS,0BAA0B;AACnC,SAAS,qBAAqB;AAG9B,MAAM,6BAA+C;AAAA,EACnD,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,gBAAgB;AAClB;AAEO,SAAS,qBAAqB;AAAA,EACnC,SAAS,CAAC;AAAA,EACV;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsC;AACpC,QAAM,iBAAiB,EAAE,GAAG,4BAA4B,GAAG,OAAO;AAClE,QAAM,UAAU,MAAM;AACtB,QAAM,iBAAiB,OAAgC,IAAI;AAC3D,QAAM,CAAC,OAAO,QAAQ,IAAI,qBAAsC;AAAA,IAC9D;AAAA,IACA;AAAA,IACA,UAAU,CAAC,SAAS,gBAAgB,CAAC,GAAG,IAAI,CAAC;AAAA,EAC/C,CAAC;AACD,QAAM,eAAe,CAAC,SAAqC;AACzD,QAAI,SAAU;AACd,UAAM,EAAE,UAAU,SAAS,IAAI,cAAc,MAAM,KAAK,IAAI,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,GAAI,aAAa,SACb,CAAC,IACD,EAAE,UAAU,WAAW,KAAK,IAAI,GAAG,WAAW,MAAM,MAAM,IAAI,SAAS;AAAA,MAC3E,GAAI,YAAY,SAAY,CAAC,IAAI,EAAE,QAAQ;AAAA,MAC3C,GAAI,YAAY,SAAY,CAAC,IAAI,EAAE,QAAQ;AAAA,IAC7C,CAAC;AACD,QAAI,SAAS,OAAQ,YAAW,QAAQ;AACxC,QAAI,SAAS,OAAQ,UAAS,WAAW,CAAC,GAAG,OAAO,GAAG,QAAQ,IAAI,QAAQ;AAAA,EAC7E;AACA,SACE,oBAAC,SAAK,GAAG,eAAe,0BAAuB,IAAG,iBAAe,WAAW,KAAK,QAC/E;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,QACR,GAAI,QAAQ,WAAW,SAAY,EAAE,aAAa,OAAO,OAAO,IAAI,CAAC;AAAA,QACrE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO,MAAM,SAAS,CAAC,CAAC;AAAA,QACxB,YAAY,MAAM;AAChB,cAAI,CAAC,SAAU,gBAAe,SAAS,MAAM;AAAA,QAC/C;AAAA,QACA,UAAU,CAAC,UAAU;AACnB,cAAI,CAAC,YAAY,SAAS,KAAK,QAAQ,MAAM;AAC3C,qBAAS,MAAM,OAAO,CAAC,GAAG,MAAM,MAAM,KAAK,CAAC;AAAA,QAChD;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;AACA,qBAAqB,cAAc;AAC5B,MAAM,iBAAiB;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { FileUpload, FileUploadDropzone, FileUploadHiddenInput, FileUploadItem, FileUploadItemRemove, FileUploadList, FileUploadRoot, FileUploadTrigger, } from "./FileUpload.js";
|
|
2
|
-
export type { FileUploadDropzoneOwnProps, FileUploadDropzoneProps, FileUploadHiddenInputOwnProps, FileUploadListOwnProps, FileUploadItemRemoveOwnProps, FileUploadItemOwnProps, FileUploadItemProps, FileUploadRootOwnProps, FileUploadRootProps, FileUploadTriggerOwnProps, FileUploadTriggerProps, FileRejection, } from "./types.js";
|
|
2
|
+
export type { FileUploadDropzoneOwnProps, FileUploadDropzoneProps, FileUploadHiddenInputOwnProps, FileUploadLabels, FileUploadListOwnProps, FileUploadItemRemoveOwnProps, FileUploadItemOwnProps, FileUploadItemProps, FileUploadRootOwnProps, FileUploadRootProps, FileUploadTriggerOwnProps, FileUploadTriggerProps, FileRejection, } from "./types.js";
|
|
3
3
|
export type { FileUploadStore } from "./types.js";
|
|
4
4
|
export { validateFiles } from "./file-upload-store.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,6BAA6B,EAC7B,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/file-upload/index.ts"],"sourcesContent":["export {\n FileUpload,\n FileUploadDropzone,\n FileUploadHiddenInput,\n FileUploadItem,\n FileUploadItemRemove,\n FileUploadList,\n FileUploadRoot,\n FileUploadTrigger,\n} from \"./FileUpload.js\";\nexport type {\n FileUploadDropzoneOwnProps,\n FileUploadDropzoneProps,\n FileUploadHiddenInputOwnProps,\n FileUploadListOwnProps,\n FileUploadItemRemoveOwnProps,\n FileUploadItemOwnProps,\n FileUploadItemProps,\n FileUploadRootOwnProps,\n FileUploadRootProps,\n FileUploadTriggerOwnProps,\n FileUploadTriggerProps,\n FileRejection,\n} from \"./types.js\";\nexport type { FileUploadStore } from \"./types.js\";\nexport { validateFiles } from \"./file-upload-store.js\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/file-upload/index.ts"],"sourcesContent":["export {\n FileUpload,\n FileUploadDropzone,\n FileUploadHiddenInput,\n FileUploadItem,\n FileUploadItemRemove,\n FileUploadList,\n FileUploadRoot,\n FileUploadTrigger,\n} from \"./FileUpload.js\";\nexport type {\n FileUploadDropzoneOwnProps,\n FileUploadDropzoneProps,\n FileUploadHiddenInputOwnProps,\n FileUploadLabels,\n FileUploadListOwnProps,\n FileUploadItemRemoveOwnProps,\n FileUploadItemOwnProps,\n FileUploadItemProps,\n FileUploadRootOwnProps,\n FileUploadRootProps,\n FileUploadTriggerOwnProps,\n FileUploadTriggerProps,\n FileRejection,\n} from \"./types.js\";\nexport type { FileUploadStore } from \"./types.js\";\nexport { validateFiles } from \"./file-upload-store.js\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiBP,SAAS,qBAAqB;","names":[]}
|
|
@@ -4,6 +4,11 @@ export interface FileRejection {
|
|
|
4
4
|
readonly file: File;
|
|
5
5
|
readonly reason: "accept" | "max-size" | "max-files";
|
|
6
6
|
}
|
|
7
|
+
export interface FileUploadLabels {
|
|
8
|
+
readonly dropzone: string;
|
|
9
|
+
readonly remove: string;
|
|
10
|
+
readonly removeFallback: string;
|
|
11
|
+
}
|
|
7
12
|
export interface FileUploadStoreOptions {
|
|
8
13
|
readonly accept?: readonly string[];
|
|
9
14
|
readonly maxFiles?: number;
|
|
@@ -30,6 +35,8 @@ export interface FileUploadContextValue {
|
|
|
30
35
|
readonly removeAt: (index: number) => void;
|
|
31
36
|
readonly reset: () => void;
|
|
32
37
|
readonly files: readonly File[];
|
|
38
|
+
readonly labels: FileUploadLabels;
|
|
39
|
+
readonly removeLabel?: string;
|
|
33
40
|
}
|
|
34
41
|
export interface FileUploadRootOwnProps {
|
|
35
42
|
readonly className?: string;
|
|
@@ -38,6 +45,7 @@ export interface FileUploadRootOwnProps {
|
|
|
38
45
|
readonly disabled?: boolean;
|
|
39
46
|
readonly maxFiles?: number;
|
|
40
47
|
readonly maxSize?: number;
|
|
48
|
+
readonly labels?: Partial<FileUploadLabels>;
|
|
41
49
|
readonly minSize?: number;
|
|
42
50
|
readonly multiple?: boolean;
|
|
43
51
|
readonly onValueChange?: (files: File[]) => void;
|
|
@@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AAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementType, ReactElement } from "react";
|
|
2
|
+
import type { FormErrorSummaryProps } from "./types.js";
|
|
3
|
+
export declare function FormErrorSummary<TAs extends ElementType = "section">(props: FormErrorSummaryProps<TAs>): ReactElement | null;
|
|
4
|
+
export declare namespace FormErrorSummary {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=FormErrorSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormErrorSummary.d.ts","sourceRoot":"","sources":["../../../src/components/form-error-summary/FormErrorSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,SAAS,WAAW,GAAG,SAAS,EAClE,KAAK,EAAE,qBAAqB,CAAC,GAAG,CAAC,GAChC,YAAY,GAAG,IAAI,CA6BrB;yBA/Be,gBAAgB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRenderElement } from "@gunkin/uiify/core/render";
|
|
3
|
+
function FormErrorSummary(props) {
|
|
4
|
+
const { as, render, title, errors, ...consumerProps } = props;
|
|
5
|
+
const element = useRenderElement({
|
|
6
|
+
as,
|
|
7
|
+
defaultTag: "section",
|
|
8
|
+
props: {
|
|
9
|
+
...consumerProps,
|
|
10
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx("h2", { "data-part": "title", children: title }),
|
|
12
|
+
/* @__PURE__ */ jsx("ul", { "data-part": "list", children: errors.map((error, index) => /* @__PURE__ */ jsx("li", { "data-part": "item", children: /* @__PURE__ */ jsx("a", { "data-part": "link", href: error.href, children: error.message }) }, `${error.href}-${index}`)) })
|
|
13
|
+
] }),
|
|
14
|
+
"data-uiify-form-error-summary": ""
|
|
15
|
+
},
|
|
16
|
+
render,
|
|
17
|
+
state: {}
|
|
18
|
+
});
|
|
19
|
+
return errors.length === 0 ? null : element;
|
|
20
|
+
}
|
|
21
|
+
FormErrorSummary.displayName = "FormErrorSummary";
|
|
22
|
+
export {
|
|
23
|
+
FormErrorSummary
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=FormErrorSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form-error-summary/FormErrorSummary.tsx"],"sourcesContent":["import type { ElementType, ReactElement } from \"react\";\nimport { useRenderElement } from \"@gunkin/uiify/core/render\";\nimport type { FormErrorSummaryProps } from \"./types.js\";\n\nexport function FormErrorSummary<TAs extends ElementType = \"section\">(\n props: FormErrorSummaryProps<TAs>,\n): ReactElement | null {\n const { as, render, title, errors, ...consumerProps } = props as FormErrorSummaryProps<\"section\">;\n\n const element = useRenderElement({\n as,\n defaultTag: \"section\",\n props: {\n ...consumerProps,\n children: (\n <>\n <h2 data-part=\"title\">{title}</h2>\n <ul data-part=\"list\">\n {errors.map((error, index) => (\n <li data-part=\"item\" key={`${error.href}-${index}`}>\n <a data-part=\"link\" href={error.href}>\n {error.message}\n </a>\n </li>\n ))}\n </ul>\n </>\n ),\n \"data-uiify-form-error-summary\": \"\",\n },\n render,\n state: {},\n });\n\n return errors.length === 0 ? null : element;\n}\n\nFormErrorSummary.displayName = \"FormErrorSummary\";\n"],"mappings":"AAeQ,mBACE,KADF;AAdR,SAAS,wBAAwB;AAG1B,SAAS,iBACd,OACqB;AACrB,QAAM,EAAE,IAAI,QAAQ,OAAO,QAAQ,GAAG,cAAc,IAAI;AAExD,QAAM,UAAU,iBAAiB;AAAA,IAC/B;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,GAAG;AAAA,MACH,UACE,iCACE;AAAA,4BAAC,QAAG,aAAU,SAAS,iBAAM;AAAA,QAC7B,oBAAC,QAAG,aAAU,QACX,iBAAO,IAAI,CAAC,OAAO,UAClB,oBAAC,QAAG,aAAU,QACZ,8BAAC,OAAE,aAAU,QAAO,MAAM,MAAM,MAC7B,gBAAM,SACT,KAHwB,GAAG,MAAM,IAAI,IAAI,KAAK,EAIhD,CACD,GACH;AAAA,SACF;AAAA,MAEF,iCAAiC;AAAA,IACnC;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,EACV,CAAC;AAED,SAAO,OAAO,WAAW,IAAI,OAAO;AACtC;AAEA,iBAAiB,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-error-summary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form-error-summary/index.ts"],"sourcesContent":["export { FormErrorSummary } from \"./FormErrorSummary.js\";\nexport type {\n FormErrorSummaryError,\n FormErrorSummaryOwnProps,\n FormErrorSummaryProps,\n} from \"./types.js\";\n"],"mappings":"AAAA,SAAS,wBAAwB;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
|
+
import type { RenderableProps } from "@gunkin/uiify/core/render";
|
|
3
|
+
export interface FormErrorSummaryError {
|
|
4
|
+
readonly href: string;
|
|
5
|
+
readonly message: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface FormErrorSummaryOwnProps {
|
|
8
|
+
readonly title: ReactNode;
|
|
9
|
+
readonly errors: readonly FormErrorSummaryError[];
|
|
10
|
+
}
|
|
11
|
+
export type FormErrorSummaryProps<TAs extends ElementType = "section"> = RenderableProps<TAs, FormErrorSummaryOwnProps, Record<string, never>, HTMLElement>;
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/form-error-summary/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACnD;AAED,MAAM,MAAM,qBAAqB,CAAC,GAAG,SAAS,WAAW,GAAG,SAAS,IAAI,eAAe,CACtF,GAAG,EACH,wBAAwB,EACxB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB,WAAW,CACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./form-error-summary/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./form-error-summary/index.js";
|
|
@@ -21,6 +21,19 @@ export * from "./toast/index.js";
|
|
|
21
21
|
export * from "./select/index.js";
|
|
22
22
|
export * from "./spinner/index.js";
|
|
23
23
|
export * from "./skeleton/index.js";
|
|
24
|
+
export * from "./aspect-ratio/index.js";
|
|
25
|
+
export * from "./badge/index.js";
|
|
26
|
+
export * from "./card/index.js";
|
|
27
|
+
export * from "./progress/index.js";
|
|
28
|
+
export * from "./avatar/index.js";
|
|
29
|
+
export * from "./alert/index.js";
|
|
30
|
+
export * from "./input-group/index.js";
|
|
31
|
+
export * from "./empty/index.js";
|
|
32
|
+
export * from "./item/index.js";
|
|
33
|
+
export * from "./date-picker/index.js";
|
|
34
|
+
export * from "./fieldset/index.js";
|
|
35
|
+
export * from "./form-error-summary/index.js";
|
|
36
|
+
export * from "./description-list/index.js";
|
|
24
37
|
export * from "./collapsible/index.js";
|
|
25
38
|
export * from "./breadcrumb/index.js";
|
|
26
39
|
export * from "./pagination/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -21,6 +21,19 @@ export * from "./toast/index.js";
|
|
|
21
21
|
export * from "./select/index.js";
|
|
22
22
|
export * from "./spinner/index.js";
|
|
23
23
|
export * from "./skeleton/index.js";
|
|
24
|
+
export * from "./aspect-ratio/index.js";
|
|
25
|
+
export * from "./badge/index.js";
|
|
26
|
+
export * from "./card/index.js";
|
|
27
|
+
export * from "./progress/index.js";
|
|
28
|
+
export * from "./avatar/index.js";
|
|
29
|
+
export * from "./alert/index.js";
|
|
30
|
+
export * from "./input-group/index.js";
|
|
31
|
+
export * from "./empty/index.js";
|
|
32
|
+
export * from "./item/index.js";
|
|
33
|
+
export * from "./date-picker/index.js";
|
|
34
|
+
export * from "./fieldset/index.js";
|
|
35
|
+
export * from "./form-error-summary/index.js";
|
|
36
|
+
export * from "./description-list/index.js";
|
|
24
37
|
export * from "./collapsible/index.js";
|
|
25
38
|
export * from "./breadcrumb/index.js";
|
|
26
39
|
export * from "./pagination/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// @gunkin/uiify/components — root barrel export.\n// Each component task appends one line here:\n// export * from \"./<name>/index.js\";\n\nexport * from \"./button/index.js\";\nexport * from \"./checkbox/index.js\";\nexport * from \"./modal/index.js\";\nexport * from \"./dropdown-menu/index.js\";\nexport * from \"./hover-card/index.js\";\nexport * from \"./input/index.js\";\nexport * from \"./popup/index.js\";\nexport * from \"./radio-group/index.js\";\nexport * from \"./slider/index.js\";\nexport * from \"./switch/index.js\";\nexport * from \"./tabs/index.js\";\nexport * from \"./textarea/index.js\";\nexport * from \"./toggle-group/index.js\";\nexport * from \"./toolbar/index.js\";\nexport * from \"./toggle/index.js\";\nexport * from \"./tooltip/index.js\";\nexport * from \"./accordion/index.js\";\nexport * from \"./alert-modal/index.js\";\nexport * from \"./combobox/index.js\";\nexport * from \"./toast/index.js\";\nexport * from \"./select/index.js\";\nexport * from \"./spinner/index.js\";\nexport * from \"./skeleton/index.js\";\nexport * from \"./collapsible/index.js\";\nexport * from \"./breadcrumb/index.js\";\nexport * from \"./pagination/index.js\";\nexport * from \"./table/index.js\";\nexport * from \"./number-field/index.js\";\nexport * from \"./otp-input/index.js\";\nexport * from \"./segmented-control/index.js\";\nexport * from \"./rating/index.js\";\nexport * from \"./field/index.js\";\nexport * from \"./form/index.js\";\nexport * from \"./tags-input/index.js\";\nexport * from \"./file-upload/index.js\";\nexport * from \"./color-picker/index.js\";\nexport * from \"./carousel/index.js\";\nexport * from \"./candle-chart/index.js\";\nexport * from \"./line-chart/index.js\";\nexport * from \"./drawer/index.js\";\nexport * from \"./context-menu/index.js\";\nexport * from \"./header/index.js\";\nexport * from \"./virtual-scroll/index.js\";\n\nexport * from \"./table-of-contents/index.js\";\n"],"mappings":"AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// @gunkin/uiify/components — root barrel export.\n// Each component task appends one line here:\n// export * from \"./<name>/index.js\";\n\nexport * from \"./button/index.js\";\nexport * from \"./checkbox/index.js\";\nexport * from \"./modal/index.js\";\nexport * from \"./dropdown-menu/index.js\";\nexport * from \"./hover-card/index.js\";\nexport * from \"./input/index.js\";\nexport * from \"./popup/index.js\";\nexport * from \"./radio-group/index.js\";\nexport * from \"./slider/index.js\";\nexport * from \"./switch/index.js\";\nexport * from \"./tabs/index.js\";\nexport * from \"./textarea/index.js\";\nexport * from \"./toggle-group/index.js\";\nexport * from \"./toolbar/index.js\";\nexport * from \"./toggle/index.js\";\nexport * from \"./tooltip/index.js\";\nexport * from \"./accordion/index.js\";\nexport * from \"./alert-modal/index.js\";\nexport * from \"./combobox/index.js\";\nexport * from \"./toast/index.js\";\nexport * from \"./select/index.js\";\nexport * from \"./spinner/index.js\";\nexport * from \"./skeleton/index.js\";\nexport * from \"./aspect-ratio/index.js\";\nexport * from \"./badge/index.js\";\nexport * from \"./card/index.js\";\nexport * from \"./progress/index.js\";\nexport * from \"./avatar/index.js\";\nexport * from \"./alert/index.js\";\nexport * from \"./input-group/index.js\";\nexport * from \"./empty/index.js\";\nexport * from \"./item/index.js\";\nexport * from \"./date-picker/index.js\";\nexport * from \"./fieldset/index.js\";\nexport * from \"./form-error-summary/index.js\";\nexport * from \"./description-list/index.js\";\nexport * from \"./collapsible/index.js\";\nexport * from \"./breadcrumb/index.js\";\nexport * from \"./pagination/index.js\";\nexport * from \"./table/index.js\";\nexport * from \"./number-field/index.js\";\nexport * from \"./otp-input/index.js\";\nexport * from \"./segmented-control/index.js\";\nexport * from \"./rating/index.js\";\nexport * from \"./field/index.js\";\nexport * from \"./form/index.js\";\nexport * from \"./tags-input/index.js\";\nexport * from \"./file-upload/index.js\";\nexport * from \"./color-picker/index.js\";\nexport * from \"./carousel/index.js\";\nexport * from \"./candle-chart/index.js\";\nexport * from \"./line-chart/index.js\";\nexport * from \"./drawer/index.js\";\nexport * from \"./context-menu/index.js\";\nexport * from \"./header/index.js\";\nexport * from \"./virtual-scroll/index.js\";\n\nexport * from \"./table-of-contents/index.js\";\n"],"mappings":"AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;","names":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ElementType, ReactElement } from "react";
|
|
2
|
+
import type { InputGroupAddonProps, InputGroupRootProps } from "./types.js";
|
|
3
|
+
export declare function InputGroup<TAs extends ElementType = "div">(props: InputGroupRootProps<TAs>): ReactElement | null;
|
|
4
|
+
export declare function InputGroupAddon<TAs extends ElementType = "span">(props: InputGroupAddonProps<TAs>): ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=InputGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroup.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/InputGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE5E,wBAAgB,UAAU,CAAC,GAAG,SAAS,WAAW,GAAG,KAAK,EACxD,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAC9B,YAAY,GAAG,IAAI,CAcrB;AAED,wBAAgB,eAAe,CAAC,GAAG,SAAS,WAAW,GAAG,MAAM,EAC9D,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,GAC/B,YAAY,GAAG,IAAI,CAerB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useRenderElement } from "@gunkin/uiify/core/render";
|
|
2
|
+
function InputGroup(props) {
|
|
3
|
+
const { as, render, children, ...consumerProps } = props;
|
|
4
|
+
return useRenderElement({
|
|
5
|
+
as,
|
|
6
|
+
defaultTag: "div",
|
|
7
|
+
props: {
|
|
8
|
+
...consumerProps,
|
|
9
|
+
children,
|
|
10
|
+
"data-part": "root",
|
|
11
|
+
"data-uiify-input-group": ""
|
|
12
|
+
},
|
|
13
|
+
render,
|
|
14
|
+
state: {}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function InputGroupAddon(props) {
|
|
18
|
+
const { as, render, align, children, ...consumerProps } = props;
|
|
19
|
+
return useRenderElement({
|
|
20
|
+
as,
|
|
21
|
+
defaultTag: "span",
|
|
22
|
+
props: {
|
|
23
|
+
...consumerProps,
|
|
24
|
+
children,
|
|
25
|
+
"data-align": align,
|
|
26
|
+
"data-part": "addon",
|
|
27
|
+
"data-uiify-input-group": ""
|
|
28
|
+
},
|
|
29
|
+
render,
|
|
30
|
+
state: {}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
InputGroup,
|
|
35
|
+
InputGroupAddon
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=InputGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/input-group/InputGroup.tsx"],"sourcesContent":["import type { ElementType, ReactElement } from \"react\";\nimport { useRenderElement } from \"@gunkin/uiify/core/render\";\nimport type { InputGroupAddonProps, InputGroupRootProps } from \"./types.js\";\n\nexport function InputGroup<TAs extends ElementType = \"div\">(\n props: InputGroupRootProps<TAs>,\n): ReactElement | null {\n const { as, render, children, ...consumerProps } = props as InputGroupRootProps<\"div\">;\n return useRenderElement({\n as,\n defaultTag: \"div\",\n props: {\n ...consumerProps,\n children,\n \"data-part\": \"root\",\n \"data-uiify-input-group\": \"\",\n },\n render,\n state: {},\n });\n}\n\nexport function InputGroupAddon<TAs extends ElementType = \"span\">(\n props: InputGroupAddonProps<TAs>,\n): ReactElement | null {\n const { as, render, align, children, ...consumerProps } = props as InputGroupAddonProps<\"span\">;\n return useRenderElement({\n as,\n defaultTag: \"span\",\n props: {\n ...consumerProps,\n children,\n \"data-align\": align,\n \"data-part\": \"addon\",\n \"data-uiify-input-group\": \"\",\n },\n render,\n state: {},\n });\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAG1B,SAAS,WACd,OACqB;AACrB,QAAM,EAAE,IAAI,QAAQ,UAAU,GAAG,cAAc,IAAI;AACnD,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,aAAa;AAAA,MACb,0BAA0B;AAAA,IAC5B;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,EACV,CAAC;AACH;AAEO,SAAS,gBACd,OACqB;AACrB,QAAM,EAAE,IAAI,QAAQ,OAAO,UAAU,GAAG,cAAc,IAAI;AAC1D,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,cAAc;AAAA,MACd,aAAa;AAAA,MACb,0BAA0B;AAAA,IAC5B;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,EACV,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9D,YAAY,EACV,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|