@ultraviolet/ui 3.12.3 → 3.13.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.120.0 → _@oxc-project_runtime@0.122.0}/helpers/defineProperty.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/objectSpread2.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/objectWithoutProperties.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/toPrimitive.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/toPropertyKey.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.120.0 → _@oxc-project_runtime@0.122.0}/helpers/typeof.js +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/Avatar/constants.d.ts +15 -15
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Avatar/styles.css.js +0 -2
- package/dist/components/BarChart/index.js +1 -1
- package/dist/components/Breadcrumbs/components/Item.js +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Carousel/Item.d.ts +9 -0
- package/dist/components/Carousel/Item.d.ts.map +1 -0
- package/dist/components/Carousel/Item.js +22 -0
- package/dist/components/Carousel/index.d.ts +6 -8
- package/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/components/Carousel/index.js +4 -11
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +13 -12
- package/dist/components/Checkbox/styles.css.js +0 -4
- package/dist/components/CheckboxGroup/Context.d.ts +9 -0
- package/dist/components/CheckboxGroup/Context.d.ts.map +1 -0
- package/dist/components/CheckboxGroup/Context.js +13 -0
- package/dist/components/CheckboxGroup/SingleCheckbox.d.ts +8 -0
- package/dist/components/CheckboxGroup/SingleCheckbox.d.ts.map +1 -0
- package/dist/components/CheckboxGroup/SingleCheckbox.js +46 -0
- package/dist/components/CheckboxGroup/index.d.ts +25 -9
- package/dist/components/CheckboxGroup/index.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/index.js +7 -32
- package/dist/components/CopyButton/index.d.ts.map +1 -1
- package/dist/components/CopyButton/index.js +4 -3
- package/dist/components/DateInput/components/CalendarDaily.d.ts.map +1 -1
- package/dist/components/DateInput/components/CalendarDaily.js +5 -4
- package/dist/components/DateInput/components/CalendarMonthly.d.ts.map +1 -1
- package/dist/components/DateInput/components/CalendarMonthly.js +5 -4
- package/dist/components/DateInput/helpers.d.ts +5 -1
- package/dist/components/DateInput/helpers.d.ts.map +1 -1
- package/dist/components/DateInput/helpers.js +18 -9
- package/dist/components/DateInput/index.d.ts.map +1 -1
- package/dist/components/DateInput/index.js +2 -2
- package/dist/components/DateInput/styles.css.d.ts.map +1 -1
- package/dist/components/Expandable/AnimatedExpandable.d.ts +3 -0
- package/dist/components/Expandable/AnimatedExpandable.d.ts.map +1 -0
- package/dist/components/Expandable/AnimatedExpandable.js +95 -0
- package/dist/components/Expandable/NonAnimatedExpandable.d.ts +3 -0
- package/dist/components/Expandable/NonAnimatedExpandable.d.ts.map +1 -0
- package/dist/components/Expandable/NonAnimatedExpandable.js +22 -0
- package/dist/components/Expandable/constant.d.ts +2 -0
- package/dist/components/Expandable/constant.d.ts.map +1 -0
- package/dist/components/Expandable/constant.js +8 -0
- package/dist/components/Expandable/index.d.ts +1 -24
- package/dist/components/Expandable/index.d.ts.map +1 -1
- package/dist/components/Expandable/index.js +8 -94
- package/dist/components/Expandable/types.d.ts +23 -0
- package/dist/components/Expandable/types.d.ts.map +1 -0
- package/dist/components/ExpandableCard/index.d.ts.map +1 -1
- package/dist/components/FileInput/DropzoneContent.d.ts +9 -0
- package/dist/components/FileInput/DropzoneContent.d.ts.map +1 -0
- package/dist/components/FileInput/DropzoneContent.js +30 -0
- package/dist/components/FileInput/components/Button.js +2 -2
- package/dist/components/FileInput/components/List.d.ts.map +1 -1
- package/dist/components/FileInput/components/List.js +11 -9
- package/dist/components/FileInput/helpers.d.ts.map +1 -1
- package/dist/components/FileInput/index.d.ts.map +1 -1
- package/dist/components/FileInput/index.js +40 -66
- package/dist/components/InfiniteScroll/index.js +1 -1
- package/dist/components/Label/LabelContent.d.ts +3 -0
- package/dist/components/Label/LabelContent.d.ts.map +1 -0
- package/dist/components/Label/LabelContent.js +61 -0
- package/dist/components/Label/index.d.ts +1 -19
- package/dist/components/Label/index.d.ts.map +1 -1
- package/dist/components/Label/index.js +3 -47
- package/dist/components/Label/type.d.ts +19 -0
- package/dist/components/Label/type.d.ts.map +1 -0
- package/dist/components/LineChart/CustomLegend.d.ts.map +1 -1
- package/dist/components/LineChart/CustomLegend.js +4 -9
- package/dist/components/LineChart/LegendCell.d.ts +10 -0
- package/dist/components/LineChart/LegendCell.d.ts.map +1 -0
- package/dist/components/LineChart/LegendCell.js +23 -0
- package/dist/components/LineChart/index.js +1 -1
- package/dist/components/List/Cell.js +1 -1
- package/dist/components/List/ExpandButtonCell.d.ts +9 -0
- package/dist/components/List/ExpandButtonCell.d.ts.map +1 -0
- package/dist/components/List/ExpandButtonCell.js +44 -0
- package/dist/components/List/HeaderCell.d.ts.map +1 -1
- package/dist/components/List/HeaderCell.js +4 -8
- package/dist/components/List/ListContext.js +3 -3
- package/dist/components/List/Row.d.ts.map +1 -1
- package/dist/components/List/Row.js +21 -50
- package/dist/components/List/SelectRowCell.d.ts +8 -0
- package/dist/components/List/SelectRowCell.d.ts.map +1 -0
- package/dist/components/List/SelectRowCell.js +49 -0
- package/dist/components/List/SortIcon.d.ts +4 -0
- package/dist/components/List/SortIcon.d.ts.map +1 -0
- package/dist/components/List/SortIcon.js +19 -0
- package/dist/components/List/TableContainer.d.ts +5 -0
- package/dist/components/List/TableContainer.d.ts.map +1 -0
- package/dist/components/List/TableContainer.js +31 -0
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +4 -16
- package/dist/components/Loader/index.js +1 -1
- package/dist/components/Menu/MenuContent.d.ts.map +1 -1
- package/dist/components/Menu/MenuContent.js +28 -22
- package/dist/components/Menu/components/Item.d.ts.map +1 -1
- package/dist/components/Menu/components/Item.js +8 -6
- package/dist/components/Menu/index.js +2 -2
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.js +4 -4
- package/dist/components/Modal/components/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/components/Dialog.js +14 -12
- package/dist/components/Notification/Notification.js +1 -1
- package/dist/components/NumberInput/components/Controls.d.ts +12 -0
- package/dist/components/NumberInput/components/Controls.d.ts.map +1 -0
- package/dist/components/NumberInput/components/Controls.js +78 -0
- package/dist/components/NumberInput/components/Unit.d.ts +8 -0
- package/dist/components/NumberInput/components/Unit.d.ts.map +1 -0
- package/dist/components/NumberInput/components/Unit.js +28 -0
- package/dist/components/NumberInput/index.d.ts.map +1 -1
- package/dist/components/NumberInput/index.js +33 -86
- package/dist/components/Pagination/PaginationButton.d.ts +11 -0
- package/dist/components/Pagination/PaginationButton.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationButton.js +39 -0
- package/dist/components/Pagination/PaginationButtons.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationButtons.js +4 -25
- package/dist/components/PieChart/index.d.ts.map +1 -1
- package/dist/components/PieChart/index.js +1 -1
- package/dist/components/Popover/ContentWrapper.d.ts +3 -0
- package/dist/components/Popover/ContentWrapper.d.ts.map +1 -0
- package/dist/components/Popover/ContentWrapper.js +49 -0
- package/dist/components/Popover/index.d.ts +6 -12
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +4 -37
- package/dist/components/Popover/types.d.ts +26 -0
- package/dist/components/Popover/types.d.ts.map +1 -0
- package/dist/components/Popup/helpers.d.ts.map +1 -1
- package/dist/components/Popup/helpers.js +124 -123
- package/dist/components/Popup/index.d.ts.map +1 -1
- package/dist/components/Popup/index.js +3 -2
- package/dist/components/Popup/styles.css.d.ts.map +1 -1
- package/dist/components/Popup/styles.css.js +3 -3
- package/dist/components/ProgressBar/index.d.ts.map +1 -1
- package/dist/components/ProgressBar/index.js +63 -60
- package/dist/components/ProgressBar/styles.css.js +0 -2
- package/dist/components/Radio/MarkedIcon.d.ts +2 -0
- package/dist/components/Radio/MarkedIcon.d.ts.map +1 -0
- package/dist/components/Radio/MarkedIcon.js +33 -0
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/Radio/index.js +3 -21
- package/dist/components/Radio/styles.css.js +3 -3
- package/dist/components/RadioGroup/Context.d.ts +9 -0
- package/dist/components/RadioGroup/Context.d.ts.map +1 -0
- package/dist/components/RadioGroup/Context.js +12 -0
- package/dist/components/RadioGroup/SingleRadio.d.ts +6 -0
- package/dist/components/RadioGroup/SingleRadio.d.ts.map +1 -0
- package/dist/components/RadioGroup/SingleRadio.js +40 -0
- package/dist/components/RadioGroup/index.d.ts +2 -4
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +6 -28
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Row/styles.css.js +2 -2
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputProvider.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputProvider.js +8 -63
- package/dist/components/SelectInput/components/Dropdown/AddOption.d.ts +12 -0
- package/dist/components/SelectInput/components/Dropdown/AddOption.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/AddOption.js +48 -0
- package/dist/components/SelectInput/components/Dropdown/Content.d.ts +20 -0
- package/dist/components/SelectInput/components/Dropdown/Content.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/Content.js +217 -0
- package/dist/components/SelectInput/components/{Dropdown.d.ts → Dropdown/Dropdown.d.ts} +1 -17
- package/dist/components/SelectInput/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/Dropdown.js +218 -0
- package/dist/components/SelectInput/components/Dropdown/Group.d.ts +5 -0
- package/dist/components/SelectInput/components/Dropdown/Group.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/Group.js +79 -0
- package/dist/components/SelectInput/components/Dropdown/Item.d.ts +13 -0
- package/dist/components/SelectInput/components/Dropdown/Item.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/Item.js +87 -0
- package/dist/components/SelectInput/components/{DropdownOption.d.ts → Dropdown/Option.d.ts} +2 -2
- package/dist/components/SelectInput/components/Dropdown/Option.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/Option.js +139 -0
- package/dist/components/SelectInput/components/Dropdown/SearchBar.d.ts +10 -0
- package/dist/components/SelectInput/components/Dropdown/SearchBar.d.ts.map +1 -0
- package/dist/components/SelectInput/components/{SearchBarDropdown.js → Dropdown/SearchBar.js} +20 -24
- package/dist/components/SelectInput/components/Dropdown/SelectAll.d.ts +4 -0
- package/dist/components/SelectInput/components/Dropdown/SelectAll.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/SelectAll.js +84 -0
- package/dist/components/SelectInput/components/{dropdown.css.d.ts → Dropdown/dropdown.css.d.ts} +4 -2
- package/dist/components/SelectInput/components/Dropdown/dropdown.css.d.ts.map +1 -0
- package/dist/components/SelectInput/components/{dropdown.css.js → Dropdown/dropdown.css.js} +15 -13
- package/dist/components/SelectInput/components/Dropdown/dropdown.css.ts.vanilla.js +8 -0
- package/dist/components/SelectInput/components/Dropdown/index.d.ts +2 -0
- package/dist/components/SelectInput/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/SelectInput/components/Dropdown/index.js +11 -0
- package/dist/components/SelectInput/components/SelectBar/SelectBar.d.ts.map +1 -0
- package/dist/components/SelectInput/components/{SelectBar.js → SelectBar/SelectBar.js} +24 -125
- package/dist/components/SelectInput/components/SelectBar/Values.d.ts +20 -0
- package/dist/components/SelectInput/components/SelectBar/Values.d.ts.map +1 -0
- package/dist/components/SelectInput/components/SelectBar/Values.js +93 -0
- package/dist/components/SelectInput/components/SelectBar/index.d.ts +2 -0
- package/dist/components/SelectInput/components/SelectBar/index.d.ts.map +1 -0
- package/dist/components/SelectInput/components/SelectBar/index.js +11 -0
- package/dist/components/SelectInput/components/SelectBar/selectBar.css.d.ts.map +1 -0
- package/dist/components/SelectInput/components/{selectBar.css.js → SelectBar/selectBar.css.js} +19 -19
- package/dist/components/SelectInput/components/SelectBar/selectBar.css.ts.vanilla.js +8 -0
- package/dist/components/SelectInput/components/helpers.d.ts +30 -0
- package/dist/components/SelectInput/components/helpers.d.ts.map +1 -0
- package/dist/components/SelectInput/components/helpers.js +77 -0
- package/dist/components/SelectInput/components/index.d.ts +3 -0
- package/dist/components/SelectInput/components/index.d.ts.map +1 -0
- package/dist/components/SelectInput/components/index.js +15 -0
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +4 -4
- package/dist/components/SelectInput/reducerFonctions.d.ts +28 -0
- package/dist/components/SelectInput/reducerFonctions.d.ts.map +1 -0
- package/dist/components/SelectInput/reducerFonctions.js +76 -0
- package/dist/components/SelectInput/styles.css.d.ts +4 -2
- package/dist/components/SelectInput/styles.css.d.ts.map +1 -1
- package/dist/components/SelectInput/styles.css.js +52 -50
- package/dist/components/SelectableCard/MultiStateInput.js +1 -1
- package/dist/components/SelectableCard/SelectableCard.js +5 -4
- package/dist/components/SelectableCardGroup/Context.d.ts +11 -0
- package/dist/components/SelectableCardGroup/Context.d.ts.map +1 -0
- package/dist/components/SelectableCardGroup/Context.js +13 -0
- package/dist/components/SelectableCardGroup/SingleCard.d.ts +5 -0
- package/dist/components/SelectableCardGroup/SingleCard.d.ts.map +1 -0
- package/dist/components/SelectableCardGroup/SingleCard.js +42 -0
- package/dist/components/SelectableCardGroup/index.d.ts +2 -4
- package/dist/components/SelectableCardGroup/index.d.ts.map +1 -1
- package/dist/components/SelectableCardGroup/index.js +6 -30
- package/dist/components/SelectableCardOptionGroup/components/Option.js +1 -1
- package/dist/components/Skeleton/Blocks.d.ts.map +1 -1
- package/dist/components/Skeleton/List.d.ts.map +1 -1
- package/dist/components/Skeleton/List.js +8 -9
- package/dist/components/Skeleton/Slider.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +1 -2
- package/dist/components/Slider/components/SingleSlider.d.ts.map +1 -1
- package/dist/components/Slider/components/SingleSlider.js +1 -1
- package/dist/components/Snippet/CodeContent.d.ts +14 -0
- package/dist/components/Snippet/CodeContent.d.ts.map +1 -0
- package/dist/components/Snippet/CodeContent.js +36 -0
- package/dist/components/Snippet/index.d.ts +1 -1
- package/dist/components/Snippet/index.d.ts.map +1 -1
- package/dist/components/Snippet/index.js +6 -22
- package/dist/components/Stack/index.js +2 -2
- package/dist/components/Stack/styles.css.js +2 -2
- package/dist/components/StepList/Item.d.ts +17 -0
- package/dist/components/StepList/Item.d.ts.map +1 -0
- package/dist/components/StepList/Item.js +32 -0
- package/dist/components/StepList/index.d.ts +12 -15
- package/dist/components/StepList/index.d.ts.map +1 -1
- package/dist/components/StepList/index.js +4 -19
- package/dist/components/Stepper/Bullet.d.ts +7 -0
- package/dist/components/Stepper/Bullet.d.ts.map +1 -0
- package/dist/components/Stepper/Bullet.js +42 -0
- package/dist/components/Stepper/Step.d.ts.map +1 -1
- package/dist/components/Stepper/Step.js +8 -24
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/Table/Cell.js +1 -1
- package/dist/components/Table/HeaderCell.d.ts.map +1 -1
- package/dist/components/Table/HeaderCell.js +6 -12
- package/dist/components/Table/SortIcon.d.ts +4 -0
- package/dist/components/Table/SortIcon.d.ts.map +1 -0
- package/dist/components/Table/SortIcon.js +19 -0
- package/dist/components/Table/TableContainer.d.ts +5 -0
- package/dist/components/Table/TableContainer.d.ts.map +1 -0
- package/dist/components/Table/TableContainer.js +31 -0
- package/dist/components/Table/TableContext.d.ts.map +1 -1
- package/dist/components/Table/TableContext.js +2 -2
- package/dist/components/Table/index.d.ts +6 -6
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +6 -22
- package/dist/components/Table/styles.css.js +0 -2
- package/dist/components/Tabs/Tab.js +2 -2
- package/dist/components/Tabs/TabMenu.js +2 -2
- package/dist/components/Tabs/TabMenuItem.js +2 -2
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tag/TagInner.d.ts +5 -0
- package/dist/components/Tag/TagInner.d.ts.map +1 -0
- package/dist/components/Tag/TagInner.js +48 -0
- package/dist/components/Tag/index.d.ts +1 -31
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +7 -40
- package/dist/components/Tag/type.d.ts +31 -0
- package/dist/components/Tag/type.d.ts.map +1 -0
- package/dist/components/TagInput/index.js +1 -1
- package/dist/components/TagList/constant.d.ts +2 -0
- package/dist/components/TagList/constant.d.ts.map +1 -1
- package/dist/components/TagList/constant.js +3 -2
- package/dist/components/TagList/index.d.ts +1 -1
- package/dist/components/TagList/index.d.ts.map +1 -1
- package/dist/components/TagList/index.js +33 -27
- package/dist/components/TagList/styles.css.d.ts.map +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Text/style.css.js +0 -2
- package/dist/components/TextArea/Icon.d.ts +5 -0
- package/dist/components/TextArea/Icon.d.ts.map +1 -0
- package/dist/components/TextArea/Icon.js +19 -0
- package/dist/components/TextArea/Notice.d.ts +11 -0
- package/dist/components/TextArea/Notice.d.ts.map +1 -0
- package/dist/components/TextArea/Notice.js +41 -0
- package/dist/components/TextArea/constant.d.ts +2 -0
- package/dist/components/TextArea/constant.d.ts.map +1 -0
- package/dist/components/TextArea/constant.js +11 -0
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextArea/index.js +29 -48
- package/dist/components/TextInput/BottomText.d.ts +3 -0
- package/dist/components/TextInput/BottomText.d.ts.map +1 -0
- package/dist/components/TextInput/BottomText.js +29 -0
- package/dist/components/TextInput/PrefixSuffix.d.ts +7 -0
- package/dist/components/TextInput/PrefixSuffix.d.ts.map +1 -0
- package/dist/components/TextInput/PrefixSuffix.js +30 -0
- package/dist/components/TextInput/RightIcon.d.ts +10 -0
- package/dist/components/TextInput/RightIcon.d.ts.map +1 -0
- package/dist/components/TextInput/RightIcon.js +62 -0
- package/dist/components/TextInput/ShowHidePassword.d.ts +7 -0
- package/dist/components/TextInput/ShowHidePassword.d.ts.map +1 -0
- package/dist/components/TextInput/ShowHidePassword.js +36 -0
- package/dist/components/TextInput/index.d.ts +5 -6
- package/dist/components/TextInput/index.d.ts.map +1 -1
- package/dist/components/TextInput/index.js +46 -106
- package/dist/components/TextInput/type.d.ts +25 -0
- package/dist/components/TextInput/type.d.ts.map +1 -0
- package/dist/components/TimeInput/RightIcon.d.ts +9 -0
- package/dist/components/TimeInput/RightIcon.d.ts.map +1 -0
- package/dist/components/TimeInput/RightIcon.js +36 -0
- package/dist/components/TimeInput/index.d.ts.map +1 -1
- package/dist/components/TimeInput/index.js +17 -29
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/ToggleGroup/Context.d.ts +9 -0
- package/dist/components/ToggleGroup/Context.d.ts.map +1 -0
- package/dist/components/ToggleGroup/Context.js +13 -0
- package/dist/components/ToggleGroup/SingleToggle.d.ts +11 -0
- package/dist/components/ToggleGroup/SingleToggle.d.ts.map +1 -0
- package/dist/components/ToggleGroup/SingleToggle.js +37 -0
- package/dist/components/ToggleGroup/index.d.ts +2 -9
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.js +6 -25
- package/dist/components/TreeMapChart/index.js +1 -1
- package/dist/components/VerificationCode/index.js +2 -3
- package/dist/components/compositions/CodeEditor/components/CopyButton.d.ts +5 -0
- package/dist/components/compositions/CodeEditor/components/CopyButton.d.ts.map +1 -0
- package/dist/components/compositions/CodeEditor/components/CopyButton.js +24 -0
- package/dist/components/compositions/CodeEditor/components/Expandable.d.ts +8 -0
- package/dist/components/compositions/CodeEditor/components/Expandable.d.ts.map +1 -0
- package/dist/components/compositions/CodeEditor/components/Expandable.js +37 -0
- package/dist/components/compositions/CodeEditor/index.d.ts +4 -38
- package/dist/components/compositions/CodeEditor/index.d.ts.map +1 -1
- package/dist/components/compositions/CodeEditor/index.js +6 -33
- package/dist/components/compositions/CodeEditor/styles.css.js +2 -0
- package/dist/components/compositions/CodeEditor/type.d.ts +38 -0
- package/dist/components/compositions/CodeEditor/type.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/Content.d.ts +0 -10
- package/dist/components/compositions/ContentCard/Content.d.ts.map +1 -1
- package/dist/components/compositions/ContentCard/Content.js +2 -30
- package/dist/components/compositions/ContentCard/ImageContent.d.ts +7 -0
- package/dist/components/compositions/ContentCard/ImageContent.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/ImageContent.js +23 -0
- package/dist/components/compositions/ContentCard/LinkContent.d.ts +5 -0
- package/dist/components/compositions/ContentCard/LinkContent.d.ts.map +1 -0
- package/dist/components/compositions/ContentCard/LinkContent.js +30 -0
- package/dist/components/compositions/ContentCard/index.d.ts.map +1 -1
- package/dist/components/compositions/ContentCard/index.js +5 -1
- package/dist/components/compositions/ContentCardGroup/index.d.ts.map +1 -1
- package/dist/components/compositions/Conversation/components/Date.d.ts +6 -0
- package/dist/components/compositions/Conversation/components/Date.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/components/Date.js +23 -0
- package/dist/components/compositions/Conversation/components/Message.d.ts +11 -0
- package/dist/components/compositions/Conversation/components/Message.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/components/Message.js +28 -0
- package/dist/components/compositions/Conversation/components/MessageInfos.d.ts +7 -0
- package/dist/components/compositions/Conversation/components/MessageInfos.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/components/MessageInfos.js +18 -0
- package/dist/components/compositions/Conversation/components/MessageTag.d.ts +6 -0
- package/dist/components/compositions/Conversation/components/MessageTag.d.ts.map +1 -0
- package/dist/components/compositions/Conversation/components/MessageTag.js +20 -0
- package/dist/components/compositions/Conversation/index.d.ts +7 -22
- package/dist/components/compositions/Conversation/index.d.ts.map +1 -1
- package/dist/components/compositions/Conversation/index.js +10 -41
- package/dist/components/compositions/EstimateCost/Components/Children.d.ts +3 -0
- package/dist/components/compositions/EstimateCost/Components/Children.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Children.js +52 -0
- package/dist/components/compositions/EstimateCost/Components/{ContentComponents.d.ts → Description.d.ts} +2 -8
- package/dist/components/compositions/EstimateCost/Components/Description.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Description.js +19 -0
- package/dist/components/compositions/EstimateCost/Components/Item.d.ts.map +1 -1
- package/dist/components/compositions/EstimateCost/Components/Item.js +1 -1
- package/dist/components/compositions/EstimateCost/Components/ItemLeftSide.js +1 -1
- package/dist/components/compositions/EstimateCost/Components/ItemPrice.d.ts.map +1 -1
- package/dist/components/compositions/EstimateCost/Components/LineThrough.js +2 -2
- package/dist/components/compositions/EstimateCost/Components/Title.d.ts +5 -0
- package/dist/components/compositions/EstimateCost/Components/Title.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/Title.js +23 -0
- package/dist/components/compositions/EstimateCost/Components/Total.d.ts +3 -0
- package/dist/components/compositions/EstimateCost/Components/Total.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Components/{ContentComponents.js → Total.js} +6 -54
- package/dist/components/compositions/EstimateCost/Components/Unit.js +1 -1
- package/dist/components/compositions/EstimateCost/Components/components.css.js +2 -3
- package/dist/components/compositions/EstimateCost/Ellipsis.d.ts +7 -0
- package/dist/components/compositions/EstimateCost/Ellipsis.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Ellipsis.js +37 -0
- package/dist/components/compositions/EstimateCost/EstimateCostContent.d.ts.map +1 -1
- package/dist/components/compositions/EstimateCost/EstimateCostContent.js +8 -4
- package/dist/components/compositions/EstimateCost/EstimateCostProvider.js +1 -1
- package/dist/components/compositions/EstimateCost/Image.d.ts +2 -0
- package/dist/components/compositions/EstimateCost/Image.d.ts.map +1 -0
- package/dist/components/compositions/EstimateCost/Image.js +21 -0
- package/dist/components/compositions/EstimateCost/index.d.ts +10 -11
- package/dist/components/compositions/EstimateCost/index.d.ts.map +1 -1
- package/dist/components/compositions/EstimateCost/index.js +5 -35
- package/dist/components/compositions/EstimateCost/types.d.ts +1 -1
- package/dist/components/compositions/EstimateCost/types.d.ts.map +1 -1
- package/dist/components/compositions/InfoTable/components/Cell.d.ts.map +1 -1
- package/dist/components/compositions/InfoTable/components/Cell.js +2 -1
- package/dist/components/compositions/InfoTable/components/Row.js +1 -1
- package/dist/components/compositions/InfoTable/styles.css.d.ts +1 -0
- package/dist/components/compositions/InfoTable/styles.css.d.ts.map +1 -1
- package/dist/components/compositions/InfoTable/styles.css.js +2 -3
- package/dist/components/compositions/Navigation/NavigationProvider.js +1 -1
- package/dist/components/compositions/Navigation/components/Group.js +1 -1
- package/dist/components/compositions/Navigation/components/Item/Badge.d.ts +5 -0
- package/dist/components/compositions/Navigation/components/Item/Badge.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Item/Badge.js +23 -0
- package/dist/components/compositions/Navigation/components/Item/Children.d.ts +5 -0
- package/dist/components/compositions/Navigation/components/Item/Children.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Item/Children.js +39 -0
- package/dist/components/compositions/Navigation/components/Item/Content.d.ts +3 -0
- package/dist/components/compositions/Navigation/components/Item/Content.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Item/Content.js +80 -0
- package/dist/components/compositions/Navigation/components/{Item.d.ts → Item/Item.d.ts} +2 -2
- package/dist/components/compositions/Navigation/components/Item/Item.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/{Item.js → Item/Item.js} +35 -8
- package/dist/components/compositions/Navigation/components/{ItemExpanded.d.ts → Item/ItemExpanded.d.ts} +1 -1
- package/dist/components/compositions/Navigation/components/Item/ItemExpanded.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/{ItemExpanded.js → Item/ItemExpanded.js} +16 -92
- package/dist/components/compositions/Navigation/components/Item/ItemProvider.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/{ItemProvider.js → Item/ItemProvider.js} +2 -2
- package/dist/components/compositions/Navigation/components/{ItemFragments.d.ts → Item/PinnedButton.d.ts} +2 -5
- package/dist/components/compositions/Navigation/components/Item/PinnedButton.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/{ItemFragments.js → Item/PinnedButton.js} +9 -19
- package/dist/components/compositions/Navigation/components/Menu/Menu.d.ts +3 -0
- package/dist/components/compositions/Navigation/components/Menu/Menu.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Menu/Menu.js +73 -0
- package/dist/components/compositions/Navigation/components/{ItemMenu.d.ts → Menu/MenuItem.d.ts} +2 -3
- package/dist/components/compositions/Navigation/components/Menu/MenuItem.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/{ItemMenu.js → Menu/MenuItem.js} +16 -65
- package/dist/components/compositions/Navigation/components/Menu/NestedMenu.d.ts +3 -0
- package/dist/components/compositions/Navigation/components/Menu/NestedMenu.d.ts.map +1 -0
- package/dist/components/compositions/Navigation/components/Menu/NestedMenu.js +51 -0
- package/dist/components/compositions/Navigation/components/PinnedItems.d.ts.map +1 -1
- package/dist/components/compositions/Navigation/components/PinnedItems.js +2 -2
- package/dist/components/compositions/Navigation/components/ShowHide.d.ts.map +1 -1
- package/dist/components/compositions/Navigation/index.js +1 -1
- package/dist/components/compositions/OfferList/components/Row.d.ts +1 -1
- package/dist/components/compositions/OfferList/components/Row.d.ts.map +1 -1
- package/dist/components/compositions/OfferList/components/Row.js +13 -47
- package/dist/components/compositions/OfferList/components/SelectableCell.d.ts +21 -0
- package/dist/components/compositions/OfferList/components/SelectableCell.d.ts.map +1 -0
- package/dist/components/compositions/OfferList/components/SelectableCell.js +71 -0
- package/dist/components/compositions/OfferList/index.d.ts.map +1 -1
- package/dist/components/compositions/OptionSelector/styles.css.js +178 -2
- package/dist/components/compositions/OrderSummary/ScrollableContent.d.ts.map +1 -1
- package/dist/components/compositions/OrderSummary/ScrollableContent.js +6 -221
- package/dist/components/compositions/OrderSummary/components/Category.d.ts +5 -0
- package/dist/components/compositions/OrderSummary/components/Category.d.ts.map +1 -0
- package/dist/components/compositions/OrderSummary/components/Category.js +125 -0
- package/dist/components/compositions/OrderSummary/components/SubCategory.d.ts +5 -0
- package/dist/components/compositions/OrderSummary/components/SubCategory.d.ts.map +1 -0
- package/dist/components/compositions/OrderSummary/components/SubCategory.js +104 -0
- package/dist/components/compositions/OrderSummary/components/SubCategoryPrice.d.ts +5 -0
- package/dist/components/compositions/OrderSummary/components/SubCategoryPrice.d.ts.map +1 -0
- package/dist/components/compositions/OrderSummary/components/SubCategoryPrice.js +50 -0
- package/dist/components/compositions/OrderSummary/helpers.js +1 -1
- package/dist/components/compositions/OrderSummary/index.d.ts +4 -0
- package/dist/components/compositions/OrderSummary/index.d.ts.map +1 -1
- package/dist/components/compositions/Plans/index.d.ts +3 -0
- package/dist/components/compositions/Plans/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -4
- package/dist/components/styles.js +20 -20
- package/dist/helpers/legend.d.ts +15 -15
- package/dist/helpers/nivoTheme.d.ts +15 -15
- package/dist/helpers/treeMap.d.ts +15 -15
- package/dist/index.js +9 -8
- package/dist/theme/ThemeProvider.d.ts +15 -15
- package/dist/theme/index.d.ts +42 -42
- package/dist/ui.css +1 -1
- package/package.json +12 -6
- package/dist/components/SelectInput/components/Dropdown.d.ts.map +0 -1
- package/dist/components/SelectInput/components/Dropdown.js +0 -741
- package/dist/components/SelectInput/components/DropdownOption.d.ts.map +0 -1
- package/dist/components/SelectInput/components/DropdownOption.js +0 -163
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts +0 -10
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts.map +0 -1
- package/dist/components/SelectInput/components/SelectBar.d.ts.map +0 -1
- package/dist/components/SelectInput/components/dropdown.css.d.ts.map +0 -1
- package/dist/components/SelectInput/components/dropdown.css.ts.vanilla.js +0 -8
- package/dist/components/SelectInput/components/selectBar.css.d.ts.map +0 -1
- package/dist/components/SelectInput/components/selectBar.css.ts.vanilla.js +0 -8
- package/dist/components/compositions/EstimateCost/Components/ContentComponents.d.ts.map +0 -1
- package/dist/components/compositions/Navigation/components/Item.d.ts.map +0 -1
- package/dist/components/compositions/Navigation/components/ItemExpanded.d.ts.map +0 -1
- package/dist/components/compositions/Navigation/components/ItemFragments.d.ts.map +0 -1
- package/dist/components/compositions/Navigation/components/ItemMenu.d.ts.map +0 -1
- package/dist/components/compositions/Navigation/components/ItemProvider.d.ts.map +0 -1
- /package/dist/components/SelectInput/components/{SelectBar.d.ts → SelectBar/SelectBar.d.ts} +0 -0
- /package/dist/components/SelectInput/components/{selectBar.css.d.ts → SelectBar/selectBar.css.d.ts} +0 -0
- /package/dist/components/compositions/Navigation/components/{ItemProvider.d.ts → Item/ItemProvider.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { Button, init_Button } from "../Button/index.js";
|
|
4
|
+
import { useClipboard } from "@ultraviolet/utils";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { CopyContentIcon } from "@ultraviolet/icons/CopyContentIcon";
|
|
6
|
-
import useClipboard from "react-use-clipboard";
|
|
7
7
|
import { CheckIcon } from "@ultraviolet/icons/CheckIcon";
|
|
8
8
|
|
|
9
9
|
//#region src/components/CopyButton/index.tsx
|
|
@@ -18,8 +18,9 @@ var init_CopyButton = __esmMin(() => {
|
|
|
18
18
|
className,
|
|
19
19
|
"data-testid": dataTestId,
|
|
20
20
|
onClick: () => {
|
|
21
|
-
setCopied()
|
|
22
|
-
|
|
21
|
+
setCopied().then(() => {
|
|
22
|
+
onCopy === null || onCopy === void 0 || onCopy();
|
|
23
|
+
}).catch(() => null);
|
|
23
24
|
},
|
|
24
25
|
sentiment,
|
|
25
26
|
size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarDaily.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/components/CalendarDaily.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarDaily.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/components/CalendarDaily.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,KAAK,+CA0QjB,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { Text, init_Text } from "../../Text/index.js";
|
|
|
4
4
|
import { Button, init_Button } from "../../Button/index.js";
|
|
5
5
|
import { Row, init_Row } from "../../Row/index.js";
|
|
6
6
|
import { DateInputContext, init_Context } from "../Context.js";
|
|
7
|
-
import { formatValue, getMonthFirstDay, getNextMonth, getPreviousMonth, init_helpers, isSameDay } from "../helpers.js";
|
|
7
|
+
import { formatValue, getIsInHoveredRange, getMonthFirstDay, getNextMonth, getPreviousMonth, init_helpers, isSameDay } from "../helpers.js";
|
|
8
8
|
import { dateInputStyle, init_styles_css } from "../styles.css.js";
|
|
9
9
|
import { init_constants } from "../constants.js";
|
|
10
10
|
import { useContext, useState } from "react";
|
|
@@ -62,7 +62,7 @@ var init_CalendarDaily = __esmMin(() => {
|
|
|
62
62
|
const isOutsideRange = !!(minDate && constructedDate < minDate) || !!(maxDate && constructedDate > maxDate);
|
|
63
63
|
const isSelected = value && isSameDay(constructedDate, new Date(value)) || (range === null || range === void 0 ? void 0 : range.end) && isSameDay(constructedDate, range.end) || (range === null || range === void 0 ? void 0 : range.start) && isSameDay(constructedDate, range.start);
|
|
64
64
|
const isAfterStartDate = selectsRange && (range === null || range === void 0 ? void 0 : range.start) && constructedDate > range.start;
|
|
65
|
-
const isInHoveredRange =
|
|
65
|
+
const isInHoveredRange = getIsInHoveredRange(selectsRange, constructedDate, hoveredDate, range);
|
|
66
66
|
const getNewDate = () => {
|
|
67
67
|
if (data.month !== 0 && data.day > 15) {
|
|
68
68
|
setMonthToShow(previousMonth);
|
|
@@ -125,6 +125,7 @@ var init_CalendarDaily = __esmMin(() => {
|
|
|
125
125
|
if (data.month !== 0) return "not-current";
|
|
126
126
|
return "neutral";
|
|
127
127
|
};
|
|
128
|
+
const isHightlighted = isSelected || isInHoveredRange;
|
|
128
129
|
return /* @__PURE__ */ jsx(Button, {
|
|
129
130
|
"aria-label": dayState(),
|
|
130
131
|
className: dateInputStyle.dayMonth,
|
|
@@ -145,8 +146,8 @@ var init_CalendarDaily = __esmMin(() => {
|
|
|
145
146
|
onMouseEnter: () => {
|
|
146
147
|
if (selectsRange && (range === null || range === void 0 ? void 0 : range.start)) setHoveredDate(constructedDate);
|
|
147
148
|
},
|
|
148
|
-
sentiment:
|
|
149
|
-
variant:
|
|
149
|
+
sentiment: isHightlighted ? "primary" : "neutral",
|
|
150
|
+
variant: isHightlighted ? "filled" : "ghost",
|
|
150
151
|
children: data.day
|
|
151
152
|
}, `${data.month}-${data.day}`);
|
|
152
153
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarMonthly.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/components/CalendarMonthly.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarMonthly.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/components/CalendarMonthly.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,OAAO,+CAyJnB,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
3
3
|
import { Button, init_Button } from "../../Button/index.js";
|
|
4
4
|
import { Row, init_Row } from "../../Row/index.js";
|
|
5
5
|
import { DateInputContext, init_Context } from "../Context.js";
|
|
6
|
-
import { formatValue, init_helpers, isSameMonth } from "../helpers.js";
|
|
6
|
+
import { formatValue, getIsInHoveredRange, init_helpers, isSameMonth } from "../helpers.js";
|
|
7
7
|
import { dateInputStyle, init_styles_css } from "../styles.css.js";
|
|
8
8
|
import { useContext, useState } from "react";
|
|
9
9
|
import { cn } from "@ultraviolet/utils";
|
|
@@ -28,7 +28,7 @@ var init_CalendarMonthly = __esmMin(() => {
|
|
|
28
28
|
const isExcluded = excludeDates ? excludeDates.map((date) => isSameMonth(constructedDate, date)).includes(true) : false;
|
|
29
29
|
const isOutsideRange = !!(minDate && constructedDate < minDate) || !!(maxDate && constructedDate > maxDate);
|
|
30
30
|
const isAfterStartDate = selectsRange && (range === null || range === void 0 ? void 0 : range.start) && constructedDate > range.start;
|
|
31
|
-
const isInHoveredRange =
|
|
31
|
+
const isInHoveredRange = getIsInHoveredRange(selectsRange, constructedDate, hoveredDate, range);
|
|
32
32
|
const isSelected = value && isSameMonth(constructedDate, value) || (range === null || range === void 0 ? void 0 : range.start) && isSameMonth(constructedDate, range.start) || (range === null || range === void 0 ? void 0 : range.end) && isSameMonth(constructedDate, range.end);
|
|
33
33
|
const onClickRange = (event, newDate) => {
|
|
34
34
|
if (selectsRange) if (rangeState === "end" && isAfterStartDate) {
|
|
@@ -73,6 +73,7 @@ var init_CalendarMonthly = __esmMin(() => {
|
|
|
73
73
|
if (isInHoveredRange) return "in-range";
|
|
74
74
|
return "neutral";
|
|
75
75
|
};
|
|
76
|
+
const isHightlighted = isSelected || isInHoveredRange;
|
|
76
77
|
return /* @__PURE__ */ jsx(Button, {
|
|
77
78
|
"aria-label": monthState(),
|
|
78
79
|
className: cn(dateInputStyle.dayMonth, dateInputStyle.capitalizedText),
|
|
@@ -88,8 +89,8 @@ var init_CalendarMonthly = __esmMin(() => {
|
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
onMouseEnter: () => setHoveredDate(constructedDate),
|
|
91
|
-
sentiment:
|
|
92
|
-
variant:
|
|
92
|
+
sentiment: isHightlighted ? "primary" : "neutral",
|
|
93
|
+
variant: isHightlighted ? "filled" : "ghost",
|
|
93
94
|
children: month[1]
|
|
94
95
|
}, month[0]);
|
|
95
96
|
})
|
|
@@ -8,6 +8,10 @@ export declare const formatValue: (computedValue: Date | null, computedRange: {
|
|
|
8
8
|
start: Date | null;
|
|
9
9
|
end: Date | null;
|
|
10
10
|
} | null, showMonthYearPicker: boolean, selectsRange: boolean, format?: ((value?: Date | undefined) => string | undefined) | undefined) => string | undefined;
|
|
11
|
-
export declare const createDate: (value: string, showMonthYearPicker: boolean) => Date | null;
|
|
11
|
+
export declare const createDate: (value: string, showMonthYearPicker: boolean, minDate?: Date | undefined, maxDate?: Date | undefined) => Date | null;
|
|
12
12
|
export declare const createDateRange: (value: string, showMonthYearPicker: boolean) => [Date | null, Date | null];
|
|
13
|
+
export declare const getIsInHoveredRange: (selectsRange: boolean, constructedDate: Date, hoveredDate?: Date | null | undefined, range?: {
|
|
14
|
+
start?: Date | null | undefined;
|
|
15
|
+
end: Date | null;
|
|
16
|
+
} | undefined) => boolean | null | undefined;
|
|
13
17
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/helpers.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yCAK5B,CAAA;AAED,eAAO,MAAM,OAAO,2BAAiD,CAAA;AAErE,eAAO,MAAM,gBAAgB,2CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,2CAMxB,CAAA;AAGD,eAAO,MAAM,WAAW,yCAEuB,CAAA;AAG/C,eAAO,MAAM,SAAS,yCAGyB,CAAA;AAmB/C,eAAO,MAAM,WAAW;;;6JA8BvB,CAAA;AAsBD,eAAO,MAAM,UAAU,sHAuBtB,CAAA;AAED,eAAO,MAAM,eAAe,6EAkB3B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;4CAwBE,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/DateInput/helpers.ts
|
|
4
|
-
var getMonthFirstDay, addZero, getPreviousMonth, getNextMonth, isSameMonth, isSameDay, getDateISO, formatValue, createDate, createDateRange;
|
|
4
|
+
var SPLIT_REGEX, DATE_SEPARATOR_REGEX, getMonthFirstDay, addZero, getPreviousMonth, getNextMonth, isSameMonth, isSameDay, getDateISO, formatValue, returnValidDate, createDate, createDateRange, getIsInHoveredRange;
|
|
5
5
|
var init_helpers = __esmMin(() => {
|
|
6
|
+
SPLIT_REGEX = /\D+/;
|
|
7
|
+
DATE_SEPARATOR_REGEX = /[^a-zA-Z0-9]+/;
|
|
6
8
|
getMonthFirstDay = (month, year) => {
|
|
7
9
|
const firstDay = new Date(year, month - 1, 1).getDay();
|
|
8
10
|
return firstDay === 0 ? 6 : firstDay - 1;
|
|
@@ -22,8 +24,8 @@ var init_helpers = __esmMin(() => {
|
|
|
22
24
|
if (date) {
|
|
23
25
|
if (showMonthYearPicker) return [addZero(date.getMonth() + 1), date.getFullYear()].join("/");
|
|
24
26
|
return [
|
|
25
|
-
addZero(date.getMonth() + 1),
|
|
26
27
|
addZero(date.getDate()),
|
|
28
|
+
addZero(date.getMonth() + 1),
|
|
27
29
|
date.getFullYear()
|
|
28
30
|
].join("/");
|
|
29
31
|
}
|
|
@@ -42,23 +44,30 @@ var init_helpers = __esmMin(() => {
|
|
|
42
44
|
if (computedValue && format) return format(computedValue);
|
|
43
45
|
if (computedValue) return getDateISO(showMonthYearPicker, computedValue);
|
|
44
46
|
};
|
|
45
|
-
|
|
47
|
+
returnValidDate = (computedDate, minDate, maxDate) => {
|
|
48
|
+
const isValidDate = !!computedDate.getTime();
|
|
49
|
+
const isTooSoon = isValidDate && minDate && computedDate < minDate;
|
|
50
|
+
if (isValidDate && maxDate && computedDate > maxDate) return maxDate;
|
|
51
|
+
if (isTooSoon) return minDate;
|
|
52
|
+
return isValidDate ? computedDate : null;
|
|
53
|
+
};
|
|
54
|
+
createDate = (value, showMonthYearPicker, minDate, maxDate) => {
|
|
46
55
|
if (showMonthYearPicker) {
|
|
47
|
-
const res = value.split(
|
|
56
|
+
const res = value.split(SPLIT_REGEX).map((val) => Number.parseInt(val, 10));
|
|
48
57
|
const year = Math.max(...res) < 100 ? Math.max(...res) + 2e3 : Math.max(...res);
|
|
49
58
|
const month = Math.min(...res) - 1;
|
|
50
|
-
|
|
51
|
-
return !!computedDate.getTime() ? computedDate : null;
|
|
59
|
+
return returnValidDate(new Date(year, month), minDate, maxDate);
|
|
52
60
|
}
|
|
53
|
-
const
|
|
54
|
-
return
|
|
61
|
+
const [day, month, year] = value.split(DATE_SEPARATOR_REGEX);
|
|
62
|
+
return returnValidDate(/* @__PURE__ */ new Date(`${month} ${day} ${year}`), minDate, maxDate);
|
|
55
63
|
};
|
|
56
64
|
createDateRange = (value, showMonthYearPicker) => {
|
|
57
65
|
const [startDateInput, endDateInput] = value.split(" - ").map((val) => createDate(val, showMonthYearPicker));
|
|
58
66
|
return [startDateInput instanceof Date && !Number.isNaN(startDateInput.getTime()) ? startDateInput : null, endDateInput instanceof Date && !Number.isNaN(endDateInput.getTime()) ? endDateInput : null];
|
|
59
67
|
};
|
|
68
|
+
getIsInHoveredRange = (selectsRange, constructedDate, hoveredDate, range) => selectsRange && (range === null || range === void 0 ? void 0 : range.start) && constructedDate > range.start && hoveredDate && constructedDate < hoveredDate && !range.end || selectsRange && (range === null || range === void 0 ? void 0 : range.start) && constructedDate < range.start && hoveredDate && constructedDate > hoveredDate && !range.end || (range === null || range === void 0 ? void 0 : range.start) && range.end && constructedDate < range.end && constructedDate > range.start;
|
|
60
69
|
});
|
|
61
70
|
|
|
62
71
|
//#endregion
|
|
63
72
|
init_helpers();
|
|
64
|
-
export { createDate, createDateRange, formatValue, getMonthFirstDay, getNextMonth, getPreviousMonth, init_helpers, isSameDay, isSameMonth };
|
|
73
|
+
export { createDate, createDateRange, formatValue, getIsInHoveredRange, getMonthFirstDay, getNextMonth, getPreviousMonth, init_helpers, isSameDay, isSameMonth };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAe,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEnE,KAAK,cAAc,CAAC,OAAO,SAAS,SAAS,GAAG,OAAO,GAAG,KAAK,IAAI;IACjE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,MAAM,GAAG,SAAS,CAAA;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAA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B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,SAAS,IAAI,GAC3B,CACE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,EACzC,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,KACzB,IAAI,GACT,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,8aAmVhC,CAAA"}
|
|
@@ -152,7 +152,7 @@ var init_DateInput = __esmMin(() => {
|
|
|
152
152
|
setYearToShow(computedNewRange[0].getFullYear());
|
|
153
153
|
}
|
|
154
154
|
} else {
|
|
155
|
-
const computedDate = createDate(newValue, showMonthYearPicker);
|
|
155
|
+
const computedDate = createDate(newValue, showMonthYearPicker, minDate, maxDate);
|
|
156
156
|
if (computedDate) {
|
|
157
157
|
setMonthToShow(computedDate.getMonth() + 1);
|
|
158
158
|
setYearToShow(computedDate.getFullYear());
|
|
@@ -166,7 +166,7 @@ var init_DateInput = __esmMin(() => {
|
|
|
166
166
|
const computedNewRange = createDateRange(inputValue, showMonthYearPicker);
|
|
167
167
|
onChange === null || onChange === void 0 || onChange(computedNewRange, void 0);
|
|
168
168
|
} else {
|
|
169
|
-
const computedDate = createDate(inputValue, showMonthYearPicker);
|
|
169
|
+
const computedDate = createDate(inputValue, showMonthYearPicker, minDate, maxDate);
|
|
170
170
|
onChange === null || onChange === void 0 || onChange(computedDate, void 0);
|
|
171
171
|
}
|
|
172
172
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/styles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/styles.css.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAO1B,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ExpandableProps } from './types';
|
|
2
|
+
export declare const AnimatedExpandable: ({ children, opened, minHeight, className, 'data-testid': dataTestId, style, animationDuration, }: ExpandableProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=AnimatedExpandable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedExpandable.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/AnimatedExpandable.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,kBAAkB,gKAmG9B,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { _objectSpread2, init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
|
+
import { init_constant } from "./constant.js";
|
|
4
|
+
import { animationDurationVar, expandableStyle, init_styles_css } from "./styles.css.js";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { cn } from "@ultraviolet/utils";
|
|
7
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/components/Expandable/AnimatedExpandable.tsx
|
|
11
|
+
var AnimatedExpandable;
|
|
12
|
+
var init_AnimatedExpandable = __esmMin(() => {
|
|
13
|
+
init_constant();
|
|
14
|
+
init_styles_css();
|
|
15
|
+
init_objectSpread2();
|
|
16
|
+
AnimatedExpandable = ({ children, opened, minHeight = 0, className, "data-testid": dataTestId, style, animationDuration = 300 }) => {
|
|
17
|
+
var _ref$current;
|
|
18
|
+
const [height, setHeight] = useState(null);
|
|
19
|
+
const transitionTimer = useRef(null);
|
|
20
|
+
const ref = useRef(null);
|
|
21
|
+
const shouldBeAnimated = animationDuration > 0;
|
|
22
|
+
const isFirstRender = useRef(true);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
if (isFirstRender.current) isFirstRender.current = false;
|
|
26
|
+
}, 0);
|
|
27
|
+
}, []);
|
|
28
|
+
/**
|
|
29
|
+
* At mount, we set the height variable to the height of the content only if the component is closed.
|
|
30
|
+
* This is to ensure we don't have animation when the component is opened at mount.
|
|
31
|
+
*/
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (ref.current) {
|
|
34
|
+
var _ref$current$scrollHe;
|
|
35
|
+
setHeight((_ref$current$scrollHe = ref.current.scrollHeight) !== null && _ref$current$scrollHe !== void 0 ? _ref$current$scrollHe : 0);
|
|
36
|
+
}
|
|
37
|
+
}, [(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.scrollHeight]);
|
|
38
|
+
/**
|
|
39
|
+
* Here we set maxHeight to the height of the content when the component is opened
|
|
40
|
+
* and after 300ms we set maxHeight to initial to let the content grow with animation.
|
|
41
|
+
* Setting it to initial is required to be able to have nested expandable or the height won't follow.
|
|
42
|
+
*/
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (isFirstRender.current && !opened && ref.current) {
|
|
45
|
+
ref.current.style.maxHeight = `${minHeight !== null && minHeight !== void 0 ? minHeight : 0}px`;
|
|
46
|
+
ref.current.style.overflow = "hidden";
|
|
47
|
+
} else if (opened && ref.current && height) {
|
|
48
|
+
ref.current.style.maxHeight = `${height}px`;
|
|
49
|
+
ref.current.style.visibility = "";
|
|
50
|
+
transitionTimer.current = setTimeout(() => {
|
|
51
|
+
if (ref.current) {
|
|
52
|
+
ref.current.style.maxHeight = "initial";
|
|
53
|
+
ref.current.style.overflow = "visible";
|
|
54
|
+
ref.current.style.visibility = "";
|
|
55
|
+
}
|
|
56
|
+
}, 300);
|
|
57
|
+
} else {
|
|
58
|
+
if (transitionTimer === null || transitionTimer === void 0 ? void 0 : transitionTimer.current) clearTimeout(transitionTimer.current);
|
|
59
|
+
if (ref.current && height) {
|
|
60
|
+
ref.current.style.maxHeight = `${height}px`;
|
|
61
|
+
transitionTimer.current = setTimeout(() => {
|
|
62
|
+
if (ref.current) {
|
|
63
|
+
ref.current.style.maxHeight = `${minHeight}px`;
|
|
64
|
+
ref.current.style.overflow = "hidden";
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
if (ref.current && !minHeight) ref.current.style.visibility = "hidden";
|
|
67
|
+
}, 300);
|
|
68
|
+
}
|
|
69
|
+
}, 0);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return () => {
|
|
73
|
+
if (transitionTimer === null || transitionTimer === void 0 ? void 0 : transitionTimer.current) clearTimeout(transitionTimer.current);
|
|
74
|
+
};
|
|
75
|
+
}, [
|
|
76
|
+
animationDuration,
|
|
77
|
+
height,
|
|
78
|
+
minHeight,
|
|
79
|
+
opened,
|
|
80
|
+
shouldBeAnimated
|
|
81
|
+
]);
|
|
82
|
+
return /* @__PURE__ */ jsx("div", {
|
|
83
|
+
className: cn(className, expandableStyle.expandable),
|
|
84
|
+
"data-is-animated": shouldBeAnimated && !isFirstRender.current,
|
|
85
|
+
"data-testid": dataTestId,
|
|
86
|
+
ref,
|
|
87
|
+
style: _objectSpread2(_objectSpread2({}, assignInlineVars({ [animationDurationVar]: `${animationDuration}ms` })), style),
|
|
88
|
+
children
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
init_AnimatedExpandable();
|
|
95
|
+
export { AnimatedExpandable, init_AnimatedExpandable };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ExpandableProps } from './types';
|
|
2
|
+
export declare const NoAnimationExpandable: ({ children, opened, minHeight, className, 'data-testid': dataTestId, style, }: ExpandableProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=NonAnimatedExpandable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NonAnimatedExpandable.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/NonAnimatedExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,qBAAqB,6IAejC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { _objectSpread2, init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Expandable/NonAnimatedExpandable.tsx
|
|
6
|
+
var NoAnimationExpandable;
|
|
7
|
+
var init_NonAnimatedExpandable = __esmMin(() => {
|
|
8
|
+
init_objectSpread2();
|
|
9
|
+
NoAnimationExpandable = ({ children, opened, minHeight, className, "data-testid": dataTestId, style }) => /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className,
|
|
11
|
+
"data-testid": dataTestId,
|
|
12
|
+
style: _objectSpread2({
|
|
13
|
+
display: opened ? void 0 : "none",
|
|
14
|
+
minHeight
|
|
15
|
+
}, style),
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
init_NonAnimatedExpandable();
|
|
22
|
+
export { NoAnimationExpandable, init_NonAnimatedExpandable };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,MAAM,CAAA"}
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type ExpandableProps = {
|
|
3
|
-
/**
|
|
4
|
-
* The content to display
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* To display or not the content
|
|
9
|
-
*/
|
|
10
|
-
opened?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The minimum height of the content
|
|
13
|
-
*/
|
|
14
|
-
minHeight?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
'data-testid'?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The duration of the animation in ms. If set to 0, the animation will be disabled.
|
|
19
|
-
*/
|
|
20
|
-
animationDuration?: number;
|
|
21
|
-
style?: CSSProperties;
|
|
22
|
-
};
|
|
23
|
-
export declare const AnimatedExpandable: ({ children, opened, minHeight, className, 'data-testid': dataTestId, style, animationDuration, }: ExpandableProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { ExpandableProps } from './types';
|
|
24
2
|
/**
|
|
25
3
|
* The Expandable component is a dynamic React component that allows for the expansion of its children content
|
|
26
4
|
* based on its height. The component comes with a sleek and smooth animation, providing a visually pleasing
|
|
27
5
|
* user experience.
|
|
28
6
|
*/
|
|
29
7
|
export declare const Expandable: ({ children, opened, minHeight, className, 'data-testid': dataTestId, animationDuration, style, }: ExpandableProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export {};
|
|
31
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,UAAU,gKAmCtB,CAAA"}
|
|
@@ -1,103 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { cn } from "@ultraviolet/utils";
|
|
7
|
-
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
3
|
+
import { init_constant } from "./constant.js";
|
|
4
|
+
import { AnimatedExpandable, init_AnimatedExpandable } from "./AnimatedExpandable.js";
|
|
5
|
+
import { NoAnimationExpandable, init_NonAnimatedExpandable } from "./NonAnimatedExpandable.js";
|
|
8
6
|
import { jsx } from "react/jsx-runtime";
|
|
9
7
|
|
|
10
8
|
//#region src/components/Expandable/index.tsx
|
|
11
|
-
var
|
|
9
|
+
var Expandable;
|
|
12
10
|
var init_Expandable = __esmMin(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
className,
|
|
18
|
-
"data-testid": dataTestId,
|
|
19
|
-
style: _objectSpread2({
|
|
20
|
-
display: opened ? void 0 : "none",
|
|
21
|
-
minHeight
|
|
22
|
-
}, style),
|
|
23
|
-
children
|
|
24
|
-
});
|
|
25
|
-
AnimatedExpandable = ({ children, opened, minHeight = 0, className, "data-testid": dataTestId, style, animationDuration = ANIMATION_DURATION }) => {
|
|
26
|
-
var _ref$current;
|
|
27
|
-
const [height, setHeight] = useState(null);
|
|
28
|
-
const transitionTimer = useRef(null);
|
|
29
|
-
const ref = useRef(null);
|
|
30
|
-
const shouldBeAnimated = animationDuration > 0;
|
|
31
|
-
const isFirstRender = useRef(true);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
if (isFirstRender.current) isFirstRender.current = false;
|
|
35
|
-
}, 0);
|
|
36
|
-
}, []);
|
|
37
|
-
/**
|
|
38
|
-
* At mount, we set the height variable to the height of the content only if the component is closed.
|
|
39
|
-
* This is to ensure we don't have animation when the component is opened at mount.
|
|
40
|
-
*/
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (ref.current) {
|
|
43
|
-
var _ref$current$scrollHe;
|
|
44
|
-
setHeight((_ref$current$scrollHe = ref.current.scrollHeight) !== null && _ref$current$scrollHe !== void 0 ? _ref$current$scrollHe : 0);
|
|
45
|
-
}
|
|
46
|
-
}, [(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.scrollHeight]);
|
|
47
|
-
/**
|
|
48
|
-
* Here we set maxHeight to the height of the content when the component is opened
|
|
49
|
-
* and after 300ms we set maxHeight to initial to let the content grow with animation.
|
|
50
|
-
* Setting it to initial is required to be able to have nested expandable or the height won't follow.
|
|
51
|
-
*/
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (isFirstRender.current && !opened && ref.current) {
|
|
54
|
-
ref.current.style.maxHeight = `${minHeight !== null && minHeight !== void 0 ? minHeight : 0}px`;
|
|
55
|
-
ref.current.style.overflow = "hidden";
|
|
56
|
-
} else if (opened && ref.current && height) {
|
|
57
|
-
ref.current.style.maxHeight = `${height}px`;
|
|
58
|
-
ref.current.style.visibility = "";
|
|
59
|
-
transitionTimer.current = setTimeout(() => {
|
|
60
|
-
if (ref.current) {
|
|
61
|
-
ref.current.style.maxHeight = "initial";
|
|
62
|
-
ref.current.style.overflow = "visible";
|
|
63
|
-
ref.current.style.visibility = "";
|
|
64
|
-
}
|
|
65
|
-
}, ANIMATION_DURATION);
|
|
66
|
-
} else {
|
|
67
|
-
if (transitionTimer === null || transitionTimer === void 0 ? void 0 : transitionTimer.current) clearTimeout(transitionTimer.current);
|
|
68
|
-
if (ref.current && height) {
|
|
69
|
-
ref.current.style.maxHeight = `${height}px`;
|
|
70
|
-
transitionTimer.current = setTimeout(() => {
|
|
71
|
-
if (ref.current) {
|
|
72
|
-
ref.current.style.maxHeight = `${minHeight}px`;
|
|
73
|
-
ref.current.style.overflow = "hidden";
|
|
74
|
-
setTimeout(() => {
|
|
75
|
-
if (ref.current && !minHeight) ref.current.style.visibility = "hidden";
|
|
76
|
-
}, ANIMATION_DURATION);
|
|
77
|
-
}
|
|
78
|
-
}, 0);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return () => {
|
|
82
|
-
if (transitionTimer === null || transitionTimer === void 0 ? void 0 : transitionTimer.current) clearTimeout(transitionTimer.current);
|
|
83
|
-
};
|
|
84
|
-
}, [
|
|
85
|
-
animationDuration,
|
|
86
|
-
height,
|
|
87
|
-
minHeight,
|
|
88
|
-
opened,
|
|
89
|
-
shouldBeAnimated
|
|
90
|
-
]);
|
|
91
|
-
return /* @__PURE__ */ jsx("div", {
|
|
92
|
-
className: cn(className, expandableStyle.expandable),
|
|
93
|
-
"data-is-animated": shouldBeAnimated && !isFirstRender.current,
|
|
94
|
-
"data-testid": dataTestId,
|
|
95
|
-
ref,
|
|
96
|
-
style: _objectSpread2(_objectSpread2({}, assignInlineVars({ [animationDurationVar]: `${animationDuration}ms` })), style),
|
|
97
|
-
children
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
Expandable = ({ children, opened, minHeight, className, "data-testid": dataTestId, animationDuration = ANIMATION_DURATION, style }) => {
|
|
11
|
+
init_AnimatedExpandable();
|
|
12
|
+
init_constant();
|
|
13
|
+
init_NonAnimatedExpandable();
|
|
14
|
+
Expandable = ({ children, opened, minHeight, className, "data-testid": dataTestId, animationDuration = 300, style }) => {
|
|
101
15
|
if (animationDuration > 0) return /* @__PURE__ */ jsx(AnimatedExpandable, {
|
|
102
16
|
animationDuration,
|
|
103
17
|
className,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type ExpandableProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The content to display
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* To display or not the content
|
|
9
|
+
*/
|
|
10
|
+
opened?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The minimum height of the content
|
|
13
|
+
*/
|
|
14
|
+
minHeight?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The duration of the animation in ms. If set to 0, the animation will be disabled.
|
|
19
|
+
*/
|
|
20
|
+
animationDuration?: number;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Expandable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableCard/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EAGrB,aAAa,EACb,SAAS,EACV,MAAM,OAAO,CAAA;AAGd,KAAK,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE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all, inputId, title, inputRef, }: {
|
|
3
|
+
disabled?: boolean | undefined;
|
|
4
|
+
isSmall: boolean;
|
|
5
|
+
inputId: string;
|
|
6
|
+
title: string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | ((inputId: string, inputRef: RefObject<HTMLInputElement | null>) => import("react").ReactNode) | null | undefined;
|
|
7
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=DropzoneContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropzoneContent.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput/DropzoneContent.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,eAAO,MAAM,eAAe;;;;;;6CAmC3B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Text, init_Text } from "../Text/index.js";
|
|
3
|
+
import { fileInputStyle, init_styles_css } from "./styles.css.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { UploadIcon } from "@ultraviolet/icons/UploadIcon";
|
|
6
|
+
|
|
7
|
+
//#region src/components/FileInput/DropzoneContent.tsx
|
|
8
|
+
var DropzoneContent;
|
|
9
|
+
var init_DropzoneContent = __esmMin(() => {
|
|
10
|
+
init_Text();
|
|
11
|
+
init_styles_css();
|
|
12
|
+
DropzoneContent = ({ disabled, isSmall, inputId, title, inputRef }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(UploadIcon, {
|
|
13
|
+
disabled,
|
|
14
|
+
sentiment: isSmall ? "neutral" : "primary",
|
|
15
|
+
size: isSmall ? "small" : "xlarge"
|
|
16
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
17
|
+
as: isSmall ? "label" : "div",
|
|
18
|
+
className: isSmall ? fileInputStyle.titleSmall[disabled ? "disabled" : "default"] : void 0,
|
|
19
|
+
disabled,
|
|
20
|
+
htmlFor: inputId,
|
|
21
|
+
placement: "left",
|
|
22
|
+
sentiment: "neutral",
|
|
23
|
+
variant: isSmall ? "bodySmallStrong" : "headingSmallStrong",
|
|
24
|
+
children: typeof title === "function" ? title(inputId, inputRef) : title
|
|
25
|
+
})] });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
init_DropzoneContent();
|
|
30
|
+
export { DropzoneContent, init_DropzoneContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { _objectSpread2, init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import { _objectWithoutProperties, init_objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { _objectSpread2, init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
|
+
import { _objectWithoutProperties, init_objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
4
4
|
import { Button, init_Button as init_Button$1 } from "../../Button/index.js";
|
|
5
5
|
import { init_FileInputProvider, useFileInput } from "../FileInputProvider.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput/components/List.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput/components/List.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,UAAU,CAAA;AA2DnD,eAAO,MAAM,SAAS,kGA6FrB,CAAA"}
|