@lablup/ui-common 0.1.0-alpha.9 → 0.2.0-alpha.16
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/NOTICE +62 -0
- package/README.md +521 -69
- package/astryx/components/AlertModal.doc.mjs +91 -0
- package/astryx/components/AlertModal.tsx +3 -0
- package/astryx/components/BoardItemTitle.doc.mjs +51 -0
- package/astryx/components/BoardItemTitle.tsx +3 -0
- package/astryx/components/BooleanToken.doc.mjs +57 -0
- package/astryx/components/BooleanToken.tsx +3 -0
- package/astryx/components/BulkEditFormItem.doc.mjs +68 -0
- package/astryx/components/BulkEditFormItem.tsx +3 -0
- package/astryx/components/BulkErrorModal.doc.mjs +75 -0
- package/astryx/components/BulkErrorModal.tsx +3 -0
- package/astryx/components/ColorPicker.doc.mjs +88 -0
- package/astryx/components/ColorPicker.tsx +3 -0
- package/astryx/components/ConfirmPopover.doc.mjs +99 -0
- package/astryx/components/ConfirmPopover.tsx +3 -0
- package/astryx/components/CountBadge.doc.mjs +93 -0
- package/astryx/components/CountBadge.tsx +3 -0
- package/astryx/components/CountdownBorder.doc.mjs +57 -0
- package/astryx/components/CountdownBorder.tsx +3 -0
- package/astryx/components/DataGrid.doc.mjs +166 -0
- package/astryx/components/DataGrid.tsx +3 -0
- package/astryx/components/DeleteConfirmModal.doc.mjs +163 -0
- package/astryx/components/DeleteConfirmModal.tsx +3 -0
- package/astryx/components/DividedRow.doc.mjs +85 -0
- package/astryx/components/DividedRow.tsx +3 -0
- package/astryx/components/DoubleBadge.doc.mjs +40 -0
- package/astryx/components/DoubleBadge.tsx +3 -0
- package/astryx/components/DoubleToken.doc.mjs +38 -0
- package/astryx/components/DoubleToken.tsx +3 -0
- package/astryx/components/Form.doc.mjs +113 -0
- package/astryx/components/Form.tsx +3 -0
- package/astryx/components/IconWithTooltip.doc.mjs +57 -0
- package/astryx/components/IconWithTooltip.tsx +3 -0
- package/astryx/components/ImageWithFallback.doc.mjs +47 -0
- package/astryx/components/ImageWithFallback.tsx +3 -0
- package/astryx/components/ListBanner.doc.mjs +50 -0
- package/astryx/components/ListBanner.tsx +3 -0
- package/astryx/components/Modal.doc.mjs +176 -0
- package/astryx/components/Modal.tsx +3 -0
- package/astryx/components/NotificationItem.doc.mjs +52 -0
- package/astryx/components/NotificationItem.tsx +3 -0
- package/astryx/components/NotificationStack.doc.mjs +66 -0
- package/astryx/components/NotificationStack.tsx +3 -0
- package/astryx/components/OverlayScrollbar.doc.mjs +49 -0
- package/astryx/components/OverlayScrollbar.tsx +3 -0
- package/astryx/components/PageHeader.doc.mjs +94 -0
- package/astryx/components/PageHeader.tsx +3 -0
- package/astryx/components/PagedSelector.doc.mjs +183 -0
- package/astryx/components/PagedSelector.tsx +3 -0
- package/astryx/components/ProgressWithLabel.doc.mjs +69 -0
- package/astryx/components/ProgressWithLabel.tsx +3 -0
- package/astryx/components/SelectionLabel.doc.mjs +55 -0
- package/astryx/components/SelectionLabel.tsx +3 -0
- package/astryx/components/Statistic.doc.mjs +84 -0
- package/astryx/components/Statistic.tsx +3 -0
- package/astryx/components/StepNumberInput.doc.mjs +102 -0
- package/astryx/components/StepNumberInput.tsx +3 -0
- package/astryx/components/TextHighlighter.doc.mjs +47 -0
- package/astryx/components/TextHighlighter.tsx +3 -0
- package/astryx/components/TokenList.doc.mjs +58 -0
- package/astryx/components/TokenList.tsx +3 -0
- package/astryx/components/TokenRow.doc.mjs +62 -0
- package/astryx/components/TokenRow.tsx +3 -0
- package/astryx/components/UncontrolledInput.doc.mjs +68 -0
- package/astryx/components/UncontrolledInput.tsx +3 -0
- package/astryx/components/UnitGrid.doc.mjs +107 -0
- package/astryx/components/UnitGrid.tsx +3 -0
- package/astryx/docs/ui-common.doc.mjs +112 -0
- package/astryx.integration.mjs +35 -0
- package/dist/assets/components/BoardItemTitle/BoardItemTitle.css +2 -0
- package/dist/assets/components/BulkErrorModal/BulkErrorModal.css +2 -0
- package/dist/assets/components/ColorPicker/ColorPicker.css +2 -0
- package/dist/assets/components/CountBadge/CountBadge.css +2 -0
- package/dist/assets/components/CountdownBorder/CountdownBorder.css +2 -0
- package/dist/assets/components/DataGrid/DataGrid.css +2 -0
- package/dist/assets/components/DeleteConfirmModal/DeleteConfirmModal.css +2 -0
- package/dist/assets/components/DigitPopIn/DigitPopIn.css +2 -0
- package/dist/assets/components/DividedRow/DividedRow.css +2 -0
- package/dist/assets/components/DoubleBadge/DoubleBadge.css +2 -0
- package/dist/assets/components/DoubleToken/DoubleToken.css +2 -0
- package/dist/assets/components/ErrorState/ErrorState.css +2 -1
- package/dist/assets/components/Form/FormItemVisual.css +2 -0
- package/dist/assets/components/IconWithTooltip/IconWithTooltip.css +2 -0
- package/dist/assets/components/ImageWithFallback/ImageWithFallback.css +2 -0
- package/dist/assets/components/ListBanner/ListBanner.css +2 -0
- package/dist/assets/components/Modal/Modal.css +2 -0
- package/dist/assets/components/NotificationItem/NotificationItem.css +2 -0
- package/dist/assets/components/NotificationStack/NotificationStack.css +2 -0
- package/dist/assets/components/OverlayScrollbar/OverlayScrollbar.css +2 -0
- package/dist/assets/components/PageHeader/PageHeader.css +2 -1
- package/dist/assets/components/PageLayout/PageLayout.css +2 -1
- package/dist/assets/components/PagedSelector/PagedSelector.css +2 -0
- package/dist/assets/components/ProgressWithLabel/ProgressWithLabel.css +2 -0
- package/dist/assets/components/Skeleton/SkeletonCard.css +2 -1
- package/dist/assets/components/Skeleton/SkeletonChart.css +2 -1
- package/dist/assets/components/Skeleton/SkeletonRow.css +2 -1
- package/dist/assets/components/Skeleton/SkeletonShape.css +2 -0
- package/dist/assets/components/Skeleton/SkeletonText.css +2 -1
- package/dist/assets/components/SmoothHeight/SmoothHeight.css +2 -1
- package/dist/assets/components/StatCard/StatCard.css +2 -1
- package/dist/assets/components/Statistic/Statistic.css +2 -0
- package/dist/assets/components/StepNumberInput/NumberStepper.css +2 -0
- package/dist/assets/components/TextHighlighter/TextHighlighter.css +2 -0
- package/dist/assets/components/TokenList/TokenList.css +2 -0
- package/dist/assets/components/TokenRow/TokenRow.css +2 -0
- package/dist/assets/components/UnitGrid/UnitGrid.css +2 -0
- package/dist/astryx/AppShell.d.ts +1 -0
- package/dist/astryx/AppShell.js +1 -0
- package/dist/astryx/AspectRatio.d.ts +1 -0
- package/dist/astryx/AspectRatio.js +1 -0
- package/dist/astryx/Avatar.d.ts +1 -0
- package/dist/astryx/Avatar.js +1 -0
- package/dist/astryx/AvatarGroup.d.ts +1 -0
- package/dist/astryx/AvatarGroup.js +1 -0
- package/dist/astryx/Badge.d.ts +1 -0
- package/dist/astryx/Badge.js +1 -0
- package/dist/astryx/Banner.d.ts +1 -0
- package/dist/astryx/Banner.js +1 -0
- package/dist/astryx/BaseProps.d.ts +1 -0
- package/dist/astryx/BaseProps.js +1 -0
- package/dist/astryx/Blockquote.d.ts +1 -0
- package/dist/astryx/Blockquote.js +1 -0
- package/dist/astryx/BottomSheet.d.ts +1 -0
- package/dist/astryx/BottomSheet.js +1 -0
- package/dist/astryx/Breadcrumbs.d.ts +1 -0
- package/dist/astryx/Breadcrumbs.js +1 -0
- package/dist/astryx/Button.d.ts +1 -0
- package/dist/astryx/Button.js +1 -0
- package/dist/astryx/ButtonGroup.d.ts +1 -0
- package/dist/astryx/ButtonGroup.js +1 -0
- package/dist/astryx/Calendar/utils.d.ts +1 -0
- package/dist/astryx/Calendar/utils.js +1 -0
- package/dist/astryx/Calendar.d.ts +1 -0
- package/dist/astryx/Calendar.js +1 -0
- package/dist/astryx/Card.d.ts +1 -0
- package/dist/astryx/Card.js +1 -0
- package/dist/astryx/Carousel.d.ts +1 -0
- package/dist/astryx/Carousel.js +1 -0
- package/dist/astryx/Center.d.ts +1 -0
- package/dist/astryx/Center.js +1 -0
- package/dist/astryx/Chat.d.ts +1 -0
- package/dist/astryx/Chat.js +1 -0
- package/dist/astryx/CheckboxInput.d.ts +1 -0
- package/dist/astryx/CheckboxInput.js +1 -0
- package/dist/astryx/CheckboxList.d.ts +1 -0
- package/dist/astryx/CheckboxList.js +1 -0
- package/dist/astryx/Citation.d.ts +1 -0
- package/dist/astryx/Citation.js +1 -0
- package/dist/astryx/ClickableCard.d.ts +1 -0
- package/dist/astryx/ClickableCard.js +1 -0
- package/dist/astryx/Code.d.ts +1 -0
- package/dist/astryx/Code.js +1 -0
- package/dist/astryx/CodeBlock.d.ts +1 -0
- package/dist/astryx/CodeBlock.js +1 -0
- package/dist/astryx/Collapsible.d.ts +1 -0
- package/dist/astryx/Collapsible.js +1 -0
- package/dist/astryx/CommandPalette.d.ts +1 -0
- package/dist/astryx/CommandPalette.js +1 -0
- package/dist/astryx/ContextMenu.d.ts +1 -0
- package/dist/astryx/ContextMenu.js +1 -0
- package/dist/astryx/DateInput.d.ts +1 -0
- package/dist/astryx/DateInput.js +1 -0
- package/dist/astryx/DateRangeInput.d.ts +1 -0
- package/dist/astryx/DateRangeInput.js +1 -0
- package/dist/astryx/DateTimeInput.d.ts +1 -0
- package/dist/astryx/DateTimeInput.js +1 -0
- package/dist/astryx/Divider.d.ts +1 -0
- package/dist/astryx/Divider.js +1 -0
- package/dist/astryx/DropdownMenu.d.ts +1 -0
- package/dist/astryx/DropdownMenu.js +1 -0
- package/dist/astryx/EmptyState.d.ts +1 -0
- package/dist/astryx/EmptyState.js +1 -0
- package/dist/astryx/Field.d.ts +1 -0
- package/dist/astryx/Field.js +1 -0
- package/dist/astryx/FieldStatus.d.ts +1 -0
- package/dist/astryx/FieldStatus.js +1 -0
- package/dist/astryx/FileInput.d.ts +1 -0
- package/dist/astryx/FileInput.js +1 -0
- package/dist/astryx/FormLayout.d.ts +1 -0
- package/dist/astryx/FormLayout.js +1 -0
- package/dist/astryx/Grid.d.ts +1 -0
- package/dist/astryx/Grid.js +1 -0
- package/dist/astryx/HStack.d.ts +1 -0
- package/dist/astryx/HStack.js +1 -0
- package/dist/astryx/Heading.d.ts +1 -0
- package/dist/astryx/Heading.js +1 -0
- package/dist/astryx/HoverCard.d.ts +1 -0
- package/dist/astryx/HoverCard.js +1 -0
- package/dist/astryx/Icon.d.ts +1 -0
- package/dist/astryx/Icon.js +1 -0
- package/dist/astryx/IconButton.d.ts +1 -0
- package/dist/astryx/IconButton.js +1 -0
- package/dist/astryx/Indicator.d.ts +1 -0
- package/dist/astryx/Indicator.js +1 -0
- package/dist/astryx/InputGroup.d.ts +1 -0
- package/dist/astryx/InputGroup.js +1 -0
- package/dist/astryx/InteractiveRoleContext.d.ts +1 -0
- package/dist/astryx/InteractiveRoleContext.js +1 -0
- package/dist/astryx/Item.d.ts +1 -0
- package/dist/astryx/Item.js +1 -0
- package/dist/astryx/Kbd.d.ts +1 -0
- package/dist/astryx/Kbd.js +1 -0
- package/dist/astryx/Layer.d.ts +1 -0
- package/dist/astryx/Layer.js +1 -0
- package/dist/astryx/Layout.d.ts +1 -0
- package/dist/astryx/Layout.js +1 -0
- package/dist/astryx/Lightbox.d.ts +1 -0
- package/dist/astryx/Lightbox.js +1 -0
- package/dist/astryx/Link.d.ts +1 -0
- package/dist/astryx/Link.js +1 -0
- package/dist/astryx/List.d.ts +1 -0
- package/dist/astryx/List.js +1 -0
- package/dist/astryx/Markdown/parser.d.ts +1 -0
- package/dist/astryx/Markdown/parser.js +1 -0
- package/dist/astryx/Markdown/plugins.d.ts +1 -0
- package/dist/astryx/Markdown/plugins.js +1 -0
- package/dist/astryx/Markdown/remark.d.ts +1 -0
- package/dist/astryx/Markdown/remark.js +1 -0
- package/dist/astryx/Markdown/utils.d.ts +1 -0
- package/dist/astryx/Markdown/utils.js +1 -0
- package/dist/astryx/Markdown.d.ts +1 -0
- package/dist/astryx/Markdown.js +1 -0
- package/dist/astryx/MetadataList.d.ts +1 -0
- package/dist/astryx/MetadataList.js +1 -0
- package/dist/astryx/MobileNav.d.ts +1 -0
- package/dist/astryx/MobileNav.js +1 -0
- package/dist/astryx/MoreMenu.d.ts +1 -0
- package/dist/astryx/MoreMenu.js +1 -0
- package/dist/astryx/MultiSelector.d.ts +1 -0
- package/dist/astryx/MultiSelector.js +1 -0
- package/dist/astryx/NavIcon.d.ts +1 -0
- package/dist/astryx/NavIcon.js +1 -0
- package/dist/astryx/NavMenu.d.ts +1 -0
- package/dist/astryx/NavMenu.js +1 -0
- package/dist/astryx/NumberInput.d.ts +1 -0
- package/dist/astryx/NumberInput.js +1 -0
- package/dist/astryx/Outline.d.ts +1 -0
- package/dist/astryx/Outline.js +1 -0
- package/dist/astryx/OverflowList.d.ts +1 -0
- package/dist/astryx/OverflowList.js +1 -0
- package/dist/astryx/Overlay.d.ts +1 -0
- package/dist/astryx/Overlay.js +1 -0
- package/dist/astryx/Pagination.d.ts +1 -0
- package/dist/astryx/Pagination.js +1 -0
- package/dist/astryx/Popover.d.ts +1 -0
- package/dist/astryx/Popover.js +1 -0
- package/dist/astryx/PowerSearch/utils.d.ts +1 -0
- package/dist/astryx/PowerSearch/utils.js +1 -0
- package/dist/astryx/PowerSearch.d.ts +1 -0
- package/dist/astryx/PowerSearch.js +1 -0
- package/dist/astryx/ProgressBar.d.ts +1 -0
- package/dist/astryx/ProgressBar.js +1 -0
- package/dist/astryx/RadioList.d.ts +1 -0
- package/dist/astryx/RadioList.js +1 -0
- package/dist/astryx/Resizable/utils.d.ts +1 -0
- package/dist/astryx/Resizable/utils.js +1 -0
- package/dist/astryx/Resizable.d.ts +1 -0
- package/dist/astryx/Resizable.js +1 -0
- package/dist/astryx/ScrollableArea.d.ts +1 -0
- package/dist/astryx/ScrollableArea.js +1 -0
- package/dist/astryx/Section.d.ts +1 -0
- package/dist/astryx/Section.js +1 -0
- package/dist/astryx/SegmentedControl.d.ts +1 -0
- package/dist/astryx/SegmentedControl.js +1 -0
- package/dist/astryx/SelectableCard.d.ts +1 -0
- package/dist/astryx/SelectableCard.js +1 -0
- package/dist/astryx/Selector/utils.d.ts +1 -0
- package/dist/astryx/Selector/utils.js +1 -0
- package/dist/astryx/Selector.d.ts +1 -0
- package/dist/astryx/Selector.js +1 -0
- package/dist/astryx/SideNav.d.ts +1 -0
- package/dist/astryx/SideNav.js +1 -0
- package/dist/astryx/SizeContext.d.ts +1 -0
- package/dist/astryx/SizeContext.js +1 -0
- package/dist/astryx/Skeleton.d.ts +1 -0
- package/dist/astryx/Skeleton.js +1 -0
- package/dist/astryx/Slider.d.ts +1 -0
- package/dist/astryx/Slider.js +1 -0
- package/dist/astryx/Spinner.d.ts +1 -0
- package/dist/astryx/Spinner.js +1 -0
- package/dist/astryx/Stack.d.ts +1 -0
- package/dist/astryx/Stack.js +1 -0
- package/dist/astryx/StatusDot.d.ts +1 -0
- package/dist/astryx/StatusDot.js +1 -0
- package/dist/astryx/Stepper.d.ts +1 -0
- package/dist/astryx/Stepper.js +1 -0
- package/dist/astryx/Switch.d.ts +1 -0
- package/dist/astryx/Switch.js +1 -0
- package/dist/astryx/TabList.d.ts +1 -0
- package/dist/astryx/TabList.js +1 -0
- package/dist/astryx/Table/utils.d.ts +1 -0
- package/dist/astryx/Table/utils.js +1 -0
- package/dist/astryx/Table.d.ts +1 -0
- package/dist/astryx/Table.js +1 -0
- package/dist/astryx/Text.d.ts +1 -0
- package/dist/astryx/Text.js +1 -0
- package/dist/astryx/TextArea.d.ts +1 -0
- package/dist/astryx/TextArea.js +1 -0
- package/dist/astryx/TextInput.d.ts +1 -0
- package/dist/astryx/TextInput.js +1 -0
- package/dist/astryx/Thumbnail.d.ts +1 -0
- package/dist/astryx/Thumbnail.js +1 -0
- package/dist/astryx/TimeInput.d.ts +1 -0
- package/dist/astryx/TimeInput.js +1 -0
- package/dist/astryx/Timer.d.ts +1 -0
- package/dist/astryx/Timer.js +1 -0
- package/dist/astryx/Timestamp.d.ts +1 -0
- package/dist/astryx/Timestamp.js +1 -0
- package/dist/astryx/Toast.d.ts +1 -0
- package/dist/astryx/Toast.js +1 -0
- package/dist/astryx/ToggleButton.d.ts +1 -0
- package/dist/astryx/ToggleButton.js +1 -0
- package/dist/astryx/Token.d.ts +1 -0
- package/dist/astryx/Token.js +1 -0
- package/dist/astryx/Tokenizer.d.ts +1 -0
- package/dist/astryx/Tokenizer.js +1 -0
- package/dist/astryx/Toolbar.d.ts +1 -0
- package/dist/astryx/Toolbar.js +1 -0
- package/dist/astryx/Tooltip.d.ts +1 -0
- package/dist/astryx/Tooltip.js +1 -0
- package/dist/astryx/TopNav.d.ts +1 -0
- package/dist/astryx/TopNav.js +1 -0
- package/dist/astryx/TreeList.d.ts +1 -0
- package/dist/astryx/TreeList.js +1 -0
- package/dist/astryx/Typeahead/utils.d.ts +1 -0
- package/dist/astryx/Typeahead/utils.js +1 -0
- package/dist/astryx/Typeahead.d.ts +1 -0
- package/dist/astryx/Typeahead.js +1 -0
- package/dist/astryx/VStack.d.ts +1 -0
- package/dist/astryx/VStack.js +1 -0
- package/dist/astryx/VisuallyHidden.d.ts +1 -0
- package/dist/astryx/VisuallyHidden.js +1 -0
- package/dist/astryx/astryx.css +3 -0
- package/dist/astryx/hooks.d.ts +1 -0
- package/dist/astryx/hooks.js +1 -0
- package/dist/astryx/i18n.d.ts +1 -0
- package/dist/astryx/i18n.js +1 -0
- package/dist/astryx/lab/lab.css +3 -0
- package/dist/astryx/lab.d.ts +6 -0
- package/dist/astryx/lab.js +6 -0
- package/dist/astryx/naming.d.ts +1 -0
- package/dist/astryx/naming.js +1 -0
- package/dist/astryx/reset.css +3 -0
- package/dist/astryx/tailwind-theme.css +3 -0
- package/dist/astryx/theme/neutral/built.d.ts +1 -0
- package/dist/astryx/theme/neutral/built.js +1 -0
- package/dist/astryx/theme/neutral/theme.css +3 -0
- package/dist/astryx/theme/neutral.d.ts +1 -0
- package/dist/astryx/theme/neutral.js +1 -0
- package/dist/astryx/theme/syntax.d.ts +1 -0
- package/dist/astryx/theme/syntax.js +1 -0
- package/dist/astryx/theme/tokens.d.ts +1 -0
- package/dist/astryx/theme/tokens.js +1 -0
- package/dist/astryx/theme/tokens.stylex.d.ts +1 -0
- package/dist/astryx/theme/tokens.stylex.js +1 -0
- package/dist/astryx/theme.d.ts +1 -0
- package/dist/astryx/theme.js +1 -0
- package/dist/astryx/utils.d.ts +1 -0
- package/dist/astryx/utils.js +1 -0
- package/dist/components/AlertModal/AlertModal.d.ts +14 -0
- package/dist/components/AlertModal/AlertModal.js +56 -0
- package/dist/components/AlertModal/AlertModal.js.map +1 -0
- package/dist/components/AlertModal/index.d.ts +2 -0
- package/dist/components/AlertModal/index.js +2 -0
- package/dist/components/BoardItemTitle/BoardItemTitle.d.ts +15 -0
- package/dist/components/BoardItemTitle/BoardItemTitle2.js +42 -0
- package/dist/components/BoardItemTitle/BoardItemTitle2.js.map +1 -0
- package/dist/components/BoardItemTitle/index.d.ts +2 -0
- package/dist/components/BoardItemTitle/index.js +2 -0
- package/dist/components/BooleanToken/BooleanToken.d.ts +15 -0
- package/dist/components/BooleanToken/BooleanToken.js +19 -0
- package/dist/components/BooleanToken/BooleanToken.js.map +1 -0
- package/dist/components/BooleanToken/BooleanToken.messages.d.ts +10 -0
- package/dist/components/BooleanToken/BooleanToken.messages.js +16 -0
- package/dist/components/BooleanToken/BooleanToken.messages.js.map +1 -0
- package/dist/components/BooleanToken/index.d.ts +2 -0
- package/dist/components/BooleanToken/index.js +2 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.d.ts +24 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.js +93 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.js.map +1 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.d.ts +14 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.js +20 -0
- package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.js.map +1 -0
- package/dist/components/BulkEditFormItem/index.d.ts +2 -0
- package/dist/components/BulkEditFormItem/index.js +2 -0
- package/dist/components/BulkErrorModal/BulkErrorModal.d.ts +23 -0
- package/dist/components/BulkErrorModal/BulkErrorModal.messages.d.ts +10 -0
- package/dist/components/BulkErrorModal/BulkErrorModal.messages.js +16 -0
- package/dist/components/BulkErrorModal/BulkErrorModal.messages.js.map +1 -0
- package/dist/components/BulkErrorModal/BulkErrorModal2.js +55 -0
- package/dist/components/BulkErrorModal/BulkErrorModal2.js.map +1 -0
- package/dist/components/BulkErrorModal/index.d.ts +2 -0
- package/dist/components/BulkErrorModal/index.js +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +43 -0
- package/dist/components/ColorPicker/ColorPicker.messages.d.ts +18 -0
- package/dist/components/ColorPicker/ColorPicker.messages.js +24 -0
- package/dist/components/ColorPicker/ColorPicker.messages.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker2.js +117 -0
- package/dist/components/ColorPicker/ColorPicker2.js.map +1 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/index.js +2 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.d.ts +35 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.js +75 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.js.map +1 -0
- package/dist/components/ConfirmPopover/index.d.ts +2 -0
- package/dist/components/ConfirmPopover/index.js +2 -0
- package/dist/components/CountBadge/CountBadge.d.ts +24 -0
- package/dist/components/CountBadge/CountBadge2.js +35 -0
- package/dist/components/CountBadge/CountBadge2.js.map +1 -0
- package/dist/components/CountBadge/index.d.ts +2 -0
- package/dist/components/CountBadge/index.js +2 -0
- package/dist/components/CountdownBorder/CountdownBorder.d.ts +22 -0
- package/dist/components/CountdownBorder/CountdownBorder2.js +63 -0
- package/dist/components/CountdownBorder/CountdownBorder2.js.map +1 -0
- package/dist/components/CountdownBorder/index.d.ts +2 -0
- package/dist/components/CountdownBorder/index.js +2 -0
- package/dist/components/DataGrid/DataGrid.d.ts +212 -0
- package/dist/components/DataGrid/DataGrid.messages.d.ts +70 -0
- package/dist/components/DataGrid/DataGrid.messages.js +76 -0
- package/dist/components/DataGrid/DataGrid.messages.js.map +1 -0
- package/dist/components/DataGrid/DataGrid2.js +447 -0
- package/dist/components/DataGrid/DataGrid2.js.map +1 -0
- package/dist/components/DataGrid/DataGridExportModal.d.ts +30 -0
- package/dist/components/DataGrid/DataGridExportModal.js +125 -0
- package/dist/components/DataGrid/DataGridExportModal.js.map +1 -0
- package/dist/components/DataGrid/DataGridSettingsModal.d.ts +36 -0
- package/dist/components/DataGrid/DataGridSettingsModal.js +177 -0
- package/dist/components/DataGrid/DataGridSettingsModal.js.map +1 -0
- package/dist/components/DataGrid/index.d.ts +6 -0
- package/dist/components/DataGrid/index.js +4 -0
- package/dist/components/DataGrid/nodeToPlainText.d.ts +6 -0
- package/dist/components/DataGrid/nodeToPlainText.js +9 -0
- package/dist/components/DataGrid/nodeToPlainText.js.map +1 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal.d.ts +78 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.d.ts +30 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.js +36 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.js.map +1 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal2.js +102 -0
- package/dist/components/DeleteConfirmModal/DeleteConfirmModal2.js.map +1 -0
- package/dist/components/DeleteConfirmModal/index.d.ts +2 -0
- package/dist/components/DeleteConfirmModal/index.js +2 -0
- package/dist/components/DigitPopIn/DigitPopIn.d.ts +8 -0
- package/dist/components/DigitPopIn/DigitPopIn2.js +30 -0
- package/dist/components/DigitPopIn/DigitPopIn2.js.map +1 -0
- package/dist/components/DigitPopIn/index.d.ts +2 -0
- package/dist/components/DigitPopIn/index.js +2 -0
- package/dist/components/DividedRow/DividedRow.d.ts +27 -0
- package/dist/components/DividedRow/DividedRow2.js +63 -0
- package/dist/components/DividedRow/DividedRow2.js.map +1 -0
- package/dist/components/DividedRow/index.d.ts +2 -0
- package/dist/components/DividedRow/index.js +2 -0
- package/dist/components/DoubleBadge/DoubleBadge.d.ts +14 -0
- package/dist/components/DoubleBadge/DoubleBadge2.js +28 -0
- package/dist/components/DoubleBadge/DoubleBadge2.js.map +1 -0
- package/dist/components/DoubleBadge/index.d.ts +2 -0
- package/dist/components/DoubleBadge/index.js +2 -0
- package/dist/components/DoubleToken/DoubleToken.d.ts +24 -0
- package/dist/components/DoubleToken/DoubleToken2.js +38 -0
- package/dist/components/DoubleToken/DoubleToken2.js.map +1 -0
- package/dist/components/DoubleToken/index.d.ts +2 -0
- package/dist/components/DoubleToken/index.js +2 -0
- package/dist/components/ErrorState/ErrorState.d.ts +7 -16
- package/dist/components/ErrorState/ErrorState2.js +33 -33
- package/dist/components/ErrorState/ErrorState2.js.map +1 -1
- package/dist/components/Form/ErrorList.d.ts +13 -0
- package/dist/components/Form/ErrorList.js +21 -0
- package/dist/components/Form/ErrorList.js.map +1 -0
- package/dist/components/Form/Field.d.ts +88 -0
- package/dist/components/Form/Field.js +212 -0
- package/dist/components/Form/Field.js.map +1 -0
- package/dist/components/Form/Form.d.ts +70 -0
- package/dist/components/Form/Form.js +130 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.messages.d.ts +96 -0
- package/dist/components/Form/Form.messages.js +96 -0
- package/dist/components/Form/Form.messages.js.map +1 -0
- package/dist/components/Form/FormConfigProvider.d.ts +20 -0
- package/dist/components/Form/FormConfigProvider.js +31 -0
- package/dist/components/Form/FormConfigProvider.js.map +1 -0
- package/dist/components/Form/FormItem.d.ts +56 -0
- package/dist/components/Form/FormItem.js +164 -0
- package/dist/components/Form/FormItem.js.map +1 -0
- package/dist/components/Form/FormItemVisual.d.ts +56 -0
- package/dist/components/Form/FormItemVisual2.js +117 -0
- package/dist/components/Form/FormItemVisual2.js.map +1 -0
- package/dist/components/Form/FormStore.d.ts +109 -0
- package/dist/components/Form/FormStore.js +494 -0
- package/dist/components/Form/FormStore.js.map +1 -0
- package/dist/components/Form/List.d.ts +22 -0
- package/dist/components/Form/List.js +65 -0
- package/dist/components/Form/List.js.map +1 -0
- package/dist/components/Form/context.d.ts +91 -0
- package/dist/components/Form/context.js +34 -0
- package/dist/components/Form/context.js.map +1 -0
- package/dist/components/Form/feedbackIcons.d.ts +13 -0
- package/dist/components/Form/feedbackIcons.js +45 -0
- package/dist/components/Form/feedbackIcons.js.map +1 -0
- package/dist/components/Form/index.d.ts +30 -0
- package/dist/components/Form/index.js +18 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Form/interface.d.ts +212 -0
- package/dist/components/Form/isEqual.d.ts +1 -0
- package/dist/components/Form/isEqual.js +61 -0
- package/dist/components/Form/isEqual.js.map +1 -0
- package/dist/components/Form/messages.d.ts +15 -0
- package/dist/components/Form/messages.js +52 -0
- package/dist/components/Form/messages.js.map +1 -0
- package/dist/components/Form/namePath.d.ts +78 -0
- package/dist/components/Form/namePath.js +120 -0
- package/dist/components/Form/namePath.js.map +1 -0
- package/dist/components/Form/useWatch.d.ts +11 -0
- package/dist/components/Form/useWatch.js +43 -0
- package/dist/components/Form/useWatch.js.map +1 -0
- package/dist/components/Form/validate.d.ts +16 -0
- package/dist/components/Form/validate.js +214 -0
- package/dist/components/Form/validate.js.map +1 -0
- package/dist/components/IconWithTooltip/IconWithTooltip.d.ts +19 -0
- package/dist/components/IconWithTooltip/IconWithTooltip2.js +38 -0
- package/dist/components/IconWithTooltip/IconWithTooltip2.js.map +1 -0
- package/dist/components/IconWithTooltip/accessibleLabel.d.ts +2 -0
- package/dist/components/IconWithTooltip/accessibleLabel.js +33 -0
- package/dist/components/IconWithTooltip/accessibleLabel.js.map +1 -0
- package/dist/components/IconWithTooltip/index.d.ts +2 -0
- package/dist/components/IconWithTooltip/index.js +2 -0
- package/dist/components/ImageWithFallback/ImageWithFallback.d.ts +11 -0
- package/dist/components/ImageWithFallback/ImageWithFallback2.js +28 -0
- package/dist/components/ImageWithFallback/ImageWithFallback2.js.map +1 -0
- package/dist/components/ImageWithFallback/index.d.ts +2 -0
- package/dist/components/ImageWithFallback/index.js +2 -0
- package/dist/components/ListBanner/ListBanner.d.ts +17 -0
- package/dist/components/ListBanner/ListBanner2.js +27 -0
- package/dist/components/ListBanner/ListBanner2.js.map +1 -0
- package/dist/components/ListBanner/index.d.ts +2 -0
- package/dist/components/ListBanner/index.js +2 -0
- package/dist/components/Modal/Modal.d.ts +65 -0
- package/dist/components/Modal/Modal2.js +226 -0
- package/dist/components/Modal/Modal2.js.map +1 -0
- package/dist/components/Modal/index.d.ts +15 -0
- package/dist/components/Modal/index.js +4 -0
- package/dist/components/Modal/modalStack.d.ts +65 -0
- package/dist/components/Modal/modalStack.js +81 -0
- package/dist/components/Modal/modalStack.js.map +1 -0
- package/dist/components/NotificationItem/NotificationItem.d.ts +14 -0
- package/dist/components/NotificationItem/NotificationItem2.js +40 -0
- package/dist/components/NotificationItem/NotificationItem2.js.map +1 -0
- package/dist/components/NotificationItem/index.d.ts +2 -0
- package/dist/components/NotificationItem/index.js +2 -0
- package/dist/components/NotificationStack/NotificationStack.d.ts +56 -0
- package/dist/components/NotificationStack/NotificationStack.messages.d.ts +6 -0
- package/dist/components/NotificationStack/NotificationStack.messages.js +10 -0
- package/dist/components/NotificationStack/NotificationStack.messages.js.map +1 -0
- package/dist/components/NotificationStack/NotificationStack2.js +154 -0
- package/dist/components/NotificationStack/NotificationStack2.js.map +1 -0
- package/dist/components/NotificationStack/index.d.ts +2 -0
- package/dist/components/NotificationStack/index.js +2 -0
- package/dist/components/OverlayScrollbar/OverlayScrollbar.d.ts +13 -0
- package/dist/components/OverlayScrollbar/OverlayScrollbar2.js +69 -0
- package/dist/components/OverlayScrollbar/OverlayScrollbar2.js.map +1 -0
- package/dist/components/OverlayScrollbar/index.d.ts +2 -0
- package/dist/components/OverlayScrollbar/index.js +2 -0
- package/dist/components/PageHeader/PageHeader.d.ts +24 -8
- package/dist/components/PageHeader/PageHeader.messages.d.ts +6 -0
- package/dist/components/PageHeader/PageHeader.messages.js +10 -0
- package/dist/components/PageHeader/PageHeader.messages.js.map +1 -0
- package/dist/components/PageHeader/PageHeader2.js +57 -30
- package/dist/components/PageHeader/PageHeader2.js.map +1 -1
- package/dist/components/PageLayout/PageLayout2.js +2 -2
- package/dist/components/PageLayout/PageLayout2.js.map +1 -1
- package/dist/components/PagedSelector/PagedSelector.d.ts +107 -0
- package/dist/components/PagedSelector/PagedSelector.messages.d.ts +30 -0
- package/dist/components/PagedSelector/PagedSelector.messages.js +36 -0
- package/dist/components/PagedSelector/PagedSelector.messages.js.map +1 -0
- package/dist/components/PagedSelector/PagedSelector2.js +220 -0
- package/dist/components/PagedSelector/PagedSelector2.js.map +1 -0
- package/dist/components/PagedSelector/PanelSearchInput.d.ts +22 -0
- package/dist/components/PagedSelector/PanelSearchInput.js +95 -0
- package/dist/components/PagedSelector/PanelSearchInput.js.map +1 -0
- package/dist/components/PagedSelector/index.d.ts +2 -0
- package/dist/components/PagedSelector/index.js +2 -0
- package/dist/components/ProgressWithLabel/ProgressWithLabel.d.ts +26 -0
- package/dist/components/ProgressWithLabel/ProgressWithLabel2.js +44 -0
- package/dist/components/ProgressWithLabel/ProgressWithLabel2.js.map +1 -0
- package/dist/components/ProgressWithLabel/index.d.ts +2 -0
- package/dist/components/ProgressWithLabel/index.js +2 -0
- package/dist/components/SelectionLabel/SelectionLabel.d.ts +23 -0
- package/dist/components/SelectionLabel/SelectionLabel.js +29 -0
- package/dist/components/SelectionLabel/SelectionLabel.js.map +1 -0
- package/dist/components/SelectionLabel/SelectionLabel.messages.d.ts +10 -0
- package/dist/components/SelectionLabel/SelectionLabel.messages.js +16 -0
- package/dist/components/SelectionLabel/SelectionLabel.messages.js.map +1 -0
- package/dist/components/SelectionLabel/index.d.ts +2 -0
- package/dist/components/SelectionLabel/index.js +2 -0
- package/dist/components/Skeleton/Skeleton.messages.d.ts +18 -0
- package/dist/components/Skeleton/Skeleton.messages.js +24 -0
- package/dist/components/Skeleton/Skeleton.messages.js.map +1 -0
- package/dist/components/Skeleton/SkeletonCard.d.ts +4 -9
- package/dist/components/Skeleton/SkeletonCard2.js +53 -53
- package/dist/components/Skeleton/SkeletonCard2.js.map +1 -1
- package/dist/components/Skeleton/SkeletonChart.d.ts +5 -11
- package/dist/components/Skeleton/SkeletonChart2.js +51 -45
- package/dist/components/Skeleton/SkeletonChart2.js.map +1 -1
- package/dist/components/Skeleton/SkeletonRow.d.ts +5 -10
- package/dist/components/Skeleton/SkeletonRow2.js +35 -34
- package/dist/components/Skeleton/SkeletonRow2.js.map +1 -1
- package/dist/components/Skeleton/SkeletonShape.d.ts +10 -0
- package/dist/components/Skeleton/SkeletonShape2.js +23 -0
- package/dist/components/Skeleton/SkeletonShape2.js.map +1 -0
- package/dist/components/Skeleton/SkeletonText.d.ts +4 -9
- package/dist/components/Skeleton/SkeletonText2.js +22 -17
- package/dist/components/Skeleton/SkeletonText2.js.map +1 -1
- package/dist/components/Skeleton/index.d.ts +3 -5
- package/dist/components/Skeleton/index.js +4 -5
- package/dist/components/SmoothHeight/SmoothHeight2.js +2 -2
- package/dist/components/SmoothHeight/SmoothHeight2.js.map +1 -1
- package/dist/components/StatCard/StatCard.d.ts +28 -16
- package/dist/components/StatCard/StatCard2.js +96 -89
- package/dist/components/StatCard/StatCard2.js.map +1 -1
- package/dist/components/StatCard/index.d.ts +1 -1
- package/dist/components/Statistic/Statistic.d.ts +30 -0
- package/dist/components/Statistic/Statistic.messages.d.ts +6 -0
- package/dist/components/Statistic/Statistic.messages.js +10 -0
- package/dist/components/Statistic/Statistic.messages.js.map +1 -0
- package/dist/components/Statistic/Statistic2.js +75 -0
- package/dist/components/Statistic/Statistic2.js.map +1 -0
- package/dist/components/Statistic/index.d.ts +2 -0
- package/dist/components/Statistic/index.js +2 -0
- package/dist/components/StepNumberInput/NumberStepper.d.ts +29 -0
- package/dist/components/StepNumberInput/NumberStepper.messages.d.ts +10 -0
- package/dist/components/StepNumberInput/NumberStepper.messages.js +16 -0
- package/dist/components/StepNumberInput/NumberStepper.messages.js.map +1 -0
- package/dist/components/StepNumberInput/NumberStepper2.js +50 -0
- package/dist/components/StepNumberInput/NumberStepper2.js.map +1 -0
- package/dist/components/StepNumberInput/StepNumberInput.d.ts +33 -0
- package/dist/components/StepNumberInput/StepNumberInput.js +48 -0
- package/dist/components/StepNumberInput/StepNumberInput.js.map +1 -0
- package/dist/components/StepNumberInput/index.d.ts +4 -0
- package/dist/components/StepNumberInput/index.js +3 -0
- package/dist/components/TextHighlighter/TextHighlighter.d.ts +14 -0
- package/dist/components/TextHighlighter/TextHighlighter2.js +29 -0
- package/dist/components/TextHighlighter/TextHighlighter2.js.map +1 -0
- package/dist/components/TextHighlighter/index.d.ts +2 -0
- package/dist/components/TextHighlighter/index.js +2 -0
- package/dist/components/TokenList/TokenList.d.ts +18 -0
- package/dist/components/TokenList/TokenList2.js +55 -0
- package/dist/components/TokenList/TokenList2.js.map +1 -0
- package/dist/components/TokenList/index.d.ts +2 -0
- package/dist/components/TokenList/index.js +2 -0
- package/dist/components/TokenRow/TokenRow.d.ts +27 -0
- package/dist/components/TokenRow/TokenRow.messages.d.ts +6 -0
- package/dist/components/TokenRow/TokenRow.messages.js +10 -0
- package/dist/components/TokenRow/TokenRow.messages.js.map +1 -0
- package/dist/components/TokenRow/TokenRow2.js +29 -0
- package/dist/components/TokenRow/TokenRow2.js.map +1 -0
- package/dist/components/TokenRow/index.d.ts +2 -0
- package/dist/components/TokenRow/index.js +2 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.d.ts +29 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.js +49 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.js.map +1 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.messages.d.ts +6 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.messages.js +10 -0
- package/dist/components/UncontrolledInput/UncontrolledInput.messages.js.map +1 -0
- package/dist/components/UncontrolledInput/index.d.ts +2 -0
- package/dist/components/UncontrolledInput/index.js +2 -0
- package/dist/components/UnitGrid/UnitGrid.d.ts +56 -0
- package/dist/components/UnitGrid/UnitGrid.geometry.d.ts +102 -0
- package/dist/components/UnitGrid/UnitGrid.geometry.js +172 -0
- package/dist/components/UnitGrid/UnitGrid.geometry.js.map +1 -0
- package/dist/components/UnitGrid/UnitGrid.messages.d.ts +14 -0
- package/dist/components/UnitGrid/UnitGrid.messages.js +20 -0
- package/dist/components/UnitGrid/UnitGrid.messages.js.map +1 -0
- package/dist/components/UnitGrid/UnitGrid2.js +393 -0
- package/dist/components/UnitGrid/UnitGrid2.js.map +1 -0
- package/dist/components/UnitGrid/UnitGridSkeleton.d.ts +9 -0
- package/dist/components/UnitGrid/UnitGridSkeleton.js +73 -0
- package/dist/components/UnitGrid/UnitGridSkeleton.js.map +1 -0
- package/dist/components/UnitGrid/index.d.ts +4 -0
- package/dist/components/UnitGrid/index.js +3 -0
- package/dist/forks/ComplexSelector/ComplexSelector.d.ts +144 -0
- package/dist/forks/ComplexSelector/ComplexSelector.js +157 -0
- package/dist/forks/ComplexSelector/ComplexSelector.js.map +1 -0
- package/dist/forks/ComplexSelector/ComplexSelector.styles.d.ts +129 -0
- package/dist/forks/ComplexSelector/ComplexSelector.styles.js +133 -0
- package/dist/forks/ComplexSelector/ComplexSelector.styles.js.map +1 -0
- package/dist/forks/ComplexSelector/index.d.ts +7 -0
- package/dist/forks/ComplexSelector/index.js +2 -0
- package/dist/forks/Drawer/Drawer.d.ts +109 -0
- package/dist/forks/Drawer/Drawer.js +76 -0
- package/dist/forks/Drawer/Drawer.js.map +1 -0
- package/dist/forks/Drawer/Drawer.styles.d.ts +106 -0
- package/dist/forks/Drawer/Drawer.styles.js +104 -0
- package/dist/forks/Drawer/Drawer.styles.js.map +1 -0
- package/dist/forks/Drawer/index.d.ts +6 -0
- package/dist/forks/Drawer/index.js +2 -0
- package/dist/forks/Drawer/useDrawerDialogPresence.d.ts +20 -0
- package/dist/forks/Drawer/useDrawerDialogPresence.js +83 -0
- package/dist/forks/Drawer/useDrawerDialogPresence.js.map +1 -0
- package/dist/forks/Tour/Tour.d.ts +58 -0
- package/dist/forks/Tour/Tour.js +55 -0
- package/dist/forks/Tour/Tour.js.map +1 -0
- package/dist/forks/Tour/TourContext.d.ts +37 -0
- package/dist/forks/Tour/TourContext.js +8 -0
- package/dist/forks/Tour/TourContext.js.map +1 -0
- package/dist/forks/Tour/TourStep.d.ts +43 -0
- package/dist/forks/Tour/TourStep.js +134 -0
- package/dist/forks/Tour/TourStep.js.map +1 -0
- package/dist/forks/Tour/TourStep.styles.d.ts +23 -0
- package/dist/forks/Tour/TourStep.styles.js +28 -0
- package/dist/forks/Tour/TourStep.styles.js.map +1 -0
- package/dist/forks/Tour/index.d.ts +11 -0
- package/dist/forks/Tour/index.js +4 -0
- package/dist/forks/Tour/useTour.d.ts +26 -0
- package/dist/forks/Tour/useTour.js +20 -0
- package/dist/forks/Tour/useTour.js.map +1 -0
- package/dist/forks/compiled.d.ts +5 -0
- package/dist/forks/compiled.js +8 -0
- package/dist/forks/compiled.js.map +1 -0
- package/dist/i18n/catalog.d.ts +12 -0
- package/dist/i18n/catalog.js +46 -0
- package/dist/i18n/catalog.js.map +1 -0
- package/dist/i18n/common.messages.d.ts +31 -0
- package/dist/i18n/common.messages.js +32 -0
- package/dist/i18n/common.messages.js.map +1 -0
- package/dist/i18n/index.d.ts +21 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/locales/de-DE.js +331 -0
- package/dist/i18n/locales/de-DE.js.map +1 -0
- package/dist/i18n/locales/el-GR.js +331 -0
- package/dist/i18n/locales/el-GR.js.map +1 -0
- package/dist/i18n/locales/es-ES.js +331 -0
- package/dist/i18n/locales/es-ES.js.map +1 -0
- package/dist/i18n/locales/fi-FI.js +331 -0
- package/dist/i18n/locales/fi-FI.js.map +1 -0
- package/dist/i18n/locales/fr-FR.js +331 -0
- package/dist/i18n/locales/fr-FR.js.map +1 -0
- package/dist/i18n/locales/id-ID.js +331 -0
- package/dist/i18n/locales/id-ID.js.map +1 -0
- package/dist/i18n/locales/it-IT.js +331 -0
- package/dist/i18n/locales/it-IT.js.map +1 -0
- package/dist/i18n/locales/ja-JP.js +351 -0
- package/dist/i18n/locales/ja-JP.js.map +1 -0
- package/dist/i18n/locales/ko-KR.js +351 -0
- package/dist/i18n/locales/ko-KR.js.map +1 -0
- package/dist/i18n/locales/mn-MN.js +327 -0
- package/dist/i18n/locales/mn-MN.js.map +1 -0
- package/dist/i18n/locales/ms-MY.js +331 -0
- package/dist/i18n/locales/ms-MY.js.map +1 -0
- package/dist/i18n/locales/pl-PL.js +331 -0
- package/dist/i18n/locales/pl-PL.js.map +1 -0
- package/dist/i18n/locales/pt-BR.js +331 -0
- package/dist/i18n/locales/pt-BR.js.map +1 -0
- package/dist/i18n/locales/pt-PT.js +331 -0
- package/dist/i18n/locales/pt-PT.js.map +1 -0
- package/dist/i18n/locales/ru-RU.js +331 -0
- package/dist/i18n/locales/ru-RU.js.map +1 -0
- package/dist/i18n/locales/th-TH.js +331 -0
- package/dist/i18n/locales/th-TH.js.map +1 -0
- package/dist/i18n/locales/tr-TR.js +331 -0
- package/dist/i18n/locales/tr-TR.js.map +1 -0
- package/dist/i18n/locales/vi-VN.js +331 -0
- package/dist/i18n/locales/vi-VN.js.map +1 -0
- package/dist/i18n/locales/zh-CN.js +331 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -0
- package/dist/i18n/locales/zh-TW.js +331 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -0
- package/dist/i18n/messages.d.ts +13 -0
- package/dist/i18n/messages.js +63 -0
- package/dist/i18n/messages.js.map +1 -0
- package/dist/i18n/translateWithNodes.d.ts +3 -0
- package/dist/i18n/translateWithNodes.js +14 -0
- package/dist/i18n/translateWithNodes.js.map +1 -0
- package/dist/i18n/useUicTranslator.d.ts +5 -0
- package/dist/i18n/useUicTranslator.js +38 -0
- package/dist/i18n/useUicTranslator.js.map +1 -0
- package/dist/index.d.ts +101 -27
- package/dist/index.js +63 -23
- package/dist/instance.d.ts +31 -0
- package/dist/instance.js +33 -0
- package/dist/instance.js.map +1 -0
- package/dist/legacy-tokens.css +177 -0
- package/dist/locales/af-ZA.generated.d.ts +8 -0
- package/dist/locales/af-ZA.generated.js +381 -0
- package/dist/locales/af-ZA.json +1483 -0
- package/dist/locales/ar-SA.generated.d.ts +8 -0
- package/dist/locales/ar-SA.generated.js +381 -0
- package/dist/locales/ar-SA.json +1483 -0
- package/dist/locales/ca-ES.generated.d.ts +8 -0
- package/dist/locales/ca-ES.generated.js +381 -0
- package/dist/locales/ca-ES.json +1483 -0
- package/dist/locales/cs-CZ.generated.d.ts +8 -0
- package/dist/locales/cs-CZ.generated.js +381 -0
- package/dist/locales/cs-CZ.json +1483 -0
- package/dist/locales/da-DK.generated.d.ts +8 -0
- package/dist/locales/da-DK.generated.js +381 -0
- package/dist/locales/da-DK.json +1483 -0
- package/dist/locales/de-DE.generated.d.ts +8 -0
- package/dist/locales/de-DE.generated.js +381 -0
- package/dist/locales/de-DE.json +1483 -0
- package/dist/locales/el-GR.generated.d.ts +8 -0
- package/dist/locales/el-GR.generated.js +381 -0
- package/dist/locales/el-GR.json +1483 -0
- package/dist/locales/en.generated.d.ts +8 -0
- package/dist/locales/en.generated.js +385 -0
- package/dist/locales/en.json +1498 -0
- package/dist/locales/es-ES.generated.d.ts +8 -0
- package/dist/locales/es-ES.generated.js +381 -0
- package/dist/locales/es-ES.json +1483 -0
- package/dist/locales/fi-FI.generated.d.ts +8 -0
- package/dist/locales/fi-FI.generated.js +381 -0
- package/dist/locales/fi-FI.json +1483 -0
- package/dist/locales/fr-FR.generated.d.ts +8 -0
- package/dist/locales/fr-FR.generated.js +381 -0
- package/dist/locales/fr-FR.json +1483 -0
- package/dist/locales/he-IL.generated.d.ts +8 -0
- package/dist/locales/he-IL.generated.js +381 -0
- package/dist/locales/he-IL.json +1483 -0
- package/dist/locales/hu-HU.generated.d.ts +8 -0
- package/dist/locales/hu-HU.generated.js +381 -0
- package/dist/locales/hu-HU.json +1483 -0
- package/dist/locales/it-IT.generated.d.ts +8 -0
- package/dist/locales/it-IT.generated.js +381 -0
- package/dist/locales/it-IT.json +1483 -0
- package/dist/locales/ja-JP.generated.d.ts +8 -0
- package/dist/locales/ja-JP.generated.js +381 -0
- package/dist/locales/ja-JP.json +1483 -0
- package/dist/locales/ko-KR.generated.d.ts +8 -0
- package/dist/locales/ko-KR.generated.js +381 -0
- package/dist/locales/ko-KR.json +1483 -0
- package/dist/locales/nl-NL.generated.d.ts +8 -0
- package/dist/locales/nl-NL.generated.js +381 -0
- package/dist/locales/nl-NL.json +1483 -0
- package/dist/locales/no-NO.generated.d.ts +8 -0
- package/dist/locales/no-NO.generated.js +381 -0
- package/dist/locales/no-NO.json +1483 -0
- package/dist/locales/pl-PL.generated.d.ts +8 -0
- package/dist/locales/pl-PL.generated.js +381 -0
- package/dist/locales/pl-PL.json +1483 -0
- package/dist/locales/pseudo.generated.d.ts +8 -0
- package/dist/locales/pseudo.generated.js +385 -0
- package/dist/locales/pseudo.json +1124 -0
- package/dist/locales/pt-BR.generated.d.ts +8 -0
- package/dist/locales/pt-BR.generated.js +381 -0
- package/dist/locales/pt-BR.json +1483 -0
- package/dist/locales/pt-PT.generated.d.ts +8 -0
- package/dist/locales/pt-PT.generated.js +381 -0
- package/dist/locales/pt-PT.json +1483 -0
- package/dist/locales/ro-RO.generated.d.ts +8 -0
- package/dist/locales/ro-RO.generated.js +381 -0
- package/dist/locales/ro-RO.json +1483 -0
- package/dist/locales/ru-RU.generated.d.ts +8 -0
- package/dist/locales/ru-RU.generated.js +381 -0
- package/dist/locales/ru-RU.json +1483 -0
- package/dist/locales/sr-SP.generated.d.ts +8 -0
- package/dist/locales/sr-SP.generated.js +381 -0
- package/dist/locales/sr-SP.json +1483 -0
- package/dist/locales/sv-SE.generated.d.ts +8 -0
- package/dist/locales/sv-SE.generated.js +381 -0
- package/dist/locales/sv-SE.json +1483 -0
- package/dist/locales/tr-TR.generated.d.ts +8 -0
- package/dist/locales/tr-TR.generated.js +381 -0
- package/dist/locales/tr-TR.json +1483 -0
- package/dist/locales/uk-UA.generated.d.ts +8 -0
- package/dist/locales/uk-UA.generated.js +381 -0
- package/dist/locales/uk-UA.json +1483 -0
- package/dist/locales/vi-VN.generated.d.ts +8 -0
- package/dist/locales/vi-VN.generated.js +381 -0
- package/dist/locales/vi-VN.json +1483 -0
- package/dist/locales/zh-CN.generated.d.ts +8 -0
- package/dist/locales/zh-CN.generated.js +381 -0
- package/dist/locales/zh-CN.json +1483 -0
- package/dist/locales/zh-TW.generated.d.ts +8 -0
- package/dist/locales/zh-TW.generated.js +381 -0
- package/dist/locales/zh-TW.json +1483 -0
- package/dist/styles/base.css +24 -2
- package/dist/styles/themes/orange-dark.css +4 -0
- package/dist/styles/themes/orange-light.css +4 -0
- package/dist/theme/lablup/built/lablup.d.ts +13 -0
- package/dist/theme/lablup/built/lablup.js +567 -0
- package/dist/theme/lablup/built/lablup.variants.d.ts +16 -0
- package/dist/theme/lablup/built/theme.css +720 -0
- package/dist/theme/lablup/index.d.ts +9 -0
- package/dist/theme/lablup/index.js +2 -0
- package/dist/theme/lablup/lablupTheme.d.ts +10 -0
- package/dist/theme/lablup/lablupTheme.js +21 -0
- package/dist/theme/lablup/lablupTheme.js.map +1 -0
- package/dist/ui-common-locales/de-DE.json +326 -0
- package/dist/ui-common-locales/el-GR.json +326 -0
- package/dist/ui-common-locales/en.json +346 -0
- package/dist/ui-common-locales/es-ES.json +326 -0
- package/dist/ui-common-locales/fi-FI.json +326 -0
- package/dist/ui-common-locales/fr-FR.json +326 -0
- package/dist/ui-common-locales/id-ID.json +326 -0
- package/dist/ui-common-locales/it-IT.json +326 -0
- package/dist/ui-common-locales/ja-JP.json +346 -0
- package/dist/ui-common-locales/ko-KR.json +346 -0
- package/dist/ui-common-locales/mn-MN.json +322 -0
- package/dist/ui-common-locales/ms-MY.json +326 -0
- package/dist/ui-common-locales/pl-PL.json +326 -0
- package/dist/ui-common-locales/pt-BR.json +326 -0
- package/dist/ui-common-locales/pt-PT.json +326 -0
- package/dist/ui-common-locales/ru-RU.json +326 -0
- package/dist/ui-common-locales/th-TH.json +326 -0
- package/dist/ui-common-locales/tr-TR.json +326 -0
- package/dist/ui-common-locales/vi-VN.json +326 -0
- package/dist/ui-common-locales/zh-CN.json +326 -0
- package/dist/ui-common-locales/zh-TW.json +326 -0
- package/dist/ui-common.css +51 -0
- package/exports.customs.json +62 -0
- package/exports.exclude.json +47 -0
- package/package.json +585 -21
- package/dist/assets/components/Badge/Badge.css +0 -1
- package/dist/assets/components/BaseCard/BaseCard.css +0 -1
- package/dist/assets/components/Button/Button.css +0 -1
- package/dist/assets/components/DataTable/DataTable.css +0 -1
- package/dist/assets/components/Drawer/Drawer.css +0 -1
- package/dist/assets/components/EmptyState/EmptyState.css +0 -1
- package/dist/assets/components/ProgressBar/ProgressBar.css +0 -1
- package/dist/assets/components/Skeleton/Skeleton.css +0 -1
- package/dist/assets/components/StatusTag/StatusTag.css +0 -1
- package/dist/assets/components/Tabs/Tabs.css +0 -1
- package/dist/assets/components/Tooltip/Tooltip.css +0 -1
- package/dist/components/Badge/Badge.d.ts +0 -7
- package/dist/components/Badge/Badge2.js +0 -20
- package/dist/components/Badge/Badge2.js.map +0 -1
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Badge/index.js +0 -2
- package/dist/components/BaseCard/BaseCard.d.ts +0 -57
- package/dist/components/BaseCard/BaseCard2.js +0 -37
- package/dist/components/BaseCard/BaseCard2.js.map +0 -1
- package/dist/components/BaseCard/index.d.ts +0 -2
- package/dist/components/BaseCard/index.js +0 -2
- package/dist/components/Button/Button.d.ts +0 -54
- package/dist/components/Button/Button2.js +0 -75
- package/dist/components/Button/Button2.js.map +0 -1
- package/dist/components/Button/index.d.ts +0 -5
- package/dist/components/Button/index.js +0 -2
- package/dist/components/DataTable/DataTable.d.ts +0 -144
- package/dist/components/DataTable/DataTable2.js +0 -244
- package/dist/components/DataTable/DataTable2.js.map +0 -1
- package/dist/components/DataTable/index.d.ts +0 -2
- package/dist/components/DataTable/index.js +0 -2
- package/dist/components/Drawer/Drawer.d.ts +0 -25
- package/dist/components/Drawer/Drawer2.js +0 -107
- package/dist/components/Drawer/Drawer2.js.map +0 -1
- package/dist/components/Drawer/index.d.ts +0 -2
- package/dist/components/Drawer/index.js +0 -2
- package/dist/components/EmptyState/EmptyState.d.ts +0 -52
- package/dist/components/EmptyState/EmptyState.example.d.ts +0 -8
- package/dist/components/EmptyState/EmptyState2.js +0 -62
- package/dist/components/EmptyState/EmptyState2.js.map +0 -1
- package/dist/components/EmptyState/index.d.ts +0 -10
- package/dist/components/EmptyState/index.js +0 -2
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -22
- package/dist/components/ProgressBar/ProgressBar2.js +0 -37
- package/dist/components/ProgressBar/ProgressBar2.js.map +0 -1
- package/dist/components/ProgressBar/index.d.ts +0 -2
- package/dist/components/ProgressBar/index.js +0 -2
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton2.js +0 -27
- package/dist/components/Skeleton/Skeleton2.js.map +0 -1
- package/dist/components/StatusTag/StatusTag.d.ts +0 -38
- package/dist/components/StatusTag/StatusTag2.js +0 -45
- package/dist/components/StatusTag/StatusTag2.js.map +0 -1
- package/dist/components/StatusTag/index.d.ts +0 -2
- package/dist/components/StatusTag/index.js +0 -2
- package/dist/components/Tabs/Tabs.d.ts +0 -94
- package/dist/components/Tabs/Tabs2.js +0 -412
- package/dist/components/Tabs/Tabs2.js.map +0 -1
- package/dist/components/Tabs/index.d.ts +0 -2
- package/dist/components/Tabs/index.js +0 -2
- package/dist/components/Tooltip/Tooltip.d.ts +0 -16
- package/dist/components/Tooltip/Tooltip2.js +0 -68
- package/dist/components/Tooltip/Tooltip2.js.map +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/Tooltip/index.js +0 -2
- package/dist/hooks/index.js +0 -2
- package/dist/icons/AlertCircleIcon.d.ts +0 -11
- package/dist/icons/AlertCircleIcon.js +0 -26
- package/dist/icons/AlertCircleIcon.js.map +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { FieldContext as e, FormConfigContext as t, FormItemLayoutContext as n, FormProviderContext as r, HOOK_MARK as i, ListContext as a } from "./context.js";
|
|
2
|
+
import { mergeValidateMessages as o } from "./messages.js";
|
|
3
|
+
import s from "./FormStore.js";
|
|
4
|
+
import { useFormValidateMessages as c } from "./FormConfigProvider.js";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
7
|
+
var d = l.forwardRef((d, f) => {
|
|
8
|
+
let { name: p, initialValues: m, form: h, preserve: g, children: _, component: v = "form", validateMessages: y, validateTrigger: b = "onChange", onValuesChange: x, onFieldsChange: S, onFinish: C, onFinishFailed: w, clearOnDestroy: T, layout: E = "horizontal", requiredMark: D, disabled: O, scrollToFirstError: k, size: A, labelCol: j, wrapperCol: M, colon: N, labelAlign: P, labelWrap: F, ...I } = d, L = l.useRef(null), R = l.useContext(r), z = l.useContext(t), B = c(), [V] = s(h), { useSubscribe: H, setInitialValues: U, setCallbacks: W, setValidateMessages: G, setPreserve: K, destroyForm: q } = V.getInternalHooks(i);
|
|
9
|
+
l.useImperativeHandle(f, () => ({
|
|
10
|
+
...V,
|
|
11
|
+
nativeElement: L.current
|
|
12
|
+
})), l.useEffect(() => (R.registerForm(p, V), () => {
|
|
13
|
+
R.unregisterForm(p);
|
|
14
|
+
}), [
|
|
15
|
+
R,
|
|
16
|
+
V,
|
|
17
|
+
p
|
|
18
|
+
]), G(o(B, z.validateMessages, R.validateMessages, y)), W({
|
|
19
|
+
onValuesChange: x,
|
|
20
|
+
onFieldsChange: (e, ...t) => {
|
|
21
|
+
R.triggerFormChange(p, e), S?.(e, ...t);
|
|
22
|
+
},
|
|
23
|
+
onFinish: (e) => {
|
|
24
|
+
R.triggerFormFinish(p, e), C?.(e);
|
|
25
|
+
},
|
|
26
|
+
onFinishFailed: (e) => {
|
|
27
|
+
if (k && e.errorFields.length) {
|
|
28
|
+
let t = typeof k == "object" ? k : {};
|
|
29
|
+
V.scrollToField(e.errorFields[0].name, {
|
|
30
|
+
focus: !0,
|
|
31
|
+
...t
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
w?.(e);
|
|
35
|
+
}
|
|
36
|
+
}), K(g), l.useState(() => (U(m, !0), null)), U(m, !1), l.useEffect(() => () => q(T), []), H(!0);
|
|
37
|
+
let J = l.useMemo(() => ({
|
|
38
|
+
...V,
|
|
39
|
+
validateTrigger: b
|
|
40
|
+
}), [V, b]), Y = l.useMemo(() => ({
|
|
41
|
+
form: V,
|
|
42
|
+
layout: E,
|
|
43
|
+
requiredMark: D ?? z.requiredMark,
|
|
44
|
+
disabled: O,
|
|
45
|
+
name: p,
|
|
46
|
+
size: A,
|
|
47
|
+
colon: N,
|
|
48
|
+
labelAlign: P,
|
|
49
|
+
labelCol: j,
|
|
50
|
+
wrapperCol: M,
|
|
51
|
+
labelWrap: F
|
|
52
|
+
}), [
|
|
53
|
+
V,
|
|
54
|
+
E,
|
|
55
|
+
D,
|
|
56
|
+
z.requiredMark,
|
|
57
|
+
O,
|
|
58
|
+
p,
|
|
59
|
+
A,
|
|
60
|
+
N,
|
|
61
|
+
P,
|
|
62
|
+
j,
|
|
63
|
+
M,
|
|
64
|
+
F
|
|
65
|
+
]), X = /* @__PURE__ */ u(a.Provider, {
|
|
66
|
+
value: null,
|
|
67
|
+
children: /* @__PURE__ */ u(n.Provider, {
|
|
68
|
+
value: Y,
|
|
69
|
+
children: /* @__PURE__ */ u(e.Provider, {
|
|
70
|
+
value: J,
|
|
71
|
+
children: _
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
return v === !1 ? X : /* @__PURE__ */ u(v, {
|
|
76
|
+
...I,
|
|
77
|
+
className: ["uic-form", I.className].filter(Boolean).join(" "),
|
|
78
|
+
"data-layout": E,
|
|
79
|
+
"data-size": A,
|
|
80
|
+
ref: L,
|
|
81
|
+
onSubmit: (e) => {
|
|
82
|
+
e.preventDefault(), e.stopPropagation(), V.submit();
|
|
83
|
+
},
|
|
84
|
+
onReset: (e) => {
|
|
85
|
+
e.preventDefault(), V.resetFields();
|
|
86
|
+
},
|
|
87
|
+
children: X
|
|
88
|
+
});
|
|
89
|
+
}), f = ({ validateMessages: e, onFormChange: t, onFormFinish: n, children: i }) => {
|
|
90
|
+
let a = l.useContext(r), o = l.useRef({}), s = {
|
|
91
|
+
...a,
|
|
92
|
+
validateMessages: {
|
|
93
|
+
...a.validateMessages,
|
|
94
|
+
...e
|
|
95
|
+
},
|
|
96
|
+
triggerFormChange: (e, n) => {
|
|
97
|
+
t?.(e, {
|
|
98
|
+
changedFields: n,
|
|
99
|
+
forms: o.current
|
|
100
|
+
}), a.triggerFormChange(e, n);
|
|
101
|
+
},
|
|
102
|
+
triggerFormFinish: (e, t) => {
|
|
103
|
+
n?.(e, {
|
|
104
|
+
values: t,
|
|
105
|
+
forms: o.current
|
|
106
|
+
}), a.triggerFormFinish(e, t);
|
|
107
|
+
},
|
|
108
|
+
registerForm: (e, t) => {
|
|
109
|
+
e && (o.current = {
|
|
110
|
+
...o.current,
|
|
111
|
+
[e]: t
|
|
112
|
+
}), a.registerForm(e, t);
|
|
113
|
+
},
|
|
114
|
+
unregisterForm: (e) => {
|
|
115
|
+
if (e) {
|
|
116
|
+
let t = { ...o.current };
|
|
117
|
+
delete t[e], o.current = t;
|
|
118
|
+
}
|
|
119
|
+
a.unregisterForm(e);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
return /* @__PURE__ */ u(r.Provider, {
|
|
123
|
+
value: s,
|
|
124
|
+
children: i
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { f as FormProvider, d as default, s as useForm };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","names":[],"sources":["../../../src/components/Form/Form.tsx"],"sourcesContent":["/**\n * `<Form>`: store wiring, contexts and submit/reset plumbing (rc-field-form's\n * `<Form>`) plus layout, `requiredMark`, `disabled` and `scrollToFirstError`\n * (antd's `<Form>`).\n *\n * `layout` defaults to `'horizontal'`, as in antd: a form that states no\n * layout but passes a `labelCol` span only makes sense horizontally.\n */\nimport useForm, { FormStore } from \"./FormStore\";\nimport {\n FieldContext,\n FormConfigContext,\n FormItemLayoutContext,\n FormProviderContext,\n HOOK_MARK,\n ListContext,\n type FormItemCol,\n type FormLayout,\n type FormProviderContextValue,\n type FormSize,\n type RequiredMark,\n} from \"./context\";\nimport type {\n Callbacks,\n FieldData,\n FormInstance,\n InternalFormInstance,\n ValidateErrorEntity,\n ValidateMessages,\n} from \"./interface\";\nimport { useFormValidateMessages } from \"./FormConfigProvider\";\nimport { mergeValidateMessages } from \"./messages\";\nimport type { Store } from \"./namePath\";\nimport * as React from \"react\";\n\nexport interface FormProps<Values = any> extends Omit<\n React.FormHTMLAttributes<HTMLFormElement>,\n \"onSubmit\" | \"children\" | \"onChange\" | \"onReset\"\n> {\n form?: FormInstance<Values>;\n name?: string;\n initialValues?: Store;\n /** `false` drops unmounted fields' values; the default `true` keeps them. */\n preserve?: boolean;\n layout?: FormLayout;\n requiredMark?: RequiredMark;\n disabled?: boolean;\n size?: FormSize;\n labelCol?: FormItemCol;\n wrapperCol?: FormItemCol;\n colon?: boolean;\n labelAlign?: \"left\" | \"right\";\n labelWrap?: boolean;\n validateMessages?: ValidateMessages;\n validateTrigger?: string | string[] | false;\n scrollToFirstError?: boolean | Record<string, unknown>;\n clearOnDestroy?: boolean;\n onValuesChange?: Callbacks<Values>[\"onValuesChange\"];\n onFieldsChange?: Callbacks<Values>[\"onFieldsChange\"];\n onFinish?: Callbacks<Values>[\"onFinish\"];\n onFinishFailed?: Callbacks<Values>[\"onFinishFailed\"];\n /** `false` renders no wrapper element at all (context only). */\n component?: React.ComponentType<any> | string | false;\n children?: React.ReactNode;\n}\n\n/**\n * What `<Form ref>` hands back. `nativeElement` is OPTIONAL on purpose: call\n * sites declare `useRef<FormInstance>(null)`, and a required extra member\n * would make that ref type unassignable to the element's `ref` prop.\n */\nexport type FormRef<Values = any> = FormInstance<Values> & {\n nativeElement?: HTMLElement | null;\n};\n\nconst InternalForm = <Values,>(\n props: FormProps<Values>,\n ref: React.Ref<FormRef<Values>>,\n) => {\n const {\n name,\n initialValues,\n form,\n preserve,\n children,\n component: Component = \"form\",\n validateMessages,\n validateTrigger = \"onChange\",\n onValuesChange,\n onFieldsChange,\n onFinish,\n onFinishFailed,\n clearOnDestroy,\n layout = \"horizontal\",\n requiredMark,\n disabled,\n scrollToFirstError,\n // Visual props antd consumed through its stylesheet + `FormContext`. They\n // are published on the layout context (never forwarded onto the DOM node,\n // where React would warn) and the visual shell lays out from them.\n size,\n labelCol,\n wrapperCol,\n colon,\n labelAlign,\n labelWrap,\n ...restProps\n } = props;\n\n const nativeElementRef = React.useRef<HTMLElement | null>(null);\n const formProviderContext = React.useContext(FormProviderContext);\n const formConfig = React.useContext(FormConfigContext);\n const localizedMessages = useFormValidateMessages();\n\n const [formInstance] = useForm(form as InternalFormInstance | undefined);\n const hooks = formInstance.getInternalHooks(HOOK_MARK)!;\n const {\n useSubscribe,\n setInitialValues,\n setCallbacks,\n setValidateMessages,\n setPreserve,\n destroyForm,\n } = hooks;\n\n React.useImperativeHandle(\n ref,\n () =>\n ({\n ...formInstance,\n nativeElement: nativeElementRef.current,\n }) as FormRef<Values>,\n );\n\n React.useEffect(() => {\n formProviderContext.registerForm(name, formInstance);\n return () => {\n formProviderContext.unregisterForm(name);\n };\n }, [formProviderContext, formInstance, name]);\n\n // Templates: the catalog in the active locale < app config < Form.Provider\n // < this form's own prop.\n setValidateMessages(\n mergeValidateMessages(\n localizedMessages,\n formConfig.validateMessages,\n formProviderContext.validateMessages,\n validateMessages,\n ),\n );\n\n setCallbacks({\n onValuesChange,\n onFieldsChange: (changedFields: FieldData[], ...rest) => {\n // Fires for PROGRAMMATIC changes too, unlike `onValuesChange` — which\n // is exactly why `Form.Provider onFormChange` can observe\n // `setFieldValue`.\n formProviderContext.triggerFormChange(name, changedFields);\n onFieldsChange?.(changedFields, ...(rest as [FieldData[]]));\n },\n onFinish: (values: any) => {\n formProviderContext.triggerFormFinish(name, values);\n onFinish?.(values);\n },\n onFinishFailed: (errorInfo: ValidateErrorEntity) => {\n if (scrollToFirstError && errorInfo.errorFields.length) {\n const options =\n typeof scrollToFirstError === \"object\" ? scrollToFirstError : {};\n formInstance.scrollToField(errorInfo.errorFields[0]!.name, {\n focus: true,\n ...options,\n });\n }\n onFinishFailed?.(errorInfo);\n },\n });\n setPreserve(preserve);\n\n // Seed the store — exactly once, in `useState`'s lazy initialiser.\n React.useState(() => {\n setInitialValues(initialValues, true);\n return null;\n });\n // Then on EVERY render, refresh what `initialValues` currently is without\n // re-seeding: a changed\n // `initialValues` prop must not overwrite what the user has typed, but it\n // IS what a later `resetFields()` restores.\n setInitialValues(initialValues, false);\n\n React.useEffect(\n () => () => destroyForm(clearOnDestroy),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n useSubscribe(true);\n\n const formContextValue = React.useMemo(\n () => ({ ...formInstance, validateTrigger }) as InternalFormInstance,\n [formInstance, validateTrigger],\n );\n\n const layoutContextValue = React.useMemo(\n () => ({\n form: formInstance as FormInstance,\n layout,\n requiredMark: requiredMark ?? formConfig.requiredMark,\n disabled,\n name,\n size,\n colon,\n labelAlign,\n labelCol,\n wrapperCol,\n labelWrap,\n }),\n [\n formInstance,\n layout,\n requiredMark,\n formConfig.requiredMark,\n disabled,\n name,\n size,\n colon,\n labelAlign,\n labelCol,\n wrapperCol,\n labelWrap,\n ],\n );\n\n const wrapperNode = (\n <ListContext.Provider value={null}>\n <FormItemLayoutContext.Provider value={layoutContextValue}>\n <FieldContext.Provider value={formContextValue}>\n {children}\n </FieldContext.Provider>\n </FormItemLayoutContext.Provider>\n </ListContext.Provider>\n );\n\n if (Component === false) {\n return wrapperNode;\n }\n\n const Wrapper = Component as any;\n return (\n <Wrapper\n {...restProps}\n // An inline form is `display: flex; flex-wrap: wrap` on the FORM, which\n // no per-item style can express (antd's `.ant-form-inline`).\n className={[\"uic-form\", restProps.className].filter(Boolean).join(\" \")}\n data-layout={layout}\n data-size={size}\n ref={nativeElementRef}\n onSubmit={(event: React.FormEvent) => {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n }}\n onReset={(event: React.FormEvent) => {\n event.preventDefault();\n formInstance.resetFields();\n }}\n >\n {wrapperNode}\n </Wrapper>\n );\n};\n\n/**\n * The ref is declared as `Ref<FormInstance<Values>>`, not `Ref<FormRef<…>>`:\n * call sites write `useRef<FormInstance<MyValues>>(null)`, and inference\n * through the plain generic recovers `Values` from that, where an\n * intersection type does not. The runtime object still carries\n * `nativeElement`, which `FormRef` describes for anyone who wants it.\n */\nconst Form = React.forwardRef(InternalForm) as <Values = any>(\n props: FormProps<Values> & { ref?: React.Ref<FormInstance<Values>> },\n) => React.ReactElement;\n\n// ============================== Form.Provider ===============================\n\nexport interface FormProviderProps {\n validateMessages?: ValidateMessages;\n onFormChange?: (\n name: string | undefined,\n info: { changedFields: FieldData[]; forms: Record<string, FormInstance> },\n ) => void;\n onFormFinish?: (\n name: string | undefined,\n info: { values: Store; forms: Record<string, FormInstance> },\n ) => void;\n children?: React.ReactNode;\n}\n\n/**\n * Cross-form listener. `onFormChange` is wired to `onFieldsChange`, NOT to\n * `onValuesChange`, so it observes programmatic mutations (`setFieldValue`,\n * `setFieldsValue`, `setFields`) as well as user edits.\n */\nexport const FormProvider: React.FC<FormProviderProps> = ({\n validateMessages,\n onFormChange,\n onFormFinish,\n children,\n}) => {\n const parent = React.useContext(FormProviderContext);\n const formsRef = React.useRef<Record<string, FormInstance>>({});\n\n const value: FormProviderContextValue = {\n ...parent,\n validateMessages: {\n ...parent.validateMessages,\n ...validateMessages,\n },\n // Unnamed forms fire too, with `name` undefined, as in rc-field-form.\n triggerFormChange: (formName, changedFields) => {\n onFormChange?.(formName, { changedFields, forms: formsRef.current });\n parent.triggerFormChange(formName, changedFields);\n },\n triggerFormFinish: (formName, values) => {\n onFormFinish?.(formName, { values, forms: formsRef.current });\n parent.triggerFormFinish(formName, values);\n },\n registerForm: (formName, formInstance) => {\n if (formName) {\n formsRef.current = { ...formsRef.current, [formName]: formInstance };\n }\n parent.registerForm(formName, formInstance);\n },\n unregisterForm: (formName) => {\n if (formName) {\n const newForms = { ...formsRef.current };\n delete newForms[formName];\n formsRef.current = newForms;\n }\n parent.unregisterForm(formName);\n },\n };\n\n return (\n <FormProviderContext.Provider value={value}>\n {children}\n </FormProviderContext.Provider>\n );\n};\n\nexport { useForm, FormStore };\nexport default Form;\n"],"mappings":";;;;;;AAuRA,IAAM,IAAO,EAAM,YA3MjB,GACA,MACG;CACH,IAAM,EACJ,SACA,kBACA,SACA,aACA,aACA,WAAW,IAAY,QACvB,qBACA,qBAAkB,YAClB,mBACA,mBACA,aACA,mBACA,mBACA,YAAS,cACT,iBACA,aACA,uBAIA,SACA,aACA,eACA,UACA,eACA,cACA,GAAG,MACD,GAEE,IAAmB,EAAM,OAA2B,IAAI,GACxD,IAAsB,EAAM,WAAW,CAAmB,GAC1D,IAAa,EAAM,WAAW,CAAiB,GAC/C,IAAoB,EAAwB,GAE5C,CAAC,KAAgB,EAAQ,CAAwC,GAEjE,EACJ,iBACA,qBACA,iBACA,wBACA,gBACA,mBAPY,EAAa,iBAAiB,CAQxC;CAyEJ,AAvEA,EAAM,oBACJ,UAEG;EACC,GAAG;EACH,eAAe,EAAiB;CAClC,EACJ,GAEA,EAAM,iBACJ,EAAoB,aAAa,GAAM,CAAY,SACtC;EACX,EAAoB,eAAe,CAAI;CACzC,IACC;EAAC;EAAqB;EAAc;CAAI,CAAC,GAI5C,EACE,EACE,GACA,EAAW,kBACX,EAAoB,kBACpB,CACF,CACF,GAEA,EAAa;EACX;EACA,iBAAiB,GAA4B,GAAG,MAAS;GAKvD,AADA,EAAoB,kBAAkB,GAAM,CAAa,GACzD,IAAiB,GAAe,GAAI,CAAsB;EAC5D;EACA,WAAW,MAAgB;GAEzB,AADA,EAAoB,kBAAkB,GAAM,CAAM,GAClD,IAAW,CAAM;EACnB;EACA,iBAAiB,MAAmC;GAClD,IAAI,KAAsB,EAAU,YAAY,QAAQ;IACtD,IAAM,IACJ,OAAO,KAAuB,WAAW,IAAqB,CAAC;IACjE,EAAa,cAAc,EAAU,YAAY,EAAE,CAAE,MAAM;KACzD,OAAO;KACP,GAAG;IACL,CAAC;GACH;GACA,IAAiB,CAAS;EAC5B;CACF,CAAC,GACD,EAAY,CAAQ,GAGpB,EAAM,gBACJ,EAAiB,GAAe,EAAI,GAC7B,KACR,GAKD,EAAiB,GAAe,EAAK,GAErC,EAAM,sBACQ,EAAY,CAAc,GAEtC,CAAC,CACH,GAEA,EAAa,EAAI;CAEjB,IAAM,IAAmB,EAAM,eACtB;EAAE,GAAG;EAAc;CAAgB,IAC1C,CAAC,GAAc,CAAe,CAChC,GAEM,IAAqB,EAAM,eACxB;EACL,MAAM;EACN;EACA,cAAc,KAAgB,EAAW;EACzC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EACE;EACA;EACA;EACA,EAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF,GAEM,IACJ,kBAAC,EAAY,UAAb;EAAsB,OAAO;EAC3B,UAAA,kBAAC,EAAsB,UAAvB;GAAgC,OAAO;GACrC,UAAA,kBAAC,EAAa,UAAd;IAAuB,OAAO;IAC3B;GACoB,CAAA;EACO,CAAA;CACZ,CAAA;CAQxB,OALI,MAAc,KACT,IAKP,kBAAC,GAAD;EACE,GAAI;EAGJ,WAAW,CAAC,YAAY,EAAU,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACrE,eAAa;EACb,aAAW;EACX,KAAK;EACL,WAAW,MAA2B;GAGpC,AAFA,EAAM,eAAe,GACrB,EAAM,gBAAgB,GACtB,EAAa,OAAO;EACtB;EACA,UAAU,MAA2B;GAEnC,AADA,EAAM,eAAe,GACrB,EAAa,YAAY;EAC3B;EAEC,UAAA;CACM,CAAA;AAEb,CAS0C,GAwB7B,KAA6C,EACxD,qBACA,iBACA,iBACA,kBACI;CACJ,IAAM,IAAS,EAAM,WAAW,CAAmB,GAC7C,IAAW,EAAM,OAAqC,CAAC,CAAC,GAExD,IAAkC;EACtC,GAAG;EACH,kBAAkB;GAChB,GAAG,EAAO;GACV,GAAG;EACL;EAEA,oBAAoB,GAAU,MAAkB;GAE9C,AADA,IAAe,GAAU;IAAE;IAAe,OAAO,EAAS;GAAQ,CAAC,GACnE,EAAO,kBAAkB,GAAU,CAAa;EAClD;EACA,oBAAoB,GAAU,MAAW;GAEvC,AADA,IAAe,GAAU;IAAE;IAAQ,OAAO,EAAS;GAAQ,CAAC,GAC5D,EAAO,kBAAkB,GAAU,CAAM;EAC3C;EACA,eAAe,GAAU,MAAiB;GAIxC,AAHI,MACF,EAAS,UAAU;IAAE,GAAG,EAAS;KAAU,IAAW;GAAa,IAErE,EAAO,aAAa,GAAU,CAAY;EAC5C;EACA,iBAAiB,MAAa;GAC5B,IAAI,GAAU;IACZ,IAAM,IAAW,EAAE,GAAG,EAAS,QAAQ;IAEvC,AADA,OAAO,EAAS,IAChB,EAAS,UAAU;GACrB;GACA,EAAO,eAAe,CAAQ;EAChC;CACF;CAEA,OACE,kBAAC,EAAoB,UAArB;EAAqC;EAClC;CAC2B,CAAA;AAElC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The form engine's built-in strings: the validation message templates and
|
|
3
|
+
* the `requiredMark="optional"` suffix. Placeholders are the rule's values:
|
|
4
|
+
* `{label}` (the item's label, or its name), `{type}`, `{len}`, `{min}`,
|
|
5
|
+
* `{max}` and `{pattern}`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const formMessages: {
|
|
8
|
+
readonly "uic.Form.optional": {
|
|
9
|
+
readonly defaultMessage: "(optional)";
|
|
10
|
+
readonly description: "Suffix after the label of an optional field when requiredMark=\"optional\"";
|
|
11
|
+
};
|
|
12
|
+
readonly "uic.Form.default": {
|
|
13
|
+
readonly defaultMessage: "Field validation error for {label}";
|
|
14
|
+
readonly description: "Validation error when a rule failed without a more specific message";
|
|
15
|
+
};
|
|
16
|
+
readonly "uic.Form.required": {
|
|
17
|
+
readonly defaultMessage: "Please enter {label}";
|
|
18
|
+
readonly description: "Validation error for an empty required field";
|
|
19
|
+
};
|
|
20
|
+
readonly "uic.Form.whitespace": {
|
|
21
|
+
readonly defaultMessage: "{label} cannot be a blank character";
|
|
22
|
+
readonly description: "Validation error for a required field that holds only whitespace";
|
|
23
|
+
};
|
|
24
|
+
readonly "uic.Form.typeString": {
|
|
25
|
+
readonly defaultMessage: "{label} is not a valid {type}";
|
|
26
|
+
readonly description: "Validation error for a value that is not a string; {type} is the type name";
|
|
27
|
+
};
|
|
28
|
+
readonly "uic.Form.typeNumber": {
|
|
29
|
+
readonly defaultMessage: "{label} is not a valid {type}";
|
|
30
|
+
readonly description: "Validation error for a value that is not a number; {type} is the type name";
|
|
31
|
+
};
|
|
32
|
+
readonly "uic.Form.typeObject": {
|
|
33
|
+
readonly defaultMessage: "{label} is not a valid {type}";
|
|
34
|
+
readonly description: "Validation error for a value that is not an object; {type} is the type name";
|
|
35
|
+
};
|
|
36
|
+
readonly "uic.Form.typeEmail": {
|
|
37
|
+
readonly defaultMessage: "{label} is not a valid {type}";
|
|
38
|
+
readonly description: "Validation error for an invalid email address; {type} is the type name";
|
|
39
|
+
};
|
|
40
|
+
readonly "uic.Form.typeUrl": {
|
|
41
|
+
readonly defaultMessage: "{label} is not a valid {type}";
|
|
42
|
+
readonly description: "Validation error for an invalid URL; {type} is the type name";
|
|
43
|
+
};
|
|
44
|
+
readonly "uic.Form.stringLen": {
|
|
45
|
+
readonly defaultMessage: "{label} must be {len} characters";
|
|
46
|
+
readonly description: "Validation error for text of the wrong exact length";
|
|
47
|
+
};
|
|
48
|
+
readonly "uic.Form.stringMin": {
|
|
49
|
+
readonly defaultMessage: "{label} must be at least {min} characters";
|
|
50
|
+
readonly description: "Validation error for text shorter than the minimum";
|
|
51
|
+
};
|
|
52
|
+
readonly "uic.Form.stringMax": {
|
|
53
|
+
readonly defaultMessage: "{label} must be up to {max} characters";
|
|
54
|
+
readonly description: "Validation error for text longer than the maximum";
|
|
55
|
+
};
|
|
56
|
+
readonly "uic.Form.stringRange": {
|
|
57
|
+
readonly defaultMessage: "{label} must be between {min}-{max} characters";
|
|
58
|
+
readonly description: "Validation error for text outside a length range";
|
|
59
|
+
};
|
|
60
|
+
readonly "uic.Form.numberLen": {
|
|
61
|
+
readonly defaultMessage: "{label} must be equal to {len}";
|
|
62
|
+
readonly description: "Validation error for a number that must equal a value";
|
|
63
|
+
};
|
|
64
|
+
readonly "uic.Form.numberMin": {
|
|
65
|
+
readonly defaultMessage: "{label} must be minimum {min}";
|
|
66
|
+
readonly description: "Validation error for a number below the minimum";
|
|
67
|
+
};
|
|
68
|
+
readonly "uic.Form.numberMax": {
|
|
69
|
+
readonly defaultMessage: "{label} must be maximum {max}";
|
|
70
|
+
readonly description: "Validation error for a number above the maximum";
|
|
71
|
+
};
|
|
72
|
+
readonly "uic.Form.numberRange": {
|
|
73
|
+
readonly defaultMessage: "{label} must be between {min}-{max}";
|
|
74
|
+
readonly description: "Validation error for a number outside a range";
|
|
75
|
+
};
|
|
76
|
+
readonly "uic.Form.arrayLen": {
|
|
77
|
+
readonly defaultMessage: "Must be {len} {label}";
|
|
78
|
+
readonly description: "Validation error for a list with the wrong number of items";
|
|
79
|
+
};
|
|
80
|
+
readonly "uic.Form.arrayMin": {
|
|
81
|
+
readonly defaultMessage: "At least {min} {label}";
|
|
82
|
+
readonly description: "Validation error for a list with too few items";
|
|
83
|
+
};
|
|
84
|
+
readonly "uic.Form.arrayMax": {
|
|
85
|
+
readonly defaultMessage: "At most {max} {label}";
|
|
86
|
+
readonly description: "Validation error for a list with too many items";
|
|
87
|
+
};
|
|
88
|
+
readonly "uic.Form.arrayRange": {
|
|
89
|
+
readonly defaultMessage: "The amount of {label} must be between {min}-{max}";
|
|
90
|
+
readonly description: "Validation error for a list whose item count is outside a range";
|
|
91
|
+
};
|
|
92
|
+
readonly "uic.Form.patternMismatch": {
|
|
93
|
+
readonly defaultMessage: "{label} does not match the pattern {pattern}";
|
|
94
|
+
readonly description: "Validation error for text that does not match a pattern";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { defineMessages as e } from "../../i18n/catalog.js";
|
|
2
|
+
//#region src/components/Form/Form.messages.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
"uic.Form.optional": {
|
|
5
|
+
defaultMessage: "(optional)",
|
|
6
|
+
description: "Suffix after the label of an optional field when requiredMark=\"optional\""
|
|
7
|
+
},
|
|
8
|
+
"uic.Form.default": {
|
|
9
|
+
defaultMessage: "Field validation error for {label}",
|
|
10
|
+
description: "Validation error when a rule failed without a more specific message"
|
|
11
|
+
},
|
|
12
|
+
"uic.Form.required": {
|
|
13
|
+
defaultMessage: "Please enter {label}",
|
|
14
|
+
description: "Validation error for an empty required field"
|
|
15
|
+
},
|
|
16
|
+
"uic.Form.whitespace": {
|
|
17
|
+
defaultMessage: "{label} cannot be a blank character",
|
|
18
|
+
description: "Validation error for a required field that holds only whitespace"
|
|
19
|
+
},
|
|
20
|
+
"uic.Form.typeString": {
|
|
21
|
+
defaultMessage: "{label} is not a valid {type}",
|
|
22
|
+
description: "Validation error for a value that is not a string; {type} is the type name"
|
|
23
|
+
},
|
|
24
|
+
"uic.Form.typeNumber": {
|
|
25
|
+
defaultMessage: "{label} is not a valid {type}",
|
|
26
|
+
description: "Validation error for a value that is not a number; {type} is the type name"
|
|
27
|
+
},
|
|
28
|
+
"uic.Form.typeObject": {
|
|
29
|
+
defaultMessage: "{label} is not a valid {type}",
|
|
30
|
+
description: "Validation error for a value that is not an object; {type} is the type name"
|
|
31
|
+
},
|
|
32
|
+
"uic.Form.typeEmail": {
|
|
33
|
+
defaultMessage: "{label} is not a valid {type}",
|
|
34
|
+
description: "Validation error for an invalid email address; {type} is the type name"
|
|
35
|
+
},
|
|
36
|
+
"uic.Form.typeUrl": {
|
|
37
|
+
defaultMessage: "{label} is not a valid {type}",
|
|
38
|
+
description: "Validation error for an invalid URL; {type} is the type name"
|
|
39
|
+
},
|
|
40
|
+
"uic.Form.stringLen": {
|
|
41
|
+
defaultMessage: "{label} must be {len} characters",
|
|
42
|
+
description: "Validation error for text of the wrong exact length"
|
|
43
|
+
},
|
|
44
|
+
"uic.Form.stringMin": {
|
|
45
|
+
defaultMessage: "{label} must be at least {min} characters",
|
|
46
|
+
description: "Validation error for text shorter than the minimum"
|
|
47
|
+
},
|
|
48
|
+
"uic.Form.stringMax": {
|
|
49
|
+
defaultMessage: "{label} must be up to {max} characters",
|
|
50
|
+
description: "Validation error for text longer than the maximum"
|
|
51
|
+
},
|
|
52
|
+
"uic.Form.stringRange": {
|
|
53
|
+
defaultMessage: "{label} must be between {min}-{max} characters",
|
|
54
|
+
description: "Validation error for text outside a length range"
|
|
55
|
+
},
|
|
56
|
+
"uic.Form.numberLen": {
|
|
57
|
+
defaultMessage: "{label} must be equal to {len}",
|
|
58
|
+
description: "Validation error for a number that must equal a value"
|
|
59
|
+
},
|
|
60
|
+
"uic.Form.numberMin": {
|
|
61
|
+
defaultMessage: "{label} must be minimum {min}",
|
|
62
|
+
description: "Validation error for a number below the minimum"
|
|
63
|
+
},
|
|
64
|
+
"uic.Form.numberMax": {
|
|
65
|
+
defaultMessage: "{label} must be maximum {max}",
|
|
66
|
+
description: "Validation error for a number above the maximum"
|
|
67
|
+
},
|
|
68
|
+
"uic.Form.numberRange": {
|
|
69
|
+
defaultMessage: "{label} must be between {min}-{max}",
|
|
70
|
+
description: "Validation error for a number outside a range"
|
|
71
|
+
},
|
|
72
|
+
"uic.Form.arrayLen": {
|
|
73
|
+
defaultMessage: "Must be {len} {label}",
|
|
74
|
+
description: "Validation error for a list with the wrong number of items"
|
|
75
|
+
},
|
|
76
|
+
"uic.Form.arrayMin": {
|
|
77
|
+
defaultMessage: "At least {min} {label}",
|
|
78
|
+
description: "Validation error for a list with too few items"
|
|
79
|
+
},
|
|
80
|
+
"uic.Form.arrayMax": {
|
|
81
|
+
defaultMessage: "At most {max} {label}",
|
|
82
|
+
description: "Validation error for a list with too many items"
|
|
83
|
+
},
|
|
84
|
+
"uic.Form.arrayRange": {
|
|
85
|
+
defaultMessage: "The amount of {label} must be between {min}-{max}",
|
|
86
|
+
description: "Validation error for a list whose item count is outside a range"
|
|
87
|
+
},
|
|
88
|
+
"uic.Form.patternMismatch": {
|
|
89
|
+
defaultMessage: "{label} does not match the pattern {pattern}",
|
|
90
|
+
description: "Validation error for text that does not match a pattern"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { t as formMessages };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=Form.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.messages.js","names":[],"sources":["../../../src/components/Form/Form.messages.ts"],"sourcesContent":["import { defineMessages } from \"../../i18n/catalog\";\n\n/**\n * The form engine's built-in strings: the validation message templates and\n * the `requiredMark=\"optional\"` suffix. Placeholders are the rule's values:\n * `{label}` (the item's label, or its name), `{type}`, `{len}`, `{min}`,\n * `{max}` and `{pattern}`.\n */\nexport const formMessages = defineMessages({\n \"uic.Form.optional\": {\n defaultMessage: \"(optional)\",\n description:\n 'Suffix after the label of an optional field when requiredMark=\"optional\"',\n },\n \"uic.Form.default\": {\n defaultMessage: \"Field validation error for {label}\",\n description: \"Validation error when a rule failed without a more specific message\",\n },\n \"uic.Form.required\": {\n defaultMessage: \"Please enter {label}\",\n description: \"Validation error for an empty required field\",\n },\n \"uic.Form.whitespace\": {\n defaultMessage: \"{label} cannot be a blank character\",\n description: \"Validation error for a required field that holds only whitespace\",\n },\n \"uic.Form.typeString\": {\n defaultMessage: \"{label} is not a valid {type}\",\n description:\n \"Validation error for a value that is not a string; {type} is the type name\",\n },\n \"uic.Form.typeNumber\": {\n defaultMessage: \"{label} is not a valid {type}\",\n description:\n \"Validation error for a value that is not a number; {type} is the type name\",\n },\n \"uic.Form.typeObject\": {\n defaultMessage: \"{label} is not a valid {type}\",\n description:\n \"Validation error for a value that is not an object; {type} is the type name\",\n },\n \"uic.Form.typeEmail\": {\n defaultMessage: \"{label} is not a valid {type}\",\n description:\n \"Validation error for an invalid email address; {type} is the type name\",\n },\n \"uic.Form.typeUrl\": {\n defaultMessage: \"{label} is not a valid {type}\",\n description: \"Validation error for an invalid URL; {type} is the type name\",\n },\n \"uic.Form.stringLen\": {\n defaultMessage: \"{label} must be {len} characters\",\n description: \"Validation error for text of the wrong exact length\",\n },\n \"uic.Form.stringMin\": {\n defaultMessage: \"{label} must be at least {min} characters\",\n description: \"Validation error for text shorter than the minimum\",\n },\n \"uic.Form.stringMax\": {\n defaultMessage: \"{label} must be up to {max} characters\",\n description: \"Validation error for text longer than the maximum\",\n },\n \"uic.Form.stringRange\": {\n defaultMessage: \"{label} must be between {min}-{max} characters\",\n description: \"Validation error for text outside a length range\",\n },\n \"uic.Form.numberLen\": {\n defaultMessage: \"{label} must be equal to {len}\",\n description: \"Validation error for a number that must equal a value\",\n },\n \"uic.Form.numberMin\": {\n defaultMessage: \"{label} must be minimum {min}\",\n description: \"Validation error for a number below the minimum\",\n },\n \"uic.Form.numberMax\": {\n defaultMessage: \"{label} must be maximum {max}\",\n description: \"Validation error for a number above the maximum\",\n },\n \"uic.Form.numberRange\": {\n defaultMessage: \"{label} must be between {min}-{max}\",\n description: \"Validation error for a number outside a range\",\n },\n \"uic.Form.arrayLen\": {\n defaultMessage: \"Must be {len} {label}\",\n description: \"Validation error for a list with the wrong number of items\",\n },\n \"uic.Form.arrayMin\": {\n defaultMessage: \"At least {min} {label}\",\n description: \"Validation error for a list with too few items\",\n },\n \"uic.Form.arrayMax\": {\n defaultMessage: \"At most {max} {label}\",\n description: \"Validation error for a list with too many items\",\n },\n \"uic.Form.arrayRange\": {\n defaultMessage: \"The amount of {label} must be between {min}-{max}\",\n description: \"Validation error for a list whose item count is outside a range\",\n },\n \"uic.Form.patternMismatch\": {\n defaultMessage: \"{label} does not match the pattern {pattern}\",\n description: \"Validation error for text that does not match a pattern\",\n },\n});\n"],"mappings":";;AAQA,IAAa,IAAe,EAAe;CACzC,qBAAqB;EACnB,gBAAgB;EAChB,aACE;CACJ;CACA,oBAAoB;EAClB,gBAAgB;EAChB,aAAa;CACf;CACA,qBAAqB;EACnB,gBAAgB;EAChB,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB;EAChB,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB;EAChB,aACE;CACJ;CACA,uBAAuB;EACrB,gBAAgB;EAChB,aACE;CACJ;CACA,uBAAuB;EACrB,gBAAgB;EAChB,aACE;CACJ;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aACE;CACJ;CACA,oBAAoB;EAClB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,wBAAwB;EACtB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB;EAChB,aAAa;CACf;CACA,wBAAwB;EACtB,gBAAgB;EAChB,aAAa;CACf;CACA,qBAAqB;EACnB,gBAAgB;EAChB,aAAa;CACf;CACA,qBAAqB;EACnB,gBAAgB;EAChB,aAAa;CACf;CACA,qBAAqB;EACnB,gBAAgB;EAChB,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB;EAChB,aAAa;CACf;CACA,4BAA4B;EAC1B,gBAAgB;EAChB,aAAa;CACf;AACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormConfig, RequiredMark } from './context';
|
|
2
|
+
import { ValidateMessages } from './interface';
|
|
3
|
+
/**
|
|
4
|
+
* App-level form configuration: antd's `<ConfigProvider form={{
|
|
5
|
+
* validateMessages, requiredMark }}>` for the engine. A nested provider
|
|
6
|
+
* inherits what it does not set.
|
|
7
|
+
*
|
|
8
|
+
* Validation messages need no provider: every `<Form>` resolves them from
|
|
9
|
+
* ui-common's catalog in the locale of the nearest Astryx
|
|
10
|
+
* `InternationalizationProvider`. `validateMessages` here wins over that.
|
|
11
|
+
*/
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
/** The validate-message table in the active locale, from ui-common's catalog. */
|
|
14
|
+
export declare function useFormValidateMessages(): ValidateMessages;
|
|
15
|
+
/** The `requiredMark="optional"` suffix in the active locale. */
|
|
16
|
+
export declare function useFormOptionalLabel(): string;
|
|
17
|
+
export declare const FormConfigProvider: React.FC<FormConfig & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}>;
|
|
20
|
+
export type { FormConfig, RequiredMark };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
|
|
2
|
+
import { FormConfigContext as t } from "./context.js";
|
|
3
|
+
import { buildValidateMessages as n } from "./messages.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Form/FormConfigProvider.tsx
|
|
7
|
+
function a() {
|
|
8
|
+
let t = e();
|
|
9
|
+
return r.useMemo(() => n(t), [t]);
|
|
10
|
+
}
|
|
11
|
+
var o = ({ children: e, validateMessages: n, requiredMark: a, optionalLabel: o }) => {
|
|
12
|
+
let s = r.useContext(t), c = r.useMemo(() => ({
|
|
13
|
+
...s,
|
|
14
|
+
...n === void 0 ? null : { validateMessages: n },
|
|
15
|
+
...a === void 0 ? null : { requiredMark: a },
|
|
16
|
+
...o === void 0 ? null : { optionalLabel: o }
|
|
17
|
+
}), [
|
|
18
|
+
s,
|
|
19
|
+
n,
|
|
20
|
+
a,
|
|
21
|
+
o
|
|
22
|
+
]);
|
|
23
|
+
return /* @__PURE__ */ i(t.Provider, {
|
|
24
|
+
value: c,
|
|
25
|
+
children: e
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as FormConfigProvider, a as useFormValidateMessages };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=FormConfigProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormConfigProvider.js","names":[],"sources":["../../../src/components/Form/FormConfigProvider.tsx"],"sourcesContent":["/**\n * App-level form configuration: antd's `<ConfigProvider form={{\n * validateMessages, requiredMark }}>` for the engine. A nested provider\n * inherits what it does not set.\n *\n * Validation messages need no provider: every `<Form>` resolves them from\n * ui-common's catalog in the locale of the nearest Astryx\n * `InternationalizationProvider`. `validateMessages` here wins over that.\n */\nimport * as React from \"react\";\n\nimport { useUicTranslator } from \"../../i18n/useUicTranslator\";\nimport { FormConfigContext, type FormConfig, type RequiredMark } from \"./context\";\nimport type { ValidateMessages } from \"./interface\";\nimport { buildValidateMessages } from \"./messages\";\n\n/** The validate-message table in the active locale, from ui-common's catalog. */\nexport function useFormValidateMessages(): ValidateMessages {\n const t = useUicTranslator();\n return React.useMemo(() => buildValidateMessages(t), [t]);\n}\n\n/** The `requiredMark=\"optional\"` suffix in the active locale. */\nexport function useFormOptionalLabel(): string {\n const t = useUicTranslator();\n return t(\"uic.Form.optional\");\n}\n\nexport const FormConfigProvider: React.FC<\n FormConfig & { children?: React.ReactNode }\n> = ({ children, validateMessages, requiredMark, optionalLabel }) => {\n const parent = React.useContext(FormConfigContext);\n const value = React.useMemo(\n () => ({\n ...parent,\n ...(validateMessages !== undefined ? { validateMessages } : null),\n ...(requiredMark !== undefined ? { requiredMark } : null),\n ...(optionalLabel !== undefined ? { optionalLabel } : null),\n }),\n [parent, validateMessages, requiredMark, optionalLabel],\n );\n return (\n <FormConfigContext.Provider value={value}>{children}</FormConfigContext.Provider>\n );\n};\n\nexport type { FormConfig, RequiredMark };\n"],"mappings":";;;;;;AAiBA,SAAgB,IAA4C;CAC1D,IAAM,IAAI,EAAiB;CAC3B,OAAO,EAAM,cAAc,EAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D;AAQA,IAAa,KAER,EAAE,aAAU,qBAAkB,iBAAc,uBAAoB;CACnE,IAAM,IAAS,EAAM,WAAW,CAAiB,GAC3C,IAAQ,EAAM,eACX;EACL,GAAG;EACH,GAAI,MAAqB,KAAA,IAAmC,OAAvB,EAAE,oBAAiB;EACxD,GAAI,MAAiB,KAAA,IAA+B,OAAnB,EAAE,gBAAa;EAChD,GAAI,MAAkB,KAAA,IAAgC,OAApB,EAAE,iBAAc;CACpD,IACA;EAAC;EAAQ;EAAkB;EAAc;CAAa,CACxD;CACA,OACE,kBAAC,EAAkB,UAAnB;EAAmC;EAAQ;CAAqC,CAAA;AAEpF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { FieldProps } from './Field';
|
|
2
|
+
import { FormItemCol, FormItemStatusContextValue, FormLayout } from './context';
|
|
3
|
+
import { InternalFormInstance, StoreValue } from './interface';
|
|
4
|
+
import { InternalNamePath, NamePath } from './namePath';
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
declare function getFieldId(namePath: InternalNamePath, formName?: string): string | undefined;
|
|
7
|
+
export interface FormItemProps<Values = any> extends Omit<FieldProps, "children" | "name" | "onMetaChange" | "isList"> {
|
|
8
|
+
name?: NamePath;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* A node, or antd's `{ title, icon, placement, ... }` object form. `title`
|
|
12
|
+
* becomes the tooltip body and `icon` the trigger glyph, rendered behind a
|
|
13
|
+
* hover/focus target after the label. The other keys describe antd's
|
|
14
|
+
* overlay and are ignored.
|
|
15
|
+
*/
|
|
16
|
+
tooltip?: React.ReactNode | FormItemTooltipConfig;
|
|
17
|
+
extra?: React.ReactNode;
|
|
18
|
+
/** `false` also suppresses meta bubbling to an ancestor item. */
|
|
19
|
+
help?: React.ReactNode;
|
|
20
|
+
/** Overrides the asterisk derived from `rules`. */
|
|
21
|
+
required?: boolean;
|
|
22
|
+
/** Render no wrapper; bubble this field's meta to the nearest ancestor item. */
|
|
23
|
+
noStyle?: boolean;
|
|
24
|
+
hidden?: boolean;
|
|
25
|
+
layout?: FormLayout;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
hasFeedback?: boolean;
|
|
29
|
+
validateStatus?: FormItemStatusContextValue["status"];
|
|
30
|
+
colon?: boolean;
|
|
31
|
+
labelAlign?: "left" | "right";
|
|
32
|
+
labelCol?: FormItemCol;
|
|
33
|
+
wrapperCol?: FormItemCol;
|
|
34
|
+
labelWrap?: boolean;
|
|
35
|
+
htmlFor?: string;
|
|
36
|
+
id?: string;
|
|
37
|
+
fieldKey?: React.Key | React.Key[];
|
|
38
|
+
children?: React.ReactNode | ((form: InternalFormInstance) => React.ReactNode);
|
|
39
|
+
__values?: Values;
|
|
40
|
+
}
|
|
41
|
+
export interface FormItemTooltipConfig {
|
|
42
|
+
title?: React.ReactNode;
|
|
43
|
+
icon?: React.ReactNode;
|
|
44
|
+
placement?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
declare const FormItem: <Values>(props: FormItemProps<Values>) => React.JSX.Element;
|
|
48
|
+
/** Errors/warnings of the nearest enclosing `Form.Item`. */
|
|
49
|
+
export declare const useFormItemStatus: () => {
|
|
50
|
+
status: "" | "success" | "error" | "warning" | "validating" | undefined;
|
|
51
|
+
errors: React.ReactNode[];
|
|
52
|
+
warnings: React.ReactNode[];
|
|
53
|
+
};
|
|
54
|
+
export { getFieldId };
|
|
55
|
+
export default FormItem;
|
|
56
|
+
export type { StoreValue };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
|
|
2
|
+
import { FieldContext as t, FormConfigContext as n, FormItemInputContext as r, FormItemLayoutContext as i, ListContext as a, NoStyleItemContext as o } from "./context.js";
|
|
3
|
+
import { toArray as s } from "./namePath.js";
|
|
4
|
+
import c from "./Field.js";
|
|
5
|
+
import { FormItemVisual as ee } from "./FormItemVisual2.js";
|
|
6
|
+
import * as l from "react";
|
|
7
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/Form/FormItem.tsx
|
|
9
|
+
var te = "__SPLIT__", p = ["parentNode"];
|
|
10
|
+
function m(e, t) {
|
|
11
|
+
if (!e.length) return;
|
|
12
|
+
let n = e.join("_");
|
|
13
|
+
return t ? `${t}_${n}` : p.includes(n) ? `form_item_${n}` : n;
|
|
14
|
+
}
|
|
15
|
+
function h() {
|
|
16
|
+
return {
|
|
17
|
+
errors: [],
|
|
18
|
+
warnings: [],
|
|
19
|
+
touched: !1,
|
|
20
|
+
validating: !1,
|
|
21
|
+
name: [],
|
|
22
|
+
validated: !1
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function ne(e, t, n, r, i) {
|
|
26
|
+
return i === void 0 ? n.validating ? "validating" : e.length ? "error" : t.length ? "warning" : n.touched || r && n.validated ? "success" : "" : i;
|
|
27
|
+
}
|
|
28
|
+
var g = (e) => !!e && typeof e == "object" && !l.isValidElement(e) && "title" in e;
|
|
29
|
+
function re(e) {
|
|
30
|
+
return g(e) ? e.title : e;
|
|
31
|
+
}
|
|
32
|
+
function _(e) {
|
|
33
|
+
return g(e) ? e.icon : void 0;
|
|
34
|
+
}
|
|
35
|
+
var v = (u) => {
|
|
36
|
+
let { name: f, label: p, tooltip: g, extra: v, help: y, required: b, noStyle: x, hidden: S, layout: oe, className: se, style: ce, hasFeedback: C, validateStatus: le, children: w, rules: T, dependencies: E, shouldUpdate: D, messageVariables: O, trigger: k = "onChange", validateTrigger: A, colon: ue, labelAlign: de, labelCol: j, wrapperCol: M, labelWrap: fe, htmlFor: N, fieldKey: pe, id: me, __values: he, ...P } = u, F = l.useContext(t), { optionalLabel: I } = l.useContext(n), L = e(), { layout: R, requiredMark: z, name: ge, disabled: _e, size: ve, colon: ye, labelAlign: be, labelCol: B, wrapperCol: xe, labelWrap: Se } = l.useContext(i), V = l.useContext(o), Ce = l.useContext(a), we = oe || R, Te = j ?? B, H = M ?? xe, Ee = p === null && !j && !M && B?.span !== void 0 && B.span < 24 ? {
|
|
37
|
+
...H,
|
|
38
|
+
offset: B.span
|
|
39
|
+
} : H, U = A === void 0 ? F.validateTrigger : A, [W, De] = l.useState(h), [G, Oe] = l.useState({}), K = l.useRef(null), q = (e) => {
|
|
40
|
+
let t = Ce?.getKey(e.name);
|
|
41
|
+
if (De(e.destroy ? h() : e), x && y !== !1 && V) {
|
|
42
|
+
let n = e.name;
|
|
43
|
+
if (e.destroy) n = K.current || n;
|
|
44
|
+
else if (t !== void 0) {
|
|
45
|
+
let [e, r] = t;
|
|
46
|
+
n = [e, ...r], K.current = n;
|
|
47
|
+
}
|
|
48
|
+
V(e, n);
|
|
49
|
+
}
|
|
50
|
+
}, ke = (e, t) => {
|
|
51
|
+
Oe((n) => {
|
|
52
|
+
let r = { ...n }, i = [...e.name.slice(0, -1), ...t].join(te);
|
|
53
|
+
return e.destroy ? delete r[i] : r[i] = e, r;
|
|
54
|
+
});
|
|
55
|
+
}, J = [...W.errors, ...Object.values(G).flatMap((e) => e.errors ?? [])], Y = [...W.warnings, ...Object.values(G).flatMap((e) => e.warnings ?? [])], X = (e, t, n, i) => {
|
|
56
|
+
let a = {
|
|
57
|
+
status: ne(J, Y, W, C, le),
|
|
58
|
+
errors: J,
|
|
59
|
+
warnings: Y,
|
|
60
|
+
hasFeedback: C,
|
|
61
|
+
isFormItemInput: !0
|
|
62
|
+
};
|
|
63
|
+
if (x && !S) return /* @__PURE__ */ d(r.Provider, {
|
|
64
|
+
value: a,
|
|
65
|
+
children: e
|
|
66
|
+
});
|
|
67
|
+
let s = z === !1 ? "hidden" : z === "optional" || typeof z == "function" ? "optional" : void 0, c = b === void 0 ? !!n : b, l = ae(p, c, z, I ?? L("uic.Form.optional"));
|
|
68
|
+
return /* @__PURE__ */ d(r.Provider, {
|
|
69
|
+
value: a,
|
|
70
|
+
children: /* @__PURE__ */ d(ee, {
|
|
71
|
+
label: l,
|
|
72
|
+
labelTitle: typeof p == "string" ? p : void 0,
|
|
73
|
+
tooltip: re(g),
|
|
74
|
+
tooltipIcon: _(g),
|
|
75
|
+
extra: v,
|
|
76
|
+
help: y,
|
|
77
|
+
required: c,
|
|
78
|
+
requiredMarkType: s,
|
|
79
|
+
layout: we,
|
|
80
|
+
size: ve,
|
|
81
|
+
colon: ue ?? ye,
|
|
82
|
+
labelAlign: de ?? be,
|
|
83
|
+
labelCol: Te,
|
|
84
|
+
wrapperCol: Ee,
|
|
85
|
+
labelWrap: fe ?? Se,
|
|
86
|
+
status: a.status,
|
|
87
|
+
hasFeedback: C,
|
|
88
|
+
className: se,
|
|
89
|
+
style: ce,
|
|
90
|
+
hidden: S,
|
|
91
|
+
fieldId: t,
|
|
92
|
+
fieldHandle: i,
|
|
93
|
+
htmlFor: N,
|
|
94
|
+
errors: J,
|
|
95
|
+
warnings: Y,
|
|
96
|
+
children: /* @__PURE__ */ d(o.Provider, {
|
|
97
|
+
value: ke,
|
|
98
|
+
children: e
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}, Z = f != null, Q = typeof w == "function";
|
|
103
|
+
if (!Z && !Q && !E) return X(w);
|
|
104
|
+
let $ = {};
|
|
105
|
+
return typeof p == "string" ? $.label = p : f && ($.label = String(f)), O && ($ = {
|
|
106
|
+
...$,
|
|
107
|
+
...O
|
|
108
|
+
}), /* @__PURE__ */ d(c, {
|
|
109
|
+
...P,
|
|
110
|
+
name: f,
|
|
111
|
+
rules: T,
|
|
112
|
+
dependencies: E,
|
|
113
|
+
shouldUpdate: D,
|
|
114
|
+
messageVariables: $,
|
|
115
|
+
trigger: k,
|
|
116
|
+
validateTrigger: U,
|
|
117
|
+
onMetaChange: q,
|
|
118
|
+
children: (e, t, n) => {
|
|
119
|
+
let r = s(f).length ? t.name : [], i = m(r, ge), a = b === void 0 ? ie(T, n) : b, o = null;
|
|
120
|
+
if (Q && (D || E) && !Z) o = w(n);
|
|
121
|
+
else if (l.isValidElement(w)) {
|
|
122
|
+
let t = w, n = {
|
|
123
|
+
...t.props,
|
|
124
|
+
...e
|
|
125
|
+
};
|
|
126
|
+
n.id ||= i, r.length && (n["data-uic-field-id"] = r.join("_")), _e && n.disabled === void 0 && (n.disabled = !0);
|
|
127
|
+
let c = [];
|
|
128
|
+
(y || J.length > 0) && c.push(`${i}_help`), v && c.push(`${i}_extra`), c.length && (n["aria-describedby"] = c.join(" ")), J.length > 0 && (n["aria-invalid"] = "true"), a && (n["aria-required"] = "true"), (/* @__PURE__ */ new Set([...s(k), ...s(U)])).forEach((r) => {
|
|
129
|
+
n[r] = (...n) => {
|
|
130
|
+
e[r]?.(...n), t.props[r]?.(...n);
|
|
131
|
+
};
|
|
132
|
+
}), o = l.cloneElement(t, n);
|
|
133
|
+
} else o = w;
|
|
134
|
+
return X(o, i, a, r.length ? r.join("_") : void 0);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
function ie(e, t) {
|
|
139
|
+
return !!e?.some((e) => {
|
|
140
|
+
if (typeof e == "function") {
|
|
141
|
+
let n = e(t);
|
|
142
|
+
return !!n?.required && !n?.warningOnly;
|
|
143
|
+
}
|
|
144
|
+
return !!e?.required && !e?.warningOnly;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function ae(e, t, n, r) {
|
|
148
|
+
return e == null ? e : typeof n == "function" ? n(e, { required: t }) : n === "optional" && !t ? /* @__PURE__ */ f(u, { children: [e, /* @__PURE__ */ d("span", {
|
|
149
|
+
className: "uic-form-item__optional",
|
|
150
|
+
children: r
|
|
151
|
+
})] }) : e;
|
|
152
|
+
}
|
|
153
|
+
var y = () => {
|
|
154
|
+
let { status: e, errors: t = [], warnings: n = [] } = l.useContext(r);
|
|
155
|
+
return {
|
|
156
|
+
status: e,
|
|
157
|
+
errors: t,
|
|
158
|
+
warnings: n
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
export { v as default, m as getFieldId, y as useFormItemStatus };
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=FormItem.js.map
|