@lablup/ui-common 0.1.0-alpha.9 → 0.2.0-alpha.15
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 +490 -68
- 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/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/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 +64 -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 +125 -0
- package/dist/forks/ComplexSelector/ComplexSelector.styles.js +129 -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 +98 -0
- package/dist/forks/Drawer/Drawer.js +94 -0
- package/dist/forks/Drawer/Drawer.js.map +1 -0
- package/dist/forks/Drawer/Drawer.styles.d.ts +99 -0
- package/dist/forks/Drawer/Drawer.styles.js +94 -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 +19 -0
- package/dist/forks/Drawer/useDrawerDialogPresence.js +62 -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.json +954 -0
- package/dist/locales/ar-SA.json +994 -0
- package/dist/locales/ca-ES.json +970 -0
- package/dist/locales/cs-CZ.json +986 -0
- package/dist/locales/da-DK.json +962 -0
- package/dist/locales/de-DE.json +962 -0
- package/dist/locales/el-GR.json +986 -0
- package/dist/locales/en.json +1482 -0
- package/dist/locales/es-ES.json +974 -0
- package/dist/locales/fi-FI.json +986 -0
- package/dist/locales/fr-FR.json +950 -0
- package/dist/locales/he-IL.json +986 -0
- package/dist/locales/hu-HU.json +986 -0
- package/dist/locales/it-IT.json +974 -0
- package/dist/locales/ja-JP.json +994 -0
- package/dist/locales/ko-KR.json +986 -0
- package/dist/locales/nl-NL.json +950 -0
- package/dist/locales/no-NO.json +974 -0
- package/dist/locales/pl-PL.json +978 -0
- package/dist/locales/pseudo.json +1112 -0
- package/dist/locales/pt-BR.json +978 -0
- package/dist/locales/pt-PT.json +978 -0
- package/dist/locales/ro-RO.json +978 -0
- package/dist/locales/ru-RU.json +986 -0
- package/dist/locales/sr-SP.json +986 -0
- package/dist/locales/sv-SE.json +982 -0
- package/dist/locales/tr-TR.json +986 -0
- package/dist/locales/uk-UA.json +986 -0
- package/dist/locales/vi-VN.json +982 -0
- package/dist/locales/zh-CN.json +994 -0
- package/dist/locales/zh-TW.json +994 -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 +716 -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 +565 -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
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* How the error reads, not what it is about.
|
|
4
|
-
*
|
|
5
|
-
* This prop used to be a union of five names: network, configuration, model,
|
|
6
|
-
* permission, generic. Two of those, and "model" in particular, are one
|
|
7
|
-
* product's categories rather than anything a shared component can reason
|
|
8
|
-
* about, and all five resolved to three colours anyway: network and permission
|
|
9
|
-
* were the same amber, model and generic the same red. A consumer decides
|
|
10
|
-
* which of its own error categories reads as which tone.
|
|
3
|
+
* How the error reads, not what it is about. A consumer maps its own error
|
|
4
|
+
* categories onto these three.
|
|
11
5
|
*/
|
|
12
6
|
export type ErrorTone = "danger" | "warning" | "accent";
|
|
13
7
|
export interface ErrorAction {
|
|
@@ -17,22 +11,19 @@ export interface ErrorAction {
|
|
|
17
11
|
export interface ErrorStateProps {
|
|
18
12
|
/** How the error reads. Defaults to `danger`. */
|
|
19
13
|
tone?: ErrorTone;
|
|
20
|
-
/** Replaces the default
|
|
14
|
+
/** Replaces the default icon (Astryx's `error` glyph). */
|
|
21
15
|
icon?: ReactNode;
|
|
22
|
-
/** Error title
|
|
16
|
+
/** Error title, the region's heading */
|
|
23
17
|
title: string;
|
|
24
18
|
/** Detailed error message */
|
|
25
19
|
message: string;
|
|
26
|
-
/** Primary action button (e.g
|
|
20
|
+
/** Primary action button (e.g. Retry, Go to settings) */
|
|
27
21
|
primaryAction?: ErrorAction;
|
|
28
|
-
/** Secondary action button (e.g
|
|
22
|
+
/** Secondary action button (e.g. View logs, Report issue) */
|
|
29
23
|
secondaryAction?: ErrorAction;
|
|
30
24
|
/** Additional CSS classes */
|
|
31
25
|
className?: string;
|
|
32
|
-
/** Whether to show
|
|
26
|
+
/** Whether to show the icon. Default: true */
|
|
33
27
|
showIcon?: boolean;
|
|
34
28
|
}
|
|
35
|
-
/**
|
|
36
|
-
* ErrorState Component
|
|
37
|
-
*/
|
|
38
29
|
export declare function ErrorState({ tone, icon, title, message, primaryAction, secondaryAction, className, showIcon, }: ErrorStateProps): import("react").JSX.Element;
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Button as e } from "../Button/Button2.js";
|
|
2
|
-
import { AlertCircleIcon as t } from "../../icons/AlertCircleIcon.js";
|
|
3
1
|
/* empty css */
|
|
4
|
-
import {
|
|
2
|
+
import { Button as e } from "@astryxdesign/core/Button";
|
|
3
|
+
import { Heading as t } from "@astryxdesign/core/Heading";
|
|
4
|
+
import { Text as n } from "@astryxdesign/core/Text";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { Icon as a } from "@astryxdesign/core/Icon";
|
|
6
7
|
//#region src/components/ErrorState/ErrorState.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, [u]), h = [
|
|
13
|
-
"error-state",
|
|
14
|
-
`error-state--${a}`,
|
|
15
|
-
d
|
|
8
|
+
function o({ tone: o = "danger", icon: s, title: c, message: l, primaryAction: u, secondaryAction: d, className: f = "", showIcon: p = !0 }) {
|
|
9
|
+
let m = [
|
|
10
|
+
"uic-error-state",
|
|
11
|
+
`uic-error-state--${o}`,
|
|
12
|
+
f
|
|
16
13
|
].filter(Boolean).join(" ");
|
|
17
14
|
return /* @__PURE__ */ i("div", {
|
|
18
|
-
className:
|
|
15
|
+
className: m,
|
|
19
16
|
role: "alert",
|
|
20
17
|
"aria-live": "polite",
|
|
21
18
|
children: [
|
|
22
|
-
|
|
23
|
-
className: "error-state__icon",
|
|
19
|
+
p && /* @__PURE__ */ r("div", {
|
|
20
|
+
className: "uic-error-state__icon",
|
|
24
21
|
"aria-hidden": "true",
|
|
25
|
-
children:
|
|
22
|
+
children: s ?? /* @__PURE__ */ r(a, { icon: "error" })
|
|
26
23
|
}),
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
/* @__PURE__ */ r("p", {
|
|
32
|
-
className: "error-state__message",
|
|
24
|
+
/* @__PURE__ */ r(t, {
|
|
25
|
+
level: 2,
|
|
26
|
+
className: "uic-error-state__title",
|
|
33
27
|
children: c
|
|
34
28
|
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
/* @__PURE__ */ r(n, {
|
|
30
|
+
as: "p",
|
|
31
|
+
color: "secondary",
|
|
32
|
+
className: "uic-error-state__message",
|
|
33
|
+
children: l
|
|
34
|
+
}),
|
|
35
|
+
(u || d) && /* @__PURE__ */ i("div", {
|
|
36
|
+
className: "uic-error-state__actions",
|
|
37
|
+
children: [u && /* @__PURE__ */ r(e, {
|
|
38
38
|
variant: "primary",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}),
|
|
39
|
+
label: u.label,
|
|
40
|
+
onClick: () => u.onClick(),
|
|
41
|
+
className: "uic-error-state__action uic-error-state__action--primary"
|
|
42
|
+
}), d && /* @__PURE__ */ r(e, {
|
|
43
43
|
variant: "secondary",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
label: d.label,
|
|
45
|
+
onClick: () => d.onClick(),
|
|
46
|
+
className: "uic-error-state__action uic-error-state__action--secondary"
|
|
47
47
|
})]
|
|
48
48
|
})
|
|
49
49
|
]
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
//#endregion
|
|
53
|
-
export {
|
|
53
|
+
export { o as ErrorState };
|
|
54
54
|
|
|
55
55
|
//# sourceMappingURL=ErrorState2.js.map
|
|
56
56
|
import "../../assets/components/ErrorState/ErrorState.css";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorState2.js","names":[],"sources":["../../../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["/**\n * ErrorState
|
|
1
|
+
{"version":3,"file":"ErrorState2.js","names":[],"sources":["../../../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["/**\n * ErrorState\n *\n * A full-area error with a title, a message and up to two recovery actions.\n * Built on Astryx `Icon`, `Heading`, `Text` and `Button`.\n *\n * @example\n * <ErrorState\n * tone=\"warning\"\n * title=\"Connection error\"\n * message=\"Could not reach the server.\"\n * primaryAction={{ label: \"Retry\", onClick: retry }}\n * />\n */\nimport type { ReactNode } from \"react\";\nimport { Button } from \"@astryxdesign/core/Button\";\nimport { Heading } from \"@astryxdesign/core/Heading\";\nimport { Icon } from \"@astryxdesign/core/Icon\";\nimport { Text } from \"@astryxdesign/core/Text\";\n\nimport \"./ErrorState.css\";\n\n/**\n * How the error reads, not what it is about. A consumer maps its own error\n * categories onto these three.\n */\nexport type ErrorTone = \"danger\" | \"warning\" | \"accent\";\n\nexport interface ErrorAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ErrorStateProps {\n /** How the error reads. Defaults to `danger`. */\n tone?: ErrorTone;\n /** Replaces the default icon (Astryx's `error` glyph). */\n icon?: ReactNode;\n /** Error title, the region's heading */\n title: string;\n /** Detailed error message */\n message: string;\n /** Primary action button (e.g. Retry, Go to settings) */\n primaryAction?: ErrorAction;\n /** Secondary action button (e.g. View logs, Report issue) */\n secondaryAction?: ErrorAction;\n /** Additional CSS classes */\n className?: string;\n /** Whether to show the icon. Default: true */\n showIcon?: boolean;\n}\n\nexport function ErrorState({\n tone = \"danger\",\n icon,\n title,\n message,\n primaryAction,\n secondaryAction,\n className = \"\",\n showIcon = true,\n}: ErrorStateProps) {\n const containerClass = [\"uic-error-state\", `uic-error-state--${tone}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={containerClass} role=\"alert\" aria-live=\"polite\">\n {showIcon && (\n <div className=\"uic-error-state__icon\" aria-hidden=\"true\">\n {icon ?? <Icon icon=\"error\" />}\n </div>\n )}\n\n <Heading level={2} className=\"uic-error-state__title\">\n {title}\n </Heading>\n\n <Text as=\"p\" color=\"secondary\" className=\"uic-error-state__message\">\n {message}\n </Text>\n\n {(primaryAction || secondaryAction) && (\n <div className=\"uic-error-state__actions\">\n {primaryAction && (\n <Button\n variant=\"primary\"\n label={primaryAction.label}\n onClick={() => primaryAction.onClick()}\n className=\"uic-error-state__action uic-error-state__action--primary\"\n />\n )}\n {secondaryAction && (\n <Button\n variant=\"secondary\"\n label={secondaryAction.label}\n onClick={() => secondaryAction.onClick()}\n className=\"uic-error-state__action uic-error-state__action--secondary\"\n />\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoDA,SAAgB,EAAW,EACzB,UAAO,UACP,SACA,UACA,YACA,kBACA,oBACA,eAAY,IACZ,cAAW,MACO;CAClB,IAAM,IAAiB;EAAC;EAAmB,oBAAoB;EAAQ;CAAS,CAAC,CAC9E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAgB,MAAK;EAAQ,aAAU;EAAvD,UAAA;GACG,KACC,kBAAC,OAAD;IAAK,WAAU;IAAwB,eAAY;IAChD,UAAA,KAAQ,kBAAC,GAAD,EAAM,MAAK,QAAS,CAAA;GAC1B,CAAA;GAGP,kBAAC,GAAD;IAAS,OAAO;IAAG,WAAU;IAC1B,UAAA;GACM,CAAA;GAET,kBAAC,GAAD;IAAM,IAAG;IAAI,OAAM;IAAY,WAAU;IACtC,UAAA;GACG,CAAA;IAEJ,KAAiB,MACjB,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,OAAO,EAAc;KACrB,eAAe,EAAc,QAAQ;KACrC,WAAU;IACX,CAAA,GAEF,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,OAAO,EAAgB;KACvB,eAAe,EAAgB,QAAQ;KACvC,WAAU;IACX,CAAA,CAEA;;EAEJ;;AAET"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Form.ErrorList`: the errors of a list-level rule, which belong to the
|
|
3
|
+
* collection rather than to any row. Uses the item shell's explain classes.
|
|
4
|
+
*/
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
export interface ErrorListProps {
|
|
7
|
+
errors?: React.ReactNode[];
|
|
8
|
+
warnings?: React.ReactNode[];
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const ErrorList: React.FC<ErrorListProps>;
|
|
13
|
+
export default ErrorList;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Form/ErrorList.tsx
|
|
5
|
+
var n = ({ errors: n = [], warnings: r = [], className: i, style: a }) => !n.length && !r.length ? null : /* @__PURE__ */ t("div", {
|
|
6
|
+
className: ["uic-form-item__explain", i].filter(Boolean).join(" "),
|
|
7
|
+
role: "alert",
|
|
8
|
+
style: a,
|
|
9
|
+
children: [n.map((t, n) => /* @__PURE__ */ e("div", {
|
|
10
|
+
className: "uic-form-item__explain-error",
|
|
11
|
+
children: t
|
|
12
|
+
}, `e-${n}`)), r.map((t, n) => /* @__PURE__ */ e("div", {
|
|
13
|
+
className: "uic-form-item__explain-warning",
|
|
14
|
+
children: t
|
|
15
|
+
}, `w-${n}`))]
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as default };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=ErrorList.js.map
|
|
21
|
+
import "../../assets/components/Form/FormItemVisual.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorList.js","names":[],"sources":["../../../src/components/Form/ErrorList.tsx"],"sourcesContent":["/**\n * `Form.ErrorList`: the errors of a list-level rule, which belong to the\n * collection rather than to any row. Uses the item shell's explain classes.\n */\nimport * as React from \"react\";\n\nimport \"./FormItemVisual.css\";\n\nexport interface ErrorListProps {\n errors?: React.ReactNode[];\n warnings?: React.ReactNode[];\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = ({\n errors = [],\n warnings = [],\n className,\n style,\n}) => {\n if (!errors.length && !warnings.length) {\n return null;\n }\n return (\n <div\n className={[\"uic-form-item__explain\", className].filter(Boolean).join(\" \")}\n role=\"alert\"\n style={style}\n >\n {errors.map((error, index) => (\n <div key={`e-${index}`} className=\"uic-form-item__explain-error\">\n {error}\n </div>\n ))}\n {warnings.map((warning, index) => (\n <div key={`w-${index}`} className=\"uic-form-item__explain-warning\">\n {warning}\n </div>\n ))}\n </div>\n );\n};\n\nexport default ErrorList;\n"],"mappings":";;;;AAeA,IAAM,KAAuC,EAC3C,YAAS,CAAC,GACV,cAAW,CAAC,GACZ,cACA,eAEI,CAAC,EAAO,UAAU,CAAC,EAAS,SACvB,OAGP,kBAAC,OAAD;CACE,WAAW,CAAC,0BAA0B,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACzE,MAAK;CACE;CAHT,UAAA,CAKG,EAAO,KAAK,GAAO,MAClB,kBAAC,OAAD;EAAwB,WAAU;EAC/B,UAAA;CACE,GAFK,KAAK,GAEV,CACN,GACA,EAAS,KAAK,GAAS,MACtB,kBAAC,OAAD;EAAwB,WAAU;EAC/B,UAAA;CACE,GAFK,KAAK,GAEV,CACN,CACE"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FieldEntity, InternalFormInstance, InternalValidateOptions, Meta, NotifyInfo, Rule, RuleError, StoreValue } from './interface';
|
|
2
|
+
import { InternalNamePath, NamePath, Store } from './namePath';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface FieldProps {
|
|
5
|
+
name?: NamePath;
|
|
6
|
+
children?: React.ReactNode | ((control: Record<string, any>, meta: Meta, form: InternalFormInstance) => React.ReactNode);
|
|
7
|
+
rules?: Rule[];
|
|
8
|
+
dependencies?: NamePath[];
|
|
9
|
+
shouldUpdate?: boolean | ((prev: Store, next: Store, info: {
|
|
10
|
+
source?: string;
|
|
11
|
+
}) => boolean);
|
|
12
|
+
initialValue?: any;
|
|
13
|
+
preserve?: boolean;
|
|
14
|
+
trigger?: string;
|
|
15
|
+
validateTrigger?: string | string[] | false;
|
|
16
|
+
validateFirst?: boolean | "parallel";
|
|
17
|
+
valuePropName?: string;
|
|
18
|
+
getValueProps?: (value: StoreValue) => Record<string, unknown>;
|
|
19
|
+
getValueFromEvent?: (...args: any[]) => StoreValue;
|
|
20
|
+
messageVariables?: Record<string, string>;
|
|
21
|
+
isListField?: boolean;
|
|
22
|
+
isList?: boolean;
|
|
23
|
+
onReset?: () => void;
|
|
24
|
+
onMetaChange?: (meta: Meta & {
|
|
25
|
+
destroy?: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
}
|
|
28
|
+
interface InternalFieldProps extends Omit<FieldProps, "name"> {
|
|
29
|
+
name?: InternalNamePath;
|
|
30
|
+
fieldContext: InternalFormInstance;
|
|
31
|
+
}
|
|
32
|
+
declare class Field extends React.PureComponent<InternalFieldProps, {
|
|
33
|
+
resetCount: number;
|
|
34
|
+
}> implements FieldEntity {
|
|
35
|
+
static contextType: React.Context<InternalFormInstance>;
|
|
36
|
+
state: {
|
|
37
|
+
resetCount: number;
|
|
38
|
+
};
|
|
39
|
+
private cancelRegisterFunc;
|
|
40
|
+
private mounted;
|
|
41
|
+
/**
|
|
42
|
+
* Kept off React state on purpose: these must be readable synchronously
|
|
43
|
+
* during the same tick they change, before React has re-rendered.
|
|
44
|
+
*/
|
|
45
|
+
private touched;
|
|
46
|
+
/** Touched OR validated. Only `dependencies` re-validation consults it. */
|
|
47
|
+
private dirty;
|
|
48
|
+
private validatePromise;
|
|
49
|
+
private errors;
|
|
50
|
+
private warnings;
|
|
51
|
+
private metaCache;
|
|
52
|
+
constructor(props: InternalFieldProps);
|
|
53
|
+
componentDidMount(): void;
|
|
54
|
+
componentWillUnmount(): void;
|
|
55
|
+
private cancelRegister;
|
|
56
|
+
getNamePath: () => InternalNamePath;
|
|
57
|
+
private getRules;
|
|
58
|
+
private reRender;
|
|
59
|
+
/** Remount the child subtree (used on reset so uncontrolled inputs clear). */
|
|
60
|
+
private refresh;
|
|
61
|
+
private triggerMetaEvent;
|
|
62
|
+
onStoreChange: (prevStore: Store, namePathList: InternalNamePath[] | null, info: NotifyInfo) => void;
|
|
63
|
+
validateRules: (options?: InternalValidateOptions) => Promise<RuleError[]>;
|
|
64
|
+
isFieldValidating: () => boolean;
|
|
65
|
+
isFieldTouched: () => boolean;
|
|
66
|
+
isFieldDirty: () => boolean;
|
|
67
|
+
getErrors: () => string[];
|
|
68
|
+
getWarnings: () => string[];
|
|
69
|
+
isListField: () => boolean | undefined;
|
|
70
|
+
isList: () => boolean | undefined;
|
|
71
|
+
isPreserve: () => boolean | undefined;
|
|
72
|
+
getMeta: () => Meta;
|
|
73
|
+
private getValue;
|
|
74
|
+
private getOnlyChild;
|
|
75
|
+
getControlled: (childProps?: Record<string, any>) => Record<string, any>;
|
|
76
|
+
render(): React.JSX.Element;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Normalises `name` and resolves the list/field contexts before handing off
|
|
80
|
+
* to the class. The `key` trick matters: a NON-list field is keyed by its
|
|
81
|
+
* path, so renaming it remounts a clean field instead of carrying the old
|
|
82
|
+
* one's touched/error state onto a different name.
|
|
83
|
+
*/
|
|
84
|
+
declare const WrapperField: React.FC<FieldProps & {
|
|
85
|
+
fieldContext?: InternalFormInstance;
|
|
86
|
+
}>;
|
|
87
|
+
export default WrapperField;
|
|
88
|
+
export { Field as InternalField };
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { FieldContext as e, HOOK_MARK as t, ListContext as n } from "./context.js";
|
|
2
|
+
import { containsNamePath as r, defaultGetValueFromEvent as i, getNamePath as a, getValue as o, toArray as s } from "./namePath.js";
|
|
3
|
+
import { delayFrame as c } from "./FormStore.js";
|
|
4
|
+
import { validateRules as l } from "./validate.js";
|
|
5
|
+
import { isEqual as u } from "./isEqual.js";
|
|
6
|
+
import * as d from "react";
|
|
7
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/Form/Field.tsx
|
|
9
|
+
var p = [];
|
|
10
|
+
function m(e, t, n, r, i, a) {
|
|
11
|
+
return typeof e == "function" ? e(t, n, "source" in a ? { source: a.source } : {}) : r !== i;
|
|
12
|
+
}
|
|
13
|
+
var h = class extends d.PureComponent {
|
|
14
|
+
static contextType = e;
|
|
15
|
+
state = { resetCount: 0 };
|
|
16
|
+
cancelRegisterFunc = null;
|
|
17
|
+
mounted = !1;
|
|
18
|
+
touched = !1;
|
|
19
|
+
dirty = !1;
|
|
20
|
+
validatePromise;
|
|
21
|
+
errors = p;
|
|
22
|
+
warnings = p;
|
|
23
|
+
metaCache = null;
|
|
24
|
+
constructor(e) {
|
|
25
|
+
super(e), e.fieldContext && e.fieldContext.getInternalHooks(t)?.initEntityValue(this);
|
|
26
|
+
}
|
|
27
|
+
componentDidMount() {
|
|
28
|
+
let { shouldUpdate: e, fieldContext: n } = this.props;
|
|
29
|
+
if (this.mounted = !0, n) {
|
|
30
|
+
let e = n.getInternalHooks(t);
|
|
31
|
+
this.cancelRegisterFunc = e?.registerField(this) ?? null;
|
|
32
|
+
}
|
|
33
|
+
e === !0 && this.reRender();
|
|
34
|
+
}
|
|
35
|
+
componentWillUnmount() {
|
|
36
|
+
this.cancelRegister(), this.triggerMetaEvent(!0), this.mounted = !1;
|
|
37
|
+
}
|
|
38
|
+
cancelRegister = () => {
|
|
39
|
+
let { preserve: e, isListField: t, name: n } = this.props;
|
|
40
|
+
this.cancelRegisterFunc?.(t, e, a(n)), this.cancelRegisterFunc = null;
|
|
41
|
+
};
|
|
42
|
+
getNamePath = () => {
|
|
43
|
+
let { name: e, fieldContext: t } = this.props, { prefixName: n = [] } = t;
|
|
44
|
+
return e === void 0 ? [] : [...n, ...e];
|
|
45
|
+
};
|
|
46
|
+
getRules = () => {
|
|
47
|
+
let { rules: e = [], fieldContext: t } = this.props;
|
|
48
|
+
return e.map((e) => typeof e == "function" ? e(t) : e);
|
|
49
|
+
};
|
|
50
|
+
reRender() {
|
|
51
|
+
this.mounted && this.forceUpdate();
|
|
52
|
+
}
|
|
53
|
+
refresh = () => {
|
|
54
|
+
this.mounted && this.setState(({ resetCount: e }) => ({ resetCount: e + 1 }));
|
|
55
|
+
};
|
|
56
|
+
triggerMetaEvent = (e) => {
|
|
57
|
+
let { onMetaChange: t } = this.props;
|
|
58
|
+
if (t) {
|
|
59
|
+
let n = {
|
|
60
|
+
...this.getMeta(),
|
|
61
|
+
destroy: e
|
|
62
|
+
};
|
|
63
|
+
u(this.metaCache, n) || t(n), this.metaCache = n;
|
|
64
|
+
} else this.metaCache = null;
|
|
65
|
+
};
|
|
66
|
+
onStoreChange = (e, t, n) => {
|
|
67
|
+
let { shouldUpdate: i, dependencies: o = [], onReset: s } = this.props, { store: c } = n, l = this.getNamePath(), d = this.getValue(e), f = this.getValue(c), h = t && r(t, l);
|
|
68
|
+
switch (n.type === "valueUpdate" && n.source === "external" && !u(d, f) && (this.touched = !0, this.dirty = !0, this.validatePromise = null, this.errors = p, this.warnings = p, this.triggerMetaEvent()), n.type) {
|
|
69
|
+
case "reset":
|
|
70
|
+
if (!t || h) {
|
|
71
|
+
this.touched = !1, this.dirty = !1, this.validatePromise = void 0, this.errors = p, this.warnings = p, this.triggerMetaEvent(), s?.(), this.refresh();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
case "remove":
|
|
76
|
+
if (i && m(i, e, c, d, f, n)) {
|
|
77
|
+
this.reRender();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case "setField": {
|
|
82
|
+
let { data: a } = n;
|
|
83
|
+
if (h) {
|
|
84
|
+
"touched" in a && (this.touched = a.touched), "validating" in a && !("originRCField" in a) && (this.validatePromise = a.validating ? Promise.resolve([]) : null), "errors" in a && (this.errors = a.errors || p), "warnings" in a && (this.warnings = a.warnings || p), this.dirty = !0, this.triggerMetaEvent(), this.reRender();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if ("value" in a && r(t, l, !0)) {
|
|
88
|
+
this.reRender();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (i && !l.length && m(i, e, c, d, f, n)) {
|
|
92
|
+
this.reRender();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case "dependenciesUpdate":
|
|
98
|
+
if (o.map(a).some((e) => r(n.relatedFields, e))) {
|
|
99
|
+
this.reRender();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
default: if (h || (!o.length || l.length || i) && m(i, e, c, d, f, n)) {
|
|
104
|
+
this.reRender();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
i === !0 && this.reRender();
|
|
109
|
+
};
|
|
110
|
+
validateRules = (e) => {
|
|
111
|
+
let t = this.getNamePath(), n = this.getValue(), { triggerName: r, validateOnly: i = !1, delayFrame: a } = e || {}, o = Promise.resolve().then(async () => {
|
|
112
|
+
if (!this.mounted) return [];
|
|
113
|
+
let { validateFirst: i = !1, messageVariables: u } = this.props;
|
|
114
|
+
a && await c();
|
|
115
|
+
let d = this.getRules();
|
|
116
|
+
r && (d = d.filter((e) => e).filter((e) => {
|
|
117
|
+
let { validateTrigger: t } = e;
|
|
118
|
+
return !t || s(t).includes(r);
|
|
119
|
+
}));
|
|
120
|
+
let f = l(t, n, d, e?.validateMessages ?? {}, i, u);
|
|
121
|
+
return f.catch((e) => e).then((e = []) => {
|
|
122
|
+
if (this.validatePromise === o) {
|
|
123
|
+
this.validatePromise = null;
|
|
124
|
+
let t = [], n = [];
|
|
125
|
+
e.forEach?.(({ rule: { warningOnly: e }, errors: r = [] }) => {
|
|
126
|
+
e ? n.push(...r) : t.push(...r);
|
|
127
|
+
}), this.errors = t, this.warnings = n, this.triggerMetaEvent(), this.reRender();
|
|
128
|
+
}
|
|
129
|
+
}), f;
|
|
130
|
+
});
|
|
131
|
+
return i ? o : (this.validatePromise = o, this.dirty = !0, this.errors = p, this.warnings = p, this.triggerMetaEvent(), this.reRender(), o);
|
|
132
|
+
};
|
|
133
|
+
isFieldValidating = () => !!this.validatePromise;
|
|
134
|
+
isFieldTouched = () => this.touched;
|
|
135
|
+
isFieldDirty = () => this.dirty || this.props.initialValue !== void 0 ? !0 : this.props.fieldContext.getInternalHooks(t)?.getInitialValue(this.getNamePath()) !== void 0;
|
|
136
|
+
getErrors = () => this.errors;
|
|
137
|
+
getWarnings = () => this.warnings;
|
|
138
|
+
isListField = () => this.props.isListField;
|
|
139
|
+
isList = () => this.props.isList;
|
|
140
|
+
isPreserve = () => this.props.preserve;
|
|
141
|
+
getMeta = () => ({
|
|
142
|
+
touched: this.isFieldTouched(),
|
|
143
|
+
validating: this.isFieldValidating(),
|
|
144
|
+
errors: this.errors,
|
|
145
|
+
warnings: this.warnings,
|
|
146
|
+
name: this.getNamePath(),
|
|
147
|
+
validated: this.validatePromise === null
|
|
148
|
+
});
|
|
149
|
+
getValue = (e) => {
|
|
150
|
+
let { getFieldsValue: t } = this.props.fieldContext;
|
|
151
|
+
return o(e || t(!0), this.getNamePath());
|
|
152
|
+
};
|
|
153
|
+
getOnlyChild = (e) => {
|
|
154
|
+
if (typeof e == "function") {
|
|
155
|
+
let t = this.getMeta();
|
|
156
|
+
return {
|
|
157
|
+
...this.getOnlyChild(e(this.getControlled(), t, this.props.fieldContext)),
|
|
158
|
+
isFunction: !0
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
let t = d.Children.toArray(e);
|
|
162
|
+
return t.length !== 1 || !d.isValidElement(t[0]) ? {
|
|
163
|
+
child: t,
|
|
164
|
+
isFunction: !1
|
|
165
|
+
} : {
|
|
166
|
+
child: t[0],
|
|
167
|
+
isFunction: !1
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
getControlled = (e = {}) => {
|
|
171
|
+
let { name: n, trigger: r = "onChange", validateTrigger: a, getValueFromEvent: o, valuePropName: c = "value", getValueProps: l, fieldContext: u } = this.props, d = a === void 0 ? u.validateTrigger : a, f = this.getNamePath(), p = u.getInternalHooks(t)?.dispatch, m = this.getValue(), h = l || ((e) => ({ [c]: e })), g = e[r], _ = n === void 0 ? {} : h(m), v = {
|
|
172
|
+
...e,
|
|
173
|
+
..._
|
|
174
|
+
};
|
|
175
|
+
return v[r] = (...e) => {
|
|
176
|
+
this.touched = !0, this.dirty = !0, this.triggerMetaEvent();
|
|
177
|
+
let t = o ? o(...e) : i(c, ...e);
|
|
178
|
+
t !== m && p?.({
|
|
179
|
+
type: "updateValue",
|
|
180
|
+
namePath: f,
|
|
181
|
+
value: t
|
|
182
|
+
}), g?.(...e);
|
|
183
|
+
}, s(d || []).forEach((e) => {
|
|
184
|
+
let t = v[e];
|
|
185
|
+
v[e] = (...n) => {
|
|
186
|
+
t?.(...n);
|
|
187
|
+
let { rules: r } = this.props;
|
|
188
|
+
r && r.length && p?.({
|
|
189
|
+
type: "validateField",
|
|
190
|
+
namePath: f,
|
|
191
|
+
triggerName: e
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
}), v;
|
|
195
|
+
};
|
|
196
|
+
render() {
|
|
197
|
+
let { resetCount: e } = this.state, { children: t } = this.props, { child: n, isFunction: r } = this.getOnlyChild(t), i;
|
|
198
|
+
return i = r ? n : d.isValidElement(n) ? d.cloneElement(n, this.getControlled(n.props)) : n, /* @__PURE__ */ f(d.Fragment, { children: i }, e);
|
|
199
|
+
}
|
|
200
|
+
}, g = ({ name: t, ...r }) => {
|
|
201
|
+
let i = d.useContext(e), o = d.useContext(n), s = t === void 0 ? void 0 : a(t), c = r.isListField ?? !!o, l = c ? "keep" : `_${(s || []).join("_")}`;
|
|
202
|
+
return /* @__PURE__ */ f(h, {
|
|
203
|
+
...r,
|
|
204
|
+
name: s,
|
|
205
|
+
isListField: c,
|
|
206
|
+
fieldContext: r.fieldContext ?? i
|
|
207
|
+
}, l);
|
|
208
|
+
};
|
|
209
|
+
//#endregion
|
|
210
|
+
export { h as InternalField, g as default };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","names":[],"sources":["../../../src/components/Form/Field.tsx"],"sourcesContent":["/**\n * `Field`: the state half of a form item. It renders no DOM of its own: it\n * clones its single child with `value` / `onChange` (or the declared\n * `valuePropName` / `trigger`), owns that field's meta, and decides when to\n * re-render. Everything visual lives in `FormItem`.\n *\n * A class component because the store holds a reference to each mounted field\n * and calls imperative methods on it (`validateRules`, `getMeta`,\n * `onStoreChange`, `isFieldDirty`).\n *\n * The re-render decision in `onStoreChange` matches upstream on purpose:\n * making it more precise changes when a component that reads values during\n * render without subscribing to them updates.\n */\nimport { delayFrame } from \"./FormStore\";\nimport { FieldContext, ListContext, HOOK_MARK, type ListContextValue } from \"./context\";\nimport type {\n FieldEntity,\n InternalFormInstance,\n InternalValidateOptions,\n Meta,\n NotifyInfo,\n Rule,\n RuleError,\n RuleObject,\n StoreValue,\n} from \"./interface\";\nimport {\n containsNamePath,\n defaultGetValueFromEvent,\n getNamePath,\n getValue,\n toArray,\n type InternalNamePath,\n type NamePath,\n type Store,\n} from \"./namePath\";\nimport { validateRules } from \"./validate\";\nimport { isEqual } from \"./isEqual\";\nimport * as React from \"react\";\n\nconst EMPTY_ERRORS: string[] = [];\n\nexport interface FieldProps {\n name?: NamePath;\n children?:\n | React.ReactNode\n | ((\n control: Record<string, any>,\n meta: Meta,\n form: InternalFormInstance,\n ) => React.ReactNode);\n rules?: Rule[];\n dependencies?: NamePath[];\n shouldUpdate?:\n boolean | ((prev: Store, next: Store, info: { source?: string }) => boolean);\n initialValue?: any;\n preserve?: boolean;\n trigger?: string;\n validateTrigger?: string | string[] | false;\n validateFirst?: boolean | \"parallel\";\n valuePropName?: string;\n getValueProps?: (value: StoreValue) => Record<string, unknown>;\n getValueFromEvent?: (...args: any[]) => StoreValue;\n messageVariables?: Record<string, string>;\n isListField?: boolean;\n isList?: boolean;\n onReset?: () => void;\n onMetaChange?: (meta: Meta & { destroy?: boolean }) => void;\n}\n\ninterface InternalFieldProps extends Omit<FieldProps, \"name\"> {\n name?: InternalNamePath;\n fieldContext: InternalFormInstance;\n}\n\nfunction requireUpdate(\n shouldUpdate: FieldProps[\"shouldUpdate\"],\n prev: Store,\n next: Store,\n prevValue: any,\n nextValue: any,\n info: NotifyInfo,\n): boolean {\n if (typeof shouldUpdate === \"function\") {\n // Only a value update carries a `source`; upstream passes `{}` otherwise,\n // and comparators destructure it.\n return shouldUpdate(prev, next, \"source\" in info ? { source: info.source } : {});\n }\n return prevValue !== nextValue;\n}\n\nclass Field\n extends React.PureComponent<InternalFieldProps, { resetCount: number }>\n implements FieldEntity\n{\n static override contextType = FieldContext;\n\n override state = { resetCount: 0 };\n\n private cancelRegisterFunc:\n | ((\n isListField?: boolean,\n preserve?: boolean,\n subNamePath?: InternalNamePath,\n ) => void)\n | null = null;\n\n private mounted = false;\n\n /**\n * Kept off React state on purpose: these must be readable synchronously\n * during the same tick they change, before React has re-rendered.\n */\n private touched = false;\n\n /** Touched OR validated. Only `dependencies` re-validation consults it. */\n private dirty = false;\n\n private validatePromise: Promise<any> | null | undefined;\n\n private errors: string[] = EMPTY_ERRORS;\n\n private warnings: string[] = EMPTY_ERRORS;\n\n private metaCache: (Meta & { destroy?: boolean }) | null = null;\n\n constructor(props: InternalFieldProps) {\n super(props);\n // Write `initialValue` into the store during construction, before the\n // first render reads it — otherwise the control paints empty once.\n if (props.fieldContext) {\n props.fieldContext.getInternalHooks(HOOK_MARK)?.initEntityValue(this);\n }\n }\n\n override componentDidMount() {\n const { shouldUpdate, fieldContext } = this.props;\n this.mounted = true;\n if (fieldContext) {\n const hooks = fieldContext.getInternalHooks(HOOK_MARK);\n this.cancelRegisterFunc = hooks?.registerField(this) ?? null;\n }\n // `shouldUpdate === true` means \"render me again on anything\"; the extra\n // pass makes sure the first paint sees sibling fields that mounted after.\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n\n override componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n\n private cancelRegister = () => {\n const { preserve, isListField, name } = this.props;\n this.cancelRegisterFunc?.(isListField, preserve, getNamePath(name));\n this.cancelRegisterFunc = null;\n };\n\n // ================================ Utils =================================\n\n getNamePath = (): InternalNamePath => {\n const { name, fieldContext } = this.props;\n const { prefixName = [] } = fieldContext;\n // `prefixName` is what makes a Form.List child's `name` RELATIVE while\n // its `dependencies` stay absolute.\n return name !== undefined ? [...prefixName, ...name] : [];\n };\n\n private getRules = (): RuleObject[] => {\n const { rules = [], fieldContext } = this.props;\n return rules.map((rule) =>\n typeof rule === \"function\" ? rule(fieldContext) : rule,\n );\n };\n\n private reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n\n /** Remount the child subtree (used on reset so uncontrolled inputs clear). */\n private refresh = () => {\n if (!this.mounted) return;\n this.setState(({ resetCount }) => ({ resetCount: resetCount + 1 }));\n };\n\n private triggerMetaEvent = (destroy?: boolean) => {\n const { onMetaChange } = this.props;\n if (onMetaChange) {\n const meta = { ...this.getMeta(), destroy };\n if (!isEqual(this.metaCache, meta)) {\n onMetaChange(meta);\n }\n this.metaCache = meta;\n } else {\n this.metaCache = null;\n }\n };\n\n // ========================= Field entity API =============================\n\n onStoreChange = (\n prevStore: Store,\n namePathList: InternalNamePath[] | null,\n info: NotifyInfo,\n ) => {\n const { shouldUpdate, dependencies = [], onReset } = this.props;\n const { store } = info;\n const namePath = this.getNamePath();\n const prevValue = this.getValue(prevStore);\n const curValue = this.getValue(store);\n const namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is treated as user input: it marks the field touched\n // and clears any error the previous value had produced.\n if (\n info.type === \"valueUpdate\" &&\n info.source === \"external\" &&\n !isEqual(prevValue, curValue)\n ) {\n this.touched = true;\n this.dirty = true;\n this.validatePromise = null;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n }\n\n switch (info.type) {\n case \"reset\":\n if (!namePathList || namePathMatch) {\n this.touched = false;\n this.dirty = false;\n this.validatePromise = undefined;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n onReset?.();\n this.refresh();\n return;\n }\n break;\n\n case \"remove\": {\n // A `preserve: false` field disappearing can cascade: A hides B hides C.\n if (\n shouldUpdate &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n case \"setField\": {\n const { data } = info;\n if (namePathMatch) {\n if (\"touched\" in data) {\n this.touched = data.touched as boolean;\n }\n if (\"validating\" in data && !(\"originRCField\" in data)) {\n this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if (\"errors\" in data) {\n this.errors = data.errors || EMPTY_ERRORS;\n }\n if (\"warnings\" in data) {\n this.warnings = data.warnings || EMPTY_ERRORS;\n }\n this.dirty = true;\n this.triggerMetaEvent();\n this.reRender();\n return;\n }\n if (\"value\" in data && containsNamePath(namePathList, namePath, true)) {\n this.reRender();\n return;\n }\n if (\n shouldUpdate &&\n !namePath.length &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n case \"dependenciesUpdate\": {\n const dependencyList = dependencies.map(getNamePath);\n if (\n dependencyList.some((dependency) =>\n containsNamePath(info.relatedFields, dependency),\n )\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n default:\n // A field re-renders when its own path changed, or — for a field with\n // no `dependencies` shortcut — when `shouldUpdate` says so.\n if (\n namePathMatch ||\n ((!dependencies.length || namePath.length || shouldUpdate) &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info))\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n if (shouldUpdate === true) {\n this.reRender();\n }\n };\n\n validateRules = (options?: InternalValidateOptions): Promise<RuleError[]> => {\n // Snapshot both, so a `form.setFieldValue` mid-validation cannot swap the\n // value out from under the rules.\n const namePath = this.getNamePath();\n const currentValue = this.getValue();\n const {\n triggerName,\n validateOnly = false,\n delayFrame: showDelayFrame,\n } = options || {};\n\n const rootPromise = Promise.resolve().then(async () => {\n if (!this.mounted) {\n return [] as RuleError[];\n }\n const { validateFirst = false, messageVariables } = this.props;\n\n if (showDelayFrame) {\n await delayFrame();\n }\n\n let filteredRules = this.getRules();\n if (triggerName) {\n filteredRules = filteredRules\n .filter((rule) => rule)\n .filter((rule) => {\n const { validateTrigger } = rule;\n if (!validateTrigger) {\n return true;\n }\n return toArray(validateTrigger).includes(triggerName);\n });\n }\n\n const promise = validateRules(\n namePath,\n currentValue,\n filteredRules,\n options?.validateMessages ?? {},\n validateFirst,\n messageVariables,\n );\n\n promise\n .catch((e) => e)\n .then((ruleErrors: RuleError[] = []) => {\n // Ignore a stale run: only the latest validation may publish.\n if (this.validatePromise === rootPromise) {\n this.validatePromise = null;\n const nextErrors: string[] = [];\n const nextWarnings: string[] = [];\n ruleErrors.forEach?.(({ rule: { warningOnly }, errors = [] }) => {\n if (warningOnly) {\n nextWarnings.push(...errors);\n } else {\n nextErrors.push(...errors);\n }\n });\n this.errors = nextErrors;\n this.warnings = nextWarnings;\n this.triggerMetaEvent();\n this.reRender();\n }\n });\n\n return promise;\n });\n\n if (validateOnly) {\n return rootPromise as Promise<RuleError[]>;\n }\n\n this.validatePromise = rootPromise;\n this.dirty = true;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n this.reRender();\n\n return rootPromise as Promise<RuleError[]>;\n };\n\n isFieldValidating = () => !!this.validatePromise;\n\n isFieldTouched = () => this.touched;\n\n isFieldDirty = () => {\n if (this.dirty || this.props.initialValue !== undefined) {\n return true;\n }\n const hooks = this.props.fieldContext.getInternalHooks(HOOK_MARK);\n return hooks?.getInitialValue(this.getNamePath()) !== undefined;\n };\n\n getErrors = () => this.errors;\n\n getWarnings = () => this.warnings;\n\n isListField = () => this.props.isListField;\n\n isList = () => this.props.isList;\n\n isPreserve = () => this.props.preserve;\n\n getMeta = (): Meta => ({\n touched: this.isFieldTouched(),\n validating: this.isFieldValidating(),\n errors: this.errors,\n warnings: this.warnings,\n name: this.getNamePath(),\n validated: this.validatePromise === null,\n });\n\n // ============================ Field control =============================\n\n private getValue = (store?: Store) => {\n const { getFieldsValue } = this.props.fieldContext;\n return getValue(store || getFieldsValue(true), this.getNamePath());\n };\n\n private getOnlyChild = (\n children: InternalFieldProps[\"children\"],\n ): { child: React.ReactNode; isFunction: boolean } => {\n if (typeof children === \"function\") {\n const meta = this.getMeta();\n return {\n ...this.getOnlyChild(\n children(this.getControlled(), meta, this.props.fieldContext),\n ),\n isFunction: true,\n };\n }\n const childList = React.Children.toArray(children);\n if (childList.length !== 1 || !React.isValidElement(childList[0])) {\n return { child: childList, isFunction: false };\n }\n return { child: childList[0], isFunction: false };\n };\n\n getControlled = (childProps: Record<string, any> = {}) => {\n const {\n name,\n trigger = \"onChange\",\n validateTrigger,\n getValueFromEvent,\n valuePropName = \"value\",\n getValueProps,\n fieldContext,\n } = this.props;\n const mergedValidateTrigger =\n validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n const namePath = this.getNamePath();\n const dispatch = fieldContext.getInternalHooks(HOOK_MARK)?.dispatch;\n const value = this.getValue();\n const mergedGetValueProps =\n getValueProps || ((val: StoreValue) => ({ [valuePropName]: val }));\n const originTriggerFunc = childProps[trigger];\n // A layout-only Field (no `name`) must not inject `value` into its child.\n const valueProps = name !== undefined ? mergedGetValueProps(value) : {};\n\n const control: Record<string, any> = { ...childProps, ...valueProps };\n\n control[trigger] = (...args: any[]) => {\n this.touched = true;\n this.dirty = true;\n this.triggerMetaEvent();\n const newValue = getValueFromEvent\n ? getValueFromEvent(...args)\n : defaultGetValueFromEvent(valuePropName, ...args);\n if (newValue !== value) {\n dispatch?.({ type: \"updateValue\", namePath, value: newValue });\n }\n originTriggerFunc?.(...args);\n };\n\n toArray(mergedValidateTrigger || []).forEach((triggerName) => {\n const originTrigger = control[triggerName];\n control[triggerName] = (...args: any[]) => {\n originTrigger?.(...args);\n // Read `rules` at call time — a `dependencies`-driven rule swap must\n // take effect immediately, not on the next render.\n const { rules } = this.props;\n if (rules && rules.length) {\n dispatch?.({ type: \"validateField\", namePath, triggerName });\n }\n };\n });\n\n return control;\n };\n\n override render() {\n const { resetCount } = this.state;\n const { children } = this.props;\n const { child, isFunction } = this.getOnlyChild(children);\n\n let returnChildNode: React.ReactNode;\n if (isFunction) {\n returnChildNode = child;\n } else if (React.isValidElement(child)) {\n returnChildNode = React.cloneElement(\n child,\n this.getControlled((child as React.ReactElement<any>).props),\n );\n } else {\n returnChildNode = child;\n }\n\n return <React.Fragment key={resetCount}>{returnChildNode}</React.Fragment>;\n }\n}\n\n/**\n * Normalises `name` and resolves the list/field contexts before handing off\n * to the class. The `key` trick matters: a NON-list field is keyed by its\n * path, so renaming it remounts a clean field instead of carrying the old\n * one's touched/error state onto a different name.\n */\nconst WrapperField: React.FC<FieldProps & { fieldContext?: InternalFormInstance }> = ({\n name,\n ...restProps\n}) => {\n const fieldContext = React.useContext(FieldContext);\n const listContext = React.useContext<ListContextValue | null>(ListContext);\n const namePath = name !== undefined ? getNamePath(name) : undefined;\n const isMergedListField = restProps.isListField ?? !!listContext;\n\n const key = isMergedListField ? \"keep\" : `_${(namePath || []).join(\"_\")}`;\n\n return (\n <Field\n key={key}\n {...restProps}\n name={namePath}\n isListField={isMergedListField}\n fieldContext={restProps.fieldContext ?? fieldContext}\n />\n );\n};\n\nexport default WrapperField;\nexport { Field as InternalField };\n"],"mappings":"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"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { default as useForm, FormStore } from './FormStore';
|
|
2
|
+
import { FormItemCol, FormLayout, FormSize, RequiredMark } from './context';
|
|
3
|
+
import { Callbacks, FieldData, FormInstance, ValidateMessages } from './interface';
|
|
4
|
+
import { Store } from './namePath';
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
export interface FormProps<Values = any> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "children" | "onChange" | "onReset"> {
|
|
7
|
+
form?: FormInstance<Values>;
|
|
8
|
+
name?: string;
|
|
9
|
+
initialValues?: Store;
|
|
10
|
+
/** `false` drops unmounted fields' values; the default `true` keeps them. */
|
|
11
|
+
preserve?: boolean;
|
|
12
|
+
layout?: FormLayout;
|
|
13
|
+
requiredMark?: RequiredMark;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
size?: FormSize;
|
|
16
|
+
labelCol?: FormItemCol;
|
|
17
|
+
wrapperCol?: FormItemCol;
|
|
18
|
+
colon?: boolean;
|
|
19
|
+
labelAlign?: "left" | "right";
|
|
20
|
+
labelWrap?: boolean;
|
|
21
|
+
validateMessages?: ValidateMessages;
|
|
22
|
+
validateTrigger?: string | string[] | false;
|
|
23
|
+
scrollToFirstError?: boolean | Record<string, unknown>;
|
|
24
|
+
clearOnDestroy?: boolean;
|
|
25
|
+
onValuesChange?: Callbacks<Values>["onValuesChange"];
|
|
26
|
+
onFieldsChange?: Callbacks<Values>["onFieldsChange"];
|
|
27
|
+
onFinish?: Callbacks<Values>["onFinish"];
|
|
28
|
+
onFinishFailed?: Callbacks<Values>["onFinishFailed"];
|
|
29
|
+
/** `false` renders no wrapper element at all (context only). */
|
|
30
|
+
component?: React.ComponentType<any> | string | false;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What `<Form ref>` hands back. `nativeElement` is OPTIONAL on purpose: call
|
|
35
|
+
* sites declare `useRef<FormInstance>(null)`, and a required extra member
|
|
36
|
+
* would make that ref type unassignable to the element's `ref` prop.
|
|
37
|
+
*/
|
|
38
|
+
export type FormRef<Values = any> = FormInstance<Values> & {
|
|
39
|
+
nativeElement?: HTMLElement | null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The ref is declared as `Ref<FormInstance<Values>>`, not `Ref<FormRef<…>>`:
|
|
43
|
+
* call sites write `useRef<FormInstance<MyValues>>(null)`, and inference
|
|
44
|
+
* through the plain generic recovers `Values` from that, where an
|
|
45
|
+
* intersection type does not. The runtime object still carries
|
|
46
|
+
* `nativeElement`, which `FormRef` describes for anyone who wants it.
|
|
47
|
+
*/
|
|
48
|
+
declare const Form: <Values = any>(props: FormProps<Values> & {
|
|
49
|
+
ref?: React.Ref<FormInstance<Values>>;
|
|
50
|
+
}) => React.ReactElement;
|
|
51
|
+
export interface FormProviderProps {
|
|
52
|
+
validateMessages?: ValidateMessages;
|
|
53
|
+
onFormChange?: (name: string | undefined, info: {
|
|
54
|
+
changedFields: FieldData[];
|
|
55
|
+
forms: Record<string, FormInstance>;
|
|
56
|
+
}) => void;
|
|
57
|
+
onFormFinish?: (name: string | undefined, info: {
|
|
58
|
+
values: Store;
|
|
59
|
+
forms: Record<string, FormInstance>;
|
|
60
|
+
}) => void;
|
|
61
|
+
children?: React.ReactNode;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Cross-form listener. `onFormChange` is wired to `onFieldsChange`, NOT to
|
|
65
|
+
* `onValuesChange`, so it observes programmatic mutations (`setFieldValue`,
|
|
66
|
+
* `setFieldsValue`, `setFields`) as well as user edits.
|
|
67
|
+
*/
|
|
68
|
+
export declare const FormProvider: React.FC<FormProviderProps>;
|
|
69
|
+
export { useForm, FormStore };
|
|
70
|
+
export default Form;
|