@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/Tabs/Tabs.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -21,7 +20,8 @@ var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
|
21
20
|
var _Divider = _interopRequireDefault(require("../Divider"));
|
|
22
21
|
var _useMediaQuery = _interopRequireDefault(require("../useMediaQuery"));
|
|
23
22
|
var _utils2 = require("../utils");
|
|
24
|
-
|
|
23
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
+
const _excluded = ["ref", "tonal", "color", "version", "value", "valueDefault", "onChange", "isActive", "activateOnFocus", "align", "justify", "orientation", "size", "initialLineUpdateTimeout", "arrows", "arrowsMobile", "fixed", "noDivider", "IconStart", "IconEnd", "IconTop", "IconBottom", "SurfaceProps", "Component", "className", "children"];
|
|
25
25
|
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; }
|
|
26
26
|
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) { (0, _defineProperty2.default)(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; }
|
|
27
27
|
const useStyle = (0, _styleReact.style)(theme => ({
|
|
@@ -156,7 +156,7 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
156
156
|
}), {
|
|
157
157
|
name: 'onesy-Tabs'
|
|
158
158
|
});
|
|
159
|
-
const Tabs =
|
|
159
|
+
const Tabs = props_ => {
|
|
160
160
|
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _refs$tabsRoot$curren3, _refs$tabsRoot$curren4, _refs$tabsRoot$curren5, _refs$tabsRoot$curren6, _refs$tabsRoot$curren7, _refs$tabsRoot$curren8, _refs$tabsRoot$curren9;
|
|
161
161
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
162
162
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.all) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.props) === null || _theme$ui === void 0 ? void 0 : _theme$ui.default), theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.onesyTabs) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
@@ -165,6 +165,7 @@ const Tabs = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
165
165
|
const IconButton = (theme === null || theme === void 0 || (_theme$elements3 = theme.elements) === null || _theme$elements3 === void 0 ? void 0 : _theme$elements3.IconButton) || _IconButton.default;
|
|
166
166
|
const Divider = (theme === null || theme === void 0 || (_theme$elements4 = theme.elements) === null || _theme$elements4 === void 0 ? void 0 : _theme$elements4.Divider) || _Divider.default;
|
|
167
167
|
const {
|
|
168
|
+
ref,
|
|
168
169
|
tonal = true,
|
|
169
170
|
color = 'primary',
|
|
170
171
|
version = 'primary',
|
|
@@ -337,18 +338,20 @@ const Tabs = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
337
338
|
const propPosition = orientation === 'horizontal' ? 'left' : 'top';
|
|
338
339
|
const propMain = orientation === 'horizontal' ? 'width' : 'height';
|
|
339
340
|
const useArrows = arrows && (!mobile || arrowsMobile);
|
|
340
|
-
const ArrowPre = /*#__PURE__*/
|
|
341
|
+
const ArrowPre = /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
341
342
|
color: "inherit",
|
|
342
343
|
onClick: () => move(false),
|
|
343
344
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-arrow'], classes.arrow]),
|
|
344
|
-
disabled: ((_refs$tabsRoot$curren3 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren3 === void 0 ? void 0 : _refs$tabsRoot$curren3[orientation === 'horizontal' ? 'scrollLeft' : 'scrollTop']) === 0
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
disabled: ((_refs$tabsRoot$curren3 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren3 === void 0 ? void 0 : _refs$tabsRoot$curren3[orientation === 'horizontal' ? 'scrollLeft' : 'scrollTop']) === 0,
|
|
346
|
+
children: orientation === 'horizontal' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(IconStart, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(IconTop, {})
|
|
347
|
+
});
|
|
348
|
+
const ArrowPost = /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
347
349
|
color: "inherit",
|
|
348
350
|
onClick: () => move(),
|
|
349
351
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-arrow'], classes.arrow]),
|
|
350
|
-
disabled: orientation === 'horizontal' ? Math.ceil(((_refs$tabsRoot$curren4 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren4 === void 0 ? void 0 : _refs$tabsRoot$curren4.clientWidth) + ((_refs$tabsRoot$curren5 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren5 === void 0 ? void 0 : _refs$tabsRoot$curren5.scrollLeft)) === ((_refs$tabsRoot$curren6 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren6 === void 0 ? void 0 : _refs$tabsRoot$curren6.scrollWidth) : Math.ceil(((_refs$tabsRoot$curren7 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren7 === void 0 ? void 0 : _refs$tabsRoot$curren7.clientHeight) + ((_refs$tabsRoot$curren8 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren8 === void 0 ? void 0 : _refs$tabsRoot$curren8.scrollTop)) === ((_refs$tabsRoot$curren9 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren9 === void 0 ? void 0 : _refs$tabsRoot$curren9.scrollHeight)
|
|
351
|
-
|
|
352
|
+
disabled: orientation === 'horizontal' ? Math.ceil(((_refs$tabsRoot$curren4 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren4 === void 0 ? void 0 : _refs$tabsRoot$curren4.clientWidth) + ((_refs$tabsRoot$curren5 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren5 === void 0 ? void 0 : _refs$tabsRoot$curren5.scrollLeft)) === ((_refs$tabsRoot$curren6 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren6 === void 0 ? void 0 : _refs$tabsRoot$curren6.scrollWidth) : Math.ceil(((_refs$tabsRoot$curren7 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren7 === void 0 ? void 0 : _refs$tabsRoot$curren7.clientHeight) + ((_refs$tabsRoot$curren8 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren8 === void 0 ? void 0 : _refs$tabsRoot$curren8.scrollTop)) === ((_refs$tabsRoot$curren9 = refs.tabsRoot.current) === null || _refs$tabsRoot$curren9 === void 0 ? void 0 : _refs$tabsRoot$curren9.scrollHeight),
|
|
353
|
+
children: orientation === 'horizontal' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(IconEnd, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(IconBottom, {})
|
|
354
|
+
});
|
|
352
355
|
const TabElements = _react.default.Children.toArray(children).filter(item_0 => {
|
|
353
356
|
var _item_0$type;
|
|
354
357
|
return item_0 === null || item_0 === void 0 || (_item_0$type = item_0.type) === null || _item_0$type === void 0 || (_item_0$type = _item_0$type.displayName) === null || _item_0$type === void 0 ? void 0 : _item_0$type.endsWith('Tab');
|
|
@@ -357,7 +360,7 @@ const Tabs = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
357
360
|
const valueItem_0 = item_1.props.value !== undefined ? item_1.props.value : index_0;
|
|
358
361
|
return (0, _utils.is)('function', refs.isActive.current) ? refs.isActive.current(value, valueItem_0) : value === valueItem_0;
|
|
359
362
|
});
|
|
360
|
-
return /*#__PURE__*/
|
|
363
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Surface, _objectSpread(_objectSpread(_objectSpread({
|
|
361
364
|
ref: item_2 => {
|
|
362
365
|
if (ref) {
|
|
363
366
|
if ((0, _utils.is)('function', ref)) ref(item_2);else ref.current = item_2;
|
|
@@ -376,45 +379,48 @@ const Tabs = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
376
379
|
AdditionalProps: {
|
|
377
380
|
Component
|
|
378
381
|
}
|
|
379
|
-
}, SurfaceProps, {
|
|
382
|
+
}, SurfaceProps), {}, {
|
|
380
383
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-root', `onesy-Tabs-version-${version}`, `onesy-Tabs-size-${size}`], SurfaceProps === null || SurfaceProps === void 0 ? void 0 : SurfaceProps.className, className, classes.root, classes[`size_${size}`], classes[`orientation_${orientation}`], fixed && classes.fixed])
|
|
381
|
-
}, other),
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
})
|
|
384
|
+
}, other), {}, {
|
|
385
|
+
children: [useArrows && ArrowPre, !noDivider && /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
|
|
386
|
+
tonal: tonal,
|
|
387
|
+
color: color,
|
|
388
|
+
orientation: orientation,
|
|
389
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-divider'], classes.divider, classes[`divider_orientation_${orientation}`]])
|
|
390
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
391
|
+
ref: refs.tabsRoot,
|
|
392
|
+
gap: 0,
|
|
393
|
+
direction: direction,
|
|
394
|
+
align: "flex-start",
|
|
395
|
+
justify: "flex-start",
|
|
396
|
+
onScroll: onScroll,
|
|
397
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-tabs'], classes.tabs, classes[`tabs_orientation_${orientation}`]]),
|
|
398
|
+
children: [tabActive && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
399
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Tabs', theme) && ['onesy-Tabs-line'], classes.line, classes[`line_version_${version}_size_${size}_orientation_${orientation}`], orientation === 'vertical' && theme.direction === 'rtl' && classes[`line_version_${version}_orientation_vertical_rtl`]]),
|
|
400
|
+
style: {
|
|
401
|
+
[propPosition]: orientation === 'horizontal' ? lineValues.x : lineValues.y,
|
|
402
|
+
[propMain]: lineValues[propMain]
|
|
403
|
+
}
|
|
404
|
+
}), TabElements.map((item_3, index_1) => {
|
|
405
|
+
const valueItem_1 = item_3.props.value !== undefined ? item_3.props.value : index_1;
|
|
406
|
+
return /*#__PURE__*/_react.default.cloneElement(item_3, {
|
|
407
|
+
tonal: item_3.props.tonal !== undefined ? item_3.props.tonal : tonal,
|
|
408
|
+
color: item_3.props.color !== undefined ? item_3.props.color : color,
|
|
409
|
+
version: item_3.props.version !== undefined ? item_3.props.version : version,
|
|
410
|
+
value: item_3.props.value !== undefined ? item_3.props.value : index_1,
|
|
411
|
+
size: item_3.props.size !== undefined ? item_3.props.size : size,
|
|
412
|
+
index: index_1,
|
|
413
|
+
onChange,
|
|
414
|
+
activateOnFocus: item_3.props.activateOnFocus !== undefined ? item_3.props.activateOnFocus : activateOnFocus,
|
|
415
|
+
active: (0, _utils.is)('function', refs.isActive.current) ? refs.isActive.current(value, valueItem_1) : value === valueItem_1,
|
|
416
|
+
onClick: event_0 => {
|
|
417
|
+
onChange(valueItem_1, index_1);
|
|
418
|
+
if ((0, _utils.is)('function', item_3.props.onClick)) item_3.props.onClick(event_0);
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
})]
|
|
422
|
+
}), useArrows && ArrowPost]
|
|
423
|
+
}));
|
|
424
|
+
};
|
|
419
425
|
Tabs.displayName = 'onesy-Tabs';
|
|
420
426
|
var _default = exports.default = Tabs;
|
package/Text/Text.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,7 +14,8 @@ var _Type = _interopRequireDefault(require("../Type"));
|
|
|
15
14
|
var _Line = _interopRequireDefault(require("../Line"));
|
|
16
15
|
var _useMediaQuery = _interopRequireDefault(require("../useMediaQuery"));
|
|
17
16
|
var _utils2 = require("../utils");
|
|
18
|
-
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
const _excluded = ["ref", "value", "columns", "responsive", "divider", "top", "bottom", "start", "end", "TypeProps", "HorizontalProps", "className", "children"];
|
|
19
19
|
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; }
|
|
20
20
|
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) { (0, _defineProperty2.default)(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; }
|
|
21
21
|
const useStyle = (0, _styleReact.style)(theme => ({
|
|
@@ -41,13 +41,14 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
41
41
|
}), {
|
|
42
42
|
name: 'onesy-Text'
|
|
43
43
|
});
|
|
44
|
-
const Text =
|
|
44
|
+
const Text = props_ => {
|
|
45
45
|
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2;
|
|
46
46
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
47
47
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.all) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.props) === null || _theme$ui === void 0 ? void 0 : _theme$ui.default), theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.onesyText) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
48
48
|
const Line = (theme === null || theme === void 0 || (_theme$elements = theme.elements) === null || _theme$elements === void 0 ? void 0 : _theme$elements.Line) || _Line.default;
|
|
49
49
|
const Type = (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Type) || _Type.default;
|
|
50
50
|
const {
|
|
51
|
+
ref,
|
|
51
52
|
value: value_,
|
|
52
53
|
columns: columns_,
|
|
53
54
|
responsive = true,
|
|
@@ -97,15 +98,15 @@ const Text = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
97
98
|
}
|
|
98
99
|
let value = value_ !== undefined ? value_ : children;
|
|
99
100
|
value = (0, _utils.is)('string', value) ? (0, _utils.textToInnerHTML)(value) : '';
|
|
100
|
-
const main = /*#__PURE__*/
|
|
101
|
+
const main = /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, _objectSpread(_objectSpread({
|
|
101
102
|
version: "b2"
|
|
102
|
-
}, TypeProps, {
|
|
103
|
+
}, TypeProps), {}, {
|
|
103
104
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Text', theme) && ['onesy-Text-type'], TypeProps === null || TypeProps === void 0 ? void 0 : TypeProps.className, classes.type, divider && classes.divider, classes[`column_${columns}`]]),
|
|
104
105
|
dangerouslySetInnerHTML: {
|
|
105
106
|
__html: value
|
|
106
107
|
}
|
|
107
108
|
}));
|
|
108
|
-
return /*#__PURE__*/
|
|
109
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, _objectSpread(_objectSpread({
|
|
109
110
|
ref: item_0 => {
|
|
110
111
|
if (ref) {
|
|
111
112
|
if ((0, _utils.is)('function', ref)) ref(item_0);else ref.current = item_0;
|
|
@@ -117,12 +118,15 @@ const Text = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
117
118
|
align: "unset",
|
|
118
119
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Text', theme) && ['onesy-Text-root'], className, classes.root]),
|
|
119
120
|
fullWidth: true
|
|
120
|
-
}, other),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
}, other), {}, {
|
|
122
|
+
children: [top, /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, _objectSpread(_objectSpread({
|
|
123
|
+
direction: "row",
|
|
124
|
+
fullWidth: true
|
|
125
|
+
}, HorizontalProps), {}, {
|
|
126
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Text', theme) && ['onesy-Text-main'], HorizontalProps === null || HorizontalProps === void 0 ? void 0 : HorizontalProps.className, classes.main]),
|
|
127
|
+
children: main
|
|
128
|
+
})), bottom]
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
127
131
|
Text.displayName = 'onesy-Text';
|
|
128
132
|
var _default = exports.default = Text;
|
package/TextField/TextField.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -20,7 +19,8 @@ var _Type = _interopRequireDefault(require("../Type"));
|
|
|
20
19
|
var _Line = _interopRequireDefault(require("../Line"));
|
|
21
20
|
var _useMediaQuery = _interopRequireDefault(require("../useMediaQuery"));
|
|
22
21
|
var _utils2 = require("../utils");
|
|
23
|
-
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
const _excluded = ["ref", "tonal", "color", "version", "size", "rootRef", "valueDefault", "value", "onChange", "name", "label", "align", "start", "startVerticalAlign", "end", "endVerticalAlign", "placeholder", "fullWidth", "helperText", "counter", "prefix", "sufix", "noPrefixMargin", "noSufixMargin", "enabled", "autoFocus", "autoComplete", "type", "required", "optional", "optionalText", "error", "multiline", "rows", "minRows", "maxRows", "clear", "focus", "footer", "subscription", "controlled", "minimal", "restoreSelection", "minWidth", "readOnly", "disabled", "onInput", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "inputProps", "InputWrapperProps", "HelperTextProps", "IconProps", "IconClear", "InputComponent", "WrapperComponent", "Component", "className", "style", "children", "colorUnchecked"];
|
|
24
24
|
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; }
|
|
25
25
|
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) { (0, _defineProperty2.default)(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; }
|
|
26
26
|
const useStyle = (0, _styleReact.style)(theme => {
|
|
@@ -485,7 +485,7 @@ const useStyle = (0, _styleReact.style)(theme => {
|
|
|
485
485
|
}, {
|
|
486
486
|
name: 'onesy-TextField'
|
|
487
487
|
});
|
|
488
|
-
const TextField =
|
|
488
|
+
const TextField = props_ => {
|
|
489
489
|
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _ComponentProps, _type, _type2, _String;
|
|
490
490
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
491
491
|
const l = theme.l;
|
|
@@ -495,6 +495,7 @@ const TextField = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
495
495
|
const Tooltip = (theme === null || theme === void 0 || (_theme$elements3 = theme.elements) === null || _theme$elements3 === void 0 ? void 0 : _theme$elements3.Tooltip) || _Tooltip.default;
|
|
496
496
|
const IconButton = (theme === null || theme === void 0 || (_theme$elements4 = theme.elements) === null || _theme$elements4 === void 0 ? void 0 : _theme$elements4.IconButton) || _IconButton.default;
|
|
497
497
|
const {
|
|
498
|
+
ref,
|
|
498
499
|
tonal = true,
|
|
499
500
|
color = 'primary',
|
|
500
501
|
version = 'filled',
|
|
@@ -824,126 +825,149 @@ const TextField = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
824
825
|
if (value && clear) {
|
|
825
826
|
const exists = end === null || end === void 0 ? void 0 : end.find(item_3 => item_3.key === refs.ids.clear);
|
|
826
827
|
if (!exists) {
|
|
827
|
-
end.push(/*#__PURE__*/
|
|
828
|
-
key: refs.ids.clear,
|
|
828
|
+
end.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(IconClear, _objectSpread(_objectSpread({
|
|
829
829
|
color: "inherit",
|
|
830
830
|
onClick: onClear
|
|
831
|
-
}, IconProps, {
|
|
831
|
+
}, IconProps), {}, {
|
|
832
832
|
className: (0, _styleReact.classNames)([IconProps === null || IconProps === void 0 ? void 0 : IconProps.className, classes.clear])
|
|
833
|
-
})));
|
|
833
|
+
}), refs.ids.clear));
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
if (value && isTypePassword) {
|
|
837
|
-
end.unshift(/*#__PURE__*/
|
|
837
|
+
end.unshift(/*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, {
|
|
838
838
|
name: visible ? l('Hide password') : l('View password'),
|
|
839
|
-
color: "inverted"
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
839
|
+
color: "inverted",
|
|
840
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
841
|
+
onClick: onToggleVisible,
|
|
842
|
+
color: "default",
|
|
843
|
+
size: size === 'large' ? 'regular' : 'small',
|
|
844
|
+
children: visible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconMaterialPassword2OffW.default, _objectSpread({}, iconProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconMaterialPassword2W.default, _objectSpread({}, iconProps))
|
|
845
|
+
})
|
|
846
|
+
}));
|
|
845
847
|
}
|
|
846
848
|
if (!multiline) {
|
|
847
849
|
if (props.startVerticalAlign === undefined) startVerticalAlign = version === 'text' ? 'end' : 'center';
|
|
848
850
|
if (props.endVerticalAlign === undefined) endVerticalAlign = version === 'text' ? 'end' : 'center';
|
|
849
851
|
}
|
|
850
852
|
const valueWithData = value !== undefined && String(value);
|
|
851
|
-
return /*#__PURE__*/
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
})
|
|
853
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, _objectSpread(_objectSpread({}, WrapperProps), {}, {
|
|
854
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, _objectSpread(_objectSpread({
|
|
855
|
+
onMouseEnter: onMouseEnter,
|
|
856
|
+
onMouseLeave: onMouseLeave,
|
|
857
|
+
onTouchStart: onMouseEnter,
|
|
858
|
+
onTouchEnd: onMouseLeave,
|
|
859
|
+
role: "textbox",
|
|
860
|
+
"aria-multiline": multiline,
|
|
861
|
+
"aria-labelledby": refs.ids.label
|
|
862
|
+
}, ComponentProps), {}, {
|
|
863
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-root',, `onesy-TextField-version-${version}`, `onesy-TextField-size-${size}`, multiline && `onesy-TextField-multiline`, valueWithData && 'onesy-TextField-value', error && `onesy-TextField-error`, required && 'onesy-TextField-required', enabled && 'onesy-TextField-enabled', hover && `onesy-TextField-hover`, mouseDown && `onesy-TextField-mouse-down`, focus && `onesy-TextField-focus`, readOnly && `onesy-TextField-read-only`, disabled && 'onesy-TextField-disabled', fullWidth && 'onesy-full-width'], ComponentProps.className, classes.root, classes[`color_${color}`], fullWidth && classes.fullWidth, error && (hover ? classes.error_hover_color : classes.error_color), !footer && disabled && classes.disabled]),
|
|
864
|
+
style: _objectSpread({
|
|
865
|
+
minWidth
|
|
866
|
+
}, (_ComponentProps = ComponentProps) === null || _ComponentProps === void 0 ? void 0 : _ComponentProps.style),
|
|
867
|
+
children: [!minimal && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
868
|
+
children: [['filled'].includes(version) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
869
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-background'], classes.background, (enabled || valueWithData || focus) && classes.background_focus, hover && classes.background_hover]),
|
|
870
|
+
style: styles.background
|
|
871
|
+
}), ['text', 'filled'].includes(version) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
872
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-border'], classes.border, focus && classes.border_focus]),
|
|
873
|
+
style: styles.border
|
|
874
|
+
}), ['outlined'].includes(version) && /*#__PURE__*/(0, _jsxRuntime.jsx)("fieldset", {
|
|
875
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-fieldset'], classes.fieldset, focus && classes.fieldset_focus]),
|
|
876
|
+
style: styles.fieldset,
|
|
877
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("legend", {
|
|
878
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-legend'], classes.legend, (enabled || valueWithData || focus) && label !== undefined && classes.legend_focus]),
|
|
879
|
+
children: [label, required ? '*' : '', optional ? ` (${optionalText})` : '']
|
|
880
|
+
})
|
|
881
|
+
})]
|
|
882
|
+
}), label && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Type, {
|
|
883
|
+
version: ['small', 'regular'].includes(size) ? 'b2' : 'b1',
|
|
884
|
+
id: refs.ids.label,
|
|
885
|
+
Component: "label",
|
|
886
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-label'], classes.label, classes[`label_${multiline ? 'multiline' : 'regular'}`], classes[`label_version_${version}`], classes[`label_size_${size}`], multiline && classes[`label_size_${size}_multiline`], classes[`label_version_${version}_size_${size}`], (enabled || valueWithData || focus) && [classes[`label_focus`], classes[`label_version_${version}_focus`], classes[`label_version_${version}_size_${size}${multiline ? '_multiline' : ''}_focus`], multiline && classes.label_multiline_focus], theme.direction === 'rtl' && classes.label_rtl, start && [classes.label_icon_start, classes[`label_version_${version}_icon_start`]]]),
|
|
887
|
+
children: [label, required ? '*' : '', optional ? ` (${optionalText})` : '']
|
|
888
|
+
}), !minimal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
889
|
+
children: !!_react.default.Children.toArray(start).length && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
890
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-icon', 'onesy-TextField-icon-start'], classes.icon, classes.icon_start, classes[`icon${start !== null && start !== void 0 && (_type = start.type) !== null && _type !== void 0 && (_type = _type.displayName) !== null && _type !== void 0 && _type.includes('IconButton') ? '_button' : ''}_size_${size}`], classes[`icon_version_${version}`], classes[`icon_version_${version}_size_${size}`], classes[`icon_vertical_align_${startVerticalAlign}`]]),
|
|
891
|
+
children: _react.default.Children.toArray(start).map((item_4, index) => {
|
|
892
|
+
var _item_4$props, _item_4$props2, _item_4$props3, _item_4$props4;
|
|
893
|
+
return /*#__PURE__*/_react.default.cloneElement(item_4, {
|
|
894
|
+
key: index,
|
|
895
|
+
size: ((_item_4$props = item_4.props) === null || _item_4$props === void 0 ? void 0 : _item_4$props.size) !== undefined ? (_item_4$props2 = item_4.props) === null || _item_4$props2 === void 0 ? void 0 : _item_4$props2.size : 'regular',
|
|
896
|
+
color: ((_item_4$props3 = item_4.props) === null || _item_4$props3 === void 0 ? void 0 : _item_4$props3.color) !== undefined ? (_item_4$props4 = item_4.props) === null || _item_4$props4 === void 0 ? void 0 : _item_4$props4.color : theme.palette.text.default.secondary,
|
|
897
|
+
style: _objectSpread(_objectSpread({}, item_4.props.style), styles.icon)
|
|
898
|
+
});
|
|
899
|
+
})
|
|
900
|
+
})
|
|
901
|
+
}), prefix !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
902
|
+
version: ['small', 'regular'].includes(size) ? 'b2' : 'b1',
|
|
903
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-addition', 'onesy-TextField-prefix'], classes.addition, classes.prefix, (start || version === 'text') && classes.prefix_noStartMargin, classes[`addition_size_${size}`], classes[`addition_version_${version}_size_${size}`], (enabled || valueWithData || focus) && classes.prefix_focus, noPrefixMargin && classes.noPrefixMargin, minimal && !label && classes[`addition_without_label_size_${size}`]]),
|
|
904
|
+
children: prefix
|
|
905
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({}, InputWrapperProps), {}, {
|
|
906
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-input-wrapper'], classes.inputWrapper, InputWrapperProps === null || InputWrapperProps === void 0 ? void 0 : InputWrapperProps.className, (enabled || label === undefined || valueWithData || focus) && classes.inputWrapper_focus, classes[`input_version_${version}`], classes[`inputWrapper_size_${size}`], classes[`input_version_${version}_size_${size}`], (prefix || start) && classes.input_start_icon, (sufix || end) && classes.input_end_icon, minimal && !label && classes[`inputWrapper_without_label_size_${size}`]]),
|
|
907
|
+
onClick: onInputWrapperClick,
|
|
908
|
+
onMouseUp: onInputWrapperMouseUp,
|
|
909
|
+
onMouseDown: onInputWrapperMouseDown,
|
|
910
|
+
style: _objectSpread(_objectSpread({}, styles.inputWrapper), InputWrapperProps.style),
|
|
911
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(InputComponent, _objectSpread(_objectSpread({}, inputProps), {}, {
|
|
912
|
+
ref: item_5 => {
|
|
913
|
+
if (ref) {
|
|
914
|
+
if ((0, _utils.is)('function', ref)) ref(item_5);else ref.current = item_5;
|
|
915
|
+
}
|
|
916
|
+
refs.input.current = item_5;
|
|
917
|
+
if (inputProps.ref) {
|
|
918
|
+
if ((0, _utils.is)('function', inputProps.ref)) inputProps.ref(item_5);else inputProps.ref.current = item_5;
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-input'], classes.input, classes[`input_size_${size}`], inputProps === null || inputProps === void 0 ? void 0 : inputProps.className, multiline && classes.multiline, align && classes[`input_align_${align}`]]),
|
|
922
|
+
onFocus: onFocus,
|
|
923
|
+
onBlur: onBlur,
|
|
924
|
+
placeholder: placeholder,
|
|
925
|
+
onChange: onUpdate,
|
|
926
|
+
value: value !== undefined ? value : '',
|
|
927
|
+
type: type === 'password' && visible ? 'text' : type,
|
|
928
|
+
autoFocus: autoFocus,
|
|
929
|
+
autoComplete: autoComplete,
|
|
930
|
+
readOnly: readOnly,
|
|
931
|
+
disabled: disabled,
|
|
932
|
+
style: _objectSpread(_objectSpread({}, styles.input), inputProps.style)
|
|
933
|
+
}))]
|
|
934
|
+
})), sufix !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
935
|
+
version: ['small', 'regular'].includes(size) ? 'b2' : 'b1',
|
|
936
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-addition', 'onesy-TextField-sufix'], classes.addition, classes.sufix, (end || version === 'text') && classes.sufix_noEndMargin, classes[`addition_size_${size}`], classes[`addition_version_${version}_size_${size}`], (enabled || valueWithData || focus) && classes.sufix_focus, noSufixMargin && classes.noSufixMargin]),
|
|
937
|
+
children: sufix
|
|
938
|
+
}), !minimal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
939
|
+
children: !!_react.default.Children.toArray(end).length && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
940
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-icon', 'onesy-TextField-icon-end'], classes.icon, classes.icon_end, classes[`icon${end !== null && end !== void 0 && (_type2 = end.type) !== null && _type2 !== void 0 && (_type2 = _type2.displayName) !== null && _type2 !== void 0 && _type2.includes('IconButton') ? '_button' : ''}_size_${size}`], classes[`icon_version_${version}`], classes[`icon_version_${version}_size_${size}`], classes[`icon_vertical_align_${endVerticalAlign}`]]),
|
|
941
|
+
children: _react.default.Children.toArray(end).map((item_6, index_0) => {
|
|
942
|
+
var _item_6$props, _item_6$props2, _item_6$props3, _item_6$props4;
|
|
943
|
+
return /*#__PURE__*/_react.default.cloneElement(item_6, {
|
|
944
|
+
key: index_0,
|
|
945
|
+
size: ((_item_6$props = item_6.props) === null || _item_6$props === void 0 ? void 0 : _item_6$props.size) !== undefined ? (_item_6$props2 = item_6.props) === null || _item_6$props2 === void 0 ? void 0 : _item_6$props2.size : size,
|
|
946
|
+
color: ((_item_6$props3 = item_6.props) === null || _item_6$props3 === void 0 ? void 0 : _item_6$props3.color) !== undefined ? (_item_6$props4 = item_6.props) === null || _item_6$props4 === void 0 ? void 0 : _item_6$props4.color : error ? theme.palette.light ? theme.palette.color.error[hover ? 20 : 40] : theme.palette.color.error[hover ? 90 : 80] : theme.palette.text.default.secondary,
|
|
947
|
+
style: _objectSpread(_objectSpread({}, item_6.props.style), styles.icon)
|
|
948
|
+
});
|
|
949
|
+
})
|
|
950
|
+
})
|
|
951
|
+
})]
|
|
952
|
+
})), footer && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
953
|
+
children: [(!!helperText || counter !== undefined || required) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
954
|
+
gap: 2,
|
|
955
|
+
direction: "row",
|
|
956
|
+
justify: "space-between",
|
|
957
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-footer'], classes.footer, classes[`footer_version_${version}`]]),
|
|
958
|
+
children: [(helperText || required) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, _objectSpread(_objectSpread({
|
|
959
|
+
version: ['small', 'regular'].includes(size) ? 'b3' : 'b2'
|
|
960
|
+
}, HelperTextProps), {}, {
|
|
961
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-helper-text', error && 'onesy-TextField-error'], HelperTextProps === null || HelperTextProps === void 0 ? void 0 : HelperTextProps.className, classes.helperText, error && classes.error_color]),
|
|
962
|
+
children: helperText !== undefined ? helperText : required ? `*${l('required')}` : ''
|
|
963
|
+
})), counter && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Type, {
|
|
964
|
+
version: ['small', 'regular'].includes(size) ? 'b3' : 'b2',
|
|
965
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('TextField', theme) && ['onesy-TextField-counter'], classes.counterText, error && classes.error_color]),
|
|
966
|
+
children: [((_String = String(value)) === null || _String === void 0 ? void 0 : _String.length) || 0, "/", counter]
|
|
967
|
+
})]
|
|
968
|
+
}), footer_]
|
|
969
|
+
})]
|
|
970
|
+
}));
|
|
971
|
+
};
|
|
948
972
|
TextField.displayName = 'onesy-TextField';
|
|
949
973
|
var _default = exports.default = TextField;
|