@ultraviolet/ui 3.21.1 → 3.22.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/EstimateCost.js +90 -0
- package/dist/_virtual/Filters.js +18 -0
- package/dist/_virtual/Navigation.js +43 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/asyncToGenerator.js +4 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/defineProperty.js +6 -4
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/extends.js +4 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectDestructuringEmpty.js +4 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectSpread2.js +6 -4
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutProperties.js +6 -4
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutPropertiesLoose.js +4 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPrimitive.js +6 -4
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPropertyKey.js +7 -5
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/typeof.js +4 -2
- package/dist/components/ActionBar/index.js +20 -18
- package/dist/components/ActionBar/styles.css.js +11 -9
- package/dist/components/ActionBar/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Alert/index.js +79 -77
- package/dist/components/Alert/styles.css.js +34 -32
- package/dist/components/Alert/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Avatar/constants.js +17 -15
- package/dist/components/Avatar/index.js +81 -79
- package/dist/components/Avatar/styles.css.js +161 -159
- package/dist/components/Avatar/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Avatar/variables.css.js +7 -5
- package/dist/components/Badge/constant.js +10 -8
- package/dist/components/Badge/index.js +30 -24
- package/dist/components/Badge/styles.css.js +107 -105
- package/dist/components/Badge/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Banner/assets/default-image-small.js +5 -3
- package/dist/components/Banner/assets/default-image.js +5 -3
- package/dist/components/Banner/index.js +106 -104
- package/dist/components/Banner/styles.css.js +44 -42
- package/dist/components/Banner/styles.css.ts.vanilla.js +3 -1
- package/dist/components/BarChart/Tooltip.js +23 -21
- package/dist/components/BarChart/index.js +63 -61
- package/dist/components/BarChart/styles.css.js +10 -8
- package/dist/components/BarChart/styles.css.ts.vanilla.js +3 -1
- package/dist/components/BarStack/index.js +90 -88
- package/dist/components/BarStack/styles.css.js +38 -36
- package/dist/components/BarStack/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Breadcrumbs/components/Item.js +57 -55
- package/dist/components/Breadcrumbs/components/styles.css.js +13 -11
- package/dist/components/Breadcrumbs/components/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Breadcrumbs/index.js +18 -16
- package/dist/components/Breadcrumbs/styles.css.js +19 -17
- package/dist/components/Breadcrumbs/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Bullet/index.js +22 -20
- package/dist/components/Bullet/styles.css.js +105 -103
- package/dist/components/Bullet/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Button/constants.js +10 -8
- package/dist/components/Button/index.js +116 -114
- package/dist/components/Button/styles.css.js +154 -152
- package/dist/components/Button/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Card/index.js +43 -41
- package/dist/components/Card/styles.css.js +9 -7
- package/dist/components/Card/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Carousel/Item.js +14 -12
- package/dist/components/Carousel/index.js +90 -88
- package/dist/components/Carousel/styles.css.js +13 -11
- package/dist/components/Carousel/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Checkbox/CheckboxIconContainer.js +34 -32
- package/dist/components/Checkbox/index.d.ts +3 -14
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +92 -90
- package/dist/components/Checkbox/styles.css.js +26 -24
- package/dist/components/Checkbox/styles.css.ts.vanilla.js +3 -1
- package/dist/components/CheckboxGroup/Context.js +5 -3
- package/dist/components/CheckboxGroup/SingleCheckbox.js +34 -32
- package/dist/components/CheckboxGroup/index.js +67 -65
- package/dist/components/CheckboxGroup/styles.css.js +9 -7
- package/dist/components/CheckboxGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Chip/ChipContext.js +5 -3
- package/dist/components/Chip/ChipIcon.js +36 -34
- package/dist/components/Chip/index.js +66 -64
- package/dist/components/Chip/styles.css.js +9 -7
- package/dist/components/Chip/styles.css.ts.vanilla.js +3 -1
- package/dist/components/CopyButton/index.js +27 -25
- package/dist/components/DateInput/Context.js +22 -20
- package/dist/components/DateInput/components/CalendarContent.js +69 -67
- package/dist/components/DateInput/components/CalendarDaily.js +143 -141
- package/dist/components/DateInput/components/CalendarMonthly.js +86 -84
- package/dist/components/DateInput/components/Popup.js +37 -35
- package/dist/components/DateInput/components/styles.css.ts.vanilla.js +3 -1
- package/dist/components/DateInput/constants.js +5 -3
- package/dist/components/DateInput/helpers.js +68 -66
- package/dist/components/DateInput/helpersLocale.js +54 -52
- package/dist/components/DateInput/index.js +233 -231
- package/dist/components/DateInput/styles.css.js +19 -17
- package/dist/components/DateInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Description/index.js +39 -37
- package/dist/components/Dialog/Context.js +10 -8
- package/dist/components/Dialog/components/Button.d.ts.map +1 -1
- package/dist/components/Dialog/components/Button.js +23 -15
- package/dist/components/Dialog/components/Buttons.js +12 -10
- package/dist/components/Dialog/components/CancelButton.js +14 -12
- package/dist/components/Dialog/components/Stack.js +11 -9
- package/dist/components/Dialog/components/Text.js +13 -11
- package/dist/components/Dialog/index.js +59 -57
- package/dist/components/Dialog/styles.css.js +9 -7
- package/dist/components/Dialog/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Drawer/DrawerContent.js +10 -8
- package/dist/components/Drawer/index.js +94 -92
- package/dist/components/Drawer/styles.css.d.ts +0 -5
- package/dist/components/Drawer/styles.css.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css.js +20 -18
- package/dist/components/Drawer/styles.css.ts.vanilla.js +3 -1
- package/dist/components/EmptyState/index.js +73 -71
- package/dist/components/EmptyState/styles.css.js +29 -27
- package/dist/components/EmptyState/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Expandable/AnimatedExpandable.js +77 -77
- package/dist/components/Expandable/NonAnimatedExpandable.js +15 -13
- package/dist/components/Expandable/index.js +26 -26
- package/dist/components/Expandable/styles.css.js +7 -5
- package/dist/components/Expandable/styles.css.ts.vanilla.js +3 -1
- package/dist/components/ExpandableCard/components/Title.js +14 -12
- package/dist/components/ExpandableCard/index.js +143 -141
- package/dist/components/ExpandableCard/styles.css.js +14 -12
- package/dist/components/ExpandableCard/styles.css.ts.vanilla.js +3 -1
- package/dist/components/FileInput/DropzoneContent.js +19 -17
- package/dist/components/FileInput/FileInputProvider.js +10 -8
- package/dist/components/FileInput/components/Button.js +25 -23
- package/dist/components/FileInput/components/List.js +136 -134
- package/dist/components/FileInput/helpers.js +100 -98
- package/dist/components/FileInput/index.js +238 -236
- package/dist/components/FileInput/styles.css.js +59 -57
- package/dist/components/FileInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.js +24 -22
- package/dist/components/GlobalAlert/index.js +49 -47
- package/dist/components/GlobalAlert/styles.css.js +13 -11
- package/dist/components/GlobalAlert/styles.css.ts.vanilla.js +3 -1
- package/dist/components/InfiniteScroll/index.js +62 -60
- package/dist/components/Key/constants.js +12 -10
- package/dist/components/Key/index.js +39 -37
- package/dist/components/Key/styles.css.js +55 -53
- package/dist/components/Key/styles.css.ts.vanilla.js +3 -1
- package/dist/components/KeyValueInput/index.d.ts +6 -0
- package/dist/components/KeyValueInput/index.d.ts.map +1 -0
- package/dist/components/KeyValueInput/index.js +146 -0
- package/dist/components/KeyValueInput/styles.css.d.ts +5 -0
- package/dist/components/KeyValueInput/styles.css.d.ts.map +1 -0
- package/dist/components/KeyValueInput/styles.css.js +21 -0
- package/dist/components/KeyValueInput/styles.css.ts.vanilla.js +10 -0
- package/dist/components/KeyValueInput/types.d.ts +59 -0
- package/dist/components/KeyValueInput/types.d.ts.map +1 -0
- package/dist/components/Label/LabelContent.js +42 -40
- package/dist/components/Label/index.js +31 -29
- package/dist/components/Label/styles.css.js +10 -8
- package/dist/components/Label/styles.css.ts.vanilla.js +3 -1
- package/dist/components/LineChart/CustomLegend.js +87 -85
- package/dist/components/LineChart/LegendCell.js +13 -11
- package/dist/components/LineChart/Tooltip.js +25 -23
- package/dist/components/LineChart/helpers.js +34 -32
- package/dist/components/LineChart/index.js +93 -91
- package/dist/components/LineChart/styles.css.js +21 -19
- package/dist/components/LineChart/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Link/index.js +85 -83
- package/dist/components/Link/styles.css.js +78 -76
- package/dist/components/Link/styles.css.ts.vanilla.js +3 -1
- package/dist/components/List/Cell.js +36 -34
- package/dist/components/List/ColumnProvider.js +21 -19
- package/dist/components/List/ExpandButtonCell.js +28 -26
- package/dist/components/List/HeaderCell.js +50 -48
- package/dist/components/List/HeaderRow.js +33 -31
- package/dist/components/List/ListContext.js +207 -205
- package/dist/components/List/Row.js +123 -121
- package/dist/components/List/SelectBar.js +30 -28
- package/dist/components/List/SelectRowCell.js +32 -30
- package/dist/components/List/SkeletonRows.js +27 -25
- package/dist/components/List/SortIcon.js +9 -7
- package/dist/components/List/TableContainer.js +20 -18
- package/dist/components/List/index.js +50 -48
- package/dist/components/List/styles.css.js +45 -43
- package/dist/components/List/styles.css.ts.vanilla.js +3 -1
- package/dist/components/List/variables.css.js +15 -13
- package/dist/components/Loader/constants.js +12 -10
- package/dist/components/Loader/index.js +53 -51
- package/dist/components/Loader/styles.css.js +10 -8
- package/dist/components/Loader/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Menu/MenuContent.d.ts.map +1 -1
- package/dist/components/Menu/MenuContent.js +190 -188
- package/dist/components/Menu/MenuProvider.js +43 -41
- package/dist/components/Menu/components/Group.js +27 -25
- package/dist/components/Menu/components/Item.js +144 -142
- package/dist/components/Menu/helpers.js +29 -27
- package/dist/components/Menu/index.js +32 -30
- package/dist/components/Menu/styles.css.js +76 -74
- package/dist/components/Menu/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Meter/index.js +49 -47
- package/dist/components/Meter/styles.css.js +11 -9
- package/dist/components/Meter/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Modal/ModalContent.d.ts +1 -2
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.js +50 -41
- package/dist/components/Modal/ModalProvider.js +40 -38
- package/dist/components/Modal/components/Dialog.d.ts +1 -1
- package/dist/components/Modal/components/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/components/Dialog.js +170 -166
- package/dist/components/Modal/components/Disclosure.js +37 -35
- package/dist/components/Modal/constants.css.d.ts +11 -0
- package/dist/components/Modal/constants.css.d.ts.map +1 -0
- package/dist/components/Modal/index.js +65 -64
- package/dist/components/Modal/styles.css.d.ts +13 -61
- package/dist/components/Modal/styles.css.d.ts.map +1 -1
- package/dist/components/Modal/styles.css.js +48 -80
- package/dist/components/Modal/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Modal/types.d.ts +1 -0
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/Modal/useDelayUnmount.d.ts +2 -0
- package/dist/components/Modal/useDelayUnmount.d.ts.map +1 -0
- package/dist/components/Modal/useDelayUnmount.js +27 -0
- package/dist/components/Notice/index.js +19 -17
- package/dist/components/Notice/styles.css.js +6 -4
- package/dist/components/Notice/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Notification/Notification.js +37 -35
- package/dist/components/Notification/NotificationContainer.js +20 -18
- package/dist/components/Notification/styles.css.js +6 -4
- package/dist/components/Notification/styles.css.ts.vanilla.js +3 -1
- package/dist/components/NumberInput/components/Controls.js +61 -59
- package/dist/components/NumberInput/components/Unit.js +18 -16
- package/dist/components/NumberInput/index.d.ts +19 -5
- package/dist/components/NumberInput/index.d.ts.map +1 -1
- package/dist/components/NumberInput/index.js +158 -156
- package/dist/components/NumberInput/styles.css.js +81 -79
- package/dist/components/NumberInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/NumberInput/types.d.ts +3 -6
- package/dist/components/NumberInput/types.d.ts.map +1 -1
- package/dist/components/Pagination/Ellipsis.js +17 -15
- package/dist/components/Pagination/PaginationButton.js +21 -19
- package/dist/components/Pagination/PaginationButtons.js +74 -72
- package/dist/components/Pagination/PerPage.d.ts.map +1 -1
- package/dist/components/Pagination/PerPage.js +71 -65
- package/dist/components/Pagination/getPageNumbers.js +20 -18
- package/dist/components/Pagination/index.js +46 -44
- package/dist/components/Pagination/styles.css.js +16 -14
- package/dist/components/Pagination/styles.css.ts.vanilla.js +3 -1
- package/dist/components/PasswordCheck/index.js +31 -29
- package/dist/components/PasswordCheck/styles.css.js +6 -4
- package/dist/components/PasswordCheck/styles.css.ts.vanilla.js +3 -1
- package/dist/components/PhoneInput/index.js +131 -129
- package/dist/components/PhoneInput/styles.css.js +15 -13
- package/dist/components/PhoneInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/PieChart/Legends.js +57 -55
- package/dist/components/PieChart/Tooltip.js +39 -37
- package/dist/components/PieChart/index.js +86 -84
- package/dist/components/PieChart/styles.css.js +29 -27
- package/dist/components/PieChart/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Popover/ContentWrapper.js +34 -32
- package/dist/components/Popover/index.js +53 -51
- package/dist/components/Popover/styles.css.js +23 -21
- package/dist/components/Popover/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Popup/helpers.js +243 -241
- package/dist/components/Popup/index.d.ts.map +1 -1
- package/dist/components/Popup/index.js +325 -319
- package/dist/components/Popup/styles.css.js +40 -38
- package/dist/components/Popup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Popup/variables.css.js +12 -10
- package/dist/components/ProgressBar/index.js +73 -71
- package/dist/components/ProgressBar/styles.css.js +21 -19
- package/dist/components/ProgressBar/styles.css.ts.vanilla.js +3 -1
- package/dist/components/ProgressBar/variables.css.js +5 -3
- package/dist/components/Radio/MarkedIcon.js +32 -30
- package/dist/components/Radio/index.js +75 -73
- package/dist/components/Radio/styles.css.js +27 -25
- package/dist/components/Radio/styles.css.ts.vanilla.js +3 -1
- package/dist/components/RadioGroup/Context.js +5 -3
- package/dist/components/RadioGroup/SingleRadio.js +31 -29
- package/dist/components/RadioGroup/index.js +70 -68
- package/dist/components/RadioGroup/styles.css.js +6 -4
- package/dist/components/RadioGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Row/index.js +20 -18
- package/dist/components/Row/styles.css.js +487 -485
- package/dist/components/Row/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Row/variables.css.js +21 -19
- package/dist/components/Row/variables.css.ts.vanilla.js +3 -1
- package/dist/components/SearchInput/KeyGroup.js +18 -16
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/SearchInput/index.js +197 -191
- package/dist/components/SearchInput/styles.css.js +10 -8
- package/dist/components/SearchInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/SearchInput/types.d.ts +1 -1
- package/dist/components/SearchInput/types.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputProvider.js +114 -112
- package/dist/components/SelectInput/components/Dropdown/AddOption.js +36 -34
- package/dist/components/SelectInput/components/Dropdown/Content.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Content.js +189 -184
- package/dist/components/SelectInput/components/Dropdown/Dropdown.js +192 -190
- package/dist/components/SelectInput/components/Dropdown/Group.js +61 -59
- package/dist/components/SelectInput/components/Dropdown/Item.js +64 -62
- package/dist/components/SelectInput/components/Dropdown/Option.js +108 -106
- package/dist/components/SelectInput/components/Dropdown/SearchBar.js +94 -93
- package/dist/components/SelectInput/components/Dropdown/SelectAll.js +63 -61
- package/dist/components/SelectInput/components/Dropdown/dropdown.css.js +33 -31
- package/dist/components/SelectInput/components/Dropdown/dropdown.css.ts.vanilla.js +3 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.d.ts +2 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.js +183 -179
- package/dist/components/SelectInput/components/SelectBar/Values.js +73 -71
- package/dist/components/SelectInput/components/SelectBar/selectBar.css.js +46 -44
- package/dist/components/SelectInput/components/SelectBar/selectBar.css.ts.vanilla.js +3 -1
- package/dist/components/SelectInput/components/helpers.js +61 -59
- package/dist/components/SelectInput/constants.js +15 -13
- package/dist/components/SelectInput/findOptionInOptions.js +10 -8
- package/dist/components/SelectInput/index.d.ts +9 -29
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +99 -96
- package/dist/components/SelectInput/reducerFunctions.js +54 -52
- package/dist/components/SelectInput/styles.css.js +107 -105
- package/dist/components/SelectInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/SelectableCard/IllustrationContainer.js +38 -36
- package/dist/components/SelectableCard/MultiStateInput.js +71 -69
- package/dist/components/SelectableCard/SelectableCard.js +107 -105
- package/dist/components/SelectableCard/styles.css.js +33 -31
- package/dist/components/SelectableCard/styles.css.ts.vanilla.js +3 -1
- package/dist/components/SelectableCard/variables.css.js +7 -5
- package/dist/components/SelectableCardGroup/Context.js +5 -3
- package/dist/components/SelectableCardGroup/SingleCard.js +31 -30
- package/dist/components/SelectableCardGroup/index.js +61 -59
- package/dist/components/SelectableCardGroup/styles.css.js +6 -4
- package/dist/components/SelectableCardGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/SelectableCardOptionGroup/Provider.js +19 -17
- package/dist/components/SelectableCardOptionGroup/SelectableCardOptionGroup.js +67 -65
- package/dist/components/SelectableCardOptionGroup/components/Image.js +17 -15
- package/dist/components/SelectableCardOptionGroup/components/Option.js +77 -76
- package/dist/components/SelectableCardOptionGroup/styles.css.js +15 -13
- package/dist/components/SelectableCardOptionGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Separator/index.js +44 -42
- package/dist/components/Separator/styles.css.js +55 -53
- package/dist/components/Separator/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Skeleton/Block.js +14 -12
- package/dist/components/Skeleton/Blocks.js +16 -14
- package/dist/components/Skeleton/BoxWithIcon.js +16 -14
- package/dist/components/Skeleton/Donut.js +26 -24
- package/dist/components/Skeleton/IconSkeleton.js +6 -4
- package/dist/components/Skeleton/Line.js +17 -15
- package/dist/components/Skeleton/List.js +16 -14
- package/dist/components/Skeleton/Slider.js +14 -12
- package/dist/components/Skeleton/Square.js +6 -4
- package/dist/components/Skeleton/index.js +40 -38
- package/dist/components/Skeleton/styles.css.js +28 -26
- package/dist/components/Skeleton/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Skeleton/stylesVariants.css.js +9 -7
- package/dist/components/Skeleton/stylesVariants.css.ts.vanilla.js +3 -1
- package/dist/components/Slider/components/DoubleSlider.js +284 -284
- package/dist/components/Slider/components/Options.js +36 -36
- package/dist/components/Slider/components/SingleSlider.js +195 -195
- package/dist/components/Slider/index.js +101 -99
- package/dist/components/Slider/styles.css.js +103 -101
- package/dist/components/Slider/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Snippet/CodeContent.js +23 -21
- package/dist/components/Snippet/index.js +91 -89
- package/dist/components/Snippet/styles.css.js +55 -53
- package/dist/components/Snippet/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Stack/index.js +57 -55
- package/dist/components/Stack/styles.css.js +574 -572
- package/dist/components/Stack/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Stack/variables.css.js +9 -7
- package/dist/components/Stack/variables.css.ts.vanilla.js +3 -1
- package/dist/components/Status/index.js +16 -14
- package/dist/components/Status/styles.css.js +38 -36
- package/dist/components/Status/styles.css.ts.vanilla.js +3 -1
- package/dist/components/StepList/Item.js +22 -20
- package/dist/components/StepList/index.js +14 -12
- package/dist/components/StepList/styles.css.js +26 -24
- package/dist/components/StepList/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Stepper/Bullet.js +31 -29
- package/dist/components/Stepper/Step.js +62 -60
- package/dist/components/Stepper/StepperProvider.js +38 -35
- package/dist/components/Stepper/index.js +46 -44
- package/dist/components/Stepper/styles.css.js +131 -129
- package/dist/components/Stepper/styles.css.ts.vanilla.js +3 -1
- package/dist/components/SwitchButton/FocusOverlay.js +12 -12
- package/dist/components/SwitchButton/Option.js +42 -41
- package/dist/components/SwitchButton/SwitchButtonContext.js +10 -8
- package/dist/components/SwitchButton/index.js +131 -131
- package/dist/components/SwitchButton/styles.css.js +18 -16
- package/dist/components/SwitchButton/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Table/Body.js +6 -4
- package/dist/components/Table/Cell.d.ts.map +1 -1
- package/dist/components/Table/Cell.js +34 -28
- package/dist/components/Table/Header.js +9 -7
- package/dist/components/Table/HeaderCell.d.ts.map +1 -1
- package/dist/components/Table/HeaderCell.js +61 -55
- package/dist/components/Table/HeaderRow.d.ts.map +1 -1
- package/dist/components/Table/HeaderRow.js +32 -29
- package/dist/components/Table/Row.js +87 -91
- package/dist/components/Table/SelectBar.js +30 -28
- package/dist/components/Table/SkeletonRows.js +19 -17
- package/dist/components/Table/SortIcon.js +9 -7
- package/dist/components/Table/TableContainer.js +20 -18
- package/dist/components/Table/TableContext.d.ts +2 -0
- package/dist/components/Table/TableContext.d.ts.map +1 -1
- package/dist/components/Table/TableContext.js +52 -48
- package/dist/components/Table/constants.d.ts +10 -2
- package/dist/components/Table/constants.d.ts.map +1 -1
- package/dist/components/Table/constants.js +11 -2
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +60 -57
- package/dist/components/Table/styles.css.d.ts +22 -6
- package/dist/components/Table/styles.css.d.ts.map +1 -1
- package/dist/components/Table/styles.css.js +65 -53
- package/dist/components/Table/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Table/variables.css.js +10 -8
- package/dist/components/Tabs/Tab.js +86 -84
- package/dist/components/Tabs/TabMenu.js +41 -39
- package/dist/components/Tabs/TabMenuItem.js +29 -27
- package/dist/components/Tabs/TabsContext.js +6 -4
- package/dist/components/Tabs/index.js +77 -75
- package/dist/components/Tabs/styles.css.js +19 -17
- package/dist/components/Tabs/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Tag/index.js +86 -82
- package/dist/components/Tag/styles.css.js +143 -141
- package/dist/components/Tag/styles.css.ts.vanilla.js +3 -1
- package/dist/components/TagInput/index.js +183 -181
- package/dist/components/TagInput/styles.css.js +20 -18
- package/dist/components/TagInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/TagList/constant.js +6 -4
- package/dist/components/TagList/index.js +170 -168
- package/dist/components/TagList/styles.css.js +18 -16
- package/dist/components/TagList/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Text/index.js +44 -42
- package/dist/components/Text/style.css.js +449 -447
- package/dist/components/Text/style.css.ts.vanilla.js +3 -1
- package/dist/components/Text/variables.css.js +8 -6
- package/dist/components/TextArea/Icon.js +8 -6
- package/dist/components/TextArea/Notice.js +32 -30
- package/dist/components/TextArea/index.d.ts +4 -25
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextArea/index.js +132 -132
- package/dist/components/TextArea/styles.css.js +28 -26
- package/dist/components/TextArea/styles.css.ts.vanilla.js +3 -1
- package/dist/components/TextInput/PrefixSuffix.js +20 -18
- package/dist/components/TextInput/RightIcon.js +48 -46
- package/dist/components/TextInput/ShowHidePassword.js +24 -22
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/TextInput/index.js +138 -136
- package/dist/components/TextInput/styles.css.js +19 -17
- package/dist/components/TextInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/TextInput/type.d.ts +1 -1
- package/dist/components/TextInput/type.d.ts.map +1 -1
- package/dist/components/TimeInput/RightIcon.js +25 -23
- package/dist/components/TimeInput/constants.js +16 -14
- package/dist/components/TimeInput/helpers.js +44 -42
- package/dist/components/TimeInput/index.d.ts +5 -23
- package/dist/components/TimeInput/index.d.ts.map +1 -1
- package/dist/components/TimeInput/index.js +292 -288
- package/dist/components/TimeInput/styles.css.js +31 -29
- package/dist/components/TimeInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Toaster/Toaster.js +31 -29
- package/dist/components/Toaster/ToasterContainer.js +24 -22
- package/dist/components/Toaster/components/Button.js +22 -20
- package/dist/components/Toaster/components/CloseButton.js +14 -12
- package/dist/components/Toaster/components/Content.js +16 -14
- package/dist/components/Toaster/components/Link.js +18 -15
- package/dist/components/Toaster/constants.js +5 -3
- package/dist/components/Toaster/index.js +12 -10
- package/dist/components/Toaster/styles.css.js +10 -8
- package/dist/components/Toaster/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Toggle/index.js +81 -79
- package/dist/components/Toggle/styles.css.js +49 -47
- package/dist/components/Toggle/styles.css.ts.vanilla.js +3 -1
- package/dist/components/ToggleGroup/Context.js +5 -3
- package/dist/components/ToggleGroup/SingleToggle.js +27 -25
- package/dist/components/ToggleGroup/index.js +65 -63
- package/dist/components/ToggleGroup/styles.css.js +6 -4
- package/dist/components/ToggleGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/components/Tooltip/index.js +27 -25
- package/dist/components/Tooltip/styles.css.js +6 -4
- package/dist/components/Tooltip/styles.css.ts.vanilla.js +3 -1
- package/dist/components/TreeMapChart/Tooltip.js +21 -19
- package/dist/components/TreeMapChart/index.js +49 -47
- package/dist/components/TreeMapChart/styles.css.js +9 -7
- package/dist/components/TreeMapChart/styles.css.ts.vanilla.js +3 -1
- package/dist/components/UnitInput/index.d.ts +3 -6
- package/dist/components/UnitInput/index.d.ts.map +1 -1
- package/dist/components/UnitInput/index.js +123 -121
- package/dist/components/UnitInput/styles.css.js +28 -26
- package/dist/components/UnitInput/styles.css.ts.vanilla.js +3 -1
- package/dist/components/VerificationCode/index.js +143 -142
- package/dist/components/VerificationCode/styles.css.js +15 -13
- package/dist/components/VerificationCode/styles.css.ts.vanilla.js +3 -1
- package/dist/components/VisuallyHidden/index.d.ts +11 -0
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/index.js +31 -0
- package/dist/components/VisuallyHidden/styles.css.d.ts +4 -0
- package/dist/components/VisuallyHidden/styles.css.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/styles.css.js +15 -0
- package/dist/components/VisuallyHidden/styles.css.ts.vanilla.js +10 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/styles.d.ts +1 -0
- package/dist/components/styles.d.ts.map +1 -1
- package/dist/composition.js +120 -11
- package/dist/compositions/CodeEditor/components/CopyButton.js +14 -12
- package/dist/compositions/CodeEditor/components/Expandable.js +25 -23
- package/dist/compositions/CodeEditor/index.js +89 -87
- package/dist/compositions/CodeEditor/styles.css.js +30 -28
- package/dist/compositions/CodeEditor/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/ContentCard/Content.js +34 -32
- package/dist/compositions/ContentCard/ImageContent.js +14 -12
- package/dist/compositions/ContentCard/LinkContent.js +19 -17
- package/dist/compositions/ContentCard/Skeleton.js +28 -26
- package/dist/compositions/ContentCard/index.js +68 -66
- package/dist/compositions/ContentCard/styles.css.js +39 -37
- package/dist/compositions/ContentCard/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/ContentCardGroup/Card.js +53 -51
- package/dist/compositions/ContentCardGroup/SkeletonCard.js +26 -24
- package/dist/compositions/ContentCardGroup/index.js +17 -15
- package/dist/compositions/ContentCardGroup/styles.css.js +14 -12
- package/dist/compositions/ContentCardGroup/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Conversation/components/Date.js +15 -13
- package/dist/compositions/Conversation/components/Message.js +20 -18
- package/dist/compositions/Conversation/components/MessageInfos.js +11 -9
- package/dist/compositions/Conversation/components/MessageTag.js +12 -10
- package/dist/compositions/Conversation/index.js +18 -16
- package/dist/compositions/Conversation/styles.css.js +23 -21
- package/dist/compositions/Conversation/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/CustomerSatisfaction/assets/1-5.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/1-5NB.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/2-5.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/2-5NB.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/3-5.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/3-5NB.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/4-5.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/4-5NB.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/5-5.js +5 -3
- package/dist/compositions/CustomerSatisfaction/assets/5-5NB.js +5 -3
- package/dist/compositions/CustomerSatisfaction/index.js +86 -84
- package/dist/compositions/CustomerSatisfaction/styles.css.js +21 -19
- package/dist/compositions/CustomerSatisfaction/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/EstimateCost/CompactEstimateCost.js +29 -27
- package/dist/compositions/EstimateCost/Components/Children.js +38 -36
- package/dist/compositions/EstimateCost/Components/CustomUnitInput.js +35 -33
- package/dist/compositions/EstimateCost/Components/Description.js +10 -8
- package/dist/compositions/EstimateCost/Components/Item.js +151 -149
- package/dist/compositions/EstimateCost/Components/ItemLeftSide.js +70 -68
- package/dist/compositions/EstimateCost/Components/ItemPrice.js +51 -49
- package/dist/compositions/EstimateCost/Components/LineThrough.js +15 -13
- package/dist/compositions/EstimateCost/Components/NumberInput.js +31 -29
- package/dist/compositions/EstimateCost/Components/Region.js +33 -31
- package/dist/compositions/EstimateCost/Components/Regular.js +17 -15
- package/dist/compositions/EstimateCost/Components/Strong.js +11 -9
- package/dist/compositions/EstimateCost/Components/Title.js +13 -11
- package/dist/compositions/EstimateCost/Components/Total.js +61 -59
- package/dist/compositions/EstimateCost/Components/Unit.js +47 -45
- package/dist/compositions/EstimateCost/Components/Zone.js +32 -30
- package/dist/compositions/EstimateCost/Components/components.css.js +59 -57
- package/dist/compositions/EstimateCost/Components/components.css.ts.vanilla.js +3 -1
- package/dist/compositions/EstimateCost/Ellipsis.js +25 -23
- package/dist/compositions/EstimateCost/EstimateCostContent.js +191 -189
- package/dist/compositions/EstimateCost/EstimateCostProvider.js +28 -26
- package/dist/compositions/EstimateCost/Image.js +13 -11
- package/dist/compositions/EstimateCost/OverlayComponent.js +91 -89
- package/dist/compositions/EstimateCost/OverlayContext.js +10 -8
- package/dist/compositions/EstimateCost/constants.js +26 -24
- package/dist/compositions/EstimateCost/helper.js +9 -7
- package/dist/compositions/EstimateCost/index.js +2 -86
- package/dist/compositions/EstimateCost/locales/en.js +25 -23
- package/dist/compositions/EstimateCost/styles.css.js +136 -134
- package/dist/compositions/EstimateCost/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/FAQ/index.js +36 -34
- package/dist/compositions/FAQ/styles.css.js +6 -4
- package/dist/compositions/FAQ/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Filters/Filters.js +27 -25
- package/dist/compositions/Filters/filterTypes/FilterDateRange.js +27 -26
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/Dropdown.js +117 -115
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/FilterDatetimeRange.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/FilterDatetimeRange.js +59 -56
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.js +9 -7
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Filters/filterTypes/FilterMultiSelect.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterMultiSelect.js +42 -39
- package/dist/compositions/Filters/filterTypes/FilterNumber.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterNumber.js +17 -14
- package/dist/compositions/Filters/filterTypes/FilterSearch.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterSearch.js +33 -30
- package/dist/compositions/Filters/filterTypes/FilterSelect.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterSelect.js +37 -34
- package/dist/compositions/Filters/filterTypes/FilterSlider.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterSlider.js +23 -20
- package/dist/compositions/Filters/filterTypes/FilterText.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterText.js +33 -30
- package/dist/compositions/Filters/index.js +4 -13
- package/dist/compositions/Filters/parts/AbstractFilter.js +43 -41
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.d.ts +2 -1
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.d.ts.map +1 -1
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.js +44 -41
- package/dist/compositions/Filters/parts/FiltersDrawer.d.ts.map +1 -1
- package/dist/compositions/Filters/parts/FiltersDrawer.js +75 -72
- package/dist/compositions/Filters/parts/FiltersMainRow.js +65 -63
- package/dist/compositions/Filters/parts/FiltersProvider.js +46 -44
- package/dist/compositions/Filters/parts/helpers.js +32 -30
- package/dist/compositions/Filters/parts/reducer.js +48 -46
- package/dist/compositions/Filters/parts/styles.css.js +6 -4
- package/dist/compositions/Filters/parts/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Filters/parts/useFilters.js +89 -86
- package/dist/compositions/Filters/types.d.ts +2 -1
- package/dist/compositions/Filters/types.d.ts.map +1 -1
- package/dist/compositions/InfoTable/Context.js +5 -3
- package/dist/compositions/InfoTable/components/Cell.d.ts.map +1 -1
- package/dist/compositions/InfoTable/components/Cell.js +36 -32
- package/dist/compositions/InfoTable/components/CellWithCopyButton.js +32 -30
- package/dist/compositions/InfoTable/components/Row.js +20 -18
- package/dist/compositions/InfoTable/index.js +40 -39
- package/dist/compositions/InfoTable/styles.css.js +141 -137
- package/dist/compositions/InfoTable/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Navigation/Footer.js +56 -54
- package/dist/compositions/Navigation/Header.js +18 -16
- package/dist/compositions/Navigation/NavigationContent.js +104 -101
- package/dist/compositions/Navigation/NavigationProvider.js +137 -135
- package/dist/compositions/Navigation/components/Group.js +36 -34
- package/dist/compositions/Navigation/components/Item/Badge.js +14 -12
- package/dist/compositions/Navigation/components/Item/Children.js +22 -20
- package/dist/compositions/Navigation/components/Item/Content.js +66 -64
- package/dist/compositions/Navigation/components/Item/Item.js +201 -199
- package/dist/compositions/Navigation/components/Item/ItemExpanded.js +120 -118
- package/dist/compositions/Navigation/components/Item/ItemProvider.js +12 -10
- package/dist/compositions/Navigation/components/Item/PinnedButton.js +46 -44
- package/dist/compositions/Navigation/components/Menu/Menu.js +57 -55
- package/dist/compositions/Navigation/components/Menu/MenuItem.js +77 -75
- package/dist/compositions/Navigation/components/Menu/NestedMenu.js +40 -38
- package/dist/compositions/Navigation/components/PinnedItems.js +97 -95
- package/dist/compositions/Navigation/components/Separator.js +14 -12
- package/dist/compositions/Navigation/components/ShowHide.js +46 -44
- package/dist/compositions/Navigation/components/items.css.d.ts +2 -2
- package/dist/compositions/Navigation/components/items.css.ts.vanilla.js +3 -1
- package/dist/compositions/Navigation/components/styles.css.d.ts +2 -2
- package/dist/compositions/Navigation/components/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Navigation/constants.d.ts +1 -1
- package/dist/compositions/Navigation/constants.js +5 -3
- package/dist/compositions/Navigation/index.js +2 -39
- package/dist/compositions/Navigation/locales/en.js +13 -11
- package/dist/compositions/Navigation/styles.css.d.ts +5 -5
- package/dist/compositions/Navigation/styles.css.js +133 -131
- package/dist/compositions/Navigation/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Navigation/variables.css.js +7 -5
- package/dist/compositions/OfferList/OfferListProvider.js +39 -37
- package/dist/compositions/OfferList/components/Banner.js +30 -28
- package/dist/compositions/OfferList/components/Cell.js +28 -26
- package/dist/compositions/OfferList/components/OfferListRowProvider.js +9 -7
- package/dist/compositions/OfferList/components/Row.js +139 -137
- package/dist/compositions/OfferList/components/SelectableCell.js +54 -52
- package/dist/compositions/OfferList/index.js +47 -45
- package/dist/compositions/OfferList/styles.css.js +123 -121
- package/dist/compositions/OfferList/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/OptionSelector/components/ArrowIcon.js +16 -14
- package/dist/compositions/OptionSelector/components/IconWithContent.js +11 -9
- package/dist/compositions/OptionSelector/components/RevealOnHover.js +14 -12
- package/dist/compositions/OptionSelector/components/Selector.js +31 -29
- package/dist/compositions/OptionSelector/index.js +147 -145
- package/dist/compositions/OptionSelector/styles.css.js +148 -144
- package/dist/compositions/OptionSelector/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/OrderSummary/NonScrollableContent.js +101 -99
- package/dist/compositions/OrderSummary/Provider.js +18 -16
- package/dist/compositions/OrderSummary/ScrollableContent.js +30 -28
- package/dist/compositions/OrderSummary/components/Category.js +96 -94
- package/dist/compositions/OrderSummary/components/SubCategory.js +90 -88
- package/dist/compositions/OrderSummary/components/SubCategoryPrice.js +36 -34
- package/dist/compositions/OrderSummary/constants.js +18 -16
- package/dist/compositions/OrderSummary/helpers.js +128 -126
- package/dist/compositions/OrderSummary/index.js +132 -130
- package/dist/compositions/OrderSummary/locales/en.js +13 -11
- package/dist/compositions/OrderSummary/styles.css.js +50 -48
- package/dist/compositions/OrderSummary/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/Plans/FeatureHint.js +34 -32
- package/dist/compositions/Plans/PlanHeader.js +90 -88
- package/dist/compositions/Plans/index.js +148 -146
- package/dist/compositions/Plans/locales/en.js +9 -7
- package/dist/compositions/Plans/styles.css.js +39 -37
- package/dist/compositions/Plans/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/RichTextInput/Toolbar.js +110 -108
- package/dist/compositions/RichTextInput/editorCore.js +50 -48
- package/dist/compositions/RichTextInput/helpers.js +14 -12
- package/dist/compositions/RichTextInput/index.js +113 -111
- package/dist/compositions/RichTextInput/styles.css.js +38 -36
- package/dist/compositions/RichTextInput/styles.css.ts.vanilla.js +3 -1
- package/dist/compositions/SteppedListCard/Step.js +41 -39
- package/dist/compositions/SteppedListCard/SteppedListContent.js +51 -49
- package/dist/compositions/SteppedListCard/helper.js +26 -24
- package/dist/compositions/SteppedListCard/index.js +87 -85
- package/dist/compositions/SteppedListCard/styles.css.js +15 -13
- package/dist/compositions/SteppedListCard/styles.css.ts.vanilla.js +3 -1
- package/dist/helpers/hasHelperText.js +6 -4
- package/dist/helpers/isClientSide.js +6 -4
- package/dist/helpers/isStringOrNumberArray.d.ts +2 -0
- package/dist/helpers/isStringOrNumberArray.d.ts.map +1 -0
- package/dist/helpers/isStringOrNumberArray.js +13 -0
- package/dist/helpers/legend.js +11 -9
- package/dist/helpers/nivoTheme.js +20 -18
- package/dist/helpers/recursivelyGetChildrenString.d.ts.map +1 -1
- package/dist/helpers/recursivelyGetChildrenString.js +17 -12
- package/dist/helpers/treeMap.js +23 -21
- package/dist/hooks/useIsOverflowing.js +23 -21
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +202 -46
- package/dist/theme/ThemeProvider.js +39 -37
- package/dist/theme/index.js +18 -16
- package/dist/types.d.ts +35 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/dist/utils/animations/animations.js +3 -1
- package/dist/utils/animations/animations2.js +31 -29
- package/dist/utils/animations/animationsVanillaExtract.css.js +32 -30
- package/dist/utils/animations/animationsVanillaExtract.css.ts.vanilla.js +3 -1
- package/dist/utils/index.js +8 -7
- package/dist/utils/normalize.js +6 -4
- package/dist/utils/responsive/utilities.js +13 -11
- package/package.json +14 -14
- package/dist/components/Expandable/constant.js +0 -8
- package/dist/components/Modal/constants.d.ts +0 -44
- package/dist/components/Modal/constants.d.ts.map +0 -1
- package/dist/components/Notification/index.js +0 -13
- package/dist/components/SelectableCard/index.js +0 -11
- package/dist/components/SelectableCardOptionGroup/index.js +0 -11
- package/dist/components/Slider/constant.js +0 -8
- package/dist/components/SwitchButton/constant.js +0 -8
- package/dist/components/TextArea/constant.js +0 -8
- package/dist/components/index.js +0 -170
- package/dist/components/styles.js +0 -157
- package/dist/compositions/index.js +0 -47
- package/dist/compositions/styles.js +0 -37
- package/dist/utils/responsive/index.js +0 -11
|
@@ -9,96 +9,98 @@ import { AttachIcon } from "@ultraviolet/icons/AttachIcon";
|
|
|
9
9
|
|
|
10
10
|
//#region src/compositions/OrderSummary/components/SubCategory.tsx
|
|
11
11
|
var SubCategory;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
12
|
+
function init_SubCategory() {
|
|
13
|
+
return (init_SubCategory = __esmMin(() => {
|
|
14
|
+
init_NumberInput();
|
|
15
|
+
init_Stack();
|
|
16
|
+
init_Text();
|
|
17
|
+
init_SubCategoryPrice();
|
|
18
|
+
init_styles_css();
|
|
19
|
+
SubCategory = ({ subCategory }) => /* @__PURE__ */ jsxs(Stack, {
|
|
20
|
+
direction: "column",
|
|
21
|
+
gap: 1,
|
|
22
|
+
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
direction: "row",
|
|
25
|
+
justifyContent: "space-between",
|
|
26
|
+
gap: 2,
|
|
27
|
+
children: [
|
|
28
|
+
subCategory.additionalInfo || subCategory.icon ? /* @__PURE__ */ jsxs(Stack, {
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
direction: "row",
|
|
31
|
+
gap: 1,
|
|
32
|
+
wrap: "wrap",
|
|
33
|
+
children: [
|
|
34
|
+
subCategory.icon,
|
|
35
|
+
/* @__PURE__ */ jsx(Text, {
|
|
36
|
+
as: "span",
|
|
37
|
+
prominence: "strong",
|
|
38
|
+
sentiment: "neutral",
|
|
39
|
+
variant: "bodySmallStrong",
|
|
40
|
+
oneLine: true,
|
|
41
|
+
children: subCategory.anchor ? /* @__PURE__ */ jsxs("a", {
|
|
42
|
+
className: orderSummaryStyle.anchor,
|
|
43
|
+
href: subCategory.anchor,
|
|
44
|
+
children: [/* @__PURE__ */ jsx(AttachIcon, {
|
|
45
|
+
className: orderSummaryStyle.anchorIcon({ size: "small" }),
|
|
46
|
+
sentiment: "info"
|
|
47
|
+
}), subCategory.title]
|
|
48
|
+
}) : subCategory.title
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx(Text, {
|
|
51
|
+
as: "span",
|
|
52
|
+
italic: true,
|
|
53
|
+
sentiment: "primary",
|
|
54
|
+
variant: "bodySmall",
|
|
55
|
+
children: subCategory.additionalInfo
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}) : /* @__PURE__ */ jsx(Text, {
|
|
59
|
+
as: "span",
|
|
60
|
+
prominence: "strong",
|
|
61
|
+
sentiment: "neutral",
|
|
62
|
+
variant: "bodySmallStrong",
|
|
63
|
+
oneLine: true,
|
|
64
|
+
children: subCategory.anchor ? /* @__PURE__ */ jsxs("a", {
|
|
65
|
+
className: orderSummaryStyle.anchor,
|
|
66
|
+
href: subCategory.anchor,
|
|
67
|
+
children: [/* @__PURE__ */ jsx(AttachIcon, {
|
|
68
|
+
className: orderSummaryStyle.anchorIcon({ size: "small" }),
|
|
69
|
+
sentiment: "info"
|
|
70
|
+
}), subCategory.title]
|
|
71
|
+
}) : subCategory.title
|
|
72
|
+
}),
|
|
73
|
+
subCategory.customContent ? /* @__PURE__ */ jsx(Text, {
|
|
74
|
+
as: "span",
|
|
75
|
+
prominence: "strong",
|
|
76
|
+
sentiment: "neutral",
|
|
77
|
+
variant: "bodySmallStrong",
|
|
78
|
+
children: subCategory.customContent
|
|
79
|
+
}) : null,
|
|
80
|
+
subCategory.numberInput ? /* @__PURE__ */ jsx(NumberInput, {
|
|
81
|
+
className: orderSummaryStyle.numberInput,
|
|
82
|
+
controls: subCategory.numberInputControls,
|
|
83
|
+
onChange: subCategory.onChangeInput,
|
|
84
|
+
size: "small",
|
|
85
|
+
unit: subCategory.numberInputUnit,
|
|
86
|
+
value: subCategory.numberInputValue
|
|
87
|
+
}) : null,
|
|
88
|
+
/* @__PURE__ */ jsx(SubCategoryPrice, { subCategory })
|
|
89
|
+
]
|
|
90
|
+
}), subCategory.details ? /* @__PURE__ */ jsx(Stack, {
|
|
91
|
+
className: orderSummaryStyle.details,
|
|
92
|
+
direction: "column",
|
|
93
|
+
gap: .5,
|
|
94
|
+
children: subCategory.details.map((detail, index) => detail ? /* @__PURE__ */ jsx(Text, {
|
|
73
95
|
as: "span",
|
|
74
|
-
prominence: "strong",
|
|
75
96
|
sentiment: "neutral",
|
|
76
|
-
variant: "
|
|
77
|
-
children:
|
|
78
|
-
}) : null
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
size: "small",
|
|
84
|
-
unit: subCategory.numberInputUnit,
|
|
85
|
-
value: subCategory.numberInputValue
|
|
86
|
-
}) : null,
|
|
87
|
-
/* @__PURE__ */ jsx(SubCategoryPrice, { subCategory })
|
|
88
|
-
]
|
|
89
|
-
}), subCategory.details ? /* @__PURE__ */ jsx(Stack, {
|
|
90
|
-
className: orderSummaryStyle.details,
|
|
91
|
-
direction: "column",
|
|
92
|
-
gap: .5,
|
|
93
|
-
children: subCategory.details.map((detail, index) => detail ? /* @__PURE__ */ jsx(Text, {
|
|
94
|
-
as: "span",
|
|
95
|
-
sentiment: "neutral",
|
|
96
|
-
variant: "bodySmall",
|
|
97
|
-
children: detail
|
|
98
|
-
}, `${subCategory.title}-${index}`) : null)
|
|
99
|
-
}) : null]
|
|
100
|
-
});
|
|
101
|
-
});
|
|
97
|
+
variant: "bodySmall",
|
|
98
|
+
children: detail
|
|
99
|
+
}, `${subCategory.title}-${index}`) : null)
|
|
100
|
+
}) : null]
|
|
101
|
+
});
|
|
102
|
+
}))();
|
|
103
|
+
}
|
|
102
104
|
|
|
103
105
|
//#endregion
|
|
104
106
|
init_SubCategory();
|
|
@@ -9,46 +9,48 @@ import { Fragment as Fragment$1, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
|
|
10
10
|
//#region src/compositions/OrderSummary/components/SubCategoryPrice.tsx
|
|
11
11
|
var SubCategoryPrice;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
prominence: "strong",
|
|
25
|
-
sentiment: "neutral",
|
|
26
|
-
variant: "bodySmallStrong",
|
|
27
|
-
className: orderSummaryStyle.categoryPrice,
|
|
28
|
-
children: [subCategoryPrice.discounted[0] === subCategoryPrice.discounted[1] || subCategory.priceUnit ? formatNumber(getCorrectPrice("discounted", 0), localeFormat, currency, fractionDigits) : `${formatNumber(subCategoryPrice.discounted[0], localeFormat, currency, fractionDigits)} - ${formatNumber(subCategoryPrice.discounted[1], localeFormat, currency, fractionDigits)}`, subCategory.priceUnit ? ` /${subCategory.priceUnit}` : ""]
|
|
29
|
-
}) : null, subCategory.price !== void 0 && !subCategory.hidePrice && (subCategoryPrice.default[0] !== subCategoryPrice.discounted[0] || subCategoryPrice.default[1] !== subCategoryPrice.discounted[1]) ? /* @__PURE__ */ jsxs(Stack, {
|
|
30
|
-
alignItems: "center",
|
|
31
|
-
direction: "row",
|
|
32
|
-
gap: 1,
|
|
33
|
-
children: [/* @__PURE__ */ jsxs(Text, {
|
|
34
|
-
as: "span",
|
|
35
|
-
prominence: "weak",
|
|
36
|
-
sentiment: "neutral",
|
|
37
|
-
strikeThrough: true,
|
|
38
|
-
variant: "bodySmallStrong",
|
|
39
|
-
className: orderSummaryStyle.categoryPrice,
|
|
40
|
-
children: [subCategoryPrice.default[0] === subCategoryPrice.default[1] || subCategory.priceUnit ? formatNumber(getCorrectPrice("default", 0), localeFormat, currency, fractionDigits) : `${formatNumber(subCategoryPrice.default[0], localeFormat, currency, fractionDigits)} - ${formatNumber(subCategoryPrice.default[1], localeFormat, currency, fractionDigits)}`, subCategory.priceUnit ? ` /${subCategory.priceUnit}` : ""]
|
|
41
|
-
}), /* @__PURE__ */ jsxs(Text, {
|
|
12
|
+
function init_SubCategoryPrice() {
|
|
13
|
+
return (init_SubCategoryPrice = __esmMin(() => {
|
|
14
|
+
init_Stack();
|
|
15
|
+
init_Text();
|
|
16
|
+
init_helpers();
|
|
17
|
+
init_Provider();
|
|
18
|
+
init_styles_css();
|
|
19
|
+
SubCategoryPrice = ({ subCategory }) => {
|
|
20
|
+
const { currency, localeFormat, hideTimeUnit, timePeriodAmount, timePeriodUnit, fractionDigits } = useContext(OrderSummaryContext);
|
|
21
|
+
const subCategoryPrice = calculateSubCategoryPrice(subCategory, hideTimeUnit, timePeriodAmount, timePeriodUnit);
|
|
22
|
+
const getCorrectPrice = (variant, index) => subCategory.priceUnit ? subCategory.price : subCategoryPrice[variant][index];
|
|
23
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [subCategory.price !== void 0 && !subCategory.hidePrice && subCategoryPrice.default[0] === subCategoryPrice.discounted[0] && subCategoryPrice.default[1] === subCategoryPrice.discounted[1] ? /* @__PURE__ */ jsxs(Text, {
|
|
42
24
|
as: "span",
|
|
43
25
|
prominence: "strong",
|
|
44
26
|
sentiment: "neutral",
|
|
45
27
|
variant: "bodySmallStrong",
|
|
46
28
|
className: orderSummaryStyle.categoryPrice,
|
|
47
29
|
children: [subCategoryPrice.discounted[0] === subCategoryPrice.discounted[1] || subCategory.priceUnit ? formatNumber(getCorrectPrice("discounted", 0), localeFormat, currency, fractionDigits) : `${formatNumber(subCategoryPrice.discounted[0], localeFormat, currency, fractionDigits)} - ${formatNumber(subCategoryPrice.discounted[1], localeFormat, currency, fractionDigits)}`, subCategory.priceUnit ? ` /${subCategory.priceUnit}` : ""]
|
|
48
|
-
})]
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
}) : null, subCategory.price !== void 0 && !subCategory.hidePrice && (subCategoryPrice.default[0] !== subCategoryPrice.discounted[0] || subCategoryPrice.default[1] !== subCategoryPrice.discounted[1]) ? /* @__PURE__ */ jsxs(Stack, {
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
direction: "row",
|
|
33
|
+
gap: 1,
|
|
34
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
35
|
+
as: "span",
|
|
36
|
+
prominence: "weak",
|
|
37
|
+
sentiment: "neutral",
|
|
38
|
+
strikeThrough: true,
|
|
39
|
+
variant: "bodySmallStrong",
|
|
40
|
+
className: orderSummaryStyle.categoryPrice,
|
|
41
|
+
children: [subCategoryPrice.default[0] === subCategoryPrice.default[1] || subCategory.priceUnit ? formatNumber(getCorrectPrice("default", 0), localeFormat, currency, fractionDigits) : `${formatNumber(subCategoryPrice.default[0], localeFormat, currency, fractionDigits)} - ${formatNumber(subCategoryPrice.default[1], localeFormat, currency, fractionDigits)}`, subCategory.priceUnit ? ` /${subCategory.priceUnit}` : ""]
|
|
42
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
43
|
+
as: "span",
|
|
44
|
+
prominence: "strong",
|
|
45
|
+
sentiment: "neutral",
|
|
46
|
+
variant: "bodySmallStrong",
|
|
47
|
+
className: orderSummaryStyle.categoryPrice,
|
|
48
|
+
children: [subCategoryPrice.discounted[0] === subCategoryPrice.discounted[1] || subCategory.priceUnit ? formatNumber(getCorrectPrice("discounted", 0), localeFormat, currency, fractionDigits) : `${formatNumber(subCategoryPrice.discounted[0], localeFormat, currency, fractionDigits)} - ${formatNumber(subCategoryPrice.discounted[1], localeFormat, currency, fractionDigits)}`, subCategory.priceUnit ? ` /${subCategory.priceUnit}` : ""]
|
|
49
|
+
})]
|
|
50
|
+
}) : null] });
|
|
51
|
+
};
|
|
52
|
+
}))();
|
|
53
|
+
}
|
|
52
54
|
|
|
53
55
|
//#endregion
|
|
54
56
|
init_SubCategoryPrice();
|
|
@@ -2,22 +2,24 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/compositions/OrderSummary/constants.ts
|
|
4
4
|
var Units, multiplier;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
5
|
+
function init_constants() {
|
|
6
|
+
return (init_constants = __esmMin(() => {
|
|
7
|
+
Units = [
|
|
8
|
+
"seconds",
|
|
9
|
+
"minutes",
|
|
10
|
+
"hours",
|
|
11
|
+
"days",
|
|
12
|
+
"months"
|
|
13
|
+
];
|
|
14
|
+
multiplier = {
|
|
15
|
+
days: 24,
|
|
16
|
+
hours: 1,
|
|
17
|
+
minutes: 1 / 60,
|
|
18
|
+
months: 730,
|
|
19
|
+
seconds: 1 / 60 / 60
|
|
20
|
+
};
|
|
21
|
+
}))();
|
|
22
|
+
}
|
|
21
23
|
|
|
22
24
|
//#endregion
|
|
23
25
|
init_constants();
|
|
@@ -1,154 +1,156 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { init_constants, multiplier } from "./constants.js";
|
|
4
4
|
import { OrderSummaryContext, init_Provider } from "./Provider.js";
|
|
5
5
|
import { useContext } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/compositions/OrderSummary/helpers.ts
|
|
8
8
|
var formatNumber, calculatePrice, calculateSubCategoryPrice, calculateCategoryPrice, DisplayPrice, computeCategoriesPrice, computeTotalPrice;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
function init_helpers() {
|
|
10
|
+
return (init_helpers = __esmMin(() => {
|
|
11
|
+
init_constants();
|
|
12
|
+
init_Provider();
|
|
13
|
+
init_objectSpread2();
|
|
14
|
+
formatNumber = (number, locale, currency, fractionDigits = 10) => {
|
|
15
|
+
return new Intl.NumberFormat(locale, {
|
|
16
|
+
currency,
|
|
17
|
+
maximumFractionDigits: fractionDigits,
|
|
18
|
+
style: "currency"
|
|
19
|
+
}).format(number);
|
|
20
|
+
};
|
|
21
|
+
calculatePrice = ({ price, amount, amountFree = 0, timeUnit, timeAmount, discount = 0, fixedPrice = false }) => {
|
|
22
|
+
return price * (fixedPrice ? 1 : (Number.isNaN(timeAmount) ? 1 : timeAmount) * multiplier[timeUnit]) * Math.max(amount - amountFree, 0) * (1 - (discount <= 1 ? discount : 0)) - (discount > 1 ? Math.abs(discount) : 0);
|
|
23
|
+
};
|
|
24
|
+
calculateSubCategoryPrice = (subCategory, hideTimeUnit, timePeriodAmount, timePeriodUnit) => {
|
|
25
|
+
var _subCategory$amount3;
|
|
26
|
+
var _subCategory$price2;
|
|
27
|
+
const timeAmount = hideTimeUnit ? 1 : timePeriodAmount;
|
|
28
|
+
const timeUnit = hideTimeUnit ? "hours" : timePeriodUnit;
|
|
29
|
+
if (Array.isArray(subCategory.amount)) {
|
|
30
|
+
var _subCategory$amount$;
|
|
31
|
+
var _subCategory$amount;
|
|
32
|
+
var _subCategory$amount$2;
|
|
33
|
+
var _subCategory$amount2;
|
|
34
|
+
var _subCategory$price;
|
|
35
|
+
const minAmount = (_subCategory$amount$ = (_subCategory$amount = subCategory.amount) === null || _subCategory$amount === void 0 ? void 0 : _subCategory$amount[0]) !== null && _subCategory$amount$ !== void 0 ? _subCategory$amount$ : 1;
|
|
36
|
+
const maxAmount = (_subCategory$amount$2 = (_subCategory$amount2 = subCategory.amount) === null || _subCategory$amount2 === void 0 ? void 0 : _subCategory$amount2[1]) !== null && _subCategory$amount$2 !== void 0 ? _subCategory$amount$2 : 1;
|
|
37
|
+
const subCategoryPrice = (_subCategory$price = subCategory.price) !== null && _subCategory$price !== void 0 ? _subCategory$price : 0;
|
|
38
|
+
const minPrice = calculatePrice({
|
|
39
|
+
amount: minAmount,
|
|
40
|
+
fixedPrice: subCategory.fixedPrice,
|
|
41
|
+
price: subCategoryPrice,
|
|
42
|
+
timeAmount,
|
|
43
|
+
timeUnit
|
|
44
|
+
}) || 0;
|
|
45
|
+
const maxPrice = calculatePrice({
|
|
46
|
+
amount: maxAmount,
|
|
47
|
+
fixedPrice: subCategory.fixedPrice,
|
|
48
|
+
price: subCategoryPrice,
|
|
49
|
+
timeAmount,
|
|
50
|
+
timeUnit
|
|
51
|
+
}) || 0;
|
|
52
|
+
return {
|
|
53
|
+
discounted: [calculatePrice({
|
|
54
|
+
amount: minAmount,
|
|
55
|
+
amountFree: subCategory.amountFree,
|
|
56
|
+
discount: subCategory.discount,
|
|
57
|
+
fixedPrice: subCategory.fixedPrice,
|
|
58
|
+
price: subCategoryPrice,
|
|
59
|
+
timeAmount,
|
|
60
|
+
timeUnit
|
|
61
|
+
}) || 0, calculatePrice({
|
|
62
|
+
amount: maxAmount,
|
|
63
|
+
amountFree: subCategory.amountFree,
|
|
64
|
+
discount: subCategory.discount,
|
|
65
|
+
fixedPrice: subCategory.fixedPrice,
|
|
66
|
+
price: subCategoryPrice,
|
|
67
|
+
timeAmount,
|
|
68
|
+
timeUnit
|
|
69
|
+
}) || 0],
|
|
70
|
+
default: [minPrice, maxPrice]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const subCategoryAmount = (_subCategory$amount3 = subCategory.amount) !== null && _subCategory$amount3 !== void 0 ? _subCategory$amount3 : 1;
|
|
74
|
+
const subCategoryPrice = (_subCategory$price2 = subCategory.price) !== null && _subCategory$price2 !== void 0 ? _subCategory$price2 : 0;
|
|
75
|
+
const price = calculatePrice({
|
|
76
|
+
amount: subCategoryAmount,
|
|
39
77
|
fixedPrice: subCategory.fixedPrice,
|
|
40
78
|
price: subCategoryPrice,
|
|
41
79
|
timeAmount,
|
|
42
80
|
timeUnit
|
|
43
81
|
}) || 0;
|
|
44
|
-
const
|
|
45
|
-
amount:
|
|
82
|
+
const priceWithDiscount = calculatePrice({
|
|
83
|
+
amount: subCategoryAmount,
|
|
84
|
+
amountFree: subCategory.amountFree,
|
|
85
|
+
discount: subCategory.discount,
|
|
46
86
|
fixedPrice: subCategory.fixedPrice,
|
|
47
87
|
price: subCategoryPrice,
|
|
48
88
|
timeAmount,
|
|
49
89
|
timeUnit
|
|
50
90
|
}) || 0;
|
|
51
91
|
return {
|
|
52
|
-
discounted: [
|
|
53
|
-
|
|
54
|
-
amountFree: subCategory.amountFree,
|
|
55
|
-
discount: subCategory.discount,
|
|
56
|
-
fixedPrice: subCategory.fixedPrice,
|
|
57
|
-
price: subCategoryPrice,
|
|
58
|
-
timeAmount,
|
|
59
|
-
timeUnit
|
|
60
|
-
}) || 0, calculatePrice({
|
|
61
|
-
amount: maxAmount,
|
|
62
|
-
amountFree: subCategory.amountFree,
|
|
63
|
-
discount: subCategory.discount,
|
|
64
|
-
fixedPrice: subCategory.fixedPrice,
|
|
65
|
-
price: subCategoryPrice,
|
|
66
|
-
timeAmount,
|
|
67
|
-
timeUnit
|
|
68
|
-
}) || 0],
|
|
69
|
-
default: [minPrice, maxPrice]
|
|
92
|
+
discounted: [priceWithDiscount, priceWithDiscount],
|
|
93
|
+
default: [price, price]
|
|
70
94
|
};
|
|
71
|
-
}
|
|
72
|
-
const subCategoryAmount = (_subCategory$amount3 = subCategory.amount) !== null && _subCategory$amount3 !== void 0 ? _subCategory$amount3 : 1;
|
|
73
|
-
const subCategoryPrice = (_subCategory$price2 = subCategory.price) !== null && _subCategory$price2 !== void 0 ? _subCategory$price2 : 0;
|
|
74
|
-
const price = calculatePrice({
|
|
75
|
-
amount: subCategoryAmount,
|
|
76
|
-
fixedPrice: subCategory.fixedPrice,
|
|
77
|
-
price: subCategoryPrice,
|
|
78
|
-
timeAmount,
|
|
79
|
-
timeUnit
|
|
80
|
-
}) || 0;
|
|
81
|
-
const priceWithDiscount = calculatePrice({
|
|
82
|
-
amount: subCategoryAmount,
|
|
83
|
-
amountFree: subCategory.amountFree,
|
|
84
|
-
discount: subCategory.discount,
|
|
85
|
-
fixedPrice: subCategory.fixedPrice,
|
|
86
|
-
price: subCategoryPrice,
|
|
87
|
-
timeAmount,
|
|
88
|
-
timeUnit
|
|
89
|
-
}) || 0;
|
|
90
|
-
return {
|
|
91
|
-
discounted: [priceWithDiscount, priceWithDiscount],
|
|
92
|
-
default: [price, price]
|
|
93
95
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
calculateCategoryPrice = (category, hideTimeUnit, timePeriodAmount, timePeriodUnit) => {
|
|
97
|
+
var _category$subCategori;
|
|
98
|
+
var _category$subCategori2;
|
|
99
|
+
var _category$discount;
|
|
100
|
+
var _category$discount2;
|
|
101
|
+
const categoryPrice = (_category$subCategori = (_category$subCategori2 = category.subCategories) === null || _category$subCategori2 === void 0 ? void 0 : _category$subCategori2.reduce((acc, subCategory) => {
|
|
102
|
+
const computedPrices = calculateSubCategoryPrice(subCategory, hideTimeUnit, timePeriodAmount, timePeriodUnit);
|
|
103
|
+
return {
|
|
104
|
+
discounted: [acc.discounted[0] + computedPrices.discounted[0], acc.discounted[1] + computedPrices.discounted[1]],
|
|
105
|
+
default: [acc.default[0] + computedPrices.default[0], acc.default[1] + computedPrices.default[1]]
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
discounted: [0, 0],
|
|
109
|
+
default: [0, 0]
|
|
110
|
+
})) !== null && _category$subCategori !== void 0 ? _category$subCategori : {
|
|
111
|
+
discounted: [0, 0],
|
|
112
|
+
default: [0, 0]
|
|
113
|
+
};
|
|
114
|
+
const discountedPriceMin = category.discount && category.discount <= 1 ? categoryPrice.discounted[0] * (1 - category.discount) : categoryPrice.discounted[0] - ((_category$discount = category.discount) !== null && _category$discount !== void 0 ? _category$discount : 0);
|
|
115
|
+
const discountedPriceMax = category.discount && category.discount <= 1 ? categoryPrice.discounted[1] * (1 - category.discount) : categoryPrice.discounted[1] - ((_category$discount2 = category.discount) !== null && _category$discount2 !== void 0 ? _category$discount2 : 0);
|
|
116
|
+
const discountedPrice = category.allowNegative ? [discountedPriceMin, discountedPriceMax] : [Math.max(discountedPriceMin, 0), Math.max(discountedPriceMax, 0)];
|
|
117
|
+
categoryPrice.default.map((price) => {
|
|
118
|
+
var _category$discount3;
|
|
119
|
+
return Math.max(category.discount && category.discount <= 1 ? price * category.discount : price - ((_category$discount3 = category.discount) !== null && _category$discount3 !== void 0 ? _category$discount3 : 0), 0);
|
|
120
|
+
});
|
|
102
121
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
122
|
+
categoryPrice: categoryPrice.default,
|
|
123
|
+
discountedPrice
|
|
105
124
|
};
|
|
106
|
-
}, {
|
|
107
|
-
discounted: [0, 0],
|
|
108
|
-
default: [0, 0]
|
|
109
|
-
})) !== null && _category$subCategori !== void 0 ? _category$subCategori : {
|
|
110
|
-
discounted: [0, 0],
|
|
111
|
-
default: [0, 0]
|
|
112
125
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var _category$discount3;
|
|
118
|
-
return Math.max(category.discount && category.discount <= 1 ? price * category.discount : price - ((_category$discount3 = category.discount) !== null && _category$discount3 !== void 0 ? _category$discount3 : 0), 0);
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
categoryPrice: categoryPrice.default,
|
|
122
|
-
discountedPrice
|
|
126
|
+
DisplayPrice = ({ price, beforeOrAfter, divisor = 1 }) => {
|
|
127
|
+
const { localeFormat, currency, fractionDigits } = useContext(OrderSummaryContext);
|
|
128
|
+
const withDiscount = beforeOrAfter === "after" ? "WithDiscount" : "";
|
|
129
|
+
return price.totalPrice === price.maxPrice ? formatNumber(price[`totalPrice${withDiscount}`] / divisor, localeFormat, currency, fractionDigits !== null && fractionDigits !== void 0 ? fractionDigits : 2) : `${formatNumber(price[`totalPrice${withDiscount}`] / divisor, localeFormat, currency, fractionDigits !== null && fractionDigits !== void 0 ? fractionDigits : 2)} - ${formatNumber(price[`maxPrice${withDiscount}`] / divisor, localeFormat, currency, fractionDigits !== null && fractionDigits !== void 0 ? fractionDigits : 2)}`;
|
|
123
130
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
maxPrice: Math.max(price[1], 0),
|
|
145
|
-
maxPriceWithDiscount: Math.max(priceDiscounted[1] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0), 0),
|
|
146
|
-
timeUnit: timePeriodUnit,
|
|
147
|
-
totalPrice: Math.max(price[0], 0),
|
|
148
|
-
totalPriceWithDiscount: Math.max(priceDiscounted[0] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0), 0)
|
|
131
|
+
computeCategoriesPrice = (items, hideTimeUnit, timePeriodAmount, timePeriodUnit) => items.reduce((acc, category) => {
|
|
132
|
+
const { categoryPrice, discountedPrice } = calculateCategoryPrice(category, hideTimeUnit, timePeriodAmount, timePeriodUnit);
|
|
133
|
+
return _objectSpread2(_objectSpread2({}, acc), {}, { [category.category]: {
|
|
134
|
+
maxPrice: categoryPrice[1],
|
|
135
|
+
maxPriceWithDiscount: discountedPrice[1],
|
|
136
|
+
timeUnit: timePeriodUnit,
|
|
137
|
+
totalPrice: categoryPrice[0],
|
|
138
|
+
totalPriceWithDiscount: discountedPrice[0]
|
|
139
|
+
} });
|
|
140
|
+
}, {});
|
|
141
|
+
computeTotalPrice = (categoriesPrice, discount, timePeriodUnit) => {
|
|
142
|
+
const price = Object.values(categoriesPrice).reduce((acc, categoryPrice) => [acc[0] + categoryPrice.totalPrice, acc[1] + categoryPrice.maxPrice], [0, 0]);
|
|
143
|
+
const priceDiscounted = Object.values(categoriesPrice).reduce((acc, categoryPrice) => [acc[0] + categoryPrice.totalPriceWithDiscount, acc[1] + categoryPrice.maxPriceWithDiscount], [0, 0]);
|
|
144
|
+
return {
|
|
145
|
+
maxPrice: Math.max(price[1], 0),
|
|
146
|
+
maxPriceWithDiscount: Math.max(priceDiscounted[1] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0), 0),
|
|
147
|
+
timeUnit: timePeriodUnit,
|
|
148
|
+
totalPrice: Math.max(price[0], 0),
|
|
149
|
+
totalPriceWithDiscount: Math.max(priceDiscounted[0] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0), 0)
|
|
150
|
+
};
|
|
149
151
|
};
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
+
}))();
|
|
153
|
+
}
|
|
152
154
|
|
|
153
155
|
//#endregion
|
|
154
156
|
init_helpers();
|