@j2-health/design-system 0.5.0 → 0.5.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/_virtual/_rolldown/runtime.cjs +35 -0
- package/dist/_virtual/_rolldown/runtime.js +27 -0
- package/dist/index.cjs +118 -113
- package/dist/index.js +22 -81
- package/dist/src/AppConfigProvider.cjs +22 -11
- package/dist/src/AppConfigProvider.cjs.map +1 -1
- package/dist/src/AppConfigProvider.js +19 -10
- package/dist/src/AppConfigProvider.js.map +1 -1
- package/dist/src/appTheme.cjs +239 -266
- package/dist/src/appTheme.cjs.map +1 -1
- package/dist/src/appTheme.js +240 -267
- package/dist/src/appTheme.js.map +1 -1
- package/dist/src/components/alert/Alert.cjs +81 -103
- package/dist/src/components/alert/Alert.cjs.map +1 -1
- package/dist/src/components/alert/Alert.js +78 -86
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/alert/Alert.module.css.cjs +7 -8
- package/dist/src/components/alert/Alert.module.css.cjs.map +1 -1
- package/dist/src/components/alert/Alert.module.css.js +7 -9
- package/dist/src/components/alert/Alert.module.css.js.map +1 -1
- package/dist/src/components/barchart/BarChart.cjs +123 -151
- package/dist/src/components/barchart/BarChart.cjs.map +1 -1
- package/dist/src/components/barchart/BarChart.d.ts +1 -1
- package/dist/src/components/barchart/BarChart.js +121 -149
- package/dist/src/components/barchart/BarChart.js.map +1 -1
- package/dist/src/components/barchart/chart.module.css.cjs +7 -8
- package/dist/src/components/barchart/chart.module.css.cjs.map +1 -1
- package/dist/src/components/barchart/chart.module.css.js +7 -9
- package/dist/src/components/barchart/chart.module.css.js.map +1 -1
- package/dist/src/components/barchart/index.js +3 -0
- package/dist/src/components/breadcrumb/Breadcrumb.cjs +23 -36
- package/dist/src/components/breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/src/components/breadcrumb/Breadcrumb.js +20 -19
- package/dist/src/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/src/components/bulkActionBar/BulkActionBar.cjs +66 -79
- package/dist/src/components/bulkActionBar/BulkActionBar.cjs.map +1 -1
- package/dist/src/components/bulkActionBar/BulkActionBar.d.ts +1 -1
- package/dist/src/components/bulkActionBar/BulkActionBar.js +63 -78
- package/dist/src/components/bulkActionBar/BulkActionBar.js.map +1 -1
- package/dist/src/components/button/Button.cjs +16 -18
- package/dist/src/components/button/Button.cjs.map +1 -1
- package/dist/src/components/button/Button.d.ts +1 -1
- package/dist/src/components/button/Button.js +17 -19
- package/dist/src/components/button/Button.js.map +1 -1
- package/dist/src/components/card/Card.cjs +19 -33
- package/dist/src/components/card/Card.cjs.map +1 -1
- package/dist/src/components/card/Card.d.ts +1 -1
- package/dist/src/components/card/Card.js +17 -33
- package/dist/src/components/card/Card.js.map +1 -1
- package/dist/src/components/checkbox/Checkbox.cjs +8 -7
- package/dist/src/components/checkbox/Checkbox.cjs.map +1 -1
- package/dist/src/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/src/components/checkbox/Checkbox.js +9 -8
- package/dist/src/components/checkbox/Checkbox.js.map +1 -1
- package/dist/src/components/checkboxTree/CheckboxTree.cjs +112 -138
- package/dist/src/components/checkboxTree/CheckboxTree.cjs.map +1 -1
- package/dist/src/components/checkboxTree/CheckboxTree.js +110 -138
- package/dist/src/components/checkboxTree/CheckboxTree.js.map +1 -1
- package/dist/src/components/checkboxTree/TreeNode.cjs +57 -90
- package/dist/src/components/checkboxTree/TreeNode.cjs.map +1 -1
- package/dist/src/components/checkboxTree/TreeNode.d.ts +1 -1
- package/dist/src/components/checkboxTree/TreeNode.js +57 -90
- package/dist/src/components/checkboxTree/TreeNode.js.map +1 -1
- package/dist/src/components/checkboxTree/utils.cjs +46 -51
- package/dist/src/components/checkboxTree/utils.cjs.map +1 -1
- package/dist/src/components/checkboxTree/utils.js +47 -55
- package/dist/src/components/checkboxTree/utils.js.map +1 -1
- package/dist/src/components/collapse/Collapse.cjs +54 -78
- package/dist/src/components/collapse/Collapse.cjs.map +1 -1
- package/dist/src/components/collapse/Collapse.js +51 -61
- package/dist/src/components/collapse/Collapse.js.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.cjs +11 -10
- package/dist/src/components/collapse/Collapse.module.css.cjs.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.js +11 -12
- package/dist/src/components/collapse/Collapse.module.css.js.map +1 -1
- package/dist/src/components/drawer/Drawer.cjs +26 -38
- package/dist/src/components/drawer/Drawer.cjs.map +1 -1
- package/dist/src/components/drawer/Drawer.d.ts +1 -1
- package/dist/src/components/drawer/Drawer.js +27 -39
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/dropdown/Dropdown.cjs +54 -54
- package/dist/src/components/dropdown/Dropdown.cjs.map +1 -1
- package/dist/src/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/src/components/dropdown/Dropdown.js +53 -55
- package/dist/src/components/dropdown/Dropdown.js.map +1 -1
- package/dist/src/components/filterform/FilterGroup.cjs +41 -62
- package/dist/src/components/filterform/FilterGroup.cjs.map +1 -1
- package/dist/src/components/filterform/FilterGroup.d.ts +1 -1
- package/dist/src/components/filterform/FilterGroup.js +38 -61
- package/dist/src/components/filterform/FilterGroup.js.map +1 -1
- package/dist/src/components/filterform/FilterInput.cjs +169 -233
- package/dist/src/components/filterform/FilterInput.cjs.map +1 -1
- package/dist/src/components/filterform/FilterInput.js +164 -216
- package/dist/src/components/filterform/FilterInput.js.map +1 -1
- package/dist/src/components/filterform/FiltersForm.cjs +144 -178
- package/dist/src/components/filterform/FiltersForm.cjs.map +1 -1
- package/dist/src/components/filterform/FiltersForm.d.ts +1 -1
- package/dist/src/components/filterform/FiltersForm.js +140 -176
- package/dist/src/components/filterform/FiltersForm.js.map +1 -1
- package/dist/src/components/filterform/FiltersForm.module.css.cjs +16 -15
- package/dist/src/components/filterform/FiltersForm.module.css.cjs.map +1 -1
- package/dist/src/components/filterform/FiltersForm.module.css.js +16 -20
- package/dist/src/components/filterform/FiltersForm.module.css.js.map +1 -1
- package/dist/src/components/filterform/filterHelpers.cjs +50 -59
- package/dist/src/components/filterform/filterHelpers.cjs.map +1 -1
- package/dist/src/components/filterform/filterHelpers.js +51 -66
- package/dist/src/components/filterform/filterHelpers.js.map +1 -1
- package/dist/src/components/filterform/useFilterField.cjs +268 -236
- package/dist/src/components/filterform/useFilterField.cjs.map +1 -1
- package/dist/src/components/filterform/useFilterField.js +265 -222
- package/dist/src/components/filterform/useFilterField.js.map +1 -1
- package/dist/src/components/filterform/useFiltersForm.cjs +120 -154
- package/dist/src/components/filterform/useFiltersForm.cjs.map +1 -1
- package/dist/src/components/filterform/useFiltersForm.js +117 -153
- package/dist/src/components/filterform/useFiltersForm.js.map +1 -1
- package/dist/src/components/form/Form.cjs +23 -25
- package/dist/src/components/form/Form.cjs.map +1 -1
- package/dist/src/components/form/Form.d.ts +2 -2
- package/dist/src/components/form/Form.js +23 -25
- package/dist/src/components/form/Form.js.map +1 -1
- package/dist/src/components/form/FormItem.cjs +35 -40
- package/dist/src/components/form/FormItem.cjs.map +1 -1
- package/dist/src/components/form/FormItem.d.ts +1 -1
- package/dist/src/components/form/FormItem.js +35 -40
- package/dist/src/components/form/FormItem.js.map +1 -1
- package/dist/src/components/form/FormItemFieldContext.cjs +5 -7
- package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -1
- package/dist/src/components/form/FormItemFieldContext.js +6 -7
- package/dist/src/components/form/FormItemFieldContext.js.map +1 -1
- package/dist/src/components/form/FormikField.cjs +15 -18
- package/dist/src/components/form/FormikField.cjs.map +1 -1
- package/dist/src/components/form/FormikField.d.ts +1 -1
- package/dist/src/components/form/FormikField.js +14 -17
- package/dist/src/components/form/FormikField.js.map +1 -1
- package/dist/src/components/icons/index.cjs +21 -26
- package/dist/src/components/icons/index.cjs.map +1 -1
- package/dist/src/components/icons/index.js +9 -2
- package/dist/src/components/icons/index.js.map +1 -1
- package/dist/src/components/input/AntdInput.cjs +14 -11
- package/dist/src/components/input/AntdInput.cjs.map +1 -1
- package/dist/src/components/input/AntdInput.js +13 -10
- package/dist/src/components/input/AntdInput.js.map +1 -1
- package/dist/src/components/input/AntdSearchInput.cjs +14 -11
- package/dist/src/components/input/AntdSearchInput.cjs.map +1 -1
- package/dist/src/components/input/AntdSearchInput.js +13 -10
- package/dist/src/components/input/AntdSearchInput.js.map +1 -1
- package/dist/src/components/input/Input.cjs +28 -33
- package/dist/src/components/input/Input.cjs.map +1 -1
- package/dist/src/components/input/Input.d.ts +1 -1
- package/dist/src/components/input/Input.js +28 -33
- package/dist/src/components/input/Input.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.cjs +45 -45
- package/dist/src/components/inputnumber/InputNumber.cjs.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.d.ts +1 -1
- package/dist/src/components/inputnumber/InputNumber.js +42 -44
- package/dist/src/components/inputnumber/InputNumber.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs +7 -8
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.js +7 -9
- package/dist/src/components/inputnumber/InputNumber.module.css.js.map +1 -1
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.cjs +72 -50
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.cjs.map +1 -1
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.js +69 -49
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.js.map +1 -1
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.cjs +43 -33
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.cjs.map +1 -1
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.js +40 -47
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.js.map +1 -1
- package/dist/src/components/legacyNavMenu/UserProfile.cjs +76 -76
- package/dist/src/components/legacyNavMenu/UserProfile.cjs.map +1 -1
- package/dist/src/components/legacyNavMenu/UserProfile.js +74 -76
- package/dist/src/components/legacyNavMenu/UserProfile.js.map +1 -1
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.cjs +33 -29
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.cjs.map +1 -1
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.js +32 -41
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.js.map +1 -1
- package/dist/src/components/listpopover/ListPopover.cjs +89 -120
- package/dist/src/components/listpopover/ListPopover.cjs.map +1 -1
- package/dist/src/components/listpopover/ListPopover.d.ts +1 -1
- package/dist/src/components/listpopover/ListPopover.js +86 -119
- package/dist/src/components/listpopover/ListPopover.js.map +1 -1
- package/dist/src/components/listpopover/ListPopover.module.css.cjs +7 -8
- package/dist/src/components/listpopover/ListPopover.module.css.cjs.map +1 -1
- package/dist/src/components/listpopover/ListPopover.module.css.js +7 -9
- package/dist/src/components/listpopover/ListPopover.module.css.js.map +1 -1
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs +53 -74
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs.map +1 -1
- package/dist/src/components/manageColumns/ManageColumnsItem.js +48 -71
- package/dist/src/components/manageColumns/ManageColumnsItem.js.map +1 -1
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs +66 -77
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs.map +1 -1
- package/dist/src/components/manageColumns/ManageColumnsPanel.d.ts +1 -1
- package/dist/src/components/manageColumns/ManageColumnsPanel.js +65 -76
- package/dist/src/components/manageColumns/ManageColumnsPanel.js.map +1 -1
- package/dist/src/components/manageColumns/SelectAll.cjs +31 -24
- package/dist/src/components/manageColumns/SelectAll.cjs.map +1 -1
- package/dist/src/components/manageColumns/SelectAll.d.ts +1 -1
- package/dist/src/components/manageColumns/SelectAll.js +31 -24
- package/dist/src/components/manageColumns/SelectAll.js.map +1 -1
- package/dist/src/components/menu/Menu.cjs +16 -16
- package/dist/src/components/menu/Menu.cjs.map +1 -1
- package/dist/src/components/menu/Menu.d.ts +1 -1
- package/dist/src/components/menu/Menu.js +13 -15
- package/dist/src/components/menu/Menu.js.map +1 -1
- package/dist/src/components/menu/Menu.module.css.cjs +10 -9
- package/dist/src/components/menu/Menu.module.css.cjs.map +1 -1
- package/dist/src/components/menu/Menu.module.css.js +10 -11
- package/dist/src/components/menu/Menu.module.css.js.map +1 -1
- package/dist/src/components/message/Message.module.css.cjs +7 -8
- package/dist/src/components/message/Message.module.css.cjs.map +1 -1
- package/dist/src/components/message/Message.module.css.js +7 -9
- package/dist/src/components/message/Message.module.css.js.map +1 -1
- package/dist/src/components/message/useMessage.cjs +46 -52
- package/dist/src/components/message/useMessage.cjs.map +1 -1
- package/dist/src/components/message/useMessage.js +43 -51
- package/dist/src/components/message/useMessage.js.map +1 -1
- package/dist/src/components/modal/Modal.cjs +27 -28
- package/dist/src/components/modal/Modal.cjs.map +1 -1
- package/dist/src/components/modal/Modal.d.ts +1 -1
- package/dist/src/components/modal/Modal.js +25 -28
- package/dist/src/components/modal/Modal.js.map +1 -1
- package/dist/src/components/navMenu/NavMenu.cjs +75 -130
- package/dist/src/components/navMenu/NavMenu.cjs.map +1 -1
- package/dist/src/components/navMenu/NavMenu.js +68 -110
- package/dist/src/components/navMenu/NavMenu.js.map +1 -1
- package/dist/src/components/navMenu/NavMenu.module.css.cjs +14 -13
- package/dist/src/components/navMenu/NavMenu.module.css.cjs.map +1 -1
- package/dist/src/components/navMenu/NavMenu.module.css.js +14 -17
- package/dist/src/components/navMenu/NavMenu.module.css.js.map +1 -1
- package/dist/src/components/notification/Notification.module.css.cjs +7 -8
- package/dist/src/components/notification/Notification.module.css.cjs.map +1 -1
- package/dist/src/components/notification/Notification.module.css.js +7 -9
- package/dist/src/components/notification/Notification.module.css.js.map +1 -1
- package/dist/src/components/notification/useNotification.cjs +61 -52
- package/dist/src/components/notification/useNotification.cjs.map +1 -1
- package/dist/src/components/notification/useNotification.js +57 -51
- package/dist/src/components/notification/useNotification.js.map +1 -1
- package/dist/src/components/notificationModal/NotifcationModal.module.css.cjs +16 -15
- package/dist/src/components/notificationModal/NotifcationModal.module.css.cjs.map +1 -1
- package/dist/src/components/notificationModal/NotifcationModal.module.css.js +16 -20
- package/dist/src/components/notificationModal/NotifcationModal.module.css.js.map +1 -1
- package/dist/src/components/notificationModal/NotificationModal.cjs +56 -54
- package/dist/src/components/notificationModal/NotificationModal.cjs.map +1 -1
- package/dist/src/components/notificationModal/NotificationModal.d.ts +1 -1
- package/dist/src/components/notificationModal/NotificationModal.js +56 -54
- package/dist/src/components/notificationModal/NotificationModal.js.map +1 -1
- package/dist/src/components/pagination/Pagination.cjs +66 -61
- package/dist/src/components/pagination/Pagination.cjs.map +1 -1
- package/dist/src/components/pagination/Pagination.d.ts +1 -1
- package/dist/src/components/pagination/Pagination.js +63 -61
- package/dist/src/components/pagination/Pagination.js.map +1 -1
- package/dist/src/components/pagination/Pagination.module.css.cjs +6 -6
- package/dist/src/components/pagination/Pagination.module.css.cjs.map +1 -1
- package/dist/src/components/pagination/Pagination.module.css.js +6 -7
- package/dist/src/components/pagination/Pagination.module.css.js.map +1 -1
- package/dist/src/components/popover/Popover.cjs +22 -41
- package/dist/src/components/popover/Popover.cjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +1 -1
- package/dist/src/components/popover/Popover.js +19 -40
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.module.css.cjs +24 -23
- package/dist/src/components/popover/Popover.module.css.cjs.map +1 -1
- package/dist/src/components/popover/Popover.module.css.js +24 -32
- package/dist/src/components/popover/Popover.module.css.js.map +1 -1
- package/dist/src/components/progress/Progress.cjs +8 -7
- package/dist/src/components/progress/Progress.cjs.map +1 -1
- package/dist/src/components/progress/Progress.d.ts +1 -1
- package/dist/src/components/progress/Progress.js +8 -7
- package/dist/src/components/progress/Progress.js.map +1 -1
- package/dist/src/components/radio/Radio.cjs +14 -20
- package/dist/src/components/radio/Radio.cjs.map +1 -1
- package/dist/src/components/radio/Radio.d.ts +2 -2
- package/dist/src/components/radio/Radio.js +14 -21
- package/dist/src/components/radio/Radio.js.map +1 -1
- package/dist/src/components/rate/Rate.cjs +17 -19
- package/dist/src/components/rate/Rate.cjs.map +1 -1
- package/dist/src/components/rate/Rate.d.ts +1 -1
- package/dist/src/components/rate/Rate.js +18 -20
- package/dist/src/components/rate/Rate.js.map +1 -1
- package/dist/src/components/select/AntdSelect.cjs +57 -74
- package/dist/src/components/select/AntdSelect.cjs.map +1 -1
- package/dist/src/components/select/AntdSelect.js +53 -56
- package/dist/src/components/select/AntdSelect.js.map +1 -1
- package/dist/src/components/select/Select.cjs +119 -120
- package/dist/src/components/select/Select.cjs.map +1 -1
- package/dist/src/components/select/Select.js +117 -120
- package/dist/src/components/select/Select.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.cjs +384 -450
- package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.d.ts +1 -1
- package/dist/src/components/select/SummarizedSelect.js +382 -450
- package/dist/src/components/select/SummarizedSelect.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +22 -21
- package/dist/src/components/select/SummarizedSelect.module.css.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.js +22 -29
- package/dist/src/components/select/SummarizedSelect.module.css.js.map +1 -1
- package/dist/src/components/skeleton/Skeleton.cjs +8 -7
- package/dist/src/components/skeleton/Skeleton.cjs.map +1 -1
- package/dist/src/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/src/components/skeleton/Skeleton.js +13 -12
- package/dist/src/components/skeleton/Skeleton.js.map +1 -1
- package/dist/src/components/spinner/Spinner.cjs +27 -17
- package/dist/src/components/spinner/Spinner.cjs.map +1 -1
- package/dist/src/components/spinner/Spinner.d.ts +1 -1
- package/dist/src/components/spinner/Spinner.js +24 -16
- package/dist/src/components/spinner/Spinner.js.map +1 -1
- package/dist/src/components/steps/Steps.cjs +40 -57
- package/dist/src/components/steps/Steps.cjs.map +1 -1
- package/dist/src/components/steps/Steps.d.ts +1 -1
- package/dist/src/components/steps/Steps.js +37 -56
- package/dist/src/components/steps/Steps.js.map +1 -1
- package/dist/src/components/steps/useSteps.cjs +35 -54
- package/dist/src/components/steps/useSteps.cjs.map +1 -1
- package/dist/src/components/steps/useSteps.js +36 -55
- package/dist/src/components/steps/useSteps.js.map +1 -1
- package/dist/src/components/switch/Switch.cjs +16 -25
- package/dist/src/components/switch/Switch.cjs.map +1 -1
- package/dist/src/components/switch/Switch.d.ts +1 -1
- package/dist/src/components/switch/Switch.js +17 -26
- package/dist/src/components/switch/Switch.js.map +1 -1
- package/dist/src/components/table/Table.cjs +103 -109
- package/dist/src/components/table/Table.cjs.map +1 -1
- package/dist/src/components/table/Table.d.ts +3 -3
- package/dist/src/components/table/Table.js +102 -111
- package/dist/src/components/table/Table.js.map +1 -1
- package/dist/src/components/table/Table.module.css.cjs +10 -9
- package/dist/src/components/table/Table.module.css.cjs.map +1 -1
- package/dist/src/components/table/Table.module.css.js +10 -11
- package/dist/src/components/table/Table.module.css.js.map +1 -1
- package/dist/src/components/tabs/Tabs.cjs +12 -8
- package/dist/src/components/tabs/Tabs.cjs.map +1 -1
- package/dist/src/components/tabs/Tabs.d.ts +1 -1
- package/dist/src/components/tabs/Tabs.js +12 -8
- package/dist/src/components/tabs/Tabs.js.map +1 -1
- package/dist/src/components/tag/Tag.cjs +53 -73
- package/dist/src/components/tag/Tag.cjs.map +1 -1
- package/dist/src/components/tag/Tag.js +49 -56
- package/dist/src/components/tag/Tag.js.map +1 -1
- package/dist/src/components/tooltip/Tooltip.cjs +13 -12
- package/dist/src/components/tooltip/Tooltip.cjs.map +1 -1
- package/dist/src/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/tooltip/Tooltip.js +13 -12
- package/dist/src/components/tooltip/Tooltip.js.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.cjs +39 -50
- package/dist/src/components/vennDiagram/VennDiagram.cjs.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.d.ts +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.js +38 -49
- package/dist/src/components/vennDiagram/VennDiagram.js.map +1 -1
- package/dist/src/index.d.ts +5 -4
- package/dist/src/svgs/ProgressCircle.svg.cjs +38 -22
- package/dist/src/svgs/ProgressCircle.svg.cjs.map +1 -1
- package/dist/src/svgs/ProgressCircle.svg.js +36 -6
- package/dist/src/svgs/ProgressCircle.svg.js.map +1 -1
- package/dist/src/svgs/j2-logo-menu-collapse.svg.cjs +24 -22
- package/dist/src/svgs/j2-logo-menu-collapse.svg.cjs.map +1 -1
- package/dist/src/svgs/j2-logo-menu-collapse.svg.js +22 -6
- package/dist/src/svgs/j2-logo-menu-collapse.svg.js.map +1 -1
- package/dist/src/svgs/j2-logo-menu.svg.cjs +55 -22
- package/dist/src/svgs/j2-logo-menu.svg.cjs.map +1 -1
- package/dist/src/svgs/j2-logo-menu.svg.js +53 -6
- package/dist/src/svgs/j2-logo-menu.svg.js.map +1 -1
- package/dist/src/svgs/menu-sidebar-collapse.svg.cjs +78 -22
- package/dist/src/svgs/menu-sidebar-collapse.svg.cjs.map +1 -1
- package/dist/src/svgs/menu-sidebar-collapse.svg.js +76 -6
- package/dist/src/svgs/menu-sidebar-collapse.svg.js.map +1 -1
- package/dist/src/svgs/menu-sidebar-expand.svg.cjs +78 -22
- package/dist/src/svgs/menu-sidebar-expand.svg.cjs.map +1 -1
- package/dist/src/svgs/menu-sidebar-expand.svg.js +76 -6
- package/dist/src/svgs/menu-sidebar-expand.svg.js.map +1 -1
- package/dist/style.css +649 -624
- package/dist/tailwind.cjs +159 -175
- package/dist/tailwind.cjs.map +1 -1
- package/dist/tailwind.js +155 -176
- package/dist/tailwind.js.map +1 -1
- package/package.json +18 -18
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFiltersForm.js","sources":["../../../../src/components/filterform/useFiltersForm.ts"],"sourcesContent":["import { useReducer } from 'react'\nimport { FilterForm, FilterGroup, FormFilter } from './types'\n// Deep import, not `import { cloneDeep } from 'lodash'`: lodash is CommonJS\n// and Node cannot statically detect its named exports, so the bundled\n// package throws \"Named export 'cloneDeep' not found\" when a consumer\n// loads it through native Node ESM (SSR, or vitest without a bundler).\nimport cloneDeep from 'lodash/cloneDeep.js'\nimport { isEmptyFormFilter } from './filterHelpers'\n\ntype UseFiltersFormInput = {\n initialValues?: FilterForm\n}\n\ntype UseFiltersFormOutput = {\n dispatch: (action: Action) => void\n filterGroups: FilterGroup[]\n newFilter: FormFilter | undefined\n isNewFilterInputOpen: boolean\n isValid: boolean\n isEmpty: boolean\n}\n\ntype FilterFormState = {\n filterGroups: FilterGroup[]\n newFilter: FormFilter | undefined\n isNewFilterInputOpen: boolean\n}\n\ntype InitializeAction = {\n type: 'initialize'\n payload: FilterForm | undefined\n}\n\ntype OpenNewFilterInputAction = {\n type: 'openNewFilterInput'\n}\n\ntype AddNewFilterAction = {\n type: 'addNewFilter'\n payload: FormFilter\n}\n\ntype ChangeNewFilterAction = {\n type: 'changeNewFilter'\n payload: FormFilter\n}\n\ntype RemoveNewFilterAction = {\n type: 'removeNewFilter'\n}\n\ntype ClearAllFiltersAction = {\n type: 'clearAllFilters'\n}\n\ntype UpdateFilterAction = {\n type: 'updateFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n filter: FormFilter\n }\n}\n\ntype ChangeFilterAction = {\n type: 'changeFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n filter: FormFilter\n }\n}\n\ntype RemoveFilterAction = {\n type: 'removeFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n }\n}\n\ntype Action =\n | AddNewFilterAction\n | UpdateFilterAction\n | ClearAllFiltersAction\n | ChangeNewFilterAction\n | OpenNewFilterInputAction\n | ChangeFilterAction\n | RemoveFilterAction\n | InitializeAction\n | RemoveNewFilterAction\n\nconst copyFilterGroups = (filterGroups: FilterGroup[]): FilterGroup[] => {\n return cloneDeep(filterGroups)\n}\n\nconst addFilter = (\n filter: FormFilter,\n filterGroups: FilterGroup[]\n): FilterGroup[] => {\n const copy = copyFilterGroups(filterGroups)\n const filterGroupIndex = copy.findIndex(\n (filterGroup) => filterGroup.field === filter.field\n )\n\n if (filterGroupIndex === -1) {\n copy.push({ field: filter.field, filters: [filter] })\n } else {\n copy[filterGroupIndex].filters.push(filter)\n }\n\n return copy\n}\n\nconst removeFilter = (\n groupIndex: number,\n filterIndex: number,\n filterGroups: FilterGroup[]\n): FilterGroup[] => {\n const copy = copyFilterGroups(filterGroups)\n copy[groupIndex].filters.splice(filterIndex, 1)\n\n return copy.filter((group) => group.filters.length > 0)\n}\n\nconst filterFormReducer = (state: FilterFormState, action: Action) => {\n switch (action.type) {\n case 'initialize': {\n const filterGroups = action.payload?.filters.reduce(\n (acc, filter) => {\n return addFilter(filter, acc)\n },\n [...state.filterGroups]\n )\n\n return {\n ...state,\n filterGroups: filterGroups ?? [],\n isNewFilterInputOpen: !filterGroups?.length,\n }\n }\n case 'openNewFilterInput': {\n return {\n ...state,\n isNewFilterInputOpen: true,\n }\n }\n case 'addNewFilter': {\n if (action.payload.errors && action.payload.errors.length > 0) {\n return state\n }\n\n const filterGroups = addFilter(action.payload, state.filterGroups)\n\n return {\n ...state,\n filterGroups,\n newFilter: undefined,\n isNewFilterInputOpen: false,\n }\n }\n case 'changeNewFilter': {\n return {\n ...state,\n newFilter: action.payload,\n }\n }\n case 'removeNewFilter': {\n const allFiltersRemoved = state.filterGroups.every(\n (group) => group.filters.length === 0\n )\n return {\n ...state,\n newFilter: undefined,\n isNewFilterInputOpen: allFiltersRemoved,\n }\n }\n case 'updateFilter': {\n const { groupIndex, filterIndex, filter } = action.payload\n let filterGroups = copyFilterGroups(state.filterGroups)\n const groupField = filterGroups[groupIndex].field\n\n if (groupField === filter.field) {\n filterGroups[groupIndex].filters[filterIndex] = filter\n } else {\n filterGroups = removeFilter(groupIndex, filterIndex, filterGroups)\n filterGroups = addFilter(filter, filterGroups)\n }\n\n return {\n ...state,\n filterGroups,\n }\n }\n case 'changeFilter': {\n const { groupIndex, filterIndex, filter } = action.payload\n const filterGroups = copyFilterGroups(state.filterGroups)\n const group = filterGroups[groupIndex]\n if (group) {\n group.filters[filterIndex] = filter\n }\n\n return {\n ...state,\n filterGroups,\n }\n }\n case 'removeFilter': {\n const { groupIndex, filterIndex } = action.payload\n\n const filterGroups = removeFilter(\n groupIndex,\n filterIndex,\n state.filterGroups\n )\n\n return {\n ...state,\n filterGroups,\n isNewFilterInputOpen:\n state.isNewFilterInputOpen || filterGroups.length === 0,\n }\n }\n case 'clearAllFilters': {\n return {\n ...state,\n filterGroups: [],\n isNewFilterInputOpen: true,\n }\n }\n default:\n return state\n }\n}\n\nexport const useFiltersForm = ({\n initialValues,\n}: UseFiltersFormInput): UseFiltersFormOutput => {\n const [{ filterGroups, newFilter, isNewFilterInputOpen }, dispatch] =\n useReducer(\n filterFormReducer,\n {\n filterGroups: [],\n newFilter: undefined,\n isNewFilterInputOpen: true,\n },\n (state) => {\n return filterFormReducer(state, {\n type: 'initialize',\n payload: initialValues,\n })\n }\n )\n\n const isValid =\n (filterGroups.length === 0 ||\n filterGroups.every((group) =>\n group.filters.every(\n (filter) => filter.errors && filter.errors.length === 0\n )\n )) &&\n (newFilter?.errors ? newFilter.errors.length === 0 : true)\n\n const isEmpty =\n filterGroups.length === 0 &&\n (newFilter ? isEmptyFormFilter(newFilter) : true)\n\n return {\n dispatch,\n filterGroups,\n newFilter,\n isNewFilterInputOpen,\n isValid,\n isEmpty,\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"useFiltersForm.js","names":[],"sources":["../../../../src/components/filterform/useFiltersForm.ts"],"sourcesContent":["import { useReducer } from 'react'\nimport { FilterForm, FilterGroup, FormFilter } from './types'\n// Deep import, not `import { cloneDeep } from 'lodash'`: lodash is CommonJS\n// and Node cannot statically detect its named exports, so the bundled\n// package throws \"Named export 'cloneDeep' not found\" when a consumer\n// loads it through native Node ESM (SSR, or vitest without a bundler).\nimport cloneDeep from 'lodash/cloneDeep.js'\nimport { isEmptyFormFilter } from './filterHelpers'\n\ntype UseFiltersFormInput = {\n initialValues?: FilterForm\n}\n\ntype UseFiltersFormOutput = {\n dispatch: (action: Action) => void\n filterGroups: FilterGroup[]\n newFilter: FormFilter | undefined\n isNewFilterInputOpen: boolean\n isValid: boolean\n isEmpty: boolean\n}\n\ntype FilterFormState = {\n filterGroups: FilterGroup[]\n newFilter: FormFilter | undefined\n isNewFilterInputOpen: boolean\n}\n\ntype InitializeAction = {\n type: 'initialize'\n payload: FilterForm | undefined\n}\n\ntype OpenNewFilterInputAction = {\n type: 'openNewFilterInput'\n}\n\ntype AddNewFilterAction = {\n type: 'addNewFilter'\n payload: FormFilter\n}\n\ntype ChangeNewFilterAction = {\n type: 'changeNewFilter'\n payload: FormFilter\n}\n\ntype RemoveNewFilterAction = {\n type: 'removeNewFilter'\n}\n\ntype ClearAllFiltersAction = {\n type: 'clearAllFilters'\n}\n\ntype UpdateFilterAction = {\n type: 'updateFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n filter: FormFilter\n }\n}\n\ntype ChangeFilterAction = {\n type: 'changeFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n filter: FormFilter\n }\n}\n\ntype RemoveFilterAction = {\n type: 'removeFilter'\n payload: {\n groupIndex: number\n filterIndex: number\n }\n}\n\ntype Action =\n | AddNewFilterAction\n | UpdateFilterAction\n | ClearAllFiltersAction\n | ChangeNewFilterAction\n | OpenNewFilterInputAction\n | ChangeFilterAction\n | RemoveFilterAction\n | InitializeAction\n | RemoveNewFilterAction\n\nconst copyFilterGroups = (filterGroups: FilterGroup[]): FilterGroup[] => {\n return cloneDeep(filterGroups)\n}\n\nconst addFilter = (\n filter: FormFilter,\n filterGroups: FilterGroup[]\n): FilterGroup[] => {\n const copy = copyFilterGroups(filterGroups)\n const filterGroupIndex = copy.findIndex(\n (filterGroup) => filterGroup.field === filter.field\n )\n\n if (filterGroupIndex === -1) {\n copy.push({ field: filter.field, filters: [filter] })\n } else {\n copy[filterGroupIndex].filters.push(filter)\n }\n\n return copy\n}\n\nconst removeFilter = (\n groupIndex: number,\n filterIndex: number,\n filterGroups: FilterGroup[]\n): FilterGroup[] => {\n const copy = copyFilterGroups(filterGroups)\n copy[groupIndex].filters.splice(filterIndex, 1)\n\n return copy.filter((group) => group.filters.length > 0)\n}\n\nconst filterFormReducer = (state: FilterFormState, action: Action) => {\n switch (action.type) {\n case 'initialize': {\n const filterGroups = action.payload?.filters.reduce(\n (acc, filter) => {\n return addFilter(filter, acc)\n },\n [...state.filterGroups]\n )\n\n return {\n ...state,\n filterGroups: filterGroups ?? [],\n isNewFilterInputOpen: !filterGroups?.length,\n }\n }\n case 'openNewFilterInput': {\n return {\n ...state,\n isNewFilterInputOpen: true,\n }\n }\n case 'addNewFilter': {\n if (action.payload.errors && action.payload.errors.length > 0) {\n return state\n }\n\n const filterGroups = addFilter(action.payload, state.filterGroups)\n\n return {\n ...state,\n filterGroups,\n newFilter: undefined,\n isNewFilterInputOpen: false,\n }\n }\n case 'changeNewFilter': {\n return {\n ...state,\n newFilter: action.payload,\n }\n }\n case 'removeNewFilter': {\n const allFiltersRemoved = state.filterGroups.every(\n (group) => group.filters.length === 0\n )\n return {\n ...state,\n newFilter: undefined,\n isNewFilterInputOpen: allFiltersRemoved,\n }\n }\n case 'updateFilter': {\n const { groupIndex, filterIndex, filter } = action.payload\n let filterGroups = copyFilterGroups(state.filterGroups)\n const groupField = filterGroups[groupIndex].field\n\n if (groupField === filter.field) {\n filterGroups[groupIndex].filters[filterIndex] = filter\n } else {\n filterGroups = removeFilter(groupIndex, filterIndex, filterGroups)\n filterGroups = addFilter(filter, filterGroups)\n }\n\n return {\n ...state,\n filterGroups,\n }\n }\n case 'changeFilter': {\n const { groupIndex, filterIndex, filter } = action.payload\n const filterGroups = copyFilterGroups(state.filterGroups)\n const group = filterGroups[groupIndex]\n if (group) {\n group.filters[filterIndex] = filter\n }\n\n return {\n ...state,\n filterGroups,\n }\n }\n case 'removeFilter': {\n const { groupIndex, filterIndex } = action.payload\n\n const filterGroups = removeFilter(\n groupIndex,\n filterIndex,\n state.filterGroups\n )\n\n return {\n ...state,\n filterGroups,\n isNewFilterInputOpen:\n state.isNewFilterInputOpen || filterGroups.length === 0,\n }\n }\n case 'clearAllFilters': {\n return {\n ...state,\n filterGroups: [],\n isNewFilterInputOpen: true,\n }\n }\n default:\n return state\n }\n}\n\nexport const useFiltersForm = ({\n initialValues,\n}: UseFiltersFormInput): UseFiltersFormOutput => {\n const [{ filterGroups, newFilter, isNewFilterInputOpen }, dispatch] =\n useReducer(\n filterFormReducer,\n {\n filterGroups: [],\n newFilter: undefined,\n isNewFilterInputOpen: true,\n },\n (state) => {\n return filterFormReducer(state, {\n type: 'initialize',\n payload: initialValues,\n })\n }\n )\n\n const isValid =\n (filterGroups.length === 0 ||\n filterGroups.every((group) =>\n group.filters.every(\n (filter) => filter.errors && filter.errors.length === 0\n )\n )) &&\n (newFilter?.errors ? newFilter.errors.length === 0 : true)\n\n const isEmpty =\n filterGroups.length === 0 &&\n (newFilter ? isEmptyFormFilter(newFilter) : true)\n\n return {\n dispatch,\n filterGroups,\n newFilter,\n isNewFilterInputOpen,\n isValid,\n isEmpty,\n }\n}\n"],"mappings":";;;;AA4FA,IAAM,oBAAoB,iBAA+C;CACvE,OAAO,UAAU,YAAY;AAC/B;AAEA,IAAM,aACJ,QACA,iBACkB;CAClB,MAAM,OAAO,iBAAiB,YAAY;CAC1C,MAAM,mBAAmB,KAAK,WAC3B,gBAAgB,YAAY,UAAU,OAAO,KAChD;CAEA,IAAI,qBAAqB,IACvB,KAAK,KAAK;EAAE,OAAO,OAAO;EAAO,SAAS,CAAC,MAAM;CAAE,CAAC;MAEpD,KAAK,iBAAiB,CAAC,QAAQ,KAAK,MAAM;CAG5C,OAAO;AACT;AAEA,IAAM,gBACJ,YACA,aACA,iBACkB;CAClB,MAAM,OAAO,iBAAiB,YAAY;CAC1C,KAAK,WAAW,CAAC,QAAQ,OAAO,aAAa,CAAC;CAE9C,OAAO,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,CAAC;AACxD;AAEA,IAAM,qBAAqB,OAAwB,WAAmB;CACpE,QAAQ,OAAO,MAAf;EACE,KAAK,cAAc;GACjB,MAAM,eAAe,OAAO,SAAS,QAAQ,QAC1C,KAAK,WAAW;IACf,OAAO,UAAU,QAAQ,GAAG;GAC9B,GACA,CAAC,GAAG,MAAM,YAAY,CACxB;GAEA,OAAO;IACL,GAAG;IACH,cAAc,gBAAgB,CAAC;IAC/B,sBAAsB,CAAC,cAAc;GACvC;EACF;EACA,KAAK,sBACH,OAAO;GACL,GAAG;GACH,sBAAsB;EACxB;EAEF,KAAK,gBAAgB;GACnB,IAAI,OAAO,QAAQ,UAAU,OAAO,QAAQ,OAAO,SAAS,GAC1D,OAAO;GAGT,MAAM,eAAe,UAAU,OAAO,SAAS,MAAM,YAAY;GAEjE,OAAO;IACL,GAAG;IACH;IACA,WAAW,KAAA;IACX,sBAAsB;GACxB;EACF;EACA,KAAK,mBACH,OAAO;GACL,GAAG;GACH,WAAW,OAAO;EACpB;EAEF,KAAK,mBAAmB;GACtB,MAAM,oBAAoB,MAAM,aAAa,OAC1C,UAAU,MAAM,QAAQ,WAAW,CACtC;GACA,OAAO;IACL,GAAG;IACH,WAAW,KAAA;IACX,sBAAsB;GACxB;EACF;EACA,KAAK,gBAAgB;GACnB,MAAM,EAAE,YAAY,aAAa,WAAW,OAAO;GACnD,IAAI,eAAe,iBAAiB,MAAM,YAAY;GAGtD,IAFmB,aAAa,WAAW,CAAC,UAEzB,OAAO,OACxB,aAAa,WAAW,CAAC,QAAQ,eAAe;QAC3C;IACL,eAAe,aAAa,YAAY,aAAa,YAAY;IACjE,eAAe,UAAU,QAAQ,YAAY;GAC/C;GAEA,OAAO;IACL,GAAG;IACH;GACF;EACF;EACA,KAAK,gBAAgB;GACnB,MAAM,EAAE,YAAY,aAAa,WAAW,OAAO;GACnD,MAAM,eAAe,iBAAiB,MAAM,YAAY;GACxD,MAAM,QAAQ,aAAa;GAC3B,IAAI,OACF,MAAM,QAAQ,eAAe;GAG/B,OAAO;IACL,GAAG;IACH;GACF;EACF;EACA,KAAK,gBAAgB;GACnB,MAAM,EAAE,YAAY,gBAAgB,OAAO;GAE3C,MAAM,eAAe,aACnB,YACA,aACA,MAAM,YACR;GAEA,OAAO;IACL,GAAG;IACH;IACA,sBACE,MAAM,wBAAwB,aAAa,WAAW;GAC1D;EACF;EACA,KAAK,mBACH,OAAO;GACL,GAAG;GACH,cAAc,CAAC;GACf,sBAAsB;EACxB;EAEF,SACE,OAAO;CACX;AACF;AAEA,IAAa,kBAAkB,EAC7B,oBAC+C;CAC/C,MAAM,CAAC,EAAE,cAAc,WAAW,wBAAwB,YACxD,WACE,mBACA;EACE,cAAc,CAAC;EACf,WAAW,KAAA;EACX,sBAAsB;CACxB,IACC,UAAU;EACT,OAAO,kBAAkB,OAAO;GAC9B,MAAM;GACN,SAAS;EACX,CAAC;CACH,CACF;CAeF,OAAO;EACL;EACA;EACA;EACA;EACA,UAjBC,aAAa,WAAW,KACvB,aAAa,OAAO,UAClB,MAAM,QAAQ,OACX,WAAW,OAAO,UAAU,OAAO,OAAO,WAAW,CACxD,CACF,OACD,WAAW,SAAS,UAAU,OAAO,WAAW,IAAI;EAYrD,SATA,aAAa,WAAW,MACvB,YAAY,kBAAkB,SAAS,IAAI;CAS9C;AACF"}
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const antd = require("antd");
|
|
5
|
-
const formik = require("formik");
|
|
6
|
-
const FormItem = require("./FormItem.cjs");
|
|
1
|
+
const require_FormItem = require("./FormItem.cjs");
|
|
7
2
|
;/* empty css */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
let antd = require("antd");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let formik = require("formik");
|
|
6
|
+
//#region src/components/form/Form.tsx
|
|
7
|
+
var Form = ({ children, onFinish, onReset, ...props }) => {
|
|
8
|
+
const { handleSubmit, handleReset } = (0, formik.useFormikContext)();
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Form, {
|
|
10
|
+
...props,
|
|
11
|
+
onFinish: (values) => {
|
|
12
|
+
handleSubmit();
|
|
13
|
+
onFinish?.(values);
|
|
14
|
+
},
|
|
15
|
+
onReset: (event) => {
|
|
16
|
+
handleReset(event);
|
|
17
|
+
onReset?.(event);
|
|
18
|
+
},
|
|
19
|
+
children
|
|
20
|
+
});
|
|
25
21
|
};
|
|
26
|
-
Form.Item =
|
|
22
|
+
Form.Item = require_FormItem.FormItem;
|
|
23
|
+
//#endregion
|
|
27
24
|
exports.Form = Form;
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Form.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.cjs","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"
|
|
1
|
+
{"version":3,"file":"Form.cjs","names":["useFormikContext","AntdForm","FormItem"],"sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"mappings":";;;;;;AAQA,IAAa,QAAQ,EAAE,UAAU,UAAU,SAAS,GAAG,YAAmB;CACxE,MAAM,EAAE,cAAc,iBAAA,GAAgBA,OAAAA,iBAAAA,CAAiB;CACvD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,KAAAA,MAAD;EACE,GAAI;EACJ,WAAW,WAAW;GACpB,aAAa;GACb,WAAW,MAAM;EACnB;EACA,UAAU,UAAU;GAClB,YAAY,KAAK;GACjB,UAAU,KAAK;EACjB;EAEC;CACO,CAAA;AAEd;AAEA,KAAK,OAAOC,iBAAAA"}
|
|
@@ -4,11 +4,11 @@ type Props = Expand<Omit<FormProps, 'children'> & {
|
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const Form: {
|
|
7
|
-
({ children, onFinish, onReset, ...props }: Props): import(
|
|
7
|
+
({ children, onFinish, onReset, ...props }: Props): import('react').JSX.Element;
|
|
8
8
|
Item: ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched, ...props }: Omit<import('antd').FormItemProps<any>, "children" | "name"> & Pick<import('./FormikField.js').FormikFieldProps, "name" | "validate"> & {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
showValidateSuccess?: boolean;
|
|
11
11
|
showInitialErrorAfterTouched?: boolean;
|
|
12
|
-
}) => import(
|
|
12
|
+
}) => import('react').JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Form as Form$1 } from "antd";
|
|
3
|
-
import { useFormikContext } from "formik";
|
|
4
1
|
import { FormItem } from "./FormItem.js";
|
|
5
2
|
/* empty css */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
Form.Item = FormItem;
|
|
25
|
-
export {
|
|
26
|
-
Form
|
|
3
|
+
import { Form } from "antd";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useFormikContext } from "formik";
|
|
6
|
+
//#region src/components/form/Form.tsx
|
|
7
|
+
var Form$1 = ({ children, onFinish, onReset, ...props }) => {
|
|
8
|
+
const { handleSubmit, handleReset } = useFormikContext();
|
|
9
|
+
return /* @__PURE__ */ jsx(Form, {
|
|
10
|
+
...props,
|
|
11
|
+
onFinish: (values) => {
|
|
12
|
+
handleSubmit();
|
|
13
|
+
onFinish?.(values);
|
|
14
|
+
},
|
|
15
|
+
onReset: (event) => {
|
|
16
|
+
handleReset(event);
|
|
17
|
+
onReset?.(event);
|
|
18
|
+
},
|
|
19
|
+
children
|
|
20
|
+
});
|
|
27
21
|
};
|
|
28
|
-
|
|
22
|
+
Form$1.Item = FormItem;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Form$1 as Form };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"
|
|
1
|
+
{"version":3,"file":"Form.js","names":["Form","AntdForm"],"sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"mappings":";;;;;;AAQA,IAAaA,UAAQ,EAAE,UAAU,UAAU,SAAS,GAAG,YAAmB;CACxE,MAAM,EAAE,cAAc,gBAAgB,iBAAiB;CACvD,OACE,oBAACC,MAAD;EACE,GAAI;EACJ,WAAW,WAAW;GACpB,aAAa;GACb,WAAW,MAAM;EACnB;EACA,UAAU,UAAU;GAClB,YAAY,KAAK;GACjB,UAAU,KAAK;EACjB;EAEC;CACO,CAAA;AAEd;AAEA,OAAK,OAAO"}
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
showInitialError && /* @__PURE__ */ jsxRuntime.jsx("li", { children: initialError })
|
|
34
|
-
] }) : null,
|
|
35
|
-
...props,
|
|
36
|
-
children
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
return validate ? /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, children: (fieldProps) => /* @__PURE__ */ jsxRuntime.jsx(FormItemFieldContext.FormItemFieldContext.Provider, { value: fieldProps, children: item }) }) : item;
|
|
1
|
+
const require_FormItemFieldContext = require("./FormItemFieldContext.cjs");
|
|
2
|
+
const require_FormikField = require("./FormikField.cjs");
|
|
3
|
+
let antd = require("antd");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let formik = require("formik");
|
|
6
|
+
//#region src/components/form/FormItem.tsx
|
|
7
|
+
var FormItem = ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched = false, ...props }) => {
|
|
8
|
+
const form = (0, formik.useFormikContext)();
|
|
9
|
+
const error = (0, formik.getIn)(form.errors, name);
|
|
10
|
+
const initialError = (0, formik.getIn)(form.initialErrors, name);
|
|
11
|
+
const touched = (0, formik.getIn)(form.touched, name, false);
|
|
12
|
+
const isTouched = Array.isArray(touched) ? touched.length === 0 || touched.some(Boolean) : touched;
|
|
13
|
+
const hasError = error !== void 0 && isTouched;
|
|
14
|
+
const showInitialError = initialError !== void 0 && (!isTouched || showInitialErrorAfterTouched);
|
|
15
|
+
const isValid = !error && isTouched;
|
|
16
|
+
const item = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Form.Item, {
|
|
17
|
+
htmlFor: name,
|
|
18
|
+
id: name,
|
|
19
|
+
validateStatus: hasError || initialError !== void 0 && !isTouched ? "error" : isValid && showValidateSuccess ? "success" : void 0,
|
|
20
|
+
hasFeedback: isValid,
|
|
21
|
+
help: hasError || showInitialError ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [hasError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: error }), showInitialError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: initialError })] }) : null,
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
return validate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormikField.FormikField, {
|
|
26
|
+
name,
|
|
27
|
+
validate,
|
|
28
|
+
children: (fieldProps) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormItemFieldContext.FormItemFieldContext.Provider, {
|
|
29
|
+
value: fieldProps,
|
|
30
|
+
children: item
|
|
31
|
+
})
|
|
32
|
+
}) : item;
|
|
40
33
|
};
|
|
34
|
+
//#endregion
|
|
41
35
|
exports.FormItem = FormItem;
|
|
42
|
-
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=FormItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItem.cjs","sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"
|
|
1
|
+
{"version":3,"file":"FormItem.cjs","names":["useFormikContext","getIn","AntdForm","_Fragment","FormikField","FormItemFieldContext"],"sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"mappings":";;;;;;AAaA,IAAa,YAAY,EACvB,MACA,UACA,UACA,qBACA,+BAA+B,OAC/B,GAAG,YACQ;CACX,MAAM,QAAA,GAAOA,OAAAA,iBAAAA,CAAiB;CAC9B,MAAM,SAAA,GAAQC,OAAAA,MAAAA,CAAM,KAAK,QAAQ,IAAI;CACrC,MAAM,gBAAA,GAAeA,OAAAA,MAAAA,CAAM,KAAK,eAAe,IAAI;CACnD,MAAM,WAAA,GAAUA,OAAAA,MAAAA,CAAM,KAAK,SAAS,MAAM,KAAK;CAC/C,MAAM,YAAY,MAAM,QAAQ,OAAO,IACnC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C;CACJ,MAAM,WAAW,UAAU,KAAA,KAAa;CACxC,MAAM,mBACJ,iBAAiB,KAAA,MAAc,CAAC,aAAa;CAC/C,MAAM,UAAU,CAAC,SAAS;CAE1B,MAAM,OACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,KAAAA,KAAS,MAAV;EACE,SAAS;EACT,IAAI;EACJ,gBACE,YAAa,iBAAiB,KAAA,KAAa,CAAC,YACxC,UACA,WAAW,sBACT,YACA,KAAA;EAER,aAAa;EACb,MACE,YAAY,mBACV,iBAAA,GAAA,kBAAA,KAAA,CAAAC,kBAAAA,UAAA,EAAA,UAAA,CACG,YAAY,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,EAAA,UAAK,MAAU,CAAA,GAC3B,oBAAoB,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,EAAA,UAAK,aAAiB,CAAA,CAC3C,EAAA,CAAA,IACA;EAEN,GAAI;EAGH;CACY,CAAA;CAIjB,OAAO,WACL,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;EAAmB;EAAgB;EAC/B,WAAA,eACA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,qBAAqB,UAAtB;GAA+B,OAAO;GACnC,UAAA;EAC4B,CAAA;CAEtB,CAAA,IAEb;AAEJ"}
|
|
@@ -6,5 +6,5 @@ type Props = Omit<AntdFormItemProps, 'name' | 'children'> & Pick<FormikFieldProp
|
|
|
6
6
|
showValidateSuccess?: boolean;
|
|
7
7
|
showInitialErrorAfterTouched?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const FormItem: ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched, ...props }: Props) => import(
|
|
9
|
+
export declare const FormItem: ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched, ...props }: Props) => import('react').JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Form } from "antd";
|
|
3
|
-
import { useFormikContext, getIn } from "formik";
|
|
4
|
-
import { FormikField } from "./FormikField.js";
|
|
5
1
|
import { FormItemFieldContext } from "./FormItemFieldContext.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return validate ? /* @__PURE__ */ jsx(FormikField, { name, validate, children: (fieldProps) => /* @__PURE__ */ jsx(FormItemFieldContext.Provider, { value: fieldProps, children: item }) }) : item;
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
FormItem
|
|
2
|
+
import { FormikField } from "./FormikField.js";
|
|
3
|
+
import { Form } from "antd";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { getIn, useFormikContext } from "formik";
|
|
6
|
+
//#region src/components/form/FormItem.tsx
|
|
7
|
+
var FormItem = ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched = false, ...props }) => {
|
|
8
|
+
const form = useFormikContext();
|
|
9
|
+
const error = getIn(form.errors, name);
|
|
10
|
+
const initialError = getIn(form.initialErrors, name);
|
|
11
|
+
const touched = getIn(form.touched, name, false);
|
|
12
|
+
const isTouched = Array.isArray(touched) ? touched.length === 0 || touched.some(Boolean) : touched;
|
|
13
|
+
const hasError = error !== void 0 && isTouched;
|
|
14
|
+
const showInitialError = initialError !== void 0 && (!isTouched || showInitialErrorAfterTouched);
|
|
15
|
+
const isValid = !error && isTouched;
|
|
16
|
+
const item = /* @__PURE__ */ jsx(Form.Item, {
|
|
17
|
+
htmlFor: name,
|
|
18
|
+
id: name,
|
|
19
|
+
validateStatus: hasError || initialError !== void 0 && !isTouched ? "error" : isValid && showValidateSuccess ? "success" : void 0,
|
|
20
|
+
hasFeedback: isValid,
|
|
21
|
+
help: hasError || showInitialError ? /* @__PURE__ */ jsxs(Fragment, { children: [hasError && /* @__PURE__ */ jsx("li", { children: error }), showInitialError && /* @__PURE__ */ jsx("li", { children: initialError })] }) : null,
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
return validate ? /* @__PURE__ */ jsx(FormikField, {
|
|
26
|
+
name,
|
|
27
|
+
validate,
|
|
28
|
+
children: (fieldProps) => /* @__PURE__ */ jsx(FormItemFieldContext.Provider, {
|
|
29
|
+
value: fieldProps,
|
|
30
|
+
children: item
|
|
31
|
+
})
|
|
32
|
+
}) : item;
|
|
41
33
|
};
|
|
42
|
-
//#
|
|
34
|
+
//#endregion
|
|
35
|
+
export { FormItem };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=FormItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItem.js","sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"
|
|
1
|
+
{"version":3,"file":"FormItem.js","names":["AntdForm","_Fragment"],"sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"mappings":";;;;;;AAaA,IAAa,YAAY,EACvB,MACA,UACA,UACA,qBACA,+BAA+B,OAC/B,GAAG,YACQ;CACX,MAAM,OAAO,iBAAiB;CAC9B,MAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI;CACrC,MAAM,eAAe,MAAM,KAAK,eAAe,IAAI;CACnD,MAAM,UAAU,MAAM,KAAK,SAAS,MAAM,KAAK;CAC/C,MAAM,YAAY,MAAM,QAAQ,OAAO,IACnC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C;CACJ,MAAM,WAAW,UAAU,KAAA,KAAa;CACxC,MAAM,mBACJ,iBAAiB,KAAA,MAAc,CAAC,aAAa;CAC/C,MAAM,UAAU,CAAC,SAAS;CAE1B,MAAM,OACJ,oBAACA,KAAS,MAAV;EACE,SAAS;EACT,IAAI;EACJ,gBACE,YAAa,iBAAiB,KAAA,KAAa,CAAC,YACxC,UACA,WAAW,sBACT,YACA,KAAA;EAER,aAAa;EACb,MACE,YAAY,mBACV,qBAAAC,UAAA,EAAA,UAAA,CACG,YAAY,oBAAC,MAAD,EAAA,UAAK,MAAU,CAAA,GAC3B,oBAAoB,oBAAC,MAAD,EAAA,UAAK,aAAiB,CAAA,CAC3C,EAAA,CAAA,IACA;EAEN,GAAI;EAGH;CACY,CAAA;CAIjB,OAAO,WACL,oBAAC,aAAD;EAAmB;EAAgB;EAC/B,WAAA,eACA,oBAAC,qBAAqB,UAAtB;GAA+B,OAAO;GACnC,UAAA;EAC4B,CAAA;CAEtB,CAAA,IAEb;AAEJ"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const FormItemFieldContext = React.createContext(
|
|
5
|
-
void 0
|
|
6
|
-
);
|
|
1
|
+
//#region src/components/form/FormItemFieldContext.ts
|
|
2
|
+
var FormItemFieldContext = (0, require("react").createContext)(void 0);
|
|
3
|
+
//#endregion
|
|
7
4
|
exports.FormItemFieldContext = FormItemFieldContext;
|
|
8
|
-
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=FormItemFieldContext.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItemFieldContext.cjs","sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"
|
|
1
|
+
{"version":3,"file":"FormItemFieldContext.cjs","names":["createContext"],"sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"mappings":";AAKA,IAAa,wBAAA,kBAAuBA,CAAAA,CAAAA,cAAAA,CAClC,KAAA,CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createContext } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=FormItemFieldContext.js.map
|
|
2
|
+
//#region src/components/form/FormItemFieldContext.ts
|
|
3
|
+
var FormItemFieldContext = createContext(void 0);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { FormItemFieldContext };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=FormItemFieldContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItemFieldContext.js","sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"
|
|
1
|
+
{"version":3,"file":"FormItemFieldContext.js","names":[],"sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"mappings":";;AAKA,IAAa,uBAAuB,cAClC,KAAA,CACF"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if ((itemField == null ? void 0 : itemField.field.name) === props.name) {
|
|
14
|
-
return children(itemField);
|
|
15
|
-
}
|
|
16
|
-
const Component = fast ? formik.FastField : formik.Field;
|
|
17
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, children });
|
|
1
|
+
const require_FormItemFieldContext = require("./FormItemFieldContext.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let formik = require("formik");
|
|
5
|
+
//#region src/components/form/FormikField.tsx
|
|
6
|
+
var FormikField = ({ fast, children, ...props }) => {
|
|
7
|
+
const itemField = (0, react.useContext)(require_FormItemFieldContext.FormItemFieldContext);
|
|
8
|
+
if (itemField?.field.name === props.name) return children(itemField);
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(fast ? formik.FastField : formik.Field, {
|
|
10
|
+
...props,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
18
13
|
};
|
|
14
|
+
//#endregion
|
|
19
15
|
exports.FormikField = FormikField;
|
|
20
|
-
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=FormikField.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikField.cjs","sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"
|
|
1
|
+
{"version":3,"file":"FormikField.cjs","names":["useContext","FormItemFieldContext","FastField","Field"],"sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"mappings":";;;;;AAQA,IAAa,eAAe,EAC1B,MACA,UACA,GAAG,YACoE;CACvE,MAAM,aAAA,GAAYA,MAAAA,WAAAA,CAAWC,6BAAAA,oBAAoB;CACjD,IAAI,WAAW,MAAM,SAAS,MAAM,MAClC,OAAO,SAAS,SAAS;CAG3B,OAAO,iBAAA,GAAA,kBAAA,IAAA,CADW,OAAOC,OAAAA,YAAYC,OAAAA,OAC9B;EAAW,GAAI;EAAQ;CAAoB,CAAA;AACpD"}
|
|
@@ -5,4 +5,4 @@ export type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const FormikField: ({ fast, children, ...props }: FormikFieldProps & {
|
|
7
7
|
children: (props: FieldProps) => ReactNode;
|
|
8
|
-
}) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import(
|
|
8
|
+
}) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
+
import { FormItemFieldContext } from "./FormItemFieldContext.js";
|
|
2
|
+
import { useContext } from "react";
|
|
1
3
|
import { jsx } from "react/jsx-runtime";
|
|
2
4
|
import { FastField, Field } from "formik";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if ((itemField == null ? void 0 : itemField.field.name) === props.name) {
|
|
12
|
-
return children(itemField);
|
|
13
|
-
}
|
|
14
|
-
const Component = fast ? FastField : Field;
|
|
15
|
-
return /* @__PURE__ */ jsx(Component, { ...props, children });
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
FormikField
|
|
5
|
+
//#region src/components/form/FormikField.tsx
|
|
6
|
+
var FormikField = ({ fast, children, ...props }) => {
|
|
7
|
+
const itemField = useContext(FormItemFieldContext);
|
|
8
|
+
if (itemField?.field.name === props.name) return children(itemField);
|
|
9
|
+
return /* @__PURE__ */ jsx(fast ? FastField : Field, {
|
|
10
|
+
...props,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
19
13
|
};
|
|
20
|
-
//#
|
|
14
|
+
//#endregion
|
|
15
|
+
export { FormikField };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=FormikField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikField.js","sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"
|
|
1
|
+
{"version":3,"file":"FormikField.js","names":[],"sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"mappings":";;;;;AAQA,IAAa,eAAe,EAC1B,MACA,UACA,GAAG,YACoE;CACvE,MAAM,YAAY,WAAW,oBAAoB;CACjD,IAAI,WAAW,MAAM,SAAS,MAAM,MAClC,OAAO,SAAS,SAAS;CAG3B,OAAO,oBADW,OAAO,YAAY,OAC9B;EAAW,GAAI;EAAQ;CAAoB,CAAA;AACpD"}
|