@orbe-agro/client-core 5.3.85 → 5.3.89
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/@ecme/assets/styles/app.css +1 -1
- package/dist/@ecme/assets/styles/components/_dialog.css +1 -1
- package/dist/@ecme/assets/styles/components/_drawer.css +1 -1
- package/dist/@ecme/assets/styles/components/_scrollbar.css +1 -1
- package/dist/@ecme/assets/styles/components/_switcher.css +1 -1
- package/dist/@ecme/assets/styles/components/_upload.css +1 -1
- package/dist/@ecme/assets/styles/components/index.css +1 -1
- package/dist/@ecme/assets/styles/tailwind/index.css +1 -1
- package/dist/@ecme/auth/AuthProvider.js +58 -62
- package/dist/@ecme/auth/AuthProvider.js.map +1 -1
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js +18 -19
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +29 -30
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js +56 -56
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js.map +1 -1
- package/dist/@ecme/components/shared/Affix.js +9 -10
- package/dist/@ecme/components/shared/Affix.js.map +1 -1
- package/dist/@ecme/components/shared/AutoComplete.js +27 -28
- package/dist/@ecme/components/shared/AutoComplete.js.map +1 -1
- package/dist/@ecme/components/shared/CalendarView.js +19 -20
- package/dist/@ecme/components/shared/CalendarView.js.map +1 -1
- package/dist/@ecme/components/shared/ConfirmDialog.js +16 -16
- package/dist/@ecme/components/shared/ConfirmDialog.js.map +1 -1
- package/dist/@ecme/components/shared/DataTable.js +151 -151
- package/dist/@ecme/components/shared/DataTable.js.map +1 -1
- package/dist/@ecme/components/shared/DebounceInput.js +11 -12
- package/dist/@ecme/components/shared/DebounceInput.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js +20 -20
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js +22 -22
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js.map +1 -1
- package/dist/@ecme/components/shared/ImageGallery.js +18 -18
- package/dist/@ecme/components/shared/ImageGallery.js.map +1 -1
- package/dist/@ecme/components/shared/Masonry/Masonry.js +25 -25
- package/dist/@ecme/components/shared/Masonry/Masonry.js.map +1 -1
- package/dist/@ecme/components/shared/OtpInput.js +54 -56
- package/dist/@ecme/components/shared/OtpInput.js.map +1 -1
- package/dist/@ecme/components/shared/PasswordInput.js +6 -6
- package/dist/@ecme/components/shared/PasswordInput.js.map +1 -1
- package/dist/@ecme/components/shared/RegionMap.js +9 -9
- package/dist/@ecme/components/shared/RegionMap.js.map +1 -1
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js +47 -47
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/@ecme/components/shared/UsersAvatarGroup.js +24 -24
- package/dist/@ecme/components/shared/UsersAvatarGroup.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js +63 -69
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js +48 -48
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js +220 -231
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js.map +1 -1
- package/dist/@ecme/components/template/LanguageSelector.js +10 -13
- package/dist/@ecme/components/template/LanguageSelector.js.map +1 -1
- package/dist/@ecme/components/template/Search.js +85 -92
- package/dist/@ecme/components/template/Search.js.map +1 -1
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js +18 -18
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js +17 -17
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js +59 -59
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +34 -34
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
- package/dist/@ecme/components/ui/Alert/Alert.js +29 -29
- package/dist/@ecme/components/ui/Alert/Alert.js.map +1 -1
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js +30 -30
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Button/Button.js +66 -67
- package/dist/@ecme/components/ui/Button/Button.js.map +1 -1
- package/dist/@ecme/components/ui/Card/Card.js +39 -40
- package/dist/@ecme/components/ui/Card/Card.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js +42 -42
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Group.js +27 -27
- package/dist/@ecme/components/ui/Checkbox/Group.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/Calendar.js +18 -18
- package/dist/@ecme/components/ui/DatePicker/Calendar.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js +77 -78
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js +67 -71
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js +94 -98
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js +51 -58
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js +12 -12
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js.map +1 -1
- package/dist/@ecme/components/ui/Dialog/Dialog.js +25 -25
- package/dist/@ecme/components/ui/Dialog/Dialog.js.map +1 -1
- package/dist/@ecme/components/ui/Drawer/Drawer.js +32 -32
- package/dist/@ecme/components/ui/Drawer/Drawer.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js +58 -58
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js +99 -100
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js +26 -26
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormContainer.js +17 -17
- package/dist/@ecme/components/ui/Form/FormContainer.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormItem.js +38 -38
- package/dist/@ecme/components/ui/Form/FormItem.js.map +1 -1
- package/dist/@ecme/components/ui/Input/Input.js +50 -52
- package/dist/@ecme/components/ui/Input/Input.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/Addon.js +12 -13
- package/dist/@ecme/components/ui/InputGroup/Addon.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js +10 -11
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Notification/Notification.js +19 -19
- package/dist/@ecme/components/ui/Notification/Notification.js.map +1 -1
- package/dist/@ecme/components/ui/Pagination/Pagination.js +45 -45
- package/dist/@ecme/components/ui/Pagination/Pagination.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Group.js +28 -28
- package/dist/@ecme/components/ui/Radio/Group.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Radio.js +42 -42
- package/dist/@ecme/components/ui/Radio/Radio.js.map +1 -1
- package/dist/@ecme/components/ui/Segment/SegmentItem.js +53 -53
- package/dist/@ecme/components/ui/Segment/SegmentItem.js.map +1 -1
- package/dist/@ecme/components/ui/Select/Select.js +40 -41
- package/dist/@ecme/components/ui/Select/Select.js.map +1 -1
- package/dist/@ecme/components/ui/Steps/StepItem.js +33 -33
- package/dist/@ecme/components/ui/Steps/StepItem.js.map +1 -1
- package/dist/@ecme/components/ui/Switcher/Switcher.js +24 -24
- package/dist/@ecme/components/ui/Switcher/Switcher.js.map +1 -1
- package/dist/@ecme/components/ui/Tabs/TabNav.js +22 -22
- package/dist/@ecme/components/ui/Tabs/TabNav.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js +25 -27
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js +130 -135
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js +22 -24
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js +65 -68
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js +11 -12
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js +19 -20
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js.map +1 -1
- package/dist/@ecme/components/ui/Upload/Upload.js +67 -68
- package/dist/@ecme/components/ui/Upload/Upload.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js +7 -10
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useRootClose.js +32 -32
- package/dist/@ecme/components/ui/hooks/useRootClose.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useTimeout.js +12 -13
- package/dist/@ecme/components/ui/hooks/useTimeout.js.map +1 -1
- package/dist/@ecme/components/ui/toast/ToastWrapper.js +58 -61
- package/dist/@ecme/components/ui/toast/ToastWrapper.js.map +1 -1
- package/dist/@ecme/components/ui/toast/toast.js +16 -19
- package/dist/@ecme/components/ui/toast/toast.js.map +1 -1
- package/dist/@ecme/components/view/Activity/ActivityEvent.js +63 -67
- package/dist/@ecme/components/view/Activity/ActivityEvent.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js +8 -9
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +37 -39
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Message.js +10 -10
- package/dist/@ecme/components/view/ChatBox/components/Message.js.map +1 -1
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js +36 -37
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js.map +1 -1
- package/dist/@ecme/components/view/TaskItem/TaskItem.js +33 -33
- package/dist/@ecme/components/view/TaskItem/TaskItem.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js +16 -18
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js +7 -8
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js.map +1 -1
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js +11 -11
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js.map +1 -1
- package/dist/@ecme/utils/hooks/useMenuActive.js +11 -12
- package/dist/@ecme/utils/hooks/useMenuActive.js.map +1 -1
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js +36 -37
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js +14 -14
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js +41 -42
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js.map +1 -1
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js +59 -60
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js +27 -27
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js +57 -58
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js +37 -38
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js +44 -45
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js +5 -5
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js +34 -35
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js +26 -26
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js +28 -29
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js +8 -8
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js +10 -11
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js +48 -49
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js +14 -14
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js +102 -103
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js +34 -35
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js +16 -16
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js +76 -78
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js +23 -23
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js +48 -49
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js +34 -35
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js +11 -14
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js +19 -19
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +22 -26
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js +18 -24
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js +22 -22
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js +38 -39
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js +68 -69
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js +63 -66
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js +21 -22
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js +84 -85
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js +19 -19
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js +51 -58
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js +76 -89
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js +104 -107
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js +22 -22
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js +38 -39
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js +20 -20
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js.map +1 -1
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js +32 -33
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js +17 -18
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js +5 -5
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js +12 -13
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js +28 -29
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js +63 -67
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js +8 -8
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js +36 -37
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js +134 -137
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js +35 -35
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js +38 -38
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js +108 -111
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js +44 -45
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js +211 -214
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js +15 -15
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js +4 -4
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js +97 -100
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js +68 -71
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js +85 -86
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js +121 -124
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js +11 -11
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js +101 -105
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js +57 -58
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js +51 -52
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js +22 -23
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js +45 -46
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js +62 -65
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js +52 -53
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js +23 -25
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js +15 -15
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js +16 -16
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js +9 -9
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js +40 -41
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js +33 -34
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js +33 -33
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js +203 -210
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js +53 -56
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js +80 -83
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js.map +1 -1
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js +6 -6
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js +21 -21
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js.map +1 -1
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js +59 -60
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js +76 -77
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js +30 -30
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js +21 -22
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js +15 -15
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js +17 -18
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js +12 -12
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js +28 -29
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js +21 -22
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js +24 -25
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js +75 -79
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js +19 -20
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js +90 -91
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js +22 -23
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js.map +1 -1
- package/dist/@types/base/configs/api.config.d.ts +0 -19
- package/dist/@types/base/configs/api.config.d.ts.map +1 -1
- package/dist/base/assets/styles/init.css +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js +24 -25
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js +23 -24
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js +30 -31
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js +25 -26
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js +49 -50
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js +23 -24
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js +29 -30
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js.map +1 -1
- package/dist/base/components/shared/TransferirProcessoDialog.js +10 -10
- package/dist/base/components/shared/TransferirProcessoDialog.js.map +1 -1
- package/dist/base/components/tools/NavFilter.js +68 -75
- package/dist/base/components/tools/NavFilter.js.map +1 -1
- package/dist/base/configs/api.config.js +11 -14
- package/dist/base/configs/api.config.js.map +1 -1
- package/dist/base/hooks/adm/roles/useRolesList.js +11 -11
- package/dist/base/hooks/adm/roles/useRolesList.js.map +1 -1
- package/dist/base/hooks/adm/users/useUsersList.js +10 -10
- package/dist/base/hooks/adm/users/useUsersList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js +5 -5
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js +7 -7
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js +10 -10
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js +13 -13
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroList.js +6 -6
- package/dist/base/hooks/dm/centro/useCentroList.js.map +1 -1
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js +4 -4
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js +9 -9
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoList.js +5 -5
- package/dist/base/hooks/dm/deposito/useDepositoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js +13 -13
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js +8 -8
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js +6 -6
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js +7 -7
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js +10 -10
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js +11 -11
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js +9 -9
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js +17 -18
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js +13 -13
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js +21 -21
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindList.js +8 -8
- package/dist/base/hooks/dm/produto/useProdutoFindList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js +11 -11
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js +9 -9
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js.map +1 -1
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js +5 -5
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js.map +1 -1
- package/dist/base/hooks/useList.js +10 -10
- package/dist/base/hooks/useList.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js +15 -15
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js +7 -7
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js.map +1 -1
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js +5 -5
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js.map +1 -1
- package/dist/base/utils/functions/stringUtils.js +14 -15
- package/dist/base/utils/functions/stringUtils.js.map +1 -1
- package/lib/base/configs/api.config.ts +6 -7
- package/package.json +1 -1
- package/tsconfig.json +6 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { FormContextProvider as l, FormContextConsumer as c } from "./context.js";
|
|
3
3
|
import "../ConfigProvider/index.js";
|
|
4
4
|
import u from "classnames";
|
|
5
5
|
import { LAYOUT as d, SIZES as f } from "../utils/constants.js";
|
|
6
6
|
import { useConfig as p } from "../ConfigProvider/ConfigProvider.js";
|
|
7
|
-
const C = (
|
|
8
|
-
const { controlSize:
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
11
|
-
labelWidth:
|
|
12
|
-
layout:
|
|
13
|
-
size:
|
|
14
|
-
} =
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
labelWidth:
|
|
17
|
-
layout:
|
|
18
|
-
size:
|
|
19
|
-
}, children: /* @__PURE__ */
|
|
7
|
+
const C = (r) => {
|
|
8
|
+
const { controlSize: t } = p(), {
|
|
9
|
+
children: e,
|
|
10
|
+
className: n,
|
|
11
|
+
labelWidth: m = 100,
|
|
12
|
+
layout: i = d.VERTICAL,
|
|
13
|
+
size: a = f.MD
|
|
14
|
+
} = r;
|
|
15
|
+
return /* @__PURE__ */ o(l, { value: {
|
|
16
|
+
labelWidth: m,
|
|
17
|
+
layout: i,
|
|
18
|
+
size: a || t
|
|
19
|
+
}, children: /* @__PURE__ */ o(c, { children: (s) => /* @__PURE__ */ o(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
className: u(
|
|
23
23
|
"form-container",
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
s?.layout,
|
|
25
|
+
n
|
|
26
26
|
),
|
|
27
|
-
children:
|
|
27
|
+
children: e
|
|
28
28
|
}
|
|
29
29
|
) }) });
|
|
30
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormContainer.js","sources":["../../../../../lib/@ecme/components/ui/Form/FormContainer.tsx"],"sourcesContent":["import { FormContextProvider, FormContextConsumer } from './context'\nimport { useConfig } from '../ConfigProvider'\nimport classNames from 'classnames'\nimport { SIZES, LAYOUT } from '../utils/constants'\nimport type { FormContextProps } from './context'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\n\nexport interface FormContainerProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n layout?: TypeAttributes.FormLayout\n labelWidth?: string | number\n}\n\nconst FormContainer = (props: FormContainerProps) => {\n const { controlSize } = useConfig()\n\n const {\n children,\n className,\n labelWidth = 100,\n layout = LAYOUT.VERTICAL,\n size = SIZES.MD,\n } = props\n\n const contextValue = {\n labelWidth,\n layout,\n size: size || controlSize,\n }\n\n return (\n <FormContextProvider value={contextValue as FormContextProps}>\n <FormContextConsumer>\n {(context) => {\n return (\n <div\n className={classNames(\n 'form-container',\n context?.layout,\n className,\n )}\n >\n {children}\n </div>\n )\n }}\n </FormContextConsumer>\n </FormContextProvider>\n )\n}\n\nFormContainer.displayName = 'FormContainer'\n\nexport default FormContainer\n"],"names":["FormContainer","props","controlSize","useConfig","children","className","labelWidth","layout","LAYOUT","size","SIZES","FormContextProvider","jsx","FormContextConsumer","context","classNames"],"mappings":";;;;;;AAaA,MAAMA,IAAgB,CAACC,MAA8B;AACjD,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB;AAAA,IACF,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC,IAASC,EAAO;AAAA,IAChB,MAAAC,IAAOC,EAAM;AAAA,EAAA,IACbT;AAQJ,2BACKU,GAAA,EAAoB,OAPJ;AAAA,IACjB,YAAAL;AAAA,IACA,QAAAC;AAAA,IACA,MAAME,KAAQP;AAAA,EAAA,GAKV,UAAA,gBAAAU,EAACC,GAAA,EACI,WAACC,MAEM,gBAAAF;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAWG;AAAA,QACP;AAAA,QACAD,
|
|
1
|
+
{"version":3,"file":"FormContainer.js","sources":["../../../../../lib/@ecme/components/ui/Form/FormContainer.tsx"],"sourcesContent":["import { FormContextProvider, FormContextConsumer } from './context'\nimport { useConfig } from '../ConfigProvider'\nimport classNames from 'classnames'\nimport { SIZES, LAYOUT } from '../utils/constants'\nimport type { FormContextProps } from './context'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\n\nexport interface FormContainerProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n layout?: TypeAttributes.FormLayout\n labelWidth?: string | number\n}\n\nconst FormContainer = (props: FormContainerProps) => {\n const { controlSize } = useConfig()\n\n const {\n children,\n className,\n labelWidth = 100,\n layout = LAYOUT.VERTICAL,\n size = SIZES.MD,\n } = props\n\n const contextValue = {\n labelWidth,\n layout,\n size: size || controlSize,\n }\n\n return (\n <FormContextProvider value={contextValue as FormContextProps}>\n <FormContextConsumer>\n {(context) => {\n return (\n <div\n className={classNames(\n 'form-container',\n context?.layout,\n className,\n )}\n >\n {children}\n </div>\n )\n }}\n </FormContextConsumer>\n </FormContextProvider>\n )\n}\n\nFormContainer.displayName = 'FormContainer'\n\nexport default FormContainer\n"],"names":["FormContainer","props","controlSize","useConfig","children","className","labelWidth","layout","LAYOUT","size","SIZES","FormContextProvider","jsx","FormContextConsumer","context","classNames"],"mappings":";;;;;;AAaA,MAAMA,IAAgB,CAACC,MAA8B;AACjD,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB;AAAA,IACF,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC,IAASC,EAAO;AAAA,IAChB,MAAAC,IAAOC,EAAM;AAAA,EAAA,IACbT;AAQJ,2BACKU,GAAA,EAAoB,OAPJ;AAAA,IACjB,YAAAL;AAAA,IACA,QAAAC;AAAA,IACA,MAAME,KAAQP;AAAA,EAAA,GAKV,UAAA,gBAAAU,EAACC,GAAA,EACI,WAACC,MAEM,gBAAAF;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAWG;AAAA,QACP;AAAA,QACAD,GAAS;AAAA,QACTT;AAAA,MAAA;AAAA,MAGH,UAAAD;AAAA,IAAA;AAAA,EAAA,GAIjB,EAAA,CACJ;AAER;AAEAJ,EAAc,cAAc;"}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { AnimatePresence as
|
|
4
|
-
import { useForm as
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import f from "../utils/classNames.js";
|
|
3
|
+
import { AnimatePresence as H, motion as W } from "framer-motion";
|
|
4
|
+
import { useForm as Z, FormItemContextProvider as $ } from "./context.js";
|
|
5
5
|
import "../ConfigProvider/index.js";
|
|
6
|
-
import { LAYOUT as
|
|
7
|
-
import { useConfig as
|
|
8
|
-
const Y = (
|
|
6
|
+
import { LAYOUT as l, CONTROL_SIZES as d } from "../utils/constants.js";
|
|
7
|
+
import { useConfig as j } from "../ConfigProvider/ConfigProvider.js";
|
|
8
|
+
const Y = (p) => {
|
|
9
9
|
const {
|
|
10
10
|
asterisk: u,
|
|
11
11
|
children: h,
|
|
12
12
|
className: y,
|
|
13
13
|
errorMessage: L,
|
|
14
|
-
extra:
|
|
14
|
+
extra: s,
|
|
15
15
|
htmlFor: b,
|
|
16
|
-
invalid:
|
|
16
|
+
invalid: o,
|
|
17
17
|
label: t,
|
|
18
18
|
labelClass: I,
|
|
19
19
|
labelWidth: N,
|
|
20
|
-
layout:
|
|
21
|
-
ref:
|
|
20
|
+
layout: x,
|
|
21
|
+
ref: v,
|
|
22
22
|
style: n,
|
|
23
|
-
size:
|
|
24
|
-
} =
|
|
25
|
-
switch (
|
|
26
|
-
case
|
|
27
|
-
return t ? `${
|
|
28
|
-
case
|
|
23
|
+
size: C
|
|
24
|
+
} = p, a = Z(), { controlSize: O } = j(), m = C || a?.size || O, T = N || a?.labelWidth, e = x || a?.layout || "vertical", S = () => {
|
|
25
|
+
switch (e) {
|
|
26
|
+
case l.HORIZONTAL:
|
|
27
|
+
return t ? `${d[m].h} ${t && "ltr:pr-2 rtl:pl-2"}` : "ltr:pr-2 rtl:pl-2";
|
|
28
|
+
case l.VERTICAL:
|
|
29
29
|
return "mb-2";
|
|
30
|
-
case
|
|
31
|
-
return `${
|
|
30
|
+
case l.INLINE:
|
|
31
|
+
return `${d[m].h} ${t && "ltr:pr-2 rtl:pl-2"}`;
|
|
32
32
|
default:
|
|
33
33
|
return "";
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, g = f(
|
|
36
36
|
"form-item",
|
|
37
|
-
|
|
37
|
+
e,
|
|
38
38
|
y,
|
|
39
|
-
|
|
40
|
-
),
|
|
39
|
+
o ? "invalid" : ""
|
|
40
|
+
), A = f(
|
|
41
41
|
"form-label",
|
|
42
|
-
t &&
|
|
42
|
+
t && S(),
|
|
43
43
|
I
|
|
44
|
-
),
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
44
|
+
), F = () => e === l.HORIZONTAL ? { ...n, minWidth: T } : { ...n }, R = { opacity: 1, marginTop: 3, bottom: -21 }, c = { opacity: 0, marginTop: -10 }, w = c;
|
|
45
|
+
return /* @__PURE__ */ r($, { value: { invalid: o }, children: /* @__PURE__ */ i("div", { ref: v, className: g, children: [
|
|
46
|
+
/* @__PURE__ */ i(
|
|
47
47
|
"label",
|
|
48
48
|
{
|
|
49
49
|
htmlFor: b,
|
|
50
|
-
className:
|
|
51
|
-
style:
|
|
50
|
+
className: A,
|
|
51
|
+
style: F(),
|
|
52
52
|
children: [
|
|
53
|
-
u && /* @__PURE__ */
|
|
53
|
+
u && /* @__PURE__ */ r("span", { className: "text-red-500 ltr:mr-1 rtl:ml-1", children: "*" }),
|
|
54
54
|
t,
|
|
55
|
-
|
|
56
|
-
t &&
|
|
55
|
+
s && /* @__PURE__ */ r("span", { children: s }),
|
|
56
|
+
t && e !== "vertical" && ":"
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ i(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
|
-
className:
|
|
63
|
+
className: e === l.HORIZONTAL ? "w-full flex flex-col justify-center relative" : "",
|
|
64
64
|
children: [
|
|
65
65
|
h,
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
66
|
+
/* @__PURE__ */ r(H, { mode: "wait", children: o && /* @__PURE__ */ r(
|
|
67
|
+
W.div,
|
|
68
68
|
{
|
|
69
69
|
className: "form-explain",
|
|
70
|
-
initial:
|
|
71
|
-
animate:
|
|
70
|
+
initial: w,
|
|
71
|
+
animate: R,
|
|
72
72
|
exit: c,
|
|
73
73
|
transition: { duration: 0.15, type: "tween" },
|
|
74
74
|
children: L
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItem.js","sources":["../../../../../lib/@ecme/components/ui/Form/FormItem.tsx"],"sourcesContent":["import classNames from '../utils/classNames'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { useForm, FormItemContextProvider } from './context'\nimport { useConfig } from '../ConfigProvider'\nimport { CONTROL_SIZES, LAYOUT } from '../utils/constants'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\nimport type { ReactNode, Ref } from 'react'\n\nexport interface FormItemProps extends CommonProps {\n asterisk?: boolean\n errorMessage?: string\n extra?: string | ReactNode\n htmlFor?: string\n invalid?: boolean\n label?: string\n labelClass?: string\n labelWidth?: string | number\n layout?: TypeAttributes.FormLayout\n ref?: Ref<HTMLDivElement>\n size?: TypeAttributes.ControlSize\n}\n\nconst FormItem = (props: FormItemProps) => {\n const {\n asterisk,\n children,\n className,\n errorMessage,\n extra,\n htmlFor,\n invalid,\n label,\n labelClass,\n labelWidth,\n layout,\n ref,\n style,\n size,\n } = props\n\n const formContext = useForm()\n const { controlSize } = useConfig()\n\n const formItemLabelHeight = size || formContext?.size || controlSize\n const formItemLabelWidth = labelWidth || formContext?.labelWidth\n const formItemLayout = layout || formContext?.layout || 'vertical'\n\n const getFormLabelLayoutClass = () => {\n switch (formItemLayout) {\n case LAYOUT.HORIZONTAL:\n return label\n ? `${CONTROL_SIZES[formItemLabelHeight].h} ${\n label && 'ltr:pr-2 rtl:pl-2'\n }`\n : 'ltr:pr-2 rtl:pl-2'\n case LAYOUT.VERTICAL:\n return `mb-2`\n case LAYOUT.INLINE:\n return `${CONTROL_SIZES[formItemLabelHeight].h} ${\n label && 'ltr:pr-2 rtl:pl-2'\n }`\n default:\n return ''\n }\n }\n\n const formItemClass = classNames(\n 'form-item',\n formItemLayout,\n className,\n invalid ? 'invalid' : '',\n )\n\n const formLabelClass = classNames(\n 'form-label',\n label && getFormLabelLayoutClass(),\n labelClass,\n )\n\n const formLabelStyle = () => {\n if (formItemLayout === LAYOUT.HORIZONTAL) {\n return { ...style, ...{ minWidth: formItemLabelWidth } }\n }\n\n return { ...style }\n }\n\n const enterStyle = { opacity: 1, marginTop: 3, bottom: -21 }\n const exitStyle = { opacity: 0, marginTop: -10 }\n const initialStyle = exitStyle\n\n return (\n <FormItemContextProvider value={{ invalid }}>\n <div ref={ref} className={formItemClass}>\n <label\n htmlFor={htmlFor}\n className={formLabelClass}\n style={formLabelStyle()}\n >\n {asterisk && (\n <span className=\"text-red-500 ltr:mr-1 rtl:ml-1\">\n *\n </span>\n )}\n {label}\n {extra && <span>{extra}</span>}\n {label && formItemLayout !== 'vertical' && ':'}\n </label>\n <div\n className={\n formItemLayout === LAYOUT.HORIZONTAL\n ? 'w-full flex flex-col justify-center relative'\n : ''\n }\n >\n {children}\n <AnimatePresence mode=\"wait\">\n {invalid && (\n <motion.div\n className=\"form-explain\"\n initial={initialStyle}\n animate={enterStyle}\n exit={exitStyle}\n transition={{ duration: 0.15, type: 'tween' }}\n >\n {errorMessage}\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n </div>\n </FormItemContextProvider>\n )\n}\n\nexport default FormItem\n"],"names":["FormItem","props","asterisk","children","className","errorMessage","extra","htmlFor","invalid","label","labelClass","labelWidth","layout","ref","style","size","formContext","useForm","controlSize","useConfig","formItemLabelHeight","formItemLabelWidth","formItemLayout","getFormLabelLayoutClass","LAYOUT","CONTROL_SIZES","formItemClass","classNames","formLabelClass","formLabelStyle","enterStyle","exitStyle","initialStyle","jsx","FormItemContextProvider","jsxs","AnimatePresence","motion"],"mappings":";;;;;;;AAsBA,MAAMA,IAAW,CAACC,MAAyB;AACvC,QAAM;AAAA,IACF,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,EAAA,IACAd,GAEEe,IAAcC,EAAA,GACd,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElBC,IAAsBL,
|
|
1
|
+
{"version":3,"file":"FormItem.js","sources":["../../../../../lib/@ecme/components/ui/Form/FormItem.tsx"],"sourcesContent":["import classNames from '../utils/classNames'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { useForm, FormItemContextProvider } from './context'\nimport { useConfig } from '../ConfigProvider'\nimport { CONTROL_SIZES, LAYOUT } from '../utils/constants'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\nimport type { ReactNode, Ref } from 'react'\n\nexport interface FormItemProps extends CommonProps {\n asterisk?: boolean\n errorMessage?: string\n extra?: string | ReactNode\n htmlFor?: string\n invalid?: boolean\n label?: string\n labelClass?: string\n labelWidth?: string | number\n layout?: TypeAttributes.FormLayout\n ref?: Ref<HTMLDivElement>\n size?: TypeAttributes.ControlSize\n}\n\nconst FormItem = (props: FormItemProps) => {\n const {\n asterisk,\n children,\n className,\n errorMessage,\n extra,\n htmlFor,\n invalid,\n label,\n labelClass,\n labelWidth,\n layout,\n ref,\n style,\n size,\n } = props\n\n const formContext = useForm()\n const { controlSize } = useConfig()\n\n const formItemLabelHeight = size || formContext?.size || controlSize\n const formItemLabelWidth = labelWidth || formContext?.labelWidth\n const formItemLayout = layout || formContext?.layout || 'vertical'\n\n const getFormLabelLayoutClass = () => {\n switch (formItemLayout) {\n case LAYOUT.HORIZONTAL:\n return label\n ? `${CONTROL_SIZES[formItemLabelHeight].h} ${\n label && 'ltr:pr-2 rtl:pl-2'\n }`\n : 'ltr:pr-2 rtl:pl-2'\n case LAYOUT.VERTICAL:\n return `mb-2`\n case LAYOUT.INLINE:\n return `${CONTROL_SIZES[formItemLabelHeight].h} ${\n label && 'ltr:pr-2 rtl:pl-2'\n }`\n default:\n return ''\n }\n }\n\n const formItemClass = classNames(\n 'form-item',\n formItemLayout,\n className,\n invalid ? 'invalid' : '',\n )\n\n const formLabelClass = classNames(\n 'form-label',\n label && getFormLabelLayoutClass(),\n labelClass,\n )\n\n const formLabelStyle = () => {\n if (formItemLayout === LAYOUT.HORIZONTAL) {\n return { ...style, ...{ minWidth: formItemLabelWidth } }\n }\n\n return { ...style }\n }\n\n const enterStyle = { opacity: 1, marginTop: 3, bottom: -21 }\n const exitStyle = { opacity: 0, marginTop: -10 }\n const initialStyle = exitStyle\n\n return (\n <FormItemContextProvider value={{ invalid }}>\n <div ref={ref} className={formItemClass}>\n <label\n htmlFor={htmlFor}\n className={formLabelClass}\n style={formLabelStyle()}\n >\n {asterisk && (\n <span className=\"text-red-500 ltr:mr-1 rtl:ml-1\">\n *\n </span>\n )}\n {label}\n {extra && <span>{extra}</span>}\n {label && formItemLayout !== 'vertical' && ':'}\n </label>\n <div\n className={\n formItemLayout === LAYOUT.HORIZONTAL\n ? 'w-full flex flex-col justify-center relative'\n : ''\n }\n >\n {children}\n <AnimatePresence mode=\"wait\">\n {invalid && (\n <motion.div\n className=\"form-explain\"\n initial={initialStyle}\n animate={enterStyle}\n exit={exitStyle}\n transition={{ duration: 0.15, type: 'tween' }}\n >\n {errorMessage}\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n </div>\n </FormItemContextProvider>\n )\n}\n\nexport default FormItem\n"],"names":["FormItem","props","asterisk","children","className","errorMessage","extra","htmlFor","invalid","label","labelClass","labelWidth","layout","ref","style","size","formContext","useForm","controlSize","useConfig","formItemLabelHeight","formItemLabelWidth","formItemLayout","getFormLabelLayoutClass","LAYOUT","CONTROL_SIZES","formItemClass","classNames","formLabelClass","formLabelStyle","enterStyle","exitStyle","initialStyle","jsx","FormItemContextProvider","jsxs","AnimatePresence","motion"],"mappings":";;;;;;;AAsBA,MAAMA,IAAW,CAACC,MAAyB;AACvC,QAAM;AAAA,IACF,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,EAAA,IACAd,GAEEe,IAAcC,EAAA,GACd,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElBC,IAAsBL,KAAQC,GAAa,QAAQE,GACnDG,IAAqBV,KAAcK,GAAa,YAChDM,IAAiBV,KAAUI,GAAa,UAAU,YAElDO,IAA0B,MAAM;AAClC,YAAQD,GAAA;AAAA,MACJ,KAAKE,EAAO;AACR,eAAOf,IACD,GAAGgB,EAAcL,CAAmB,EAAE,CAAC,IACnCX,KAAS,mBACb,KACA;AAAA,MACV,KAAKe,EAAO;AACR,eAAO;AAAA,MACX,KAAKA,EAAO;AACR,eAAO,GAAGC,EAAcL,CAAmB,EAAE,CAAC,IAC1CX,KAAS,mBACb;AAAA,MACJ;AACI,eAAO;AAAA,IAAA;AAAA,EAEnB,GAEMiB,IAAgBC;AAAA,IAClB;AAAA,IACAL;AAAA,IACAlB;AAAA,IACAI,IAAU,YAAY;AAAA,EAAA,GAGpBoB,IAAiBD;AAAA,IACnB;AAAA,IACAlB,KAASc,EAAA;AAAA,IACTb;AAAA,EAAA,GAGEmB,IAAiB,MACfP,MAAmBE,EAAO,aACnB,EAAE,GAAGV,GAAY,UAAUO,EAAmB,IAGlD,EAAE,GAAGP,EAAA,GAGVgB,IAAa,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,IAAA,GACjDC,IAAY,EAAE,SAAS,GAAG,WAAW,IAAA,GACrCC,IAAeD;AAErB,SACI,gBAAAE,EAACC,GAAA,EAAwB,OAAO,EAAE,SAAA1B,EAAA,GAC9B,UAAA,gBAAA2B,EAAC,OAAA,EAAI,KAAAtB,GAAU,WAAWa,GACtB,UAAA;AAAA,IAAA,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,SAAA5B;AAAA,QACA,WAAWqB;AAAA,QACX,OAAOC,EAAA;AAAA,QAEN,UAAA;AAAA,UAAA3B,KACG,gBAAA+B,EAAC,QAAA,EAAK,WAAU,kCAAiC,UAAA,KAEjD;AAAA,UAEHxB;AAAA,UACAH,KAAS,gBAAA2B,EAAC,QAAA,EAAM,UAAA3B,EAAA,CAAM;AAAA,UACtBG,KAASa,MAAmB,cAAc;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAE/C,gBAAAa;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WACIb,MAAmBE,EAAO,aACpB,iDACA;AAAA,QAGT,UAAA;AAAA,UAAArB;AAAA,UACD,gBAAA8B,EAACG,GAAA,EAAgB,MAAK,QACjB,UAAA5B,KACG,gBAAAyB;AAAA,YAACI,EAAO;AAAA,YAAP;AAAA,cACG,WAAU;AAAA,cACV,SAASL;AAAA,cACT,SAASF;AAAA,cACT,MAAMC;AAAA,cACN,YAAY,EAAE,UAAU,MAAM,MAAM,QAAA;AAAA,cAEnC,UAAA1B;AAAA,YAAA;AAAA,UAAA,EACL,CAER;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,EAAA,CACJ,EAAA,CACJ;AAER;"}
|
|
@@ -1,83 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as p, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useRef as v, useEffect as U } from "react";
|
|
3
|
+
import z from "classnames";
|
|
4
4
|
import "../ConfigProvider/index.js";
|
|
5
|
-
import { useForm as
|
|
6
|
-
import { useInputGroup as
|
|
7
|
-
import { CONTROL_SIZES as
|
|
8
|
-
import
|
|
9
|
-
import { useConfig as
|
|
10
|
-
const
|
|
11
|
-
var I, v, z;
|
|
5
|
+
import { useForm as X, useFormItem as Y } from "../Form/context.js";
|
|
6
|
+
import { useInputGroup as tt } from "../InputGroup/context.js";
|
|
7
|
+
import { CONTROL_SIZES as et } from "../utils/constants.js";
|
|
8
|
+
import G from "lodash/isNil";
|
|
9
|
+
import { useConfig as rt } from "../ConfigProvider/ConfigProvider.js";
|
|
10
|
+
const dt = (o) => {
|
|
12
11
|
const {
|
|
13
|
-
asElement:
|
|
14
|
-
className:
|
|
12
|
+
asElement: W = "input",
|
|
13
|
+
className: c,
|
|
15
14
|
disabled: d,
|
|
16
|
-
invalid:
|
|
15
|
+
invalid: w,
|
|
17
16
|
prefix: e,
|
|
18
|
-
size:
|
|
17
|
+
size: $,
|
|
19
18
|
suffix: r,
|
|
20
|
-
textArea:
|
|
19
|
+
textArea: u,
|
|
21
20
|
type: m = "text",
|
|
22
|
-
ref:
|
|
23
|
-
rows:
|
|
21
|
+
ref: b,
|
|
22
|
+
rows: A,
|
|
24
23
|
style: x,
|
|
25
|
-
unstyle:
|
|
26
|
-
disallowWhitespaceOnly:
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
29
|
-
"value" in
|
|
30
|
-
const
|
|
24
|
+
unstyle: E = !1,
|
|
25
|
+
disallowWhitespaceOnly: R = !1,
|
|
26
|
+
...f
|
|
27
|
+
} = o, [F, L] = I(0), [O, P] = I(0), { controlSize: T, direction: h } = rt(), j = X()?.size, V = Y()?.invalid, D = tt()?.size, C = $ || D || j || T, S = w || V, Z = (t) => typeof t > "u" || t === null ? "" : t;
|
|
28
|
+
"value" in o && (f.value = Z(o.value), delete f.defaultValue);
|
|
29
|
+
const _ = "input", k = `input-${C} ${et[C].h}`, q = "focus:ring-primary focus-within:ring-primary focus-within:border-primary focus:border-primary", B = z(
|
|
31
30
|
"input-wrapper",
|
|
32
|
-
e || r ?
|
|
33
|
-
),
|
|
34
|
-
|
|
35
|
-
!
|
|
36
|
-
!S &&
|
|
37
|
-
!e && !r ?
|
|
31
|
+
e || r ? c : ""
|
|
32
|
+
), H = z(
|
|
33
|
+
_,
|
|
34
|
+
!u && k,
|
|
35
|
+
!S && q,
|
|
36
|
+
!e && !r ? c : "",
|
|
38
37
|
d && "input-disabled",
|
|
39
38
|
S && "input-invalid",
|
|
40
|
-
|
|
41
|
-
),
|
|
42
|
-
|
|
43
|
-
if (!s.current && !o.current)
|
|
39
|
+
u && "input-textarea"
|
|
40
|
+
), a = v(null), l = v(null), J = () => {
|
|
41
|
+
if (!a.current && !l.current)
|
|
44
42
|
return;
|
|
45
|
-
const t =
|
|
46
|
-
|
|
43
|
+
const t = a?.current?.offsetWidth, i = l?.current?.offsetWidth;
|
|
44
|
+
G(t) && G(i) || (t && L(t), i && P(i));
|
|
47
45
|
};
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
U(() => {
|
|
47
|
+
J();
|
|
50
48
|
}, [e, r]);
|
|
51
|
-
const g = (t) => 0.0625 * t,
|
|
52
|
-
const t = `${g(
|
|
49
|
+
const g = (t) => 0.0625 * t, K = () => {
|
|
50
|
+
const t = `${g(F) + 1}rem`, i = `${g(O) + 1}rem`, n = {};
|
|
53
51
|
return h === "ltr" && (e && (n.paddingLeft = t), r && (n.paddingRight = i)), h === "rtl" && (e && (n.paddingRight = t), r && (n.paddingLeft = i)), n;
|
|
54
|
-
},
|
|
55
|
-
className:
|
|
52
|
+
}, s = {
|
|
53
|
+
className: E ? "" : H,
|
|
56
54
|
disabled: d,
|
|
57
55
|
type: m,
|
|
58
|
-
ref:
|
|
59
|
-
...
|
|
56
|
+
ref: b,
|
|
57
|
+
...f
|
|
60
58
|
};
|
|
61
|
-
|
|
62
|
-
const
|
|
59
|
+
R && m === "text" && (s.pattern = "\\S(?!\\s*$).*", s.title = "Este campo não pode conter apenas espaços.");
|
|
60
|
+
const M = /* @__PURE__ */ p(
|
|
63
61
|
"textarea",
|
|
64
62
|
{
|
|
65
63
|
style: x,
|
|
66
|
-
rows:
|
|
67
|
-
...
|
|
64
|
+
rows: A,
|
|
65
|
+
...s
|
|
68
66
|
}
|
|
69
|
-
), y = /* @__PURE__ */
|
|
70
|
-
e ? /* @__PURE__ */ N("div", { ref:
|
|
67
|
+
), y = /* @__PURE__ */ p(W, { style: { ...K(), ...x }, ...s }), Q = /* @__PURE__ */ N("span", { className: B, children: [
|
|
68
|
+
e ? /* @__PURE__ */ N("div", { ref: a, className: "input-suffix-start", children: [
|
|
71
69
|
" ",
|
|
72
70
|
e,
|
|
73
71
|
" "
|
|
74
72
|
] }) : null,
|
|
75
73
|
y,
|
|
76
|
-
r ? /* @__PURE__ */
|
|
74
|
+
r ? /* @__PURE__ */ p("div", { ref: l, className: "input-suffix-end", children: r }) : null
|
|
77
75
|
] });
|
|
78
|
-
return
|
|
76
|
+
return u ? M : e || r ? Q : y;
|
|
79
77
|
};
|
|
80
78
|
export {
|
|
81
|
-
|
|
79
|
+
dt as default
|
|
82
80
|
};
|
|
83
81
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../../lib/@ecme/components/ui/Input/Input.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from \"react\";\nimport classNames from \"classnames\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { useForm, useFormItem } from \"../Form/context\";\nimport { useInputGroup } from \"../InputGroup/context\";\nimport { CONTROL_SIZES } from \"../utils/constants\";\nimport isNil from \"lodash/isNil\";\nimport type { CommonProps, TypeAttributes } from \"../@types/common\";\nimport type {\n InputHTMLAttributes,\n ElementType,\n ReactNode,\n HTMLInputTypeAttribute,\n ClassAttributes,\n Ref,\n} from \"react\";\n\nexport interface InputProps\n extends CommonProps,\n Omit<\n InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>,\n \"size\" | \"prefix\"\n > {\n asElement?: ElementType;\n disabled?: boolean;\n invalid?: boolean;\n prefix?: string | ReactNode;\n rows?: number;\n ref?: Ref<ElementType | HTMLInputElement | HTMLTextAreaElement>;\n size?: TypeAttributes.ControlSize;\n suffix?: string | ReactNode;\n textArea?: boolean;\n type?: HTMLInputTypeAttribute;\n unstyle?: boolean;\n disallowWhitespaceOnly?: boolean;\n}\n\nconst Input = (props: InputProps) => {\n const {\n asElement: Component = \"input\",\n className,\n disabled,\n invalid,\n prefix,\n size,\n suffix,\n textArea,\n type = \"text\",\n ref,\n rows,\n style,\n unstyle = false,\n disallowWhitespaceOnly = false,\n ...rest\n } = props;\n\n const [prefixGutter, setPrefixGutter] = useState(0);\n const [suffixGutter, setSuffixGutter] = useState(0);\n\n const { controlSize, direction } = useConfig();\n const formControlSize = useForm()?.size;\n const formItemInvalid = useFormItem()?.invalid;\n const inputGroupSize = useInputGroup()?.size;\n\n const inputSize = size || inputGroupSize || formControlSize || controlSize;\n\n const isInputInvalid = invalid || formItemInvalid;\n\n const fixControlledValue = (\n val: string | number | readonly string[] | undefined\n ) => {\n if (typeof val === \"undefined\" || val === null) {\n return \"\";\n }\n return val;\n };\n\n if (\"value\" in props) {\n rest.value = fixControlledValue(props.value);\n delete rest.defaultValue;\n }\n\n const inputDefaultClass = \"input\";\n const inputSizeClass = `input-${inputSize} ${CONTROL_SIZES[inputSize].h}`;\n const inputFocusClass = `focus:ring-primary focus-within:ring-primary focus-within:border-primary focus:border-primary`;\n const inputWrapperClass = classNames(\n \"input-wrapper\",\n prefix || suffix ? className : \"\"\n );\n const inputClass = classNames(\n inputDefaultClass,\n !textArea && inputSizeClass,\n !isInputInvalid && inputFocusClass,\n !prefix && !suffix ? className : \"\",\n disabled && \"input-disabled\",\n isInputInvalid && \"input-invalid\",\n textArea && \"input-textarea\"\n );\n\n const prefixNode = useRef<HTMLDivElement>(null);\n const suffixNode = useRef<HTMLDivElement>(null);\n\n const getAffixSize = () => {\n if (!prefixNode.current && !suffixNode.current) {\n return;\n }\n const prefixNodeWidth = prefixNode?.current?.offsetWidth;\n const suffixNodeWidth = suffixNode?.current?.offsetWidth;\n\n if (isNil(prefixNodeWidth) && isNil(suffixNodeWidth)) {\n return;\n }\n\n if (prefixNodeWidth) {\n setPrefixGutter(prefixNodeWidth);\n }\n\n if (suffixNodeWidth) {\n setSuffixGutter(suffixNodeWidth);\n }\n };\n\n useEffect(() => {\n getAffixSize();\n }, [prefix, suffix]);\n\n const remToPxConvertion = (pixel: number) => 0.0625 * pixel;\n\n const affixGutterStyle = () => {\n const leftGutter = `${remToPxConvertion(prefixGutter) + 1}rem`;\n const rightGutter = `${remToPxConvertion(suffixGutter) + 1}rem`;\n const gutterStyle: {\n paddingLeft?: string;\n paddingRight?: string;\n } = {};\n\n if (direction === \"ltr\") {\n if (prefix) {\n gutterStyle.paddingLeft = leftGutter;\n }\n\n if (suffix) {\n gutterStyle.paddingRight = rightGutter;\n }\n }\n\n if (direction === \"rtl\") {\n if (prefix) {\n gutterStyle.paddingRight = leftGutter;\n }\n\n if (suffix) {\n gutterStyle.paddingLeft = rightGutter;\n }\n }\n\n return gutterStyle;\n };\n\n const inputProps = {\n className: !unstyle ? inputClass : \"\",\n disabled,\n type,\n ref,\n ...rest,\n };\n\n if (disallowWhitespaceOnly && type === \"text\") {\n inputProps.pattern = \"\\\\S(?!\\\\s*$).*\"; \n inputProps.title = \"Este campo não pode conter apenas espaços.\"; \n }\n\n const renderTextArea = (\n <textarea\n style={style}\n rows={rows}\n {...(inputProps as ClassAttributes<HTMLTextAreaElement>)}\n ></textarea>\n );\n\n const renderInput = (\n <Component style={{ ...affixGutterStyle(), ...style }} {...inputProps} />\n );\n\n const renderAffixInput = (\n <span className={inputWrapperClass}>\n {prefix ? (\n <div ref={prefixNode} className=\"input-suffix-start\">\n {\" \"}\n {prefix}{\" \"}\n </div>\n ) : null}\n {renderInput}\n {suffix ? (\n <div ref={suffixNode} className=\"input-suffix-end\">\n {suffix}\n </div>\n ) : null}\n </span>\n );\n\n const renderChildren = () => {\n if (textArea) {\n return renderTextArea;\n }\n\n if (prefix || suffix) {\n return renderAffixInput;\n } else {\n return renderInput;\n }\n };\n\n return renderChildren();\n};\n\nexport default Input;\n"],"names":["Input","props","Component","className","disabled","invalid","prefix","size","suffix","textArea","type","ref","rows","style","unstyle","disallowWhitespaceOnly","rest","prefixGutter","setPrefixGutter","useState","suffixGutter","setSuffixGutter","controlSize","direction","useConfig","formControlSize","
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../../lib/@ecme/components/ui/Input/Input.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from \"react\";\nimport classNames from \"classnames\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { useForm, useFormItem } from \"../Form/context\";\nimport { useInputGroup } from \"../InputGroup/context\";\nimport { CONTROL_SIZES } from \"../utils/constants\";\nimport isNil from \"lodash/isNil\";\nimport type { CommonProps, TypeAttributes } from \"../@types/common\";\nimport type {\n InputHTMLAttributes,\n ElementType,\n ReactNode,\n HTMLInputTypeAttribute,\n ClassAttributes,\n Ref,\n} from \"react\";\n\nexport interface InputProps\n extends CommonProps,\n Omit<\n InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>,\n \"size\" | \"prefix\"\n > {\n asElement?: ElementType;\n disabled?: boolean;\n invalid?: boolean;\n prefix?: string | ReactNode;\n rows?: number;\n ref?: Ref<ElementType | HTMLInputElement | HTMLTextAreaElement>;\n size?: TypeAttributes.ControlSize;\n suffix?: string | ReactNode;\n textArea?: boolean;\n type?: HTMLInputTypeAttribute;\n unstyle?: boolean;\n disallowWhitespaceOnly?: boolean;\n}\n\nconst Input = (props: InputProps) => {\n const {\n asElement: Component = \"input\",\n className,\n disabled,\n invalid,\n prefix,\n size,\n suffix,\n textArea,\n type = \"text\",\n ref,\n rows,\n style,\n unstyle = false,\n disallowWhitespaceOnly = false,\n ...rest\n } = props;\n\n const [prefixGutter, setPrefixGutter] = useState(0);\n const [suffixGutter, setSuffixGutter] = useState(0);\n\n const { controlSize, direction } = useConfig();\n const formControlSize = useForm()?.size;\n const formItemInvalid = useFormItem()?.invalid;\n const inputGroupSize = useInputGroup()?.size;\n\n const inputSize = size || inputGroupSize || formControlSize || controlSize;\n\n const isInputInvalid = invalid || formItemInvalid;\n\n const fixControlledValue = (\n val: string | number | readonly string[] | undefined\n ) => {\n if (typeof val === \"undefined\" || val === null) {\n return \"\";\n }\n return val;\n };\n\n if (\"value\" in props) {\n rest.value = fixControlledValue(props.value);\n delete rest.defaultValue;\n }\n\n const inputDefaultClass = \"input\";\n const inputSizeClass = `input-${inputSize} ${CONTROL_SIZES[inputSize].h}`;\n const inputFocusClass = `focus:ring-primary focus-within:ring-primary focus-within:border-primary focus:border-primary`;\n const inputWrapperClass = classNames(\n \"input-wrapper\",\n prefix || suffix ? className : \"\"\n );\n const inputClass = classNames(\n inputDefaultClass,\n !textArea && inputSizeClass,\n !isInputInvalid && inputFocusClass,\n !prefix && !suffix ? className : \"\",\n disabled && \"input-disabled\",\n isInputInvalid && \"input-invalid\",\n textArea && \"input-textarea\"\n );\n\n const prefixNode = useRef<HTMLDivElement>(null);\n const suffixNode = useRef<HTMLDivElement>(null);\n\n const getAffixSize = () => {\n if (!prefixNode.current && !suffixNode.current) {\n return;\n }\n const prefixNodeWidth = prefixNode?.current?.offsetWidth;\n const suffixNodeWidth = suffixNode?.current?.offsetWidth;\n\n if (isNil(prefixNodeWidth) && isNil(suffixNodeWidth)) {\n return;\n }\n\n if (prefixNodeWidth) {\n setPrefixGutter(prefixNodeWidth);\n }\n\n if (suffixNodeWidth) {\n setSuffixGutter(suffixNodeWidth);\n }\n };\n\n useEffect(() => {\n getAffixSize();\n }, [prefix, suffix]);\n\n const remToPxConvertion = (pixel: number) => 0.0625 * pixel;\n\n const affixGutterStyle = () => {\n const leftGutter = `${remToPxConvertion(prefixGutter) + 1}rem`;\n const rightGutter = `${remToPxConvertion(suffixGutter) + 1}rem`;\n const gutterStyle: {\n paddingLeft?: string;\n paddingRight?: string;\n } = {};\n\n if (direction === \"ltr\") {\n if (prefix) {\n gutterStyle.paddingLeft = leftGutter;\n }\n\n if (suffix) {\n gutterStyle.paddingRight = rightGutter;\n }\n }\n\n if (direction === \"rtl\") {\n if (prefix) {\n gutterStyle.paddingRight = leftGutter;\n }\n\n if (suffix) {\n gutterStyle.paddingLeft = rightGutter;\n }\n }\n\n return gutterStyle;\n };\n\n const inputProps = {\n className: !unstyle ? inputClass : \"\",\n disabled,\n type,\n ref,\n ...rest,\n };\n\n if (disallowWhitespaceOnly && type === \"text\") {\n inputProps.pattern = \"\\\\S(?!\\\\s*$).*\"; \n inputProps.title = \"Este campo não pode conter apenas espaços.\"; \n }\n\n const renderTextArea = (\n <textarea\n style={style}\n rows={rows}\n {...(inputProps as ClassAttributes<HTMLTextAreaElement>)}\n ></textarea>\n );\n\n const renderInput = (\n <Component style={{ ...affixGutterStyle(), ...style }} {...inputProps} />\n );\n\n const renderAffixInput = (\n <span className={inputWrapperClass}>\n {prefix ? (\n <div ref={prefixNode} className=\"input-suffix-start\">\n {\" \"}\n {prefix}{\" \"}\n </div>\n ) : null}\n {renderInput}\n {suffix ? (\n <div ref={suffixNode} className=\"input-suffix-end\">\n {suffix}\n </div>\n ) : null}\n </span>\n );\n\n const renderChildren = () => {\n if (textArea) {\n return renderTextArea;\n }\n\n if (prefix || suffix) {\n return renderAffixInput;\n } else {\n return renderInput;\n }\n };\n\n return renderChildren();\n};\n\nexport default Input;\n"],"names":["Input","props","Component","className","disabled","invalid","prefix","size","suffix","textArea","type","ref","rows","style","unstyle","disallowWhitespaceOnly","rest","prefixGutter","setPrefixGutter","useState","suffixGutter","setSuffixGutter","controlSize","direction","useConfig","formControlSize","useForm","formItemInvalid","useFormItem","inputGroupSize","useInputGroup","inputSize","isInputInvalid","fixControlledValue","val","inputDefaultClass","inputSizeClass","CONTROL_SIZES","inputFocusClass","inputWrapperClass","classNames","inputClass","prefixNode","useRef","suffixNode","getAffixSize","prefixNodeWidth","suffixNodeWidth","isNil","useEffect","remToPxConvertion","pixel","affixGutterStyle","leftGutter","rightGutter","gutterStyle","inputProps","renderTextArea","jsx","renderInput","renderAffixInput","jsxs"],"mappings":";;;;;;;;;AAqCA,MAAMA,KAAQ,CAACC,MAAsB;AACnC,QAAM;AAAA,IACJ,WAAWC,IAAY;AAAA,IACvB,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,KAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,wBAAAC,IAAyB;AAAA,IACzB,GAAGC;AAAA,EAAA,IACDf,GAEE,CAACgB,GAAcC,CAAe,IAAIC,EAAS,CAAC,GAC5C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,aAAAG,GAAa,WAAAC,EAAA,IAAcC,GAAA,GAC7BC,IAAkBC,KAAW,MAC7BC,IAAkBC,KAAe,SACjCC,IAAiBC,MAAiB,MAElCC,IAAYxB,KAAQsB,KAAkBJ,KAAmBH,GAEzDU,IAAiB3B,KAAWsB,GAE5BM,IAAqB,CACzBC,MAEI,OAAOA,IAAQ,OAAeA,MAAQ,OACjC,KAEFA;AAGT,EAAI,WAAWjC,MACbe,EAAK,QAAQiB,EAAmBhC,EAAM,KAAK,GAC3C,OAAOe,EAAK;AAGd,QAAMmB,IAAoB,SACpBC,IAAiB,SAASL,CAAS,IAAIM,GAAcN,CAAS,EAAE,CAAC,IACjEO,IAAkB,iGAClBC,IAAoBC;AAAA,IACxB;AAAA,IACAlC,KAAUE,IAASL,IAAY;AAAA,EAAA,GAE3BsC,IAAaD;AAAA,IACjBL;AAAA,IACA,CAAC1B,KAAY2B;AAAA,IACb,CAACJ,KAAkBM;AAAA,IACnB,CAAChC,KAAU,CAACE,IAASL,IAAY;AAAA,IACjCC,KAAY;AAAA,IACZ4B,KAAkB;AAAA,IAClBvB,KAAY;AAAA,EAAA,GAGRiC,IAAaC,EAAuB,IAAI,GACxCC,IAAaD,EAAuB,IAAI,GAExCE,IAAe,MAAM;AACzB,QAAI,CAACH,EAAW,WAAW,CAACE,EAAW;AACrC;AAEF,UAAME,IAAkBJ,GAAY,SAAS,aACvCK,IAAkBH,GAAY,SAAS;AAE7C,IAAII,EAAMF,CAAe,KAAKE,EAAMD,CAAe,MAI/CD,KACF5B,EAAgB4B,CAAe,GAG7BC,KACF1B,EAAgB0B,CAAe;AAAA,EAEnC;AAEA,EAAAE,EAAU,MAAM;AACd,IAAAJ,EAAA;AAAA,EACF,GAAG,CAACvC,GAAQE,CAAM,CAAC;AAEnB,QAAM0C,IAAoB,CAACC,MAAkB,SAASA,GAEhDC,IAAmB,MAAM;AAC7B,UAAMC,IAAa,GAAGH,EAAkBjC,CAAY,IAAI,CAAC,OACnDqC,IAAc,GAAGJ,EAAkB9B,CAAY,IAAI,CAAC,OACpDmC,IAGF,CAAA;AAEJ,WAAIhC,MAAc,UACZjB,MACFiD,EAAY,cAAcF,IAGxB7C,MACF+C,EAAY,eAAeD,KAI3B/B,MAAc,UACZjB,MACFiD,EAAY,eAAeF,IAGzB7C,MACF+C,EAAY,cAAcD,KAIvBC;AAAA,EACT,GAEMC,IAAa;AAAA,IACjB,WAAY1C,IAAuB,KAAb2B;AAAA,IACtB,UAAArC;AAAA,IACA,MAAAM;AAAA,IACA,KAAAC;AAAA,IACA,GAAGK;AAAA,EAAA;AAGL,EAAID,KAA0BL,MAAS,WACrC8C,EAAW,UAAU,kBACrBA,EAAW,QAAQ;AAGrB,QAAMC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAA7C;AAAA,MACA,MAAAD;AAAA,MACC,GAAI4C;AAAA,IAAA;AAAA,EAAA,GAIHG,IACJ,gBAAAD,EAACxD,GAAA,EAAU,OAAO,EAAE,GAAGkD,EAAA,GAAoB,GAAGvC,KAAU,GAAG2C,EAAA,CAAY,GAGnEI,IACJ,gBAAAC,EAAC,QAAA,EAAK,WAAWtB,GACd,UAAA;AAAA,IAAAjC,IACC,gBAAAuD,EAAC,OAAA,EAAI,KAAKnB,GAAY,WAAU,sBAC7B,UAAA;AAAA,MAAA;AAAA,MACApC;AAAA,MAAQ;AAAA,IAAA,EAAA,CACX,IACE;AAAA,IACHqD;AAAA,IACAnD,sBACE,OAAA,EAAI,KAAKoC,GAAY,WAAU,oBAC7B,aACH,IACE;AAAA,EAAA,GACN;AAeF,SAXMnC,IACKgD,IAGLnD,KAAUE,IACLoD,IAEAD;AAKb;"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import c from "classnames";
|
|
3
3
|
import "../ConfigProvider/index.js";
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { useInputGroup as
|
|
6
|
-
import { CONTROL_SIZES as
|
|
7
|
-
import { useConfig as
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const { size: i, children: m, className: e } = n, { controlSize: p } = C(), d = (s = l()) == null ? void 0 : s.size, a = (t = z()) == null ? void 0 : t.size, o = i || a || d || p, c = f(
|
|
4
|
+
import { useForm as u } from "../Form/context.js";
|
|
5
|
+
import { useInputGroup as f } from "./context.js";
|
|
6
|
+
import { CONTROL_SIZES as l } from "../utils/constants.js";
|
|
7
|
+
import { useConfig as z } from "../ConfigProvider/ConfigProvider.js";
|
|
8
|
+
const I = ({ ref: s, ...t }) => {
|
|
9
|
+
const { size: r, children: n, className: i } = t, { controlSize: m } = z(), e = u()?.size, p = f()?.size, o = r || p || e || m, d = c(
|
|
11
10
|
"input-addon",
|
|
12
|
-
`input-addon-${o} ${
|
|
13
|
-
|
|
11
|
+
`input-addon-${o} ${l[o].h}`,
|
|
12
|
+
i
|
|
14
13
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ a("div", { ref: s, className: d, children: n });
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
I as default
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=Addon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Addon.js","sources":["../../../../../lib/@ecme/components/ui/InputGroup/Addon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useConfig } from '../ConfigProvider'\nimport { useForm } from '../Form/context'\nimport { useInputGroup } from '../InputGroup/context'\nimport { CONTROL_SIZES } from '../utils/constants'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\nimport type { Ref } from 'react'\n\nexport interface AddonProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n ref?: Ref<HTMLDivElement>\n}\n\nconst Addon = ({ ref, ...props }: AddonProps) => {\n const { size, children, className } = props\n\n const { controlSize } = useConfig()\n const formControlSize = useForm()?.size\n const inputGroupSize = useInputGroup()?.size\n\n const inputAddonSize =\n size || inputGroupSize || formControlSize || controlSize\n\n const addonClass = classNames(\n 'input-addon',\n `input-addon-${inputAddonSize} ${CONTROL_SIZES[inputAddonSize].h}`,\n className,\n )\n\n return (\n <div ref={ref} className={addonClass}>\n {children}\n </div>\n )\n}\n\nexport default Addon\n"],"names":["Addon","ref","props","size","children","className","controlSize","useConfig","formControlSize","
|
|
1
|
+
{"version":3,"file":"Addon.js","sources":["../../../../../lib/@ecme/components/ui/InputGroup/Addon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useConfig } from '../ConfigProvider'\nimport { useForm } from '../Form/context'\nimport { useInputGroup } from '../InputGroup/context'\nimport { CONTROL_SIZES } from '../utils/constants'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\nimport type { Ref } from 'react'\n\nexport interface AddonProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n ref?: Ref<HTMLDivElement>\n}\n\nconst Addon = ({ ref, ...props }: AddonProps) => {\n const { size, children, className } = props\n\n const { controlSize } = useConfig()\n const formControlSize = useForm()?.size\n const inputGroupSize = useInputGroup()?.size\n\n const inputAddonSize =\n size || inputGroupSize || formControlSize || controlSize\n\n const addonClass = classNames(\n 'input-addon',\n `input-addon-${inputAddonSize} ${CONTROL_SIZES[inputAddonSize].h}`,\n className,\n )\n\n return (\n <div ref={ref} className={addonClass}>\n {children}\n </div>\n )\n}\n\nexport default Addon\n"],"names":["Addon","ref","props","size","children","className","controlSize","useConfig","formControlSize","useForm","inputGroupSize","useInputGroup","inputAddonSize","addonClass","classNames","CONTROL_SIZES","jsx"],"mappings":";;;;;;;AAaA,MAAMA,IAAQ,CAAC,EAAE,KAAAC,GAAK,GAAGC,QAAwB;AAC7C,QAAM,EAAE,MAAAC,GAAM,UAAAC,GAAU,WAAAC,EAAA,IAAcH,GAEhC,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClBC,IAAkBC,KAAW,MAC7BC,IAAiBC,KAAiB,MAElCC,IACFT,KAAQO,KAAkBF,KAAmBF,GAE3CO,IAAaC;AAAA,IACf;AAAA,IACA,eAAeF,CAAc,IAAIG,EAAcH,CAAc,EAAE,CAAC;AAAA,IAChEP;AAAA,EAAA;AAGJ,SACI,gBAAAW,EAAC,OAAA,EAAI,KAAAf,GAAU,WAAWY,GACrB,UAAAT,GACL;AAER;"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import c from "classnames";
|
|
3
3
|
import "../ConfigProvider/index.js";
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { InputGroupContextProvider as
|
|
6
|
-
import { useConfig as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, children: /* @__PURE__ */ o(d, { children: () => /* @__PURE__ */ o("div", { ref: r, className: c, children: n }) }) });
|
|
4
|
+
import { useForm as l } from "../Form/context.js";
|
|
5
|
+
import { InputGroupContextProvider as a, InputGroupContextConsumer as f } from "./context.js";
|
|
6
|
+
import { useConfig as d } from "../ConfigProvider/ConfigProvider.js";
|
|
7
|
+
const N = ({ ref: t, ...r }) => {
|
|
8
|
+
const { children: e, className: n, size: s } = r, { controlSize: i } = d(), u = l()?.size, p = s || u || i, m = c("input-group", n);
|
|
9
|
+
return /* @__PURE__ */ o(a, { value: {
|
|
10
|
+
size: p
|
|
11
|
+
}, children: /* @__PURE__ */ o(f, { children: () => /* @__PURE__ */ o("div", { ref: t, className: m, children: e }) }) });
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
N as default
|
|
16
15
|
};
|
|
17
16
|
//# sourceMappingURL=InputGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.js","sources":["../../../../../lib/@ecme/components/ui/InputGroup/InputGroup.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useConfig } from '../ConfigProvider'\nimport { useForm } from '../Form/context'\nimport { InputGroupContextProvider, InputGroupContextConsumer } from './context'\nimport type { Ref } from 'react'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\n\nexport interface InputGroupProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n ref?: Ref<HTMLDivElement>\n}\n\nconst InputGroup = ({ ref, ...props }: InputGroupProps) => {\n const { children, className, size } = props\n\n const { controlSize } = useConfig()\n const formControlSize = useForm()?.size\n\n const inputGroupSize = size || formControlSize || controlSize\n\n const inputGroupClass = classNames('input-group', className)\n\n const contextValue = {\n size: inputGroupSize,\n }\n return (\n <InputGroupContextProvider value={contextValue}>\n <InputGroupContextConsumer>\n {() => {\n return (\n <div ref={ref} className={inputGroupClass}>\n {children}\n </div>\n )\n }}\n </InputGroupContextConsumer>\n </InputGroupContextProvider>\n )\n}\n\nexport default InputGroup\n"],"names":["InputGroup","ref","props","children","className","size","controlSize","useConfig","formControlSize","
|
|
1
|
+
{"version":3,"file":"InputGroup.js","sources":["../../../../../lib/@ecme/components/ui/InputGroup/InputGroup.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useConfig } from '../ConfigProvider'\nimport { useForm } from '../Form/context'\nimport { InputGroupContextProvider, InputGroupContextConsumer } from './context'\nimport type { Ref } from 'react'\nimport type { CommonProps, TypeAttributes } from '../@types/common'\n\nexport interface InputGroupProps extends CommonProps {\n size?: TypeAttributes.ControlSize\n ref?: Ref<HTMLDivElement>\n}\n\nconst InputGroup = ({ ref, ...props }: InputGroupProps) => {\n const { children, className, size } = props\n\n const { controlSize } = useConfig()\n const formControlSize = useForm()?.size\n\n const inputGroupSize = size || formControlSize || controlSize\n\n const inputGroupClass = classNames('input-group', className)\n\n const contextValue = {\n size: inputGroupSize,\n }\n return (\n <InputGroupContextProvider value={contextValue}>\n <InputGroupContextConsumer>\n {() => {\n return (\n <div ref={ref} className={inputGroupClass}>\n {children}\n </div>\n )\n }}\n </InputGroupContextConsumer>\n </InputGroupContextProvider>\n )\n}\n\nexport default InputGroup\n"],"names":["InputGroup","ref","props","children","className","size","controlSize","useConfig","formControlSize","useForm","inputGroupSize","inputGroupClass","classNames","InputGroupContextProvider","jsx","InputGroupContextConsumer"],"mappings":";;;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,KAAAC,GAAK,GAAGC,QAA6B;AACvD,QAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,MAAAC,EAAA,IAASH,GAEhC,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClBC,IAAkBC,KAAW,MAE7BC,IAAiBL,KAAQG,KAAmBF,GAE5CK,IAAkBC,EAAW,eAAeR,CAAS;AAK3D,2BACKS,GAAA,EAA0B,OAJV;AAAA,IACjB,MAAMH;AAAA,EAAA,GAIF,UAAA,gBAAAI,EAACC,KACI,UAAA,MAEO,gBAAAD,EAAC,OAAA,EAAI,KAAAb,GAAU,WAAWU,GACrB,UAAAR,GACL,GAGZ,EAAA,CACJ;AAER;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as T, useCallback as j } from "react";
|
|
3
3
|
import o from "classnames";
|
|
4
4
|
import k from "../hooks/useTimeout.js";
|
|
@@ -9,27 +9,27 @@ import B from "../CloseButton/CloseButton.js";
|
|
|
9
9
|
const G = (f) => {
|
|
10
10
|
const {
|
|
11
11
|
className: u,
|
|
12
|
-
children:
|
|
12
|
+
children: t,
|
|
13
13
|
closable: h = !1,
|
|
14
|
-
customIcon:
|
|
15
|
-
duration:
|
|
16
|
-
onClose:
|
|
14
|
+
customIcon: s,
|
|
15
|
+
duration: n = 3e3,
|
|
16
|
+
onClose: e,
|
|
17
17
|
style: p,
|
|
18
18
|
ref: N,
|
|
19
19
|
title: a,
|
|
20
|
-
triggerByToast:
|
|
20
|
+
triggerByToast: c,
|
|
21
21
|
type: r,
|
|
22
22
|
width: v = 350,
|
|
23
23
|
...y
|
|
24
|
-
} = f, [
|
|
24
|
+
} = f, [C, m] = T("show"), { clear: d } = k(e, n, n > 0), b = j(
|
|
25
25
|
(x) => {
|
|
26
|
-
m("hiding"),
|
|
26
|
+
m("hiding"), e?.(x), d(), c || setTimeout(() => {
|
|
27
27
|
m("hide");
|
|
28
28
|
}, 400);
|
|
29
29
|
},
|
|
30
|
-
[
|
|
30
|
+
[e, d, c]
|
|
31
31
|
), g = o("notification", u);
|
|
32
|
-
return
|
|
32
|
+
return C === "hide" ? null : /* @__PURE__ */ l(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
ref: N,
|
|
@@ -37,23 +37,23 @@ const G = (f) => {
|
|
|
37
37
|
className: g,
|
|
38
38
|
style: { width: v, ...p },
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ l(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
43
|
className: o(
|
|
44
44
|
"notification-content",
|
|
45
|
-
!
|
|
45
|
+
!t && "no-child"
|
|
46
46
|
),
|
|
47
47
|
children: [
|
|
48
|
-
r && !
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
48
|
+
r && !s ? /* @__PURE__ */ i("div", { className: "mr-3 mt-0.5", children: /* @__PURE__ */ i(w, { type: r }) }) : null,
|
|
49
|
+
s && /* @__PURE__ */ i("div", { className: "mr-3", children: s }),
|
|
50
|
+
/* @__PURE__ */ l("div", { className: "mr-4", children: [
|
|
51
51
|
a && /* @__PURE__ */ i(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
className: o(
|
|
55
55
|
"notification-title",
|
|
56
|
-
|
|
56
|
+
t ? "mb-2" : ""
|
|
57
57
|
),
|
|
58
58
|
children: a
|
|
59
59
|
}
|
|
@@ -63,9 +63,9 @@ const G = (f) => {
|
|
|
63
63
|
{
|
|
64
64
|
className: o(
|
|
65
65
|
"notification-description",
|
|
66
|
-
!a &&
|
|
66
|
+
!a && t ? "mt-1" : ""
|
|
67
67
|
),
|
|
68
|
-
children:
|
|
68
|
+
children: t
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
] })
|
|
@@ -77,7 +77,7 @@ const G = (f) => {
|
|
|
77
77
|
{
|
|
78
78
|
className: "notification-close",
|
|
79
79
|
absolute: !0,
|
|
80
|
-
onClick:
|
|
80
|
+
onClick: b
|
|
81
81
|
}
|
|
82
82
|
)
|
|
83
83
|
]
|