@onesy/ui-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +38 -0
- package/Accordion/Accordion.js +252 -0
- package/Accordion/index.d.ts +1 -0
- package/Accordion/index.js +8 -0
- package/Accordion/package.json +6 -0
- package/AdvancedTextField/AdvancedTextField.d.ts +13 -0
- package/AdvancedTextField/AdvancedTextField.js +164 -0
- package/AdvancedTextField/index.d.ts +1 -0
- package/AdvancedTextField/index.js +8 -0
- package/AdvancedTextField/package.json +6 -0
- package/Append/Append.d.ts +40 -0
- package/Append/Append.js +528 -0
- package/Append/index.d.ts +1 -0
- package/Append/index.js +8 -0
- package/Append/package.json +6 -0
- package/AreaChart/AreaChart.d.ts +9 -0
- package/AreaChart/AreaChart.js +43 -0
- package/AreaChart/index.d.ts +1 -0
- package/AreaChart/index.js +8 -0
- package/AreaChart/package.json +6 -0
- package/AreaChartItem/AreaChartItem.d.ts +22 -0
- package/AreaChartItem/AreaChartItem.js +249 -0
- package/AreaChartItem/index.d.ts +1 -0
- package/AreaChartItem/index.js +8 -0
- package/AreaChartItem/package.json +6 -0
- package/AudioPlayer/AudioPlayer.d.ts +53 -0
- package/AudioPlayer/AudioPlayer.js +494 -0
- package/AudioPlayer/index.d.ts +1 -0
- package/AudioPlayer/index.js +8 -0
- package/AudioPlayer/package.json +6 -0
- package/AudioRecorder/AudioRecorder.d.ts +31 -0
- package/AudioRecorder/AudioRecorder.js +242 -0
- package/AudioRecorder/index.d.ts +1 -0
- package/AudioRecorder/index.js +8 -0
- package/AudioRecorder/package.json +6 -0
- package/AutoComplete/AutoComplete.d.ts +62 -0
- package/AutoComplete/AutoComplete.js +586 -0
- package/AutoComplete/index.d.ts +1 -0
- package/AutoComplete/index.js +8 -0
- package/AutoComplete/package.json +6 -0
- package/AutoCompleteCountry/AutoCompleteCountry.d.ts +6 -0
- package/AutoCompleteCountry/AutoCompleteCountry.js +64 -0
- package/AutoCompleteCountry/index.d.ts +1 -0
- package/AutoCompleteCountry/index.js +8 -0
- package/AutoCompleteCountry/package.json +6 -0
- package/AutoCompleteCurrency/AutoCompleteCurrency.d.ts +6 -0
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +63 -0
- package/AutoCompleteCurrency/index.d.ts +1 -0
- package/AutoCompleteCurrency/index.js +8 -0
- package/AutoCompleteCurrency/package.json +6 -0
- package/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.d.ts +6 -0
- package/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.js +85 -0
- package/AutoCompleteGooglePlaces/index.d.ts +1 -0
- package/AutoCompleteGooglePlaces/index.js +8 -0
- package/AutoCompleteGooglePlaces/package.json +6 -0
- package/Avatar/Avatar.d.ts +13 -0
- package/Avatar/Avatar.js +88 -0
- package/Avatar/index.d.ts +1 -0
- package/Avatar/index.js +8 -0
- package/Avatar/package.json +6 -0
- package/AvatarGroup/AvatarGroup.d.ts +15 -0
- package/AvatarGroup/AvatarGroup.js +91 -0
- package/AvatarGroup/index.d.ts +1 -0
- package/AvatarGroup/index.js +8 -0
- package/AvatarGroup/package.json +6 -0
- package/Backdrop/Backdrop.d.ts +17 -0
- package/Backdrop/Backdrop.js +145 -0
- package/Backdrop/index.d.ts +1 -0
- package/Backdrop/index.js +8 -0
- package/Backdrop/package.json +6 -0
- package/Badge/Badge.d.ts +14 -0
- package/Badge/Badge.js +99 -0
- package/Badge/index.d.ts +1 -0
- package/Badge/index.js +8 -0
- package/Badge/package.json +6 -0
- package/Banner/Banner.d.ts +11 -0
- package/Banner/Banner.js +89 -0
- package/Banner/index.d.ts +1 -0
- package/Banner/index.js +8 -0
- package/Banner/package.json +6 -0
- package/BottomAppBar/BottomAppBar.d.ts +11 -0
- package/BottomAppBar/BottomAppBar.js +202 -0
- package/BottomAppBar/index.d.ts +1 -0
- package/BottomAppBar/index.js +8 -0
- package/BottomAppBar/package.json +6 -0
- package/BottomSheet/BottomSheet.d.ts +6 -0
- package/BottomSheet/BottomSheet.js +63 -0
- package/BottomSheet/index.d.ts +1 -0
- package/BottomSheet/index.js +8 -0
- package/BottomSheet/package.json +6 -0
- package/Box/Box.d.ts +8 -0
- package/Box/Box.js +38 -0
- package/Box/index.d.ts +1 -0
- package/Box/index.js +8 -0
- package/Box/package.json +6 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +10 -0
- package/Breadcrumbs/Breadcrumbs.js +149 -0
- package/Breadcrumbs/index.d.ts +1 -0
- package/Breadcrumbs/index.js +8 -0
- package/Breadcrumbs/package.json +6 -0
- package/BubbleChart/BubbleChart.d.ts +6 -0
- package/BubbleChart/BubbleChart.js +137 -0
- package/BubbleChart/index.d.ts +1 -0
- package/BubbleChart/index.js +8 -0
- package/BubbleChart/package.json +6 -0
- package/BubbleChartItem/BubbleChartItem.d.ts +21 -0
- package/BubbleChartItem/BubbleChartItem.js +165 -0
- package/BubbleChartItem/index.d.ts +1 -0
- package/BubbleChartItem/index.js +8 -0
- package/BubbleChartItem/package.json +6 -0
- package/Button/Button.d.ts +39 -0
- package/Button/Button.js +476 -0
- package/Button/index.d.ts +1 -0
- package/Button/index.js +8 -0
- package/Button/package.json +6 -0
- package/Buttons/Buttons.d.ts +26 -0
- package/Buttons/Buttons.js +302 -0
- package/Buttons/index.d.ts +1 -0
- package/Buttons/index.js +8 -0
- package/Buttons/package.json +6 -0
- package/Calendar/Calendar.d.ts +44 -0
- package/Calendar/Calendar.js +462 -0
- package/Calendar/index.d.ts +1 -0
- package/Calendar/index.js +8 -0
- package/Calendar/package.json +6 -0
- package/CalendarAvailability/CalendarAvailability.d.ts +46 -0
- package/CalendarAvailability/CalendarAvailability.js +400 -0
- package/CalendarAvailability/index.d.ts +1 -0
- package/CalendarAvailability/index.js +8 -0
- package/CalendarAvailability/package.json +6 -0
- package/CalendarMenu/CalendarMenu.d.ts +18 -0
- package/CalendarMenu/CalendarMenu.js +313 -0
- package/CalendarMenu/index.d.ts +1 -0
- package/CalendarMenu/index.js +8 -0
- package/CalendarMenu/package.json +6 -0
- package/CalendarMonth/CalendarMonth.d.ts +51 -0
- package/CalendarMonth/CalendarMonth.js +513 -0
- package/CalendarMonth/index.d.ts +1 -0
- package/CalendarMonth/index.js +8 -0
- package/CalendarMonth/package.json +6 -0
- package/CalendarViews/CalendarViews.d.ts +30 -0
- package/CalendarViews/CalendarViews.js +261 -0
- package/CalendarViews/index.d.ts +1 -0
- package/CalendarViews/index.js +8 -0
- package/CalendarViews/package.json +6 -0
- package/CalendarWeek/CalendarWeek.d.ts +18 -0
- package/CalendarWeek/CalendarWeek.js +392 -0
- package/CalendarWeek/index.d.ts +1 -0
- package/CalendarWeek/index.js +8 -0
- package/CalendarWeek/package.json +6 -0
- package/Card/Card.d.ts +15 -0
- package/Card/Card.js +106 -0
- package/Card/index.d.ts +1 -0
- package/Card/index.js +8 -0
- package/Card/package.json +6 -0
- package/CardButton/CardButton.d.ts +13 -0
- package/CardButton/CardButton.js +62 -0
- package/CardButton/index.d.ts +1 -0
- package/CardButton/index.js +8 -0
- package/CardButton/package.json +6 -0
- package/CardFooter/CardFooter.d.ts +11 -0
- package/CardFooter/CardFooter.js +42 -0
- package/CardFooter/index.d.ts +1 -0
- package/CardFooter/index.js +8 -0
- package/CardFooter/package.json +6 -0
- package/CardHeader/CardHeader.d.ts +11 -0
- package/CardHeader/CardHeader.js +47 -0
- package/CardHeader/index.d.ts +1 -0
- package/CardHeader/index.js +8 -0
- package/CardHeader/package.json +6 -0
- package/CardImage/CardImage.d.ts +14 -0
- package/CardImage/CardImage.js +69 -0
- package/CardImage/index.d.ts +1 -0
- package/CardImage/index.js +8 -0
- package/CardImage/package.json +6 -0
- package/CardMain/CardMain.d.ts +11 -0
- package/CardMain/CardMain.js +42 -0
- package/CardMain/index.d.ts +1 -0
- package/CardMain/index.js +8 -0
- package/CardMain/package.json +6 -0
- package/Carousel/Carousel.d.ts +84 -0
- package/Carousel/Carousel.js +935 -0
- package/Carousel/index.d.ts +1 -0
- package/Carousel/index.js +8 -0
- package/Carousel/package.json +6 -0
- package/Chart/Chart.d.ts +133 -0
- package/Chart/Chart.js +1190 -0
- package/Chart/index.d.ts +1 -0
- package/Chart/index.js +8 -0
- package/Chart/package.json +6 -0
- package/Checkbox/Checkbox.d.ts +17 -0
- package/Checkbox/Checkbox.js +320 -0
- package/Checkbox/index.d.ts +1 -0
- package/Checkbox/index.js +8 -0
- package/Checkbox/package.json +6 -0
- package/Chip/Chip.d.ts +13 -0
- package/Chip/Chip.js +109 -0
- package/Chip/index.d.ts +1 -0
- package/Chip/index.js +8 -0
- package/Chip/package.json +6 -0
- package/Chips/Chips.d.ts +11 -0
- package/Chips/Chips.js +104 -0
- package/Chips/index.d.ts +1 -0
- package/Chips/index.js +8 -0
- package/Chips/package.json +6 -0
- package/ClickListener/ClickListener.d.ts +14 -0
- package/ClickListener/ClickListener.js +94 -0
- package/ClickListener/index.d.ts +1 -0
- package/ClickListener/index.js +8 -0
- package/ClickListener/package.json +6 -0
- package/Clock/Clock.d.ts +35 -0
- package/Clock/Clock.js +428 -0
- package/Clock/index.d.ts +1 -0
- package/Clock/index.js +8 -0
- package/Clock/package.json +6 -0
- package/ColorTextField/ColorTextField.d.ts +12 -0
- package/ColorTextField/ColorTextField.js +180 -0
- package/ColorTextField/index.d.ts +1 -0
- package/ColorTextField/index.js +8 -0
- package/ColorTextField/package.json +6 -0
- package/ColumnChart/ColumnChart.d.ts +6 -0
- package/ColumnChart/ColumnChart.js +49 -0
- package/ColumnChart/index.d.ts +1 -0
- package/ColumnChart/index.js +8 -0
- package/ColumnChart/package.json +6 -0
- package/ColumnChartItem/ColumnChartItem.d.ts +20 -0
- package/ColumnChartItem/ColumnChartItem.js +153 -0
- package/ColumnChartItem/index.d.ts +1 -0
- package/ColumnChartItem/index.js +8 -0
- package/ColumnChartItem/package.json +6 -0
- package/Confirm/Confirm.d.ts +35 -0
- package/Confirm/Confirm.js +133 -0
- package/Confirm/Context.d.ts +2 -0
- package/Confirm/Context.js +8 -0
- package/Confirm/index.d.ts +4 -0
- package/Confirm/index.js +14 -0
- package/Confirm/package.json +6 -0
- package/Confirm/useConfirm.d.ts +2 -0
- package/Confirm/useConfirm.js +12 -0
- package/Container/Container.d.ts +12 -0
- package/Container/Container.js +137 -0
- package/Container/index.d.ts +1 -0
- package/Container/index.js +8 -0
- package/Container/package.json +6 -0
- package/Countdown/Countdown.d.ts +25 -0
- package/Countdown/Countdown.js +265 -0
- package/Countdown/index.d.ts +1 -0
- package/Countdown/index.js +8 -0
- package/Countdown/package.json +6 -0
- package/DatePicker/DatePicker.d.ts +72 -0
- package/DatePicker/DatePicker.js +559 -0
- package/DatePicker/index.d.ts +1 -0
- package/DatePicker/index.js +8 -0
- package/DatePicker/package.json +6 -0
- package/DateRangePicker/DateRangePicker.d.ts +6 -0
- package/DateRangePicker/DateRangePicker.js +40 -0
- package/DateRangePicker/index.d.ts +1 -0
- package/DateRangePicker/index.js +8 -0
- package/DateRangePicker/package.json +6 -0
- package/DateTimePicker/DateTimePicker.d.ts +61 -0
- package/DateTimePicker/DateTimePicker.js +476 -0
- package/DateTimePicker/index.d.ts +1 -0
- package/DateTimePicker/index.js +8 -0
- package/DateTimePicker/package.json +6 -0
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +6 -0
- package/DateTimeRangePicker/DateTimeRangePicker.js +40 -0
- package/DateTimeRangePicker/index.d.ts +1 -0
- package/DateTimeRangePicker/index.js +8 -0
- package/DateTimeRangePicker/package.json +6 -0
- package/Divider/Divider.d.ts +13 -0
- package/Divider/Divider.js +188 -0
- package/Divider/index.d.ts +1 -0
- package/Divider/index.js +8 -0
- package/Divider/package.json +6 -0
- package/DonutChart/DonutChart.d.ts +6 -0
- package/DonutChart/DonutChart.js +46 -0
- package/DonutChart/index.d.ts +1 -0
- package/DonutChart/index.js +8 -0
- package/DonutChart/package.json +6 -0
- package/DragAndDropList/DragAndDropList.d.ts +16 -0
- package/DragAndDropList/DragAndDropList.js +163 -0
- package/DragAndDropList/index.d.ts +1 -0
- package/DragAndDropList/index.js +8 -0
- package/DragAndDropList/package.json +6 -0
- package/Drawing/Drawing.d.ts +48 -0
- package/Drawing/Drawing.js +532 -0
- package/Drawing/index.d.ts +1 -0
- package/Drawing/index.js +8 -0
- package/Drawing/package.json +6 -0
- package/DropZone/DropZone.d.ts +15 -0
- package/DropZone/DropZone.js +205 -0
- package/DropZone/index.d.ts +1 -0
- package/DropZone/index.js +8 -0
- package/DropZone/package.json +6 -0
- package/Emojis/Emojis.d.ts +22 -0
- package/Emojis/Emojis.js +319 -0
- package/Emojis/emojis_list.d.ts +18 -0
- package/Emojis/emojis_list.js +9251 -0
- package/Emojis/index.d.ts +2 -0
- package/Emojis/index.js +10 -0
- package/Emojis/package.json +6 -0
- package/Expand/Expand.d.ts +12 -0
- package/Expand/Expand.js +156 -0
- package/Expand/index.d.ts +1 -0
- package/Expand/index.js +8 -0
- package/Expand/package.json +6 -0
- package/Fab/Fab.d.ts +6 -0
- package/Fab/Fab.js +29 -0
- package/Fab/index.d.ts +1 -0
- package/Fab/index.js +8 -0
- package/Fab/package.json +6 -0
- package/Fade/Fade.d.ts +6 -0
- package/Fade/Fade.js +106 -0
- package/Fade/index.d.ts +1 -0
- package/Fade/index.js +8 -0
- package/Fade/package.json +6 -0
- package/FileChoose/FileChoose.d.ts +28 -0
- package/FileChoose/FileChoose.js +154 -0
- package/FileChoose/index.d.ts +1 -0
- package/FileChoose/index.js +8 -0
- package/FileChoose/package.json +6 -0
- package/Focus/Focus.d.ts +8 -0
- package/Focus/Focus.js +96 -0
- package/Focus/index.d.ts +1 -0
- package/Focus/index.js +8 -0
- package/Focus/package.json +6 -0
- package/Form/Form.d.ts +25 -0
- package/Form/Form.js +125 -0
- package/Form/index.d.ts +1 -0
- package/Form/index.js +8 -0
- package/Form/package.json +6 -0
- package/FormRow/FormRow.d.ts +20 -0
- package/FormRow/FormRow.js +82 -0
- package/FormRow/index.d.ts +1 -0
- package/FormRow/index.js +8 -0
- package/FormRow/package.json +6 -0
- package/Forms/Forms.d.ts +7 -0
- package/Forms/Forms.js +44 -0
- package/Forms/index.d.ts +1 -0
- package/Forms/index.js +8 -0
- package/Forms/package.json +6 -0
- package/Frame/Frame.d.ts +21 -0
- package/Frame/Frame.js +154 -0
- package/Frame/index.d.ts +1 -0
- package/Frame/index.js +8 -0
- package/Frame/package.json +6 -0
- package/Grid/Grid.d.ts +14 -0
- package/Grid/Grid.js +169 -0
- package/Grid/index.d.ts +1 -0
- package/Grid/index.js +8 -0
- package/Grid/package.json +6 -0
- package/Grow/Grow.d.ts +6 -0
- package/Grow/Grow.js +114 -0
- package/Grow/index.d.ts +1 -0
- package/Grow/index.js +8 -0
- package/Grow/package.json +6 -0
- package/HTMLCanvas/HTMLCanvas.d.ts +43 -0
- package/HTMLCanvas/HTMLCanvas.js +549 -0
- package/HTMLCanvas/index.d.ts +2 -0
- package/HTMLCanvas/index.js +23 -0
- package/HTMLCanvas/package.json +6 -0
- package/IFrame/IFrame.d.ts +9 -0
- package/IFrame/IFrame.js +117 -0
- package/IFrame/index.d.ts +1 -0
- package/IFrame/index.js +8 -0
- package/IFrame/package.json +6 -0
- package/Icon/Icon.d.ts +17 -0
- package/Icon/Icon.js +98 -0
- package/Icon/index.d.ts +2 -0
- package/Icon/index.js +23 -0
- package/Icon/package.json +6 -0
- package/IconButton/IconButton.d.ts +6 -0
- package/IconButton/IconButton.js +40 -0
- package/IconButton/index.d.ts +1 -0
- package/IconButton/index.js +8 -0
- package/IconButton/package.json +6 -0
- package/Image/Image.d.ts +27 -0
- package/Image/Image.js +259 -0
- package/Image/index.d.ts +1 -0
- package/Image/index.js +8 -0
- package/Image/package.json +6 -0
- package/ImageCrop/ImageCrop.d.ts +28 -0
- package/ImageCrop/ImageCrop.js +1076 -0
- package/ImageCrop/index.d.ts +1 -0
- package/ImageCrop/index.js +8 -0
- package/ImageCrop/package.json +6 -0
- package/ImageEdit/ImageEdit.d.ts +68 -0
- package/ImageEdit/ImageEdit.js +789 -0
- package/ImageEdit/index.d.ts +1 -0
- package/ImageEdit/index.js +8 -0
- package/ImageEdit/package.json +6 -0
- package/ImageGallery/ImageGallery.d.ts +30 -0
- package/ImageGallery/ImageGallery.js +483 -0
- package/ImageGallery/index.d.ts +1 -0
- package/ImageGallery/index.js +8 -0
- package/ImageGallery/package.json +6 -0
- package/ImageList/ImageList.d.ts +11 -0
- package/ImageList/ImageList.js +134 -0
- package/ImageList/index.d.ts +1 -0
- package/ImageList/index.js +8 -0
- package/ImageList/package.json +6 -0
- package/ImageListItem/ImageListItem.d.ts +10 -0
- package/ImageListItem/ImageListItem.js +92 -0
- package/ImageListItem/index.d.ts +1 -0
- package/ImageListItem/index.js +8 -0
- package/ImageListItem/package.json +6 -0
- package/ImageListItemBox/ImageListItemBox.d.ts +8 -0
- package/ImageListItemBox/ImageListItemBox.js +53 -0
- package/ImageListItemBox/index.d.ts +1 -0
- package/ImageListItemBox/index.js +8 -0
- package/ImageListItemBox/package.json +6 -0
- package/Info/Info.d.ts +15 -0
- package/Info/Info.js +66 -0
- package/Info/index.d.ts +1 -0
- package/Info/index.js +8 -0
- package/Info/package.json +6 -0
- package/Interaction/Interaction.d.ts +21 -0
- package/Interaction/Interaction.js +349 -0
- package/Interaction/index.d.ts +1 -0
- package/Interaction/index.js +8 -0
- package/Interaction/package.json +6 -0
- package/Keyframes/Context.d.ts +3 -0
- package/Keyframes/Context.js +8 -0
- package/Keyframes/Keyframes.d.ts +32 -0
- package/Keyframes/Keyframes.js +177 -0
- package/Keyframes/index.d.ts +4 -0
- package/Keyframes/index.js +27 -0
- package/Keyframes/package.json +6 -0
- package/Keyframes/useKeyframes.d.ts +1 -0
- package/Keyframes/useKeyframes.js +12 -0
- package/LICENSE +21 -0
- package/Label/Label.d.ts +26 -0
- package/Label/Label.js +155 -0
- package/Label/index.d.ts +1 -0
- package/Label/index.js +8 -0
- package/Label/package.json +6 -0
- package/Labels/Labels.d.ts +22 -0
- package/Labels/Labels.js +102 -0
- package/Labels/index.d.ts +1 -0
- package/Labels/index.js +8 -0
- package/Labels/package.json +6 -0
- package/Line/Line.d.ts +24 -0
- package/Line/Line.js +178 -0
- package/Line/index.d.ts +1 -0
- package/Line/index.js +8 -0
- package/Line/package.json +6 -0
- package/LineChart/LineChart.d.ts +8 -0
- package/LineChart/LineChart.js +43 -0
- package/LineChart/index.d.ts +1 -0
- package/LineChart/index.js +8 -0
- package/LineChart/package.json +6 -0
- package/LineChartItem/LineChartItem.d.ts +21 -0
- package/LineChartItem/LineChartItem.js +188 -0
- package/LineChartItem/index.d.ts +1 -0
- package/LineChartItem/index.js +8 -0
- package/LineChartItem/package.json +6 -0
- package/LinearMeter/LinearMeter.d.ts +53 -0
- package/LinearMeter/LinearMeter.js +401 -0
- package/LinearMeter/index.d.ts +1 -0
- package/LinearMeter/index.js +8 -0
- package/LinearMeter/package.json +6 -0
- package/LinearProgress/LinearProgress.d.ts +15 -0
- package/LinearProgress/LinearProgress.js +274 -0
- package/LinearProgress/index.d.ts +1 -0
- package/LinearProgress/index.js +8 -0
- package/LinearProgress/package.json +6 -0
- package/Link/Link.d.ts +9 -0
- package/Link/Link.js +133 -0
- package/Link/index.d.ts +1 -0
- package/Link/index.js +8 -0
- package/Link/package.json +6 -0
- package/Links/Links.d.ts +32 -0
- package/Links/Links.js +159 -0
- package/Links/index.d.ts +1 -0
- package/Links/index.js +8 -0
- package/Links/package.json +6 -0
- package/List/List.d.ts +17 -0
- package/List/List.js +118 -0
- package/List/index.d.ts +1 -0
- package/List/index.js +8 -0
- package/List/package.json +6 -0
- package/ListItem/ListItem.d.ts +48 -0
- package/ListItem/ListItem.js +363 -0
- package/ListItem/index.d.ts +1 -0
- package/ListItem/index.js +8 -0
- package/ListItem/package.json +6 -0
- package/ListSubheader/ListSubheader.d.ts +6 -0
- package/ListSubheader/ListSubheader.js +48 -0
- package/ListSubheader/index.d.ts +1 -0
- package/ListSubheader/index.js +8 -0
- package/ListSubheader/package.json +6 -0
- package/MainProgress/Context.d.ts +2 -0
- package/MainProgress/Context.js +8 -0
- package/MainProgress/MainProgress.d.ts +33 -0
- package/MainProgress/MainProgress.js +166 -0
- package/MainProgress/index.d.ts +4 -0
- package/MainProgress/index.js +14 -0
- package/MainProgress/package.json +6 -0
- package/MainProgress/useMainProgress.d.ts +2 -0
- package/MainProgress/useMainProgress.js +12 -0
- package/Markdown/Markdown.d.ts +13 -0
- package/Markdown/Markdown.js +730 -0
- package/Markdown/index.d.ts +1 -0
- package/Markdown/index.js +8 -0
- package/Markdown/package.json +6 -0
- package/Masonry/Masonry.d.ts +11 -0
- package/Masonry/Masonry.js +189 -0
- package/Masonry/index.d.ts +1 -0
- package/Masonry/index.js +8 -0
- package/Masonry/package.json +6 -0
- package/Medias/Medias.d.ts +31 -0
- package/Medias/Medias.js +368 -0
- package/Medias/index.d.ts +1 -0
- package/Medias/index.js +8 -0
- package/Medias/package.json +6 -0
- package/Menu/Menu.d.ts +33 -0
- package/Menu/Menu.js +249 -0
- package/Menu/index.d.ts +1 -0
- package/Menu/index.js +8 -0
- package/Menu/package.json +6 -0
- package/MenuDesktop/MenuDesktop.d.ts +42 -0
- package/MenuDesktop/MenuDesktop.js +437 -0
- package/MenuDesktop/index.d.ts +1 -0
- package/MenuDesktop/index.js +8 -0
- package/MenuDesktop/package.json +6 -0
- package/MenuItem/MenuItem.d.ts +26 -0
- package/MenuItem/MenuItem.js +239 -0
- package/MenuItem/index.d.ts +1 -0
- package/MenuItem/index.js +8 -0
- package/MenuItem/package.json +6 -0
- package/Meta/Meta.d.ts +11 -0
- package/Meta/Meta.js +58 -0
- package/Meta/index.d.ts +1 -0
- package/Meta/index.js +8 -0
- package/Meta/package.json +6 -0
- package/Modal/Modal.d.ts +36 -0
- package/Modal/Modal.js +278 -0
- package/Modal/index.d.ts +1 -0
- package/Modal/index.js +8 -0
- package/Modal/package.json +6 -0
- package/ModalFooter/ModalFooter.d.ts +6 -0
- package/ModalFooter/ModalFooter.js +42 -0
- package/ModalFooter/index.d.ts +1 -0
- package/ModalFooter/index.js +8 -0
- package/ModalFooter/package.json +6 -0
- package/ModalHeader/ModalHeader.d.ts +7 -0
- package/ModalHeader/ModalHeader.js +42 -0
- package/ModalHeader/index.d.ts +1 -0
- package/ModalHeader/index.js +8 -0
- package/ModalHeader/package.json +6 -0
- package/ModalIcon/ModalIcon.d.ts +6 -0
- package/ModalIcon/ModalIcon.js +26 -0
- package/ModalIcon/index.d.ts +1 -0
- package/ModalIcon/index.js +8 -0
- package/ModalIcon/package.json +6 -0
- package/ModalMain/ModalMain.d.ts +6 -0
- package/ModalMain/ModalMain.js +49 -0
- package/ModalMain/index.d.ts +1 -0
- package/ModalMain/index.js +8 -0
- package/ModalMain/package.json +6 -0
- package/ModalText/ModalText.d.ts +6 -0
- package/ModalText/ModalText.js +40 -0
- package/ModalText/index.d.ts +1 -0
- package/ModalText/index.js +8 -0
- package/ModalText/package.json +6 -0
- package/ModalTitle/ModalTitle.d.ts +6 -0
- package/ModalTitle/ModalTitle.js +40 -0
- package/ModalTitle/index.d.ts +1 -0
- package/ModalTitle/index.js +8 -0
- package/ModalTitle/package.json +6 -0
- package/MoreOptions/MoreOptions.d.ts +9 -0
- package/MoreOptions/MoreOptions.js +55 -0
- package/MoreOptions/index.d.ts +1 -0
- package/MoreOptions/index.js +8 -0
- package/MoreOptions/package.json +6 -0
- package/Move/Move.d.ts +11 -0
- package/Move/Move.js +147 -0
- package/Move/index.d.ts +1 -0
- package/Move/index.js +8 -0
- package/Move/package.json +6 -0
- package/NavigationBar/NavigationBar.d.ts +13 -0
- package/NavigationBar/NavigationBar.js +114 -0
- package/NavigationBar/index.d.ts +1 -0
- package/NavigationBar/index.js +8 -0
- package/NavigationBar/package.json +6 -0
- package/NavigationDrawer/NavigationDrawer.d.ts +16 -0
- package/NavigationDrawer/NavigationDrawer.js +222 -0
- package/NavigationDrawer/index.d.ts +1 -0
- package/NavigationDrawer/index.js +8 -0
- package/NavigationDrawer/package.json +6 -0
- package/NavigationItem/NavigationItem.d.ts +29 -0
- package/NavigationItem/NavigationItem.js +294 -0
- package/NavigationItem/index.d.ts +1 -0
- package/NavigationItem/index.js +8 -0
- package/NavigationItem/package.json +6 -0
- package/NavigationRail/NavigationRail.d.ts +19 -0
- package/NavigationRail/NavigationRail.js +156 -0
- package/NavigationRail/index.d.ts +1 -0
- package/NavigationRail/index.js +8 -0
- package/NavigationRail/package.json +6 -0
- package/NotFound/NotFound.d.ts +15 -0
- package/NotFound/NotFound.js +68 -0
- package/NotFound/index.d.ts +1 -0
- package/NotFound/index.js +8 -0
- package/NotFound/package.json +6 -0
- package/NumericTextField/NumericTextField.d.ts +16 -0
- package/NumericTextField/NumericTextField.js +217 -0
- package/NumericTextField/index.d.ts +1 -0
- package/NumericTextField/index.js +8 -0
- package/NumericTextField/package.json +6 -0
- package/Page/Page.d.ts +18 -0
- package/Page/Page.js +70 -0
- package/Page/index.d.ts +1 -0
- package/Page/index.js +8 -0
- package/Page/package.json +6 -0
- package/PageTransition/PageTransition.d.ts +12 -0
- package/PageTransition/PageTransition.js +108 -0
- package/PageTransition/index.d.ts +1 -0
- package/PageTransition/index.js +8 -0
- package/PageTransition/package.json +6 -0
- package/Pagination/Pagination.d.ts +29 -0
- package/Pagination/Pagination.js +101 -0
- package/Pagination/index.d.ts +1 -0
- package/Pagination/index.js +8 -0
- package/Pagination/package.json +6 -0
- package/PaginationItem/PaginationItem.d.ts +8 -0
- package/PaginationItem/PaginationItem.js +69 -0
- package/PaginationItem/index.d.ts +1 -0
- package/PaginationItem/index.js +8 -0
- package/PaginationItem/package.json +6 -0
- package/Parallax/Parallax.d.ts +15 -0
- package/Parallax/Parallax.js +150 -0
- package/Parallax/index.d.ts +1 -0
- package/Parallax/index.js +8 -0
- package/Parallax/package.json +6 -0
- package/Path/Path.d.ts +7 -0
- package/Path/Path.js +38 -0
- package/Path/index.d.ts +1 -0
- package/Path/index.js +8 -0
- package/Path/package.json +6 -0
- package/PieChart/PieChart.d.ts +6 -0
- package/PieChart/PieChart.js +276 -0
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +8 -0
- package/PieChart/package.json +6 -0
- package/Placeholder/Placeholder.d.ts +12 -0
- package/Placeholder/Placeholder.js +125 -0
- package/Placeholder/index.d.ts +1 -0
- package/Placeholder/index.js +8 -0
- package/Placeholder/package.json +6 -0
- package/Portal/Portal.d.ts +7 -0
- package/Portal/Portal.js +41 -0
- package/Portal/index.d.ts +1 -0
- package/Portal/index.js +8 -0
- package/Portal/package.json +6 -0
- package/Properties/Properties.d.ts +18 -0
- package/Properties/Properties.js +67 -0
- package/Properties/index.d.ts +1 -0
- package/Properties/index.js +8 -0
- package/Properties/package.json +6 -0
- package/Property/Property.d.ts +18 -0
- package/Property/Property.js +113 -0
- package/Property/index.d.ts +1 -0
- package/Property/index.js +8 -0
- package/Property/package.json +6 -0
- package/README.MD +85 -0
- package/Radio/Radio.d.ts +16 -0
- package/Radio/Radio.js +187 -0
- package/Radio/index.d.ts +1 -0
- package/Radio/index.js +8 -0
- package/Radio/package.json +6 -0
- package/Radios/Radios.d.ts +23 -0
- package/Radios/Radios.js +96 -0
- package/Radios/index.d.ts +1 -0
- package/Radios/index.js +8 -0
- package/Radios/package.json +6 -0
- package/Rating/Rating.d.ts +31 -0
- package/Rating/Rating.js +372 -0
- package/Rating/index.d.ts +1 -0
- package/Rating/index.js +8 -0
- package/Rating/package.json +6 -0
- package/Reset/Reset.d.ts +6 -0
- package/Reset/Reset.js +27 -0
- package/Reset/index.d.ts +1 -0
- package/Reset/index.js +8 -0
- package/Reset/package.json +6 -0
- package/Reveal/Reveal.d.ts +22 -0
- package/Reveal/Reveal.js +92 -0
- package/Reveal/index.d.ts +1 -0
- package/Reveal/index.js +8 -0
- package/Reveal/package.json +6 -0
- package/RichTextEditor/RichTextEditor.d.ts +76 -0
- package/RichTextEditor/RichTextEditor.js +1011 -0
- package/RichTextEditor/index.d.ts +1 -0
- package/RichTextEditor/index.js +8 -0
- package/RichTextEditor/package.json +6 -0
- package/RoundMeter/RoundMeter.d.ts +50 -0
- package/RoundMeter/RoundMeter.js +554 -0
- package/RoundMeter/index.d.ts +1 -0
- package/RoundMeter/index.js +8 -0
- package/RoundMeter/package.json +6 -0
- package/RoundProgress/RoundProgress.d.ts +16 -0
- package/RoundProgress/RoundProgress.js +183 -0
- package/RoundProgress/index.d.ts +1 -0
- package/RoundProgress/index.js +8 -0
- package/RoundProgress/package.json +6 -0
- package/ScatterChart/ScatterChart.d.ts +6 -0
- package/ScatterChart/ScatterChart.js +43 -0
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +8 -0
- package/ScatterChart/package.json +6 -0
- package/ScatterChartItem/ScatterChartItem.d.ts +19 -0
- package/ScatterChartItem/ScatterChartItem.js +158 -0
- package/ScatterChartItem/index.d.ts +1 -0
- package/ScatterChartItem/index.js +8 -0
- package/ScatterChartItem/package.json +6 -0
- package/ScreenCapture/ScreenCapture.d.ts +30 -0
- package/ScreenCapture/ScreenCapture.js +343 -0
- package/ScreenCapture/index.d.ts +1 -0
- package/ScreenCapture/index.js +8 -0
- package/ScreenCapture/package.json +6 -0
- package/Section/Section.d.ts +33 -0
- package/Section/Section.js +357 -0
- package/Section/index.d.ts +1 -0
- package/Section/index.js +8 -0
- package/Section/package.json +6 -0
- package/SectionAction/SectionAction.d.ts +11 -0
- package/SectionAction/SectionAction.js +63 -0
- package/SectionAction/index.d.ts +1 -0
- package/SectionAction/index.js +8 -0
- package/SectionAction/package.json +6 -0
- package/SectionBoxes/SectionBoxes.d.ts +33 -0
- package/SectionBoxes/SectionBoxes.js +211 -0
- package/SectionBoxes/index.d.ts +1 -0
- package/SectionBoxes/index.js +8 -0
- package/SectionBoxes/package.json +6 -0
- package/SectionCards/SectionCards.d.ts +33 -0
- package/SectionCards/SectionCards.js +221 -0
- package/SectionCards/index.d.ts +1 -0
- package/SectionCards/index.js +8 -0
- package/SectionCards/package.json +6 -0
- package/SectionCarousel/SectionCarousel.d.ts +32 -0
- package/SectionCarousel/SectionCarousel.js +246 -0
- package/SectionCarousel/index.d.ts +1 -0
- package/SectionCarousel/index.js +8 -0
- package/SectionCarousel/package.json +6 -0
- package/SectionContact/SectionContact.d.ts +27 -0
- package/SectionContact/SectionContact.js +124 -0
- package/SectionContact/index.d.ts +1 -0
- package/SectionContact/index.js +8 -0
- package/SectionContact/package.json +6 -0
- package/SectionImageGallery/SectionImageGallery.d.ts +11 -0
- package/SectionImageGallery/SectionImageGallery.js +54 -0
- package/SectionImageGallery/index.d.ts +1 -0
- package/SectionImageGallery/index.js +8 -0
- package/SectionImageGallery/package.json +6 -0
- package/SectionLogos/SectionLogos.d.ts +14 -0
- package/SectionLogos/SectionLogos.js +115 -0
- package/SectionLogos/index.d.ts +1 -0
- package/SectionLogos/index.js +8 -0
- package/SectionLogos/package.json +6 -0
- package/SectionMedia/SectionMedia.d.ts +16 -0
- package/SectionMedia/SectionMedia.js +155 -0
- package/SectionMedia/index.d.ts +1 -0
- package/SectionMedia/index.js +8 -0
- package/SectionMedia/package.json +6 -0
- package/SectionReviews/SectionReviews.d.ts +23 -0
- package/SectionReviews/SectionReviews.js +134 -0
- package/SectionReviews/index.d.ts +1 -0
- package/SectionReviews/index.js +8 -0
- package/SectionReviews/package.json +6 -0
- package/SectionTextMedia/SectionTextMedia.d.ts +28 -0
- package/SectionTextMedia/SectionTextMedia.js +148 -0
- package/SectionTextMedia/index.d.ts +1 -0
- package/SectionTextMedia/index.js +8 -0
- package/SectionTextMedia/package.json +6 -0
- package/SectionTimeline/SectionTimeline.d.ts +21 -0
- package/SectionTimeline/SectionTimeline.js +100 -0
- package/SectionTimeline/index.d.ts +1 -0
- package/SectionTimeline/index.js +8 -0
- package/SectionTimeline/package.json +6 -0
- package/SectionWatch/SectionWatch.d.ts +14 -0
- package/SectionWatch/SectionWatch.js +56 -0
- package/SectionWatch/index.d.ts +1 -0
- package/SectionWatch/index.js +8 -0
- package/SectionWatch/package.json +6 -0
- package/Select/Select.d.ts +29 -0
- package/Select/Select.js +413 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +8 -0
- package/Select/package.json +6 -0
- package/Share/Share.d.ts +37 -0
- package/Share/Share.js +338 -0
- package/Share/index.d.ts +1 -0
- package/Share/index.js +8 -0
- package/Share/package.json +6 -0
- package/Slide/Slide.d.ts +12 -0
- package/Slide/Slide.js +146 -0
- package/Slide/index.d.ts +1 -0
- package/Slide/index.js +8 -0
- package/Slide/package.json +6 -0
- package/Slider/Slider.d.ts +36 -0
- package/Slider/Slider.js +851 -0
- package/Slider/index.d.ts +1 -0
- package/Slider/index.js +8 -0
- package/Slider/package.json +6 -0
- package/SmartTextField/SmartTextField.d.ts +19 -0
- package/SmartTextField/SmartTextField.js +796 -0
- package/SmartTextField/index.d.ts +1 -0
- package/SmartTextField/index.js +8 -0
- package/SmartTextField/package.json +6 -0
- package/Snackbar/Snackbar.d.ts +26 -0
- package/Snackbar/Snackbar.js +191 -0
- package/Snackbar/index.d.ts +1 -0
- package/Snackbar/index.js +8 -0
- package/Snackbar/package.json +6 -0
- package/Snackbars/Context.d.ts +7 -0
- package/Snackbars/Context.js +8 -0
- package/Snackbars/Snackbars.d.ts +15 -0
- package/Snackbars/Snackbars.js +216 -0
- package/Snackbars/index.d.ts +4 -0
- package/Snackbars/index.js +14 -0
- package/Snackbars/package.json +6 -0
- package/Snackbars/useSnackbars.d.ts +2 -0
- package/Snackbars/useSnackbars.js +12 -0
- package/Space/Space.d.ts +36 -0
- package/Space/Space.js +1003 -0
- package/Space/index.d.ts +2 -0
- package/Space/index.js +23 -0
- package/Space/package.json +6 -0
- package/SpeechToText/SpeechToText.d.ts +29 -0
- package/SpeechToText/SpeechToText.js +177 -0
- package/SpeechToText/index.d.ts +1 -0
- package/SpeechToText/index.js +8 -0
- package/SpeechToText/package.json +6 -0
- package/SpeedDial/SpeedDial.d.ts +36 -0
- package/SpeedDial/SpeedDial.js +413 -0
- package/SpeedDial/index.d.ts +1 -0
- package/SpeedDial/index.js +8 -0
- package/SpeedDial/package.json +6 -0
- package/SpeedDialItem/SpeedDialItem.d.ts +22 -0
- package/SpeedDialItem/SpeedDialItem.js +69 -0
- package/SpeedDialItem/index.d.ts +1 -0
- package/SpeedDialItem/index.js +8 -0
- package/SpeedDialItem/package.json +6 -0
- package/SpyScroll/SpyScroll.d.ts +13 -0
- package/SpyScroll/SpyScroll.js +147 -0
- package/SpyScroll/index.d.ts +1 -0
- package/SpyScroll/index.js +8 -0
- package/SpyScroll/package.json +6 -0
- package/Step/Step.d.ts +27 -0
- package/Step/Step.js +131 -0
- package/Step/index.d.ts +1 -0
- package/Step/index.js +8 -0
- package/Step/package.json +6 -0
- package/Stepper/Stepper.d.ts +21 -0
- package/Stepper/Stepper.js +143 -0
- package/Stepper/index.d.ts +1 -0
- package/Stepper/index.js +8 -0
- package/Stepper/package.json +6 -0
- package/Surface/Surface.d.ts +15 -0
- package/Surface/Surface.js +809 -0
- package/Surface/index.d.ts +1 -0
- package/Surface/index.js +8 -0
- package/Surface/package.json +6 -0
- package/Switch/Switch.d.ts +18 -0
- package/Switch/Switch.js +544 -0
- package/Switch/index.d.ts +1 -0
- package/Switch/index.js +8 -0
- package/Switch/package.json +6 -0
- package/Tab/Tab.d.ts +22 -0
- package/Tab/Tab.js +149 -0
- package/Tab/index.d.ts +1 -0
- package/Tab/index.js +8 -0
- package/Tab/package.json +6 -0
- package/Table/Table.d.ts +13 -0
- package/Table/Table.js +81 -0
- package/Table/index.d.ts +1 -0
- package/Table/index.js +8 -0
- package/Table/package.json +6 -0
- package/TableBody/TableBody.d.ts +9 -0
- package/TableBody/TableBody.js +68 -0
- package/TableBody/index.d.ts +1 -0
- package/TableBody/index.js +8 -0
- package/TableBody/package.json +6 -0
- package/TableCell/TableCell.d.ts +27 -0
- package/TableCell/TableCell.js +226 -0
- package/TableCell/index.d.ts +1 -0
- package/TableCell/index.js +8 -0
- package/TableCell/package.json +6 -0
- package/TableFooter/TableFooter.d.ts +8 -0
- package/TableFooter/TableFooter.js +51 -0
- package/TableFooter/index.d.ts +1 -0
- package/TableFooter/index.js +8 -0
- package/TableFooter/package.json +6 -0
- package/TableHead/TableHead.d.ts +13 -0
- package/TableHead/TableHead.js +124 -0
- package/TableHead/index.d.ts +1 -0
- package/TableHead/index.js +8 -0
- package/TableHead/package.json +6 -0
- package/TableHeader/TableHeader.d.ts +8 -0
- package/TableHeader/TableHeader.js +53 -0
- package/TableHeader/index.d.ts +1 -0
- package/TableHeader/index.js +8 -0
- package/TableHeader/package.json +6 -0
- package/TablePagination/TablePagination.d.ts +29 -0
- package/TablePagination/TablePagination.js +100 -0
- package/TablePagination/index.d.ts +1 -0
- package/TablePagination/index.js +8 -0
- package/TablePagination/package.json +6 -0
- package/TableRow/TableRow.d.ts +11 -0
- package/TableRow/TableRow.js +68 -0
- package/TableRow/index.d.ts +1 -0
- package/TableRow/index.js +8 -0
- package/TableRow/package.json +6 -0
- package/Tabs/Tabs.d.ts +28 -0
- package/Tabs/Tabs.js +387 -0
- package/Tabs/index.d.ts +1 -0
- package/Tabs/index.js +8 -0
- package/Tabs/package.json +6 -0
- package/Text/Text.d.ts +16 -0
- package/Text/Text.js +118 -0
- package/Text/index.d.ts +1 -0
- package/Text/index.js +8 -0
- package/Text/package.json +6 -0
- package/TextField/TextField.d.ts +64 -0
- package/TextField/TextField.js +850 -0
- package/TextField/index.d.ts +1 -0
- package/TextField/index.js +8 -0
- package/TextField/package.json +6 -0
- package/TextToSpeech/TextToSpeech.d.ts +28 -0
- package/TextToSpeech/TextToSpeech.js +157 -0
- package/TextToSpeech/index.d.ts +1 -0
- package/TextToSpeech/index.js +8 -0
- package/TextToSpeech/package.json +6 -0
- package/TimePicker/TimePicker.d.ts +72 -0
- package/TimePicker/TimePicker.js +736 -0
- package/TimePicker/index.d.ts +1 -0
- package/TimePicker/index.js +8 -0
- package/TimePicker/package.json +6 -0
- package/TimeRangePicker/TimeRangePicker.d.ts +6 -0
- package/TimeRangePicker/TimeRangePicker.js +40 -0
- package/TimeRangePicker/index.d.ts +1 -0
- package/TimeRangePicker/index.js +8 -0
- package/TimeRangePicker/package.json +6 -0
- package/Timeline/Timeline.d.ts +7 -0
- package/Timeline/Timeline.js +43 -0
- package/Timeline/index.d.ts +1 -0
- package/Timeline/index.js +8 -0
- package/Timeline/package.json +6 -0
- package/TimelineItem/TimelineItem.d.ts +14 -0
- package/TimelineItem/TimelineItem.js +152 -0
- package/TimelineItem/index.d.ts +1 -0
- package/TimelineItem/index.js +8 -0
- package/TimelineItem/package.json +6 -0
- package/Timer/Timer.d.ts +23 -0
- package/Timer/Timer.js +208 -0
- package/Timer/index.d.ts +1 -0
- package/Timer/index.js +8 -0
- package/Timer/package.json +6 -0
- package/ToggleButton/ToggleButton.d.ts +6 -0
- package/ToggleButton/ToggleButton.js +61 -0
- package/ToggleButton/index.d.ts +1 -0
- package/ToggleButton/index.js +8 -0
- package/ToggleButton/package.json +6 -0
- package/ToggleButtons/ToggleButtons.d.ts +6 -0
- package/ToggleButtons/ToggleButtons.js +40 -0
- package/ToggleButtons/index.d.ts +1 -0
- package/ToggleButtons/index.js +8 -0
- package/ToggleButtons/package.json +6 -0
- package/Tooltip/Tooltip.d.ts +46 -0
- package/Tooltip/Tooltip.js +439 -0
- package/Tooltip/index.d.ts +1 -0
- package/Tooltip/index.js +8 -0
- package/Tooltip/package.json +6 -0
- package/TopAppBar/TopAppBar.d.ts +14 -0
- package/TopAppBar/TopAppBar.js +200 -0
- package/TopAppBar/index.d.ts +1 -0
- package/TopAppBar/index.js +8 -0
- package/TopAppBar/package.json +6 -0
- package/Transition/Context.d.ts +3 -0
- package/Transition/Context.js +8 -0
- package/Transition/Transition.d.ts +46 -0
- package/Transition/Transition.js +347 -0
- package/Transition/index.d.ts +4 -0
- package/Transition/index.js +27 -0
- package/Transition/package.json +6 -0
- package/Transition/useTransition.d.ts +1 -0
- package/Transition/useTransition.js +12 -0
- package/Transitions/Transitions.d.ts +12 -0
- package/Transitions/Transitions.js +186 -0
- package/Transitions/index.d.ts +1 -0
- package/Transitions/index.js +8 -0
- package/Transitions/package.json +6 -0
- package/Tree/Tree.d.ts +38 -0
- package/Tree/Tree.js +322 -0
- package/Tree/index.d.ts +1 -0
- package/Tree/index.js +8 -0
- package/Tree/package.json +6 -0
- package/Type/Type.d.ts +18 -0
- package/Type/Type.js +154 -0
- package/Type/index.d.ts +1 -0
- package/Type/index.js +8 -0
- package/Type/package.json +6 -0
- package/VideoPlayer/VideoPlayer.d.ts +61 -0
- package/VideoPlayer/VideoPlayer.js +670 -0
- package/VideoPlayer/index.d.ts +1 -0
- package/VideoPlayer/index.js +8 -0
- package/VideoPlayer/package.json +6 -0
- package/ViewSplit/ViewSplit.d.ts +24 -0
- package/ViewSplit/ViewSplit.js +407 -0
- package/ViewSplit/index.d.ts +1 -0
- package/ViewSplit/index.js +8 -0
- package/ViewSplit/package.json +6 -0
- package/Watch/Watch.d.ts +23 -0
- package/Watch/Watch.js +295 -0
- package/Watch/index.d.ts +1 -0
- package/Watch/index.js +8 -0
- package/Watch/package.json +6 -0
- package/Weather/Weather.d.ts +27 -0
- package/Weather/Weather.js +254 -0
- package/Weather/index.d.ts +1 -0
- package/Weather/index.js +8 -0
- package/Weather/package.json +6 -0
- package/Widgets/Context.d.ts +2 -0
- package/Widgets/Context.js +8 -0
- package/Widgets/Widgets.d.ts +24 -0
- package/Widgets/Widgets.js +176 -0
- package/Widgets/index.d.ts +4 -0
- package/Widgets/index.js +14 -0
- package/Widgets/package.json +6 -0
- package/Widgets/useWidgets.d.ts +2 -0
- package/Widgets/useWidgets.js +12 -0
- package/WindowSplit/WindowSplit.d.ts +29 -0
- package/WindowSplit/WindowSplit.js +346 -0
- package/WindowSplit/index.d.ts +1 -0
- package/WindowSplit/index.js +8 -0
- package/WindowSplit/package.json +6 -0
- package/Zoom/Zoom.d.ts +6 -0
- package/Zoom/Zoom.js +104 -0
- package/Zoom/index.d.ts +1 -0
- package/Zoom/index.js +8 -0
- package/Zoom/package.json +6 -0
- package/esm/Accordion/Accordion.js +321 -0
- package/esm/Accordion/index.js +1 -0
- package/esm/AdvancedTextField/AdvancedTextField.js +158 -0
- package/esm/AdvancedTextField/index.js +1 -0
- package/esm/Append/Append.js +495 -0
- package/esm/Append/index.js +1 -0
- package/esm/AreaChart/AreaChart.js +40 -0
- package/esm/AreaChart/index.js +1 -0
- package/esm/AreaChartItem/AreaChartItem.js +315 -0
- package/esm/AreaChartItem/index.js +1 -0
- package/esm/AudioPlayer/AudioPlayer.js +678 -0
- package/esm/AudioPlayer/index.js +1 -0
- package/esm/AudioRecorder/AudioRecorder.js +311 -0
- package/esm/AudioRecorder/index.js +1 -0
- package/esm/AutoComplete/AutoComplete.js +670 -0
- package/esm/AutoComplete/index.js +1 -0
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +80 -0
- package/esm/AutoCompleteCountry/index.js +1 -0
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +61 -0
- package/esm/AutoCompleteCurrency/index.js +1 -0
- package/esm/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.js +107 -0
- package/esm/AutoCompleteGooglePlaces/index.js +1 -0
- package/esm/Avatar/Avatar.js +103 -0
- package/esm/Avatar/index.js +1 -0
- package/esm/AvatarGroup/AvatarGroup.js +89 -0
- package/esm/AvatarGroup/index.js +1 -0
- package/esm/Backdrop/Backdrop.js +145 -0
- package/esm/Backdrop/index.js +1 -0
- package/esm/Badge/Badge.js +105 -0
- package/esm/Badge/index.js +1 -0
- package/esm/Banner/Banner.js +111 -0
- package/esm/Banner/index.js +1 -0
- package/esm/BottomAppBar/BottomAppBar.js +216 -0
- package/esm/BottomAppBar/index.js +1 -0
- package/esm/BottomSheet/BottomSheet.js +57 -0
- package/esm/BottomSheet/index.js +1 -0
- package/esm/Box/Box.js +36 -0
- package/esm/Box/index.js +1 -0
- package/esm/Breadcrumbs/Breadcrumbs.js +155 -0
- package/esm/Breadcrumbs/index.js +1 -0
- package/esm/BubbleChart/BubbleChart.js +231 -0
- package/esm/BubbleChart/index.js +1 -0
- package/esm/BubbleChartItem/BubbleChartItem.js +210 -0
- package/esm/BubbleChartItem/index.js +1 -0
- package/esm/Button/Button.js +473 -0
- package/esm/Button/index.js +1 -0
- package/esm/Buttons/Buttons.js +356 -0
- package/esm/Buttons/index.js +1 -0
- package/esm/Calendar/Calendar.js +667 -0
- package/esm/Calendar/index.js +1 -0
- package/esm/CalendarAvailability/CalendarAvailability.js +640 -0
- package/esm/CalendarAvailability/index.js +1 -0
- package/esm/CalendarMenu/CalendarMenu.js +388 -0
- package/esm/CalendarMenu/index.js +1 -0
- package/esm/CalendarMonth/CalendarMonth.js +520 -0
- package/esm/CalendarMonth/index.js +1 -0
- package/esm/CalendarViews/CalendarViews.js +360 -0
- package/esm/CalendarViews/index.js +1 -0
- package/esm/CalendarWeek/CalendarWeek.js +486 -0
- package/esm/CalendarWeek/index.js +1 -0
- package/esm/Card/Card.js +119 -0
- package/esm/Card/index.js +1 -0
- package/esm/CardButton/CardButton.js +69 -0
- package/esm/CardButton/index.js +1 -0
- package/esm/CardFooter/CardFooter.js +48 -0
- package/esm/CardFooter/index.js +1 -0
- package/esm/CardHeader/CardHeader.js +51 -0
- package/esm/CardHeader/index.js +1 -0
- package/esm/CardImage/CardImage.js +72 -0
- package/esm/CardImage/index.js +1 -0
- package/esm/CardMain/CardMain.js +43 -0
- package/esm/CardMain/index.js +1 -0
- package/esm/Carousel/Carousel.js +1008 -0
- package/esm/Carousel/index.js +1 -0
- package/esm/Chart/Chart.js +1295 -0
- package/esm/Chart/index.js +1 -0
- package/esm/Checkbox/Checkbox.js +334 -0
- package/esm/Checkbox/index.js +1 -0
- package/esm/Chip/Chip.js +125 -0
- package/esm/Chip/index.js +1 -0
- package/esm/Chips/Chips.js +115 -0
- package/esm/Chips/index.js +1 -0
- package/esm/ClickListener/ClickListener.js +77 -0
- package/esm/ClickListener/index.js +1 -0
- package/esm/Clock/Clock.js +466 -0
- package/esm/Clock/index.js +1 -0
- package/esm/ColorTextField/ColorTextField.js +214 -0
- package/esm/ColorTextField/index.js +1 -0
- package/esm/ColumnChart/ColumnChart.js +50 -0
- package/esm/ColumnChart/index.js +1 -0
- package/esm/ColumnChartItem/ColumnChartItem.js +190 -0
- package/esm/ColumnChartItem/index.js +1 -0
- package/esm/Confirm/Confirm.js +155 -0
- package/esm/Confirm/Context.js +3 -0
- package/esm/Confirm/index.js +4 -0
- package/esm/Confirm/useConfirm.js +6 -0
- package/esm/Container/Container.js +145 -0
- package/esm/Container/index.js +1 -0
- package/esm/Countdown/Countdown.js +376 -0
- package/esm/Countdown/index.js +1 -0
- package/esm/DatePicker/DatePicker.js +751 -0
- package/esm/DatePicker/index.js +1 -0
- package/esm/DateRangePicker/DateRangePicker.js +34 -0
- package/esm/DateRangePicker/index.js +1 -0
- package/esm/DateTimePicker/DateTimePicker.js +645 -0
- package/esm/DateTimePicker/index.js +1 -0
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +34 -0
- package/esm/DateTimeRangePicker/index.js +1 -0
- package/esm/Divider/Divider.js +183 -0
- package/esm/Divider/index.js +1 -0
- package/esm/DonutChart/DonutChart.js +40 -0
- package/esm/DonutChart/index.js +1 -0
- package/esm/DragAndDropList/DragAndDropList.js +153 -0
- package/esm/DragAndDropList/index.js +1 -0
- package/esm/Drawing/Drawing.js +803 -0
- package/esm/Drawing/index.js +1 -0
- package/esm/DropZone/DropZone.js +215 -0
- package/esm/DropZone/index.js +1 -0
- package/esm/Emojis/Emojis.js +368 -0
- package/esm/Emojis/emojis_list.js +7274 -0
- package/esm/Emojis/index.js +2 -0
- package/esm/Expand/Expand.js +196 -0
- package/esm/Expand/index.js +1 -0
- package/esm/Fab/Fab.js +36 -0
- package/esm/Fab/index.js +1 -0
- package/esm/Fade/Fade.js +125 -0
- package/esm/Fade/index.js +1 -0
- package/esm/FileChoose/FileChoose.js +197 -0
- package/esm/FileChoose/index.js +1 -0
- package/esm/Focus/Focus.js +84 -0
- package/esm/Focus/index.js +1 -0
- package/esm/Form/Form.js +180 -0
- package/esm/Form/index.js +1 -0
- package/esm/FormRow/FormRow.js +111 -0
- package/esm/FormRow/index.js +1 -0
- package/esm/Forms/Forms.js +45 -0
- package/esm/Forms/index.js +1 -0
- package/esm/Frame/Frame.js +194 -0
- package/esm/Frame/index.js +1 -0
- package/esm/Grid/Grid.js +218 -0
- package/esm/Grid/index.js +1 -0
- package/esm/Grow/Grow.js +131 -0
- package/esm/Grow/index.js +1 -0
- package/esm/HTMLCanvas/HTMLCanvas.js +723 -0
- package/esm/HTMLCanvas/index.js +2 -0
- package/esm/IFrame/IFrame.js +120 -0
- package/esm/IFrame/index.js +1 -0
- package/esm/Icon/Icon.js +104 -0
- package/esm/Icon/index.js +2 -0
- package/esm/IconButton/IconButton.js +39 -0
- package/esm/IconButton/index.js +1 -0
- package/esm/Image/Image.js +273 -0
- package/esm/Image/index.js +1 -0
- package/esm/ImageCrop/ImageCrop.js +1076 -0
- package/esm/ImageCrop/index.js +1 -0
- package/esm/ImageEdit/ImageEdit.js +1049 -0
- package/esm/ImageEdit/index.js +1 -0
- package/esm/ImageGallery/ImageGallery.js +500 -0
- package/esm/ImageGallery/index.js +1 -0
- package/esm/ImageList/ImageList.js +131 -0
- package/esm/ImageList/index.js +1 -0
- package/esm/ImageListItem/ImageListItem.js +93 -0
- package/esm/ImageListItem/index.js +1 -0
- package/esm/ImageListItemBox/ImageListItemBox.js +51 -0
- package/esm/ImageListItemBox/index.js +1 -0
- package/esm/Info/Info.js +77 -0
- package/esm/Info/index.js +1 -0
- package/esm/Interaction/Interaction.js +402 -0
- package/esm/Interaction/index.js +1 -0
- package/esm/Keyframes/Context.js +3 -0
- package/esm/Keyframes/Keyframes.js +183 -0
- package/esm/Keyframes/index.js +4 -0
- package/esm/Keyframes/useKeyframes.js +6 -0
- package/esm/Label/Label.js +161 -0
- package/esm/Label/index.js +1 -0
- package/esm/Labels/Labels.js +114 -0
- package/esm/Labels/index.js +1 -0
- package/esm/Line/Line.js +287 -0
- package/esm/Line/index.js +1 -0
- package/esm/LineChart/LineChart.js +44 -0
- package/esm/LineChart/index.js +1 -0
- package/esm/LineChartItem/LineChartItem.js +228 -0
- package/esm/LineChartItem/index.js +1 -0
- package/esm/LinearMeter/LinearMeter.js +465 -0
- package/esm/LinearMeter/index.js +1 -0
- package/esm/LinearProgress/LinearProgress.js +333 -0
- package/esm/LinearProgress/index.js +1 -0
- package/esm/Link/Link.js +175 -0
- package/esm/Link/index.js +1 -0
- package/esm/Links/Links.js +241 -0
- package/esm/Links/index.js +1 -0
- package/esm/List/List.js +137 -0
- package/esm/List/index.js +1 -0
- package/esm/ListItem/ListItem.js +369 -0
- package/esm/ListItem/index.js +1 -0
- package/esm/ListSubheader/ListSubheader.js +43 -0
- package/esm/ListSubheader/index.js +1 -0
- package/esm/MainProgress/Context.js +3 -0
- package/esm/MainProgress/MainProgress.js +182 -0
- package/esm/MainProgress/index.js +4 -0
- package/esm/MainProgress/useMainProgress.js +6 -0
- package/esm/Markdown/Markdown.js +795 -0
- package/esm/Markdown/index.js +1 -0
- package/esm/Masonry/Masonry.js +202 -0
- package/esm/Masonry/index.js +1 -0
- package/esm/Medias/Medias.js +379 -0
- package/esm/Medias/index.js +1 -0
- package/esm/Menu/Menu.js +251 -0
- package/esm/Menu/index.js +1 -0
- package/esm/MenuDesktop/MenuDesktop.js +475 -0
- package/esm/MenuDesktop/index.js +1 -0
- package/esm/MenuItem/MenuItem.js +265 -0
- package/esm/MenuItem/index.js +1 -0
- package/esm/Meta/Meta.js +65 -0
- package/esm/Meta/index.js +1 -0
- package/esm/Modal/Modal.js +312 -0
- package/esm/Modal/index.js +1 -0
- package/esm/ModalFooter/ModalFooter.js +40 -0
- package/esm/ModalFooter/index.js +1 -0
- package/esm/ModalHeader/ModalHeader.js +41 -0
- package/esm/ModalHeader/index.js +1 -0
- package/esm/ModalIcon/ModalIcon.js +22 -0
- package/esm/ModalIcon/index.js +1 -0
- package/esm/ModalMain/ModalMain.js +45 -0
- package/esm/ModalMain/index.js +1 -0
- package/esm/ModalText/ModalText.js +37 -0
- package/esm/ModalText/index.js +1 -0
- package/esm/ModalTitle/ModalTitle.js +37 -0
- package/esm/ModalTitle/index.js +1 -0
- package/esm/MoreOptions/MoreOptions.js +59 -0
- package/esm/MoreOptions/index.js +1 -0
- package/esm/Move/Move.js +161 -0
- package/esm/Move/index.js +1 -0
- package/esm/NavigationBar/NavigationBar.js +118 -0
- package/esm/NavigationBar/index.js +1 -0
- package/esm/NavigationDrawer/NavigationDrawer.js +235 -0
- package/esm/NavigationDrawer/index.js +1 -0
- package/esm/NavigationItem/NavigationItem.js +297 -0
- package/esm/NavigationItem/index.js +1 -0
- package/esm/NavigationRail/NavigationRail.js +165 -0
- package/esm/NavigationRail/index.js +1 -0
- package/esm/NotFound/NotFound.js +71 -0
- package/esm/NotFound/index.js +1 -0
- package/esm/NumericTextField/NumericTextField.js +205 -0
- package/esm/NumericTextField/index.js +1 -0
- package/esm/Page/Page.js +112 -0
- package/esm/Page/index.js +1 -0
- package/esm/PageTransition/PageTransition.js +105 -0
- package/esm/PageTransition/index.js +1 -0
- package/esm/Pagination/Pagination.js +134 -0
- package/esm/Pagination/index.js +1 -0
- package/esm/PaginationItem/PaginationItem.js +73 -0
- package/esm/PaginationItem/index.js +1 -0
- package/esm/Parallax/Parallax.js +133 -0
- package/esm/Parallax/index.js +1 -0
- package/esm/Path/Path.js +33 -0
- package/esm/Path/index.js +1 -0
- package/esm/PieChart/PieChart.js +364 -0
- package/esm/PieChart/index.js +1 -0
- package/esm/Placeholder/Placeholder.js +120 -0
- package/esm/Placeholder/index.js +1 -0
- package/esm/Portal/Portal.js +30 -0
- package/esm/Portal/index.js +1 -0
- package/esm/Properties/Properties.js +71 -0
- package/esm/Properties/index.js +1 -0
- package/esm/Property/Property.js +109 -0
- package/esm/Property/index.js +1 -0
- package/esm/Radio/Radio.js +204 -0
- package/esm/Radio/index.js +1 -0
- package/esm/Radios/Radios.js +112 -0
- package/esm/Radios/index.js +1 -0
- package/esm/Rating/Rating.js +353 -0
- package/esm/Rating/index.js +1 -0
- package/esm/Reset/Reset.js +15 -0
- package/esm/Reset/index.js +1 -0
- package/esm/Reveal/Reveal.js +87 -0
- package/esm/Reveal/index.js +1 -0
- package/esm/RichTextEditor/RichTextEditor.js +1748 -0
- package/esm/RichTextEditor/index.js +1 -0
- package/esm/RoundMeter/RoundMeter.js +634 -0
- package/esm/RoundMeter/index.js +1 -0
- package/esm/RoundProgress/RoundProgress.js +232 -0
- package/esm/RoundProgress/index.js +1 -0
- package/esm/ScatterChart/ScatterChart.js +40 -0
- package/esm/ScatterChart/index.js +1 -0
- package/esm/ScatterChartItem/ScatterChartItem.js +197 -0
- package/esm/ScatterChartItem/index.js +1 -0
- package/esm/ScreenCapture/ScreenCapture.js +402 -0
- package/esm/ScreenCapture/index.js +1 -0
- package/esm/Section/Section.js +399 -0
- package/esm/Section/index.js +1 -0
- package/esm/SectionAction/SectionAction.js +58 -0
- package/esm/SectionAction/index.js +1 -0
- package/esm/SectionBoxes/SectionBoxes.js +218 -0
- package/esm/SectionBoxes/index.js +1 -0
- package/esm/SectionCards/SectionCards.js +235 -0
- package/esm/SectionCards/index.js +1 -0
- package/esm/SectionCarousel/SectionCarousel.js +260 -0
- package/esm/SectionCarousel/index.js +1 -0
- package/esm/SectionContact/SectionContact.js +160 -0
- package/esm/SectionContact/index.js +1 -0
- package/esm/SectionImageGallery/SectionImageGallery.js +51 -0
- package/esm/SectionImageGallery/index.js +1 -0
- package/esm/SectionLogos/SectionLogos.js +110 -0
- package/esm/SectionLogos/index.js +1 -0
- package/esm/SectionMedia/SectionMedia.js +142 -0
- package/esm/SectionMedia/index.js +1 -0
- package/esm/SectionReviews/SectionReviews.js +145 -0
- package/esm/SectionReviews/index.js +1 -0
- package/esm/SectionTextMedia/SectionTextMedia.js +158 -0
- package/esm/SectionTextMedia/index.js +1 -0
- package/esm/SectionTimeline/SectionTimeline.js +106 -0
- package/esm/SectionTimeline/index.js +1 -0
- package/esm/SectionWatch/SectionWatch.js +52 -0
- package/esm/SectionWatch/index.js +1 -0
- package/esm/Select/Select.js +470 -0
- package/esm/Select/index.js +1 -0
- package/esm/Share/Share.js +442 -0
- package/esm/Share/index.js +1 -0
- package/esm/Slide/Slide.js +179 -0
- package/esm/Slide/index.js +1 -0
- package/esm/Slider/Slider.js +916 -0
- package/esm/Slider/index.js +1 -0
- package/esm/SmartTextField/SmartTextField.js +958 -0
- package/esm/SmartTextField/index.js +1 -0
- package/esm/Snackbar/Snackbar.js +208 -0
- package/esm/Snackbar/index.js +1 -0
- package/esm/Snackbars/Context.js +3 -0
- package/esm/Snackbars/Snackbars.js +213 -0
- package/esm/Snackbars/index.js +4 -0
- package/esm/Snackbars/useSnackbars.js +6 -0
- package/esm/Space/Space.js +1634 -0
- package/esm/Space/index.js +2 -0
- package/esm/SpeechToText/SpeechToText.js +190 -0
- package/esm/SpeechToText/index.js +1 -0
- package/esm/SpeedDial/SpeedDial.js +422 -0
- package/esm/SpeedDial/index.js +1 -0
- package/esm/SpeedDialItem/SpeedDialItem.js +79 -0
- package/esm/SpeedDialItem/index.js +1 -0
- package/esm/SpyScroll/SpyScroll.js +147 -0
- package/esm/SpyScroll/index.js +1 -0
- package/esm/Step/Step.js +157 -0
- package/esm/Step/index.js +1 -0
- package/esm/Stepper/Stepper.js +147 -0
- package/esm/Stepper/index.js +1 -0
- package/esm/Surface/Surface.js +761 -0
- package/esm/Surface/index.js +1 -0
- package/esm/Switch/Switch.js +685 -0
- package/esm/Switch/index.js +1 -0
- package/esm/Tab/Tab.js +155 -0
- package/esm/Tab/index.js +1 -0
- package/esm/Table/Table.js +88 -0
- package/esm/Table/index.js +1 -0
- package/esm/TableBody/TableBody.js +68 -0
- package/esm/TableBody/index.js +1 -0
- package/esm/TableCell/TableCell.js +241 -0
- package/esm/TableCell/index.js +1 -0
- package/esm/TableFooter/TableFooter.js +50 -0
- package/esm/TableFooter/index.js +1 -0
- package/esm/TableHead/TableHead.js +124 -0
- package/esm/TableHead/index.js +1 -0
- package/esm/TableHeader/TableHeader.js +52 -0
- package/esm/TableHeader/index.js +1 -0
- package/esm/TablePagination/TablePagination.js +148 -0
- package/esm/TablePagination/index.js +1 -0
- package/esm/TableRow/TableRow.js +68 -0
- package/esm/TableRow/index.js +1 -0
- package/esm/Tabs/Tabs.js +408 -0
- package/esm/Tabs/index.js +1 -0
- package/esm/Text/Text.js +120 -0
- package/esm/Text/index.js +1 -0
- package/esm/TextField/TextField.js +870 -0
- package/esm/TextField/index.js +1 -0
- package/esm/TextToSpeech/TextToSpeech.js +161 -0
- package/esm/TextToSpeech/index.js +1 -0
- package/esm/TimePicker/TimePicker.js +957 -0
- package/esm/TimePicker/index.js +1 -0
- package/esm/TimeRangePicker/TimeRangePicker.js +34 -0
- package/esm/TimeRangePicker/index.js +1 -0
- package/esm/Timeline/Timeline.js +42 -0
- package/esm/Timeline/index.js +1 -0
- package/esm/TimelineItem/TimelineItem.js +130 -0
- package/esm/TimelineItem/index.js +1 -0
- package/esm/Timer/Timer.js +292 -0
- package/esm/Timer/index.js +1 -0
- package/esm/ToggleButton/ToggleButton.js +57 -0
- package/esm/ToggleButton/index.js +1 -0
- package/esm/ToggleButtons/ToggleButtons.js +36 -0
- package/esm/ToggleButtons/index.js +1 -0
- package/esm/Tooltip/Tooltip.js +453 -0
- package/esm/Tooltip/index.js +1 -0
- package/esm/TopAppBar/TopAppBar.js +220 -0
- package/esm/TopAppBar/index.js +1 -0
- package/esm/Transition/Context.js +3 -0
- package/esm/Transition/Transition.js +315 -0
- package/esm/Transition/index.js +4 -0
- package/esm/Transition/useTransition.js +6 -0
- package/esm/Transitions/Transitions.js +207 -0
- package/esm/Transitions/index.js +1 -0
- package/esm/Tree/Tree.js +353 -0
- package/esm/Tree/index.js +1 -0
- package/esm/Type/Type.js +243 -0
- package/esm/Type/index.js +1 -0
- package/esm/VideoPlayer/VideoPlayer.js +834 -0
- package/esm/VideoPlayer/index.js +1 -0
- package/esm/ViewSplit/ViewSplit.js +414 -0
- package/esm/ViewSplit/index.js +1 -0
- package/esm/Watch/Watch.js +411 -0
- package/esm/Watch/index.js +1 -0
- package/esm/Weather/Weather.js +276 -0
- package/esm/Weather/index.js +1 -0
- package/esm/Widgets/Context.js +3 -0
- package/esm/Widgets/Widgets.js +200 -0
- package/esm/Widgets/index.js +4 -0
- package/esm/Widgets/useWidgets.js +6 -0
- package/esm/WindowSplit/WindowSplit.js +370 -0
- package/esm/WindowSplit/index.js +1 -0
- package/esm/Zoom/Zoom.js +120 -0
- package/esm/Zoom/index.js +1 -0
- package/esm/index.js +428 -0
- package/esm/types.js +1 -0
- package/esm/useForm/index.js +3 -0
- package/esm/useForm/useForm.js +197 -0
- package/esm/useForm/validate.js +204 -0
- package/esm/useLocation/index.js +1 -0
- package/esm/useLocation/useLocation.js +51 -0
- package/esm/useMediaQuery/index.js +1 -0
- package/esm/useMediaQuery/useMediaQuery.js +40 -0
- package/esm/useQuery/index.js +1 -0
- package/esm/useQuery/useQuery.js +11 -0
- package/esm/useScroll/index.js +1 -0
- package/esm/useScroll/useScroll.js +56 -0
- package/esm/useSubscription/index.js +1 -0
- package/esm/useSubscription/useSubscription.js +31 -0
- package/esm/useSwipe/index.js +1 -0
- package/esm/useSwipe/useSwipe.js +158 -0
- package/esm/useVisible/index.js +1 -0
- package/esm/useVisible/useVisible.js +81 -0
- package/esm/utils.js +1256 -0
- package/index.d.ts +423 -0
- package/index.js +658 -0
- package/package.json +55 -0
- package/types.d.ts +41 -0
- package/types.js +2 -0
- package/useForm/index.d.ts +3 -0
- package/useForm/index.js +12 -0
- package/useForm/package.json +6 -0
- package/useForm/useForm.d.ts +28 -0
- package/useForm/useForm.js +177 -0
- package/useForm/validate.d.ts +65 -0
- package/useForm/validate.js +219 -0
- package/useLocation/index.d.ts +1 -0
- package/useLocation/index.js +8 -0
- package/useLocation/package.json +6 -0
- package/useLocation/useLocation.d.ts +7 -0
- package/useLocation/useLocation.js +52 -0
- package/useMediaQuery/index.d.ts +1 -0
- package/useMediaQuery/index.js +8 -0
- package/useMediaQuery/package.json +6 -0
- package/useMediaQuery/useMediaQuery.d.ts +9 -0
- package/useMediaQuery/useMediaQuery.js +48 -0
- package/useQuery/index.d.ts +1 -0
- package/useQuery/index.js +8 -0
- package/useQuery/package.json +6 -0
- package/useQuery/useQuery.d.ts +5 -0
- package/useQuery/useQuery.js +14 -0
- package/useScroll/index.d.ts +1 -0
- package/useScroll/index.js +8 -0
- package/useScroll/package.json +6 -0
- package/useScroll/useScroll.d.ts +12 -0
- package/useScroll/useScroll.js +60 -0
- package/useSubscription/index.d.ts +1 -0
- package/useSubscription/index.js +8 -0
- package/useSubscription/package.json +6 -0
- package/useSubscription/useSubscription.d.ts +3 -0
- package/useSubscription/useSubscription.js +38 -0
- package/useSwipe/index.d.ts +1 -0
- package/useSwipe/index.js +8 -0
- package/useSwipe/package.json +6 -0
- package/useSwipe/useSwipe.d.ts +18 -0
- package/useSwipe/useSwipe.js +138 -0
- package/useVisible/index.d.ts +1 -0
- package/useVisible/index.js +8 -0
- package/useVisible/package.json +6 -0
- package/useVisible/useVisible.d.ts +23 -0
- package/useVisible/useVisible.js +80 -0
- package/utils.d.ts +48 -0
- package/utils.js +1422 -0
@@ -0,0 +1,1011 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
+
var t = {};
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
+
t[p] = s[p];
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
+
t[p[i]] = s[p[i]];
|
10
|
+
}
|
11
|
+
return t;
|
12
|
+
};
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
18
|
+
const react_1 = __importDefault(require("react"));
|
19
|
+
const utils_1 = require("@onesy/utils");
|
20
|
+
const style_react_1 = require("@onesy/style-react");
|
21
|
+
const IconMaterialFormatItalicW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatItalicW100"));
|
22
|
+
const IconMaterialFormatUnderlinedW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatUnderlinedW100"));
|
23
|
+
const IconMaterialFormatBoldW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatBoldW100"));
|
24
|
+
const IconMaterialContentCopyW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialContentCopyW100"));
|
25
|
+
const IconMaterialContentCutW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialContentCutW100"));
|
26
|
+
const IconMaterialContentPasteW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialContentPasteW100"));
|
27
|
+
const IconMaterialFormatAlignLeftW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatAlignLeftW100"));
|
28
|
+
const IconMaterialFormatAlignCenterW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatAlignCenterW100"));
|
29
|
+
const IconMaterialFormatAlignRightW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatAlignRightW100"));
|
30
|
+
const IconMaterialFormatAlignJustifyW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatAlignJustifyW100"));
|
31
|
+
const IconMaterialStrikethroughSW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialStrikethroughSW100"));
|
32
|
+
const IconMaterialUndoW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialUndoW100"));
|
33
|
+
const IconMaterialRedoW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialRedoW100"));
|
34
|
+
const IconMaterialFormatClearW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatClearW100"));
|
35
|
+
const IconMaterialSuperscriptW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialSuperscriptW100"));
|
36
|
+
const IconMaterialSubscriptW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialSubscriptW100"));
|
37
|
+
const IconMaterialFormatIndentIncreaseW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatIndentIncreaseW100"));
|
38
|
+
const IconMaterialFormatIndentDecreaseW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatIndentDecreaseW100"));
|
39
|
+
const IconMaterialFormatListNumberedW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatListNumberedW100"));
|
40
|
+
const IconMaterialFormatListBulletedW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatListBulletedW100"));
|
41
|
+
const IconMaterialHorizontalRuleW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialHorizontalRuleW100"));
|
42
|
+
const IconMaterialFormatColorTextW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatColorTextW100"));
|
43
|
+
const IconMaterialFormatColorFillW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatColorFillW100"));
|
44
|
+
const IconMaterialAddLinkW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialAddLinkW100"));
|
45
|
+
const IconMaterialLinkOffW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialLinkOffW100"));
|
46
|
+
const IconMaterialImageW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialImageW100"));
|
47
|
+
const IconMaterialFormatQuoteW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialFormatQuoteW100"));
|
48
|
+
const IconMaterialVideocamW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialVideocamW100"));
|
49
|
+
const IconMaterialPlayArrowW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialPlayArrowW100"));
|
50
|
+
const IconMaterialCodeW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialCodeW100"));
|
51
|
+
const IconMaterialDeleteSweepW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialDeleteSweepW100"));
|
52
|
+
const IconMaterialSelectAllW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialSelectAllW100"));
|
53
|
+
const IconMaterialPrintW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialPrintW100"));
|
54
|
+
const IconMaterialDownloadW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialDownloadW100"));
|
55
|
+
const IconMaterialTableW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialTableW100"));
|
56
|
+
const IconMaterialDrawW100_1 = __importDefault(require("@amaui/icons-material-rounded-react/IconMaterialDrawW100"));
|
57
|
+
const Type_1 = __importDefault(require("../Type"));
|
58
|
+
const Tooltip_1 = __importDefault(require("../Tooltip"));
|
59
|
+
const Fade_1 = __importDefault(require("../Fade"));
|
60
|
+
const Append_1 = __importDefault(require("../Append"));
|
61
|
+
const Select_1 = __importDefault(require("../Select"));
|
62
|
+
const Switch_1 = __importDefault(require("../Switch"));
|
63
|
+
const Label_1 = __importDefault(require("../Label"));
|
64
|
+
const NumericTextField_1 = __importDefault(require("../NumericTextField"));
|
65
|
+
const ColorTextField_1 = __importDefault(require("../ColorTextField"));
|
66
|
+
const ToggleButtons_1 = __importDefault(require("../ToggleButtons"));
|
67
|
+
const ToggleButton_1 = __importDefault(require("../ToggleButton"));
|
68
|
+
const Drawing_1 = __importDefault(require("../Drawing"));
|
69
|
+
const Divider_1 = __importDefault(require("../Divider"));
|
70
|
+
const ClickListener_1 = __importDefault(require("../ClickListener"));
|
71
|
+
const TextField_1 = __importDefault(require("../TextField"));
|
72
|
+
const Button_1 = __importDefault(require("../Button"));
|
73
|
+
const Surface_1 = __importDefault(require("../Surface"));
|
74
|
+
const ListItem_1 = __importDefault(require("../ListItem"));
|
75
|
+
const Line_1 = __importDefault(require("../Line"));
|
76
|
+
const utils_2 = require("../utils");
|
77
|
+
const useStyle = (0, style_react_1.style)(theme => ({
|
78
|
+
root: {
|
79
|
+
width: '100%'
|
80
|
+
},
|
81
|
+
value: {
|
82
|
+
padding: theme.methods.space.value(2, 'px'),
|
83
|
+
whiteSpace: 'break-spaces',
|
84
|
+
'& p': Object.assign({}, theme.typography.values.b2),
|
85
|
+
'& h1': Object.assign({}, theme.typography.values.h1),
|
86
|
+
'& h2': Object.assign({}, theme.typography.values.h2),
|
87
|
+
'& h3': Object.assign({}, theme.typography.values.h3),
|
88
|
+
'& h4': Object.assign({}, theme.typography.values.t1),
|
89
|
+
'& h5': Object.assign({}, theme.typography.values.t2),
|
90
|
+
'& a': {
|
91
|
+
color: theme.palette.color.primary.main,
|
92
|
+
textDecoration: 'underline'
|
93
|
+
},
|
94
|
+
'& blockquote': {
|
95
|
+
margin: '16px 0',
|
96
|
+
marginInlineStart: '16px',
|
97
|
+
padding: `${theme.methods.space.value(2.5, 'px')} ${theme.methods.space.value(2, 'px')}`,
|
98
|
+
borderInlineStart: `4px solid ${theme.methods.palette.color.colorToRgb(theme.palette.text.default.primary, theme.palette.light ? 0.04 : 0.2)}`,
|
99
|
+
background: theme.methods.palette.color.colorToRgb(theme.palette.text.default.primary, theme.palette.light ? 0.02 : 0.14),
|
100
|
+
'& > *': {
|
101
|
+
margin: '0px'
|
102
|
+
},
|
103
|
+
'& > $blockquote': {
|
104
|
+
marginBlock: '16px'
|
105
|
+
}
|
106
|
+
},
|
107
|
+
'& iframe': {
|
108
|
+
display: 'block',
|
109
|
+
maxWidth: '100%',
|
110
|
+
margin: '16px auto'
|
111
|
+
},
|
112
|
+
'& video': {
|
113
|
+
display: 'block',
|
114
|
+
margin: '16px auto'
|
115
|
+
},
|
116
|
+
'& code': {
|
117
|
+
padding: `${theme.methods.space.value(0.25, 'px')} ${theme.methods.space.value(0.5, 'px')}`,
|
118
|
+
borderRadius: theme.methods.shape.radius.value(0.5, 'px'),
|
119
|
+
color: theme.palette.text.default.primary,
|
120
|
+
background: theme.methods.palette.color.colorToRgb(theme.palette.text.default.primary, theme.palette.light ? 0.04 : 0.1)
|
121
|
+
},
|
122
|
+
'& pre': {
|
123
|
+
margin: '16px 0',
|
124
|
+
padding: theme.methods.space.value(2, 'px'),
|
125
|
+
borderRadius: theme.methods.shape.radius.value(1, 'px'),
|
126
|
+
color: theme.palette.text.default.primary,
|
127
|
+
background: theme.methods.palette.color.colorToRgb(theme.palette.text.default.primary, theme.palette.light ? 0.04 : 0.1),
|
128
|
+
'& code': {
|
129
|
+
padding: '0px',
|
130
|
+
background: 'transparent'
|
131
|
+
}
|
132
|
+
},
|
133
|
+
'& table': {
|
134
|
+
margin: '16px auto',
|
135
|
+
borderCollapse: 'collapse',
|
136
|
+
border: `1px solid ${theme.palette.light ? theme.palette.color.neutral[80] : theme.palette.color.neutral[30]}`,
|
137
|
+
'& th, & td': Object.assign(Object.assign({}, theme.typography.values.b2), { height: '45px', padding: `${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(2, 'px')}`, borderBottom: `1px solid ${theme.palette.light ? theme.palette.color.neutral[80] : theme.palette.color.neutral[30]}`, borderRight: `1px solid ${theme.palette.light ? theme.palette.color.neutral[80] : theme.palette.color.neutral[30]}` }),
|
138
|
+
'& th': {
|
139
|
+
fontWeight: 500,
|
140
|
+
borderBottom: `1px solid ${theme.palette.light ? theme.palette.color.neutral[50] : theme.palette.color.neutral[50]}`
|
141
|
+
}
|
142
|
+
},
|
143
|
+
'& .onesy-Drawing-svg': {
|
144
|
+
display: 'block',
|
145
|
+
margin: '16px auto',
|
146
|
+
background: theme.palette.color.neutral[100]
|
147
|
+
}
|
148
|
+
},
|
149
|
+
toolbars: {
|
150
|
+
width: '100%'
|
151
|
+
},
|
152
|
+
toolbar: {
|
153
|
+
width: '100%',
|
154
|
+
overflowX: 'auto',
|
155
|
+
padding: theme.methods.space.value(1, 'px')
|
156
|
+
},
|
157
|
+
divider: {
|
158
|
+
'&.onesy-Divider-root': {
|
159
|
+
margin: 0
|
160
|
+
}
|
161
|
+
},
|
162
|
+
divider_middle: {
|
163
|
+
'&.onesy-Divider-root': {
|
164
|
+
opacity: theme.palette.light ? 0.07 : 0.24
|
165
|
+
}
|
166
|
+
},
|
167
|
+
divider_end: {
|
168
|
+
'&.onesy-Divider-root': {
|
169
|
+
opacity: theme.palette.light ? 0.14 : 0.4
|
170
|
+
}
|
171
|
+
},
|
172
|
+
select: {
|
173
|
+
'& .onesy-TextField-input-wrapper': {
|
174
|
+
height: '40px',
|
175
|
+
paddingBlock: theme.methods.space.value(1.25, 'px')
|
176
|
+
},
|
177
|
+
'& .onesy-Select-input': {
|
178
|
+
'& > *': Object.assign(Object.assign({}, theme.typography.values.b2), { fontWeight: 400 })
|
179
|
+
}
|
180
|
+
},
|
181
|
+
miniMenu: {
|
182
|
+
padding: theme.methods.space.value(1.5, 'px'),
|
183
|
+
borderRadius: theme.methods.shape.radius.value(140, 'px'),
|
184
|
+
boxShadow: theme.shadows.values.default[2]
|
185
|
+
},
|
186
|
+
palette: {
|
187
|
+
padding: theme.methods.space.value(1.5, 'px'),
|
188
|
+
borderRadius: theme.methods.shape.radius.value(1, 'px'),
|
189
|
+
boxShadow: theme.shadows.values.default[2]
|
190
|
+
},
|
191
|
+
paletteItem: {
|
192
|
+
position: 'relative',
|
193
|
+
width: '17px',
|
194
|
+
height: '17px',
|
195
|
+
cursor: 'pointer',
|
196
|
+
borderRadius: theme.methods.shape.radius.value(40, 'px'),
|
197
|
+
boxShadow: theme.shadows.values.default[1],
|
198
|
+
transition: theme.methods.transitions.make('box-shadow'),
|
199
|
+
'&:hover': {
|
200
|
+
boxShadow: theme.shadows.values.default[2],
|
201
|
+
}
|
202
|
+
},
|
203
|
+
textFieldColor: {
|
204
|
+
flex: '1 1 auto'
|
205
|
+
},
|
206
|
+
inputColor: {
|
207
|
+
border: 'none',
|
208
|
+
borderRadius: theme.methods.shape.radius.value(40, 'px'),
|
209
|
+
overflow: 'hidden',
|
210
|
+
width: '17px',
|
211
|
+
height: '17px',
|
212
|
+
cursor: 'pointer',
|
213
|
+
boxShadow: theme.shadows.values.default[1],
|
214
|
+
'&::-webkit-color-swatch-wrapper': {
|
215
|
+
padding: '0px'
|
216
|
+
},
|
217
|
+
'&::-webkit-color-swatch': {
|
218
|
+
border: 'none'
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}), { name: 'onesy-RichTextEditor' });
|
222
|
+
const RichTextEditor = react_1.default.forwardRef((props__, ref) => {
|
223
|
+
var _a;
|
224
|
+
const theme = (0, style_react_1.useOnesyTheme)();
|
225
|
+
const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyRichTextEditor) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props__)); }, [props__]);
|
226
|
+
const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
|
227
|
+
const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
|
228
|
+
const Tooltip = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tooltip) || Tooltip_1.default; }, [theme]);
|
229
|
+
const Fade = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Fade) || Fade_1.default; }, [theme]);
|
230
|
+
const Append = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Append) || Append_1.default; }, [theme]);
|
231
|
+
const Select = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Select) || Select_1.default; }, [theme]);
|
232
|
+
const Switch = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Switch) || Switch_1.default; }, [theme]);
|
233
|
+
const Label = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Label) || Label_1.default; }, [theme]);
|
234
|
+
const NumericTextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.NumericTextField) || NumericTextField_1.default; }, [theme]);
|
235
|
+
const ColorTextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ColorTextField) || ColorTextField_1.default; }, [theme]);
|
236
|
+
const ToggleButton = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ToggleButton) || ToggleButton_1.default; }, [theme]);
|
237
|
+
const ToggleButtons = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ToggleButtons) || ToggleButtons_1.default; }, [theme]);
|
238
|
+
const Drawing = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Drawing) || Drawing_1.default; }, [theme]);
|
239
|
+
const Divider = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Divider) || Divider_1.default; }, [theme]);
|
240
|
+
const ClickListener = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ClickListener) || ClickListener_1.default; }, [theme]);
|
241
|
+
const TextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.TextField) || TextField_1.default; }, [theme]);
|
242
|
+
const Surface = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Surface) || Surface_1.default; }, [theme]);
|
243
|
+
const Button = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Button) || Button_1.default; }, [theme]);
|
244
|
+
const ListItem = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ListItem) || ListItem_1.default; }, [theme]);
|
245
|
+
const { tonal = true, color = 'default', version = 'filled', value, onChange, render, miniMenu = true, miniMenuInclude = [
|
246
|
+
'italic',
|
247
|
+
'underline',
|
248
|
+
'bold',
|
249
|
+
'strike-line',
|
250
|
+
'font-color',
|
251
|
+
'font-background',
|
252
|
+
'align-left',
|
253
|
+
'align-center',
|
254
|
+
'align-right',
|
255
|
+
'align-justify',
|
256
|
+
'link-add',
|
257
|
+
'link-remove',
|
258
|
+
'clear'
|
259
|
+
], exclude, updates = true, actions = true, fontFamilies = [
|
260
|
+
{ label: 'Arial', value: `Arial, sans-serif` },
|
261
|
+
{ label: 'Verdana', value: `Verdana, sans-serif` },
|
262
|
+
{ label: 'Helvetica', value: `Helvetica, sans-serif` },
|
263
|
+
{ label: 'Georgia', value: `Georgia, sans-serif` },
|
264
|
+
{ label: 'Roboto', value: `Roboto, sans-serif` },
|
265
|
+
{ label: 'DM Sans', value: `DM Sans, sans-serif` }
|
266
|
+
], addFontFamilies = [],
|
267
|
+
// Update
|
268
|
+
IconItalic = IconMaterialFormatItalicW100_1.default, IconUnderline = IconMaterialFormatUnderlinedW100_1.default, IconBold = IconMaterialFormatBoldW100_1.default, IconStrikeLine = IconMaterialStrikethroughSW100_1.default, IconColor = IconMaterialFormatColorTextW100_1.default, IconBackground = IconMaterialFormatColorFillW100_1.default, IconAlignLeft = IconMaterialFormatAlignLeftW100_1.default, IconAlignCenter = IconMaterialFormatAlignCenterW100_1.default, IconAlignRight = IconMaterialFormatAlignRightW100_1.default, IconAlignJustify = IconMaterialFormatAlignJustifyW100_1.default, IconIndent = IconMaterialFormatIndentIncreaseW100_1.default, IconOutdent = IconMaterialFormatIndentDecreaseW100_1.default, IconSuperscript = IconMaterialSuperscriptW100_1.default, IconSubscript = IconMaterialSubscriptW100_1.default, IconListOrdered = IconMaterialFormatListNumberedW100_1.default, IconListUnordered = IconMaterialFormatListBulletedW100_1.default, IconHorizontalRule = IconMaterialHorizontalRuleW100_1.default, IconLinkAdd = IconMaterialAddLinkW100_1.default, IconLinkRemove = IconMaterialLinkOffW100_1.default, IconQuote = IconMaterialFormatQuoteW100_1.default, IconImage = IconMaterialImageW100_1.default, IconVideo = IconMaterialVideocamW100_1.default, IconVideoYoutube = IconMaterialPlayArrowW100_1.default, IconTable = IconMaterialTableW100_1.default, IconCode = IconMaterialCodeW100_1.default, IconDrawing = IconMaterialDrawW100_1.default,
|
269
|
+
// Action
|
270
|
+
IconCopy = IconMaterialContentCopyW100_1.default, IconCut = IconMaterialContentCutW100_1.default, IconPaste = IconMaterialContentPasteW100_1.default, IconDelete = IconMaterialDeleteSweepW100_1.default, IconClear = IconMaterialFormatClearW100_1.default, IconSelectAll = IconMaterialSelectAllW100_1.default, IconSave = IconMaterialDownloadW100_1.default, IconPrint = IconMaterialPrintW100_1.default, IconUndo = IconMaterialUndoW100_1.default, IconRedo = IconMaterialRedoW100_1.default, AppendProps: AppendProps_, ToolbarProps, ToolbarUpdatesProps, ToolbarActionsProps, ToggleButtonProps: ToggleButtonProps_, ToggleButtonsProps: ToggleButtonsProps_, DividerProps: DividerProps_, SelectProps: SelectProps_, ListItemProps: ListItemProps_, TooltipProps: TooltipProps_, MiniMenuProps: MiniMenuProps_, DrawingProps, IconProps: IconProps_, ColorTextFieldProps, Component = 'div', className, children } = props, other = __rest(props, ["tonal", "color", "version", "value", "onChange", "render", "miniMenu", "miniMenuInclude", "exclude", "updates", "actions", "fontFamilies", "addFontFamilies", "IconItalic", "IconUnderline", "IconBold", "IconStrikeLine", "IconColor", "IconBackground", "IconAlignLeft", "IconAlignCenter", "IconAlignRight", "IconAlignJustify", "IconIndent", "IconOutdent", "IconSuperscript", "IconSubscript", "IconListOrdered", "IconListUnordered", "IconHorizontalRule", "IconLinkAdd", "IconLinkRemove", "IconQuote", "IconImage", "IconVideo", "IconVideoYoutube", "IconTable", "IconCode", "IconDrawing", "IconCopy", "IconCut", "IconPaste", "IconDelete", "IconClear", "IconSelectAll", "IconSave", "IconPrint", "IconUndo", "IconRedo", "AppendProps", "ToolbarProps", "ToolbarUpdatesProps", "ToolbarActionsProps", "ToggleButtonProps", "ToggleButtonsProps", "DividerProps", "SelectProps", "ListItemProps", "TooltipProps", "MiniMenuProps", "DrawingProps", "IconProps", "ColorTextFieldProps", "Component", "className", "children"]);
|
271
|
+
const { classes } = useStyle();
|
272
|
+
const [inputValues, setInputValues] = react_1.default.useState({});
|
273
|
+
const [open, setOpen] = react_1.default.useState({});
|
274
|
+
const [selected, setSelected] = react_1.default.useState([]);
|
275
|
+
const [selection, setSelection] = react_1.default.useState();
|
276
|
+
const refs = {
|
277
|
+
root: react_1.default.useRef(undefined),
|
278
|
+
value: react_1.default.useRef(undefined),
|
279
|
+
range: react_1.default.useRef(undefined),
|
280
|
+
inputValues: react_1.default.useRef(undefined),
|
281
|
+
open: react_1.default.useRef(undefined),
|
282
|
+
props: react_1.default.useRef(undefined),
|
283
|
+
selected: react_1.default.useRef(undefined),
|
284
|
+
miniMenu: react_1.default.useRef(undefined),
|
285
|
+
miniMenuInclude: react_1.default.useRef(undefined),
|
286
|
+
miniMenuElements: {
|
287
|
+
color: react_1.default.useRef(undefined),
|
288
|
+
colorPalette: react_1.default.useRef(undefined),
|
289
|
+
background: react_1.default.useRef(undefined),
|
290
|
+
backgroundPalette: react_1.default.useRef(undefined),
|
291
|
+
linkAdd: react_1.default.useRef(undefined),
|
292
|
+
linkAddInput: react_1.default.useRef(undefined),
|
293
|
+
linkRemove: react_1.default.useRef(undefined),
|
294
|
+
},
|
295
|
+
elements: {
|
296
|
+
color: react_1.default.useRef(undefined),
|
297
|
+
background: react_1.default.useRef(undefined),
|
298
|
+
linkAdd: react_1.default.useRef(undefined),
|
299
|
+
linkRemove: react_1.default.useRef(undefined),
|
300
|
+
quote: react_1.default.useRef(undefined),
|
301
|
+
image: react_1.default.useRef(undefined),
|
302
|
+
video: react_1.default.useRef(undefined),
|
303
|
+
videoYoutube: react_1.default.useRef(undefined),
|
304
|
+
table: react_1.default.useRef(undefined),
|
305
|
+
drawing: react_1.default.useRef(undefined),
|
306
|
+
drawingSvg: react_1.default.useRef(undefined),
|
307
|
+
drawingSize: react_1.default.useRef(undefined),
|
308
|
+
drawingSelect: react_1.default.useRef(undefined),
|
309
|
+
drawingPalette: react_1.default.useRef(undefined),
|
310
|
+
code: react_1.default.useRef(undefined)
|
311
|
+
},
|
312
|
+
rootDocument: react_1.default.useRef(),
|
313
|
+
rootWindow: react_1.default.useRef()
|
314
|
+
};
|
315
|
+
refs.inputValues.current = inputValues;
|
316
|
+
refs.open.current = open;
|
317
|
+
refs.props.current = props;
|
318
|
+
refs.selected.current = selected;
|
319
|
+
refs.miniMenuInclude.current = miniMenuInclude;
|
320
|
+
const rootDocument = (0, utils_1.isEnvironment)('browser') && (((_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window.document);
|
321
|
+
const rootWindow = rootDocument && (rootDocument.defaultView || window);
|
322
|
+
refs.rootDocument.current = rootDocument;
|
323
|
+
refs.rootWindow.current = rootWindow;
|
324
|
+
react_1.default.useEffect(() => {
|
325
|
+
// Add value as innerHTML
|
326
|
+
refs.value.current.innerHTML = value;
|
327
|
+
}, [value]);
|
328
|
+
react_1.default.useEffect(() => {
|
329
|
+
var _a, _b;
|
330
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
331
|
+
if (selection_.anchorNode &&
|
332
|
+
!((_b = (_a = selection_.anchorNode) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('TextField')))
|
333
|
+
refs.range.current = selection_.getRangeAt(0);
|
334
|
+
}, [open]);
|
335
|
+
react_1.default.useEffect(() => {
|
336
|
+
if (!selection) {
|
337
|
+
updateOpen('colorMiniMenu', false);
|
338
|
+
updateOpen('backgroundMiniMenu', false);
|
339
|
+
updateOpen('linkMiniMenu', false);
|
340
|
+
}
|
341
|
+
}, [selection]);
|
342
|
+
const query = (command) => {
|
343
|
+
return (0, utils_1.parse)(refs.rootDocument.current.queryCommandValue(command));
|
344
|
+
};
|
345
|
+
const includesMinMenu = (...args) => args.some(item => refs.miniMenuInclude.current.includes(item));
|
346
|
+
const clear = (element = refs.value.current) => {
|
347
|
+
const children_ = Array.from(element.children);
|
348
|
+
const toRemove = [];
|
349
|
+
const other_ = [];
|
350
|
+
children_.forEach((item, index) => {
|
351
|
+
((item.tagName === 'SPAN' && !item.innerHTML) ||
|
352
|
+
(item.tagName === 'BR' && index > 0 && (children_[index - 1].tagName === 'SPAN' && !children_[index - 1].innerHTML))) ? toRemove.push(item) : other_.push(item);
|
353
|
+
});
|
354
|
+
toRemove.forEach((item) => item.remove());
|
355
|
+
other_.forEach(item => clear(item));
|
356
|
+
};
|
357
|
+
const onUpdate = (event) => {
|
358
|
+
// Clear from empty element values
|
359
|
+
clear();
|
360
|
+
if ((0, utils_1.is)('function', onChange))
|
361
|
+
onChange(event);
|
362
|
+
};
|
363
|
+
const updateInputValues = (property, itemValue) => {
|
364
|
+
setInputValues(values => (Object.assign(Object.assign({}, values), { [property]: itemValue })));
|
365
|
+
};
|
366
|
+
const updateOpen = (property, itemValue) => {
|
367
|
+
setOpen(values => (Object.assign(Object.assign({}, values), { [property]: itemValue })));
|
368
|
+
};
|
369
|
+
const paste = async () => {
|
370
|
+
const value_ = await navigator.clipboard.read();
|
371
|
+
if (value_) {
|
372
|
+
let values = '';
|
373
|
+
for (const item of Array.from(value_)) {
|
374
|
+
const valueItem = await item.getType('text/html');
|
375
|
+
values += await valueItem.text();
|
376
|
+
}
|
377
|
+
refs.rootDocument.current.execCommand('insertHTML', undefined, values);
|
378
|
+
}
|
379
|
+
};
|
380
|
+
const method = react_1.default.useCallback((command) => (argument) => {
|
381
|
+
switch (command) {
|
382
|
+
// updates
|
383
|
+
case 'italic':
|
384
|
+
refs.rootDocument.current.execCommand('italic');
|
385
|
+
if (query('italic'))
|
386
|
+
setSelected(values => [...values, 'italic']);
|
387
|
+
else
|
388
|
+
setSelected(values => values.filter(item => item !== 'italic'));
|
389
|
+
break;
|
390
|
+
case 'underline':
|
391
|
+
refs.rootDocument.current.execCommand('underline');
|
392
|
+
if (query('underline'))
|
393
|
+
setSelected(values => [...values, 'underline']);
|
394
|
+
else
|
395
|
+
setSelected(values => values.filter(item => item !== 'underline'));
|
396
|
+
break;
|
397
|
+
case 'bold':
|
398
|
+
refs.rootDocument.current.execCommand('bold');
|
399
|
+
if (query('bold'))
|
400
|
+
setSelected(values => [...values, 'bold']);
|
401
|
+
else
|
402
|
+
setSelected(values => values.filter(item => item !== 'bold'));
|
403
|
+
break;
|
404
|
+
case 'strike-line':
|
405
|
+
refs.rootDocument.current.execCommand('strikeThrough');
|
406
|
+
if (query('strikeThrough'))
|
407
|
+
setSelected(values => [...values, 'strike-line']);
|
408
|
+
else
|
409
|
+
setSelected(values => values.filter(item => item !== 'strike-line'));
|
410
|
+
break;
|
411
|
+
case 'align-left':
|
412
|
+
refs.rootDocument.current.execCommand('justifyLeft');
|
413
|
+
if (query('justifyLeft'))
|
414
|
+
setSelected(values => [...values.filter(item => !item.includes('align')), 'align-left']);
|
415
|
+
else
|
416
|
+
setSelected(values => values.filter(item => item !== 'align-left'));
|
417
|
+
break;
|
418
|
+
case 'align-center':
|
419
|
+
refs.rootDocument.current.execCommand('justifyCenter');
|
420
|
+
if (query('justifyCenter'))
|
421
|
+
setSelected(values => [...values.filter(item => !item.includes('align')), 'align-center']);
|
422
|
+
else
|
423
|
+
setSelected(values => values.filter(item => item !== 'align-center'));
|
424
|
+
break;
|
425
|
+
case 'align-right':
|
426
|
+
refs.rootDocument.current.execCommand('justifyRight');
|
427
|
+
if (query('justifyRight'))
|
428
|
+
setSelected(values => [...values.filter(item => !item.includes('align')), 'align-right']);
|
429
|
+
else
|
430
|
+
setSelected(values => values.filter(item => item !== 'align-right'));
|
431
|
+
break;
|
432
|
+
case 'align-justify':
|
433
|
+
refs.rootDocument.current.execCommand('justifyFull');
|
434
|
+
if (query('justifyFull'))
|
435
|
+
setSelected(values => [...values.filter(item => !item.includes('align')), 'align-justify']);
|
436
|
+
else
|
437
|
+
setSelected(values => values.filter(item => item !== 'align-justify'));
|
438
|
+
break;
|
439
|
+
case 'superscript':
|
440
|
+
refs.rootDocument.current.execCommand('superscript');
|
441
|
+
if (query('superscript'))
|
442
|
+
setSelected(values => [...values, 'superscript']);
|
443
|
+
else
|
444
|
+
setSelected(values => values.filter(item => item !== 'superscript'));
|
445
|
+
break;
|
446
|
+
case 'subscript':
|
447
|
+
refs.rootDocument.current.execCommand('subscript');
|
448
|
+
if (query('subscript'))
|
449
|
+
setSelected(values => [...values, 'subscript']);
|
450
|
+
else
|
451
|
+
setSelected(values => values.filter(item => item !== 'subscript'));
|
452
|
+
break;
|
453
|
+
case 'indent':
|
454
|
+
refs.rootDocument.current.execCommand('indent');
|
455
|
+
break;
|
456
|
+
case 'outdent':
|
457
|
+
refs.rootDocument.current.execCommand('outdent');
|
458
|
+
break;
|
459
|
+
case 'font-version':
|
460
|
+
refs.rootDocument.current.execCommand('formatBlock', undefined, argument);
|
461
|
+
break;
|
462
|
+
case 'font-family':
|
463
|
+
refs.rootDocument.current.execCommand('styleWithCSS', true);
|
464
|
+
refs.rootDocument.current.execCommand('fontName', undefined, argument);
|
465
|
+
refs.rootDocument.current.execCommand('styleWithCSS', false);
|
466
|
+
break;
|
467
|
+
case 'font-size':
|
468
|
+
refs.rootDocument.current.execCommand('styleWithCSS', true);
|
469
|
+
refs.rootDocument.current.execCommand('fontSize', undefined, argument);
|
470
|
+
refs.rootDocument.current.execCommand('styleWithCSS', false);
|
471
|
+
break;
|
472
|
+
case 'font-color':
|
473
|
+
refs.rootDocument.current.execCommand('styleWithCSS', true);
|
474
|
+
refs.rootDocument.current.execCommand('foreColor', undefined, argument);
|
475
|
+
refs.rootDocument.current.execCommand('styleWithCSS', false);
|
476
|
+
break;
|
477
|
+
case 'font-background':
|
478
|
+
refs.rootDocument.current.execCommand('styleWithCSS', true);
|
479
|
+
refs.rootDocument.current.execCommand('backColor', undefined, argument);
|
480
|
+
refs.rootDocument.current.execCommand('styleWithCSS', false);
|
481
|
+
break;
|
482
|
+
case 'list-ordered':
|
483
|
+
refs.rootDocument.current.execCommand('insertOrderedList');
|
484
|
+
if (query('insertOrderedList'))
|
485
|
+
setSelected(values => [...values.filter(item => !item.includes('list')), 'list-ordered']);
|
486
|
+
else
|
487
|
+
setSelected(values => values.filter(item => item !== 'list-ordered'));
|
488
|
+
break;
|
489
|
+
case 'list-unordered':
|
490
|
+
refs.rootDocument.current.execCommand('insertUnorderedList');
|
491
|
+
if (query('insertUnorderedList'))
|
492
|
+
setSelected(values => [...values.filter(item => !item.includes('list')), 'list-unordered']);
|
493
|
+
else
|
494
|
+
setSelected(values => values.filter(item => item !== 'list-unordered'));
|
495
|
+
break;
|
496
|
+
case 'horizontal-rule':
|
497
|
+
refs.rootDocument.current.execCommand('insertHorizontalRule');
|
498
|
+
break;
|
499
|
+
case 'link-add':
|
500
|
+
refs.rootDocument.current.execCommand('createLink', undefined, argument);
|
501
|
+
break;
|
502
|
+
case 'link-remove':
|
503
|
+
refs.rootDocument.current.execCommand('unlink');
|
504
|
+
break;
|
505
|
+
case 'image':
|
506
|
+
refs.rootDocument.current.execCommand('insertImage', undefined, argument);
|
507
|
+
break;
|
508
|
+
case 'html':
|
509
|
+
refs.rootDocument.current.execCommand('insertHTML', undefined, argument);
|
510
|
+
break;
|
511
|
+
// actions
|
512
|
+
case 'copy':
|
513
|
+
refs.rootDocument.current.execCommand('copy');
|
514
|
+
break;
|
515
|
+
case 'cut':
|
516
|
+
refs.rootDocument.current.execCommand('cut');
|
517
|
+
break;
|
518
|
+
case 'paste':
|
519
|
+
if (refs.rootDocument.current.queryCommandSupported('paste'))
|
520
|
+
refs.rootDocument.current.execCommand('paste');
|
521
|
+
else
|
522
|
+
paste();
|
523
|
+
break;
|
524
|
+
case 'delete':
|
525
|
+
refs.rootDocument.current.execCommand('delete');
|
526
|
+
break;
|
527
|
+
case 'clear':
|
528
|
+
refs.rootDocument.current.execCommand('removeFormat');
|
529
|
+
break;
|
530
|
+
case 'select-all':
|
531
|
+
refs.rootDocument.current.execCommand('selectAll');
|
532
|
+
break;
|
533
|
+
case 'undo':
|
534
|
+
refs.rootDocument.current.execCommand('undo');
|
535
|
+
break;
|
536
|
+
case 'redo':
|
537
|
+
refs.rootDocument.current.execCommand('redo');
|
538
|
+
break;
|
539
|
+
default:
|
540
|
+
break;
|
541
|
+
}
|
542
|
+
}, []);
|
543
|
+
const includes = (...args) => !(0, utils_1.is)('array', exclude) || args.some(item => !exclude.includes(item));
|
544
|
+
// italic, underline, bold
|
545
|
+
// updates toolbar
|
546
|
+
const updateOptions = ['font-family', 'font-version', 'font-size', 'font-color', 'font-background', 'italic', 'underline', 'bold', 'strike-line', 'align-left', 'align-center', 'align-right', 'align-justify', 'superscript', 'subscript', 'indent', 'outdent', 'list-ordered', 'list-unordered', 'horizontal-rule', 'link-add', 'link-remove', 'quote', 'image', 'video', 'video-youtube', 'table', 'drawing', 'code'];
|
547
|
+
const updates_ = updates && (!(0, utils_1.is)('array', exclude) || includes(...updateOptions));
|
548
|
+
// copy, paste, cut
|
549
|
+
// action toolbar
|
550
|
+
const actions_ = actions && (!(0, utils_1.is)('array', exclude) || includes('copy', 'paste', 'cut', 'clear', 'undo', 'redo', 'delete', 'select-all', 'save', 'print'));
|
551
|
+
const AppendProps = Object.assign({ padding: [14, 14] }, AppendProps_);
|
552
|
+
const DividerProps = Object.assign({ color: 'inherit' }, DividerProps_);
|
553
|
+
const TooltipProps = Object.assign({ position: 'bottom', interactive: false }, TooltipProps_);
|
554
|
+
const ToggleButtonsProps = Object.assign({ tonal,
|
555
|
+
color, version: 'text', border: false }, ToggleButtonsProps_);
|
556
|
+
const ToggleButtonProps = Object.assign({ size: 'small' }, ToggleButtonProps_);
|
557
|
+
const MiniMenuProps = Object.assign({ tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed' }, MiniMenuProps_);
|
558
|
+
const SelectProps = Object.assign({ tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', version: 'outlined', size: 'small', ListProps: {
|
559
|
+
tonal,
|
560
|
+
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed'
|
561
|
+
}, MenuProps: {
|
562
|
+
portal: true
|
563
|
+
} }, SelectProps_);
|
564
|
+
const ListItemProps = Object.assign({ size: 'small', PrimaryProps: {
|
565
|
+
style: {
|
566
|
+
fontFamily: 'inherit'
|
567
|
+
}
|
568
|
+
} }, ListItemProps_);
|
569
|
+
const IconProps = Object.assign({ size: 'small' }, IconProps_);
|
570
|
+
const WrapperToggleButton = react_1.default.useCallback(react_1.default.forwardRef((props_, ref_) => {
|
571
|
+
const { open: open_, label, children: children_ } = props_, other_ = __rest(props_, ["open", "label", "children"]);
|
572
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open_ !== undefined ? open_ : undefined, label: label }, TooltipProps, { children: react_1.default.cloneElement(children_, Object.assign(Object.assign({}, other_), children_.props)) })));
|
573
|
+
}), []);
|
574
|
+
const WrapperAppend = react_1.default.useCallback((props_) => {
|
575
|
+
const { open: open_, element, anchorElement, onClose, children: children_ } = props_, other_ = __rest(props_, ["open", "element", "anchorElement", "onClose", "children"]);
|
576
|
+
return ((0, jsx_runtime_1.jsx)(Append, Object.assign({ open: open_, element: ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: open_, add: true }, { children: react_1.default.cloneElement(element) })) })), anchorElement: anchorElement, portal: true, alignment: 'center', position: 'bottom' }, AppendProps, { children: react_1.default.cloneElement(children_, Object.assign(Object.assign({}, other_), children_.props)) })));
|
577
|
+
}, []);
|
578
|
+
const onMouseDown = react_1.default.useCallback(() => {
|
579
|
+
var _a, _b;
|
580
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
581
|
+
if (selection_.anchorNode &&
|
582
|
+
!((_b = (_a = selection_.anchorNode) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('TextField')))
|
583
|
+
refs.range.current = selection_.getRangeAt(0);
|
584
|
+
}, []);
|
585
|
+
const onMouseUp = react_1.default.useCallback(() => {
|
586
|
+
if (refs.range.current) {
|
587
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
588
|
+
selection_.removeAllRanges();
|
589
|
+
selection_.addRange(refs.range.current);
|
590
|
+
}
|
591
|
+
}, []);
|
592
|
+
const PaletteItem = react_1.default.useCallback((props_) => {
|
593
|
+
const { color: color_ } = props_, other_ = __rest(props_, ["color"]);
|
594
|
+
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: (0, style_react_1.classNames)([
|
595
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
596
|
+
'onesy-RichTextEditor-palette-item'
|
597
|
+
],
|
598
|
+
classes.paletteItem
|
599
|
+
]), style: {
|
600
|
+
background: color_
|
601
|
+
} }, other_)));
|
602
|
+
}, []);
|
603
|
+
const Palette = react_1.default.useCallback(react_1.default.forwardRef((props_, ref_) => {
|
604
|
+
const { version: version_, onUpdate: onUpdate_, onClose } = props_, other_ = __rest(props_, ["version", "onUpdate", "onClose"]);
|
605
|
+
return ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ ref: ref_, gap: 1, direction: 'column', tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
|
606
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
607
|
+
'onesy-RichTextEditor-palette'
|
608
|
+
],
|
609
|
+
classes.palette
|
610
|
+
]) }, other_, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, onMouseUp: onMouseUp, onMouseDown: onMouseDown }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, direction: 'row', style: {
|
611
|
+
width: '100%'
|
612
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(PaletteItem, { color: '#000000', onClick: () => {
|
613
|
+
onUpdate_('#000000');
|
614
|
+
onClose();
|
615
|
+
} }), (0, jsx_runtime_1.jsx)(PaletteItem, { color: '#ffffff', onClick: () => {
|
616
|
+
onUpdate_('#ffffff');
|
617
|
+
onClose();
|
618
|
+
} })] })), Object.keys(style_react_1.colors).filter(item => !['black', 'white'].includes(item)).map((item, index) => ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0.5, direction: 'row', style: {
|
619
|
+
width: '100%'
|
620
|
+
} }, { children: Object.keys(style_react_1.colors[item]).map((item_, index_) => ((0, jsx_runtime_1.jsx)(PaletteItem, { color: style_react_1.colors[item][item_], onClick: () => {
|
621
|
+
if (refs.range.current) {
|
622
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
623
|
+
selection_.removeAllRanges();
|
624
|
+
selection_.addRange(refs.range.current);
|
625
|
+
}
|
626
|
+
onUpdate_(style_react_1.colors[item][item_]);
|
627
|
+
onClose();
|
628
|
+
} }, index_))) }), index)))] })), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, direction: 'row', align: 'center', style: {
|
629
|
+
width: '100%'
|
630
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(ColorTextField, Object.assign({ tonal: tonal, color: color, label: 'Custom color', version: 'outlined', size: 'small', value: refs.inputValues.current[version_], onChange: valueNew => updateInputValues(version_, valueNew) }, ColorTextFieldProps, { className: (0, style_react_1.classNames)([
|
631
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
632
|
+
'onesy-RichTextEditor-text-field-color'
|
633
|
+
],
|
634
|
+
ColorTextFieldProps === null || ColorTextFieldProps === void 0 ? void 0 : ColorTextFieldProps.className,
|
635
|
+
classes.textFieldColor
|
636
|
+
]) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: () => {
|
637
|
+
if (refs.range.current) {
|
638
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
639
|
+
selection_.removeAllRanges();
|
640
|
+
selection_.addRange(refs.range.current);
|
641
|
+
}
|
642
|
+
onUpdate_(refs.inputValues.current[version_]);
|
643
|
+
onClose();
|
644
|
+
} }, { children: "Apply" }))] }))] })));
|
645
|
+
}), []);
|
646
|
+
const Input = react_1.default.useCallback(react_1.default.forwardRef((props_, ref_) => {
|
647
|
+
const { label, labelButton, value: value__, onChange: onChange__, onClick, InputComponent = TextField, InputProps } = props_, other_ = __rest(props_, ["label", "labelButton", "value", "onChange", "onClick", "InputComponent", "InputProps"]);
|
648
|
+
return ((0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: ref_, gap: 1, direction: 'column', tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
|
649
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
650
|
+
'onesy-RichTextEditor-palette'
|
651
|
+
],
|
652
|
+
classes.palette
|
653
|
+
]) }, other_, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, direction: 'row', align: 'center', style: {
|
654
|
+
width: '100%'
|
655
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(InputComponent, Object.assign({ tonal: tonal, color: color, label: label, version: 'outlined', size: 'small', value: value__, onChange: onChange__, className: (0, style_react_1.classNames)([
|
656
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
657
|
+
'onesy-RichTextEditor-text-field-color'
|
658
|
+
],
|
659
|
+
classes.textFieldColor
|
660
|
+
]) }, InputProps)), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: onClick }, { children: labelButton }))] })) })));
|
661
|
+
}), []);
|
662
|
+
const font_families = [
|
663
|
+
...fontFamilies,
|
664
|
+
...addFontFamilies
|
665
|
+
];
|
666
|
+
const font_sizes = [
|
667
|
+
{ label: '11', value: 1 },
|
668
|
+
{ label: '14', value: 2 },
|
669
|
+
{ label: '16', value: 3 },
|
670
|
+
{ label: '18', value: 4 },
|
671
|
+
{ label: '24', value: 5 },
|
672
|
+
{ label: '32', value: 6 },
|
673
|
+
{ label: '48', value: 7 }
|
674
|
+
];
|
675
|
+
const font_versions = [
|
676
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b2' }, { children: "Normal text" })), value: 'p' },
|
677
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h1' }, { children: "Heading 1" })), value: 'h1' },
|
678
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h2' }, { children: "Heading 2" })), value: 'h2' },
|
679
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h3' }, { children: "Heading 3" })), value: 'h3' },
|
680
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 't1' }, { children: "Heading 4" })), value: 'h4' },
|
681
|
+
{ label: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 't2' }, { children: "Heading 5" })), value: 'h5' }
|
682
|
+
];
|
683
|
+
const queryValueUpdate = () => {
|
684
|
+
const selected_ = [];
|
685
|
+
const inputValues_ = Object.assign({}, inputValues);
|
686
|
+
const updateOptionValues = [
|
687
|
+
{ name: 'italic', command: 'italic' },
|
688
|
+
{ name: 'underline', command: 'underline' },
|
689
|
+
{ name: 'bold', command: 'bold' },
|
690
|
+
{ name: 'strike-line', command: 'strikeThrough' },
|
691
|
+
{ name: 'align-left', command: 'justifyLeft' },
|
692
|
+
{ name: 'align-center', command: 'justifyCenter' },
|
693
|
+
{ name: 'align-right', command: 'justifyRight' },
|
694
|
+
{ name: 'align-justify', command: 'justifyFull' },
|
695
|
+
{ name: 'superscript', command: 'superscript' },
|
696
|
+
{ name: 'subscript', command: 'subscript' },
|
697
|
+
{ name: 'list-ordered', command: 'insertOrderedList' },
|
698
|
+
{ name: 'list-unordered', command: 'insertUnorderedList' }
|
699
|
+
];
|
700
|
+
updateOptionValues.forEach(item => {
|
701
|
+
if (query(item.command))
|
702
|
+
selected_.push(item.name);
|
703
|
+
});
|
704
|
+
// Font version
|
705
|
+
const fontVersion = query('formatBlock');
|
706
|
+
const fontVersionValue = font_versions.find(item_ => item_.value === fontVersion) || font_versions[0];
|
707
|
+
inputValues_['font-version'] = fontVersionValue === null || fontVersionValue === void 0 ? void 0 : fontVersionValue.value;
|
708
|
+
// Font family
|
709
|
+
const fontFamily = query('fontName');
|
710
|
+
const fontFamilyValue = font_families.find(item_ => fontFamily === null || fontFamily === void 0 ? void 0 : fontFamily.includes(item_.label)) || font_families.find(item_ => item_.label === 'DM Sans');
|
711
|
+
inputValues_['font-family'] = fontFamilyValue === null || fontFamilyValue === void 0 ? void 0 : fontFamilyValue.value;
|
712
|
+
// Font version
|
713
|
+
const fontSize = query('fontSize');
|
714
|
+
const fontSizeValue = font_sizes.find(item_ => item_.value === fontSize) || font_sizes.find(item_ => item_.label === '14');
|
715
|
+
inputValues_['font-size'] = fontSizeValue === null || fontSizeValue === void 0 ? void 0 : fontSizeValue.value;
|
716
|
+
setInputValues(inputValues_);
|
717
|
+
setSelected(selected_);
|
718
|
+
};
|
719
|
+
const onMouseUpValue = react_1.default.useCallback(() => {
|
720
|
+
queryValueUpdate();
|
721
|
+
setTimeout(() => {
|
722
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
723
|
+
if (!selection_.anchorNode || !refs.value.current.contains(selection_.anchorNode))
|
724
|
+
return setSelection('');
|
725
|
+
const rect = selection_.getRangeAt(0).getBoundingClientRect();
|
726
|
+
setSelection(Math.round(rect.width) ? rect : '');
|
727
|
+
});
|
728
|
+
}, []);
|
729
|
+
const onMouseDownValue = react_1.default.useCallback(() => {
|
730
|
+
queryValueUpdate();
|
731
|
+
}, []);
|
732
|
+
const updateElements = {
|
733
|
+
'font-version': ((0, jsx_runtime_1.jsx)(Select, Object.assign({ label: 'Font Version', valueDefault: font_versions.find(item => item.value.includes('p')).value, value: inputValues['font-version'], onChange: (valueNew) => {
|
734
|
+
updateInputValues('font-version', valueNew);
|
735
|
+
method('font-version')(valueNew);
|
736
|
+
}, onMouseUp: onMouseUp, onMouseDown: onMouseDown }, SelectProps, { className: (0, style_react_1.classNames)([
|
737
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
738
|
+
'onesy-RichTextEditor-select'
|
739
|
+
],
|
740
|
+
SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.className,
|
741
|
+
classes.select
|
742
|
+
]), style: {
|
743
|
+
minWidth: '150px'
|
744
|
+
} }, { children: font_versions.map(item => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: item.label, value: item.value, button: true }, ListItemProps), item.value))) }))),
|
745
|
+
'font-family': ((0, jsx_runtime_1.jsx)(Select, Object.assign({ label: 'Font Family', valueDefault: font_families.find(item => item.label.includes('DM Sans')).value, value: inputValues['font-family'], onChange: (valueNew) => {
|
746
|
+
updateInputValues('font-family', valueNew);
|
747
|
+
method('font-family')(valueNew);
|
748
|
+
}, onMouseUp: onMouseUp, onMouseDown: onMouseDown }, SelectProps, { className: (0, style_react_1.classNames)([
|
749
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
750
|
+
'onesy-RichTextEditor-select'
|
751
|
+
],
|
752
|
+
SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.className,
|
753
|
+
classes.select
|
754
|
+
]), style: {
|
755
|
+
minWidth: '140px'
|
756
|
+
} }, { children: font_families.map(item => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: item.label, value: item.value, button: true, style: {
|
757
|
+
fontFamily: item.value
|
758
|
+
} }, ListItemProps), item.value))) }))),
|
759
|
+
'font-size': ((0, jsx_runtime_1.jsx)(Select, Object.assign({ label: 'Font Size', valueDefault: +font_sizes.find(item => item.label.includes('14')).value, value: inputValues['font-size'], onChange: (valueNew) => {
|
760
|
+
updateInputValues('font-size', +valueNew);
|
761
|
+
method('font-size')(+valueNew);
|
762
|
+
}, onMouseUp: onMouseUp, onMouseDown: onMouseDown }, SelectProps, { className: (0, style_react_1.classNames)([
|
763
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
764
|
+
'onesy-RichTextEditor-select'
|
765
|
+
],
|
766
|
+
SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.className,
|
767
|
+
classes.select
|
768
|
+
]) }, { children: font_sizes.map(item => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: item.label, value: item.value, button: true }, ListItemProps), item.value))) }))),
|
769
|
+
'italic': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Italic' }, { children: (0, utils_1.is)('function', render) ? render('italic', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('italic'), onClick: method('italic') }, { children: (0, jsx_runtime_1.jsx)(IconItalic, Object.assign({}, IconProps)) }))) }))),
|
770
|
+
'underline': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Underline' }, { children: (0, utils_1.is)('function', render) ? render('underline', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('underline'), onClick: method('underline') }, { children: (0, jsx_runtime_1.jsx)(IconUnderline, Object.assign({}, IconProps)) }))) }))),
|
771
|
+
'bold': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Bold', onClick: method('bold') }, { children: (0, utils_1.is)('function', render) ? render('bold', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('bold') }, { children: (0, jsx_runtime_1.jsx)(IconBold, Object.assign({}, IconProps)) }))) }))),
|
772
|
+
'strike-line': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Strike Line', onClick: method('strike-line') }, { children: (0, utils_1.is)('function', render) ? render('strike-line', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('strike-line') }, { children: (0, jsx_runtime_1.jsx)(IconStrikeLine, Object.assign({}, IconProps)) }))) }))),
|
773
|
+
'font-color': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.color, anchorElement: refs.elements.color.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('color', false), include: [refs.elements.color.current] }, { children: (0, jsx_runtime_1.jsx)(Palette, { version: 'font-color', onClose: () => updateOpen('color', false), onUpdate: method('font-color') }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Text Color', open: refs.open.current.color ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.color }, ToggleButtonProps, { selected: refs.open.current.color, onClick: () => updateOpen('color', !refs.open.current.color) }, { children: (0, jsx_runtime_1.jsx)(IconColor, Object.assign({}, IconProps)) }))) })) }))),
|
774
|
+
'font-color-mini-menu': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.colorMiniMenu, anchorElement: refs.miniMenuElements.color, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('colorMiniMenu', false), include: [refs.miniMenuElements.color] }, { children: (0, jsx_runtime_1.jsx)(Palette, { ref: refs.miniMenuElements.colorPalette, version: 'font-color', onClose: () => updateOpen('colorMiniMenu', false), onUpdate: method('font-color') }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Text Color', open: refs.open.current.colorMiniMenu ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.miniMenuElements.color }, ToggleButtonProps, { selected: refs.open.current.colorMiniMenu, onClick: () => updateOpen('colorMiniMenu', !refs.open.current.colorMiniMenu) }, { children: (0, jsx_runtime_1.jsx)(IconColor, Object.assign({}, IconProps)) }))) })) }))),
|
775
|
+
'font-background': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.background, anchorElement: refs.elements.background.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('background', false), include: [refs.elements.background.current] }, { children: (0, jsx_runtime_1.jsx)(Palette, { version: 'font-background', onClose: () => updateOpen('background', false), onUpdate: method('font-background') }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Background Color', open: refs.open.current.background ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-background', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.background }, ToggleButtonProps, { selected: refs.open.current.background, onClick: () => updateOpen('background', !refs.open.current.background) }, { children: (0, jsx_runtime_1.jsx)(IconBackground, Object.assign({}, IconProps)) }))) })) }))),
|
776
|
+
'font-background-mini-menu': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.backgroundMiniMenu, anchorElement: refs.miniMenuElements.background, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('backgroundMiniMenu', false), include: [refs.miniMenuElements.background] }, { children: (0, jsx_runtime_1.jsx)(Palette, { ref: refs.miniMenuElements.backgroundPalette, version: 'font-background', onClose: () => updateOpen('backgroundMiniMenu', false), onUpdate: method('font-background') }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Text Color', open: refs.open.current.backgroundMiniMenu ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-background', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.miniMenuElements.background }, ToggleButtonProps, { selected: refs.open.current.backgroundMiniMenu, onClick: () => updateOpen('backgroundMiniMenu', !refs.open.current.backgroundMiniMenu) }, { children: (0, jsx_runtime_1.jsx)(IconBackground, Object.assign({}, IconProps)) }))) })) }))),
|
777
|
+
'align-left': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Align Left' }, { children: (0, utils_1.is)('function', render) ? render('align-left', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('align-left'), onClick: method('align-left') }, { children: (0, jsx_runtime_1.jsx)(IconAlignLeft, Object.assign({}, IconProps)) }))) }))),
|
778
|
+
'align-center': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Align Center' }, { children: (0, utils_1.is)('function', render) ? render('align-center', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('align-center'), onClick: method('align-center') }, { children: (0, jsx_runtime_1.jsx)(IconAlignCenter, Object.assign({}, IconProps)) }))) }))),
|
779
|
+
'align-right': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Align Right' }, { children: (0, utils_1.is)('function', render) ? render('align-right', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('align-right'), onClick: method('align-right') }, { children: (0, jsx_runtime_1.jsx)(IconAlignRight, Object.assign({}, IconProps)) }))) }))),
|
780
|
+
'align-justify': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Align Justify' }, { children: (0, utils_1.is)('function', render) ? render('align-justify', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('align-justify'), onClick: method('align-justify') }, { children: (0, jsx_runtime_1.jsx)(IconAlignJustify, Object.assign({}, IconProps)) }))) }))),
|
781
|
+
'indent': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Indent' }, { children: (0, utils_1.is)('function', render) ? render('indent', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('indent') }, { children: (0, jsx_runtime_1.jsx)(IconIndent, Object.assign({}, IconProps)) }))) }))),
|
782
|
+
'outdent': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Outdent' }, { children: (0, utils_1.is)('function', render) ? render('outdent', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('outdent') }, { children: (0, jsx_runtime_1.jsx)(IconOutdent, Object.assign({}, IconProps)) }))) }))),
|
783
|
+
'superscript': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Superscript' }, { children: (0, utils_1.is)('function', render) ? render('superscript', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('superscript'), onClick: method('superscript') }, { children: (0, jsx_runtime_1.jsx)(IconSuperscript, Object.assign({}, IconProps)) }))) }))),
|
784
|
+
'subscript': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Subscript' }, { children: (0, utils_1.is)('function', render) ? render('subscript', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('subscript'), onClick: method('subscript') }, { children: (0, jsx_runtime_1.jsx)(IconSubscript, Object.assign({}, IconProps)) }))) }))),
|
785
|
+
'list-ordered': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'List Ordered' }, { children: (0, utils_1.is)('function', render) ? render('list-ordered', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('list-ordered'), onClick: method('list-ordered') }, { children: (0, jsx_runtime_1.jsx)(IconListOrdered, Object.assign({}, IconProps)) }))) }))),
|
786
|
+
'list-unordered': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'List Unordered' }, { children: (0, utils_1.is)('function', render) ? render('list-unordered', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.selected.current.includes('list-unordered'), onClick: method('list-unordered') }, { children: (0, jsx_runtime_1.jsx)(IconListUnordered, Object.assign({}, IconProps)) }))) }))),
|
787
|
+
'horizontal-rule': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Horizontal Rule', onClick: method('horizontal-rule') }, { children: (0, utils_1.is)('function', render) ? render('horizontal-rule', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { children: (0, jsx_runtime_1.jsx)(IconHorizontalRule, Object.assign({}, IconProps)) }))) }))),
|
788
|
+
'link-add': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.link, anchorElement: refs.elements.linkAdd.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('link', false), include: [refs.elements.linkAdd.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Link', labelButton: 'Add', value: refs.inputValues.current.link, onChange: valueNew => updateInputValues('link', valueNew), onClick: () => {
|
789
|
+
if (refs.range.current) {
|
790
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
791
|
+
selection_.removeAllRanges();
|
792
|
+
selection_.addRange(refs.range.current);
|
793
|
+
}
|
794
|
+
method('link-add')(refs.inputValues.current.link);
|
795
|
+
updateOpen('link', false);
|
796
|
+
updateInputValues('link', '');
|
797
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Link', open: refs.open.current.link ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.linkAdd }, ToggleButtonProps, { selected: refs.open.current.link, onClick: () => updateOpen('link', !refs.open.current.link) }, { children: (0, jsx_runtime_1.jsx)(IconLinkAdd, Object.assign({}, IconProps)) }))) })) }))),
|
798
|
+
'link-add-mini-menu': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.linkMiniMenu, anchorElement: refs.miniMenuElements.linkAdd, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('linkMiniMenu', false), include: [refs.miniMenuElements.linkAdd] }, { children: (0, jsx_runtime_1.jsx)(Input, { ref: refs.miniMenuElements.linkAddInput, label: 'Link', labelButton: 'Add', value: refs.inputValues.current.link, onChange: valueNew => updateInputValues('link', valueNew), onClick: () => {
|
799
|
+
if (refs.range.current) {
|
800
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
801
|
+
selection_.removeAllRanges();
|
802
|
+
selection_.addRange(refs.range.current);
|
803
|
+
}
|
804
|
+
method('link-add')(refs.inputValues.current.link);
|
805
|
+
updateOpen('linkMiniMenu', false);
|
806
|
+
updateInputValues('link', '');
|
807
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Link', open: refs.open.current.linkMiniMenu ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.miniMenuElements.linkAdd }, ToggleButtonProps, { selected: refs.open.current.linkMiniMenu, onClick: () => updateOpen('linkMiniMenu', !refs.open.current.linkMiniMenu) }, { children: (0, jsx_runtime_1.jsx)(IconLinkAdd, Object.assign({}, IconProps)) }))) })) }))),
|
808
|
+
'link-remove': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Remove Link' }, { children: (0, utils_1.is)('function', render) ? render('link-remove', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('link-remove') }, { children: (0, jsx_runtime_1.jsx)(IconLinkRemove, Object.assign({}, IconProps)) }))) }))),
|
809
|
+
'quote': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.quote, anchorElement: refs.elements.quote.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('quote', false), include: [refs.elements.quote.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Quote', labelButton: 'Add', value: refs.inputValues.current.quote, onChange: valueNew => updateInputValues('quote', valueNew), InputProps: {
|
810
|
+
multiline: true
|
811
|
+
}, onClick: () => {
|
812
|
+
if (refs.range.current) {
|
813
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
814
|
+
selection_.removeAllRanges();
|
815
|
+
selection_.addRange(refs.range.current);
|
816
|
+
}
|
817
|
+
method('html')(`<blockquote>${refs.inputValues.current.quote}</blockquote>`);
|
818
|
+
updateOpen('quote', false);
|
819
|
+
updateInputValues('quote', '');
|
820
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Quote', open: refs.open.current.quote ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('quote', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.quote }, ToggleButtonProps, { selected: refs.open.current.quote, onClick: () => updateOpen('quote', !refs.open.current.quote) }, { children: (0, jsx_runtime_1.jsx)(IconQuote, Object.assign({}, IconProps)) }))) })) }))),
|
821
|
+
'table': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.table, anchorElement: refs.elements.table.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('table', false), include: [refs.elements.table.current] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
|
822
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
823
|
+
'onesy-RichTextEditor-palette'
|
824
|
+
],
|
825
|
+
classes.palette
|
826
|
+
]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'center' }, { children: [(0, jsx_runtime_1.jsx)(NumericTextField, { label: 'Rows', tonal: tonal, color: color, size: 'small', version: 'outlined', increment: false, decrement: false, value: refs.inputValues.current.tableRows, onChange: valueNew => updateInputValues('tableRows', valueNew) }), "\u00D7", (0, jsx_runtime_1.jsx)(NumericTextField, { label: 'Columns', tonal: tonal, color: color, size: 'small', version: 'outlined', increment: false, decrement: false, value: refs.inputValues.current.tableColumns, onChange: valueNew => updateInputValues('tableColumns', valueNew) })] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'space-between', style: {
|
827
|
+
width: '100%'
|
828
|
+
} }, { children: [(0, jsx_runtime_1.jsxs)(Label, Object.assign({ size: 'small' }, { children: [(0, jsx_runtime_1.jsx)(Switch, { tonal: tonal, color: props.color !== undefined ? props.color : 'default', checked: refs.inputValues.current.tableHeader, onChange: valueNew => updateInputValues('tableHeader', valueNew) }), "Header"] })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: () => {
|
829
|
+
if (refs.range.current) {
|
830
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
831
|
+
selection_.removeAllRanges();
|
832
|
+
selection_.addRange(refs.range.current);
|
833
|
+
}
|
834
|
+
let table = `<table>`;
|
835
|
+
if (refs.inputValues.current.tableHeader && refs.inputValues.current.tableColumns > 0) {
|
836
|
+
table += `<thead><tr>${'<th></th>'.repeat(refs.inputValues.current.tableColumns)}</tr></thead>`;
|
837
|
+
}
|
838
|
+
if (refs.inputValues.current.tableRows > 0 && refs.inputValues.current.tableColumns > 0) {
|
839
|
+
table += `<tbody>`;
|
840
|
+
for (let i = 0; i < refs.inputValues.current.tableRows; i++) {
|
841
|
+
table += `<tr>${'<td></td>'.repeat(refs.inputValues.current.tableColumns)}</tr>`;
|
842
|
+
}
|
843
|
+
table += `</tbody>`;
|
844
|
+
}
|
845
|
+
table += `</table>`;
|
846
|
+
method('html')(table);
|
847
|
+
updateOpen('table', false);
|
848
|
+
updateInputValues('tableRows', '');
|
849
|
+
updateInputValues('tableColumns', '');
|
850
|
+
updateInputValues('tableHeader', '');
|
851
|
+
} }, { children: "Add" }))] }))] })) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Table', open: refs.open.current.table ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('table', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.table }, ToggleButtonProps, { selected: refs.open.current.table, onClick: () => updateOpen('table', !refs.open.current.table) }, { children: (0, jsx_runtime_1.jsx)(IconTable, Object.assign({}, IconProps)) }))) })) }))),
|
852
|
+
'image': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.image, anchorElement: refs.elements.image.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('image', false), include: [refs.elements.image.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Image', labelButton: 'Add', value: refs.inputValues.current.image, onChange: valueNew => updateInputValues('image', valueNew), onClick: () => {
|
853
|
+
if (refs.range.current) {
|
854
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
855
|
+
selection_.removeAllRanges();
|
856
|
+
selection_.addRange(refs.range.current);
|
857
|
+
}
|
858
|
+
method('image')(refs.inputValues.current.image);
|
859
|
+
updateOpen('image', false);
|
860
|
+
updateInputValues('image', '');
|
861
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Image', open: refs.open.current.image ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('image', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.image }, ToggleButtonProps, { selected: refs.open.current.image, onClick: () => updateOpen('image', !refs.open.current.image) }, { children: (0, jsx_runtime_1.jsx)(IconImage, Object.assign({}, IconProps)) }))) })) }))),
|
862
|
+
'video': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.video, anchorElement: refs.elements.video.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('video', false), include: [refs.elements.video.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Video', labelButton: 'Add', value: refs.inputValues.current.video, onChange: valueNew => updateInputValues('video', valueNew), onClick: () => {
|
863
|
+
if (refs.range.current) {
|
864
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
865
|
+
selection_.removeAllRanges();
|
866
|
+
selection_.addRange(refs.range.current);
|
867
|
+
}
|
868
|
+
method('html')(`<video controls><source src='${refs.inputValues.current.video}' /></video>`);
|
869
|
+
updateOpen('video', false);
|
870
|
+
updateInputValues('video', '');
|
871
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Video', open: refs.open.current.video ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('video', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.video }, ToggleButtonProps, { selected: refs.open.current.video, onClick: () => updateOpen('video', !refs.open.current.video) }, { children: (0, jsx_runtime_1.jsx)(IconVideo, Object.assign({}, IconProps)) }))) })) }))),
|
872
|
+
'video-youtube': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.videoYoutube, anchorElement: refs.elements.videoYoutube.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('videoYoutube', false), include: [refs.elements.videoYoutube.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Youtube Video ID', labelButton: 'Add', value: refs.inputValues.current.videoYoutube, onChange: valueNew => updateInputValues('videoYoutube', valueNew), onClick: () => {
|
873
|
+
if (refs.range.current) {
|
874
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
875
|
+
selection_.removeAllRanges();
|
876
|
+
selection_.addRange(refs.range.current);
|
877
|
+
}
|
878
|
+
method('html')(`<iframe width="560" height="315" src="https://www.youtube.com/embed/${refs.inputValues.current.videoYoutube}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`);
|
879
|
+
updateOpen('videoYoutube', false);
|
880
|
+
updateInputValues('videoYoutube', '');
|
881
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Youtube Video', open: refs.open.current.videoYoutube ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('videoYoutube', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.videoYoutube }, ToggleButtonProps, { selected: refs.open.current.videoYoutube, onClick: () => updateOpen('videoYoutube', !refs.open.current.videoYoutube) }, { children: (0, jsx_runtime_1.jsx)(IconVideoYoutube, Object.assign({}, IconProps)) }))) })) }))),
|
882
|
+
'drawing': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.drawing, anchorElement: refs.elements.drawing.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('drawing', false), include: [refs.elements.drawing, refs.elements.drawingSelect, refs.elements.drawingSelect.current, refs.elements.drawingPalette, refs.elements.drawingPalette.current, refs.elements.drawingSize, refs.elements.drawingSize.current], includeParentQueries: ['.onesy-Drawing-palette', '.onesy-Drawing-modal'], includeQueries: ['a[download]', 'svg', 'path'] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
|
883
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
884
|
+
'onesy-RichTextEditor-palette'
|
885
|
+
],
|
886
|
+
classes.palette
|
887
|
+
]) }, { children: [(0, jsx_runtime_1.jsx)(Drawing, Object.assign({ tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', version: version, svgRef: refs.elements.drawingSvg, SizeProps: {
|
888
|
+
ref: refs.elements.drawingSize
|
889
|
+
}, SelectProps: {
|
890
|
+
MenuProps: Object.assign({ ListProps: {
|
891
|
+
ref: refs.elements.drawingSelect
|
892
|
+
} }, SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.MenuProps)
|
893
|
+
}, PaletteProps: {
|
894
|
+
ref: refs.elements.drawingPalette
|
895
|
+
} }, DrawingProps)), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-end', style: {
|
896
|
+
width: '100%'
|
897
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: () => {
|
898
|
+
if (refs.range.current) {
|
899
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
900
|
+
selection_.removeAllRanges();
|
901
|
+
selection_.addRange(refs.range.current);
|
902
|
+
}
|
903
|
+
// Get svg html element
|
904
|
+
// clone it, remove circle
|
905
|
+
// and add it as outer html
|
906
|
+
// to the rich text editor
|
907
|
+
const svg = refs.elements.drawingSvg.current;
|
908
|
+
const svgClone = svg.cloneNode(true);
|
909
|
+
// Clean up
|
910
|
+
svgClone.style.width = refs.inputValues.current.drawingWidth;
|
911
|
+
svgClone.style.height = refs.inputValues.current.drawingHeight;
|
912
|
+
svgClone.style.boxShadow = 'none';
|
913
|
+
const pointers = Array.from(svgClone.querySelectorAll('.onesy-Drawing-pointer'));
|
914
|
+
pointers.forEach(pointer => pointer.remove());
|
915
|
+
const valueNew = svgClone.outerHTML;
|
916
|
+
method('html')(valueNew);
|
917
|
+
updateOpen('drawing', false);
|
918
|
+
} }, { children: "Add" })) }))] })) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Drawing', open: refs.open.current.drawing ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('drawing', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.drawing }, ToggleButtonProps, { selected: refs.open.current.drawing, onClick: () => updateOpen('drawing', !refs.open.current.drawing) }, { children: (0, jsx_runtime_1.jsx)(IconDrawing, Object.assign({}, IconProps)) }))) })) }))),
|
919
|
+
'code': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.code, anchorElement: refs.elements.code.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('code', false), include: [refs.elements.code.current] }, { children: (0, jsx_runtime_1.jsx)(Input, { label: 'Code', labelButton: 'Add', value: refs.inputValues.current.code, onChange: valueNew => updateInputValues('code', valueNew), InputProps: {
|
920
|
+
multiline: true
|
921
|
+
}, onClick: () => {
|
922
|
+
if (refs.range.current) {
|
923
|
+
const selection_ = refs.rootWindow.current.getSelection();
|
924
|
+
selection_.removeAllRanges();
|
925
|
+
selection_.addRange(refs.range.current);
|
926
|
+
}
|
927
|
+
method('html')(`<pre><code>${refs.inputValues.current.code}</code></pre>`);
|
928
|
+
updateOpen('code', false);
|
929
|
+
updateInputValues('code', '');
|
930
|
+
} }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Code', open: refs.open.current.code ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('code', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.code }, ToggleButtonProps, { selected: refs.open.current.code, onClick: () => updateOpen('code', !refs.open.current.code) }, { children: (0, jsx_runtime_1.jsx)(IconCode, Object.assign({}, IconProps)) }))) })) })))
|
931
|
+
};
|
932
|
+
const actionElements = {
|
933
|
+
'clear': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Clear' }, { children: (0, utils_1.is)('function', render) ? render('clear', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('clear') }, { children: (0, jsx_runtime_1.jsx)(IconClear, Object.assign({}, IconProps)) }))) })))
|
934
|
+
};
|
935
|
+
return ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ ref: item => {
|
936
|
+
if (ref) {
|
937
|
+
if ((0, utils_1.is)('function', ref))
|
938
|
+
ref(item);
|
939
|
+
else
|
940
|
+
ref.current = item;
|
941
|
+
}
|
942
|
+
refs.root.current = item;
|
943
|
+
}, gap: 0, Component: Component, className: (0, style_react_1.classNames)([
|
944
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
945
|
+
'onesy-RichTextEditor-root'
|
946
|
+
],
|
947
|
+
className,
|
948
|
+
classes.root
|
949
|
+
]) }, other, { children: [(updates || actions_) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ tonal: tonal, color: color, version: version, gap: 0, direction: 'column', align: 'unset', justify: 'unset', Component: Surface }, ToolbarProps, { className: (0, style_react_1.classNames)([
|
950
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
951
|
+
'onesy-RichTextEditor-toolbars'
|
952
|
+
],
|
953
|
+
ToolbarProps === null || ToolbarProps === void 0 ? void 0 : ToolbarProps.className,
|
954
|
+
classes.toolbars
|
955
|
+
]) }, { children: [updates_ && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start', role: 'toolbar', "aria-label": 'Updates' }, ToolbarUpdatesProps, { className: (0, style_react_1.classNames)([
|
956
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
957
|
+
'onesy-RichTextEditor-toolbar'
|
958
|
+
],
|
959
|
+
ToolbarUpdatesProps === null || ToolbarUpdatesProps === void 0 ? void 0 : ToolbarUpdatesProps.className,
|
960
|
+
classes.toolbar,
|
961
|
+
classes.toolbar_updates
|
962
|
+
]) }, { children: [includes('font-family', 'font-size', 'font-version') && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-start' }, { children: [includes('font-version') && updateElements['font-version'], includes('font-family') && updateElements['font-family'], includes('font-size') && updateElements['font-size']] }))), includes('italic', 'underlined', 'bold', 'strike-line') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('italic') && updateElements['italic'], includes('underline') && updateElements['underline'], includes('bold') && updateElements['bold'], includes('strike-line') && updateElements['strike-line']] }))), includes('font-color', 'font-background') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('font-color') && updateElements['font-color'], includes('font-background') && updateElements['font-background']] }))), includes('align-left', 'align-center', 'align-right', 'align-justify') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('align-left') && updateElements['align-left'], includes('align-center') && updateElements['align-center'], includes('align-right') && updateElements['align-right'], includes('align-justify') && updateElements['align-justify']] }))), includes('indent', 'outdent') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('indent') && updateElements['indent'], includes('outdent') && updateElements['outdent']] }))), includes('superscript', 'subscript') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('superscript') && updateElements['superscript'], includes('subscript') && updateElements['subscript']] }))), includes('list-ordered', 'list-unordered') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('list-ordered') && updateElements['list-ordered'], includes('list-unordered') && updateElements['list-unordered']] }))), includes('horizontal-rule') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('horizontal-rule') && updateElements['horizontal-rule'] }))), includes('link-add', 'link-remove') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('link-add') && updateElements['link-add'], includes('link-remove') && updateElements['link-remove']] }))), includes('quote', 'image', 'video', 'video-youtube', 'table', 'drawing', 'code') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('quote') && updateElements['quote'], includes('table') && updateElements['table'], includes('image') && updateElements['image'], includes('video') && updateElements['video'], includes('video-youtube') && updateElements['video-youtube'], includes('drawing') && updateElements['drawing'], includes('code') && updateElements['code']] })))] }))), (updates_ && actions_) && ((0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
|
963
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
964
|
+
'onesy-RichTextEditor-divider'
|
965
|
+
],
|
966
|
+
DividerProps === null || DividerProps === void 0 ? void 0 : DividerProps.className,
|
967
|
+
classes.divider,
|
968
|
+
classes.divider_middle
|
969
|
+
]) }))), actions_ && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start', role: 'toolbar', "aria-label": 'Actions' }, ToolbarActionsProps, { className: (0, style_react_1.classNames)([
|
970
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
971
|
+
'onesy-RichTextEditor-toolbar'
|
972
|
+
],
|
973
|
+
ToolbarActionsProps === null || ToolbarActionsProps === void 0 ? void 0 : ToolbarActionsProps.className,
|
974
|
+
classes.toolbar,
|
975
|
+
classes.toolbar_actions
|
976
|
+
]) }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', style: {
|
977
|
+
width: '100%'
|
978
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('copy', 'cut', 'paste', 'delete') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('copy') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Copy' }, { children: (0, utils_1.is)('function', render) ? render('copy', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('copy') }, { children: (0, jsx_runtime_1.jsx)(IconCopy, Object.assign({}, IconProps)) }))) }))), includes('cut') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Cut' }, { children: (0, utils_1.is)('function', render) ? render('cut', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('cut') }, { children: (0, jsx_runtime_1.jsx)(IconCut, Object.assign({}, IconProps)) }))) }))), includes('paste') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Paste' }, { children: (0, utils_1.is)('function', render) ? render('paste', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('paste') }, { children: (0, jsx_runtime_1.jsx)(IconPaste, Object.assign({}, IconProps)) }))) }))), includes('delete') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Delete' }, { children: (0, utils_1.is)('function', render) ? render('delete', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('delete') }, { children: (0, jsx_runtime_1.jsx)(IconDelete, Object.assign({}, IconProps)) }))) })))] }))) })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: [includes('clear', 'select-all') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('clear') && actionElements['clear'], includes('select-all') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Select All' }, { children: (0, utils_1.is)('function', render) ? render('select-all', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('select-all') }, { children: (0, jsx_runtime_1.jsx)(IconSelectAll, Object.assign({}, IconProps)) }))) })))] }))), includes('undo', 'redo') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('undo') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Undo' }, { children: (0, utils_1.is)('function', render) ? render('undo', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('undo') }, { children: (0, jsx_runtime_1.jsx)(IconUndo, Object.assign({}, IconProps)) }))) }))), includes('redo') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Redo' }, { children: (0, utils_1.is)('function', render) ? render('redo', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: method('redo') }, { children: (0, jsx_runtime_1.jsx)(IconRedo, Object.assign({}, IconProps)) }))) })))] }))), includes('save', 'print') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includes('save') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Save' }, { children: (0, utils_1.is)('function', render) ? render('save', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: () => (0, utils_2.save)(refs.value.current) }, { children: (0, jsx_runtime_1.jsx)(IconSave, Object.assign({}, IconProps)) }))) }))), includes('print') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Print' }, { children: (0, utils_1.is)('function', render) ? render('print', ToggleButtonProps, refs.value.current, method) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: () => (0, utils_2.print)(refs.value.current) }, { children: (0, jsx_runtime_1.jsx)(IconPrint, Object.assign({}, IconProps)) }))) })))] })))] }))] })) }))), (0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
|
979
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
980
|
+
'onesy-RichTextEditor-divider'
|
981
|
+
],
|
982
|
+
DividerProps === null || DividerProps === void 0 ? void 0 : DividerProps.className,
|
983
|
+
classes.divider,
|
984
|
+
classes.divider_end
|
985
|
+
]) }))] }))), miniMenu && !!refs.miniMenuInclude.current.length && ((0, jsx_runtime_1.jsx)(Append, Object.assign({ open: selection, element: ({ ref: ref_, values, style }) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: item => {
|
986
|
+
if (ref_) {
|
987
|
+
if ((0, utils_1.is)('function', ref_))
|
988
|
+
ref_(item);
|
989
|
+
else
|
990
|
+
ref_.current = item;
|
991
|
+
refs.miniMenu.current = item;
|
992
|
+
}
|
993
|
+
}, style: Object.assign(Object.assign({}, (((values === null || values === void 0 ? void 0 : values.x) === 0 && (values === null || values === void 0 ? void 0 : values.y) === 0) ? {
|
994
|
+
visibility: 'hidden'
|
995
|
+
} : undefined)), style) }, { children: (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !!selection, add: true }, { children: (0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => {
|
996
|
+
setSelection('');
|
997
|
+
}, include: [refs.miniMenu, refs.miniMenu.current, refs.miniMenuElements.colorPalette, refs.miniMenuElements.colorPalette.current, refs.miniMenuElements.backgroundPalette, refs.miniMenuElements.backgroundPalette.current, refs.miniMenuElements.linkAddInput, refs.miniMenuElements.linkAddInput.current] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start', role: 'toolbar', "aria-label": 'Mini menu', Component: Surface }, MiniMenuProps, { className: (0, style_react_1.classNames)([
|
998
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
999
|
+
'onesy-RichTextEditor-mini-menu'
|
1000
|
+
],
|
1001
|
+
MiniMenuProps === null || MiniMenuProps === void 0 ? void 0 : MiniMenuProps.className,
|
1002
|
+
classes.miniMenu
|
1003
|
+
]) }, { children: [includesMinMenu('italic', 'underlined', 'bold', 'strike-line') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includesMinMenu('italic') && updateElements['italic'], includesMinMenu('underline') && updateElements['underline'], includesMinMenu('bold') && updateElements['bold'], includesMinMenu('strike-line') && updateElements['strike-line']] }))), includesMinMenu('font-color', 'font-background') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includesMinMenu('font-color') && updateElements['font-color-mini-menu'], includesMinMenu('font-background') && updateElements['font-background-mini-menu']] }))), includesMinMenu('align-left', 'align-center', 'align-right', 'align-justify') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includesMinMenu('align-left') && updateElements['align-left'], includesMinMenu('align-center') && updateElements['align-center'], includesMinMenu('align-right') && updateElements['align-right'], includesMinMenu('align-justify') && updateElements['align-justify']] }))), includesMinMenu('link-add', 'link-remove') && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [includesMinMenu('link-add') && updateElements['link-add-mini-menu'], includesMinMenu('link-remove') && updateElements['link-remove']] }))), includesMinMenu('clear') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includesMinMenu('clear') && actionElements['clear'] })))] })) })) })) }))), anchor: selection, portal: true, alignment: 'center', position: 'bottom', clearOnClose: true }, AppendProps))), (0, jsx_runtime_1.jsx)(Surface, { ref: refs.value, color: 'default', onMouseUp: onMouseUpValue, onMouseDown: onMouseDownValue, onInput: onUpdate, contentEditable: true, className: (0, style_react_1.classNames)([
|
1004
|
+
(0, utils_2.staticClassName)('RichTextEditor', theme) && [
|
1005
|
+
'onesy-RichTextEditor-value'
|
1006
|
+
],
|
1007
|
+
classes.value
|
1008
|
+
]) })] })));
|
1009
|
+
});
|
1010
|
+
RichTextEditor.displayName = 'onesy-RichTextEditor';
|
1011
|
+
exports.default = RichTextEditor;
|