@onesy/ui-react 1.0.172 → 1.0.173
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 -52
- 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 -6
- 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 -52
- 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 -6
- 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/Surface/Surface.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 = ["tonal", "color", "version", "elevation", "backgroundOpacity", "noBackground", "noOutline", "AdditionalProps", "Component", "className", "style", "children"];
|
|
@@ -8,6 +7,7 @@ import React from 'react';
|
|
|
8
7
|
import { is } from '@onesy/utils';
|
|
9
8
|
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
|
10
9
|
import { staticClassName } from '../utils';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const useStyle = styleMethod(theme => ({
|
|
12
12
|
root: {},
|
|
13
13
|
// Color
|
|
@@ -563,7 +563,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
563
563
|
}), {
|
|
564
564
|
name: 'onesy-Surface'
|
|
565
565
|
});
|
|
566
|
-
const Surface =
|
|
566
|
+
const Surface = props_ => {
|
|
567
567
|
const theme = useOnesyTheme();
|
|
568
568
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesySurface?.props?.default), props_);
|
|
569
569
|
const {
|
|
@@ -819,13 +819,13 @@ const Surface = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
819
819
|
palette
|
|
820
820
|
}));
|
|
821
821
|
}
|
|
822
|
-
return /*#__PURE__*/
|
|
823
|
-
ref: ref
|
|
824
|
-
}, AdditionalProps, {
|
|
822
|
+
return /*#__PURE__*/_jsx(Component, _objectSpread(_objectSpread(_objectSpread({}, AdditionalProps), {}, {
|
|
825
823
|
className: classNames([staticClassName("Surface", theme) && ["onesy-Surface-root"], AdditionalProps?.className, className, classes.root, classes[`version_${version}`], classes[`version_${version}_color_${color}`], classes[`elevation_${elevation}`], tonal && classes[`version_${version}_tonal_${is("string", tonal) ? `${tonal}_` : ""}color_${color}`], noBackground && classes.noBackground, noOutline && classes.noOutline]),
|
|
826
824
|
style: _objectSpread(_objectSpread({}, style), styles.root)
|
|
827
|
-
}, other),
|
|
828
|
-
|
|
825
|
+
}, other), {}, {
|
|
826
|
+
children: children && React.Children.toArray(children).filter(Boolean).map(_temp)
|
|
827
|
+
}));
|
|
828
|
+
};
|
|
829
829
|
Surface.displayName = 'onesy-Surface';
|
|
830
830
|
export default Surface;
|
|
831
831
|
function _temp(item, index) {
|
package/esm/Switch/Switch.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
const _excluded = ["style", "children"],
|
|
@@ -12,6 +11,7 @@ import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-re
|
|
|
12
11
|
import KeyframesElement from '../Keyframes';
|
|
13
12
|
import IconButtonElement from '../IconButton';
|
|
14
13
|
import { staticClassName } from '../utils';
|
|
14
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const useStyle = styleMethod(theme => ({
|
|
16
16
|
root: {
|
|
17
17
|
position: 'relative',
|
|
@@ -245,9 +245,11 @@ const Icon = props => {
|
|
|
245
245
|
}
|
|
246
246
|
let t2;
|
|
247
247
|
if ($[10] !== other || $[11] !== t0 || $[12] !== t1) {
|
|
248
|
-
t2 = /*#__PURE__*/
|
|
248
|
+
t2 = /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
|
|
249
249
|
style: t0
|
|
250
|
-
}, other),
|
|
250
|
+
}, other), {}, {
|
|
251
|
+
children: t1
|
|
252
|
+
}));
|
|
251
253
|
$[10] = other;
|
|
252
254
|
$[11] = t0;
|
|
253
255
|
$[12] = t1;
|
|
@@ -257,7 +259,7 @@ const Icon = props => {
|
|
|
257
259
|
}
|
|
258
260
|
return t2;
|
|
259
261
|
};
|
|
260
|
-
const Switch =
|
|
262
|
+
const Switch = props_ => {
|
|
261
263
|
const theme = useOnesyTheme();
|
|
262
264
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesySwitch?.props?.default), props_);
|
|
263
265
|
const Keyframes = theme?.elements?.Keyframes || KeyframesElement;
|
|
@@ -691,8 +693,7 @@ const Switch = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
691
693
|
break;
|
|
692
694
|
}
|
|
693
695
|
};
|
|
694
|
-
return /*#__PURE__*/
|
|
695
|
-
ref: ref,
|
|
696
|
+
return /*#__PURE__*/_jsxs(Component, _objectSpread(_objectSpread({
|
|
696
697
|
tabIndex: disabled ? -1 : 0,
|
|
697
698
|
role: "switch",
|
|
698
699
|
"aria-checked": value,
|
|
@@ -700,41 +701,48 @@ const Switch = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
700
701
|
onKeyDown: onKeyDown,
|
|
701
702
|
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-root', `onesy-Switch-size-${size}`, value && `onesy-Switch-checked`, disabled && `onesy-Switch-disabled`], className, classes.root, classes[`color_${color}`], classes[`size_${size}`], tonal && classes[`tonal_color_${color}`], disabled && classes.disabled]),
|
|
702
703
|
style: _objectSpread(_objectSpread({}, style), styles.root)
|
|
703
|
-
}, other),
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
704
|
+
}, other), {}, {
|
|
705
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
706
|
+
ref: item_0 => {
|
|
707
|
+
if (inputRef) inputRef.current = item_0;
|
|
708
|
+
refs.input.current = item_0;
|
|
709
|
+
},
|
|
710
|
+
tabIndex: -1,
|
|
711
|
+
type: "checkbox",
|
|
712
|
+
checked: value,
|
|
713
|
+
onChange: onUpdate,
|
|
714
|
+
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-input'], classes.input]),
|
|
715
|
+
disabled: disabled
|
|
716
|
+
}), /*#__PURE__*/_jsx(Keyframes, {
|
|
717
|
+
keyframes: keyframes[refs.value.current ? 'checked' : 'unchecked'],
|
|
718
|
+
update: refs.value.current,
|
|
719
|
+
appendStatusPost: !refs.value.current ? 'doneStart' : 'doneEnd',
|
|
720
|
+
append: true,
|
|
721
|
+
children: status => {
|
|
722
|
+
if (refs.value.current && status === 'doneEnd' || !refs.value.current && status === 'doneStart') refs.animation.current = false;
|
|
723
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
724
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
725
|
+
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-background'], classes.background, disabled && classes.background_disabled]),
|
|
726
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.background), status === 'appended' && initial().background[refs.value.current ? 'checked' : 'unchecked']), styleKeyframes().background[status])
|
|
727
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
728
|
+
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-border'], classes.border, classes[`color_${color}`], tonal && classes[`border_tonal_color_${color}`]]),
|
|
729
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.border), status === 'appended' && initial().border[refs.value.current ? 'checked' : 'unchecked']), styleKeyframes().border[status])
|
|
730
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
731
|
+
tabIndex: "-1",
|
|
732
|
+
size: size,
|
|
733
|
+
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-icon-button'], classes.iconButton]),
|
|
734
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.iconButton), status === 'appended' && initial().iconButton[refs.value.current ? 'checked' : 'unchecked']), styleKeyframes().iconButton[status]),
|
|
735
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
736
|
+
size: size,
|
|
737
|
+
className: classNames([staticClassName('Switch', theme) && ['onesy-Switch-icon'], classes.icon]),
|
|
738
|
+
style: _objectSpread(_objectSpread({}, status === 'appended' && initial().icon[refs.value.current ? 'checked' : 'unchecked']), styleKeyframes().icon[status]),
|
|
739
|
+
children: (status === 'appended' && refs.value.current || ['growEnd', 'doneEnd'].includes(status)) && OnIcon || (status === 'appended' && !refs.value.current || ['growStart', 'doneStart'].includes(status)) && OffIcon
|
|
740
|
+
})
|
|
741
|
+
})]
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
})]
|
|
737
745
|
}));
|
|
738
|
-
}
|
|
746
|
+
};
|
|
739
747
|
Switch.displayName = 'onesy-Switch';
|
|
740
748
|
export default Switch;
|
package/esm/Tab/Tab.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 = ["tonal", "color", "version", "size", "value", "onChange", "active", "index", "name", "label", "icon", "iconPosition", "activateOnFocus", "tooltip", "disabled", "onBlur", "onFocus", "LineProps", "TooltipProps", "Component", "className", "children"];
|
|
@@ -14,6 +13,7 @@ import SurfaceElement from '../Surface';
|
|
|
14
13
|
import LineElement from '../Line';
|
|
15
14
|
import InteractionElement from '../Interaction';
|
|
16
15
|
import { staticClassName } from '../utils';
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const useStyle = styleMethod(theme => ({
|
|
18
18
|
root: {
|
|
19
19
|
// Reset
|
|
@@ -73,8 +73,8 @@ const useStyle = styleMethod(theme => ({
|
|
|
73
73
|
}), {
|
|
74
74
|
name: 'onesy-Tab'
|
|
75
75
|
});
|
|
76
|
-
const Tab =
|
|
77
|
-
const $ = _c(
|
|
76
|
+
const Tab = props_ => {
|
|
77
|
+
const $ = _c(28);
|
|
78
78
|
const theme = useOnesyTheme();
|
|
79
79
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTab?.props?.default), props_);
|
|
80
80
|
const Line = theme?.elements?.Line || LineElement;
|
|
@@ -159,7 +159,7 @@ const Tab = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
159
159
|
const t9 = classNames([staticClassName("Tab", theme) && ["onesy-Tab-root", `onesy-Tab-version-${version}`, `onesy-Tab-size-${size}`, active && "onesy-Tab-active", disabled && "onesy-Tab-disabled"], className, classes.root, classes[`size_${size}`], active && classes.active, disabled && classes.disabled]);
|
|
160
160
|
let t10;
|
|
161
161
|
if ($[0] !== Interaction || $[1] !== focus) {
|
|
162
|
-
t10 = /*#__PURE__*/
|
|
162
|
+
t10 = /*#__PURE__*/_jsx(Interaction, {
|
|
163
163
|
pulse: focus
|
|
164
164
|
});
|
|
165
165
|
$[0] = Interaction;
|
|
@@ -173,24 +173,27 @@ const Tab = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
173
173
|
const t13 = "center";
|
|
174
174
|
const t14 = "center";
|
|
175
175
|
const t15 = classNames([staticClassName("Tab", theme) && ["onesy-Tab-line"], LineProps?.className, classes.line]);
|
|
176
|
-
const t16 = label !== undefined && (is("simple", label) ? /*#__PURE__*/
|
|
176
|
+
const t16 = label !== undefined && (is("simple", label) ? /*#__PURE__*/_jsx(Type, {
|
|
177
177
|
version: typeVersion,
|
|
178
|
-
className: classNames([staticClassName("Tab", theme) && ["onesy-Tab-type"], classes[`type_${size}`]])
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
className: classNames([staticClassName("Tab", theme) && ["onesy-Tab-type"], classes[`type_${size}`]]),
|
|
179
|
+
children: label
|
|
180
|
+
}) : label);
|
|
181
|
+
const t17 = children !== undefined && (is("simple", children) ? /*#__PURE__*/_jsx(Type, {
|
|
181
182
|
version: typeVersion,
|
|
182
|
-
className: classNames([staticClassName("Tab", theme) && ["onesy-Tab-type"], classes[`type_${size}`]])
|
|
183
|
-
|
|
183
|
+
className: classNames([staticClassName("Tab", theme) && ["onesy-Tab-type"], classes[`type_${size}`]]),
|
|
184
|
+
children: children
|
|
185
|
+
}) : children);
|
|
184
186
|
let t18;
|
|
185
187
|
if ($[3] !== Line || $[4] !== LineProps || $[5] !== icon || $[6] !== t15 || $[7] !== t16 || $[8] !== t17) {
|
|
186
|
-
t18 = /*#__PURE__*/
|
|
188
|
+
t18 = /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
187
189
|
gap: t11,
|
|
188
190
|
direction: t12,
|
|
189
191
|
align: t13,
|
|
190
192
|
justify: t14
|
|
191
|
-
}, LineProps, {
|
|
192
|
-
className: t15
|
|
193
|
-
|
|
193
|
+
}, LineProps), {}, {
|
|
194
|
+
className: t15,
|
|
195
|
+
children: [icon, t16, t17]
|
|
196
|
+
}));
|
|
194
197
|
$[3] = Line;
|
|
195
198
|
$[4] = LineProps;
|
|
196
199
|
$[5] = icon;
|
|
@@ -202,9 +205,8 @@ const Tab = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
202
205
|
t18 = $[9];
|
|
203
206
|
}
|
|
204
207
|
let t19;
|
|
205
|
-
if ($[10] !== Component || $[11] !== Surface || $[12] !== active || $[13] !== color || $[14] !== onBlur || $[15] !== onFocus || $[16] !== other || $[17] !==
|
|
206
|
-
t19 = /*#__PURE__*/
|
|
207
|
-
ref: ref,
|
|
208
|
+
if ($[10] !== Component || $[11] !== Surface || $[12] !== active || $[13] !== color || $[14] !== onBlur || $[15] !== onFocus || $[16] !== other || $[17] !== t10 || $[18] !== t18 || $[19] !== t7 || $[20] !== t9 || $[21] !== tonal || $[22] !== value) {
|
|
209
|
+
t19 = /*#__PURE__*/_jsxs(Surface, _objectSpread(_objectSpread({
|
|
208
210
|
tabIndex: t7,
|
|
209
211
|
tonal: tonal,
|
|
210
212
|
color: color,
|
|
@@ -215,7 +217,9 @@ const Tab = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
215
217
|
"data-onesy-tab-value": value,
|
|
216
218
|
Component: Component,
|
|
217
219
|
className: t9
|
|
218
|
-
}, other),
|
|
220
|
+
}, other), {}, {
|
|
221
|
+
children: [t10, t18]
|
|
222
|
+
}));
|
|
219
223
|
$[10] = Component;
|
|
220
224
|
$[11] = Surface;
|
|
221
225
|
$[12] = active;
|
|
@@ -223,28 +227,29 @@ const Tab = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
223
227
|
$[14] = onBlur;
|
|
224
228
|
$[15] = onFocus;
|
|
225
229
|
$[16] = other;
|
|
226
|
-
$[17] =
|
|
227
|
-
$[18] =
|
|
228
|
-
$[19] =
|
|
229
|
-
$[20] =
|
|
230
|
-
$[21] =
|
|
231
|
-
$[22] =
|
|
232
|
-
$[23] =
|
|
233
|
-
$[24] = t19;
|
|
230
|
+
$[17] = t10;
|
|
231
|
+
$[18] = t18;
|
|
232
|
+
$[19] = t7;
|
|
233
|
+
$[20] = t9;
|
|
234
|
+
$[21] = tonal;
|
|
235
|
+
$[22] = value;
|
|
236
|
+
$[23] = t19;
|
|
234
237
|
} else {
|
|
235
|
-
t19 = $[
|
|
238
|
+
t19 = $[23];
|
|
236
239
|
}
|
|
237
240
|
let t20;
|
|
238
|
-
if ($[
|
|
239
|
-
t20 = /*#__PURE__*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
241
|
+
if ($[24] !== Wrapper || $[25] !== t19 || $[26] !== wrapperProps) {
|
|
242
|
+
t20 = /*#__PURE__*/_jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
243
|
+
children: t19
|
|
244
|
+
}));
|
|
245
|
+
$[24] = Wrapper;
|
|
246
|
+
$[25] = t19;
|
|
247
|
+
$[26] = wrapperProps;
|
|
248
|
+
$[27] = t20;
|
|
244
249
|
} else {
|
|
245
|
-
t20 = $[
|
|
250
|
+
t20 = $[27];
|
|
246
251
|
}
|
|
247
252
|
return t20;
|
|
248
|
-
}
|
|
253
|
+
};
|
|
249
254
|
Tab.displayName = 'onesy-Tab';
|
|
250
255
|
export default Tab;
|
package/esm/Table/Table.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 = ["tonal", "color", "size", "elevation", "header", "footer", "WrapperComponentProps", "TableComponent", "WrapperComponent", "Component", "className", "children"];
|
|
@@ -10,6 +9,7 @@ import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-re
|
|
|
10
9
|
import SurfaceElement from '../Surface';
|
|
11
10
|
import LineElement from '../Line';
|
|
12
11
|
import { staticClassName } from '../utils';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const useStyle = styleMethod(theme => ({
|
|
14
14
|
root: _objectSpread({
|
|
15
15
|
borderRadius: `${theme.shape.radius.unit * 2}px`,
|
|
@@ -29,7 +29,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
29
29
|
}), {
|
|
30
30
|
name: 'onesy-Table'
|
|
31
31
|
});
|
|
32
|
-
const Table =
|
|
32
|
+
const Table = props_ => {
|
|
33
33
|
const $ = _c(14);
|
|
34
34
|
const theme = useOnesyTheme();
|
|
35
35
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTable?.props?.default), props_);
|
|
@@ -70,9 +70,10 @@ const Table = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
70
70
|
}));
|
|
71
71
|
let t11;
|
|
72
72
|
if ($[0] !== TableComponent || $[1] !== t10 || $[2] !== t9) {
|
|
73
|
-
t11 = /*#__PURE__*/
|
|
74
|
-
className: t9
|
|
75
|
-
|
|
73
|
+
t11 = /*#__PURE__*/_jsx(TableComponent, {
|
|
74
|
+
className: t9,
|
|
75
|
+
children: t10
|
|
76
|
+
});
|
|
76
77
|
$[0] = TableComponent;
|
|
77
78
|
$[1] = t10;
|
|
78
79
|
$[2] = t9;
|
|
@@ -82,9 +83,10 @@ const Table = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
82
83
|
}
|
|
83
84
|
let t12;
|
|
84
85
|
if ($[4] !== WrapperComponent || $[5] !== WrapperComponentProps || $[6] !== t11 || $[7] !== t8) {
|
|
85
|
-
t12 = /*#__PURE__*/
|
|
86
|
-
className: t8
|
|
87
|
-
|
|
86
|
+
t12 = /*#__PURE__*/_jsx(WrapperComponent, _objectSpread(_objectSpread({}, WrapperComponentProps), {}, {
|
|
87
|
+
className: t8,
|
|
88
|
+
children: t11
|
|
89
|
+
}));
|
|
88
90
|
$[4] = WrapperComponent;
|
|
89
91
|
$[5] = WrapperComponentProps;
|
|
90
92
|
$[6] = t11;
|
|
@@ -108,8 +110,7 @@ const Table = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
108
110
|
} else {
|
|
109
111
|
t13 = $[13];
|
|
110
112
|
}
|
|
111
|
-
return /*#__PURE__*/
|
|
112
|
-
ref: ref,
|
|
113
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
113
114
|
gap: 0,
|
|
114
115
|
direction: "column",
|
|
115
116
|
align: "unset",
|
|
@@ -123,11 +124,13 @@ const Table = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
123
124
|
Component
|
|
124
125
|
},
|
|
125
126
|
className: t7
|
|
126
|
-
}, other),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})
|
|
127
|
+
}, other), {}, {
|
|
128
|
+
children: [header && /*#__PURE__*/React.cloneElement(header, {
|
|
129
|
+
tonal: header.props.tonal !== undefined ? header.props.tonal : tonal,
|
|
130
|
+
color: header.props.color !== undefined ? header.props.color : color,
|
|
131
|
+
size: header.props.size !== undefined ? header.props.size : size
|
|
132
|
+
}), t12, t13]
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
132
135
|
Table.displayName = 'onesy-Table';
|
|
133
136
|
export default Table;
|
|
@@ -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 = ["tonal", "color", "size", "loading", "Component", "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 SurfaceElement from '../Surface';
|
|
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
|
display: 'table-row-group',
|
|
@@ -28,8 +28,8 @@ const useStyle = styleMethod(theme => ({
|
|
|
28
28
|
}), {
|
|
29
29
|
name: 'onesy-TableBody'
|
|
30
30
|
});
|
|
31
|
-
const TableBody =
|
|
32
|
-
const $ = _c(
|
|
31
|
+
const TableBody = props_ => {
|
|
32
|
+
const $ = _c(8);
|
|
33
33
|
const theme = useOnesyTheme();
|
|
34
34
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTableBody?.props?.default), props_);
|
|
35
35
|
const Surface = theme?.elements?.Surface || SurfaceElement;
|
|
@@ -67,28 +67,28 @@ const TableBody = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
67
67
|
position: "body"
|
|
68
68
|
}));
|
|
69
69
|
let t7;
|
|
70
|
-
if ($[0] !== Component || $[1] !== Surface || $[2] !== color || $[3] !== other || $[4] !==
|
|
71
|
-
t7 = /*#__PURE__*/
|
|
72
|
-
ref: ref,
|
|
70
|
+
if ($[0] !== Component || $[1] !== Surface || $[2] !== color || $[3] !== other || $[4] !== t5 || $[5] !== t6 || $[6] !== tonal) {
|
|
71
|
+
t7 = /*#__PURE__*/_jsx(Surface, _objectSpread(_objectSpread({
|
|
73
72
|
tonal: tonal,
|
|
74
73
|
color: color,
|
|
75
74
|
role: t4,
|
|
76
75
|
Component: Component,
|
|
77
76
|
className: t5
|
|
78
|
-
}, other),
|
|
77
|
+
}, other), {}, {
|
|
78
|
+
children: t6
|
|
79
|
+
}));
|
|
79
80
|
$[0] = Component;
|
|
80
81
|
$[1] = Surface;
|
|
81
82
|
$[2] = color;
|
|
82
83
|
$[3] = other;
|
|
83
|
-
$[4] =
|
|
84
|
-
$[5] =
|
|
85
|
-
$[6] =
|
|
86
|
-
$[7] =
|
|
87
|
-
$[8] = t7;
|
|
84
|
+
$[4] = t5;
|
|
85
|
+
$[5] = t6;
|
|
86
|
+
$[6] = tonal;
|
|
87
|
+
$[7] = t7;
|
|
88
88
|
} else {
|
|
89
|
-
t7 = $[
|
|
89
|
+
t7 = $[7];
|
|
90
90
|
}
|
|
91
91
|
return t7;
|
|
92
|
-
}
|
|
92
|
+
};
|
|
93
93
|
TableBody.displayName = 'onesy-TableBody';
|
|
94
94
|
export default TableBody;
|
|
@@ -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", "position", "align", "justify", "noWeight", "sort", "sortedBy", "sortedByDefault", "onSort", "sticky", "stickyPosition", "stickyOffset", "timeout", "disabled", "IconArrow", "IconButtonSortProps", "TypeProps", "DividerProps", "Component", "className", "style", "children"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "size", "position", "align", "justify", "noWeight", "sort", "sortedBy", "sortedByDefault", "onSort", "sticky", "stickyPosition", "stickyOffset", "timeout", "disabled", "IconArrow", "IconButtonSortProps", "TypeProps", "DividerProps", "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';
|
|
@@ -15,6 +14,7 @@ import DividerElement from '../Divider';
|
|
|
15
14
|
import { staticClassName } from '../utils';
|
|
16
15
|
import Tooltip from '../Tooltip';
|
|
17
16
|
import useResize from '../useResize';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
const useStyle = styleMethod(theme => ({
|
|
19
19
|
root: _objectSpread(_objectSpread({
|
|
20
20
|
display: 'table-cell',
|
|
@@ -120,7 +120,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
120
120
|
}), {
|
|
121
121
|
name: 'onesy-TableCell'
|
|
122
122
|
});
|
|
123
|
-
const TableCell =
|
|
123
|
+
const TableCell = props_ => {
|
|
124
124
|
const theme = useOnesyTheme();
|
|
125
125
|
const l = theme.l;
|
|
126
126
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTableCell?.props?.default), props_);
|
|
@@ -129,6 +129,7 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
129
129
|
const IconButton = theme?.elements?.IconButton || IconButtonElement;
|
|
130
130
|
const Divider = theme?.elements?.Divider || DividerElement;
|
|
131
131
|
const {
|
|
132
|
+
ref,
|
|
132
133
|
tonal = true,
|
|
133
134
|
color,
|
|
134
135
|
size = 'regular',
|
|
@@ -271,7 +272,7 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
271
272
|
stylesOther[stickyPosition === 'left' ? 'left' : 'right'] = offset + (stickyOffset !== undefined ? stickyOffset : 0);
|
|
272
273
|
if (position === 'head') stylesOther.zIndex = '17';
|
|
273
274
|
}
|
|
274
|
-
return /*#__PURE__*/
|
|
275
|
+
return /*#__PURE__*/_jsxs(Component, _objectSpread(_objectSpread({
|
|
275
276
|
ref: item_3 => {
|
|
276
277
|
if (ref) {
|
|
277
278
|
if (is('function', ref)) ref(item_3);
|
|
@@ -283,31 +284,37 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
283
284
|
role: "cell",
|
|
284
285
|
className: classNames([staticClassName('TableCell', theme) && [`onesy-TableCell-root`, `onesy-TableCell-size-${size}`, sticky && `onesy-TableCell-sticky`, stickyPosition && `onesy-TableCell-sticky-position-${stickyPosition}`, stickyActive && `onesy-TableHead-sticky-active`], className, classes.root, position === 'head' ? classes.head : classes.body, noWeight && classes.noWeight, sticky && [classes.sticky, classes[`sticky_${stickyPosition}`]], stickyActive && classes[`stickyActive_${stickyPosition}`]]),
|
|
285
286
|
style: _objectSpread(_objectSpread({}, style), stylesOther)
|
|
286
|
-
}, other),
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
})
|
|
287
|
+
}, other), {}, {
|
|
288
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
289
|
+
gap: 0,
|
|
290
|
+
direction: "row",
|
|
291
|
+
align: align,
|
|
292
|
+
justify: justify,
|
|
293
|
+
className: classNames([staticClassName('TableCell', theme) && [`onesy-TableCell-value`], classes.value, classes[`size_${size}`], sort !== undefined && classes.sort]),
|
|
294
|
+
children: [is('simple', children) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
295
|
+
version: "l2",
|
|
296
|
+
tabIndex: sort !== undefined ? 0 : undefined
|
|
297
|
+
}, TypeProps), {}, {
|
|
298
|
+
className: classNames([staticClassName('TableCell', theme) && [`onesy-TableCell-value-type`], TypeProps?.className]),
|
|
299
|
+
children: children
|
|
300
|
+
})) : children && /*#__PURE__*/React.cloneElement(children, {
|
|
301
|
+
tabIndex: sort !== undefined ? 0 : undefined
|
|
302
|
+
}), sort && /*#__PURE__*/_jsx(Tooltip, {
|
|
303
|
+
name: sortedBy === 'asc' ? l('Ascending') : l('Descending'),
|
|
304
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
305
|
+
size: "small",
|
|
306
|
+
onClick: onSort,
|
|
307
|
+
disabled: disabled,
|
|
308
|
+
className: classNames([staticClassName('TableCell', theme) && [`onesy-TableCell-sort-icon-button`], classes.sortedBy, classes[`sortedBy_${sortedBy}`]]),
|
|
309
|
+
children: /*#__PURE__*/_jsx(IconArrow, {})
|
|
310
|
+
})
|
|
311
|
+
})]
|
|
312
|
+
}), /*#__PURE__*/_jsx(Divider, _objectSpread(_objectSpread({
|
|
313
|
+
color: "inherit"
|
|
314
|
+
}, DividerProps), {}, {
|
|
315
|
+
className: classNames([DividerProps?.className, classes.divider])
|
|
316
|
+
}))]
|
|
317
|
+
}));
|
|
318
|
+
};
|
|
312
319
|
TableCell.displayName = 'onesy-TableCell';
|
|
313
320
|
export default TableCell;
|
|
@@ -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 = ["tonal", "color", "size", "Component", "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 SurfaceElement from '../Surface';
|
|
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
|
size_small: {
|
|
@@ -23,8 +23,8 @@ const useStyle = styleMethod(theme => ({
|
|
|
23
23
|
}), {
|
|
24
24
|
name: 'onesy-TableFooter'
|
|
25
25
|
});
|
|
26
|
-
const TableFooter =
|
|
27
|
-
const $ = _c(
|
|
26
|
+
const TableFooter = props_ => {
|
|
27
|
+
const $ = _c(8);
|
|
28
28
|
const theme = useOnesyTheme();
|
|
29
29
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTableFooter?.props?.default), props_);
|
|
30
30
|
const Surface = theme?.elements?.Surface || SurfaceElement;
|
|
@@ -46,27 +46,27 @@ const TableFooter = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
46
46
|
} = useStyle();
|
|
47
47
|
const t4 = classNames([staticClassName("TableFooter", theme) && ["onesy-TableFooter-root", `onesy-TableFooter-size-${size}`], className, classes.root, classes[`size_${size}`]]);
|
|
48
48
|
let t5;
|
|
49
|
-
if ($[0] !== Component || $[1] !== Surface || $[2] !== children || $[3] !== color || $[4] !== other || $[5] !==
|
|
50
|
-
t5 = /*#__PURE__*/
|
|
51
|
-
ref: ref,
|
|
49
|
+
if ($[0] !== Component || $[1] !== Surface || $[2] !== children || $[3] !== color || $[4] !== other || $[5] !== t4 || $[6] !== tonal) {
|
|
50
|
+
t5 = /*#__PURE__*/_jsx(Surface, _objectSpread(_objectSpread({
|
|
52
51
|
tonal: tonal,
|
|
53
52
|
color: color,
|
|
54
53
|
Component: Component,
|
|
55
54
|
className: t4
|
|
56
|
-
}, other),
|
|
55
|
+
}, other), {}, {
|
|
56
|
+
children: children
|
|
57
|
+
}));
|
|
57
58
|
$[0] = Component;
|
|
58
59
|
$[1] = Surface;
|
|
59
60
|
$[2] = children;
|
|
60
61
|
$[3] = color;
|
|
61
62
|
$[4] = other;
|
|
62
|
-
$[5] =
|
|
63
|
-
$[6] =
|
|
64
|
-
$[7] =
|
|
65
|
-
$[8] = t5;
|
|
63
|
+
$[5] = t4;
|
|
64
|
+
$[6] = tonal;
|
|
65
|
+
$[7] = t5;
|
|
66
66
|
} else {
|
|
67
|
-
t5 = $[
|
|
67
|
+
t5 = $[7];
|
|
68
68
|
}
|
|
69
69
|
return t5;
|
|
70
|
-
}
|
|
70
|
+
};
|
|
71
71
|
TableFooter.displayName = 'onesy-TableFooter';
|
|
72
72
|
export default TableFooter;
|