@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Statistic2.js","names":[],"sources":["../../../src/components/Statistic/Statistic.tsx"],"sourcesContent":["/**\n * Statistic\n *\n * A dashboard metric: a caption, a large value with its unit, and an optional\n * segmented usage bar of `value` against `total`. The bar is a strip of\n * notches, so 3 of 20 reads differently from 4 of 20 at a glance; it carries\n * `role=\"progressbar\"` and shows \"value / total\" in a tooltip.\n *\n * A value that is not finite shows `unlimitedLabel` instead of a number.\n *\n * @example\n * <Statistic label=\"Memory\" value={12} total={64} unit=\"GiB\" progressMode=\"visible\" />\n */\nimport type { CSSProperties, HTMLAttributes, ReactNode } from \"react\";\nimport { HStack, VStack } from \"@astryxdesign/core/Stack\";\nimport { Text } from \"@astryxdesign/core/Text\";\nimport { Tooltip } from \"@astryxdesign/core/Tooltip\";\n\nimport { useUicTranslator } from \"../../i18n/useUicTranslator\";\nimport \"./Statistic.css\";\n\nexport interface StatisticProps extends Omit<HTMLAttributes<HTMLDivElement>, \"color\"> {\n /** The caption. */\n label: ReactNode;\n /** The value. Not finite renders `unlimitedLabel`. */\n value?: number;\n /** What the value is measured against; the bar needs it. */\n total?: number;\n /** Unit after the value. */\n unit?: string;\n /** Decimal places, trailing zeros dropped. @default 2 */\n precision?: number;\n /** A non-finite value or total in the bar's tooltip. @default '∞' */\n infinityLabel?: string;\n /**\n * The usage bar: `visible` draws it (with a `total`), `placeholder` keeps\n * its space without painting it, `hidden` leaves it out. @default 'hidden'\n */\n progressMode?: \"hidden\" | \"placeholder\" | \"visible\";\n /** Notches in the bar. @default 20 */\n progressSteps?: number;\n /** Colour of the value and of the bar's filled notches. */\n color?: string;\n /** Shown for a non-finite value. @default the catalog's uic.Statistic.unlimited (\"Unlimited\") */\n unlimitedLabel?: string;\n}\n\nfunction StepBar({\n steps,\n percent,\n isPlaceholder,\n color,\n label,\n}: {\n steps: number;\n percent: number;\n isPlaceholder?: boolean;\n color?: string;\n label: string;\n}) {\n const filled = Math.round((percent / 100) * steps);\n return (\n <div\n className=\"uic-statistic__steps\"\n role=\"progressbar\"\n aria-label={label}\n aria-valuenow={percent}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n {Array.from({ length: steps }, (_, index) => (\n <span\n key={index}\n className={\n isPlaceholder\n ? \"uic-statistic__step uic-statistic__step--placeholder\"\n : index < filled\n ? \"uic-statistic__step uic-statistic__step--filled\"\n : \"uic-statistic__step\"\n }\n style={\n isPlaceholder || index >= filled ? undefined : { backgroundColor: color }\n }\n />\n ))}\n </div>\n );\n}\n\nexport function Statistic({\n label,\n value,\n total,\n unit = \"\",\n precision = 2,\n infinityLabel = \"∞\",\n progressMode = \"hidden\",\n progressSteps = 20,\n color,\n unlimitedLabel,\n className,\n ...divProps\n}: StatisticProps) {\n const t = useUicTranslator();\n const format = (n: number) =>\n Number.isFinite(n) ? parseFloat(n.toFixed(precision)).toString() : infinityLabel;\n\n const displayValue = value === undefined ? undefined : format(value);\n const displayTotal = total === undefined ? undefined : format(total);\n\n const percent = (() => {\n if (progressMode === \"hidden\" || total === undefined || total === Infinity)\n return 0;\n // Nothing allocated out of a zero quota is empty; anything else against\n // it, a non-finite value included, is full.\n if (total === 0) return value === 0 ? 0 : 100;\n if (value === undefined || !Number.isFinite(value) || !Number.isFinite(total))\n return 100;\n return Math.round((value / total) * 100);\n })();\n const accessibleLabel = typeof label === \"string\" ? label : \"usage\";\n const colorStyle: CSSProperties | undefined = color ? { color } : undefined;\n\n return (\n <VStack\n align=\"start\"\n className={[\"uic-statistic\", className].filter(Boolean).join(\" \")}\n {...divProps}\n >\n <Text\n size=\"lg\"\n color=\"secondary\"\n display=\"block\"\n className=\"uic-statistic__label\"\n >\n {label}\n </Text>\n <HStack gap={1} align=\"end\" className=\"uic-statistic__row\">\n {value !== undefined && !Number.isFinite(value) ? (\n <Text className=\"uic-statistic__value\">\n {unlimitedLabel ?? t(\"uic.Statistic.unlimited\")}\n </Text>\n ) : (\n <>\n <Text className=\"uic-statistic__value\" style={colorStyle}>\n {displayValue}\n </Text>\n {unit && <Text color=\"secondary\">{unit}</Text>}\n </>\n )}\n </HStack>\n {progressMode === \"visible\" && total !== undefined ? (\n <Tooltip content={`${displayValue} ${unit} / ${displayTotal} ${unit}`}>\n <StepBar\n steps={progressSteps}\n percent={percent}\n color={color}\n label={accessibleLabel}\n />\n </Tooltip>\n ) : progressMode === \"placeholder\" ? (\n <StepBar\n isPlaceholder\n steps={progressSteps}\n percent={0}\n label={accessibleLabel}\n />\n ) : null}\n </VStack>\n );\n}\n\nStatistic.displayName = \"Statistic\";\n"],"mappings":";;;;;;;AA+CA,SAAS,EAAQ,EACf,UACA,YACA,kBACA,UACA,YAOC;CACD,IAAM,IAAS,KAAK,MAAO,IAAU,MAAO,CAAK;CACjD,OACE,kBAAC,OAAD;EACE,WAAU;EACV,MAAK;EACL,cAAY;EACZ,iBAAe;EACf,iBAAe;EACf,iBAAe;EAEd,UAAA,MAAM,KAAK,EAAE,QAAQ,EAAM,IAAI,GAAG,MACjC,kBAAC,QAAD;GAEE,WACE,IACI,yDACA,IAAQ,IACN,oDACA;GAER,OACE,KAAiB,KAAS,IAAS,KAAA,IAAY,EAAE,iBAAiB,EAAM;EAE3E,GAXM,CAWN,CACF;CACE,CAAA;AAET;AAEA,SAAgB,EAAU,EACxB,UACA,UACA,UACA,UAAO,IACP,eAAY,GACZ,mBAAgB,KAChB,kBAAe,UACf,mBAAgB,IAChB,UACA,mBACA,cACA,GAAG,KACc;CACjB,IAAM,IAAI,EAAiB,GACrB,KAAU,MACd,OAAO,SAAS,CAAC,IAAI,WAAW,EAAE,QAAQ,CAAS,CAAC,CAAC,CAAC,SAAS,IAAI,GAE/D,IAAe,MAAU,KAAA,IAAY,KAAA,IAAY,EAAO,CAAK,GAC7D,IAAe,MAAU,KAAA,IAAY,KAAA,IAAY,EAAO,CAAK,GAE7D,IACA,MAAiB,YAAY,MAAU,KAAA,KAAa,MAAU,WACzD,IAGL,MAAU,IAAU,MAAU,IAAI,IAAI,MACtC,MAAU,KAAA,KAAa,CAAC,OAAO,SAAS,CAAK,KAAK,CAAC,OAAO,SAAS,CAAK,IACnE,MACF,KAAK,MAAO,IAAQ,IAAS,GAAG,GAEnC,IAAkB,OAAO,KAAU,WAAW,IAAQ,SACtD,IAAwC,IAAQ,EAAE,SAAM,IAAI,KAAA;CAElE,OACE,kBAAC,GAAD;EACE,OAAM;EACN,WAAW,CAAC,iBAAiB,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAChE,GAAI;EAHN,UAAA;GAKE,kBAAC,GAAD;IACE,MAAK;IACL,OAAM;IACN,SAAQ;IACR,WAAU;IAET,UAAA;GACG,CAAA;GACN,kBAAC,GAAD;IAAQ,KAAK;IAAG,OAAM;IAAM,WAAU;IACnC,UAAA,MAAU,KAAA,KAAa,CAAC,OAAO,SAAS,CAAK,IAC5C,kBAAC,GAAD;KAAM,WAAU;KACb,UAAA,KAAkB,EAAE,yBAAyB;IAC1C,CAAA,IAEN,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;KAAM,WAAU;KAAuB,OAAO;KAC3C,UAAA;IACG,CAAA,GACL,KAAQ,kBAAC,GAAD;KAAM,OAAM;KAAa,UAAA;IAAW,CAAA,CAC7C,EAAA,CAAA;GAEE,CAAA;GACP,MAAiB,aAAa,MAAU,KAAA,IACvC,kBAAC,GAAD;IAAS,SAAS,GAAG,EAAa,GAAG,EAAK,KAAK,EAAa,GAAG;IAC7D,UAAA,kBAAC,GAAD;KACE,OAAO;KACE;KACF;KACP,OAAO;IACR,CAAA;GACM,CAAA,IACP,MAAiB,gBACnB,kBAAC,GAAD;IACE,eAAA;IACA,OAAO;IACP,SAAS;IACT,OAAO;GACR,CAAA,IACC;EACE;;AAEZ;AAEA,EAAU,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type StepDirection = "up" | "down";
|
|
2
|
+
export interface NumberStepperProps {
|
|
3
|
+
/** Called with the direction of the half that was pressed. */
|
|
4
|
+
onStep: (direction: StepDirection) => void;
|
|
5
|
+
/** Disables both halves. */
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Accessible name of the upper half.
|
|
9
|
+
* @default the catalog's uic.NumberStepper.increase ("Increase")
|
|
10
|
+
*/
|
|
11
|
+
increaseLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Accessible name of the lower half.
|
|
14
|
+
* @default the catalog's uic.NumberStepper.decrease ("Decrease")
|
|
15
|
+
*/
|
|
16
|
+
decreaseLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function NumberStepper({ onStep, isDisabled, increaseLabel, decreaseLabel, }: NumberStepperProps): import("react").JSX.Element;
|
|
19
|
+
export declare namespace NumberStepper {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The index of the next rung of `steps` from `current`. A value already on a
|
|
24
|
+
* rung moves one rung (↑ from 4 lands on 8); a value between rungs moves to
|
|
25
|
+
* the nearer rung in that direction. The result can fall outside `steps`
|
|
26
|
+
* (-1, or `steps.length`); the caller decides what that means: clamp, or
|
|
27
|
+
* carry into another unit.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getNextStepIndex(steps: readonly number[], current: number, direction: StepDirection): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const numberStepperMessages: {
|
|
2
|
+
readonly "uic.NumberStepper.increase": {
|
|
3
|
+
readonly defaultMessage: "Increase";
|
|
4
|
+
readonly description: "Accessible name of the button that steps a number field up";
|
|
5
|
+
};
|
|
6
|
+
readonly "uic.NumberStepper.decrease": {
|
|
7
|
+
readonly defaultMessage: "Decrease";
|
|
8
|
+
readonly description: "Accessible name of the button that steps a number field down";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineMessages as e } from "../../i18n/catalog.js";
|
|
2
|
+
//#region src/components/StepNumberInput/NumberStepper.messages.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
"uic.NumberStepper.increase": {
|
|
5
|
+
defaultMessage: "Increase",
|
|
6
|
+
description: "Accessible name of the button that steps a number field up"
|
|
7
|
+
},
|
|
8
|
+
"uic.NumberStepper.decrease": {
|
|
9
|
+
defaultMessage: "Decrease",
|
|
10
|
+
description: "Accessible name of the button that steps a number field down"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as numberStepperMessages };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=NumberStepper.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberStepper.messages.js","names":[],"sources":["../../../src/components/StepNumberInput/NumberStepper.messages.ts"],"sourcesContent":["import { defineMessages } from \"../../i18n/catalog\";\n\nexport const numberStepperMessages = defineMessages({\n \"uic.NumberStepper.increase\": {\n defaultMessage: \"Increase\",\n description: \"Accessible name of the button that steps a number field up\",\n },\n \"uic.NumberStepper.decrease\": {\n defaultMessage: \"Decrease\",\n description: \"Accessible name of the button that steps a number field down\",\n },\n});\n"],"mappings":";;AAEA,IAAa,IAAwB,EAAe;CAClD,8BAA8B;EAC5B,gBAAgB;EAChB,aAAa;CACf;CACA,8BAA8B;EAC5B,gBAAgB;EAChB,aAAa;CACf;AACF,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Icon as r } from "@astryxdesign/core/Icon";
|
|
5
|
+
import { InputGroupText as i } from "@astryxdesign/core/InputGroup";
|
|
6
|
+
//#region src/components/StepNumberInput/NumberStepper.tsx
|
|
7
|
+
function a({ onStep: a, isDisabled: o, increaseLabel: s, decreaseLabel: c }) {
|
|
8
|
+
let l = e();
|
|
9
|
+
return /* @__PURE__ */ n(i, {
|
|
10
|
+
className: "uic-number-stepper",
|
|
11
|
+
children: [/* @__PURE__ */ t("button", {
|
|
12
|
+
type: "button",
|
|
13
|
+
tabIndex: -1,
|
|
14
|
+
className: "uic-number-stepper__button uic-number-stepper__button--increase",
|
|
15
|
+
"aria-label": s ?? l("uic.NumberStepper.increase"),
|
|
16
|
+
disabled: o,
|
|
17
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
18
|
+
onClick: () => a("up"),
|
|
19
|
+
children: /* @__PURE__ */ t(r, {
|
|
20
|
+
icon: "chevronDown",
|
|
21
|
+
size: "xsm",
|
|
22
|
+
color: "inherit"
|
|
23
|
+
})
|
|
24
|
+
}), /* @__PURE__ */ t("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
tabIndex: -1,
|
|
27
|
+
className: "uic-number-stepper__button uic-number-stepper__button--decrease",
|
|
28
|
+
"aria-label": c ?? l("uic.NumberStepper.decrease"),
|
|
29
|
+
disabled: o,
|
|
30
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
31
|
+
onClick: () => a("down"),
|
|
32
|
+
children: /* @__PURE__ */ t(r, {
|
|
33
|
+
icon: "chevronDown",
|
|
34
|
+
size: "xsm",
|
|
35
|
+
color: "inherit"
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
a.displayName = "NumberStepper";
|
|
41
|
+
function o(e, t, n) {
|
|
42
|
+
let r = [...e].sort((e, t) => e - t), i = 0;
|
|
43
|
+
for (; i < r.length && (r[i] ?? 0) < t;) i += 1;
|
|
44
|
+
return n === "up" ? t === r[i] ? i + 1 : i : i - 1;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { a as NumberStepper, o as getNextStepIndex };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=NumberStepper2.js.map
|
|
50
|
+
import "../../assets/components/StepNumberInput/NumberStepper.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberStepper2.js","names":[],"sources":["../../../src/components/StepNumberInput/NumberStepper.tsx"],"sourcesContent":["/**\n * NumberStepper\n *\n * The up/down column of a number field whose steps are not linear. Astryx's\n * `NumberInput hasNumberSteppers` snaps to a grid anchored at `min`\n * (`min + n * step`), so no `step` goes 8 → 16 up and 8 → 4 down, and its\n * buttons expose no hook to replace the arithmetic. This column is drawn the\n * way Astryx draws its own: the same width, the same chevron, rotated for\n * the upper half, the same hairline between the halves.\n *\n * It must sit inside an `InputGroup`: `InputGroupText` is what welds the\n * column to the field.\n *\n * Unlike Astryx's buttons, these do not move focus back into the field; they\n * only keep a click from taking it away.\n *\n * @example\n * <InputGroup label=\"Size\" isLabelHidden>\n * <NumberInput label=\"Size\" isLabelHidden value={value} onChange={setValue} />\n * <NumberStepper onStep={(direction) => setValue(stepTo(direction))} />\n * </InputGroup>\n */\nimport { Icon } from \"@astryxdesign/core/Icon\";\nimport { InputGroupText } from \"@astryxdesign/core/InputGroup\";\n\nimport { useUicTranslator } from \"../../i18n/useUicTranslator\";\nimport \"./NumberStepper.css\";\n\nexport type StepDirection = \"up\" | \"down\";\n\nexport interface NumberStepperProps {\n /** Called with the direction of the half that was pressed. */\n onStep: (direction: StepDirection) => void;\n /** Disables both halves. */\n isDisabled?: boolean;\n /**\n * Accessible name of the upper half.\n * @default the catalog's uic.NumberStepper.increase (\"Increase\")\n */\n increaseLabel?: string;\n /**\n * Accessible name of the lower half.\n * @default the catalog's uic.NumberStepper.decrease (\"Decrease\")\n */\n decreaseLabel?: string;\n}\n\nexport function NumberStepper({\n onStep,\n isDisabled,\n increaseLabel,\n decreaseLabel,\n}: NumberStepperProps) {\n const t = useUicTranslator();\n return (\n <InputGroupText className=\"uic-number-stepper\">\n <button\n type=\"button\"\n // Not a tab stop, and a click must not take focus from the field,\n // as with Astryx's own stepper.\n tabIndex={-1}\n className=\"uic-number-stepper__button uic-number-stepper__button--increase\"\n aria-label={increaseLabel ?? t(\"uic.NumberStepper.increase\")}\n disabled={isDisabled}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => onStep(\"up\")}\n >\n <Icon icon=\"chevronDown\" size=\"xsm\" color=\"inherit\" />\n </button>\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"uic-number-stepper__button uic-number-stepper__button--decrease\"\n aria-label={decreaseLabel ?? t(\"uic.NumberStepper.decrease\")}\n disabled={isDisabled}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => onStep(\"down\")}\n >\n <Icon icon=\"chevronDown\" size=\"xsm\" color=\"inherit\" />\n </button>\n </InputGroupText>\n );\n}\n\nNumberStepper.displayName = \"NumberStepper\";\n\n/**\n * The index of the next rung of `steps` from `current`. A value already on a\n * rung moves one rung (↑ from 4 lands on 8); a value between rungs moves to\n * the nearer rung in that direction. The result can fall outside `steps`\n * (-1, or `steps.length`); the caller decides what that means: clamp, or\n * carry into another unit.\n */\nexport function getNextStepIndex(\n steps: readonly number[],\n current: number,\n direction: StepDirection,\n): number {\n const sorted = [...steps].sort((a, b) => a - b);\n let index = 0;\n while (index < sorted.length && (sorted[index] ?? 0) < current) index += 1;\n if (direction === \"up\") return current === sorted[index] ? index + 1 : index;\n return index - 1;\n}\n"],"mappings":";;;;;;AA+CA,SAAgB,EAAc,EAC5B,WACA,eACA,kBACA,oBACqB;CACrB,IAAM,IAAI,EAAiB;CAC3B,OACE,kBAAC,GAAD;EAAgB,WAAU;EAA1B,UAAA,CACE,kBAAC,UAAD;GACE,MAAK;GAGL,UAAU;GACV,WAAU;GACV,cAAY,KAAiB,EAAE,4BAA4B;GAC3D,UAAU;GACV,gBAAgB,MAAU,EAAM,eAAe;GAC/C,eAAe,EAAO,IAAI;GAE1B,UAAA,kBAAC,GAAD;IAAM,MAAK;IAAc,MAAK;IAAM,OAAM;GAAW,CAAA;EAC/C,CAAA,GACR,kBAAC,UAAD;GACE,MAAK;GACL,UAAU;GACV,WAAU;GACV,cAAY,KAAiB,EAAE,4BAA4B;GAC3D,UAAU;GACV,gBAAgB,MAAU,EAAM,eAAe;GAC/C,eAAe,EAAO,MAAM;GAE5B,UAAA,kBAAC,GAAD;IAAM,MAAK;IAAc,MAAK;IAAM,OAAM;GAAW,CAAA;EAC/C,CAAA,CACM;;AAEpB;AAEA,EAAc,cAAc;AAS5B,SAAgB,EACd,GACA,GACA,GACQ;CACR,IAAM,IAAS,CAAC,GAAG,CAAK,CAAC,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,GAC1C,IAAQ;CACZ,OAAO,IAAQ,EAAO,WAAW,EAAO,MAAU,KAAK,IAAS,KAAS;CAEzE,OADI,MAAc,OAAa,MAAY,EAAO,KAAS,IAAQ,IAAI,IAChE,IAAQ;AACjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface StepNumberInputProps {
|
|
3
|
+
/** The values the stepper moves between. */
|
|
4
|
+
steps: readonly number[];
|
|
5
|
+
/** The value, when controlled. */
|
|
6
|
+
value?: number;
|
|
7
|
+
/** The first value when uncontrolled. Default: `steps[0]` */
|
|
8
|
+
defaultValue?: number;
|
|
9
|
+
/** Called with the new value. A cleared field reports 0. */
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
/** Lower bound for typing and stepping. */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** Upper bound for typing and stepping. */
|
|
14
|
+
max?: number;
|
|
15
|
+
/** Unit shown in the field ("GiB"). */
|
|
16
|
+
units?: string;
|
|
17
|
+
/** Accessible name. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Hides the label visually; it stays the accessible name. Default: false */
|
|
20
|
+
isLabelHidden?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
/** Accessible name of the step-up button. Default: NumberStepper's */
|
|
24
|
+
increaseLabel?: string;
|
|
25
|
+
/** Accessible name of the step-down button. Default: NumberStepper's */
|
|
26
|
+
decreaseLabel?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
export declare function StepNumberInput({ steps, value: valueProp, defaultValue, onChange, min, max, units, label, isLabelHidden, placeholder, isDisabled, increaseLabel, decreaseLabel, className, style, }: StepNumberInputProps): import("react").JSX.Element;
|
|
31
|
+
export declare namespace StepNumberInput {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { NumberStepper as e, getNextStepIndex as t } from "./NumberStepper2.js";
|
|
2
|
+
import { useState as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { InputGroup as a } from "@astryxdesign/core/InputGroup";
|
|
5
|
+
import { NumberInput as o } from "@astryxdesign/core/NumberInput";
|
|
6
|
+
//#region src/components/StepNumberInput/StepNumberInput.tsx
|
|
7
|
+
function s({ steps: s, value: c, defaultValue: l, onChange: u, min: d, max: f, units: p, label: m, isLabelHidden: h = !1, placeholder: g, isDisabled: _, increaseLabel: v, decreaseLabel: y, className: b, style: x }) {
|
|
8
|
+
let [S, C] = n(l ?? s[0] ?? 0), w = c !== void 0, T = w ? c : S, E = (e) => {
|
|
9
|
+
w || C(e), u?.(e);
|
|
10
|
+
}, D = (e) => {
|
|
11
|
+
let n = t(s, T, e);
|
|
12
|
+
if (n < 0 || n >= s.length) return;
|
|
13
|
+
let r = [...s].sort((e, t) => e - t)[n] ?? T;
|
|
14
|
+
d !== void 0 && r < d ? r = d : f !== void 0 && r > f && (r = f), E(r);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ i(a, {
|
|
17
|
+
label: m,
|
|
18
|
+
isLabelHidden: h,
|
|
19
|
+
isDisabled: _,
|
|
20
|
+
className: b,
|
|
21
|
+
style: x,
|
|
22
|
+
children: [/* @__PURE__ */ r(o, {
|
|
23
|
+
label: m,
|
|
24
|
+
isLabelHidden: !0,
|
|
25
|
+
value: T,
|
|
26
|
+
onChange: (e) => E(e ?? 0),
|
|
27
|
+
onKeyDown: (e) => {
|
|
28
|
+
_ || (e.key === "ArrowUp" || e.key === "ArrowDown") && (e.preventDefault(), D(e.key === "ArrowUp" ? "up" : "down"));
|
|
29
|
+
},
|
|
30
|
+
min: d,
|
|
31
|
+
max: f,
|
|
32
|
+
units: p,
|
|
33
|
+
placeholder: g,
|
|
34
|
+
isDisabled: _,
|
|
35
|
+
width: "100%"
|
|
36
|
+
}), /* @__PURE__ */ r(e, {
|
|
37
|
+
onStep: D,
|
|
38
|
+
isDisabled: _,
|
|
39
|
+
increaseLabel: v,
|
|
40
|
+
decreaseLabel: y
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
s.displayName = "StepNumberInput";
|
|
45
|
+
//#endregion
|
|
46
|
+
export { s as StepNumberInput };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=StepNumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepNumberInput.js","names":[],"sources":["../../../src/components/StepNumberInput/StepNumberInput.tsx"],"sourcesContent":["/**\n * StepNumberInput\n *\n * A number field that steps along a list of values instead of by a fixed\n * step: `[0.25, 0.5, 1, 2, 4, 8]` goes 2 → 4 → 8 on the stepper and on\n * ArrowUp/ArrowDown, and a typed 3 steps up to 4. A typed value is kept as\n * typed. `min` and `max` clamp a step.\n *\n * `NumberInput`'s own stepping is linear, so the field cancels its\n * ArrowUp/ArrowDown and the column beside it is a `NumberStepper`.\n *\n * @example\n * <StepNumberInput\n * label=\"Shared memory\"\n * steps={[0.25, 0.5, 1, 2, 4, 8]}\n * units=\"GiB\"\n * value={value}\n * onChange={setValue}\n * />\n */\nimport { useState, type CSSProperties, type KeyboardEvent } from \"react\";\nimport { InputGroup } from \"@astryxdesign/core/InputGroup\";\nimport { NumberInput } from \"@astryxdesign/core/NumberInput\";\n\nimport { NumberStepper, getNextStepIndex, type StepDirection } from \"./NumberStepper\";\n\nexport interface StepNumberInputProps {\n /** The values the stepper moves between. */\n steps: readonly number[];\n /** The value, when controlled. */\n value?: number;\n /** The first value when uncontrolled. Default: `steps[0]` */\n defaultValue?: number;\n /** Called with the new value. A cleared field reports 0. */\n onChange?: (value: number) => void;\n /** Lower bound for typing and stepping. */\n min?: number;\n /** Upper bound for typing and stepping. */\n max?: number;\n /** Unit shown in the field (\"GiB\"). */\n units?: string;\n /** Accessible name. */\n label: string;\n /** Hides the label visually; it stays the accessible name. Default: false */\n isLabelHidden?: boolean;\n placeholder?: string;\n isDisabled?: boolean;\n /** Accessible name of the step-up button. Default: NumberStepper's */\n increaseLabel?: string;\n /** Accessible name of the step-down button. Default: NumberStepper's */\n decreaseLabel?: string;\n className?: string;\n style?: CSSProperties;\n}\n\nexport function StepNumberInput({\n steps,\n value: valueProp,\n defaultValue,\n onChange,\n min,\n max,\n units,\n label,\n isLabelHidden = false,\n placeholder,\n isDisabled,\n increaseLabel,\n decreaseLabel,\n className,\n style,\n}: StepNumberInputProps) {\n const [innerValue, setInnerValue] = useState(defaultValue ?? steps[0] ?? 0);\n const isControlled = valueProp !== undefined;\n const value = isControlled ? valueProp : innerValue;\n\n const setValue = (next: number) => {\n if (!isControlled) setInnerValue(next);\n onChange?.(next);\n };\n\n const step = (direction: StepDirection) => {\n const index = getNextStepIndex(steps, value, direction);\n if (index < 0 || index >= steps.length) return;\n let next = [...steps].sort((a, b) => a - b)[index] ?? value;\n if (min !== undefined && next < min) next = min;\n else if (max !== undefined && next > max) next = max;\n setValue(next);\n };\n\n // ArrowUp/ArrowDown would step linearly by `step`; step the list instead.\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (isDisabled) return;\n if (event.key !== \"ArrowUp\" && event.key !== \"ArrowDown\") return;\n event.preventDefault();\n step(event.key === \"ArrowUp\" ? \"up\" : \"down\");\n };\n\n return (\n <InputGroup\n label={label}\n isLabelHidden={isLabelHidden}\n isDisabled={isDisabled}\n className={className}\n style={style}\n >\n <NumberInput\n label={label}\n isLabelHidden\n value={value}\n onChange={(next) => setValue(next ?? 0)}\n onKeyDown={handleKeyDown}\n min={min}\n max={max}\n units={units}\n placeholder={placeholder}\n isDisabled={isDisabled}\n width=\"100%\"\n />\n <NumberStepper\n onStep={step}\n isDisabled={isDisabled}\n increaseLabel={increaseLabel}\n decreaseLabel={decreaseLabel}\n />\n </InputGroup>\n );\n}\n\nStepNumberInput.displayName = \"StepNumberInput\";\n"],"mappings":";;;;;;AAuDA,SAAgB,EAAgB,EAC9B,UACA,OAAO,GACP,iBACA,aACA,QACA,QACA,UACA,UACA,mBAAgB,IAChB,gBACA,eACA,kBACA,kBACA,cACA,YACuB;CACvB,IAAM,CAAC,GAAY,KAAiB,EAAS,KAAgB,EAAM,MAAM,CAAC,GACpE,IAAe,MAAc,KAAA,GAC7B,IAAQ,IAAe,IAAY,GAEnC,KAAY,MAAiB;EAEjC,AADK,KAAc,EAAc,CAAI,GACrC,IAAW,CAAI;CACjB,GAEM,KAAQ,MAA6B;EACzC,IAAM,IAAQ,EAAiB,GAAO,GAAO,CAAS;EACtD,IAAI,IAAQ,KAAK,KAAS,EAAM,QAAQ;EACxC,IAAI,IAAO,CAAC,GAAG,CAAK,CAAC,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,MAAU;EAGtD,AAFI,MAAQ,KAAA,KAAa,IAAO,IAAK,IAAO,IACnC,MAAQ,KAAA,KAAa,IAAO,MAAK,IAAO,IACjD,EAAS,CAAI;CACf;CAUA,OACE,kBAAC,GAAD;EACS;EACQ;EACH;EACD;EACJ;EALT,UAAA,CAOE,kBAAC,GAAD;GACS;GACP,eAAA;GACO;GACP,WAAW,MAAS,EAAS,KAAQ,CAAC;GACtC,YApBiB,MAA2C;IAC5D,MACA,EAAM,QAAQ,aAAa,EAAM,QAAQ,iBAC7C,EAAM,eAAe,GACrB,EAAK,EAAM,QAAQ,YAAY,OAAO,MAAM;GAC9C;GAgBW;GACA;GACE;GACM;GACD;GACZ,OAAM;EACP,CAAA,GACD,kBAAC,GAAD;GACE,QAAQ;GACI;GACG;GACA;EAChB,CAAA,CACS;;AAEhB;AAEA,EAAgB,cAAc"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
export interface TextHighlighterProps {
|
|
3
|
+
/** The text to search in. */
|
|
4
|
+
children?: string | null;
|
|
5
|
+
/** The text to mark. */
|
|
6
|
+
keyword?: string;
|
|
7
|
+
/** Class on the outer span. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Inline style of each marked part. */
|
|
10
|
+
highlightStyle?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare function TextHighlighterBase({ children, keyword, className, highlightStyle, }: TextHighlighterProps): ReactElement | null;
|
|
13
|
+
export declare const TextHighlighter: import('react').MemoExoticComponent<typeof TextHighlighterBase>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { memo as e } from "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/TextHighlighter/TextHighlighter.tsx
|
|
5
|
+
var n = (e) => e.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
|
|
6
|
+
function r({ children: e, keyword: r, className: i, highlightStyle: a }) {
|
|
7
|
+
if (!e) return null;
|
|
8
|
+
let o = ["uic-text-highlighter", i].filter(Boolean).join(" ");
|
|
9
|
+
if (!r) return /* @__PURE__ */ t("span", {
|
|
10
|
+
className: o,
|
|
11
|
+
children: e
|
|
12
|
+
});
|
|
13
|
+
let s = r.toLowerCase(), c = e.split(RegExp(`(${n(r)})`, "gi"));
|
|
14
|
+
return /* @__PURE__ */ t("span", {
|
|
15
|
+
className: o,
|
|
16
|
+
children: c.map((e, n) => e.toLowerCase() === s ? /* @__PURE__ */ t("span", {
|
|
17
|
+
className: "uic-text-highlighter__match",
|
|
18
|
+
style: a,
|
|
19
|
+
children: e
|
|
20
|
+
}, n) : e)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
var i = e(r);
|
|
24
|
+
i.displayName = "TextHighlighter";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as TextHighlighter };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=TextHighlighter2.js.map
|
|
29
|
+
import "../../assets/components/TextHighlighter/TextHighlighter.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextHighlighter2.js","names":[],"sources":["../../../src/components/TextHighlighter/TextHighlighter.tsx"],"sourcesContent":["/**\n * TextHighlighter\n *\n * Marks every case-insensitive occurrence of `keyword` in a string, for search\n * results. The keyword is matched literally (regex characters are escaped).\n * Without a keyword the text renders plain; without text nothing renders.\n *\n * The mark's background is the theme's `--color-warning-border-hover` where\n * the theme declares one (the Backend.AI WebUI theme does), else Astryx\n * `--color-warning-muted`.\n *\n * @example\n * <TextHighlighter keyword={search}>{row.name}</TextHighlighter>\n */\nimport { memo, type CSSProperties, type ReactElement } from \"react\";\n\nimport \"./TextHighlighter.css\";\n\nexport interface TextHighlighterProps {\n /** The text to search in. */\n children?: string | null;\n /** The text to mark. */\n keyword?: string;\n /** Class on the outer span. */\n className?: string;\n /** Inline style of each marked part. */\n highlightStyle?: CSSProperties;\n}\n\nconst escapeRegExp = (text: string) => text.replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\");\n\nfunction TextHighlighterBase({\n children,\n keyword,\n className,\n highlightStyle,\n}: TextHighlighterProps): ReactElement | null {\n if (!children) return null;\n const rootClassName = [\"uic-text-highlighter\", className].filter(Boolean).join(\" \");\n if (!keyword) return <span className={rootClassName}>{children}</span>;\n\n const lowerKeyword = keyword.toLowerCase();\n const parts = children.split(new RegExp(`(${escapeRegExp(keyword)})`, \"gi\"));\n return (\n <span className={rootClassName}>\n {parts.map((part, index) =>\n part.toLowerCase() === lowerKeyword ? (\n <span\n key={index}\n className=\"uic-text-highlighter__match\"\n style={highlightStyle}\n >\n {part}\n </span>\n ) : (\n part\n ),\n )}\n </span>\n );\n}\n\nexport const TextHighlighter = memo(TextHighlighterBase);\nTextHighlighter.displayName = \"TextHighlighter\";\n"],"mappings":";;;;AA6BA,IAAM,KAAgB,MAAiB,EAAK,QAAQ,uBAAuB,MAAM;AAEjF,SAAS,EAAoB,EAC3B,aACA,YACA,cACA,qBAC4C;CAC5C,IAAI,CAAC,GAAU,OAAO;CACtB,IAAM,IAAgB,CAAC,wBAAwB,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAClF,IAAI,CAAC,GAAS,OAAO,kBAAC,QAAD;EAAM,WAAW;EAAgB;CAAe,CAAA;CAErE,IAAM,IAAe,EAAQ,YAAY,GACnC,IAAQ,EAAS,MAAU,OAAO,IAAI,EAAa,CAAO,EAAE,IAAI,IAAI,CAAC;CAC3E,OACE,kBAAC,QAAD;EAAM,WAAW;EACd,UAAA,EAAM,KAAK,GAAM,MAChB,EAAK,YAAY,MAAM,IACrB,kBAAC,QAAD;GAEE,WAAU;GACV,OAAO;GAEN,UAAA;EACG,GALC,CAKD,IAEN,CAEJ;CACI,CAAA;AAEV;AAEA,IAAa,IAAkB,EAAK,CAAmB;AACvD,EAAgB,cAAc"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TokenListItem = string | number;
|
|
3
|
+
export interface TokenListProps {
|
|
4
|
+
/** The values. */
|
|
5
|
+
items: ReadonlyArray<TokenListItem>;
|
|
6
|
+
/** How many items show inline before `+N`. @default 3 */
|
|
7
|
+
maxInline?: number;
|
|
8
|
+
/** Rendered instead of the list when `items` is empty. @default '-' */
|
|
9
|
+
emptyText?: ReactNode;
|
|
10
|
+
/** `token` for Tokens and a `+N` link, `text` for plain text and a `+N` badge. @default 'token' */
|
|
11
|
+
variant?: "token" | "text";
|
|
12
|
+
/** How the overflow opens. @default 'hover' */
|
|
13
|
+
trigger?: "hover" | "click";
|
|
14
|
+
}
|
|
15
|
+
export declare function TokenList({ items, maxInline, emptyText, variant, trigger, }: TokenListProps): import("react").JSX.Element;
|
|
16
|
+
export declare namespace TokenList {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { HStack as e, VStack as t } from "@astryxdesign/core/Stack";
|
|
3
|
+
import { Text as n } from "@astryxdesign/core/Text";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { Token as o } from "@astryxdesign/core/Token";
|
|
6
|
+
import { Link as s } from "@astryxdesign/core/Link";
|
|
7
|
+
import { Popover as c } from "@astryxdesign/core/Popover";
|
|
8
|
+
import { Badge as l } from "@astryxdesign/core/Badge";
|
|
9
|
+
import { HoverCard as u } from "@astryxdesign/core/HoverCard";
|
|
10
|
+
//#region src/components/TokenList/TokenList.tsx
|
|
11
|
+
function d({ items: d, maxInline: f = 3, emptyText: p = "-", variant: m = "token", trigger: h = "hover" }) {
|
|
12
|
+
if (d.length === 0) return /* @__PURE__ */ i(r, { children: p });
|
|
13
|
+
let g = d.slice(0, f), _ = d.slice(f), v = _.length, y = /* @__PURE__ */ i(t, {
|
|
14
|
+
align: "start",
|
|
15
|
+
className: "uic-token-list__rest",
|
|
16
|
+
children: _.map((e, t) => /* @__PURE__ */ i(n, { children: e }, `${e}-${t}`))
|
|
17
|
+
}), b = h === "hover" ? /* @__PURE__ */ i(u, {
|
|
18
|
+
content: y,
|
|
19
|
+
touchTrigger: "tap",
|
|
20
|
+
children: m === "text" ? /* @__PURE__ */ i(l, {
|
|
21
|
+
variant: "neutral",
|
|
22
|
+
label: `+${v}`,
|
|
23
|
+
tabIndex: 0,
|
|
24
|
+
className: "uic-token-list__count"
|
|
25
|
+
}) : /* @__PURE__ */ a(s, { children: ["+", v] })
|
|
26
|
+
}) : /* @__PURE__ */ i(c, {
|
|
27
|
+
label: `+${v}`,
|
|
28
|
+
content: y,
|
|
29
|
+
hasCloseButton: !1,
|
|
30
|
+
hasAutoFocus: !1,
|
|
31
|
+
role: "none",
|
|
32
|
+
children: /* @__PURE__ */ a(s, { children: ["+", v] })
|
|
33
|
+
});
|
|
34
|
+
return m === "text" ? /* @__PURE__ */ a(e, {
|
|
35
|
+
gap: 1,
|
|
36
|
+
align: "center",
|
|
37
|
+
className: "uic-token-list uic-token-list--text",
|
|
38
|
+
children: [g.map((e, t) => /* @__PURE__ */ i("span", {
|
|
39
|
+
className: "uic-token-list__text",
|
|
40
|
+
children: e
|
|
41
|
+
}, `${e}-${t}`)), v > 0 && b]
|
|
42
|
+
}) : /* @__PURE__ */ a("span", { children: [/* @__PURE__ */ i(e, {
|
|
43
|
+
gap: 2,
|
|
44
|
+
align: "center",
|
|
45
|
+
wrap: "wrap",
|
|
46
|
+
className: "uic-token-list",
|
|
47
|
+
children: g.map((e, t) => /* @__PURE__ */ i(o, { label: String(e) }, `${e}-${t}`))
|
|
48
|
+
}), v > 0 && /* @__PURE__ */ a(r, { children: ["\xA0", b] })] });
|
|
49
|
+
}
|
|
50
|
+
d.displayName = "TokenList";
|
|
51
|
+
//#endregion
|
|
52
|
+
export { d as TokenList };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=TokenList2.js.map
|
|
55
|
+
import "../../assets/components/TokenList/TokenList.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenList2.js","names":[],"sources":["../../../src/components/TokenList/TokenList.tsx"],"sourcesContent":["/**\n * TokenList\n *\n * A bounded list of settled values: the first `maxInline` items inline, then\n * a `+N` that shows the rest. The overflow opens on hover and focus, like a\n * tooltip, on a card surface (`HoverCard`) because it is a list of values,\n * not a hint. `trigger=\"click\"` latches it open as a `Popover` instead.\n *\n * - `variant=\"token\"` (default): the items are `Token`s and `+N` is a `Link`.\n * Suits dialogs and forms.\n * - `variant=\"text\"`: the items are plain, unwrapped text and `+N` is a\n * compact `Badge`. Suits dense table cells.\n *\n * The overflow lists only the items that did not fit.\n *\n * @example\n * <TokenList items={emails} maxInline={2} variant=\"text\" />\n */\nimport type { ReactNode } from \"react\";\nimport { Badge } from \"@astryxdesign/core/Badge\";\nimport { HoverCard } from \"@astryxdesign/core/HoverCard\";\nimport { Link } from \"@astryxdesign/core/Link\";\nimport { Popover } from \"@astryxdesign/core/Popover\";\nimport { HStack, VStack } from \"@astryxdesign/core/Stack\";\nimport { Text } from \"@astryxdesign/core/Text\";\nimport { Token } from \"@astryxdesign/core/Token\";\n\nimport \"./TokenList.css\";\n\nexport type TokenListItem = string | number;\n\nexport interface TokenListProps {\n /** The values. */\n items: ReadonlyArray<TokenListItem>;\n /** How many items show inline before `+N`. @default 3 */\n maxInline?: number;\n /** Rendered instead of the list when `items` is empty. @default '-' */\n emptyText?: ReactNode;\n /** `token` for Tokens and a `+N` link, `text` for plain text and a `+N` badge. @default 'token' */\n variant?: \"token\" | \"text\";\n /** How the overflow opens. @default 'hover' */\n trigger?: \"hover\" | \"click\";\n}\n\nexport function TokenList({\n items,\n maxInline = 3,\n emptyText = \"-\",\n variant = \"token\",\n trigger = \"hover\",\n}: TokenListProps) {\n if (items.length === 0) return <>{emptyText}</>;\n\n const inlineItems = items.slice(0, maxInline);\n const restItems = items.slice(maxInline);\n const restCount = restItems.length;\n\n const restList = (\n <VStack align=\"start\" className=\"uic-token-list__rest\">\n {restItems.map((item, index) => (\n <Text key={`${item}-${index}`}>{item}</Text>\n ))}\n </VStack>\n );\n\n const overflowControl =\n trigger === \"hover\" ? (\n // touchTrigger=\"tap\": the token variant's trigger is a button with no\n // action of its own, so the default would leave touch users no way in.\n <HoverCard content={restList} touchTrigger=\"tap\">\n {variant === \"text\" ? (\n // A Badge is a bare <span>; HoverCard only attaches focus to a\n // focusable trigger.\n <Badge\n variant=\"neutral\"\n label={`+${restCount}`}\n tabIndex={0}\n className=\"uic-token-list__count\"\n />\n ) : (\n <Link>+{restCount}</Link>\n )}\n </HoverCard>\n ) : (\n // Popover wires its handlers onto a <button> in the trigger, which a\n // Link without href renders. The list is read-only: no close button,\n // no autofocus, and no dialog role for a layer focus never enters.\n <Popover\n label={`+${restCount}`}\n content={restList}\n hasCloseButton={false}\n hasAutoFocus={false}\n role=\"none\"\n >\n <Link>+{restCount}</Link>\n </Popover>\n );\n\n if (variant === \"text\") {\n return (\n <HStack gap={1} align=\"center\" className=\"uic-token-list uic-token-list--text\">\n {inlineItems.map((item, index) => (\n <span key={`${item}-${index}`} className=\"uic-token-list__text\">\n {item}\n </span>\n ))}\n {restCount > 0 && overflowControl}\n </HStack>\n );\n }\n\n return (\n <span>\n <HStack gap={2} align=\"center\" wrap=\"wrap\" className=\"uic-token-list\">\n {inlineItems.map((item, index) => (\n <Token key={`${item}-${index}`} label={String(item)} />\n ))}\n </HStack>\n {restCount > 0 && (\n <>\n {\" \"}\n {overflowControl}\n </>\n )}\n </span>\n );\n}\n\nTokenList.displayName = \"TokenList\";\n"],"mappings":";;;;;;;;;;AA4CA,SAAgB,EAAU,EACxB,UACA,eAAY,GACZ,eAAY,KACZ,aAAU,SACV,aAAU,WACO;CACjB,IAAI,EAAM,WAAW,GAAG,OAAO,kBAAA,GAAA,EAAA,UAAG,EAAY,CAAA;CAE9C,IAAM,IAAc,EAAM,MAAM,GAAG,CAAS,GACtC,IAAY,EAAM,MAAM,CAAS,GACjC,IAAY,EAAU,QAEtB,IACJ,kBAAC,GAAD;EAAQ,OAAM;EAAQ,WAAU;EAC7B,UAAA,EAAU,KAAK,GAAM,MACpB,kBAAC,GAAD,EAAA,UAAgC,EAAW,GAAhC,GAAG,EAAK,GAAG,GAAqB,CAC5C;CACK,CAAA,GAGJ,IACJ,MAAY,UAGV,kBAAC,GAAD;EAAW,SAAS;EAAU,cAAa;EACxC,UAAA,MAAY,SAGX,kBAAC,GAAD;GACE,SAAQ;GACR,OAAO,IAAI;GACX,UAAU;GACV,WAAU;EACX,CAAA,IAED,kBAAC,GAAD,EAAA,UAAA,CAAM,KAAE,CAAgB,EAAA,CAAA;CAEjB,CAAA,IAKX,kBAAC,GAAD;EACE,OAAO,IAAI;EACX,SAAS;EACT,gBAAgB;EAChB,cAAc;EACd,MAAK;EAEL,UAAA,kBAAC,GAAD,EAAA,UAAA,CAAM,KAAE,CAAgB,EAAA,CAAA;CACjB,CAAA;CAgBb,OAbI,MAAY,SAEZ,kBAAC,GAAD;EAAQ,KAAK;EAAG,OAAM;EAAS,WAAU;EAAzC,UAAA,CACG,EAAY,KAAK,GAAM,MACtB,kBAAC,QAAD;GAA+B,WAAU;GACtC,UAAA;EACG,GAFK,GAAG,EAAK,GAAG,GAEhB,CACP,GACA,IAAY,KAAK,CACZ;MAKV,kBAAC,QAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAQ,KAAK;EAAG,OAAM;EAAS,MAAK;EAAO,WAAU;EAClD,UAAA,EAAY,KAAK,GAAM,MACtB,kBAAC,GAAD,EAAgC,OAAO,OAAO,CAAI,EAAI,GAA1C,GAAG,EAAK,GAAG,GAA+B,CACvD;CACK,CAAA,GACP,IAAY,KACX,kBAAA,GAAA,EAAA,UAAA,CACG,QACA,CACD,EAAA,CAAA,CAEA,EAAA,CAAA;AAEV;AAEA,EAAU,cAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HTMLAttributes, Key, ReactNode } from 'react';
|
|
2
|
+
import { TokenColor } from '@astryxdesign/core/Token';
|
|
3
|
+
export interface TokenRowItem {
|
|
4
|
+
key?: Key;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TokenRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "color"> {
|
|
8
|
+
/** The tokens, in order. */
|
|
9
|
+
items: ReadonlyArray<TokenRowItem>;
|
|
10
|
+
/** How many tokens render before the "and N more" count. @default 3 */
|
|
11
|
+
maxCount?: number;
|
|
12
|
+
/** Size of the whole collection when `items` is a page of it. @default items.length */
|
|
13
|
+
totalCount?: number;
|
|
14
|
+
/** Colour of every token. */
|
|
15
|
+
color?: TokenColor;
|
|
16
|
+
/** Rendered instead of the row when there is nothing to show. @default '-' */
|
|
17
|
+
emptyText?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The count after the tokens, given how many were left out.
|
|
20
|
+
* @default the catalog's uic.TokenRow.more ("and {count} more")
|
|
21
|
+
*/
|
|
22
|
+
moreLabel?: (count: number) => string;
|
|
23
|
+
}
|
|
24
|
+
export declare function TokenRow({ items, maxCount, totalCount, color, emptyText, moreLabel, className, ...divProps }: TokenRowProps): import("react").JSX.Element;
|
|
25
|
+
export declare namespace TokenRow {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineMessages as e } from "../../i18n/catalog.js";
|
|
2
|
+
//#region src/components/TokenRow/TokenRow.messages.ts
|
|
3
|
+
var t = e({ "uic.TokenRow.more": {
|
|
4
|
+
defaultMessage: "and {count} more",
|
|
5
|
+
description: "After a row of tokens cut short, how many were left out; {count} is the number"
|
|
6
|
+
} });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as tokenRowMessages };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=TokenRow.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenRow.messages.js","names":[],"sources":["../../../src/components/TokenRow/TokenRow.messages.ts"],"sourcesContent":["import { defineMessages } from \"../../i18n/catalog\";\n\nexport const tokenRowMessages = defineMessages({\n \"uic.TokenRow.more\": {\n defaultMessage: \"and {count} more\",\n description:\n \"After a row of tokens cut short, how many were left out; {count} is the number\",\n },\n});\n"],"mappings":";;AAEA,IAAa,IAAmB,EAAe,EAC7C,qBAAqB;CACnB,gBAAgB;CAChB,aACE;AACJ,EACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { HStack as t } from "@astryxdesign/core/Stack";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Token as a } from "@astryxdesign/core/Token";
|
|
6
|
+
//#region src/components/TokenRow/TokenRow.tsx
|
|
7
|
+
function o({ items: o, maxCount: s = 3, totalCount: c, color: l, emptyText: u = "-", moreLabel: d, className: f, ...p }) {
|
|
8
|
+
let m = e(), h = o.slice(0, s), g = Math.max((c ?? o.length) - h.length, 0);
|
|
9
|
+
return h.length === 0 ? /* @__PURE__ */ r(n, { children: u }) : /* @__PURE__ */ i(t, {
|
|
10
|
+
gap: 1,
|
|
11
|
+
align: "center",
|
|
12
|
+
wrap: "wrap",
|
|
13
|
+
className: ["uic-token-row", f].filter(Boolean).join(" "),
|
|
14
|
+
...p,
|
|
15
|
+
children: [h.map((e, t) => /* @__PURE__ */ r(a, {
|
|
16
|
+
color: l,
|
|
17
|
+
label: e.label
|
|
18
|
+
}, e.key ?? `${e.label}-${t}`)), g > 0 ? /* @__PURE__ */ r("span", {
|
|
19
|
+
className: "uic-token-row__more",
|
|
20
|
+
children: d ? d(g) : m("uic.TokenRow.more", { count: g })
|
|
21
|
+
}) : null]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
o.displayName = "TokenRow";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { o as TokenRow };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=TokenRow2.js.map
|
|
29
|
+
import "../../assets/components/TokenRow/TokenRow.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenRow2.js","names":[],"sources":["../../../src/components/TokenRow/TokenRow.tsx"],"sourcesContent":["/**\n * TokenRow\n *\n * A row of read-only tokens that stops at `maxCount` and ends with \"and N\n * more\", so one long-tailed record cannot stretch a table row. Pass\n * `totalCount` when `items` is only a page of the collection (a connection\n * capped by `first:`): the count then reports what exists, not what was\n * fetched.\n *\n * @example\n * <TokenRow items={aliases.map((a) => ({ key: a, label: a }))} maxCount={2} />\n */\nimport type { HTMLAttributes, Key, ReactNode } from \"react\";\nimport { HStack } from \"@astryxdesign/core/Stack\";\nimport { Token, type TokenColor } from \"@astryxdesign/core/Token\";\n\nimport { useUicTranslator } from \"../../i18n/useUicTranslator\";\nimport \"./TokenRow.css\";\n\nexport interface TokenRowItem {\n key?: Key;\n label: string;\n}\n\nexport interface TokenRowProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\" | \"color\"\n> {\n /** The tokens, in order. */\n items: ReadonlyArray<TokenRowItem>;\n /** How many tokens render before the \"and N more\" count. @default 3 */\n maxCount?: number;\n /** Size of the whole collection when `items` is a page of it. @default items.length */\n totalCount?: number;\n /** Colour of every token. */\n color?: TokenColor;\n /** Rendered instead of the row when there is nothing to show. @default '-' */\n emptyText?: ReactNode;\n /**\n * The count after the tokens, given how many were left out.\n * @default the catalog's uic.TokenRow.more (\"and {count} more\")\n */\n moreLabel?: (count: number) => string;\n}\n\nexport function TokenRow({\n items,\n maxCount = 3,\n totalCount,\n color,\n emptyText = \"-\",\n moreLabel,\n className,\n ...divProps\n}: TokenRowProps) {\n const t = useUicTranslator();\n const visibleItems = items.slice(0, maxCount);\n const restCount = Math.max((totalCount ?? items.length) - visibleItems.length, 0);\n\n if (visibleItems.length === 0) return <>{emptyText}</>;\n\n return (\n <HStack\n gap={1}\n align=\"center\"\n wrap=\"wrap\"\n className={[\"uic-token-row\", className].filter(Boolean).join(\" \")}\n {...divProps}\n >\n {visibleItems.map((item, index) => (\n <Token\n key={item.key ?? `${item.label}-${index}`}\n color={color}\n label={item.label}\n />\n ))}\n {restCount > 0 ? (\n <span className=\"uic-token-row__more\">\n {moreLabel\n ? moreLabel(restCount)\n : t(\"uic.TokenRow.more\", { count: restCount })}\n </span>\n ) : null}\n </HStack>\n );\n}\n\nTokenRow.displayName = \"TokenRow\";\n"],"mappings":";;;;;;AA6CA,SAAgB,EAAS,EACvB,UACA,cAAW,GACX,eACA,UACA,eAAY,KACZ,cACA,cACA,GAAG,KACa;CAChB,IAAM,IAAI,EAAiB,GACrB,IAAe,EAAM,MAAM,GAAG,CAAQ,GACtC,IAAY,KAAK,KAAK,KAAc,EAAM,UAAU,EAAa,QAAQ,CAAC;CAIhF,OAFI,EAAa,WAAW,IAAU,kBAAA,GAAA,EAAA,UAAG,EAAY,CAAA,IAGnD,kBAAC,GAAD;EACE,KAAK;EACL,OAAM;EACN,MAAK;EACL,WAAW,CAAC,iBAAiB,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAChE,GAAI;EALN,UAAA,CAOG,EAAa,KAAK,GAAM,MACvB,kBAAC,GAAD;GAES;GACP,OAAO,EAAK;EACb,GAHM,EAAK,OAAO,GAAG,EAAK,MAAM,GAAG,GAGnC,CACF,GACA,IAAY,IACX,kBAAC,QAAD;GAAM,WAAU;GACb,UAAA,IACG,EAAU,CAAS,IACnB,EAAE,qBAAqB,EAAE,OAAO,EAAU,CAAC;EAC3C,CAAA,IACJ,IACE;;AAEZ;AAEA,EAAS,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TextInputStatus } from '@astryxdesign/core/TextInput';
|
|
3
|
+
export interface UncontrolledInputProps {
|
|
4
|
+
/** Initial value. A new value resets the field and drops an uncommitted edit. */
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
/** Called with the value when the user presses Enter or leaves the field. */
|
|
7
|
+
onCommit?: (value: string) => void;
|
|
8
|
+
/** `number` renders `NumberInput`. @default "text" */
|
|
9
|
+
type?: "text" | "number" | "password" | "email";
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
/** Validation state, as on `TextInput`. */
|
|
13
|
+
status?: TextInputStatus;
|
|
14
|
+
/**
|
|
15
|
+
* Accessible name. @default the catalog's uic.UncontrolledInput.label
|
|
16
|
+
* ("Select"), hidden
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
/** @default true when `label` is not given, else false */
|
|
20
|
+
isLabelHidden?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
/** `data-testid` and other data attributes go on the field. */
|
|
24
|
+
[dataAttribute: `data-${string}`]: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare function UncontrolledInput({ defaultValue, onCommit, type, placeholder, isDisabled, status, label, isLabelHidden, className, style, ...dataAttributes }: UncontrolledInputProps): import("react").JSX.Element;
|
|
27
|
+
export declare namespace UncontrolledInput {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
|
|
2
|
+
import { useRef as t, useState as n } from "react";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { TextInput as i } from "@astryxdesign/core/TextInput";
|
|
5
|
+
import { NumberInput as a } from "@astryxdesign/core/NumberInput";
|
|
6
|
+
//#region src/components/UncontrolledInput/UncontrolledInput.tsx
|
|
7
|
+
function o({ defaultValue: o, onCommit: s, type: c, placeholder: l, isDisabled: u, status: d, label: f, isLabelHidden: p, className: m, style: h, ...g }) {
|
|
8
|
+
let _ = e(), [v, y] = n(o ?? ""), b = t(null), [x, S] = n(o);
|
|
9
|
+
x !== o && (S(o), y(o ?? ""));
|
|
10
|
+
let C = {
|
|
11
|
+
...g,
|
|
12
|
+
label: f ?? _("uic.UncontrolledInput.label"),
|
|
13
|
+
isLabelHidden: p ?? f === void 0,
|
|
14
|
+
placeholder: l,
|
|
15
|
+
isDisabled: u,
|
|
16
|
+
status: d,
|
|
17
|
+
className: m,
|
|
18
|
+
style: h
|
|
19
|
+
}, w = () => {
|
|
20
|
+
let e = b.current ?? v;
|
|
21
|
+
b.current = null, s?.(e);
|
|
22
|
+
};
|
|
23
|
+
if (c === "number") {
|
|
24
|
+
let e = v === "" ? null : Number(v);
|
|
25
|
+
return /* @__PURE__ */ r(a, {
|
|
26
|
+
...C,
|
|
27
|
+
value: e === null || Number.isNaN(e) ? null : e,
|
|
28
|
+
onChange: (e) => {
|
|
29
|
+
let t = e === null ? "" : String(e);
|
|
30
|
+
b.current = t, y(t);
|
|
31
|
+
},
|
|
32
|
+
onEnter: w,
|
|
33
|
+
onBlur: w
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ r(i, {
|
|
37
|
+
...C,
|
|
38
|
+
type: c === "password" || c === "email" ? c : "text",
|
|
39
|
+
value: v,
|
|
40
|
+
onChange: y,
|
|
41
|
+
onEnter: w,
|
|
42
|
+
onBlur: w
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
o.displayName = "UncontrolledInput";
|
|
46
|
+
//#endregion
|
|
47
|
+
export { o as UncontrolledInput };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=UncontrolledInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UncontrolledInput.js","names":[],"sources":["../../../src/components/UncontrolledInput/UncontrolledInput.tsx"],"sourcesContent":["/**\n * UncontrolledInput\n *\n * A text or number field that reports its value only when the user commits\n * it, by pressing Enter or leaving the field, never on each keystroke. For a\n * value whose change is expensive: persisting a setting, refetching a list.\n *\n * - The draft lives in the component, seeded from `defaultValue`. A new\n * `defaultValue` discards an uncommitted edit.\n * - `type=\"number\"` renders `NumberInput`; every other type `TextInput`.\n * - Astryx fields need an accessible name. Without `label`, a generic one\n * from the catalog is used and hidden; pass a real `label` wherever the\n * field has one.\n *\n * @example\n * <UncontrolledInput label=\"Page size\" type=\"number\" defaultValue=\"20\" onCommit={setPageSize} />\n */\nimport { useRef, useState, type CSSProperties } from \"react\";\nimport { NumberInput } from \"@astryxdesign/core/NumberInput\";\nimport { TextInput, type TextInputStatus } from \"@astryxdesign/core/TextInput\";\n\nimport { useUicTranslator } from \"../../i18n/useUicTranslator\";\n\nexport interface UncontrolledInputProps {\n /** Initial value. A new value resets the field and drops an uncommitted edit. */\n defaultValue?: string;\n /** Called with the value when the user presses Enter or leaves the field. */\n onCommit?: (value: string) => void;\n /** `number` renders `NumberInput`. @default \"text\" */\n type?: \"text\" | \"number\" | \"password\" | \"email\";\n placeholder?: string;\n isDisabled?: boolean;\n /** Validation state, as on `TextInput`. */\n status?: TextInputStatus;\n /**\n * Accessible name. @default the catalog's uic.UncontrolledInput.label\n * (\"Select\"), hidden\n */\n label?: string;\n /** @default true when `label` is not given, else false */\n isLabelHidden?: boolean;\n className?: string;\n style?: CSSProperties;\n /** `data-testid` and other data attributes go on the field. */\n [dataAttribute: `data-${string}`]: string | undefined;\n}\n\nexport function UncontrolledInput({\n defaultValue,\n onCommit,\n type,\n placeholder,\n isDisabled,\n status,\n label,\n isLabelHidden,\n className,\n style,\n ...dataAttributes\n}: UncontrolledInputProps) {\n const t = useUicTranslator();\n const [draft, setDraft] = useState(defaultValue ?? \"\");\n // NumberInput calls onChange and then onEnter/onBlur in one handler, before\n // a re-render, so a value it has just changed to is read from here.\n const justChanged = useRef<string | null>(null);\n // Reseed on a new `defaultValue` during render, as React documents for\n // state derived from a prop.\n const [seed, setSeed] = useState(defaultValue);\n if (seed !== defaultValue) {\n setSeed(defaultValue);\n setDraft(defaultValue ?? \"\");\n }\n\n const shared = {\n ...dataAttributes,\n label: label ?? t(\"uic.UncontrolledInput.label\"),\n isLabelHidden: isLabelHidden ?? label === undefined,\n placeholder,\n isDisabled,\n status,\n className,\n style,\n };\n const commit = () => {\n const value = justChanged.current ?? draft;\n justChanged.current = null;\n onCommit?.(value);\n };\n\n if (type === \"number\") {\n const numeric = draft === \"\" ? null : Number(draft);\n return (\n <NumberInput\n {...shared}\n value={numeric === null || Number.isNaN(numeric) ? null : numeric}\n onChange={(next) => {\n const text = next === null ? \"\" : String(next);\n justChanged.current = text;\n setDraft(text);\n }}\n onEnter={commit}\n onBlur={commit}\n />\n );\n }\n\n return (\n <TextInput\n {...shared}\n type={type === \"password\" || type === \"email\" ? type : \"text\"}\n value={draft}\n onChange={setDraft}\n onEnter={commit}\n onBlur={commit}\n />\n );\n}\n\nUncontrolledInput.displayName = \"UncontrolledInput\";\n"],"mappings":";;;;;;AA+CA,SAAgB,EAAkB,EAChC,iBACA,aACA,SACA,gBACA,eACA,WACA,UACA,kBACA,cACA,UACA,GAAG,KACsB;CACzB,IAAM,IAAI,EAAiB,GACrB,CAAC,GAAO,KAAY,EAAS,KAAgB,EAAE,GAG/C,IAAc,EAAsB,IAAI,GAGxC,CAAC,GAAM,KAAW,EAAS,CAAY;CAC7C,AAAI,MAAS,MACX,EAAQ,CAAY,GACpB,EAAS,KAAgB,EAAE;CAG7B,IAAM,IAAS;EACb,GAAG;EACH,OAAO,KAAS,EAAE,6BAA6B;EAC/C,eAAe,KAAiB,MAAU,KAAA;EAC1C;EACA;EACA;EACA;EACA;CACF,GACM,UAAe;EACnB,IAAM,IAAQ,EAAY,WAAW;EAErC,AADA,EAAY,UAAU,MACtB,IAAW,CAAK;CAClB;CAEA,IAAI,MAAS,UAAU;EACrB,IAAM,IAAU,MAAU,KAAK,OAAO,OAAO,CAAK;EAClD,OACE,kBAAC,GAAD;GACE,GAAI;GACJ,OAAO,MAAY,QAAQ,OAAO,MAAM,CAAO,IAAI,OAAO;GAC1D,WAAW,MAAS;IAClB,IAAM,IAAO,MAAS,OAAO,KAAK,OAAO,CAAI;IAE7C,AADA,EAAY,UAAU,GACtB,EAAS,CAAI;GACf;GACA,SAAS;GACT,QAAQ;EACT,CAAA;CAEL;CAEA,OACE,kBAAC,GAAD;EACE,GAAI;EACJ,MAAM,MAAS,cAAc,MAAS,UAAU,IAAO;EACvD,OAAO;EACP,UAAU;EACV,SAAS;EACT,QAAQ;CACT,CAAA;AAEL;AAEA,EAAkB,cAAc"}
|