@ultraviolet/ui 3.10.2 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/asyncToGenerator.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/defineProperty.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/objectSpread2.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/objectWithoutProperties.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/toPrimitive.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/toPropertyKey.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.113.0 → _@oxc-project_runtime@0.114.0}/helpers/typeof.js +1 -1
- package/dist/components/ActionBar/index.js +2 -2
- package/dist/components/Alert/index.js +2 -2
- package/dist/components/Avatar/index.js +3 -3
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/index.js +2 -2
- package/dist/components/BarChart/Tooltip.js +1 -1
- package/dist/components/BarChart/index.js +2 -2
- package/dist/components/BarStack/index.js +1 -1
- package/dist/components/Breadcrumbs/components/Item.js +1 -1
- package/dist/components/Bullet/index.js +1 -1
- package/dist/components/Button/index.js +2 -2
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Carousel/index.js +2 -2
- package/dist/components/Checkbox/CheckboxIconContainer.d.ts +4 -0
- package/dist/components/Checkbox/CheckboxIconContainer.d.ts.map +1 -0
- package/dist/components/Checkbox/CheckboxIconContainer.js +38 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +9 -37
- package/dist/components/Checkbox/styles.css.d.ts +3 -3
- package/dist/components/Checkbox/styles.css.d.ts.map +1 -1
- package/dist/components/Checkbox/styles.css.js +17 -8
- package/dist/components/CheckboxGroup/index.d.ts +2 -2
- package/dist/components/CheckboxGroup/index.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/index.js +4 -3
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/CopyButton/index.js +1 -1
- package/dist/components/DateInput/components/CalendarContent.js +1 -1
- package/dist/components/DateInput/components/CalendarMonthly.js +1 -1
- package/dist/components/DateInput/index.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/Expandable/index.js +2 -2
- package/dist/components/ExpandableCard/index.js +2 -2
- package/dist/components/FileInput/components/Button.js +2 -2
- package/dist/components/GlobalAlert/GlobalAlertLink.js +1 -1
- package/dist/components/GlobalAlert/index.js +1 -1
- package/dist/components/InfiniteScroll/index.js +1 -1
- package/dist/components/Key/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/LineChart/CustomLegend.js +2 -2
- package/dist/components/LineChart/index.js +2 -2
- package/dist/components/Link/index.js +4 -4
- package/dist/components/List/Cell.js +2 -2
- package/dist/components/List/HeaderCell.js +3 -3
- package/dist/components/List/HeaderRow.js +1 -1
- package/dist/components/List/ListContext.js +3 -3
- package/dist/components/List/Row.js +5 -5
- package/dist/components/List/SelectBar.js +1 -1
- package/dist/components/List/SkeletonRows.js +2 -2
- package/dist/components/List/index.js +1 -1
- package/dist/components/List/styles.css.js +1 -1
- package/dist/components/Loader/index.js +2 -2
- package/dist/components/Menu/MenuContent.js +1 -1
- package/dist/components/Menu/components/Item.d.ts +1 -0
- package/dist/components/Menu/components/Item.d.ts.map +1 -1
- package/dist/components/Menu/components/Item.js +28 -8
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +2 -2
- package/dist/components/Modal/components/Dialog.js +2 -2
- package/dist/components/Notice/index.js +1 -1
- package/dist/components/Notification/Notification.js +1 -1
- package/dist/components/Notification/NotificationContainer.js +1 -1
- package/dist/components/NumberInput/index.js +1 -1
- package/dist/components/Pagination/PaginationButtons.js +1 -1
- package/dist/components/PasswordCheck/index.js +1 -1
- package/dist/components/PieChart/index.js +2 -2
- package/dist/components/Popover/index.js +1 -1
- package/dist/components/Popup/index.js +2 -2
- package/dist/components/Popup/styles.css.js +1 -0
- package/dist/components/Popup/variables.css.js +0 -2
- package/dist/components/ProgressBar/index.js +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/Radio/styles.css.js +1 -1
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/Row/index.js +3 -3
- package/dist/components/SearchInput/index.js +1 -1
- package/dist/components/SelectInput/components/Dropdown.js +4 -4
- package/dist/components/SelectInput/components/SearchBarDropdown.js +3 -3
- package/dist/components/SelectInput/components/SelectBar.js +3 -3
- package/dist/components/SelectInput/index.js +1 -1
- package/dist/components/SelectableCard/IllustrationContainer.d.ts +1 -1
- package/dist/components/SelectableCard/IllustrationContainer.js +2 -2
- package/dist/components/SelectableCard/MultiStateInput.js +1 -1
- package/dist/components/SelectableCard/SelectableCard.js +2 -2
- package/dist/components/SelectableCardGroup/index.js +1 -1
- package/dist/components/SelectableCardOptionGroup/SelectableCardOptionGroup.js +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.js +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +2 -2
- package/dist/components/Separator/index.js +1 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Slider/components/DoubleSlider.js +2 -2
- package/dist/components/Slider/components/SingleSlider.js +3 -3
- package/dist/components/Snippet/index.js +2 -2
- package/dist/components/Stack/index.js +3 -3
- package/dist/components/Status/index.js +1 -1
- package/dist/components/StepList/index.js +1 -1
- package/dist/components/Stepper/Step.js +1 -1
- package/dist/components/Stepper/index.js +2 -2
- package/dist/components/SwitchButton/Option.js +1 -1
- package/dist/components/SwitchButton/index.js +1 -1
- package/dist/components/Table/Cell.js +2 -2
- package/dist/components/Table/HeaderCell.js +2 -2
- package/dist/components/Table/HeaderRow.js +1 -1
- package/dist/components/Table/Row.js +5 -5
- package/dist/components/Table/TableContext.js +2 -2
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabMenu.js +3 -3
- package/dist/components/Tabs/TabMenuItem.js +2 -2
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +3 -3
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/TagInput/index.js +2 -2
- package/dist/components/TagList/index.js +2 -2
- package/dist/components/Text/index.js +3 -3
- package/dist/components/Text/style.css.js +0 -1
- package/dist/components/Text/variables.css.js +2 -0
- package/dist/components/TextArea/index.js +2 -2
- package/dist/components/TextInput/index.js +1 -1
- package/dist/components/TimeInput/index.js +1 -1
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toaster/ToasterContainer.js +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/ToggleGroup/index.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/TreeMapChart/index.js +3 -3
- package/dist/components/UnitInput/index.js +2 -2
- package/dist/components/VerificationCode/index.js +1 -1
- package/dist/components/compositions/CodeEditor/index.d.ts +40 -0
- package/dist/components/compositions/CodeEditor/index.d.ts.map +1 -0
- package/dist/components/compositions/CodeEditor/index.js +129 -0
- package/dist/components/compositions/CodeEditor/styles.css.d.ts +19 -0
- package/dist/components/compositions/CodeEditor/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/CodeEditor/styles.css.js +30 -0
- package/dist/components/compositions/ContentCard/Content.d.ts +13 -0
- package/dist/components/compositions/ContentCard/Content.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/Content.js +65 -0
- package/dist/components/compositions/ContentCard/Skeleton.d.ts +6 -0
- package/dist/components/compositions/ContentCard/Skeleton.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/Skeleton.js +33 -0
- package/dist/components/compositions/ContentCard/index.d.ts +8 -0
- package/dist/components/compositions/ContentCard/index.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/index.js +80 -0
- package/dist/components/compositions/ContentCard/styles.css.d.ts +24 -0
- package/dist/components/compositions/ContentCard/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/styles.css.js +36 -0
- package/dist/components/compositions/ContentCard/type.d.ts +30 -0
- package/dist/components/compositions/ContentCard/type.d.ts.map +1 -0
- package/dist/components/compositions/ContentCardGroup/Card.d.ts +15 -0
- package/dist/components/compositions/ContentCardGroup/Card.d.ts.map +1 -0
- package/dist/components/compositions/ContentCardGroup/Card.js +58 -0
- package/dist/components/compositions/ContentCardGroup/SkeletonCard.d.ts +2 -0
- package/dist/components/compositions/ContentCardGroup/SkeletonCard.d.ts.map +1 -0
- package/dist/components/compositions/ContentCardGroup/SkeletonCard.js +30 -0
- package/dist/components/compositions/ContentCardGroup/index.d.ts +21 -0
- package/dist/components/compositions/ContentCardGroup/index.d.ts.map +1 -0
- package/dist/components/compositions/ContentCardGroup/index.js +21 -0
- package/dist/components/compositions/ContentCardGroup/styles.css.d.ts +8 -0
- package/dist/components/compositions/ContentCardGroup/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/ContentCardGroup/styles.css.js +13 -0
- package/dist/components/compositions/Conversation/index.d.ts +50 -0
- package/dist/components/compositions/Conversation/index.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/index.js +53 -0
- package/dist/components/compositions/Conversation/styles.css.d.ts +8 -0
- package/dist/components/compositions/Conversation/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/styles.css.js +22 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/1-5.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/1-5NB.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/2-5.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/2-5NB.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/3-5.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/3-5NB.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/4-5.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/4-5NB.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/5-5.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/assets/5-5NB.js +5 -0
- package/dist/components/compositions/CustomerSatisfaction/index.d.ts +33 -0
- package/dist/components/compositions/CustomerSatisfaction/index.d.ts.map +1 -0
- package/dist/components/compositions/CustomerSatisfaction/index.js +89 -0
- package/dist/components/compositions/CustomerSatisfaction/styles.css.d.ts +19 -0
- package/dist/components/compositions/CustomerSatisfaction/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/CustomerSatisfaction/styles.css.js +20 -0
- package/dist/components/compositions/EstimateCost/CompactEstimateCost.d.ts +16 -0
- package/dist/components/compositions/EstimateCost/CompactEstimateCost.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/CompactEstimateCost.js +38 -0
- package/dist/components/compositions/EstimateCost/Components/ContentComponents.d.ts +12 -0
- package/dist/components/compositions/EstimateCost/Components/ContentComponents.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/ContentComponents.js +114 -0
- package/dist/components/compositions/EstimateCost/Components/CustomUnitInput.d.ts +10 -0
- package/dist/components/compositions/EstimateCost/Components/CustomUnitInput.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/CustomUnitInput.js +41 -0
- package/dist/components/compositions/EstimateCost/Components/Item.d.ts +118 -0
- package/dist/components/compositions/EstimateCost/Components/Item.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Item.js +168 -0
- package/dist/components/compositions/EstimateCost/Components/ItemLeftSide.d.ts +3 -0
- package/dist/components/compositions/EstimateCost/Components/ItemLeftSide.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/ItemLeftSide.js +75 -0
- package/dist/components/compositions/EstimateCost/Components/ItemPrice.d.ts +3 -0
- package/dist/components/compositions/EstimateCost/Components/ItemPrice.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/ItemPrice.js +54 -0
- package/dist/components/compositions/EstimateCost/Components/LineThrough.d.ts +7 -0
- package/dist/components/compositions/EstimateCost/Components/LineThrough.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/LineThrough.js +18 -0
- package/dist/components/compositions/EstimateCost/Components/NumberInput.d.ts +11 -0
- package/dist/components/compositions/EstimateCost/Components/NumberInput.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/NumberInput.js +35 -0
- package/dist/components/compositions/EstimateCost/Components/Region.d.ts +23 -0
- package/dist/components/compositions/EstimateCost/Components/Region.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Region.js +38 -0
- package/dist/components/compositions/EstimateCost/Components/Regular.d.ts +11 -0
- package/dist/components/compositions/EstimateCost/Components/Regular.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Regular.js +23 -0
- package/dist/components/compositions/EstimateCost/Components/Strong.d.ts +10 -0
- package/dist/components/compositions/EstimateCost/Components/Strong.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Strong.js +16 -0
- package/dist/components/compositions/EstimateCost/Components/Unit.d.ts +11 -0
- package/dist/components/compositions/EstimateCost/Components/Unit.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Unit.js +50 -0
- package/dist/components/compositions/EstimateCost/Components/Zone.d.ts +23 -0
- package/dist/components/compositions/EstimateCost/Components/Zone.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Zone.js +37 -0
- package/dist/components/compositions/EstimateCost/Components/components.css.d.ts +78 -0
- package/dist/components/compositions/EstimateCost/Components/components.css.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/components.css.js +71 -0
- package/dist/components/compositions/EstimateCost/EstimateCostContent.d.ts +3 -0
- package/dist/components/compositions/EstimateCost/EstimateCostContent.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/EstimateCostContent.js +198 -0
- package/dist/components/compositions/EstimateCost/EstimateCostProvider.d.ts +26 -0
- package/dist/components/compositions/EstimateCost/EstimateCostProvider.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/EstimateCostProvider.js +33 -0
- package/dist/components/compositions/EstimateCost/OverlayComponent.d.ts +27 -0
- package/dist/components/compositions/EstimateCost/OverlayComponent.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/OverlayComponent.js +100 -0
- package/dist/components/compositions/EstimateCost/OverlayContext.d.ts +13 -0
- package/dist/components/compositions/EstimateCost/OverlayContext.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/OverlayContext.js +15 -0
- package/dist/components/compositions/EstimateCost/constants.d.ts +8 -0
- package/dist/components/compositions/EstimateCost/constants.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/constants.js +26 -0
- package/dist/components/compositions/EstimateCost/helper.d.ts +10 -0
- package/dist/components/compositions/EstimateCost/helper.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/helper.js +11 -0
- package/dist/components/compositions/EstimateCost/index.d.ts +177 -0
- package/dist/components/compositions/EstimateCost/index.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/index.js +97 -0
- package/dist/components/compositions/EstimateCost/locales/en.d.ts +23 -0
- package/dist/components/compositions/EstimateCost/locales/en.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/locales/en.js +25 -0
- package/dist/components/compositions/EstimateCost/styles.css.d.ts +86 -0
- package/dist/components/compositions/EstimateCost/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/styles.css.js +72 -0
- package/dist/components/compositions/EstimateCost/types.d.ts +226 -0
- package/dist/components/compositions/EstimateCost/types.d.ts.map +1 -0
- package/dist/components/compositions/FAQ/index.d.ts +14 -0
- package/dist/components/compositions/FAQ/index.d.ts.map +1 -0
- package/dist/components/compositions/FAQ/index.js +43 -0
- package/dist/components/compositions/FAQ/styles.css.d.ts +2 -0
- package/dist/components/compositions/FAQ/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/FAQ/styles.css.js +7 -0
- package/dist/components/compositions/InfoTable/Context.d.ts +4 -0
- package/dist/components/compositions/InfoTable/Context.d.ts.map +1 -0
- package/dist/components/compositions/InfoTable/Context.js +7 -0
- package/dist/components/compositions/InfoTable/components/Cell.d.ts +10 -0
- package/dist/components/compositions/InfoTable/components/Cell.d.ts.map +1 -0
- package/dist/components/compositions/InfoTable/components/Cell.js +39 -0
- package/dist/components/compositions/InfoTable/components/Row.d.ts +9 -0
- package/dist/components/compositions/InfoTable/components/Row.d.ts.map +1 -0
- package/dist/components/compositions/InfoTable/components/Row.js +23 -0
- package/dist/components/compositions/InfoTable/index.d.ts +25 -0
- package/dist/components/compositions/InfoTable/index.d.ts.map +1 -0
- package/dist/components/compositions/InfoTable/index.js +28 -0
- package/dist/components/compositions/InfoTable/styles.css.d.ts +8 -0
- package/dist/components/compositions/InfoTable/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/InfoTable/styles.css.js +13 -0
- package/dist/components/compositions/Navigation/Footer.d.ts +9 -0
- package/dist/components/compositions/Navigation/Footer.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/Footer.js +65 -0
- package/dist/components/compositions/Navigation/Header.d.ts +7 -0
- package/dist/components/compositions/Navigation/Header.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/Header.js +24 -0
- package/dist/components/compositions/Navigation/NavigationContent.d.ts +3 -0
- package/dist/components/compositions/Navigation/NavigationContent.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/NavigationContent.js +104 -0
- package/dist/components/compositions/Navigation/NavigationProvider.d.ts +94 -0
- package/dist/components/compositions/Navigation/NavigationProvider.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/NavigationProvider.js +121 -0
- package/dist/components/compositions/Navigation/animations.css.d.ts +7 -0
- package/dist/components/compositions/Navigation/animations.css.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ComponentsTypes.d.ts +65 -0
- package/dist/components/compositions/Navigation/components/ComponentsTypes.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Group.d.ts +10 -0
- package/dist/components/compositions/Navigation/components/Group.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Group.js +40 -0
- package/dist/components/compositions/Navigation/components/Item.d.ts +88 -0
- package/dist/components/compositions/Navigation/components/Item.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Item.js +200 -0
- package/dist/components/compositions/Navigation/components/ItemExpanded.d.ts +3 -0
- package/dist/components/compositions/Navigation/components/ItemExpanded.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ItemExpanded.js +214 -0
- package/dist/components/compositions/Navigation/components/ItemFragments.d.ts +6 -0
- package/dist/components/compositions/Navigation/components/ItemFragments.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ItemFragments.js +63 -0
- package/dist/components/compositions/Navigation/components/ItemMenu.d.ts +4 -0
- package/dist/components/compositions/Navigation/components/ItemMenu.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ItemMenu.js +135 -0
- package/dist/components/compositions/Navigation/components/ItemProvider.d.ts +8 -0
- package/dist/components/compositions/Navigation/components/ItemProvider.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ItemProvider.js +17 -0
- package/dist/components/compositions/Navigation/components/PinnedItems.d.ts +24 -0
- package/dist/components/compositions/Navigation/components/PinnedItems.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/PinnedItems.js +105 -0
- package/dist/components/compositions/Navigation/components/Separator.d.ts +2 -0
- package/dist/components/compositions/Navigation/components/Separator.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Separator.js +11 -0
- package/dist/components/compositions/Navigation/components/ShowHide.d.ts +16 -0
- package/dist/components/compositions/Navigation/components/ShowHide.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/ShowHide.js +54 -0
- package/dist/components/compositions/Navigation/components/items.css.d.ts +98 -0
- package/dist/components/compositions/Navigation/components/items.css.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/items.css.js +124 -0
- package/dist/components/compositions/Navigation/components/styles.css.d.ts +25 -0
- package/dist/components/compositions/Navigation/components/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/styles.css.js +29 -0
- package/dist/components/compositions/Navigation/constants.d.ts +10 -0
- package/dist/components/compositions/Navigation/constants.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/index.d.ts +65 -0
- package/dist/components/compositions/Navigation/index.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/index.js +35 -0
- package/dist/components/compositions/Navigation/locales/en.d.ts +11 -0
- package/dist/components/compositions/Navigation/locales/en.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/locales/en.js +13 -0
- package/dist/components/compositions/Navigation/styles.css.d.ts +34 -0
- package/dist/components/compositions/Navigation/styles.css.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/styles.css.js +37 -0
- package/dist/components/compositions/Navigation/types.d.ts +43 -0
- package/dist/components/compositions/Navigation/types.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/variables.css.d.ts +2 -0
- package/dist/components/compositions/Navigation/variables.css.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/variables.css.js +5 -0
- package/dist/components/compositions/OfferList/components/Cell.js +1 -1
- package/dist/components/compositions/OfferList/components/Row.js +4 -4
- package/dist/components/compositions/OfferList/index.js +1 -1
- package/dist/components/compositions/OfferList/styles.css.js +0 -1
- package/dist/components/compositions/OptionSelector/components/Selector.js +1 -1
- package/dist/components/compositions/OptionSelector/index.js +1 -1
- package/dist/components/compositions/OrderSummary/ScrollableContent.js +1 -1
- package/dist/components/compositions/OrderSummary/helpers.js +1 -1
- package/dist/components/compositions/OrderSummary/index.js +1 -1
- package/dist/components/compositions/Plans/PlanHeader.js +1 -1
- package/dist/components/compositions/index.d.ts +9 -0
- package/dist/components/compositions/index.d.ts.map +1 -1
- package/dist/components/compositions/index.js +12 -1
- package/dist/index.js +17 -17
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/ui.css +1 -1
- package/package.json +10 -6
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __name } from "../../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Stack } from "../../../Stack/index.js";
|
|
4
|
+
import { Tooltip } from "../../../Tooltip/index.js";
|
|
5
|
+
import { useNavigation } from "../NavigationProvider.js";
|
|
6
|
+
import { navigationItemAnimatedIcon, navigationItemContainer, navigationItemContainerAnimated, navigationItemMenuStack } from "./items.css.js";
|
|
7
|
+
import { ItemContext } from "./ItemProvider.js";
|
|
8
|
+
import { ItemExpanded } from "./ItemExpanded.js";
|
|
9
|
+
import { ItemMenu, ItemMenuItem } from "./ItemMenu.js";
|
|
10
|
+
import { Children, isValidElement, memo, useContext, useEffect, useMemo, useRef } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
import { cn } from "@ultraviolet/utils";
|
|
13
|
+
import { OpenInNewIcon } from "@ultraviolet/icons/OpenInNewIcon";
|
|
14
|
+
|
|
15
|
+
//#region src/components/compositions/Navigation/components/Item.tsx
|
|
16
|
+
const onDragStopTrigger = (event) => {
|
|
17
|
+
const element = event.currentTarget;
|
|
18
|
+
element.style.opacity = "1";
|
|
19
|
+
};
|
|
20
|
+
const Item = memo(({ children, categoryIcon, label, labelDescription, subLabel, badgeText, badgeSentiment, href, target, rel, onToggle, onClickPinUnpin, toggle, active, noPinButton, type = "default", as, disabled, noExpand = false, index, id, "data-testid": dataTestId, style, alwaysVisible }) => {
|
|
21
|
+
const context = useNavigation();
|
|
22
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
23
|
+
const hasParents = !!useContext(ItemContext);
|
|
24
|
+
const { expanded, locales, pinnedFeature, pinnedItems, pinLimit, animation, registerItem, shouldAnimate, animationType, showHide } = context;
|
|
25
|
+
const makeRegisterRef = useRef(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
makeRegisterRef.current = () => registerItem({ [id]: {
|
|
28
|
+
active,
|
|
29
|
+
label,
|
|
30
|
+
onClickPinUnpin,
|
|
31
|
+
onToggle
|
|
32
|
+
} });
|
|
33
|
+
}, [
|
|
34
|
+
active,
|
|
35
|
+
id,
|
|
36
|
+
label,
|
|
37
|
+
onClickPinUnpin,
|
|
38
|
+
registerItem,
|
|
39
|
+
onToggle
|
|
40
|
+
]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (type !== "pinnedGroup" && pinnedFeature) {
|
|
43
|
+
var _makeRegisterRef$curr;
|
|
44
|
+
(_makeRegisterRef$curr = makeRegisterRef.current) === null || _makeRegisterRef$curr === void 0 || _makeRegisterRef$curr.call(makeRegisterRef);
|
|
45
|
+
}
|
|
46
|
+
}, [
|
|
47
|
+
type,
|
|
48
|
+
pinnedFeature,
|
|
49
|
+
active,
|
|
50
|
+
id,
|
|
51
|
+
label,
|
|
52
|
+
registerItem
|
|
53
|
+
]);
|
|
54
|
+
const hasHrefAndNoChildren = href && !children;
|
|
55
|
+
const hasPinnedFeatureAndNoChildren = pinnedFeature && !children && !noPinButton;
|
|
56
|
+
const isItemPinned = pinnedItems.includes(id);
|
|
57
|
+
const shouldShowPinnedButton = useMemo(() => {
|
|
58
|
+
if (href || disabled) return false;
|
|
59
|
+
if (hasPinnedFeatureAndNoChildren && type !== "default") return true;
|
|
60
|
+
if (hasPinnedFeatureAndNoChildren) return true;
|
|
61
|
+
return false;
|
|
62
|
+
}, [
|
|
63
|
+
disabled,
|
|
64
|
+
hasPinnedFeatureAndNoChildren,
|
|
65
|
+
href,
|
|
66
|
+
type
|
|
67
|
+
]);
|
|
68
|
+
const hasActiveChildren = useMemo(() => {
|
|
69
|
+
if (!children) return false;
|
|
70
|
+
return Children.map(children, (child) => {
|
|
71
|
+
if (isValidElement(child)) {
|
|
72
|
+
if ("to" in child.props) {
|
|
73
|
+
var _child$props$children;
|
|
74
|
+
return (_child$props$children = child.props.children) === null || _child$props$children === void 0 ? void 0 : _child$props$children.props.active;
|
|
75
|
+
}
|
|
76
|
+
return child.props.active;
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}).includes(true);
|
|
80
|
+
}, [children]);
|
|
81
|
+
const isPinDisabled = pinnedItems.length >= pinLimit;
|
|
82
|
+
const containerTag = useMemo(() => {
|
|
83
|
+
if (as) return as;
|
|
84
|
+
if (hasHrefAndNoChildren) return "a";
|
|
85
|
+
if (noExpand || shouldShowPinnedButton) return "div";
|
|
86
|
+
return "button";
|
|
87
|
+
}, [
|
|
88
|
+
as,
|
|
89
|
+
hasHrefAndNoChildren,
|
|
90
|
+
noExpand,
|
|
91
|
+
shouldShowPinnedButton
|
|
92
|
+
]);
|
|
93
|
+
const pinTooltipLocale = useMemo(() => {
|
|
94
|
+
if (isPinDisabled) return locales["navigation.pin.limit"];
|
|
95
|
+
if (isItemPinned) return locales["navigation.unpin.tooltip"];
|
|
96
|
+
return locales["navigation.pin.tooltip"];
|
|
97
|
+
}, [
|
|
98
|
+
isItemPinned,
|
|
99
|
+
isPinDisabled,
|
|
100
|
+
locales
|
|
101
|
+
]);
|
|
102
|
+
if (!alwaysVisible && showHide === "hide") return null;
|
|
103
|
+
const computedAnimation = animation === "collapse" ? "collapse" : "expand";
|
|
104
|
+
if (expanded || !expanded && animation === "expand") return /* @__PURE__ */ jsx(ItemExpanded, {
|
|
105
|
+
active,
|
|
106
|
+
badgeSentiment,
|
|
107
|
+
badgeText,
|
|
108
|
+
categoryIcon,
|
|
109
|
+
containerTag,
|
|
110
|
+
dataTestId,
|
|
111
|
+
disabled,
|
|
112
|
+
hasActiveChildren,
|
|
113
|
+
hasPinnedFeatureAndNoChildren,
|
|
114
|
+
href,
|
|
115
|
+
id,
|
|
116
|
+
index,
|
|
117
|
+
isItemPinned,
|
|
118
|
+
isPinDisabled,
|
|
119
|
+
label,
|
|
120
|
+
labelDescription,
|
|
121
|
+
noExpand,
|
|
122
|
+
onClickPinUnpin,
|
|
123
|
+
onDragStopTrigger,
|
|
124
|
+
onToggle,
|
|
125
|
+
pinTooltipLocale,
|
|
126
|
+
rel,
|
|
127
|
+
shouldShowPinnedButton,
|
|
128
|
+
style,
|
|
129
|
+
subLabel,
|
|
130
|
+
target,
|
|
131
|
+
toggle,
|
|
132
|
+
type,
|
|
133
|
+
children
|
|
134
|
+
});
|
|
135
|
+
if (categoryIcon || Children.count(children) > 0 && !hasParents) return /* @__PURE__ */ jsx(ItemMenu, {
|
|
136
|
+
active,
|
|
137
|
+
categoryIcon,
|
|
138
|
+
hasActiveChildren,
|
|
139
|
+
label,
|
|
140
|
+
style,
|
|
141
|
+
children
|
|
142
|
+
});
|
|
143
|
+
if (hasParents) return /* @__PURE__ */ jsx(ItemMenuItem, {
|
|
144
|
+
active,
|
|
145
|
+
badgeSentiment,
|
|
146
|
+
badgeText,
|
|
147
|
+
disabled,
|
|
148
|
+
hasActiveChildren,
|
|
149
|
+
hasHrefAndNoChildren,
|
|
150
|
+
href,
|
|
151
|
+
id,
|
|
152
|
+
isItemPinned,
|
|
153
|
+
isPinDisabled,
|
|
154
|
+
label,
|
|
155
|
+
labelDescription,
|
|
156
|
+
noExpand,
|
|
157
|
+
onClickPinUnpin,
|
|
158
|
+
onToggle,
|
|
159
|
+
pinTooltipLocale,
|
|
160
|
+
rel,
|
|
161
|
+
shouldShowPinnedButton,
|
|
162
|
+
style,
|
|
163
|
+
target
|
|
164
|
+
});
|
|
165
|
+
if (!hasParents && href) return /* @__PURE__ */ jsx(Tooltip, {
|
|
166
|
+
placement: "right",
|
|
167
|
+
text: label,
|
|
168
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
169
|
+
alignItems: "flex-start",
|
|
170
|
+
className: navigationItemMenuStack,
|
|
171
|
+
gap: 1,
|
|
172
|
+
justifyContent: "flex-start",
|
|
173
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
as: containerTag,
|
|
176
|
+
className: cn(navigationItemContainer({ disabled }), navigationItemContainerAnimated({
|
|
177
|
+
animated: shouldAnimate && animationType === "complex",
|
|
178
|
+
animation: computedAnimation
|
|
179
|
+
})),
|
|
180
|
+
gap: 1,
|
|
181
|
+
href,
|
|
182
|
+
justifyContent: "center",
|
|
183
|
+
rel,
|
|
184
|
+
target,
|
|
185
|
+
children: /* @__PURE__ */ jsx(OpenInNewIcon, {
|
|
186
|
+
className: navigationItemAnimatedIcon({
|
|
187
|
+
animated: shouldAnimate && animationType === "complex",
|
|
188
|
+
animation: computedAnimation
|
|
189
|
+
}),
|
|
190
|
+
prominence: "weak",
|
|
191
|
+
sentiment: "neutral"
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
return null;
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
//#endregion
|
|
200
|
+
export { Item };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ItemExpandedType } from './ComponentsTypes';
|
|
2
|
+
export declare const ItemExpanded: ({ categoryIcon, containerTag, disabled, active, noExpand, subLabel, shouldShowPinnedButton, children, dataTestId, type, href, rel, id, style, target, label, labelDescription, hasPinnedFeatureAndNoChildren, badgeText, badgeSentiment, isItemPinned, pinTooltipLocale, onClickPinUnpin, isPinDisabled, onToggle, index, onDragStopTrigger, toggle, hasActiveChildren, }: ItemExpandedType) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=ItemExpanded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemExpanded.d.ts","sourceRoot":"","sources":["../../../../../src/components/compositions/Navigation/components/ItemExpanded.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAsLzD,eAAO,MAAM,YAAY,0aA4MxB,CAAA"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { __name } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Stack } from "../../../Stack/index.js";
|
|
3
|
+
import { Text } from "../../../Text/index.js";
|
|
4
|
+
import { useNavigation } from "../NavigationProvider.js";
|
|
5
|
+
import { Expandable } from "../../../Expandable/index.js";
|
|
6
|
+
import { navigationItemCategoryIcon, navigationItemContainer, navigationItemContainerAnimated, navigationItemDragIcon, navigationItemPadded, navigationItemPaddingStack, navigationItemStackIcon, navigationItemVariants, navigationItemWrapText } from "./items.css.js";
|
|
7
|
+
import { ItemBadge, ItemPinnedButton } from "./ItemFragments.js";
|
|
8
|
+
import { ItemContext, ItemProvider } from "./ItemProvider.js";
|
|
9
|
+
import { useCallback, useContext, useMemo, useReducer } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { cn } from "@ultraviolet/utils";
|
|
12
|
+
import { OpenInNewIcon } from "@ultraviolet/icons/OpenInNewIcon";
|
|
13
|
+
import { ArrowDownIcon } from "@ultraviolet/icons/ArrowDownIcon";
|
|
14
|
+
import { ArrowRightIcon } from "@ultraviolet/icons/ArrowRightIcon";
|
|
15
|
+
import { DragIcon } from "@ultraviolet/icons/DragIcon";
|
|
16
|
+
|
|
17
|
+
//#region src/components/compositions/Navigation/components/ItemExpanded.tsx
|
|
18
|
+
const ItemChildren = ({ noExpand, type, children, internalExpanded }) => {
|
|
19
|
+
const context = useNavigation();
|
|
20
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
21
|
+
const { animation, animationType, shouldAnimate } = context;
|
|
22
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: noExpand ? /* @__PURE__ */ jsx(ItemProvider, { children: /* @__PURE__ */ jsx(Stack, {
|
|
23
|
+
className: noExpand || type === "pinnedGroup" ? "" : navigationItemPaddingStack({ hide: shouldAnimate && animationType === "complex" && animation === "expand" }),
|
|
24
|
+
width: animation ? "100%" : void 0,
|
|
25
|
+
children
|
|
26
|
+
}) }) : /* @__PURE__ */ jsx(ItemProvider, { children: /* @__PURE__ */ jsx(Expandable, {
|
|
27
|
+
animationDuration: 0,
|
|
28
|
+
opened: internalExpanded,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
30
|
+
className: noExpand || type === "pinnedGroup" ? "" : navigationItemPaddingStack({ hide: shouldAnimate && animationType === "complex" && animation === "expand" }),
|
|
31
|
+
width: animation ? "100%" : void 0,
|
|
32
|
+
children
|
|
33
|
+
})
|
|
34
|
+
}) }) });
|
|
35
|
+
};
|
|
36
|
+
const ItemContent = ({ disabled, active, categoryIcon, type, label, hasActiveChildren, labelDescription, noExpand, subLabel }) => {
|
|
37
|
+
const context = useNavigation();
|
|
38
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
39
|
+
const { expanded, animation } = context;
|
|
40
|
+
const hasParents = !!useContext(ItemContext);
|
|
41
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
42
|
+
alignItems: categoryIcon ? "flex-start" : "center",
|
|
43
|
+
direction: "row",
|
|
44
|
+
gap: 1,
|
|
45
|
+
justifyContent: "center",
|
|
46
|
+
children: [
|
|
47
|
+
categoryIcon ? /* @__PURE__ */ jsx(Stack, {
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
className: navigationItemCategoryIcon,
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
children: categoryIcon
|
|
52
|
+
}) : null,
|
|
53
|
+
type === "pinned" && expanded ? /* @__PURE__ */ jsx(DragIcon, {
|
|
54
|
+
className: navigationItemDragIcon,
|
|
55
|
+
disabled,
|
|
56
|
+
prominence: "default",
|
|
57
|
+
sentiment: "neutral",
|
|
58
|
+
size: "small"
|
|
59
|
+
}) : null,
|
|
60
|
+
/* @__PURE__ */ jsxs(Stack, { children: [animation ? null : /* @__PURE__ */ jsxs(Text, {
|
|
61
|
+
as: "span",
|
|
62
|
+
className: navigationItemWrapText({
|
|
63
|
+
disabled,
|
|
64
|
+
weak: hasActiveChildren && !noExpand && !disabled && !!active
|
|
65
|
+
}),
|
|
66
|
+
"data-animation": animation,
|
|
67
|
+
disabled,
|
|
68
|
+
prominence: (categoryIcon || !hasParents) && !active ? "strong" : "default",
|
|
69
|
+
sentiment: active ? "primary" : "neutral",
|
|
70
|
+
variant: "bodySmallStrong",
|
|
71
|
+
whiteSpace: "pre-wrap",
|
|
72
|
+
children: [label, labelDescription ? /* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: navigationItemPadded,
|
|
74
|
+
children: labelDescription
|
|
75
|
+
}) : null]
|
|
76
|
+
}), subLabel && !animation ? /* @__PURE__ */ jsx(Text, {
|
|
77
|
+
as: "span",
|
|
78
|
+
className: navigationItemWrapText({
|
|
79
|
+
disabled,
|
|
80
|
+
weak: hasActiveChildren && !noExpand && !disabled && !!active
|
|
81
|
+
}),
|
|
82
|
+
"data-animation": animation,
|
|
83
|
+
disabled,
|
|
84
|
+
prominence: "weak",
|
|
85
|
+
sentiment: "neutral",
|
|
86
|
+
variant: "caption",
|
|
87
|
+
whiteSpace: "pre-wrap",
|
|
88
|
+
children: subLabel
|
|
89
|
+
}) : null] })
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const ItemExpanded = ({ categoryIcon, containerTag, disabled, active, noExpand, subLabel, shouldShowPinnedButton, children, dataTestId, type, href, rel, id, style, target, label, labelDescription, hasPinnedFeatureAndNoChildren, badgeText, badgeSentiment, isItemPinned, pinTooltipLocale, onClickPinUnpin, isPinDisabled, onToggle, index, onDragStopTrigger, toggle, hasActiveChildren }) => {
|
|
94
|
+
const context = useNavigation();
|
|
95
|
+
const [internalExpanded, onToggleExpand] = useReducer((prevState) => !prevState, Boolean(toggle));
|
|
96
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
97
|
+
const { expanded, animation, shouldAnimate, animationType, pinnedFeature } = context;
|
|
98
|
+
const showDraggableIcon = !noExpand && pinnedFeature && shouldShowPinnedButton && !disabled;
|
|
99
|
+
const showPinIcon = !(noExpand || disabled) && shouldShowPinnedButton && pinnedFeature;
|
|
100
|
+
const shouldHaveWeakText = !!children && !active && shouldShowPinnedButton && !disabled;
|
|
101
|
+
const hasHrefAndNoChildren = href && !children;
|
|
102
|
+
const triggerToggle = useCallback(() => {
|
|
103
|
+
onToggleExpand();
|
|
104
|
+
onToggle === null || onToggle === void 0 || onToggle(internalExpanded);
|
|
105
|
+
}, [internalExpanded, onToggle]);
|
|
106
|
+
const ArrowIcon = useMemo(() => internalExpanded ? ArrowDownIcon : ArrowRightIcon, [internalExpanded]);
|
|
107
|
+
const onDragStart = useCallback((event) => {
|
|
108
|
+
if (expanded) {
|
|
109
|
+
event.dataTransfer.setData("text/plain", JSON.stringify({
|
|
110
|
+
index,
|
|
111
|
+
label
|
|
112
|
+
}));
|
|
113
|
+
const element = event.currentTarget;
|
|
114
|
+
element.style.opacity = "0.5";
|
|
115
|
+
}
|
|
116
|
+
}, [
|
|
117
|
+
expanded,
|
|
118
|
+
index,
|
|
119
|
+
label
|
|
120
|
+
]);
|
|
121
|
+
const onDragEnd = useCallback((event) => expanded ? onDragStopTrigger(event) : void 0, [expanded, onDragStopTrigger]);
|
|
122
|
+
const ariaExpanded = useMemo(() => {
|
|
123
|
+
if (hasHrefAndNoChildren && internalExpanded) return true;
|
|
124
|
+
if (hasHrefAndNoChildren && !internalExpanded) return false;
|
|
125
|
+
}, [hasHrefAndNoChildren, internalExpanded]);
|
|
126
|
+
const computedAnimation = animation === "collapse" ? "collapse" : "expand";
|
|
127
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Stack, {
|
|
128
|
+
alignItems: categoryIcon ? "flex-start" : "center",
|
|
129
|
+
"aria-expanded": ariaExpanded,
|
|
130
|
+
as: containerTag,
|
|
131
|
+
className: cn(navigationItemContainer({
|
|
132
|
+
disabled,
|
|
133
|
+
hasActive: hasActiveChildren,
|
|
134
|
+
isActive: !!active,
|
|
135
|
+
noExpand,
|
|
136
|
+
subLabel: !!subLabel
|
|
137
|
+
}), navigationItemContainerAnimated({
|
|
138
|
+
animated: shouldAnimate && animationType === "complex",
|
|
139
|
+
animation: computedAnimation
|
|
140
|
+
}), navigationItemVariants({
|
|
141
|
+
shouldHaveWeakText,
|
|
142
|
+
showDraggableIcon,
|
|
143
|
+
showPinIcon
|
|
144
|
+
})),
|
|
145
|
+
"data-testid": dataTestId,
|
|
146
|
+
direction: "row",
|
|
147
|
+
disabled: containerTag === "button" ? disabled : void 0,
|
|
148
|
+
draggable: type === "pinned" && expanded,
|
|
149
|
+
gap: 1,
|
|
150
|
+
href,
|
|
151
|
+
id,
|
|
152
|
+
justifyContent: "space-between",
|
|
153
|
+
onClick: triggerToggle,
|
|
154
|
+
onDragEnd,
|
|
155
|
+
onDragStart,
|
|
156
|
+
rel,
|
|
157
|
+
style,
|
|
158
|
+
target,
|
|
159
|
+
children: [/* @__PURE__ */ jsx(ItemContent, {
|
|
160
|
+
active,
|
|
161
|
+
categoryIcon,
|
|
162
|
+
disabled,
|
|
163
|
+
hasActiveChildren,
|
|
164
|
+
label,
|
|
165
|
+
labelDescription,
|
|
166
|
+
noExpand,
|
|
167
|
+
subLabel,
|
|
168
|
+
type
|
|
169
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
170
|
+
alignItems: "center",
|
|
171
|
+
direction: "row",
|
|
172
|
+
gap: href ? 1 : void 0,
|
|
173
|
+
children: [
|
|
174
|
+
badgeText || hasPinnedFeatureAndNoChildren ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ItemBadge, {
|
|
175
|
+
animation: !!animation,
|
|
176
|
+
badgeSentiment,
|
|
177
|
+
badgeText,
|
|
178
|
+
disabled
|
|
179
|
+
}), /* @__PURE__ */ jsx(ItemPinnedButton, {
|
|
180
|
+
active,
|
|
181
|
+
id,
|
|
182
|
+
isItemPinned,
|
|
183
|
+
isPinDisabled,
|
|
184
|
+
onClickPinUnpin,
|
|
185
|
+
pinTooltipLocale,
|
|
186
|
+
shouldShowPinnedButton
|
|
187
|
+
})] }) : null,
|
|
188
|
+
hasHrefAndNoChildren && target === "_blank" && !animation ? /* @__PURE__ */ jsx(OpenInNewIcon, {
|
|
189
|
+
disabled,
|
|
190
|
+
prominence: "default",
|
|
191
|
+
sentiment: "neutral"
|
|
192
|
+
}) : null,
|
|
193
|
+
children && !animation && !noExpand ? /* @__PURE__ */ jsx(Stack, {
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
className: navigationItemStackIcon,
|
|
196
|
+
direction: "row",
|
|
197
|
+
gap: 1,
|
|
198
|
+
children: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
199
|
+
prominence: "weak",
|
|
200
|
+
sentiment: "neutral"
|
|
201
|
+
})
|
|
202
|
+
}) : null
|
|
203
|
+
]
|
|
204
|
+
})]
|
|
205
|
+
}), children ? /* @__PURE__ */ jsx(ItemChildren, {
|
|
206
|
+
internalExpanded,
|
|
207
|
+
noExpand,
|
|
208
|
+
type,
|
|
209
|
+
children
|
|
210
|
+
}) : null] });
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
export { ItemExpanded };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ItemExpandedType } from './ComponentsTypes';
|
|
2
|
+
export declare const ItemBadge: ({ badgeText, animation, disabled, badgeSentiment, }: Pick<ItemExpandedType, "badgeSentiment" | "badgeText" | "disabled"> & {
|
|
3
|
+
animation: boolean;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export declare const ItemPinnedButton: ({ shouldShowPinnedButton, isItemPinned, pinTooltipLocale, isPinDisabled, id, active, onClickPinUnpin, }: Pick<ItemExpandedType, "active" | "id" | "isItemPinned" | "isPinDisabled" | "onClickPinUnpin" | "pinTooltipLocale" | "shouldShowPinnedButton">) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=ItemFragments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemFragments.d.ts","sourceRoot":"","sources":["../../../../../src/components/compositions/Navigation/components/ItemFragments.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAQzD,eAAO,MAAM,SAAS;;oDAkBZ,CAAA;AAEV,eAAO,MAAM,gBAAgB,6SA4E5B,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __name } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Tooltip } from "../../../Tooltip/index.js";
|
|
3
|
+
import { useNavigation } from "../NavigationProvider.js";
|
|
4
|
+
import { Badge } from "../../../Badge/index.js";
|
|
5
|
+
import { navigationItemBadge, navigationItemPinIcon, navigationItemPinnedButton, navigationItemRelative } from "./items.css.js";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { PinOutlineIcon } from "@ultraviolet/icons/PinOutlineIcon";
|
|
9
|
+
import { UnpinIcon } from "@ultraviolet/icons/UnpinIcon";
|
|
10
|
+
|
|
11
|
+
//#region src/components/compositions/Navigation/components/ItemFragments.tsx
|
|
12
|
+
const ItemBadge = ({ badgeText, animation, disabled, badgeSentiment }) => badgeText && !animation ? /* @__PURE__ */ jsx(Badge, {
|
|
13
|
+
className: navigationItemBadge,
|
|
14
|
+
disabled,
|
|
15
|
+
prominence: "strong",
|
|
16
|
+
sentiment: badgeSentiment,
|
|
17
|
+
size: "small",
|
|
18
|
+
children: badgeText
|
|
19
|
+
}) : null;
|
|
20
|
+
const ItemPinnedButton = ({ shouldShowPinnedButton, isItemPinned, pinTooltipLocale, isPinDisabled, id, active, onClickPinUnpin }) => {
|
|
21
|
+
const context = useNavigation();
|
|
22
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
23
|
+
const { locales, pinItem, unpinItem, pinnedItems, pinLimit } = context;
|
|
24
|
+
const PinUnpinIcon = useMemo(() => isItemPinned ? UnpinIcon : PinOutlineIcon, [isItemPinned]);
|
|
25
|
+
return shouldShowPinnedButton ? /* @__PURE__ */ jsx(Tooltip, {
|
|
26
|
+
placement: "right",
|
|
27
|
+
tabIndex: -1,
|
|
28
|
+
text: isItemPinned ? locales["navigation.unpin.tooltip"] : pinTooltipLocale,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: navigationItemRelative,
|
|
31
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
32
|
+
"aria-disabled": isItemPinned ? false : isPinDisabled,
|
|
33
|
+
"aria-label": isItemPinned ? "unpin" : "pin",
|
|
34
|
+
className: navigationItemPinnedButton,
|
|
35
|
+
onClick: (event) => {
|
|
36
|
+
if (pinnedItems.length < pinLimit || isItemPinned) {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
let newValue;
|
|
40
|
+
if (isItemPinned) newValue = unpinItem(id);
|
|
41
|
+
else newValue = pinItem(id);
|
|
42
|
+
onClickPinUnpin === null || onClickPinUnpin === void 0 || onClickPinUnpin({
|
|
43
|
+
id,
|
|
44
|
+
state: isItemPinned ? "unpin" : "pin",
|
|
45
|
+
totalPinned: newValue
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
onKeyDown: () => {},
|
|
50
|
+
type: "button",
|
|
51
|
+
children: /* @__PURE__ */ jsx(PinUnpinIcon, {
|
|
52
|
+
className: navigationItemPinIcon[active ? "active" : "inactive"],
|
|
53
|
+
disabled: isItemPinned ? false : isPinDisabled,
|
|
54
|
+
sentiment: active ? "primary" : "neutral",
|
|
55
|
+
size: "medium"
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}) : null;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { ItemBadge, ItemPinnedButton };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ItemMenuItemType, ItemMenuType } from './ComponentsTypes';
|
|
2
|
+
export declare const ItemMenu: ({ style, children, label, categoryIcon, active, hasActiveChildren, }: ItemMenuType) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ItemMenuItem: ({ active, shouldShowPinnedButton, disabled, href, onToggle, rel, style, target, hasActiveChildren, noExpand, labelDescription, label, badgeText, badgeSentiment, hasHrefAndNoChildren, pinTooltipLocale, isItemPinned, isPinDisabled, onClickPinUnpin, id, }: ItemMenuItemType) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ItemMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/compositions/Navigation/components/ItemMenu.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAavE,eAAO,MAAM,QAAQ,iIAmEpB,CAAA;AAED,eAAO,MAAM,YAAY,6TAyGxB,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { __name } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Stack } from "../../../Stack/index.js";
|
|
3
|
+
import { Tooltip } from "../../../Tooltip/index.js";
|
|
4
|
+
import { Text } from "../../../Text/index.js";
|
|
5
|
+
import { useNavigation } from "../NavigationProvider.js";
|
|
6
|
+
import { navigationItemAnimatedIcon, navigationItemMenu, navigationItemMenuContainer, navigationItemMenuPinned, navigationItemMenuStack, navigationItemPadded, navigationItemWrapText } from "./items.css.js";
|
|
7
|
+
import { ItemBadge, ItemPinnedButton } from "./ItemFragments.js";
|
|
8
|
+
import { ItemProvider } from "./ItemProvider.js";
|
|
9
|
+
import { Button } from "../../../Button/index.js";
|
|
10
|
+
import { Menu } from "../../../Menu/index.js";
|
|
11
|
+
import { Children } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { cn } from "@ultraviolet/utils";
|
|
14
|
+
import { OpenInNewIcon } from "@ultraviolet/icons/OpenInNewIcon";
|
|
15
|
+
import { OrganizationDashboardCategoryIcon } from "@ultraviolet/icons/category/OrganizationDashboardCategoryIcon";
|
|
16
|
+
|
|
17
|
+
//#region src/components/compositions/Navigation/components/ItemMenu.tsx
|
|
18
|
+
const ItemMenu = ({ style, children, label, categoryIcon, active, hasActiveChildren }) => /* @__PURE__ */ jsx(Stack, {
|
|
19
|
+
alignItems: "flex-start",
|
|
20
|
+
className: navigationItemMenuStack,
|
|
21
|
+
gap: 1,
|
|
22
|
+
justifyContent: "flex-start",
|
|
23
|
+
style,
|
|
24
|
+
children: Children.count(children) > 0 ? /* @__PURE__ */ jsx(Menu, {
|
|
25
|
+
className: navigationItemMenuContainer,
|
|
26
|
+
disclosure: /* @__PURE__ */ jsx(Button, {
|
|
27
|
+
"aria-label": label,
|
|
28
|
+
sentiment: "neutral",
|
|
29
|
+
size: "small",
|
|
30
|
+
variant: hasActiveChildren ? "filled" : "ghost",
|
|
31
|
+
children: categoryIcon ? /* @__PURE__ */ jsx(Stack, {
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
direction: "row",
|
|
34
|
+
gap: 1,
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
children: categoryIcon
|
|
37
|
+
}) : null
|
|
38
|
+
}),
|
|
39
|
+
dynamicDomRendering: false,
|
|
40
|
+
placement: "right",
|
|
41
|
+
triggerMethod: "hover",
|
|
42
|
+
children: /* @__PURE__ */ jsx(ItemProvider, { children })
|
|
43
|
+
}) : /* @__PURE__ */ jsx(Tooltip, {
|
|
44
|
+
placement: "right",
|
|
45
|
+
tabIndex: -1,
|
|
46
|
+
text: label,
|
|
47
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
48
|
+
"aria-label": label,
|
|
49
|
+
sentiment: "neutral",
|
|
50
|
+
size: "small",
|
|
51
|
+
variant: active ? "filled" : "ghost",
|
|
52
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
direction: "row",
|
|
55
|
+
gap: 1,
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
children: categoryIcon !== null && categoryIcon !== void 0 ? categoryIcon : /* @__PURE__ */ jsx(OrganizationDashboardCategoryIcon, { variant: active ? "primary" : "neutral" })
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
const ItemMenuItem = ({ active, shouldShowPinnedButton, disabled, href, onToggle, rel, style, target, hasActiveChildren, noExpand, labelDescription, label, badgeText, badgeSentiment, hasHrefAndNoChildren, pinTooltipLocale, isItemPinned, isPinDisabled, onClickPinUnpin, id }) => {
|
|
63
|
+
const context = useNavigation();
|
|
64
|
+
if (!context) throw new Error("Navigation.Item can only be used inside a NavigationProvider.");
|
|
65
|
+
const { pinnedFeature, animation, shouldAnimate, animationType } = context;
|
|
66
|
+
const computedAnimation = animation === "collapse" ? "collapse" : "expand";
|
|
67
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
68
|
+
active,
|
|
69
|
+
borderless: true,
|
|
70
|
+
className: cn(navigationItemMenu, pinnedFeature && shouldShowPinnedButton ? navigationItemMenuPinned : ""),
|
|
71
|
+
disabled,
|
|
72
|
+
href,
|
|
73
|
+
onClick: () => onToggle === null || onToggle === void 0 ? void 0 : onToggle(!!active),
|
|
74
|
+
rel,
|
|
75
|
+
sentiment: active ? "primary" : "neutral",
|
|
76
|
+
style,
|
|
77
|
+
target,
|
|
78
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
direction: "row",
|
|
81
|
+
flex: 1,
|
|
82
|
+
gap: 1,
|
|
83
|
+
justifyContent: "space-between",
|
|
84
|
+
width: "100%",
|
|
85
|
+
children: [
|
|
86
|
+
animation ? null : /* @__PURE__ */ jsx(Text, {
|
|
87
|
+
as: "span",
|
|
88
|
+
className: navigationItemWrapText({
|
|
89
|
+
disabled,
|
|
90
|
+
weak: hasActiveChildren && !noExpand && !disabled && !!active
|
|
91
|
+
}),
|
|
92
|
+
variant: "bodySmall",
|
|
93
|
+
whiteSpace: "pre-wrap",
|
|
94
|
+
children: label
|
|
95
|
+
}),
|
|
96
|
+
labelDescription ? /* @__PURE__ */ jsx("span", {
|
|
97
|
+
className: navigationItemPadded,
|
|
98
|
+
children: labelDescription
|
|
99
|
+
}) : null,
|
|
100
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
101
|
+
direction: "row",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx(ItemBadge, {
|
|
104
|
+
animation: !!animation,
|
|
105
|
+
badgeSentiment,
|
|
106
|
+
badgeText,
|
|
107
|
+
disabled
|
|
108
|
+
}),
|
|
109
|
+
hasHrefAndNoChildren && target === "_blank" ? /* @__PURE__ */ jsx(OpenInNewIcon, {
|
|
110
|
+
className: navigationItemAnimatedIcon({
|
|
111
|
+
animated: shouldAnimate && animationType === "complex",
|
|
112
|
+
animation: computedAnimation
|
|
113
|
+
}),
|
|
114
|
+
disabled,
|
|
115
|
+
prominence: "weak",
|
|
116
|
+
sentiment: "neutral"
|
|
117
|
+
}) : null,
|
|
118
|
+
/* @__PURE__ */ jsx(ItemPinnedButton, {
|
|
119
|
+
active,
|
|
120
|
+
id,
|
|
121
|
+
isItemPinned,
|
|
122
|
+
isPinDisabled,
|
|
123
|
+
onClickPinUnpin,
|
|
124
|
+
pinTooltipLocale,
|
|
125
|
+
shouldShowPinnedButton
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
})
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
export { ItemMenu, ItemMenuItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const ItemContext: import("react").Context<boolean>;
|
|
3
|
+
type ItemProviderProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const ItemProvider: ({ children }: ItemProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ItemProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/compositions/Navigation/components/ItemProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,eAAO,MAAM,WAAW,kCAAuB,CAAA;AAE/C,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,8EAIxB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __name } from "../../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { createContext, useMemo } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/compositions/Navigation/components/ItemProvider.tsx
|
|
7
|
+
const ItemContext = createContext(false);
|
|
8
|
+
const ItemProvider = ({ children }) => {
|
|
9
|
+
const value = useMemo(() => true, []);
|
|
10
|
+
return /* @__PURE__ */ jsx(ItemContext.Provider, {
|
|
11
|
+
value,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ItemContext, ItemProvider };
|