@ayasofyazilim/ui 0.0.0 → 0.0.2
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/dist/aria/index.js +2 -0
- package/dist/aria/index.js.map +1 -0
- package/dist/aria/number-field.js +46 -0
- package/dist/aria/number-field.js.map +1 -0
- package/dist/components/accordion.js +66 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.js +148 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.js +69 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/aspect-ratio.js +12 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/avatar.js +55 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.js +62 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.js +104 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button-group.js +77 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.js +56 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.js +196 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.js +91 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.js +200 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.js +250 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.js +33 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.js +36 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.js +178 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.js +225 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.js +139 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.js +130 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.js +234 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty.js +100 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.js +231 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/form.js +124 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/hover-card.js +40 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.js +156 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-otp.js +68 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.js +22 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/item.js +188 -0
- package/dist/components/item.js.map +1 -0
- package/dist/components/kbd.js +32 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.js +24 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/menubar.js +253 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/navigation-menu.js +171 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/pagination.js +125 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.js +82 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.js +33 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.js +47 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/resizable.js +50 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.js +62 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.js +173 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.js +28 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.js +129 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.js +759 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.js +16 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.js +65 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.js +40 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spinner.js +18 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stepper.js +220 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.js +33 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +131 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.js +69 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.js +19 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toggle-group.js +70 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.js +45 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.js +65 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/custom/action-button.js +38 -0
- package/dist/custom/action-button.js.map +1 -0
- package/dist/custom/async-select.js +249 -0
- package/dist/custom/async-select.js.map +1 -0
- package/dist/custom/awesome-not-found.js +113 -0
- package/dist/custom/awesome-not-found.js.map +1 -0
- package/dist/custom/charts/area-chart.js +125 -0
- package/dist/custom/charts/area-chart.js.map +1 -0
- package/dist/custom/charts/bar-chart.js +232 -0
- package/dist/custom/charts/bar-chart.js.map +1 -0
- package/dist/custom/charts/chart-card.js +71 -0
- package/dist/custom/charts/chart-card.js.map +1 -0
- package/dist/custom/charts/index.js +5 -0
- package/dist/custom/charts/index.js.map +1 -0
- package/dist/custom/charts/pie-chart.js +153 -0
- package/dist/custom/charts/pie-chart.js.map +1 -0
- package/dist/custom/charts/radar-chart.js +112 -0
- package/dist/custom/charts/radar-chart.js.map +1 -0
- package/dist/custom/checkbox-tree.js +70 -0
- package/dist/custom/checkbox-tree.js.map +1 -0
- package/dist/custom/combobox.js +233 -0
- package/dist/custom/combobox.js.map +1 -0
- package/dist/custom/confirm-dialog.js +90 -0
- package/dist/custom/confirm-dialog.js.map +1 -0
- package/dist/custom/country-selector.js +151 -0
- package/dist/custom/country-selector.js.map +1 -0
- package/dist/custom/date-picker/calendar-rac.js +91 -0
- package/dist/custom/date-picker/calendar-rac.js.map +1 -0
- package/dist/custom/date-picker/datefield-rac.js +77 -0
- package/dist/custom/date-picker/datefield-rac.js.map +1 -0
- package/dist/custom/date-picker/index.js +251 -0
- package/dist/custom/date-picker/index.js.map +1 -0
- package/dist/custom/date-picker/types/index.js +1 -0
- package/dist/custom/date-picker/types/index.js.map +1 -0
- package/dist/custom/date-picker/utils/index.js +30 -0
- package/dist/custom/date-picker/utils/index.js.map +1 -0
- package/dist/custom/date-picker-old.js +46 -0
- package/dist/custom/date-picker-old.js.map +1 -0
- package/dist/custom/date-tooltip.js +89 -0
- package/dist/custom/date-tooltip.js.map +1 -0
- package/dist/custom/document-scanner/consts.js +13 -0
- package/dist/custom/document-scanner/consts.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/action-buttons.js +24 -0
- package/dist/custom/document-scanner/corner-adjustment/action-buttons.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/corner-handle.js +44 -0
- package/dist/custom/document-scanner/corner-adjustment/corner-handle.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/hooks/use-corner-drag.js +60 -0
- package/dist/custom/document-scanner/corner-adjustment/hooks/use-corner-drag.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/index.js +124 -0
- package/dist/custom/document-scanner/corner-adjustment/index.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/types.js +1 -0
- package/dist/custom/document-scanner/corner-adjustment/types.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/utils/clip-path.js +16 -0
- package/dist/custom/document-scanner/corner-adjustment/utils/clip-path.js.map +1 -0
- package/dist/custom/document-scanner/corner-adjustment/zoom-magnifier.js +85 -0
- package/dist/custom/document-scanner/corner-adjustment/zoom-magnifier.js.map +1 -0
- package/dist/custom/document-scanner/hooks/use-document-capture.js +61 -0
- package/dist/custom/document-scanner/hooks/use-document-capture.js.map +1 -0
- package/dist/custom/document-scanner/hooks/use-document-scanner.js +59 -0
- package/dist/custom/document-scanner/hooks/use-document-scanner.js.map +1 -0
- package/dist/custom/document-scanner/hooks/use-perspective-crop.js +31 -0
- package/dist/custom/document-scanner/hooks/use-perspective-crop.js.map +1 -0
- package/dist/custom/document-scanner/index.js +229 -0
- package/dist/custom/document-scanner/index.js.map +1 -0
- package/dist/custom/document-scanner/lib.js +289 -0
- package/dist/custom/document-scanner/lib.js.map +1 -0
- package/dist/custom/document-scanner/types.js +1 -0
- package/dist/custom/document-scanner/types.js.map +1 -0
- package/dist/custom/document-scanner/utils/perspective-correction.js +100 -0
- package/dist/custom/document-scanner/utils/perspective-correction.js.map +1 -0
- package/dist/custom/document-viewer/controllers.js +76 -0
- package/dist/custom/document-viewer/controllers.js.map +1 -0
- package/dist/custom/document-viewer/index.js +36 -0
- package/dist/custom/document-viewer/index.js.map +1 -0
- package/dist/custom/document-viewer/renderers/image.js +40 -0
- package/dist/custom/document-viewer/renderers/image.js.map +1 -0
- package/dist/custom/document-viewer/renderers/index.js +3 -0
- package/dist/custom/document-viewer/renderers/index.js.map +1 -0
- package/dist/custom/document-viewer/renderers/pdf.js +95 -0
- package/dist/custom/document-viewer/renderers/pdf.js.map +1 -0
- package/dist/custom/email-input/email.js +184 -0
- package/dist/custom/email-input/email.js.map +1 -0
- package/dist/custom/email-input/index.js +8 -0
- package/dist/custom/email-input/index.js.map +1 -0
- package/dist/custom/email-input/types.js +13 -0
- package/dist/custom/email-input/types.js.map +1 -0
- package/dist/custom/file-uploader.js +389 -0
- package/dist/custom/file-uploader.js.map +1 -0
- package/dist/custom/filter-component/fields/async-select.js +31 -0
- package/dist/custom/filter-component/fields/async-select.js.map +1 -0
- package/dist/custom/filter-component/fields/date.js +56 -0
- package/dist/custom/filter-component/fields/date.js.map +1 -0
- package/dist/custom/filter-component/fields/multi-select.js +28 -0
- package/dist/custom/filter-component/fields/multi-select.js.map +1 -0
- package/dist/custom/filter-component/index.js +149 -0
- package/dist/custom/filter-component/index.js.map +1 -0
- package/dist/custom/image-canvas.js +193 -0
- package/dist/custom/image-canvas.js.map +1 -0
- package/dist/custom/json-editor.js +30 -0
- package/dist/custom/json-editor.js.map +1 -0
- package/dist/custom/master-data-grid/components/dialogs/column-settings-dialog.js +84 -0
- package/dist/custom/master-data-grid/components/dialogs/column-settings-dialog.js.map +1 -0
- package/dist/custom/master-data-grid/components/dialogs/index.js +5 -0
- package/dist/custom/master-data-grid/components/dialogs/index.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/client-filter.js +310 -0
- package/dist/custom/master-data-grid/components/filters/client-filter.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/filter-input.js +209 -0
- package/dist/custom/master-data-grid/components/filters/filter-input.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/index.js +9 -0
- package/dist/custom/master-data-grid/components/filters/index.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/inline-column-filter.js +188 -0
- package/dist/custom/master-data-grid/components/filters/inline-column-filter.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/multi-filter-dialog.js +65 -0
- package/dist/custom/master-data-grid/components/filters/multi-filter-dialog.js.map +1 -0
- package/dist/custom/master-data-grid/components/filters/server-filter.js +213 -0
- package/dist/custom/master-data-grid/components/filters/server-filter.js.map +1 -0
- package/dist/custom/master-data-grid/components/master-data-grid.js +421 -0
- package/dist/custom/master-data-grid/components/master-data-grid.js.map +1 -0
- package/dist/custom/master-data-grid/components/pagination/index.js +5 -0
- package/dist/custom/master-data-grid/components/pagination/index.js.map +1 -0
- package/dist/custom/master-data-grid/components/pagination/pagination.js +159 -0
- package/dist/custom/master-data-grid/components/pagination/pagination.js.map +1 -0
- package/dist/custom/master-data-grid/components/table/cell-renderer.js +442 -0
- package/dist/custom/master-data-grid/components/table/cell-renderer.js.map +1 -0
- package/dist/custom/master-data-grid/components/table/header-cell.js +116 -0
- package/dist/custom/master-data-grid/components/table/header-cell.js.map +1 -0
- package/dist/custom/master-data-grid/components/table/index.js +5 -0
- package/dist/custom/master-data-grid/components/table/index.js.map +1 -0
- package/dist/custom/master-data-grid/components/table/table-body-renderer.js +79 -0
- package/dist/custom/master-data-grid/components/table/table-body-renderer.js.map +1 -0
- package/dist/custom/master-data-grid/components/table/virtual-body.js +86 -0
- package/dist/custom/master-data-grid/components/table/virtual-body.js.map +1 -0
- package/dist/custom/master-data-grid/components/toolbar/index.js +5 -0
- package/dist/custom/master-data-grid/components/toolbar/index.js.map +1 -0
- package/dist/custom/master-data-grid/components/toolbar/toolbar.js +238 -0
- package/dist/custom/master-data-grid/components/toolbar/toolbar.js.map +1 -0
- package/dist/custom/master-data-grid/hooks/index.js +7 -0
- package/dist/custom/master-data-grid/hooks/index.js.map +1 -0
- package/dist/custom/master-data-grid/hooks/use-columns.js +278 -0
- package/dist/custom/master-data-grid/hooks/use-columns.js.map +1 -0
- package/dist/custom/master-data-grid/hooks/use-editing.js +75 -0
- package/dist/custom/master-data-grid/hooks/use-editing.js.map +1 -0
- package/dist/custom/master-data-grid/hooks/use-table-state-reducer.js +96 -0
- package/dist/custom/master-data-grid/hooks/use-table-state-reducer.js.map +1 -0
- package/dist/custom/master-data-grid/hooks/use-table-state.js +25 -0
- package/dist/custom/master-data-grid/hooks/use-table-state.js.map +1 -0
- package/dist/custom/master-data-grid/index.js +5 -0
- package/dist/custom/master-data-grid/index.js.map +1 -0
- package/dist/custom/master-data-grid/types.js +1 -0
- package/dist/custom/master-data-grid/types.js.map +1 -0
- package/dist/custom/master-data-grid/utils/column-generator.js +203 -0
- package/dist/custom/master-data-grid/utils/column-generator.js.map +1 -0
- package/dist/custom/master-data-grid/utils/export-utils.js +46 -0
- package/dist/custom/master-data-grid/utils/export-utils.js.map +1 -0
- package/dist/custom/master-data-grid/utils/filter-fns.js +218 -0
- package/dist/custom/master-data-grid/utils/filter-fns.js.map +1 -0
- package/dist/custom/master-data-grid/utils/index.js +16 -0
- package/dist/custom/master-data-grid/utils/index.js.map +1 -0
- package/dist/custom/master-data-grid/utils/pinning-utils.js +70 -0
- package/dist/custom/master-data-grid/utils/pinning-utils.js.map +1 -0
- package/dist/custom/master-data-grid/utils/translation-utils.js +33 -0
- package/dist/custom/master-data-grid/utils/translation-utils.js.map +1 -0
- package/dist/custom/multi-select.js +339 -0
- package/dist/custom/multi-select.js.map +1 -0
- package/dist/custom/password-input.js +158 -0
- package/dist/custom/password-input.js.map +1 -0
- package/dist/custom/phone-input.js +127 -0
- package/dist/custom/phone-input.js.map +1 -0
- package/dist/custom/schema-form/custom/index.js +2 -0
- package/dist/custom/schema-form/custom/index.js.map +1 -0
- package/dist/custom/schema-form/custom/label.js +39 -0
- package/dist/custom/schema-form/custom/label.js.map +1 -0
- package/dist/custom/schema-form/fields/base-input-field.js +73 -0
- package/dist/custom/schema-form/fields/base-input-field.js.map +1 -0
- package/dist/custom/schema-form/fields/field.js +72 -0
- package/dist/custom/schema-form/fields/field.js.map +1 -0
- package/dist/custom/schema-form/fields/index.js +6 -0
- package/dist/custom/schema-form/fields/index.js.map +1 -0
- package/dist/custom/schema-form/fields/object.js +9 -0
- package/dist/custom/schema-form/fields/object.js.map +1 -0
- package/dist/custom/schema-form/fields/table-array/array-field-item.js +58 -0
- package/dist/custom/schema-form/fields/table-array/array-field-item.js.map +1 -0
- package/dist/custom/schema-form/fields/table-array/array-field-template.js +104 -0
- package/dist/custom/schema-form/fields/table-array/array-field-template.js.map +1 -0
- package/dist/custom/schema-form/index.js +219 -0
- package/dist/custom/schema-form/index.js.map +1 -0
- package/dist/custom/schema-form/templates/description.js +19 -0
- package/dist/custom/schema-form/templates/description.js.map +1 -0
- package/dist/custom/schema-form/templates/index.js +3 -0
- package/dist/custom/schema-form/templates/index.js.map +1 -0
- package/dist/custom/schema-form/templates/submit.js +31 -0
- package/dist/custom/schema-form/templates/submit.js.map +1 -0
- package/dist/custom/schema-form/types.js +1 -0
- package/dist/custom/schema-form/types.js.map +1 -0
- package/dist/custom/schema-form/utils/index.js +10 -0
- package/dist/custom/schema-form/utils/index.js.map +1 -0
- package/dist/custom/schema-form/utils/schema-dependency.js +349 -0
- package/dist/custom/schema-form/utils/schema-dependency.js.map +1 -0
- package/dist/custom/schema-form/utils/schemas.js +190 -0
- package/dist/custom/schema-form/utils/schemas.js.map +1 -0
- package/dist/custom/schema-form/utils/validation.js +19 -0
- package/dist/custom/schema-form/utils/validation.js.map +1 -0
- package/dist/custom/schema-form/widgets/boolean.js +73 -0
- package/dist/custom/schema-form/widgets/boolean.js.map +1 -0
- package/dist/custom/schema-form/widgets/combobox.js +222 -0
- package/dist/custom/schema-form/widgets/combobox.js.map +1 -0
- package/dist/custom/schema-form/widgets/date.js +56 -0
- package/dist/custom/schema-form/widgets/date.js.map +1 -0
- package/dist/custom/schema-form/widgets/email.js +37 -0
- package/dist/custom/schema-form/widgets/email.js.map +1 -0
- package/dist/custom/schema-form/widgets/index.js +11 -0
- package/dist/custom/schema-form/widgets/index.js.map +1 -0
- package/dist/custom/schema-form/widgets/password.js +42 -0
- package/dist/custom/schema-form/widgets/password.js.map +1 -0
- package/dist/custom/schema-form/widgets/phone.js +39 -0
- package/dist/custom/schema-form/widgets/phone.js.map +1 -0
- package/dist/custom/schema-form/widgets/select.js +78 -0
- package/dist/custom/schema-form/widgets/select.js.map +1 -0
- package/dist/custom/schema-form/widgets/selectable.js +25 -0
- package/dist/custom/schema-form/widgets/selectable.js.map +1 -0
- package/dist/custom/schema-form/widgets/string-array.js +237 -0
- package/dist/custom/schema-form/widgets/string-array.js.map +1 -0
- package/dist/custom/schema-form/widgets/url.js +53 -0
- package/dist/custom/schema-form/widgets/url.js.map +1 -0
- package/dist/custom/section-layout-v2.js +150 -0
- package/dist/custom/section-layout-v2.js.map +1 -0
- package/dist/custom/select-tabs.js +66 -0
- package/dist/custom/select-tabs.js.map +1 -0
- package/dist/custom/selectable.js +231 -0
- package/dist/custom/selectable.js.map +1 -0
- package/dist/custom/stepper.js +166 -0
- package/dist/custom/stepper.js.map +1 -0
- package/dist/custom/tab-layout.js +182 -0
- package/dist/custom/tab-layout.js.map +1 -0
- package/dist/custom/tanstack-table/fields/index.js +13 -0
- package/dist/custom/tanstack-table/fields/index.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-action-dialogs.js +76 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-action-dialogs.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-column-header.js +47 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-column-header.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-date.js +132 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-date.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-faceted.js +131 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-faceted.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-text.js +64 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-filter-text.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-pagination.js +135 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-pagination.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-plain-table.js +111 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-plain-table.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions-confirmation.js +65 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions-confirmation.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions-custom-dialog.js +69 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions-custom-dialog.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions.js +119 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-row-actions.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-table-actions-custom-dialog.js +75 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-table-actions-custom-dialog.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-table-actions-schemaform-dialog.js +41 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-table-actions-schemaform-dialog.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-toolbar.js +106 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-toolbar.js.map +1 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-view-options.js +132 -0
- package/dist/custom/tanstack-table/fields/tanstack-table-view-options.js.map +1 -0
- package/dist/custom/tanstack-table/index.js +217 -0
- package/dist/custom/tanstack-table/index.js.map +1 -0
- package/dist/custom/tanstack-table/types/index.js +1 -0
- package/dist/custom/tanstack-table/types/index.js.map +1 -0
- package/dist/custom/tanstack-table/utils/cell-with-actions.js +16 -0
- package/dist/custom/tanstack-table/utils/cell-with-actions.js.map +1 -0
- package/dist/custom/tanstack-table/utils/column-names.js +15 -0
- package/dist/custom/tanstack-table/utils/column-names.js.map +1 -0
- package/dist/custom/tanstack-table/utils/columns-by-row-data.js +246 -0
- package/dist/custom/tanstack-table/utils/columns-by-row-data.js.map +1 -0
- package/dist/custom/tanstack-table/utils/editable-columns-by-row-data.js +187 -0
- package/dist/custom/tanstack-table/utils/editable-columns-by-row-data.js.map +1 -0
- package/dist/custom/tanstack-table/utils/faceted-boolean-options.js +25 -0
- package/dist/custom/tanstack-table/utils/faceted-boolean-options.js.map +1 -0
- package/dist/custom/tanstack-table/utils/index.js +10 -0
- package/dist/custom/tanstack-table/utils/index.js.map +1 -0
- package/dist/custom/tanstack-table/utils/pinning-styles.js +38 -0
- package/dist/custom/tanstack-table/utils/pinning-styles.js.map +1 -0
- package/dist/custom/tanstack-table/utils/table.js +66 -0
- package/dist/custom/tanstack-table/utils/table.js.map +1 -0
- package/dist/custom/tanstack-table/utils/test-conditions.js +10 -0
- package/dist/custom/tanstack-table/utils/test-conditions.js.map +1 -0
- package/dist/custom/timeline.js +165 -0
- package/dist/custom/timeline.js.map +1 -0
- package/dist/custom/tree.js +130 -0
- package/dist/custom/tree.js.map +1 -0
- package/dist/custom/tscanify/browser.js +36 -0
- package/dist/custom/tscanify/browser.js.map +1 -0
- package/dist/custom/tscanify/index.js +34 -0
- package/dist/custom/tscanify/index.js.map +1 -0
- package/dist/custom/tscanify/tscanify-browser.js +363 -0
- package/dist/custom/tscanify/tscanify-browser.js.map +1 -0
- package/dist/custom/tscanify/tscanify.js +197 -0
- package/dist/custom/tscanify/tscanify.js.map +1 -0
- package/dist/custom/tscanify/types.js +1 -0
- package/dist/custom/tscanify/types.js.map +1 -0
- package/dist/custom/webcam.js +519 -0
- package/dist/custom/webcam.js.map +1 -0
- package/dist/hooks/use-callback-ref.js +15 -0
- package/dist/hooks/use-callback-ref.js.map +1 -0
- package/dist/hooks/use-controllable-state.js +49 -0
- package/dist/hooks/use-controllable-state.js.map +1 -0
- package/dist/hooks/use-debounce.js +18 -0
- package/dist/hooks/use-debounce.js.map +1 -0
- package/dist/hooks/use-is-visible.js +22 -0
- package/dist/hooks/use-is-visible.js.map +1 -0
- package/dist/hooks/use-media-query.js +19 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-on-window-resize.js +15 -0
- package/dist/hooks/use-on-window-resize.js.map +1 -0
- package/dist/hooks/use-scroll.js +20 -0
- package/dist/hooks/use-scroll.js.map +1 -0
- package/dist/lib/utils.js +48 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/zod.js +7 -0
- package/dist/lib/zod.js.map +1 -0
- package/package.json +34 -8
- package/src/aria/index.tsx +1 -1
- package/src/aria/number-field.tsx +41 -41
- package/src/components/accordion.tsx +66 -66
- package/src/components/alert-dialog.tsx +157 -157
- package/src/components/alert.tsx +70 -70
- package/src/components/aspect-ratio.tsx +11 -11
- package/src/components/avatar.tsx +53 -53
- package/src/components/badge.tsx +74 -67
- package/src/components/breadcrumb.tsx +109 -109
- package/src/components/button-group.tsx +83 -83
- package/src/components/button.tsx +69 -68
- package/src/components/calendar.tsx +216 -219
- package/src/components/card.tsx +92 -92
- package/src/components/carousel.tsx +241 -241
- package/src/components/chart.tsx +363 -363
- package/src/components/checkbox.tsx +32 -32
- package/src/components/collapsible.tsx +33 -33
- package/src/components/command.tsx +184 -184
- package/src/components/context-menu.tsx +252 -252
- package/src/components/dialog.tsx +144 -144
- package/src/components/drawer.tsx +135 -135
- package/src/components/dropdown-menu.tsx +258 -258
- package/src/components/empty.tsx +100 -100
- package/src/components/field.tsx +248 -248
- package/src/components/form.tsx +169 -169
- package/src/components/hover-card.tsx +44 -44
- package/src/components/input-group.tsx +170 -170
- package/src/components/input-otp.tsx +77 -77
- package/src/components/input.tsx +21 -21
- package/src/components/item.tsx +193 -193
- package/src/components/kbd.tsx +28 -28
- package/src/components/label.tsx +24 -24
- package/src/components/menubar.tsx +276 -276
- package/src/components/navigation-menu.tsx +168 -168
- package/src/components/pagination.tsx +127 -130
- package/src/components/popover.tsx +88 -88
- package/src/components/progress.tsx +31 -31
- package/src/components/radio-group.tsx +45 -45
- package/src/components/resizable.tsx +56 -56
- package/src/components/scroll-area.tsx +58 -58
- package/src/components/select.tsx +189 -189
- package/src/components/separator.tsx +28 -28
- package/src/components/sheet.tsx +140 -140
- package/src/components/sidebar.tsx +862 -862
- package/src/components/skeleton.tsx +13 -13
- package/src/components/slider.tsx +63 -63
- package/src/components/sonner.tsx +40 -40
- package/src/components/spinner.tsx +16 -16
- package/src/components/stepper.tsx +290 -291
- package/src/components/switch.tsx +31 -31
- package/src/components/table.tsx +133 -133
- package/src/components/tabs.tsx +66 -66
- package/src/components/textarea.tsx +18 -18
- package/src/components/toggle-group.tsx +83 -83
- package/src/components/toggle.tsx +47 -47
- package/src/components/tooltip.tsx +66 -66
- package/src/custom/action-button.tsx +45 -48
- package/src/custom/async-select.tsx +287 -287
- package/src/custom/awesome-not-found.tsx +116 -116
- package/src/custom/charts/area-chart.tsx +147 -147
- package/src/custom/charts/bar-chart.tsx +233 -233
- package/src/custom/charts/chart-card.tsx +103 -103
- package/src/custom/charts/index.tsx +16 -16
- package/src/custom/charts/pie-chart.tsx +168 -168
- package/src/custom/charts/radar-chart.tsx +126 -126
- package/src/custom/checkbox-tree.tsx +100 -100
- package/src/custom/combobox.tsx +296 -296
- package/src/custom/confirm-dialog.tsx +114 -102
- package/src/custom/country-selector.tsx +204 -204
- package/src/custom/date-picker/calendar-rac.tsx +109 -109
- package/src/custom/date-picker/datefield-rac.tsx +84 -84
- package/src/custom/date-picker/index.tsx +273 -273
- package/src/custom/date-picker/types/index.ts +4 -4
- package/src/custom/date-picker/utils/index.ts +42 -42
- package/src/custom/date-picker-old.tsx +50 -50
- package/src/custom/date-tooltip.tsx +98 -98
- package/src/custom/document-scanner/consts.ts +5 -5
- package/src/custom/document-scanner/corner-adjustment/action-buttons.tsx +33 -33
- package/src/custom/document-scanner/corner-adjustment/corner-handle.tsx +43 -43
- package/src/custom/document-scanner/corner-adjustment/hooks/use-corner-drag.ts +85 -85
- package/src/custom/document-scanner/corner-adjustment/index.tsx +125 -125
- package/src/custom/document-scanner/corner-adjustment/types.ts +53 -53
- package/src/custom/document-scanner/corner-adjustment/utils/clip-path.ts +22 -22
- package/src/custom/document-scanner/corner-adjustment/zoom-magnifier.tsx +115 -115
- package/src/custom/document-scanner/hooks/use-document-capture.ts +81 -81
- package/src/custom/document-scanner/hooks/use-document-scanner.ts +80 -80
- package/src/custom/document-scanner/hooks/use-perspective-crop.ts +38 -38
- package/src/custom/document-scanner/index.tsx +255 -255
- package/src/custom/document-scanner/lib.ts +407 -407
- package/src/custom/document-scanner/types.ts +205 -205
- package/src/custom/document-scanner/utils/perspective-correction.ts +139 -139
- package/src/custom/document-viewer/controllers.tsx +98 -98
- package/src/custom/document-viewer/index.tsx +43 -43
- package/src/custom/document-viewer/renderers/image.tsx +37 -37
- package/src/custom/document-viewer/renderers/index.tsx +2 -2
- package/src/custom/document-viewer/renderers/pdf.tsx +105 -105
- package/src/custom/email-input/domains.json +159 -159
- package/src/custom/email-input/email.tsx +231 -229
- package/src/custom/email-input/index.tsx +4 -4
- package/src/custom/email-input/types.ts +104 -104
- package/src/custom/file-uploader.tsx +541 -541
- package/src/custom/filter-component/fields/async-select.tsx +33 -33
- package/src/custom/filter-component/fields/date.tsx +60 -60
- package/src/custom/filter-component/fields/multi-select.tsx +30 -30
- package/src/custom/filter-component/index.tsx +217 -217
- package/src/custom/image-canvas.tsx +260 -260
- package/src/custom/json-editor.tsx +22 -22
- package/src/custom/master-data-grid/components/dialogs/column-settings-dialog.tsx +100 -100
- package/src/custom/master-data-grid/components/dialogs/index.ts +1 -1
- package/src/custom/master-data-grid/components/filters/client-filter.tsx +369 -368
- package/src/custom/master-data-grid/components/filters/filter-input.tsx +256 -256
- package/src/custom/master-data-grid/components/filters/index.ts +3 -3
- package/src/custom/master-data-grid/components/filters/inline-column-filter.tsx +233 -233
- package/src/custom/master-data-grid/components/filters/multi-filter-dialog.tsx +91 -90
- package/src/custom/master-data-grid/components/filters/server-filter.tsx +265 -255
- package/src/custom/master-data-grid/components/master-data-grid.tsx +472 -472
- package/src/custom/master-data-grid/components/pagination/index.ts +1 -1
- package/src/custom/master-data-grid/components/pagination/pagination.tsx +178 -178
- package/src/custom/master-data-grid/components/table/cell-renderer.tsx +621 -634
- package/src/custom/master-data-grid/components/table/header-cell.tsx +162 -162
- package/src/custom/master-data-grid/components/table/index.ts +4 -4
- package/src/custom/master-data-grid/components/table/table-body-renderer.tsx +113 -113
- package/src/custom/master-data-grid/components/table/virtual-body.tsx +138 -138
- package/src/custom/master-data-grid/components/toolbar/index.ts +1 -1
- package/src/custom/master-data-grid/components/toolbar/toolbar.tsx +314 -314
- package/src/custom/master-data-grid/hooks/index.ts +3 -3
- package/src/custom/master-data-grid/hooks/use-columns.tsx +353 -332
- package/src/custom/master-data-grid/hooks/use-editing.ts +106 -106
- package/src/custom/master-data-grid/hooks/use-table-state-reducer.ts +157 -157
- package/src/custom/master-data-grid/hooks/use-table-state.ts +31 -31
- package/src/custom/master-data-grid/index.ts +16 -16
- package/src/custom/master-data-grid/types.ts +487 -466
- package/src/custom/master-data-grid/utils/column-generator.tsx +324 -306
- package/src/custom/master-data-grid/utils/export-utils.ts +67 -67
- package/src/custom/master-data-grid/utils/filter-fns.ts +310 -290
- package/src/custom/master-data-grid/utils/index.ts +8 -8
- package/src/custom/master-data-grid/utils/pinning-utils.ts +88 -88
- package/src/custom/master-data-grid/utils/translation-utils.ts +42 -42
- package/src/custom/multi-select.tsx +434 -432
- package/src/custom/password-input.tsx +194 -194
- package/src/custom/phone-input.tsx +172 -172
- package/src/custom/schema-form/custom/index.tsx +1 -1
- package/src/custom/schema-form/custom/label.tsx +53 -53
- package/src/custom/schema-form/fields/base-input-field.tsx +82 -82
- package/src/custom/schema-form/fields/field.tsx +67 -67
- package/src/custom/schema-form/fields/index.tsx +5 -5
- package/src/custom/schema-form/fields/object.tsx +12 -12
- package/src/custom/schema-form/fields/table-array/array-field-item.tsx +90 -90
- package/src/custom/schema-form/fields/table-array/array-field-template.tsx +115 -115
- package/src/custom/schema-form/index.tsx +259 -259
- package/src/custom/schema-form/templates/description.tsx +20 -20
- package/src/custom/schema-form/templates/index.tsx +2 -2
- package/src/custom/schema-form/templates/submit.tsx +32 -32
- package/src/custom/schema-form/types.ts +64 -64
- package/src/custom/schema-form/utils/index.ts +4 -4
- package/src/custom/schema-form/utils/schema-dependency.ts +655 -655
- package/src/custom/schema-form/utils/schemas.ts +289 -289
- package/src/custom/schema-form/utils/validation.ts +23 -23
- package/src/custom/schema-form/widgets/boolean.tsx +77 -77
- package/src/custom/schema-form/widgets/combobox.tsx +274 -274
- package/src/custom/schema-form/widgets/date.tsx +59 -59
- package/src/custom/schema-form/widgets/email.tsx +34 -34
- package/src/custom/schema-form/widgets/index.tsx +10 -10
- package/src/custom/schema-form/widgets/password.tsx +40 -40
- package/src/custom/schema-form/widgets/phone.tsx +40 -40
- package/src/custom/schema-form/widgets/select.tsx +105 -105
- package/src/custom/schema-form/widgets/selectable.tsx +25 -25
- package/src/custom/schema-form/widgets/string-array.tsx +296 -296
- package/src/custom/schema-form/widgets/url.tsx +56 -56
- package/src/custom/section-layout-v2.tsx +212 -212
- package/src/custom/select-tabs.tsx +109 -109
- package/src/custom/selectable.tsx +316 -316
- package/src/custom/stepper.tsx +236 -236
- package/src/custom/tab-layout.tsx +213 -213
- package/src/custom/tanstack-table/fields/index.tsx +12 -12
- package/src/custom/tanstack-table/fields/tanstack-table-action-dialogs.tsx +89 -89
- package/src/custom/tanstack-table/fields/tanstack-table-column-header.tsx +68 -66
- package/src/custom/tanstack-table/fields/tanstack-table-filter-date.tsx +180 -180
- package/src/custom/tanstack-table/fields/tanstack-table-filter-faceted.tsx +158 -158
- package/src/custom/tanstack-table/fields/tanstack-table-filter-text.tsx +73 -76
- package/src/custom/tanstack-table/fields/tanstack-table-pagination.tsx +136 -136
- package/src/custom/tanstack-table/fields/tanstack-table-plain-table.tsx +142 -142
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-confirmation.tsx +77 -77
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-custom-dialog.tsx +87 -87
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions.tsx +151 -151
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-custom-dialog.tsx +88 -88
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-schemaform-dialog.tsx +47 -47
- package/src/custom/tanstack-table/fields/tanstack-table-toolbar.tsx +143 -143
- package/src/custom/tanstack-table/fields/tanstack-table-view-options.tsx +171 -171
- package/src/custom/tanstack-table/index.tsx +244 -244
- package/src/custom/tanstack-table/types/index.ts +328 -328
- package/src/custom/tanstack-table/utils/cell-with-actions.tsx +21 -21
- package/src/custom/tanstack-table/utils/column-names.ts +26 -26
- package/src/custom/tanstack-table/utils/columns-by-row-data.tsx +312 -312
- package/src/custom/tanstack-table/utils/editable-columns-by-row-data.tsx +219 -219
- package/src/custom/tanstack-table/utils/faceted-boolean-options.tsx +22 -22
- package/src/custom/tanstack-table/utils/index.tsx +10 -10
- package/src/custom/tanstack-table/utils/pinning-styles.ts +57 -57
- package/src/custom/tanstack-table/utils/table.tsx +83 -83
- package/src/custom/tanstack-table/utils/test-conditions.ts +17 -17
- package/src/custom/timeline.tsx +208 -208
- package/src/custom/tree.tsx +202 -200
- package/src/custom/tscanify/browser.ts +66 -66
- package/src/custom/tscanify/index.ts +51 -51
- package/src/custom/tscanify/tscanify-browser.ts +522 -522
- package/src/custom/tscanify/tscanify.ts +262 -262
- package/src/custom/tscanify/types.ts +22 -22
- package/src/custom/webcam.tsx +737 -737
- package/src/hooks/use-callback-ref.ts +27 -27
- package/src/hooks/use-controllable-state.ts +67 -67
- package/src/hooks/use-debounce.ts +19 -19
- package/src/hooks/use-is-visible.ts +23 -23
- package/src/hooks/use-media-query.ts +21 -21
- package/src/hooks/use-mobile.ts +21 -21
- package/src/hooks/use-on-window-resize.ts +15 -15
- package/src/hooks/use-scroll.tsx +22 -22
- package/src/lib/utils.ts +61 -61
- package/src/lib/zod.ts +2 -2
- package/src/styles/core.css +57 -57
- package/src/test/email-input.test.tsx +217 -217
- package/src/test/password-input.test.tsx +92 -92
- package/src/test/select-tabs.test.tsx +302 -302
- package/src/test/selectable.test.tsx +1093 -1093
- package/__mocks__/canvas.ts +0 -8
- package/components.json +0 -21
- package/eslint.config.js +0 -4
- package/jest-environment.js +0 -37
- package/jest.config.ts +0 -47
- package/jest.setup.ts +0 -69
- package/postcss.config.mjs +0 -6
- package/tsconfig.json +0 -13
- package/tsconfig.lint.json +0 -8
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DatePicker } from "@repo/ayasofyazilim-ui/custom/date-picker";
|
|
3
|
+
const DateWidget = (props) => {
|
|
4
|
+
const { value, onChange, disabled, uiSchema } = props;
|
|
5
|
+
const initialDate = value && !Number.isNaN(new Date(value).getTime()) ? new Date(new Date(value).toJSON()) : void 0;
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
DatePicker,
|
|
8
|
+
{
|
|
9
|
+
id: props.id,
|
|
10
|
+
defaultValue: initialDate,
|
|
11
|
+
disabled,
|
|
12
|
+
classNames: {
|
|
13
|
+
dateInput: " shadow-xs date-input"
|
|
14
|
+
},
|
|
15
|
+
onChange: (selectedDate) => {
|
|
16
|
+
if (selectedDate) {
|
|
17
|
+
if (props.schema.format === "date") {
|
|
18
|
+
onChange(selectedDate.toISOString().split("T").at(0));
|
|
19
|
+
} else {
|
|
20
|
+
onChange(selectedDate.toISOString());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
const DateTimeWidget = (props) => {
|
|
28
|
+
const { value, onChange, disabled, uiSchema } = props;
|
|
29
|
+
const initialDate = value && !Number.isNaN(new Date(value).getTime()) ? new Date(new Date(value).toJSON()) : void 0;
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
DatePicker,
|
|
32
|
+
{
|
|
33
|
+
id: props.id,
|
|
34
|
+
defaultValue: initialDate,
|
|
35
|
+
useTime: true,
|
|
36
|
+
disabled,
|
|
37
|
+
classNames: {
|
|
38
|
+
dateInput: "shadow-xs date-input"
|
|
39
|
+
},
|
|
40
|
+
onChange: (selectedDate) => {
|
|
41
|
+
if (selectedDate) {
|
|
42
|
+
if (props.schema.format === "date") {
|
|
43
|
+
onChange(selectedDate.toISOString().split("T").at(0));
|
|
44
|
+
} else {
|
|
45
|
+
onChange(selectedDate.toISOString());
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
DateTimeWidget,
|
|
54
|
+
DateWidget
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/date.tsx"],"sourcesContent":["import { DatePicker } from \"@repo/ayasofyazilim-ui/custom/date-picker\";\r\nimport { WidgetProps } from \"@rjsf/utils\";\r\n\r\nexport const DateWidget = (props: WidgetProps) => {\r\n const { value, onChange, disabled, uiSchema } = props;\r\n\r\n const initialDate =\r\n value && !Number.isNaN(new Date(value).getTime())\r\n ? new Date(new Date(value).toJSON())\r\n : undefined;\r\n return (\r\n <DatePicker\r\n id={props.id}\r\n defaultValue={initialDate}\r\n disabled={disabled}\r\n classNames={{\r\n dateInput: \" shadow-xs date-input\",\r\n }}\r\n onChange={(selectedDate) => {\r\n if (selectedDate) {\r\n if (props.schema.format === \"date\") {\r\n onChange(selectedDate.toISOString().split(\"T\").at(0));\r\n } else {\r\n onChange(selectedDate.toISOString());\r\n }\r\n }\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport const DateTimeWidget = (props: WidgetProps) => {\r\n const { value, onChange, disabled, uiSchema } = props;\r\n\r\n const initialDate =\r\n value && !Number.isNaN(new Date(value).getTime())\r\n ? new Date(new Date(value).toJSON())\r\n : undefined;\r\n return (\r\n <DatePicker\r\n id={props.id}\r\n defaultValue={initialDate}\r\n useTime\r\n disabled={disabled}\r\n classNames={{\r\n dateInput: \"shadow-xs date-input\",\r\n }}\r\n onChange={(selectedDate) => {\r\n if (selectedDate) {\r\n if (props.schema.format === \"date\") {\r\n onChange(selectedDate.toISOString().split(\"T\").at(0));\r\n } else {\r\n onChange(selectedDate.toISOString());\r\n }\r\n }\r\n }}\r\n />\r\n );\r\n};\r\n"],"mappings":"AAWI;AAXJ,SAAS,kBAAkB;AAGpB,MAAM,aAAa,CAAC,UAAuB;AAChD,QAAM,EAAE,OAAO,UAAU,UAAU,SAAS,IAAI;AAEhD,QAAM,cACJ,SAAS,CAAC,OAAO,MAAM,IAAI,KAAK,KAAK,EAAE,QAAQ,CAAC,IAC5C,IAAI,KAAK,IAAI,KAAK,KAAK,EAAE,OAAO,CAAC,IACjC;AACN,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV,cAAc;AAAA,MACd;AAAA,MACA,YAAY;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACA,UAAU,CAAC,iBAAiB;AAC1B,YAAI,cAAc;AAChB,cAAI,MAAM,OAAO,WAAW,QAAQ;AAClC,qBAAS,aAAa,YAAY,EAAE,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC;AAAA,UACtD,OAAO;AACL,qBAAS,aAAa,YAAY,CAAC;AAAA,UACrC;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEO,MAAM,iBAAiB,CAAC,UAAuB;AACpD,QAAM,EAAE,OAAO,UAAU,UAAU,SAAS,IAAI;AAEhD,QAAM,cACJ,SAAS,CAAC,OAAO,MAAM,IAAI,KAAK,KAAK,EAAE,QAAQ,CAAC,IAC5C,IAAI,KAAK,IAAI,KAAK,KAAK,EAAE,OAAO,CAAC,IACjC;AACN,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV,cAAc;AAAA,MACd,SAAO;AAAA,MACP;AAAA,MACA,YAAY;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACA,UAAU,CAAC,iBAAiB;AAC1B,YAAI,cAAc;AAChB,cAAI,MAAM,OAAO,WAAW,QAAQ;AAClC,qBAAS,aAAa,YAAY,EAAE,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC;AAAA,UACtD,OAAO;AACL,qBAAS,aAAa,YAAY,CAAC;AAAA,UACrC;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EmailInput } from "@repo/ayasofyazilim-ui/custom/email-input";
|
|
3
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
const EmailInputWidget = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
uiSchema,
|
|
8
|
+
className,
|
|
9
|
+
onChange,
|
|
10
|
+
value,
|
|
11
|
+
defaultValue,
|
|
12
|
+
disabled,
|
|
13
|
+
readOnly
|
|
14
|
+
} = props;
|
|
15
|
+
const [email, setEmail] = useState(value || "");
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
EmailInput,
|
|
18
|
+
{
|
|
19
|
+
disabled,
|
|
20
|
+
id: props.id,
|
|
21
|
+
value: email,
|
|
22
|
+
onValueChange: (val) => {
|
|
23
|
+
setEmail(val);
|
|
24
|
+
onChange(val);
|
|
25
|
+
},
|
|
26
|
+
defaultValue,
|
|
27
|
+
readOnly,
|
|
28
|
+
placeholder: props.placeholder || "Try typing 'john@gmail.com'",
|
|
29
|
+
className: cn("w-full", className),
|
|
30
|
+
suggestions: uiSchema?.["ui:baseList"] ?? []
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
EmailInputWidget
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/email.tsx"],"sourcesContent":["import { EmailInput } from \"@repo/ayasofyazilim-ui/custom/email-input\";\r\nimport { cn } from \"@repo/ayasofyazilim-ui/lib/utils\";\r\nimport { WidgetProps } from \"@rjsf/utils\";\r\nimport { useState } from \"react\";\r\n\r\nexport const EmailInputWidget = (props: WidgetProps) => {\r\n const {\r\n uiSchema,\r\n className,\r\n onChange,\r\n value,\r\n defaultValue,\r\n disabled,\r\n readOnly,\r\n } = props;\r\n\r\n const [email, setEmail] = useState(value || \"\");\r\n return (\r\n <EmailInput\r\n disabled={disabled}\r\n id={props.id}\r\n value={email}\r\n onValueChange={(val) => {\r\n setEmail(val);\r\n onChange(val);\r\n }}\r\n defaultValue={defaultValue}\r\n readOnly={readOnly}\r\n placeholder={props.placeholder || \"Try typing 'john@gmail.com'\"}\r\n className={cn(\"w-full\", className)}\r\n suggestions={uiSchema?.[\"ui:baseList\"] ?? []}\r\n />\r\n );\r\n};\r\n"],"mappings":"AAkBI;AAlBJ,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAEnB,SAAS,gBAAgB;AAElB,MAAM,mBAAmB,CAAC,UAAuB;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,SAAS,EAAE;AAC9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI,MAAM;AAAA,MACV,OAAO;AAAA,MACP,eAAe,CAAC,QAAQ;AACtB,iBAAS,GAAG;AACZ,iBAAS,GAAG;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,MAAM,eAAe;AAAA,MAClC,WAAW,GAAG,UAAU,SAAS;AAAA,MACjC,aAAa,WAAW,aAAa,KAAK,CAAC;AAAA;AAAA,EAC7C;AAEJ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./boolean";
|
|
2
|
+
export * from "./combobox";
|
|
3
|
+
export * from "./date";
|
|
4
|
+
export * from "./email";
|
|
5
|
+
export * from "./password";
|
|
6
|
+
export * from "./url";
|
|
7
|
+
export * from "./phone";
|
|
8
|
+
export * from "./selectable";
|
|
9
|
+
export * from "./select";
|
|
10
|
+
export * from "./string-array";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/index.tsx"],"sourcesContent":["export * from \"./boolean\";\r\nexport * from \"./combobox\";\r\nexport * from \"./date\";\r\nexport * from \"./email\";\r\nexport * from \"./password\";\r\nexport * from \"./url\";\r\nexport * from \"./phone\";\r\nexport * from \"./selectable\";\r\nexport * from \"./select\";\r\nexport * from \"./string-array\";\r\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PasswordInput } from "@repo/ayasofyazilim-ui/custom/password-input";
|
|
3
|
+
const PasswordInputWidget = (props) => {
|
|
4
|
+
const {
|
|
5
|
+
uiSchema,
|
|
6
|
+
id,
|
|
7
|
+
className,
|
|
8
|
+
onChange,
|
|
9
|
+
value,
|
|
10
|
+
defaultValue,
|
|
11
|
+
disabled,
|
|
12
|
+
readOnly
|
|
13
|
+
} = props;
|
|
14
|
+
const required = uiSchema?.["ui:required"] || props.required;
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
PasswordInput,
|
|
17
|
+
{
|
|
18
|
+
id,
|
|
19
|
+
"data-testid": id,
|
|
20
|
+
onBlur: props.onBlur && ((event) => props.onBlur(id, event.target.value)),
|
|
21
|
+
className,
|
|
22
|
+
required,
|
|
23
|
+
onChange: (event) => {
|
|
24
|
+
if (event.target.value === "") {
|
|
25
|
+
onChange(void 0);
|
|
26
|
+
} else {
|
|
27
|
+
onChange(event.target.value);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultValue: value || defaultValue,
|
|
31
|
+
readOnly,
|
|
32
|
+
disabled,
|
|
33
|
+
autoComplete: uiSchema?.["ui:autocomplete"],
|
|
34
|
+
showGenerator: uiSchema?.["ui:showGenerator"],
|
|
35
|
+
passwordLength: uiSchema?.["ui:passwordLength"] || 10
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
PasswordInputWidget
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/password.tsx"],"sourcesContent":["import { WidgetProps } from \"@rjsf/utils\";\r\nimport { PasswordInput } from \"@repo/ayasofyazilim-ui/custom/password-input\";\r\n\r\nexport const PasswordInputWidget = (props: WidgetProps) => {\r\n const {\r\n uiSchema,\r\n id,\r\n className,\r\n onChange,\r\n value,\r\n defaultValue,\r\n disabled,\r\n readOnly,\r\n } = props;\r\n\r\n const required = uiSchema?.[\"ui:required\"] || props.required;\r\n\r\n return (\r\n <PasswordInput\r\n id={id}\r\n data-testid={id}\r\n onBlur={props.onBlur && ((event) => props.onBlur(id, event.target.value))}\r\n className={className}\r\n required={required}\r\n onChange={(event) => {\r\n if (event.target.value === \"\") {\r\n onChange(undefined);\r\n } else {\r\n onChange(event.target.value);\r\n }\r\n }}\r\n defaultValue={value || defaultValue}\r\n readOnly={readOnly}\r\n disabled={disabled}\r\n autoComplete={uiSchema?.[\"ui:autocomplete\"]}\r\n showGenerator={uiSchema?.[\"ui:showGenerator\"]}\r\n passwordLength={uiSchema?.[\"ui:passwordLength\"] || 10}\r\n />\r\n );\r\n};\r\n"],"mappings":"AAkBI;AAjBJ,SAAS,qBAAqB;AAEvB,MAAM,sBAAsB,CAAC,UAAuB;AACzD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,WAAW,WAAW,aAAa,KAAK,MAAM;AAEpD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa;AAAA,MACb,QAAQ,MAAM,WAAW,CAAC,UAAU,MAAM,OAAO,IAAI,MAAM,OAAO,KAAK;AAAA,MACvE;AAAA,MACA;AAAA,MACA,UAAU,CAAC,UAAU;AACnB,YAAI,MAAM,OAAO,UAAU,IAAI;AAC7B,mBAAS,MAAS;AAAA,QACpB,OAAO;AACL,mBAAS,MAAM,OAAO,KAAK;AAAA,QAC7B;AAAA,MACF;AAAA,MACA,cAAc,SAAS;AAAA,MACvB;AAAA,MACA;AAAA,MACA,cAAc,WAAW,iBAAiB;AAAA,MAC1C,eAAe,WAAW,kBAAkB;AAAA,MAC5C,gBAAgB,WAAW,mBAAmB,KAAK;AAAA;AAAA,EACrD;AAEJ;","names":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
PhoneInput
|
|
5
|
+
} from "@repo/ayasofyazilim-ui/custom/phone-input";
|
|
6
|
+
function CustomPhoneFieldWithParse(props) {
|
|
7
|
+
const required = props.required || props.uiSchema?.["ui:required"];
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
PhoneInput,
|
|
10
|
+
{
|
|
11
|
+
...props,
|
|
12
|
+
id: props.id || "",
|
|
13
|
+
required,
|
|
14
|
+
defaultValue: void 0
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const PhoneWithParseWidget = CustomPhoneFieldWithParse;
|
|
19
|
+
const PhoneWithValueWidget = function CustomPhoneFieldWithValue(props) {
|
|
20
|
+
const { onChange, uiSchema } = props;
|
|
21
|
+
const required = uiSchema?.["ui:required"] || props.required;
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
PhoneInput,
|
|
24
|
+
{
|
|
25
|
+
...props,
|
|
26
|
+
required,
|
|
27
|
+
defaultValue: void 0,
|
|
28
|
+
onChange: (values) => {
|
|
29
|
+
onChange(values.value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
CustomPhoneFieldWithParse,
|
|
36
|
+
PhoneWithParseWidget,
|
|
37
|
+
PhoneWithValueWidget
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=phone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/phone.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {\r\n PhoneInput,\r\n PhoneInputProps,\r\n} from \"@repo/ayasofyazilim-ui/custom/phone-input\";\r\nimport { WidgetProps } from \"@rjsf/utils\";\r\n\r\nexport function CustomPhoneFieldWithParse<T>(\r\n props: Partial<Omit<WidgetProps<T>, \"onChange\" | \"id\">> &\r\n Omit<PhoneInputProps, \"required\" | \"defaultValue\" | \"id\">\r\n) {\r\n const required = props.required || props.uiSchema?.[\"ui:required\"];\r\n return (\r\n <PhoneInput\r\n {...props}\r\n id={props.id || \"\"}\r\n required={required}\r\n defaultValue={undefined}\r\n />\r\n );\r\n}\r\nexport const PhoneWithParseWidget = CustomPhoneFieldWithParse;\r\n\r\nexport const PhoneWithValueWidget = function CustomPhoneFieldWithValue(\r\n props: WidgetProps & { defaultCountry?: string }\r\n) {\r\n const { onChange, uiSchema } = props;\r\n const required = uiSchema?.[\"ui:required\"] || props.required;\r\n return (\r\n <PhoneInput\r\n {...props}\r\n required={required}\r\n defaultValue={undefined}\r\n onChange={(values) => {\r\n onChange(values.value);\r\n }}\r\n />\r\n );\r\n};\r\n"],"mappings":";AAcI;AAZJ;AAAA,EACE;AAAA,OAEK;AAGA,SAAS,0BACd,OAEA;AACA,QAAM,WAAW,MAAM,YAAY,MAAM,WAAW,aAAa;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,IAAI,MAAM,MAAM;AAAA,MAChB;AAAA,MACA,cAAc;AAAA;AAAA,EAChB;AAEJ;AACO,MAAM,uBAAuB;AAE7B,MAAM,uBAAuB,SAAS,0BAC3C,OACA;AACA,QAAM,EAAE,UAAU,SAAS,IAAI;AAC/B,QAAM,WAAW,WAAW,aAAa,KAAK,MAAM;AACpD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,cAAc;AAAA,MACd,UAAU,CAAC,WAAW;AACpB,iBAAS,OAAO,KAAK;AAAA,MACvB;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
Select,
|
|
4
|
+
SelectContent,
|
|
5
|
+
SelectItem,
|
|
6
|
+
SelectTrigger,
|
|
7
|
+
SelectValue
|
|
8
|
+
} from "@repo/ayasofyazilim-ui/components/select";
|
|
9
|
+
import { Selectable } from "@repo/ayasofyazilim-ui/custom/selectable";
|
|
10
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
11
|
+
function SelectWidget({
|
|
12
|
+
id,
|
|
13
|
+
options,
|
|
14
|
+
required,
|
|
15
|
+
disabled,
|
|
16
|
+
value,
|
|
17
|
+
multiple,
|
|
18
|
+
onChange,
|
|
19
|
+
rawErrors = [],
|
|
20
|
+
className
|
|
21
|
+
}) {
|
|
22
|
+
const { enumOptions, enumDisabled, emptyValue: optEmptyValue } = options;
|
|
23
|
+
const items = enumOptions?.map(
|
|
24
|
+
({ value: value2, label }) => {
|
|
25
|
+
return {
|
|
26
|
+
value: value2,
|
|
27
|
+
label,
|
|
28
|
+
disabled: Array.isArray(enumDisabled) && enumDisabled.includes(value2)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
const cnClassName = cn(
|
|
33
|
+
"w-full",
|
|
34
|
+
{ "border-destructive": rawErrors.length > 0 },
|
|
35
|
+
className
|
|
36
|
+
);
|
|
37
|
+
return !multiple ? /* @__PURE__ */ jsxs(
|
|
38
|
+
Select,
|
|
39
|
+
{
|
|
40
|
+
required,
|
|
41
|
+
value,
|
|
42
|
+
onValueChange: (val) => {
|
|
43
|
+
onChange(val);
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: cnClassName, id, children: /* @__PURE__ */ jsx(SelectValue, { placeholder: optEmptyValue }) }),
|
|
47
|
+
/* @__PURE__ */ jsx(SelectContent, { children: items.map((item) => {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
SelectItem,
|
|
50
|
+
{
|
|
51
|
+
disabled: item.disabled,
|
|
52
|
+
value: item.value,
|
|
53
|
+
children: item.label
|
|
54
|
+
},
|
|
55
|
+
item.value
|
|
56
|
+
);
|
|
57
|
+
}) })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
) : /* @__PURE__ */ jsx(
|
|
61
|
+
Selectable,
|
|
62
|
+
{
|
|
63
|
+
id,
|
|
64
|
+
getKey: (opt) => opt.value,
|
|
65
|
+
getLabel: (opt) => opt.label,
|
|
66
|
+
options: items,
|
|
67
|
+
onChange: (val) => {
|
|
68
|
+
onChange(val.map((item) => item.value));
|
|
69
|
+
},
|
|
70
|
+
disabled,
|
|
71
|
+
makeAChoiceText: optEmptyValue
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
SelectWidget
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/select.tsx"],"sourcesContent":["import {\r\n FormContextType,\r\n RJSFSchema,\r\n StrictRJSFSchema,\r\n WidgetProps,\r\n} from \"@rjsf/utils\";\r\n\r\nimport {\r\n Select,\r\n SelectContent,\r\n SelectItem,\r\n SelectTrigger,\r\n SelectValue,\r\n} from \"@repo/ayasofyazilim-ui/components/select\";\r\nimport { Selectable } from \"@repo/ayasofyazilim-ui/custom/selectable\";\r\nimport { cn } from \"@repo/ayasofyazilim-ui/lib/utils\";\r\n\r\n/** The `SelectWidget` is a widget for rendering dropdowns.\r\n * It is typically used with string properties constrained with enum options.\r\n *\r\n * @param props - The `WidgetProps` for this component\r\n */\r\n\r\ninterface EnumOption {\r\n value: string;\r\n label: string;\r\n // Add other properties if your options have them (e.g., key, rawData)\r\n}\r\n\r\n// 2. Define the shape of the transformed item (optional, but good for clarity)\r\ninterface MappedItem {\r\n value: string;\r\n label: string;\r\n disabled: boolean;\r\n}\r\n\r\nexport function SelectWidget<\r\n T = any,\r\n S extends StrictRJSFSchema = RJSFSchema,\r\n F extends FormContextType = any,\r\n>({\r\n id,\r\n options,\r\n required,\r\n disabled,\r\n value,\r\n multiple,\r\n onChange,\r\n rawErrors = [],\r\n className,\r\n}: WidgetProps<T, S, F>) {\r\n const { enumOptions, enumDisabled, emptyValue: optEmptyValue } = options;\r\n const items: MappedItem[] = (enumOptions as EnumOption[])?.map(\r\n ({ value, label }: EnumOption) => {\r\n return {\r\n value,\r\n label,\r\n disabled: Array.isArray(enumDisabled) && enumDisabled.includes(value),\r\n };\r\n }\r\n );\r\n const cnClassName = cn(\r\n \"w-full\",\r\n { \"border-destructive\": rawErrors.length > 0 },\r\n className\r\n );\r\n return !multiple ? (\r\n <Select\r\n required={required}\r\n value={value}\r\n onValueChange={(val) => {\r\n onChange(val);\r\n }}\r\n >\r\n <SelectTrigger className={cnClassName} id={id}>\r\n <SelectValue placeholder={optEmptyValue} />\r\n </SelectTrigger>\r\n <SelectContent>\r\n {items.map((item) => {\r\n return (\r\n <SelectItem\r\n disabled={item.disabled}\r\n key={item.value}\r\n value={item.value}\r\n >\r\n {item.label}\r\n </SelectItem>\r\n );\r\n })}\r\n </SelectContent>\r\n </Select>\r\n ) : (\r\n <Selectable<MappedItem>\r\n id={id}\r\n getKey={(opt) => opt.value}\r\n getLabel={(opt) => opt.label}\r\n options={items}\r\n onChange={(val) => {\r\n onChange(val.map((item) => item.value));\r\n }}\r\n disabled={disabled}\r\n makeAChoiceText={optEmptyValue}\r\n />\r\n );\r\n}\r\n"],"mappings":"AAmEI,SAQI,KARJ;AA5DJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAqBZ,SAAS,aAId;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AACF,GAAyB;AACvB,QAAM,EAAE,aAAa,cAAc,YAAY,cAAc,IAAI;AACjE,QAAM,QAAuB,aAA8B;AAAA,IACzD,CAAC,EAAE,OAAAA,QAAO,MAAM,MAAkB;AAChC,aAAO;AAAA,QACL,OAAAA;AAAA,QACA;AAAA,QACA,UAAU,MAAM,QAAQ,YAAY,KAAK,aAAa,SAASA,MAAK;AAAA,MACtE;AAAA,IACF;AAAA,EACF;AACA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,EAAE,sBAAsB,UAAU,SAAS,EAAE;AAAA,IAC7C;AAAA,EACF;AACA,SAAO,CAAC,WACN;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAe,CAAC,QAAQ;AACtB,iBAAS,GAAG;AAAA,MACd;AAAA,MAEA;AAAA,4BAAC,iBAAc,WAAW,aAAa,IACrC,8BAAC,eAAY,aAAa,eAAe,GAC3C;AAAA,QACA,oBAAC,iBACE,gBAAM,IAAI,CAAC,SAAS;AACnB,iBACE;AAAA,YAAC;AAAA;AAAA,cACC,UAAU,KAAK;AAAA,cAEf,OAAO,KAAK;AAAA,cAEX,eAAK;AAAA;AAAA,YAHD,KAAK;AAAA,UAIZ;AAAA,QAEJ,CAAC,GACH;AAAA;AAAA;AAAA,EACF,IAEA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAQ,CAAC,QAAQ,IAAI;AAAA,MACrB,UAAU,CAAC,QAAQ,IAAI;AAAA,MACvB,SAAS;AAAA,MACT,UAAU,CAAC,QAAQ;AACjB,iBAAS,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC;AAAA,MACxC;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA;AAAA,EACnB;AAEJ;","names":["value"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
Selectable
|
|
4
|
+
} from "@repo/ayasofyazilim-ui/custom/selectable";
|
|
5
|
+
function CustomSelectableWidget(selectableProps) {
|
|
6
|
+
const { getKey } = selectableProps;
|
|
7
|
+
function Widget(widgetProps) {
|
|
8
|
+
const handleChange = (values) => {
|
|
9
|
+
widgetProps.onChange(values.map((item) => getKey(item)));
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Selectable,
|
|
13
|
+
{
|
|
14
|
+
...widgetProps,
|
|
15
|
+
...selectableProps,
|
|
16
|
+
onChange: handleChange
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return Widget;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
CustomSelectableWidget
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=selectable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/selectable.tsx"],"sourcesContent":["import {\r\n Selectable,\r\n SelectableProps,\r\n} from \"@repo/ayasofyazilim-ui/custom/selectable\";\r\nimport { WidgetProps } from \"@rjsf/utils\";\r\n\r\nexport function CustomSelectableWidget<T>(\r\n selectableProps: Omit<SelectableProps<T>, \"onChange\">\r\n) {\r\n const { getKey } = selectableProps;\r\n\r\n function Widget(widgetProps: Omit<WidgetProps, \"options\">) {\r\n const handleChange = (values: T[]) => {\r\n widgetProps.onChange(values.map((item) => getKey(item)));\r\n };\r\n return (\r\n <Selectable<T>\r\n {...widgetProps}\r\n {...selectableProps}\r\n onChange={handleChange}\r\n />\r\n );\r\n }\r\n return Widget;\r\n}\r\n"],"mappings":"AAgBM;AAhBN;AAAA,EACE;AAAA,OAEK;AAGA,SAAS,uBACd,iBACA;AACA,QAAM,EAAE,OAAO,IAAI;AAEnB,WAAS,OAAO,aAA2C;AACzD,UAAM,eAAe,CAAC,WAAgB;AACpC,kBAAY,SAAS,OAAO,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,CAAC;AAAA,IACzD;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,UAAU;AAAA;AAAA,IACZ;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
InputGroup,
|
|
4
|
+
InputGroupAddon,
|
|
5
|
+
InputGroupButton,
|
|
6
|
+
InputGroupInput,
|
|
7
|
+
InputGroupText
|
|
8
|
+
} from "@repo/ayasofyazilim-ui/components/input-group";
|
|
9
|
+
import {
|
|
10
|
+
Tooltip,
|
|
11
|
+
TooltipContent,
|
|
12
|
+
TooltipTrigger
|
|
13
|
+
} from "@repo/ayasofyazilim-ui/components/tooltip";
|
|
14
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
15
|
+
import { PlusIcon, Trash2Icon } from "lucide-react";
|
|
16
|
+
import { useCallback, useState } from "react";
|
|
17
|
+
function CustomStringArrayWidget(config = {}) {
|
|
18
|
+
const {
|
|
19
|
+
classNames = {},
|
|
20
|
+
icons = {},
|
|
21
|
+
iconSizes = { add: "icon-xs", remove: "icon-xs" },
|
|
22
|
+
buttonVariants = { add: "default", remove: "secondary" },
|
|
23
|
+
buttonSizes = { add: "icon-xs", remove: void 0 },
|
|
24
|
+
maxItems,
|
|
25
|
+
maxHeight = "max-h-52",
|
|
26
|
+
allowDuplicates = false,
|
|
27
|
+
trimValues = true,
|
|
28
|
+
validateValue,
|
|
29
|
+
transformValue,
|
|
30
|
+
renderItem,
|
|
31
|
+
emptyState,
|
|
32
|
+
placeholder,
|
|
33
|
+
addButtonLabel,
|
|
34
|
+
removeButtonLabel,
|
|
35
|
+
errorMessages = {},
|
|
36
|
+
messages = {},
|
|
37
|
+
inputProps = {},
|
|
38
|
+
onAdd,
|
|
39
|
+
onRemove,
|
|
40
|
+
disabled = false
|
|
41
|
+
} = config;
|
|
42
|
+
const AddIcon = icons.add || PlusIcon;
|
|
43
|
+
const RemoveIcon = icons.remove || Trash2Icon;
|
|
44
|
+
const Widget = (props) => {
|
|
45
|
+
const [inputValue, setInputValue] = useState("");
|
|
46
|
+
const [error, setError] = useState("");
|
|
47
|
+
const currentValues = props.value || [];
|
|
48
|
+
const handleValue = useCallback(
|
|
49
|
+
(value) => {
|
|
50
|
+
const processedValue = trimValues ? value.trim() : value;
|
|
51
|
+
if (!processedValue) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const finalValue = transformValue ? transformValue(processedValue) : processedValue;
|
|
55
|
+
if (!allowDuplicates && currentValues.includes(finalValue)) {
|
|
56
|
+
if (errorMessages.duplicate) {
|
|
57
|
+
setError(errorMessages.duplicate);
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (validateValue) {
|
|
62
|
+
const validationResult = validateValue(finalValue);
|
|
63
|
+
if (validationResult === false) {
|
|
64
|
+
if (errorMessages.invalid) {
|
|
65
|
+
setError(errorMessages.invalid);
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (typeof validationResult === "string") {
|
|
70
|
+
setError(validationResult);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (maxItems && currentValues.length >= maxItems) {
|
|
75
|
+
if (errorMessages.maxItems) {
|
|
76
|
+
setError(errorMessages.maxItems(maxItems));
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
setError("");
|
|
81
|
+
props.onChange([...currentValues, finalValue]);
|
|
82
|
+
setInputValue("");
|
|
83
|
+
if (onAdd) {
|
|
84
|
+
onAdd(finalValue);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[currentValues, props]
|
|
88
|
+
);
|
|
89
|
+
const handleRemove = useCallback(
|
|
90
|
+
(index) => {
|
|
91
|
+
const valueToRemove = currentValues[index];
|
|
92
|
+
const newValues = currentValues.filter(
|
|
93
|
+
(_, i) => i !== index
|
|
94
|
+
);
|
|
95
|
+
props.onChange(newValues);
|
|
96
|
+
if (onRemove) {
|
|
97
|
+
onRemove(valueToRemove, index);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
[currentValues, props, onRemove]
|
|
101
|
+
);
|
|
102
|
+
const isDisabled = disabled || props.disabled;
|
|
103
|
+
const isMaxReached = !!(maxItems && currentValues.length >= maxItems);
|
|
104
|
+
return /* @__PURE__ */ jsxs(
|
|
105
|
+
InputGroup,
|
|
106
|
+
{
|
|
107
|
+
className: cn(
|
|
108
|
+
"p-1.5",
|
|
109
|
+
currentValues.length === 0 && "p-0",
|
|
110
|
+
classNames.container
|
|
111
|
+
),
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
InputGroupAddon,
|
|
115
|
+
{
|
|
116
|
+
align: "block-end",
|
|
117
|
+
className: cn(
|
|
118
|
+
"flex-col gap-1.5",
|
|
119
|
+
maxHeight,
|
|
120
|
+
"overflow-auto p-0",
|
|
121
|
+
classNames.listContainer || ""
|
|
122
|
+
),
|
|
123
|
+
children: currentValues.length === 0 && emptyState ? emptyState : currentValues.map((value, index) => {
|
|
124
|
+
if (renderItem) {
|
|
125
|
+
return renderItem(value, index, () => handleRemove(index));
|
|
126
|
+
}
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
128
|
+
InputGroupText,
|
|
129
|
+
{
|
|
130
|
+
className: cn(
|
|
131
|
+
"bg-accent relative w-full overflow-hidden pl-2 pr-1 min-h-8 h-8 rounded-md",
|
|
132
|
+
classNames.listItem || ""
|
|
133
|
+
),
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
className: cn(
|
|
139
|
+
"truncate text-ellipsis",
|
|
140
|
+
classNames.listItemText || ""
|
|
141
|
+
),
|
|
142
|
+
children: value
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ jsx(
|
|
146
|
+
InputGroupButton,
|
|
147
|
+
{
|
|
148
|
+
className: cn(
|
|
149
|
+
"rounded-md ml-auto",
|
|
150
|
+
classNames.removeButton || ""
|
|
151
|
+
),
|
|
152
|
+
variant: buttonVariants.remove,
|
|
153
|
+
size: buttonSizes.remove,
|
|
154
|
+
onClick: () => handleRemove(index),
|
|
155
|
+
disabled: isDisabled,
|
|
156
|
+
"aria-label": removeButtonLabel,
|
|
157
|
+
children: /* @__PURE__ */ jsx(RemoveIcon, { className: iconSizes.remove })
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
`${value}-${index}`
|
|
163
|
+
);
|
|
164
|
+
})
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ jsxs(
|
|
168
|
+
InputGroupAddon,
|
|
169
|
+
{
|
|
170
|
+
align: "block-end",
|
|
171
|
+
className: cn(
|
|
172
|
+
"p-0 justify-between",
|
|
173
|
+
currentValues.length === 0 && "pr-1.5 ",
|
|
174
|
+
classNames.inputContainer || ""
|
|
175
|
+
),
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ jsxs(Tooltip, { open: !!error, children: [
|
|
178
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
179
|
+
InputGroupInput,
|
|
180
|
+
{
|
|
181
|
+
className: cn(
|
|
182
|
+
"pl-2",
|
|
183
|
+
error && "text-destructive",
|
|
184
|
+
classNames.input || ""
|
|
185
|
+
),
|
|
186
|
+
placeholder: placeholder || props.options.placeholder,
|
|
187
|
+
value: inputValue,
|
|
188
|
+
onChange: (e) => {
|
|
189
|
+
setInputValue(e.target.value);
|
|
190
|
+
setError("");
|
|
191
|
+
},
|
|
192
|
+
onKeyDown: (e) => {
|
|
193
|
+
if (e.key === "Enter") {
|
|
194
|
+
e.preventDefault();
|
|
195
|
+
handleValue(inputValue);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
...inputProps
|
|
199
|
+
}
|
|
200
|
+
) }) }),
|
|
201
|
+
error && /* @__PURE__ */ jsx(TooltipContent, { children: error })
|
|
202
|
+
] }),
|
|
203
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
204
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
205
|
+
InputGroupButton,
|
|
206
|
+
{
|
|
207
|
+
type: "button",
|
|
208
|
+
variant: buttonVariants.add,
|
|
209
|
+
className: cn(
|
|
210
|
+
"rounded-md ml-auto",
|
|
211
|
+
classNames.addButton || ""
|
|
212
|
+
),
|
|
213
|
+
size: buttonSizes.add,
|
|
214
|
+
onClick: () => handleValue(inputValue),
|
|
215
|
+
disabled: isDisabled || isMaxReached || !inputValue,
|
|
216
|
+
"aria-label": addButtonLabel,
|
|
217
|
+
children: [
|
|
218
|
+
/* @__PURE__ */ jsx(AddIcon, { className: iconSizes.add }),
|
|
219
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: addButtonLabel })
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
) }) }),
|
|
223
|
+
isMaxReached && messages.maxReached && /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: messages.maxReached(maxItems) })
|
|
224
|
+
] })
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
};
|
|
232
|
+
return Widget;
|
|
233
|
+
}
|
|
234
|
+
export {
|
|
235
|
+
CustomStringArrayWidget
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=string-array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/custom/schema-form/widgets/string-array.tsx"],"sourcesContent":["import { ButtonProps } from \"@repo/ayasofyazilim-ui/components/button\";\r\nimport {\r\n InputGroup,\r\n InputGroupAddon,\r\n InputGroupButton,\r\n InputGroupInput,\r\n InputGroupText,\r\n} from \"@repo/ayasofyazilim-ui/components/input-group\";\r\nimport {\r\n Tooltip,\r\n TooltipContent,\r\n TooltipTrigger,\r\n} from \"@repo/ayasofyazilim-ui/components/tooltip\";\r\nimport { cn } from \"@repo/ayasofyazilim-ui/lib/utils\";\r\nimport { WidgetProps } from \"@rjsf/utils\";\r\nimport { PlusIcon, Trash2Icon } from \"lucide-react\";\r\nimport { useCallback, useState } from \"react\";\r\n\r\ninterface StringArrayWidgetConfig {\r\n classNames?: {\r\n container?: string;\r\n listContainer?: string;\r\n listItem?: string;\r\n listItemText?: string;\r\n removeButton?: string;\r\n inputContainer?: string;\r\n input?: string;\r\n addButton?: string;\r\n };\r\n icons?: {\r\n add?: React.ComponentType<{ className?: string }>;\r\n remove?: React.ComponentType<{ className?: string }>;\r\n };\r\n iconSizes?: {\r\n add?: string;\r\n remove?: string;\r\n };\r\n buttonVariants?: {\r\n add?: ButtonProps[\"variant\"];\r\n remove?: ButtonProps[\"variant\"];\r\n };\r\n buttonSizes?: {\r\n add?: \"icon-xs\" | \"sm\" | \"icon-sm\" | \"xs\";\r\n remove?: \"icon-xs\" | \"sm\" | \"icon-sm\" | \"xs\";\r\n };\r\n maxItems?: number;\r\n maxHeight?: string;\r\n allowDuplicates?: boolean;\r\n trimValues?: boolean;\r\n validateValue?: (value: string) => boolean | string;\r\n transformValue?: (value: string) => string;\r\n renderItem?: (\r\n value: string,\r\n index: number,\r\n onRemove: () => void\r\n ) => React.ReactNode;\r\n emptyState?: React.ReactNode;\r\n placeholder?: string;\r\n addButtonLabel?: string;\r\n removeButtonLabel?: string;\r\n errorMessages?: {\r\n duplicate?: string;\r\n invalid?: string;\r\n maxItems?: (max: number) => string;\r\n };\r\n messages?: {\r\n maxReached?: (max: number) => string;\r\n };\r\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\r\n onAdd?: (value: string) => void;\r\n onRemove?: (value: string, index: number) => void;\r\n disabled?: boolean;\r\n}\r\n\r\nexport function CustomStringArrayWidget(config: StringArrayWidgetConfig = {}) {\r\n const {\r\n classNames = {},\r\n icons = {},\r\n iconSizes = { add: \"icon-xs\", remove: \"icon-xs\" },\r\n buttonVariants = { add: \"default\", remove: \"secondary\" },\r\n buttonSizes = { add: \"icon-xs\", remove: undefined },\r\n maxItems,\r\n maxHeight = \"max-h-52\",\r\n allowDuplicates = false,\r\n trimValues = true,\r\n validateValue,\r\n transformValue,\r\n renderItem,\r\n emptyState,\r\n placeholder,\r\n addButtonLabel,\r\n removeButtonLabel,\r\n errorMessages = {},\r\n messages = {},\r\n inputProps = {},\r\n onAdd,\r\n onRemove,\r\n disabled = false,\r\n } = config;\r\n\r\n const AddIcon = icons.add || PlusIcon;\r\n const RemoveIcon = icons.remove || Trash2Icon;\r\n\r\n const Widget = (props: WidgetProps) => {\r\n const [inputValue, setInputValue] = useState(\"\");\r\n const [error, setError] = useState<string>(\"\");\r\n\r\n const currentValues = props.value || [];\r\n\r\n const handleValue = useCallback(\r\n (value: string) => {\r\n const processedValue = trimValues ? value.trim() : value;\r\n\r\n if (!processedValue) {\r\n return;\r\n }\r\n const finalValue = transformValue\r\n ? transformValue(processedValue)\r\n : processedValue;\r\n if (!allowDuplicates && currentValues.includes(finalValue)) {\r\n if (errorMessages.duplicate) {\r\n setError(errorMessages.duplicate);\r\n }\r\n return;\r\n }\r\n if (validateValue) {\r\n const validationResult = validateValue(finalValue);\r\n if (validationResult === false) {\r\n if (errorMessages.invalid) {\r\n setError(errorMessages.invalid);\r\n }\r\n return;\r\n }\r\n if (typeof validationResult === \"string\") {\r\n setError(validationResult);\r\n return;\r\n }\r\n }\r\n if (maxItems && currentValues.length >= maxItems) {\r\n if (errorMessages.maxItems) {\r\n setError(errorMessages.maxItems(maxItems));\r\n }\r\n return;\r\n }\r\n setError(\"\");\r\n props.onChange([...currentValues, finalValue]);\r\n setInputValue(\"\");\r\n if (onAdd) {\r\n onAdd(finalValue);\r\n }\r\n },\r\n [currentValues, props]\r\n );\r\n\r\n const handleRemove = useCallback(\r\n (index: number) => {\r\n const valueToRemove = currentValues[index];\r\n const newValues = currentValues.filter(\r\n (_: string, i: number) => i !== index\r\n );\r\n props.onChange(newValues);\r\n if (onRemove) {\r\n onRemove(valueToRemove, index);\r\n }\r\n },\r\n [currentValues, props, onRemove]\r\n );\r\n\r\n const isDisabled = disabled || props.disabled;\r\n const isMaxReached = !!(maxItems && currentValues.length >= maxItems);\r\n\r\n return (\r\n <InputGroup\r\n className={cn(\r\n \"p-1.5\",\r\n currentValues.length === 0 && \"p-0\",\r\n classNames.container\r\n )}\r\n >\r\n <InputGroupAddon\r\n align=\"block-end\"\r\n className={cn(\r\n \"flex-col gap-1.5\",\r\n maxHeight,\r\n \"overflow-auto p-0\",\r\n classNames.listContainer || \"\"\r\n )}\r\n >\r\n {currentValues.length === 0 && emptyState\r\n ? emptyState\r\n : currentValues.map((value: string, index: number) => {\r\n if (renderItem) {\r\n return renderItem(value, index, () => handleRemove(index));\r\n }\r\n\r\n return (\r\n <InputGroupText\r\n className={cn(\r\n \"bg-accent relative w-full overflow-hidden pl-2 pr-1 min-h-8 h-8 rounded-md\",\r\n classNames.listItem || \"\"\r\n )}\r\n key={`${value}-${index}`}\r\n >\r\n <span\r\n className={cn(\r\n \"truncate text-ellipsis\",\r\n classNames.listItemText || \"\"\r\n )}\r\n >\r\n {value}\r\n </span>\r\n <InputGroupButton\r\n className={cn(\r\n \"rounded-md ml-auto\",\r\n classNames.removeButton || \"\"\r\n )}\r\n variant={buttonVariants.remove}\r\n size={buttonSizes.remove}\r\n onClick={() => handleRemove(index)}\r\n disabled={isDisabled}\r\n aria-label={removeButtonLabel}\r\n >\r\n <RemoveIcon className={iconSizes.remove} />\r\n </InputGroupButton>\r\n </InputGroupText>\r\n );\r\n })}\r\n </InputGroupAddon>\r\n <InputGroupAddon\r\n align=\"block-end\"\r\n className={cn(\r\n \"p-0 justify-between\",\r\n currentValues.length === 0 && \"pr-1.5 \",\r\n classNames.inputContainer || \"\"\r\n )}\r\n >\r\n <Tooltip open={!!error}>\r\n <TooltipTrigger asChild>\r\n <div>\r\n <InputGroupInput\r\n className={cn(\r\n \"pl-2\",\r\n error && \"text-destructive\",\r\n classNames.input || \"\"\r\n )}\r\n placeholder={placeholder || props.options.placeholder}\r\n value={inputValue}\r\n onChange={(e) => {\r\n setInputValue(e.target.value);\r\n setError(\"\");\r\n }}\r\n onKeyDown={(e) => {\r\n if (e.key === \"Enter\") {\r\n e.preventDefault();\r\n handleValue(inputValue);\r\n }\r\n }}\r\n {...inputProps}\r\n />\r\n </div>\r\n </TooltipTrigger>\r\n {error && <TooltipContent>{error}</TooltipContent>}\r\n </Tooltip>\r\n <Tooltip>\r\n <TooltipTrigger asChild>\r\n <div>\r\n <InputGroupButton\r\n type=\"button\"\r\n variant={buttonVariants.add}\r\n className={cn(\r\n \"rounded-md ml-auto\",\r\n classNames.addButton || \"\"\r\n )}\r\n size={buttonSizes.add}\r\n onClick={() => handleValue(inputValue)}\r\n disabled={isDisabled || isMaxReached || !inputValue}\r\n aria-label={addButtonLabel}\r\n >\r\n <AddIcon className={iconSizes.add} />\r\n <span className=\"sr-only\">{addButtonLabel}</span>\r\n </InputGroupButton>\r\n </div>\r\n </TooltipTrigger>\r\n {isMaxReached && messages.maxReached && (\r\n <TooltipContent side=\"bottom\">\r\n {messages.maxReached(maxItems!)}\r\n </TooltipContent>\r\n )}\r\n </Tooltip>\r\n </InputGroupAddon>\r\n </InputGroup>\r\n );\r\n };\r\n\r\n return Widget;\r\n}\r\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
InputGroup,
|
|
4
|
+
InputGroupAddon,
|
|
5
|
+
InputGroupInput,
|
|
6
|
+
InputGroupText
|
|
7
|
+
} from "@repo/ayasofyazilim-ui/components/input-group";
|
|
8
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
9
|
+
const URLInputWidget = (props) => {
|
|
10
|
+
const {
|
|
11
|
+
uiSchema,
|
|
12
|
+
id,
|
|
13
|
+
className,
|
|
14
|
+
onChange,
|
|
15
|
+
value,
|
|
16
|
+
defaultValue,
|
|
17
|
+
disabled,
|
|
18
|
+
readOnly
|
|
19
|
+
} = props;
|
|
20
|
+
const required = uiSchema?.["ui:required"] || props.required;
|
|
21
|
+
return /* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
InputGroupInput,
|
|
24
|
+
{
|
|
25
|
+
placeholder: "example.com",
|
|
26
|
+
id,
|
|
27
|
+
"data-testid": id,
|
|
28
|
+
onBlur: props.onBlur && ((event) => props.onBlur(id, event.target.value)),
|
|
29
|
+
className: cn("pl-1!", className),
|
|
30
|
+
required,
|
|
31
|
+
onChange: (event) => {
|
|
32
|
+
if (event.target.value === "") {
|
|
33
|
+
onChange(void 0);
|
|
34
|
+
} else {
|
|
35
|
+
onChange(event.target.value);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultValue: value || defaultValue,
|
|
39
|
+
readOnly,
|
|
40
|
+
disabled,
|
|
41
|
+
autoComplete: uiSchema?.["ui:autocomplete"],
|
|
42
|
+
onKeyDown: (e) => {
|
|
43
|
+
e.key === "Enter" && e.preventDefault();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(InputGroupText, { children: props.placeholder }) })
|
|
48
|
+
] });
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
URLInputWidget
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=url.js.map
|