@onesy/ui-react 1.0.172 → 1.0.174
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/Accordion/Accordion.js +93 -74
- package/AdvancedTextField/AdvancedTextField.js +7 -6
- package/Append/Append.js +24 -19
- package/AreaChart/AreaChart.js +15 -17
- package/AreaChartItem/AreaChartItem.js +63 -58
- package/AudioPlayer/AudioPlayer.js +180 -148
- package/AudioRecorder/AudioRecorder.js +104 -59
- package/AutoComplete/AutoComplete.js +135 -125
- package/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/Avatar/Avatar.js +11 -8
- package/AvatarGroup/AvatarGroup.js +21 -20
- package/Backdrop/Backdrop.js +30 -21
- package/Badge/Badge.js +18 -17
- package/Banner/Banner.js +15 -12
- package/BottomAppBar/BottomAppBar.js +14 -14
- package/BottomSheet/BottomSheet.js +9 -11
- package/Box/Box.js +12 -12
- package/Breadcrumbs/Breadcrumbs.js +38 -34
- package/BubbleChart/BubbleChart.js +159 -134
- package/BubbleChartItem/BubbleChartItem.js +48 -43
- package/Button/Button.js +46 -39
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +34 -28
- package/Calendar/Calendar.js +357 -315
- package/CalendarAvailability/CalendarAvailability.js +351 -298
- package/CalendarMenu/CalendarMenu.js +93 -79
- package/CalendarMonth/CalendarMonth.js +113 -102
- package/CalendarViews/CalendarViews.js +138 -115
- package/CalendarWeek/CalendarWeek.js +180 -158
- package/Card/Card.js +16 -15
- package/CardButton/CardButton.js +11 -10
- package/CardFooter/CardFooter.js +12 -12
- package/CardHeader/CardHeader.js +13 -13
- package/CardImage/CardImage.js +10 -12
- package/CardMain/CardMain.js +12 -12
- package/Carousel/Carousel.js +140 -124
- package/Chart/Chart.js +438 -393
- package/Checkbox/Checkbox.js +46 -43
- package/Chip/Chip.js +12 -11
- package/Chips/Chips.js +20 -20
- package/ClickListener/ClickListener.js +19 -15
- package/Clock/Clock.js +38 -36
- package/ColorTextField/ColorTextField.js +33 -27
- package/ColumnChart/ColumnChart.js +16 -17
- package/ColumnChartItem/ColumnChartItem.js +35 -31
- package/Confirm/Confirm.js +51 -35
- package/Container/Container.js +9 -6
- package/CookieBanner/CookieBanner.js +55 -41
- package/Countdown/Countdown.js +163 -123
- package/DatePicker/DatePicker.js +236 -197
- package/DateRangePicker/DateRangePicker.js +9 -11
- package/DateTimePicker/DateTimePicker.js +127 -103
- package/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/Divider/Divider.js +25 -21
- package/DonutChart/DonutChart.js +9 -11
- package/DragAndDropList/DragAndDropList.js +8 -4
- package/Drawing/Drawing.js +369 -312
- package/DropZone/DropZone.js +20 -15
- package/Emojis/Emojis.js +95 -85
- package/Expand/Expand.js +78 -70
- package/Fab/Fab.js +4 -6
- package/Fade/Fade.js +64 -58
- package/FileChoose/FileChoose.js +69 -60
- package/Focus/Focus.js +19 -16
- package/Form/Form.js +69 -57
- package/FormRow/FormRow.js +49 -38
- package/Forms/Forms.js +13 -13
- package/Frame/Frame.js +62 -54
- package/Grid/Grid.js +15 -12
- package/Grow/Grow.js +60 -52
- package/HTMLCanvas/HTMLCanvas.js +88 -74
- package/IFrame/IFrame.js +33 -27
- package/Icon/Icon.js +14 -14
- package/IconButton/IconButton.js +12 -14
- package/Image/Image.js +19 -15
- package/ImageCrop/ImageCrop.js +96 -87
- package/ImageEdit/ImageEdit.js +355 -290
- package/ImageGallery/ImageGallery.js +104 -86
- package/ImageList/ImageList.js +16 -11
- package/ImageListItem/ImageListItem.js +9 -6
- package/ImageListItemBox/ImageListItemBox.js +12 -12
- package/Info/Info.js +38 -27
- package/Interaction/Interaction.js +57 -68
- package/Keyframes/Keyframes.js +11 -9
- package/Label/Label.js +59 -50
- package/Labels/Labels.js +30 -26
- package/Line/Line.js +10 -7
- package/LineChart/LineChart.js +16 -17
- package/LineChartItem/LineChartItem.js +30 -26
- package/LinearMeter/LinearMeter.js +92 -87
- package/LinearProgress/LinearProgress.js +27 -22
- package/Link/Link.js +7 -8
- package/Links/Links.js +128 -118
- package/List/List.js +23 -21
- package/ListItem/ListItem.js +68 -58
- package/ListSubheader/ListSubheader.js +9 -11
- package/MainProgress/MainProgress.js +14 -12
- package/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/Markdown/Markdown.js +6 -5
- package/Masonry/Masonry.js +26 -22
- package/Medias/Medias.js +95 -93
- package/Menu/Menu.js +51 -45
- package/MenuDesktop/MenuDesktop.js +141 -130
- package/MenuItem/MenuItem.js +75 -64
- package/Meta/Meta.js +21 -19
- package/Modal/Modal.js +52 -39
- package/ModalFooter/ModalFooter.js +12 -12
- package/ModalHeader/ModalHeader.js +12 -12
- package/ModalIcon/ModalIcon.js +55 -13
- package/ModalMain/ModalMain.js +12 -12
- package/ModalText/ModalText.js +12 -12
- package/ModalTitle/ModalTitle.js +12 -12
- package/MoreOptions/MoreOptions.js +14 -12
- package/Move/Move.js +9 -6
- package/NavigationBar/NavigationBar.js +7 -6
- package/NavigationDrawer/NavigationDrawer.js +7 -6
- package/NavigationItem/NavigationItem.js +58 -48
- package/NavigationRail/NavigationRail.js +25 -22
- package/NotFound/NotFound.js +21 -18
- package/NumericTextField/NumericTextField.js +14 -9
- package/Page/Page.js +50 -38
- package/PageTransition/PageTransition.js +8 -7
- package/Pagination/Pagination.js +41 -31
- package/PaginationItem/PaginationItem.js +20 -18
- package/Parallax/Parallax.js +4 -3
- package/Path/Path.js +9 -11
- package/PieChart/PieChart.js +96 -79
- package/Placeholder/Placeholder.js +15 -12
- package/Portal/Portal.js +41 -18
- package/Properties/Properties.js +17 -18
- package/Property/Property.js +24 -17
- package/Radio/Radio.js +25 -21
- package/Radios/Radios.js +30 -26
- package/Rating/Rating.js +36 -31
- package/Reset/Reset.js +4 -1
- package/Reveal/Reveal.js +17 -13
- package/RichTextEditor/RichTextEditor.js +1011 -824
- package/RoundMeter/RoundMeter.js +98 -93
- package/RoundProgress/RoundProgress.js +36 -32
- package/ScatterChart/ScatterChart.js +15 -17
- package/ScatterChartItem/ScatterChartItem.js +36 -34
- package/ScreenCapture/ScreenCapture.js +57 -43
- package/Section/Section.js +66 -56
- package/SectionAction/SectionAction.js +17 -13
- package/SectionBoxes/SectionBoxes.js +75 -67
- package/SectionCards/SectionCards.js +86 -76
- package/SectionCarousel/SectionCarousel.js +72 -65
- package/SectionContact/SectionContact.js +65 -58
- package/SectionImageGallery/SectionImageGallery.js +13 -10
- package/SectionLogos/SectionLogos.js +34 -30
- package/SectionMedia/SectionMedia.js +41 -34
- package/SectionReviews/SectionReviews.js +76 -67
- package/SectionTextMedia/SectionTextMedia.js +64 -57
- package/SectionTimeline/SectionTimeline.js +46 -43
- package/SectionWatch/SectionWatch.js +12 -9
- package/Select/Select.js +163 -151
- package/Share/Share.js +165 -151
- package/Slide/Slide.js +29 -26
- package/Slider/Slider.js +87 -81
- package/SmartTextField/SmartTextField.js +453 -361
- package/Snackbar/Snackbar.js +48 -38
- package/Snackbars/Snackbars.js +43 -40
- package/Space/Space.js +731 -630
- package/SpeechToText/SpeechToText.js +20 -14
- package/SpeedDial/SpeedDial.js +84 -65
- package/SpeedDialItem/SpeedDialItem.js +22 -19
- package/SpyScroll/SpyScroll.js +16 -12
- package/Step/Step.js +29 -27
- package/Stepper/Stepper.js +42 -41
- package/Surface/Surface.js +7 -7
- package/Switch/Switch.js +49 -41
- package/Tab/Tab.js +40 -35
- package/Table/Table.js +19 -16
- package/TableBody/TableBody.js +14 -14
- package/TableCell/TableCell.js +37 -30
- package/TableFooter/TableFooter.js +13 -13
- package/TableHead/TableHead.js +25 -21
- package/TableHeader/TableHeader.js +14 -14
- package/TablePagination/TablePagination.js +67 -49
- package/TableRow/TableRow.js +14 -14
- package/Tabs/Tabs.js +55 -49
- package/Text/Text.js +17 -13
- package/TextField/TextField.js +135 -111
- package/TextToSpeech/TextToSpeech.js +20 -14
- package/TimePicker/TimePicker.js +196 -160
- package/TimeRangePicker/TimeRangePicker.js +9 -11
- package/Timeline/Timeline.js +13 -13
- package/TimelineItem/TimelineItem.js +29 -24
- package/Timer/Timer.js +137 -94
- package/ToggleButton/ToggleButton.js +10 -12
- package/ToggleButtons/ToggleButtons.js +9 -11
- package/Tooltip/Tooltip.js +63 -54
- package/TopAppBar/TopAppBar.js +32 -25
- package/Transition/Transition.js +11 -9
- package/Tree/Tree.js +73 -61
- package/Type/Type.js +7 -6
- package/VideoPlayer/VideoPlayer.js +207 -170
- package/ViewSplit/ViewSplit.js +49 -40
- package/Watch/Watch.js +204 -187
- package/Weather/Weather.js +58 -49
- package/Whiteboard/Whiteboard.js +28 -24
- package/Widgets/Widgets.js +60 -54
- package/WindowSplit/WindowSplit.js +59 -52
- package/Zoom/Zoom.js +60 -52
- package/esm/Accordion/Accordion.js +93 -74
- package/esm/AdvancedTextField/AdvancedTextField.js +7 -6
- package/esm/Append/Append.js +24 -19
- package/esm/AreaChart/AreaChart.js +15 -17
- package/esm/AreaChartItem/AreaChartItem.js +63 -58
- package/esm/AudioPlayer/AudioPlayer.js +180 -148
- package/esm/AudioRecorder/AudioRecorder.js +104 -59
- package/esm/AutoComplete/AutoComplete.js +135 -125
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/esm/Avatar/Avatar.js +11 -8
- package/esm/AvatarGroup/AvatarGroup.js +18 -17
- package/esm/Backdrop/Backdrop.js +30 -21
- package/esm/Badge/Badge.js +18 -17
- package/esm/Banner/Banner.js +15 -12
- package/esm/BottomAppBar/BottomAppBar.js +14 -14
- package/esm/BottomSheet/BottomSheet.js +9 -11
- package/esm/Box/Box.js +12 -12
- package/esm/Breadcrumbs/Breadcrumbs.js +37 -33
- package/esm/BubbleChart/BubbleChart.js +159 -134
- package/esm/BubbleChartItem/BubbleChartItem.js +48 -43
- package/esm/Button/Button.js +45 -38
- package/esm/Buttons/Buttons.js +33 -28
- package/esm/Calendar/Calendar.js +357 -315
- package/esm/CalendarAvailability/CalendarAvailability.js +348 -295
- package/esm/CalendarMenu/CalendarMenu.js +93 -79
- package/esm/CalendarMonth/CalendarMonth.js +113 -102
- package/esm/CalendarViews/CalendarViews.js +138 -115
- package/esm/CalendarWeek/CalendarWeek.js +177 -155
- package/esm/Card/Card.js +16 -15
- package/esm/CardButton/CardButton.js +11 -10
- package/esm/CardFooter/CardFooter.js +12 -12
- package/esm/CardHeader/CardHeader.js +13 -13
- package/esm/CardImage/CardImage.js +10 -12
- package/esm/CardMain/CardMain.js +12 -12
- package/esm/Carousel/Carousel.js +140 -124
- package/esm/Chart/Chart.js +433 -388
- package/esm/Checkbox/Checkbox.js +46 -43
- package/esm/Chip/Chip.js +12 -11
- package/esm/Chips/Chips.js +20 -20
- package/esm/ClickListener/ClickListener.js +19 -15
- package/esm/Clock/Clock.js +38 -36
- package/esm/ColorTextField/ColorTextField.js +33 -27
- package/esm/ColumnChart/ColumnChart.js +16 -17
- package/esm/ColumnChartItem/ColumnChartItem.js +35 -31
- package/esm/Confirm/Confirm.js +51 -35
- package/esm/Container/Container.js +9 -6
- package/esm/CookieBanner/CookieBanner.js +55 -41
- package/esm/Countdown/Countdown.js +163 -123
- package/esm/DatePicker/DatePicker.js +236 -197
- package/esm/DateRangePicker/DateRangePicker.js +9 -11
- package/esm/DateTimePicker/DateTimePicker.js +127 -103
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/esm/Divider/Divider.js +25 -21
- package/esm/DonutChart/DonutChart.js +9 -11
- package/esm/DragAndDropList/DragAndDropList.js +8 -4
- package/esm/Drawing/Drawing.js +368 -311
- package/esm/DropZone/DropZone.js +20 -15
- package/esm/Emojis/Emojis.js +95 -85
- package/esm/Expand/Expand.js +77 -69
- package/esm/Fab/Fab.js +4 -6
- package/esm/Fade/Fade.js +64 -58
- package/esm/FileChoose/FileChoose.js +69 -60
- package/esm/Focus/Focus.js +19 -16
- package/esm/Form/Form.js +69 -57
- package/esm/FormRow/FormRow.js +49 -38
- package/esm/Forms/Forms.js +13 -13
- package/esm/Frame/Frame.js +62 -54
- package/esm/Grid/Grid.js +13 -10
- package/esm/Grow/Grow.js +60 -52
- package/esm/HTMLCanvas/HTMLCanvas.js +88 -74
- package/esm/IFrame/IFrame.js +33 -27
- package/esm/Icon/Icon.js +14 -14
- package/esm/IconButton/IconButton.js +12 -14
- package/esm/Image/Image.js +19 -15
- package/esm/ImageCrop/ImageCrop.js +96 -87
- package/esm/ImageEdit/ImageEdit.js +355 -290
- package/esm/ImageGallery/ImageGallery.js +104 -86
- package/esm/ImageList/ImageList.js +16 -11
- package/esm/ImageListItem/ImageListItem.js +9 -6
- package/esm/ImageListItemBox/ImageListItemBox.js +12 -12
- package/esm/Info/Info.js +38 -27
- package/esm/Interaction/Interaction.js +57 -68
- package/esm/Keyframes/Keyframes.js +11 -9
- package/esm/Label/Label.js +59 -50
- package/esm/Labels/Labels.js +30 -26
- package/esm/Line/Line.js +10 -7
- package/esm/LineChart/LineChart.js +16 -17
- package/esm/LineChartItem/LineChartItem.js +30 -26
- package/esm/LinearMeter/LinearMeter.js +92 -87
- package/esm/LinearProgress/LinearProgress.js +27 -22
- package/esm/Link/Link.js +7 -8
- package/esm/Links/Links.js +125 -115
- package/esm/List/List.js +23 -21
- package/esm/ListItem/ListItem.js +68 -58
- package/esm/ListSubheader/ListSubheader.js +9 -11
- package/esm/MainProgress/MainProgress.js +14 -12
- package/esm/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/esm/Markdown/Markdown.js +6 -5
- package/esm/Masonry/Masonry.js +26 -22
- package/esm/Medias/Medias.js +95 -93
- package/esm/Menu/Menu.js +51 -45
- package/esm/MenuDesktop/MenuDesktop.js +139 -128
- package/esm/MenuItem/MenuItem.js +75 -64
- package/esm/Meta/Meta.js +21 -19
- package/esm/Modal/Modal.js +52 -39
- package/esm/ModalFooter/ModalFooter.js +12 -12
- package/esm/ModalHeader/ModalHeader.js +12 -12
- package/esm/ModalIcon/ModalIcon.js +55 -13
- package/esm/ModalMain/ModalMain.js +12 -12
- package/esm/ModalText/ModalText.js +12 -12
- package/esm/ModalTitle/ModalTitle.js +12 -12
- package/esm/MoreOptions/MoreOptions.js +14 -12
- package/esm/Move/Move.js +9 -6
- package/esm/NavigationBar/NavigationBar.js +7 -6
- package/esm/NavigationDrawer/NavigationDrawer.js +7 -6
- package/esm/NavigationItem/NavigationItem.js +58 -48
- package/esm/NavigationRail/NavigationRail.js +25 -22
- package/esm/NotFound/NotFound.js +21 -18
- package/esm/NumericTextField/NumericTextField.js +14 -9
- package/esm/Page/Page.js +50 -38
- package/esm/PageTransition/PageTransition.js +8 -7
- package/esm/Pagination/Pagination.js +41 -31
- package/esm/PaginationItem/PaginationItem.js +20 -18
- package/esm/Parallax/Parallax.js +4 -3
- package/esm/Path/Path.js +9 -11
- package/esm/PieChart/PieChart.js +96 -79
- package/esm/Placeholder/Placeholder.js +15 -12
- package/esm/Portal/Portal.js +41 -18
- package/esm/Properties/Properties.js +17 -18
- package/esm/Property/Property.js +24 -17
- package/esm/Radio/Radio.js +25 -21
- package/esm/Radios/Radios.js +30 -26
- package/esm/Rating/Rating.js +35 -30
- package/esm/Reset/Reset.js +4 -1
- package/esm/Reveal/Reveal.js +17 -13
- package/esm/RichTextEditor/RichTextEditor.js +1011 -824
- package/esm/RoundMeter/RoundMeter.js +98 -93
- package/esm/RoundProgress/RoundProgress.js +36 -32
- package/esm/ScatterChart/ScatterChart.js +15 -17
- package/esm/ScatterChartItem/ScatterChartItem.js +36 -34
- package/esm/ScreenCapture/ScreenCapture.js +57 -43
- package/esm/Section/Section.js +66 -56
- package/esm/SectionAction/SectionAction.js +17 -13
- package/esm/SectionBoxes/SectionBoxes.js +75 -67
- package/esm/SectionCards/SectionCards.js +86 -76
- package/esm/SectionCarousel/SectionCarousel.js +72 -65
- package/esm/SectionContact/SectionContact.js +65 -58
- package/esm/SectionImageGallery/SectionImageGallery.js +13 -10
- package/esm/SectionLogos/SectionLogos.js +34 -30
- package/esm/SectionMedia/SectionMedia.js +41 -34
- package/esm/SectionReviews/SectionReviews.js +74 -65
- package/esm/SectionTextMedia/SectionTextMedia.js +64 -57
- package/esm/SectionTimeline/SectionTimeline.js +46 -43
- package/esm/SectionWatch/SectionWatch.js +12 -9
- package/esm/Select/Select.js +161 -149
- package/esm/Share/Share.js +165 -151
- package/esm/Slide/Slide.js +28 -25
- package/esm/Slider/Slider.js +86 -80
- package/esm/SmartTextField/SmartTextField.js +450 -358
- package/esm/Snackbar/Snackbar.js +48 -38
- package/esm/Snackbars/Snackbars.js +40 -37
- package/esm/Space/Space.js +731 -630
- package/esm/SpeechToText/SpeechToText.js +20 -14
- package/esm/SpeedDial/SpeedDial.js +84 -65
- package/esm/SpeedDialItem/SpeedDialItem.js +22 -19
- package/esm/SpyScroll/SpyScroll.js +16 -12
- package/esm/Step/Step.js +29 -27
- package/esm/Stepper/Stepper.js +42 -41
- package/esm/Surface/Surface.js +7 -7
- package/esm/Switch/Switch.js +49 -41
- package/esm/Tab/Tab.js +40 -35
- package/esm/Table/Table.js +19 -16
- package/esm/TableBody/TableBody.js +14 -14
- package/esm/TableCell/TableCell.js +37 -30
- package/esm/TableFooter/TableFooter.js +13 -13
- package/esm/TableHead/TableHead.js +25 -21
- package/esm/TableHeader/TableHeader.js +14 -14
- package/esm/TablePagination/TablePagination.js +67 -49
- package/esm/TableRow/TableRow.js +14 -14
- package/esm/Tabs/Tabs.js +55 -49
- package/esm/Text/Text.js +17 -13
- package/esm/TextField/TextField.js +129 -105
- package/esm/TextToSpeech/TextToSpeech.js +20 -14
- package/esm/TimePicker/TimePicker.js +196 -160
- package/esm/TimeRangePicker/TimeRangePicker.js +9 -11
- package/esm/Timeline/Timeline.js +13 -13
- package/esm/TimelineItem/TimelineItem.js +29 -24
- package/esm/Timer/Timer.js +137 -94
- package/esm/ToggleButton/ToggleButton.js +10 -12
- package/esm/ToggleButtons/ToggleButtons.js +9 -11
- package/esm/Tooltip/Tooltip.js +62 -53
- package/esm/TopAppBar/TopAppBar.js +32 -25
- package/esm/Transition/Transition.js +11 -9
- package/esm/Tree/Tree.js +73 -61
- package/esm/Type/Type.js +7 -6
- package/esm/VideoPlayer/VideoPlayer.js +207 -170
- package/esm/ViewSplit/ViewSplit.js +49 -40
- package/esm/Watch/Watch.js +204 -187
- package/esm/Weather/Weather.js +58 -49
- package/esm/Whiteboard/Whiteboard.js +28 -24
- package/esm/Widgets/Widgets.js +57 -51
- package/esm/WindowSplit/WindowSplit.js +59 -52
- package/esm/Zoom/Zoom.js +60 -52
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
package/esm/Links/Links.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
const _excluded = ["name", "short_description", "cover", "profile", "links", "share", "start", "end", "sensitiveText", "sensitiveDescription", "IconMore", "IconShare", "ShareProps", "ItemShareProps", "IconButtonProps", "IconProps", "NameProps", "ShortDescriptionProps", "LinkProps", "LinkTypeProps", "className"];
|
|
@@ -20,6 +19,7 @@ import MenuItemElement from '../MenuItem';
|
|
|
20
19
|
import IconButtonElement from '../IconButton';
|
|
21
20
|
import { useConfirm } from '../Confirm';
|
|
22
21
|
import { staticClassName } from '../utils';
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const useStyle = style(theme => ({
|
|
24
24
|
root: {
|
|
25
25
|
padding: `${theme.methods.space.value(5, 'px')} ${theme.methods.space.value(3, 'px')}`
|
|
@@ -75,8 +75,8 @@ const useStyle = style(theme => ({
|
|
|
75
75
|
}), {
|
|
76
76
|
name: 'onesy-Links'
|
|
77
77
|
});
|
|
78
|
-
const Element =
|
|
79
|
-
const $ = _c(
|
|
78
|
+
const Element = props_ => {
|
|
79
|
+
const $ = _c(18);
|
|
80
80
|
const theme = useOnesyTheme();
|
|
81
81
|
const l = theme.l;
|
|
82
82
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyLinks?.props?.default), props_);
|
|
@@ -138,119 +138,129 @@ const Element = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
138
138
|
const t10 = classNames([staticClassName("Links", theme) && ["onesy-Links-root"], className, classes.root]);
|
|
139
139
|
const t11 = 1.4;
|
|
140
140
|
const t12 = true;
|
|
141
|
-
const t13 = (profile || cover) && /*#__PURE__*/
|
|
141
|
+
const t13 = (profile || cover) && /*#__PURE__*/_jsxs(Line, {
|
|
142
142
|
gap: 0,
|
|
143
143
|
align: "center",
|
|
144
|
-
fullWidth: true
|
|
145
|
-
}, cover && /*#__PURE__*/React.createElement(Line, {
|
|
146
144
|
fullWidth: true,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
145
|
+
children: [cover && /*#__PURE__*/_jsx(Line, {
|
|
146
|
+
fullWidth: true,
|
|
147
|
+
className: classes.cover,
|
|
148
|
+
style: {
|
|
149
|
+
backgroundImage: `url('${cover?.url || cover?.urlSmall}')`
|
|
150
|
+
}
|
|
151
|
+
}), profile && /*#__PURE__*/_jsx(Line, {
|
|
152
|
+
fullWidth: true,
|
|
153
|
+
className: classes.profile,
|
|
154
|
+
style: {
|
|
155
|
+
marginTop: cover ? -71 : 0,
|
|
156
|
+
backgroundImage: `url('${profile?.urlSmall || profile?.url}')`
|
|
157
|
+
}
|
|
158
|
+
})]
|
|
159
|
+
});
|
|
160
|
+
const t14 = (name || short_description) && /*#__PURE__*/_jsxs(Line, {
|
|
160
161
|
gap: 0.5,
|
|
161
162
|
align: "center",
|
|
162
|
-
fullWidth: true
|
|
163
|
-
}, name && /*#__PURE__*/React.createElement(Type, _extends({
|
|
164
|
-
version: "h1",
|
|
165
|
-
weight: 400,
|
|
166
|
-
align: "center",
|
|
167
|
-
fullWidth: true,
|
|
168
|
-
dangerouslySetInnerHTML: {
|
|
169
|
-
__html: textToInnerHTML(name)
|
|
170
|
-
}
|
|
171
|
-
}, NameProps, {
|
|
172
|
-
className: classNames([staticClassName("Links", theme) && ["onesy-Links-name"], NameProps?.className, classes.name])
|
|
173
|
-
})), short_description && /*#__PURE__*/React.createElement(Type, _extends({
|
|
174
|
-
version: "b1",
|
|
175
|
-
weight: 300,
|
|
176
|
-
align: "center",
|
|
177
163
|
fullWidth: true,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
164
|
+
children: [name && /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
165
|
+
version: "h1",
|
|
166
|
+
weight: 400,
|
|
167
|
+
align: "center",
|
|
168
|
+
fullWidth: true,
|
|
169
|
+
dangerouslySetInnerHTML: {
|
|
170
|
+
__html: textToInnerHTML(name)
|
|
171
|
+
}
|
|
172
|
+
}, NameProps), {}, {
|
|
173
|
+
className: classNames([staticClassName("Links", theme) && ["onesy-Links-name"], NameProps?.className, classes.name])
|
|
174
|
+
})), short_description && /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
175
|
+
version: "b1",
|
|
176
|
+
weight: 300,
|
|
177
|
+
align: "center",
|
|
178
|
+
fullWidth: true,
|
|
179
|
+
dangerouslySetInnerHTML: {
|
|
180
|
+
__html: textToInnerHTML(short_description)
|
|
181
|
+
}
|
|
182
|
+
}, ShortDescriptionProps), {}, {
|
|
183
|
+
className: classNames([staticClassName("Links", theme) && ["onesy-Links-short-description"], ShortDescriptionProps?.className, classes.summary])
|
|
184
|
+
}))]
|
|
185
|
+
});
|
|
186
|
+
const t15 = !!links?.length && /*#__PURE__*/_jsx(Line, {
|
|
185
187
|
gap: 1.4,
|
|
186
188
|
align: "center",
|
|
187
189
|
fullWidth: true,
|
|
188
|
-
className: classes.links
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
190
|
+
className: classes.links,
|
|
191
|
+
children: links.map((item_0, index) => /*#__PURE__*/_jsxs(Line, {
|
|
192
|
+
gap: 1,
|
|
193
|
+
direction: "row",
|
|
194
|
+
align: "center",
|
|
195
|
+
justify: "center",
|
|
196
|
+
fullWidth: true,
|
|
197
|
+
className: classes.linkWrapper,
|
|
198
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({
|
|
199
|
+
tonal: true
|
|
200
|
+
}, item_0.props), {}, {
|
|
201
|
+
version: [undefined, "default"].includes(item_0.version) ? "outlined" : "filled",
|
|
202
|
+
elevation: item_0.version === "primary",
|
|
203
|
+
color: item_0.version === "primary" ? "primary" : item_0.version === "secondary" ? "secondary" : "default",
|
|
204
|
+
fullWidth: true,
|
|
205
|
+
onClick: () => onOpenLink(item_0)
|
|
206
|
+
}, LinkProps), {}, {
|
|
207
|
+
className: classNames([`onesy-Links-link-version-${item_0.version}`, LinkProps?.className, item_0.props?.className, classes.link]),
|
|
208
|
+
children: /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
209
|
+
version: "b1",
|
|
210
|
+
weight: 300
|
|
211
|
+
}, LinkTypeProps), {}, {
|
|
212
|
+
children: item_0.name || l("Link")
|
|
213
|
+
}))
|
|
214
|
+
})), /*#__PURE__*/_jsx(Menu, {
|
|
215
|
+
menuItems: [/*#__PURE__*/_jsx(MenuItem, {
|
|
216
|
+
start: /*#__PURE__*/_jsx(IconShare, _objectSpread({
|
|
217
|
+
size: "small"
|
|
218
|
+
}, IconProps)),
|
|
219
|
+
startAlign: "center",
|
|
220
|
+
primary: /*#__PURE__*/_jsx(Type, {
|
|
221
|
+
version: "b3",
|
|
222
|
+
children: l("Share")
|
|
223
|
+
}),
|
|
224
|
+
menu: item_0.share ? /*#__PURE__*/_jsx(Share, _objectSpread(_objectSpread({
|
|
225
|
+
version: "menu-items",
|
|
226
|
+
name: item_0.name,
|
|
227
|
+
url: item_0.url,
|
|
228
|
+
exclude: ["print"]
|
|
229
|
+
}, ItemShareProps), {}, {
|
|
230
|
+
ListItemProps: _objectSpread({
|
|
231
|
+
size: "small",
|
|
232
|
+
noBackground: true
|
|
233
|
+
}, ItemShareProps?.ListItemProps)
|
|
234
|
+
})) : undefined,
|
|
235
|
+
MenuProps: {
|
|
236
|
+
ListProps: {
|
|
237
|
+
noChildrenTransform: true
|
|
238
|
+
}
|
|
239
|
+
},
|
|
226
240
|
size: "small",
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}, IconButtonProps, {
|
|
243
|
-
className: classNames([staticClassName("Links", theme) && ["onesy-Links-more"], IconButtonProps?.className, classes.more])
|
|
244
|
-
}), /*#__PURE__*/React.createElement(IconMore, _extends({
|
|
245
|
-
size: "large"
|
|
246
|
-
}, IconProps)))))));
|
|
241
|
+
button: true,
|
|
242
|
+
disabled: !item_0.share
|
|
243
|
+
})],
|
|
244
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
245
|
+
size: "regular",
|
|
246
|
+
disabled: !item_0.share
|
|
247
|
+
}, IconButtonProps), {}, {
|
|
248
|
+
className: classNames([staticClassName("Links", theme) && ["onesy-Links-more"], IconButtonProps?.className, classes.more]),
|
|
249
|
+
children: /*#__PURE__*/_jsx(IconMore, _objectSpread({
|
|
250
|
+
size: "large"
|
|
251
|
+
}, IconProps))
|
|
252
|
+
}))
|
|
253
|
+
})]
|
|
254
|
+
}, index))
|
|
255
|
+
});
|
|
247
256
|
let t16;
|
|
248
257
|
if ($[0] !== Line || $[1] !== classes.wrapper || $[2] !== t13 || $[3] !== t14 || $[4] !== t15) {
|
|
249
|
-
t16 = /*#__PURE__*/
|
|
258
|
+
t16 = /*#__PURE__*/_jsxs(Line, {
|
|
250
259
|
gap: t11,
|
|
251
260
|
fullWidth: t12,
|
|
252
|
-
className: classes.wrapper
|
|
253
|
-
|
|
261
|
+
className: classes.wrapper,
|
|
262
|
+
children: [t13, t14, t15]
|
|
263
|
+
});
|
|
254
264
|
$[0] = Line;
|
|
255
265
|
$[1] = classes.wrapper;
|
|
256
266
|
$[2] = t13;
|
|
@@ -262,7 +272,7 @@ const Element = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
262
272
|
}
|
|
263
273
|
let t17;
|
|
264
274
|
if ($[6] !== Share || $[7] !== ShareProps || $[8] !== share) {
|
|
265
|
-
t17 = share && /*#__PURE__*/
|
|
275
|
+
t17 = share && /*#__PURE__*/_jsx(Share, _objectSpread({}, ShareProps));
|
|
266
276
|
$[6] = Share;
|
|
267
277
|
$[7] = ShareProps;
|
|
268
278
|
$[8] = share;
|
|
@@ -271,29 +281,29 @@ const Element = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
271
281
|
t17 = $[9];
|
|
272
282
|
}
|
|
273
283
|
let t18;
|
|
274
|
-
if ($[10] !== Section || $[11] !== end || $[12] !== other || $[13] !==
|
|
275
|
-
t18 = /*#__PURE__*/
|
|
276
|
-
ref: ref,
|
|
284
|
+
if ($[10] !== Section || $[11] !== end || $[12] !== other || $[13] !== start || $[14] !== t10 || $[15] !== t16 || $[16] !== t17) {
|
|
285
|
+
t18 = /*#__PURE__*/_jsxs(Section, _objectSpread(_objectSpread({
|
|
277
286
|
gap: t5,
|
|
278
287
|
align: t6,
|
|
279
288
|
maxWidth: t7,
|
|
280
289
|
padding: t8,
|
|
281
290
|
fullWidth: t9,
|
|
282
291
|
className: t10
|
|
283
|
-
}, other),
|
|
292
|
+
}, other), {}, {
|
|
293
|
+
children: [start, t16, t17, end]
|
|
294
|
+
}));
|
|
284
295
|
$[10] = Section;
|
|
285
296
|
$[11] = end;
|
|
286
297
|
$[12] = other;
|
|
287
|
-
$[13] =
|
|
288
|
-
$[14] =
|
|
289
|
-
$[15] =
|
|
290
|
-
$[16] =
|
|
291
|
-
$[17] =
|
|
292
|
-
$[18] = t18;
|
|
298
|
+
$[13] = start;
|
|
299
|
+
$[14] = t10;
|
|
300
|
+
$[15] = t16;
|
|
301
|
+
$[16] = t17;
|
|
302
|
+
$[17] = t18;
|
|
293
303
|
} else {
|
|
294
|
-
t18 = $[
|
|
304
|
+
t18 = $[17];
|
|
295
305
|
}
|
|
296
306
|
return t18;
|
|
297
|
-
}
|
|
307
|
+
};
|
|
298
308
|
Element.displayName = 'onesy-Links';
|
|
299
309
|
export default Element;
|
package/esm/List/List.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
const _excluded = ["tonal", "color", "size", "elevation", "menu", "menuOpen", "noMaxWidth", "indent", "paddingHorizontal", "paddingVertical", "noBackground", "noChildrenTransform", "onMenuDesktopClose", "SurfaceProps", "Component", "className", "style", "children"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "size", "elevation", "menu", "menuOpen", "noMaxWidth", "indent", "paddingHorizontal", "paddingVertical", "noBackground", "noChildrenTransform", "onMenuDesktopClose", "SurfaceProps", "Component", "className", "style", "children"];
|
|
5
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
6
|
import React from 'react';
|
|
@@ -11,6 +10,7 @@ import SurfaceElement from '../Surface';
|
|
|
11
10
|
import LineElement from '../Line';
|
|
12
11
|
import useMediaQuery from '../useMediaQuery';
|
|
13
12
|
import { staticClassName } from '../utils';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const useStyle = styleMethod(theme => ({
|
|
15
15
|
root: {
|
|
16
16
|
// Reset
|
|
@@ -56,12 +56,13 @@ const useStyle = styleMethod(theme => ({
|
|
|
56
56
|
}), {
|
|
57
57
|
name: 'onesy-List'
|
|
58
58
|
});
|
|
59
|
-
const List =
|
|
59
|
+
const List = props_ => {
|
|
60
60
|
const theme = useOnesyTheme();
|
|
61
61
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyList?.props?.default), props_);
|
|
62
62
|
const Line = theme?.elements?.Line || LineElement;
|
|
63
63
|
const Surface = theme?.elements?.Surface || SurfaceElement;
|
|
64
64
|
const {
|
|
65
|
+
ref,
|
|
65
66
|
tonal = true,
|
|
66
67
|
color = 'themed',
|
|
67
68
|
size: size_,
|
|
@@ -96,7 +97,7 @@ const List = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
96
97
|
root: {}
|
|
97
98
|
};
|
|
98
99
|
if (indent !== undefined) styles.root.paddingInlineStart = `${indent * theme.space.unit}px`;
|
|
99
|
-
return /*#__PURE__*/
|
|
100
|
+
return /*#__PURE__*/_jsx(Surface, _objectSpread(_objectSpread({
|
|
100
101
|
ref: item => {
|
|
101
102
|
if (ref) {
|
|
102
103
|
if (is('function', ref)) ref(item);else ref.current = item;
|
|
@@ -114,24 +115,25 @@ const List = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
114
115
|
AdditionalProps: {
|
|
115
116
|
Component
|
|
116
117
|
}
|
|
117
|
-
}, SurfaceProps, {
|
|
118
|
+
}, SurfaceProps), {}, {
|
|
118
119
|
className: classNames([staticClassName('List', theme) && ['onesy-List-root', `onesy-List-size-${size}`], SurfaceProps?.className, className, classes.root, classes[`padding_vertical_${paddingVertical}`], classes[`padding_horizontal_${paddingHorizontal}`], menu && classes.menu, noMaxWidth && classes.noMaxWidth, noBackground && classes.noBackground]),
|
|
119
|
-
style: _objectSpread(_objectSpread({}, style), styles.root)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
120
|
+
style: _objectSpread(_objectSpread({}, style), styles.root),
|
|
121
|
+
children: noChildrenTransform ? children : React.Children.toArray(children).map((item_0, index) => {
|
|
122
|
+
return /*#__PURE__*/React.cloneElement(item_0, _objectSpread(_objectSpread(_objectSpread({
|
|
123
|
+
key: index,
|
|
124
|
+
menuItem: menu,
|
|
125
|
+
menuOpen,
|
|
126
|
+
tonal: item_0.props.tonal !== undefined ? item_0.props.tonal : tonal,
|
|
127
|
+
color: item_0.props.color !== undefined ? item_0.props.color : color,
|
|
128
|
+
size: item_0.props.size !== undefined ? item_0.props.size : size
|
|
129
|
+
}, other), item_0.props), {}, {
|
|
130
|
+
onClick: event => {
|
|
131
|
+
if (is('function', onMenuDesktopClose) && item_0.props.menuCloseOnClick) onMenuDesktopClose();
|
|
132
|
+
if (is('function', item_0.props.onClick)) item_0.props.onClick(event);
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
})
|
|
134
136
|
}));
|
|
135
|
-
}
|
|
137
|
+
};
|
|
136
138
|
List.displayName = 'onesy-List';
|
|
137
139
|
export default List;
|
package/esm/ListItem/ListItem.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
const _excluded = ["tonal", "color", "colorSelected", "inset", "primary", "secondary", "tertiary", "preselected", "selected", "start", "startAlign", "end", "endAlign", "size", "noPadding", "href", "button", "shape", "shapePosition", "menuItem", "footer", "tabIndex", "interaction", "fullWidth", "noOutline", "noBackground", "disabled", "onClick", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "onClose", "RootComponent", "WrapperProps", "RootProps", "InteractionProps", "PrimaryProps", "SecondaryProps", "TertiaryProps", "MainProps", "AsideProps", "AsideStartProps", "AsideEndProps", "Component", "className", "style", "children"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "colorSelected", "inset", "primary", "secondary", "tertiary", "preselected", "selected", "start", "startAlign", "end", "endAlign", "size", "noPadding", "href", "button", "shape", "shapePosition", "menuItem", "footer", "tabIndex", "interaction", "fullWidth", "noOutline", "noBackground", "disabled", "onClick", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "onClose", "RootComponent", "WrapperProps", "RootProps", "InteractionProps", "PrimaryProps", "SecondaryProps", "TertiaryProps", "MainProps", "AsideProps", "AsideStartProps", "AsideEndProps", "Component", "className", "style", "children"];
|
|
5
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
6
|
import React from 'react';
|
|
@@ -11,6 +10,7 @@ import SurfaceElement from '../Surface';
|
|
|
11
10
|
import InteractionElement from '../Interaction';
|
|
12
11
|
import TypeElement from '../Type';
|
|
13
12
|
import { staticClassName } from '../utils';
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const useStyle = styleMethod(theme => {
|
|
15
15
|
const overflow = {
|
|
16
16
|
width: '100%',
|
|
@@ -214,13 +214,14 @@ const useStyle = styleMethod(theme => {
|
|
|
214
214
|
}, {
|
|
215
215
|
name: 'onesy-ListItem'
|
|
216
216
|
});
|
|
217
|
-
const ListItem =
|
|
217
|
+
const ListItem = props_ => {
|
|
218
218
|
const theme = useOnesyTheme();
|
|
219
219
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyListItem?.props?.default), props_);
|
|
220
220
|
const Interaction = theme?.elements?.Interaction || InteractionElement;
|
|
221
221
|
const Surface = theme?.elements?.Surface || SurfaceElement;
|
|
222
222
|
const Type = theme?.elements?.Type || TypeElement;
|
|
223
223
|
const {
|
|
224
|
+
ref,
|
|
224
225
|
tonal = true,
|
|
225
226
|
color = 'default',
|
|
226
227
|
colorSelected = props.color,
|
|
@@ -296,7 +297,7 @@ const ListItem = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
296
297
|
let RootComponent = RootComponent_;
|
|
297
298
|
if (href) RootComponent = 'a';
|
|
298
299
|
const colorToUse = selected ? colorSelected : color;
|
|
299
|
-
return /*#__PURE__*/
|
|
300
|
+
return /*#__PURE__*/_jsxs(Surface, _objectSpread(_objectSpread(_objectSpread({
|
|
300
301
|
ref: item => {
|
|
301
302
|
if (ref) {
|
|
302
303
|
if (is('function', ref)) ref(item);else if (ref?.current) ref.current = item;
|
|
@@ -310,62 +311,71 @@ const ListItem = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
310
311
|
"aria-describedby": refs.ids.secondary,
|
|
311
312
|
"aria-selected": selected,
|
|
312
313
|
Component: Component
|
|
313
|
-
}, WrapperProps, {
|
|
314
|
+
}, WrapperProps), {}, {
|
|
314
315
|
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-wrapper'], WrapperProps?.className, className, classes.wrapper, fullWidth && classes.wrapper_fullWidth, noBackground && classes.noBackground]),
|
|
315
316
|
noOutline: noOutline,
|
|
316
317
|
style: _objectSpread(_objectSpread({}, styles.wrapper), WrapperProps?.style)
|
|
317
|
-
}, other),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
})
|
|
318
|
+
}, other), {}, {
|
|
319
|
+
children: [/*#__PURE__*/_jsxs(RootComponent, _objectSpread(_objectSpread({
|
|
320
|
+
href: href,
|
|
321
|
+
onClick: onClick,
|
|
322
|
+
onFocus: onFocus,
|
|
323
|
+
onBlur: onBlur,
|
|
324
|
+
onMouseEnter: onMouseEnter,
|
|
325
|
+
onMouseLeave: onMouseLeave
|
|
326
|
+
}, RootProps), {}, {
|
|
327
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-root', `onesy-ListItem-size-${size}`, preselected && `onesy-ListItem-preselected`, selected && `onesy-ListItem-selected`, disabled && `onesy-ListItem-disabled`, inset && !start && `onesy-ListItem-inset`], RootProps?.className, classes.root, !menuItem && classes[`size_${size}`], classes[`shape_${shape}_position_${shapePosition}`], inset && !start && classes[`inset_size_${size}`], menuItem && [classes[`menuItem_size_${size}`], inset && classes[`menuItem_inset_size_${size}`]], (href || button) && classes.button, noPadding && classes.noPadding, disabled && classes.disabled]),
|
|
328
|
+
style: _objectSpread(_objectSpread({}, style), styles.root),
|
|
329
|
+
disabled: disabled,
|
|
330
|
+
children: [(href || button || interaction) && /*#__PURE__*/_jsx(Interaction, _objectSpread({
|
|
331
|
+
border: false,
|
|
332
|
+
preselected: InteractionProps?.focus || preselected || undefined,
|
|
333
|
+
selected: selected,
|
|
334
|
+
disabled: disabled
|
|
335
|
+
}, InteractionProps)), start && /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread(_objectSpread({}, AsideProps), AsideStartProps), {}, {
|
|
336
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-aside', 'onesy-ListItem-start', `onesy-ListItem-start-${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(start?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(start?.type?.displayName) ? 'switch' : 'icon'}`], AsideProps?.className, AsideStartProps?.className, classes.aside, classes.start, classes[`align_${startAlign}`], classes[`${menuItem ? 'menuItem_' : ''}start_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(start?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(start?.type?.displayName) ? 'switch' : 'icon'}`], classes[`${menuItem ? 'menuItem_' : ''}start_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(start?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(start?.type?.displayName) ? 'switch' : 'icon'}_size_${size}`]]),
|
|
337
|
+
children: is('string', start) ? start : /*#__PURE__*/React.cloneElement(start, {
|
|
338
|
+
color: start.props?.color || 'inherit',
|
|
339
|
+
size: start.props?.size !== undefined ? start.props?.size : ['onesy-Switch'].includes(start?.type?.displayName) ? 'small' : 'regular',
|
|
340
|
+
disabled
|
|
341
|
+
})
|
|
342
|
+
})), /*#__PURE__*/_jsxs("span", _objectSpread(_objectSpread({}, MainProps), {}, {
|
|
343
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-middle'], MainProps?.className, classes.middle, menuItem && classes.menuItem_middle, disabled && classes.middle_disabled]),
|
|
344
|
+
children: [primary !== undefined && (is('simple', primary) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
345
|
+
version: "b2",
|
|
346
|
+
id: refs.ids.primary
|
|
347
|
+
}, PrimaryProps), {}, {
|
|
348
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-text', 'onesy-ListItem-text-primary'], PrimaryProps?.className, classes.text, classes.text_primary, !menuItem && classes.text_primary_weight]),
|
|
349
|
+
style: _objectSpread(_objectSpread({}, styles.primary), PrimaryProps?.style),
|
|
350
|
+
children: primary
|
|
351
|
+
})) : /*#__PURE__*/React.cloneElement(primary, {
|
|
352
|
+
id: refs.ids.primary
|
|
353
|
+
})), secondary !== undefined && (is('simple', secondary) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
354
|
+
version: "b2",
|
|
355
|
+
id: refs.ids.secondary
|
|
356
|
+
}, SecondaryProps), {}, {
|
|
357
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-text', 'onesy-ListItem-text-secondary'], SecondaryProps?.className, classes.text, classes.text_secondary]),
|
|
358
|
+
style: _objectSpread(_objectSpread({}, styles.secondary), SecondaryProps?.style),
|
|
359
|
+
children: secondary
|
|
360
|
+
})) : /*#__PURE__*/React.cloneElement(secondary, {
|
|
361
|
+
id: refs.ids.secondary
|
|
362
|
+
})), tertiary !== undefined && (is('simple', tertiary) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
363
|
+
version: "b2"
|
|
364
|
+
}, TertiaryProps), {}, {
|
|
365
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-text', 'onesy-ListItem-text-tertiary'], TertiaryProps?.className, classes.text, classes.text_tertiary]),
|
|
366
|
+
style: _objectSpread(_objectSpread({}, styles.tertiary), TertiaryProps?.style),
|
|
367
|
+
children: tertiary
|
|
368
|
+
})) : tertiary)]
|
|
369
|
+
})), end && /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread(_objectSpread({}, AsideProps), AsideEndProps), {}, {
|
|
370
|
+
className: classNames([staticClassName('ListItem', theme) && ['onesy-ListItem-aside', 'onesy-ListItem-end', `onesy-ListItem-end-${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(end?.type?.displayName) ? 'switch' : 'icon'}`], AsideProps?.className, AsideEndProps?.classname, classes.aside, classes.end, classes[`align_${endAlign}`], classes[`${menuItem ? 'menuItem_' : ''}end_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(end?.type?.displayName) ? 'switch' : 'icon'}`], classes[`${menuItem ? 'menuItem_' : ''}end_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end?.type?.displayName) ? 'button' : ['onesy-Switch'].includes(end?.type?.displayName) ? 'switch' : 'icon'}_size_${size}`]]),
|
|
371
|
+
children: is('string', end) ? end : /*#__PURE__*/React.cloneElement(end, {
|
|
372
|
+
color: end.props?.color || 'inherit',
|
|
373
|
+
size: end.props?.size !== undefined ? end.props?.size : ['onesy-Switch'].includes(end?.type?.displayName) ? 'small' : 'regular',
|
|
374
|
+
disabled
|
|
375
|
+
})
|
|
376
|
+
}))]
|
|
377
|
+
})), footer]
|
|
378
|
+
}));
|
|
379
|
+
};
|
|
370
380
|
ListItem.displayName = 'onesy-ListItem';
|
|
371
381
|
export default ListItem;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
const _excluded = ["className", "children"];
|
|
@@ -9,6 +8,7 @@ import React from 'react';
|
|
|
9
8
|
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
|
10
9
|
import ListItemElement from '../ListItem';
|
|
11
10
|
import { staticClassName } from '../utils';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useStyle = styleMethod(theme => ({
|
|
13
13
|
root: {
|
|
14
14
|
top: '0',
|
|
@@ -22,8 +22,8 @@ const useStyle = styleMethod(theme => ({
|
|
|
22
22
|
}), {
|
|
23
23
|
name: 'onesy-ListSubheader'
|
|
24
24
|
});
|
|
25
|
-
const ListSubheader =
|
|
26
|
-
const $ = _c(
|
|
25
|
+
const ListSubheader = props_ => {
|
|
26
|
+
const $ = _c(5);
|
|
27
27
|
const theme = useOnesyTheme();
|
|
28
28
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyListSubheader?.props?.default), props_);
|
|
29
29
|
const ListItem = theme?.elements?.ListItem || ListItemElement;
|
|
@@ -37,22 +37,20 @@ const ListSubheader = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
37
37
|
} = useStyle();
|
|
38
38
|
const t0 = classNames([staticClassName("ListSubheader", theme) && ["onesy-ListSubheader-root"], className, classes.root]);
|
|
39
39
|
let t1;
|
|
40
|
-
if ($[0] !== ListItem || $[1] !== children || $[2] !== other || $[3] !==
|
|
41
|
-
t1 = /*#__PURE__*/
|
|
42
|
-
ref: ref,
|
|
40
|
+
if ($[0] !== ListItem || $[1] !== children || $[2] !== other || $[3] !== t0) {
|
|
41
|
+
t1 = /*#__PURE__*/_jsx(ListItem, _objectSpread({
|
|
43
42
|
secondary: children,
|
|
44
43
|
className: t0
|
|
45
44
|
}, other));
|
|
46
45
|
$[0] = ListItem;
|
|
47
46
|
$[1] = children;
|
|
48
47
|
$[2] = other;
|
|
49
|
-
$[3] =
|
|
50
|
-
$[4] =
|
|
51
|
-
$[5] = t1;
|
|
48
|
+
$[3] = t0;
|
|
49
|
+
$[4] = t1;
|
|
52
50
|
} else {
|
|
53
|
-
t1 = $[
|
|
51
|
+
t1 = $[4];
|
|
54
52
|
}
|
|
55
53
|
return t1;
|
|
56
|
-
}
|
|
54
|
+
};
|
|
57
55
|
ListSubheader.displayName = 'onesy-ListSubheader';
|
|
58
56
|
export default ListSubheader;
|