react95-native-rabbl 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/assets/fonts/src/ms-sans-serif/MS Sans Serif.ttf +0 -0
- package/dist/commonjs/assets/fonts/src/ms-sans-serif/license.txt +4 -0
- package/dist/commonjs/assets/fonts/src/ms-sans-serif/readme.txt +26 -0
- package/dist/commonjs/assets/fonts/src/ms-sans-serif-bold/MS Sans Serif Bold.ttf +0 -0
- package/dist/commonjs/assets/fonts/src/ms-sans-serif-bold/license.txt +4 -0
- package/dist/commonjs/assets/fonts/src/ms-sans-serif-bold/readme.txt +26 -0
- package/dist/commonjs/components/AppBar/AppBar.js +40 -0
- package/dist/commonjs/components/AppBar/AppBar.js.map +1 -0
- package/dist/commonjs/components/AppBar/AppBar.spec.js +154 -0
- package/dist/commonjs/components/AppBar/AppBar.spec.js.map +1 -0
- package/dist/commonjs/components/AppBar/AppBarBackAction.js +30 -0
- package/dist/commonjs/components/AppBar/AppBarBackAction.js.map +1 -0
- package/dist/commonjs/components/AppBar/AppBarContent.js +66 -0
- package/dist/commonjs/components/AppBar/AppBarContent.js.map +1 -0
- package/dist/commonjs/components/AppBar/index.js +14 -0
- package/dist/commonjs/components/AppBar/index.js.map +1 -0
- package/dist/commonjs/components/Button/Button.js +170 -0
- package/dist/commonjs/components/Button/Button.js.map +1 -0
- package/dist/commonjs/components/Button/Button.spec.js +70 -0
- package/dist/commonjs/components/Button/Button.spec.js.map +1 -0
- package/dist/commonjs/components/Button/index.js +14 -0
- package/dist/commonjs/components/Button/index.js.map +1 -0
- package/dist/commonjs/components/Card/Card.js +69 -0
- package/dist/commonjs/components/Card/Card.js.map +1 -0
- package/dist/commonjs/components/Card/Card.spec.js +63 -0
- package/dist/commonjs/components/Card/Card.spec.js.map +1 -0
- package/dist/commonjs/components/Card/CardContent.js +28 -0
- package/dist/commonjs/components/Card/CardContent.js.map +1 -0
- package/dist/commonjs/components/Card/index.js +14 -0
- package/dist/commonjs/components/Card/index.js.map +1 -0
- package/dist/commonjs/components/Checkbox/Checkbox.js +19 -0
- package/dist/commonjs/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/commonjs/components/Checkbox/index.js +14 -0
- package/dist/commonjs/components/Checkbox/index.js.map +1 -0
- package/dist/commonjs/components/ColorButton/ColorButton.js +67 -0
- package/dist/commonjs/components/ColorButton/ColorButton.js.map +1 -0
- package/dist/commonjs/components/ColorButton/index.js +14 -0
- package/dist/commonjs/components/ColorButton/index.js.map +1 -0
- package/dist/commonjs/components/ColorPicker/ColorPicker.js +85 -0
- package/dist/commonjs/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/commonjs/components/ColorPicker/index.js +14 -0
- package/dist/commonjs/components/ColorPicker/index.js.map +1 -0
- package/dist/commonjs/components/Desktop/Desktop.js +149 -0
- package/dist/commonjs/components/Desktop/Desktop.js.map +1 -0
- package/dist/commonjs/components/Desktop/Desktop.spec.js +43 -0
- package/dist/commonjs/components/Desktop/Desktop.spec.js.map +1 -0
- package/dist/commonjs/components/Desktop/index.js +14 -0
- package/dist/commonjs/components/Desktop/index.js.map +1 -0
- package/dist/commonjs/components/Divider/Divider.js +46 -0
- package/dist/commonjs/components/Divider/Divider.js.map +1 -0
- package/dist/commonjs/components/Divider/Divider.spec.js +74 -0
- package/dist/commonjs/components/Divider/Divider.spec.js.map +1 -0
- package/dist/commonjs/components/Divider/index.js +14 -0
- package/dist/commonjs/components/Divider/index.js.map +1 -0
- package/dist/commonjs/components/FAB/FAB.js +210 -0
- package/dist/commonjs/components/FAB/FAB.js.map +1 -0
- package/dist/commonjs/components/FAB/FABGroup.js +255 -0
- package/dist/commonjs/components/FAB/FABGroup.js.map +1 -0
- package/dist/commonjs/components/FAB/index.js +14 -0
- package/dist/commonjs/components/FAB/index.js.map +1 -0
- package/dist/commonjs/components/Fieldset/Fieldset.js +85 -0
- package/dist/commonjs/components/Fieldset/Fieldset.js.map +1 -0
- package/dist/commonjs/components/Fieldset/Fieldset.spec.js +60 -0
- package/dist/commonjs/components/Fieldset/Fieldset.spec.js.map +1 -0
- package/dist/commonjs/components/Fieldset/index.js +14 -0
- package/dist/commonjs/components/Fieldset/index.js.map +1 -0
- package/dist/commonjs/components/Hourglass/Hourglass.js +40 -0
- package/dist/commonjs/components/Hourglass/Hourglass.js.map +1 -0
- package/dist/commonjs/components/Hourglass/Hourglass.spec.js +35 -0
- package/dist/commonjs/components/Hourglass/Hourglass.spec.js.map +1 -0
- package/dist/commonjs/components/Hourglass/base64hourglass.js +9 -0
- package/dist/commonjs/components/Hourglass/base64hourglass.js.map +1 -0
- package/dist/commonjs/components/Hourglass/index.js +14 -0
- package/dist/commonjs/components/Hourglass/index.js.map +1 -0
- package/dist/commonjs/components/Icons/ArrowIcon.js +59 -0
- package/dist/commonjs/components/Icons/ArrowIcon.js.map +1 -0
- package/dist/commonjs/components/Icons/CheckmarkIcon.js +43 -0
- package/dist/commonjs/components/Icons/CheckmarkIcon.js.map +1 -0
- package/dist/commonjs/components/Icons/ChevronIcon.js +65 -0
- package/dist/commonjs/components/Icons/ChevronIcon.js.map +1 -0
- package/dist/commonjs/components/Icons/CloseIcon.js +47 -0
- package/dist/commonjs/components/Icons/CloseIcon.js.map +1 -0
- package/dist/commonjs/components/Icons/index.js +35 -0
- package/dist/commonjs/components/Icons/index.js.map +1 -0
- package/dist/commonjs/components/Label/Label.js +58 -0
- package/dist/commonjs/components/Label/Label.js.map +1 -0
- package/dist/commonjs/components/Label/index.js +14 -0
- package/dist/commonjs/components/Label/index.js.map +1 -0
- package/dist/commonjs/components/List/List.js +35 -0
- package/dist/commonjs/components/List/List.js.map +1 -0
- package/dist/commonjs/components/List/ListAccordion.js +135 -0
- package/dist/commonjs/components/List/ListAccordion.js.map +1 -0
- package/dist/commonjs/components/List/ListItem.js +67 -0
- package/dist/commonjs/components/List/ListItem.js.map +1 -0
- package/dist/commonjs/components/List/ListSection.js +41 -0
- package/dist/commonjs/components/List/ListSection.js.map +1 -0
- package/dist/commonjs/components/List/index.js +10 -0
- package/dist/commonjs/components/List/index.js.map +1 -0
- package/dist/commonjs/components/Menu/Menu.js +86 -0
- package/dist/commonjs/components/Menu/Menu.js.map +1 -0
- package/dist/commonjs/components/Menu/MenuItem.js +79 -0
- package/dist/commonjs/components/Menu/MenuItem.js.map +1 -0
- package/dist/commonjs/components/Menu/index.js +14 -0
- package/dist/commonjs/components/Menu/index.js.map +1 -0
- package/dist/commonjs/components/NumberInput/NumberInput.js +123 -0
- package/dist/commonjs/components/NumberInput/NumberInput.js.map +1 -0
- package/dist/commonjs/components/NumberInput/NumberInput.spec.js +130 -0
- package/dist/commonjs/components/NumberInput/NumberInput.spec.js.map +1 -0
- package/dist/commonjs/components/NumberInput/index.js +14 -0
- package/dist/commonjs/components/NumberInput/index.js.map +1 -0
- package/dist/commonjs/components/Panel/Panel.js +60 -0
- package/dist/commonjs/components/Panel/Panel.js.map +1 -0
- package/dist/commonjs/components/Panel/Panel.spec.js +35 -0
- package/dist/commonjs/components/Panel/Panel.spec.js.map +1 -0
- package/dist/commonjs/components/Panel/index.js +14 -0
- package/dist/commonjs/components/Panel/index.js.map +1 -0
- package/dist/commonjs/components/Portal/Portal.js +49 -0
- package/dist/commonjs/components/Portal/Portal.js.map +1 -0
- package/dist/commonjs/components/Portal/PortalConsumer.js +39 -0
- package/dist/commonjs/components/Portal/PortalConsumer.js.map +1 -0
- package/dist/commonjs/components/Portal/PortalHost.js +141 -0
- package/dist/commonjs/components/Portal/PortalHost.js.map +1 -0
- package/dist/commonjs/components/Portal/PortalManager.js +57 -0
- package/dist/commonjs/components/Portal/PortalManager.js.map +1 -0
- package/dist/commonjs/components/Portal/index.js +14 -0
- package/dist/commonjs/components/Portal/index.js.map +1 -0
- package/dist/commonjs/components/Progress/Progress.js +94 -0
- package/dist/commonjs/components/Progress/Progress.js.map +1 -0
- package/dist/commonjs/components/Progress/index.js +14 -0
- package/dist/commonjs/components/Progress/index.js.map +1 -0
- package/dist/commonjs/components/Radio/Radio.js +19 -0
- package/dist/commonjs/components/Radio/Radio.js.map +1 -0
- package/dist/commonjs/components/Radio/index.js +14 -0
- package/dist/commonjs/components/Radio/index.js.map +1 -0
- package/dist/commonjs/components/ScrollPanel/ScrollPanel.js +78 -0
- package/dist/commonjs/components/ScrollPanel/ScrollPanel.js.map +1 -0
- package/dist/commonjs/components/ScrollPanel/index.js +14 -0
- package/dist/commonjs/components/ScrollPanel/index.js.map +1 -0
- package/dist/commonjs/components/ScrollView/ScrollView.js +211 -0
- package/dist/commonjs/components/ScrollView/ScrollView.js.map +1 -0
- package/dist/commonjs/components/ScrollView/index.js +14 -0
- package/dist/commonjs/components/ScrollView/index.js.map +1 -0
- package/dist/commonjs/components/Select/Select.js +180 -0
- package/dist/commonjs/components/Select/Select.js.map +1 -0
- package/dist/commonjs/components/Select/SelectBase.js +80 -0
- package/dist/commonjs/components/Select/SelectBase.js.map +1 -0
- package/dist/commonjs/components/Select/SelectBox.js +60 -0
- package/dist/commonjs/components/Select/SelectBox.js.map +1 -0
- package/dist/commonjs/components/Select/index.js +21 -0
- package/dist/commonjs/components/Select/index.js.map +1 -0
- package/dist/commonjs/components/Slider/Slider.js +243 -0
- package/dist/commonjs/components/Slider/Slider.js.map +1 -0
- package/dist/commonjs/components/Slider/index.js +14 -0
- package/dist/commonjs/components/Slider/index.js.map +1 -0
- package/dist/commonjs/components/Snackbar/Snackbar.js +192 -0
- package/dist/commonjs/components/Snackbar/Snackbar.js.map +1 -0
- package/dist/commonjs/components/Snackbar/SnackbarContent.js +28 -0
- package/dist/commonjs/components/Snackbar/SnackbarContent.js.map +1 -0
- package/dist/commonjs/components/Snackbar/index.js +14 -0
- package/dist/commonjs/components/Snackbar/index.js.map +1 -0
- package/dist/commonjs/components/SwitchBase/SwitchBase.js +154 -0
- package/dist/commonjs/components/SwitchBase/SwitchBase.js.map +1 -0
- package/dist/commonjs/components/SwitchBase/index.js +17 -0
- package/dist/commonjs/components/SwitchBase/index.js.map +1 -0
- package/dist/commonjs/components/Tabs/Tabs.js +162 -0
- package/dist/commonjs/components/Tabs/Tabs.js.map +1 -0
- package/dist/commonjs/components/Tabs/index.js +14 -0
- package/dist/commonjs/components/Tabs/index.js.map +1 -0
- package/dist/commonjs/components/TextInput/TextInput.js +66 -0
- package/dist/commonjs/components/TextInput/TextInput.js.map +1 -0
- package/dist/commonjs/components/TextInput/index.js +14 -0
- package/dist/commonjs/components/TextInput/index.js.map +1 -0
- package/dist/commonjs/components/Toolbar/Toolbar.js +90 -0
- package/dist/commonjs/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/commonjs/components/Toolbar/index.js +14 -0
- package/dist/commonjs/components/Toolbar/index.js.map +1 -0
- package/dist/commonjs/components/Typography/Anchor.js +31 -0
- package/dist/commonjs/components/Typography/Anchor.js.map +1 -0
- package/dist/commonjs/components/Typography/Text.js +40 -0
- package/dist/commonjs/components/Typography/Text.js.map +1 -0
- package/dist/commonjs/components/Typography/Text.spec.js +37 -0
- package/dist/commonjs/components/Typography/Text.spec.js.map +1 -0
- package/dist/commonjs/components/Typography/Title.js +64 -0
- package/dist/commonjs/components/Typography/Title.js.map +1 -0
- package/dist/commonjs/components/Typography/index.js +28 -0
- package/dist/commonjs/components/Typography/index.js.map +1 -0
- package/dist/commonjs/components/Window/Window.js +107 -0
- package/dist/commonjs/components/Window/Window.js.map +1 -0
- package/dist/commonjs/components/Window/index.js +14 -0
- package/dist/commonjs/components/Window/index.js.map +1 -0
- package/dist/commonjs/core/Provider.js +59 -0
- package/dist/commonjs/core/Provider.js.map +1 -0
- package/dist/commonjs/core/theming.js +18 -0
- package/dist/commonjs/core/theming.js.map +1 -0
- package/dist/commonjs/hooks/useAsyncReference.js +19 -0
- package/dist/commonjs/hooks/useAsyncReference.js.map +1 -0
- package/dist/commonjs/hooks/useControlledOrUncontrolled.js +24 -0
- package/dist/commonjs/hooks/useControlledOrUncontrolled.js.map +1 -0
- package/dist/commonjs/index.js +328 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/styles/shadow.js +40 -0
- package/dist/commonjs/styles/shadow.js.map +1 -0
- package/dist/commonjs/styles/styleElements.js +80 -0
- package/dist/commonjs/styles/styleElements.js.map +1 -0
- package/dist/commonjs/styles/styles.js +134 -0
- package/dist/commonjs/styles/styles.js.map +1 -0
- package/dist/commonjs/styles/themes/aiee.js +42 -0
- package/dist/commonjs/styles/themes/aiee.js.map +1 -0
- package/dist/commonjs/styles/themes/ash.js +42 -0
- package/dist/commonjs/styles/themes/ash.js.map +1 -0
- package/dist/commonjs/styles/themes/azureOrange.js +39 -0
- package/dist/commonjs/styles/themes/azureOrange.js.map +1 -0
- package/dist/commonjs/styles/themes/bee.js +39 -0
- package/dist/commonjs/styles/themes/bee.js.map +1 -0
- package/dist/commonjs/styles/themes/blackAndWhite.js +39 -0
- package/dist/commonjs/styles/themes/blackAndWhite.js.map +1 -0
- package/dist/commonjs/styles/themes/blue.js +42 -0
- package/dist/commonjs/styles/themes/blue.js.map +1 -0
- package/dist/commonjs/styles/themes/brick.js +39 -0
- package/dist/commonjs/styles/themes/brick.js.map +1 -0
- package/dist/commonjs/styles/themes/candy.js +39 -0
- package/dist/commonjs/styles/themes/candy.js.map +1 -0
- package/dist/commonjs/styles/themes/cherry.js +42 -0
- package/dist/commonjs/styles/themes/cherry.js.map +1 -0
- package/dist/commonjs/styles/themes/coldGray.js +40 -0
- package/dist/commonjs/styles/themes/coldGray.js.map +1 -0
- package/dist/commonjs/styles/themes/counterStrike.js +39 -0
- package/dist/commonjs/styles/themes/counterStrike.js.map +1 -0
- package/dist/commonjs/styles/themes/darkTeal.js +42 -0
- package/dist/commonjs/styles/themes/darkTeal.js.map +1 -0
- package/dist/commonjs/styles/themes/eggplant.js +39 -0
- package/dist/commonjs/styles/themes/eggplant.js.map +1 -0
- package/dist/commonjs/styles/themes/fxDev.js +42 -0
- package/dist/commonjs/styles/themes/fxDev.js.map +1 -0
- package/dist/commonjs/styles/themes/highContrast.js +39 -0
- package/dist/commonjs/styles/themes/highContrast.js.map +1 -0
- package/dist/commonjs/styles/themes/hotChocolate.js +42 -0
- package/dist/commonjs/styles/themes/hotChocolate.js.map +1 -0
- package/dist/commonjs/styles/themes/index.js +110 -0
- package/dist/commonjs/styles/themes/index.js.map +1 -0
- package/dist/commonjs/styles/themes/lilac.js +39 -0
- package/dist/commonjs/styles/themes/lilac.js.map +1 -0
- package/dist/commonjs/styles/themes/lilacRoseDark.js +40 -0
- package/dist/commonjs/styles/themes/lilacRoseDark.js.map +1 -0
- package/dist/commonjs/styles/themes/maple.js +39 -0
- package/dist/commonjs/styles/themes/maple.js.map +1 -0
- package/dist/commonjs/styles/themes/marine.js +39 -0
- package/dist/commonjs/styles/themes/marine.js.map +1 -0
- package/dist/commonjs/styles/themes/matrix.js +39 -0
- package/dist/commonjs/styles/themes/matrix.js.map +1 -0
- package/dist/commonjs/styles/themes/millenium.js +39 -0
- package/dist/commonjs/styles/themes/millenium.js.map +1 -0
- package/dist/commonjs/styles/themes/modernDark.js +39 -0
- package/dist/commonjs/styles/themes/modernDark.js.map +1 -0
- package/dist/commonjs/styles/themes/molecule.js +39 -0
- package/dist/commonjs/styles/themes/molecule.js.map +1 -0
- package/dist/commonjs/styles/themes/monochrome.js +2 -0
- package/dist/commonjs/styles/themes/monochrome.js.map +1 -0
- package/dist/commonjs/styles/themes/ninjaTurtles.js +39 -0
- package/dist/commonjs/styles/themes/ninjaTurtles.js.map +1 -0
- package/dist/commonjs/styles/themes/olive.js +39 -0
- package/dist/commonjs/styles/themes/olive.js.map +1 -0
- package/dist/commonjs/styles/themes/original.js +39 -0
- package/dist/commonjs/styles/themes/original.js.map +1 -0
- package/dist/commonjs/styles/themes/pamelaAnderson.js +39 -0
- package/dist/commonjs/styles/themes/pamelaAnderson.js.map +1 -0
- package/dist/commonjs/styles/themes/plum.js +39 -0
- package/dist/commonjs/styles/themes/plum.js.map +1 -0
- package/dist/commonjs/styles/themes/polarized.js +42 -0
- package/dist/commonjs/styles/themes/polarized.js.map +1 -0
- package/dist/commonjs/styles/themes/powerShell.js +42 -0
- package/dist/commonjs/styles/themes/powerShell.js.map +1 -0
- package/dist/commonjs/styles/themes/rainyDay.js +39 -0
- package/dist/commonjs/styles/themes/rainyDay.js.map +1 -0
- package/dist/commonjs/styles/themes/raspberry.js +42 -0
- package/dist/commonjs/styles/themes/raspberry.js.map +1 -0
- package/dist/commonjs/styles/themes/redWine.js +42 -0
- package/dist/commonjs/styles/themes/redWine.js.map +1 -0
- package/dist/commonjs/styles/themes/rose.js +39 -0
- package/dist/commonjs/styles/themes/rose.js.map +1 -0
- package/dist/commonjs/styles/themes/seawater.js +42 -0
- package/dist/commonjs/styles/themes/seawater.js.map +1 -0
- package/dist/commonjs/styles/themes/slate.js +39 -0
- package/dist/commonjs/styles/themes/slate.js.map +1 -0
- package/dist/commonjs/styles/themes/solarizedDark.js +42 -0
- package/dist/commonjs/styles/themes/solarizedDark.js.map +1 -0
- package/dist/commonjs/styles/themes/solarizedLight.js +42 -0
- package/dist/commonjs/styles/themes/solarizedLight.js.map +1 -0
- package/dist/commonjs/styles/themes/spruce.js +39 -0
- package/dist/commonjs/styles/themes/spruce.js.map +1 -0
- package/dist/commonjs/styles/themes/stormClouds.js +42 -0
- package/dist/commonjs/styles/themes/stormClouds.js.map +1 -0
- package/dist/commonjs/styles/themes/theSixtiesUSA.js +39 -0
- package/dist/commonjs/styles/themes/theSixtiesUSA.js.map +1 -0
- package/dist/commonjs/styles/themes/tokyoDark.js +39 -0
- package/dist/commonjs/styles/themes/tokyoDark.js.map +1 -0
- package/dist/commonjs/styles/themes/tooSexy.js +39 -0
- package/dist/commonjs/styles/themes/tooSexy.js.map +1 -0
- package/dist/commonjs/styles/themes/travel.js +39 -0
- package/dist/commonjs/styles/themes/travel.js.map +1 -0
- package/dist/commonjs/styles/themes/vaporTeal.js +39 -0
- package/dist/commonjs/styles/themes/vaporTeal.js.map +1 -0
- package/dist/commonjs/styles/themes/vermillion.js +39 -0
- package/dist/commonjs/styles/themes/vermillion.js.map +1 -0
- package/dist/commonjs/styles/themes/violetDark.js +39 -0
- package/dist/commonjs/styles/themes/violetDark.js.map +1 -0
- package/dist/commonjs/styles/themes/water.js +39 -0
- package/dist/commonjs/styles/themes/water.js.map +1 -0
- package/dist/commonjs/styles/themes/wmii.js +42 -0
- package/dist/commonjs/styles/themes/wmii.js.map +1 -0
- package/dist/commonjs/types.js +6 -0
- package/dist/commonjs/types.js.map +1 -0
- package/dist/commonjs/utils/index.js +54 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/module/assets/fonts/src/ms-sans-serif/MS Sans Serif.ttf +0 -0
- package/dist/module/assets/fonts/src/ms-sans-serif/license.txt +4 -0
- package/dist/module/assets/fonts/src/ms-sans-serif/readme.txt +26 -0
- package/dist/module/assets/fonts/src/ms-sans-serif-bold/MS Sans Serif Bold.ttf +0 -0
- package/dist/module/assets/fonts/src/ms-sans-serif-bold/license.txt +4 -0
- package/dist/module/assets/fonts/src/ms-sans-serif-bold/readme.txt +26 -0
- package/dist/module/components/AppBar/AppBar.js +35 -0
- package/dist/module/components/AppBar/AppBar.js.map +1 -0
- package/dist/module/components/AppBar/AppBar.spec.js +153 -0
- package/dist/module/components/AppBar/AppBar.spec.js.map +1 -0
- package/dist/module/components/AppBar/AppBarBackAction.js +25 -0
- package/dist/module/components/AppBar/AppBarBackAction.js.map +1 -0
- package/dist/module/components/AppBar/AppBarContent.js +60 -0
- package/dist/module/components/AppBar/AppBarContent.js.map +1 -0
- package/dist/module/components/AppBar/index.js +4 -0
- package/dist/module/components/AppBar/index.js.map +1 -0
- package/dist/module/components/Button/Button.js +170 -0
- package/dist/module/components/Button/Button.js.map +1 -0
- package/dist/module/components/Button/Button.spec.js +69 -0
- package/dist/module/components/Button/Button.spec.js.map +1 -0
- package/dist/module/components/Button/index.js +4 -0
- package/dist/module/components/Button/index.js.map +1 -0
- package/dist/module/components/Card/Card.js +64 -0
- package/dist/module/components/Card/Card.js.map +1 -0
- package/dist/module/components/Card/Card.spec.js +62 -0
- package/dist/module/components/Card/Card.spec.js.map +1 -0
- package/dist/module/components/Card/CardContent.js +23 -0
- package/dist/module/components/Card/CardContent.js.map +1 -0
- package/dist/module/components/Card/index.js +4 -0
- package/dist/module/components/Card/index.js.map +1 -0
- package/dist/module/components/Checkbox/Checkbox.js +14 -0
- package/dist/module/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/module/components/Checkbox/index.js +4 -0
- package/dist/module/components/Checkbox/index.js.map +1 -0
- package/dist/module/components/ColorButton/ColorButton.js +62 -0
- package/dist/module/components/ColorButton/ColorButton.js.map +1 -0
- package/dist/module/components/ColorButton/index.js +4 -0
- package/dist/module/components/ColorButton/index.js.map +1 -0
- package/dist/module/components/ColorPicker/ColorPicker.js +80 -0
- package/dist/module/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/module/components/ColorPicker/index.js +4 -0
- package/dist/module/components/ColorPicker/index.js.map +1 -0
- package/dist/module/components/Desktop/Desktop.js +144 -0
- package/dist/module/components/Desktop/Desktop.js.map +1 -0
- package/dist/module/components/Desktop/Desktop.spec.js +42 -0
- package/dist/module/components/Desktop/Desktop.spec.js.map +1 -0
- package/dist/module/components/Desktop/index.js +4 -0
- package/dist/module/components/Desktop/index.js.map +1 -0
- package/dist/module/components/Divider/Divider.js +41 -0
- package/dist/module/components/Divider/Divider.js.map +1 -0
- package/dist/module/components/Divider/Divider.spec.js +73 -0
- package/dist/module/components/Divider/Divider.spec.js.map +1 -0
- package/dist/module/components/Divider/index.js +4 -0
- package/dist/module/components/Divider/index.js.map +1 -0
- package/dist/module/components/FAB/FAB.js +205 -0
- package/dist/module/components/FAB/FAB.js.map +1 -0
- package/dist/module/components/FAB/FABGroup.js +250 -0
- package/dist/module/components/FAB/FABGroup.js.map +1 -0
- package/dist/module/components/FAB/index.js +4 -0
- package/dist/module/components/FAB/index.js.map +1 -0
- package/dist/module/components/Fieldset/Fieldset.js +79 -0
- package/dist/module/components/Fieldset/Fieldset.js.map +1 -0
- package/dist/module/components/Fieldset/Fieldset.spec.js +59 -0
- package/dist/module/components/Fieldset/Fieldset.spec.js.map +1 -0
- package/dist/module/components/Fieldset/index.js +4 -0
- package/dist/module/components/Fieldset/index.js.map +1 -0
- package/dist/module/components/Hourglass/Hourglass.js +35 -0
- package/dist/module/components/Hourglass/Hourglass.js.map +1 -0
- package/dist/module/components/Hourglass/Hourglass.spec.js +34 -0
- package/dist/module/components/Hourglass/Hourglass.spec.js.map +1 -0
- package/dist/module/components/Hourglass/base64hourglass.js +5 -0
- package/dist/module/components/Hourglass/base64hourglass.js.map +1 -0
- package/dist/module/components/Hourglass/index.js +4 -0
- package/dist/module/components/Hourglass/index.js.map +1 -0
- package/dist/module/components/Icons/ArrowIcon.js +54 -0
- package/dist/module/components/Icons/ArrowIcon.js.map +1 -0
- package/dist/module/components/Icons/CheckmarkIcon.js +38 -0
- package/dist/module/components/Icons/CheckmarkIcon.js.map +1 -0
- package/dist/module/components/Icons/ChevronIcon.js +60 -0
- package/dist/module/components/Icons/ChevronIcon.js.map +1 -0
- package/dist/module/components/Icons/CloseIcon.js +42 -0
- package/dist/module/components/Icons/CloseIcon.js.map +1 -0
- package/dist/module/components/Icons/index.js +7 -0
- package/dist/module/components/Icons/index.js.map +1 -0
- package/dist/module/components/Label/Label.js +53 -0
- package/dist/module/components/Label/Label.js.map +1 -0
- package/dist/module/components/Label/index.js +4 -0
- package/dist/module/components/Label/index.js.map +1 -0
- package/dist/module/components/List/List.js +6 -0
- package/dist/module/components/List/List.js.map +1 -0
- package/dist/module/components/List/ListAccordion.js +131 -0
- package/dist/module/components/List/ListAccordion.js.map +1 -0
- package/dist/module/components/List/ListItem.js +62 -0
- package/dist/module/components/List/ListItem.js.map +1 -0
- package/dist/module/components/List/ListSection.js +36 -0
- package/dist/module/components/List/ListSection.js.map +1 -0
- package/dist/module/components/List/index.js +5 -0
- package/dist/module/components/List/index.js.map +1 -0
- package/dist/module/components/Menu/Menu.js +81 -0
- package/dist/module/components/Menu/Menu.js.map +1 -0
- package/dist/module/components/Menu/MenuItem.js +73 -0
- package/dist/module/components/Menu/MenuItem.js.map +1 -0
- package/dist/module/components/Menu/index.js +4 -0
- package/dist/module/components/Menu/index.js.map +1 -0
- package/dist/module/components/NumberInput/NumberInput.js +118 -0
- package/dist/module/components/NumberInput/NumberInput.js.map +1 -0
- package/dist/module/components/NumberInput/NumberInput.spec.js +129 -0
- package/dist/module/components/NumberInput/NumberInput.spec.js.map +1 -0
- package/dist/module/components/NumberInput/index.js +4 -0
- package/dist/module/components/NumberInput/index.js.map +1 -0
- package/dist/module/components/Panel/Panel.js +55 -0
- package/dist/module/components/Panel/Panel.js.map +1 -0
- package/dist/module/components/Panel/Panel.spec.js +34 -0
- package/dist/module/components/Panel/Panel.spec.js.map +1 -0
- package/dist/module/components/Panel/index.js +4 -0
- package/dist/module/components/Panel/index.js.map +1 -0
- package/dist/module/components/Portal/Portal.js +43 -0
- package/dist/module/components/Portal/Portal.js.map +1 -0
- package/dist/module/components/Portal/PortalConsumer.js +32 -0
- package/dist/module/components/Portal/PortalConsumer.js.map +1 -0
- package/dist/module/components/Portal/PortalHost.js +133 -0
- package/dist/module/components/Portal/PortalHost.js.map +1 -0
- package/dist/module/components/Portal/PortalManager.js +50 -0
- package/dist/module/components/Portal/PortalManager.js.map +1 -0
- package/dist/module/components/Portal/index.js +4 -0
- package/dist/module/components/Portal/index.js.map +1 -0
- package/dist/module/components/Progress/Progress.js +89 -0
- package/dist/module/components/Progress/Progress.js.map +1 -0
- package/dist/module/components/Progress/index.js +4 -0
- package/dist/module/components/Progress/index.js.map +1 -0
- package/dist/module/components/Radio/Radio.js +14 -0
- package/dist/module/components/Radio/Radio.js.map +1 -0
- package/dist/module/components/Radio/index.js +4 -0
- package/dist/module/components/Radio/index.js.map +1 -0
- package/dist/module/components/ScrollPanel/ScrollPanel.js +73 -0
- package/dist/module/components/ScrollPanel/ScrollPanel.js.map +1 -0
- package/dist/module/components/ScrollPanel/index.js +4 -0
- package/dist/module/components/ScrollPanel/index.js.map +1 -0
- package/dist/module/components/ScrollView/ScrollView.js +205 -0
- package/dist/module/components/ScrollView/ScrollView.js.map +1 -0
- package/dist/module/components/ScrollView/index.js +4 -0
- package/dist/module/components/ScrollView/index.js.map +1 -0
- package/dist/module/components/Select/Select.js +174 -0
- package/dist/module/components/Select/Select.js.map +1 -0
- package/dist/module/components/Select/SelectBase.js +74 -0
- package/dist/module/components/Select/SelectBase.js.map +1 -0
- package/dist/module/components/Select/SelectBox.js +55 -0
- package/dist/module/components/Select/SelectBox.js.map +1 -0
- package/dist/module/components/Select/index.js +5 -0
- package/dist/module/components/Select/index.js.map +1 -0
- package/dist/module/components/Slider/Slider.js +237 -0
- package/dist/module/components/Slider/Slider.js.map +1 -0
- package/dist/module/components/Slider/index.js +4 -0
- package/dist/module/components/Slider/index.js.map +1 -0
- package/dist/module/components/Snackbar/Snackbar.js +187 -0
- package/dist/module/components/Snackbar/Snackbar.js.map +1 -0
- package/dist/module/components/Snackbar/SnackbarContent.js +23 -0
- package/dist/module/components/Snackbar/SnackbarContent.js.map +1 -0
- package/dist/module/components/Snackbar/index.js +4 -0
- package/dist/module/components/Snackbar/index.js.map +1 -0
- package/dist/module/components/SwitchBase/SwitchBase.js +150 -0
- package/dist/module/components/SwitchBase/SwitchBase.js.map +1 -0
- package/dist/module/components/SwitchBase/index.js +4 -0
- package/dist/module/components/SwitchBase/index.js.map +1 -0
- package/dist/module/components/Tabs/Tabs.js +157 -0
- package/dist/module/components/Tabs/Tabs.js.map +1 -0
- package/dist/module/components/Tabs/index.js +4 -0
- package/dist/module/components/Tabs/index.js.map +1 -0
- package/dist/module/components/TextInput/TextInput.js +61 -0
- package/dist/module/components/TextInput/TextInput.js.map +1 -0
- package/dist/module/components/TextInput/index.js +4 -0
- package/dist/module/components/TextInput/index.js.map +1 -0
- package/dist/module/components/Toolbar/Toolbar.js +85 -0
- package/dist/module/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/module/components/Toolbar/index.js +4 -0
- package/dist/module/components/Toolbar/index.js.map +1 -0
- package/dist/module/components/Typography/Anchor.js +26 -0
- package/dist/module/components/Typography/Anchor.js.map +1 -0
- package/dist/module/components/Typography/Text.js +35 -0
- package/dist/module/components/Typography/Text.js.map +1 -0
- package/dist/module/components/Typography/Text.spec.js +36 -0
- package/dist/module/components/Typography/Text.spec.js.map +1 -0
- package/dist/module/components/Typography/Title.js +59 -0
- package/dist/module/components/Typography/Title.js.map +1 -0
- package/dist/module/components/Typography/index.js +6 -0
- package/dist/module/components/Typography/index.js.map +1 -0
- package/dist/module/components/Window/Window.js +102 -0
- package/dist/module/components/Window/Window.js.map +1 -0
- package/dist/module/components/Window/index.js +4 -0
- package/dist/module/components/Window/index.js.map +1 -0
- package/dist/module/core/Provider.js +51 -0
- package/dist/module/core/Provider.js.map +1 -0
- package/dist/module/core/theming.js +10 -0
- package/dist/module/core/theming.js.map +1 -0
- package/dist/module/hooks/useAsyncReference.js +15 -0
- package/dist/module/hooks/useAsyncReference.js.map +1 -0
- package/dist/module/hooks/useControlledOrUncontrolled.js +19 -0
- package/dist/module/hooks/useControlledOrUncontrolled.js.map +1 -0
- package/dist/module/index.js +38 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/styles/shadow.js +36 -0
- package/dist/module/styles/shadow.js.map +1 -0
- package/dist/module/styles/styleElements.js +75 -0
- package/dist/module/styles/styleElements.js.map +1 -0
- package/dist/module/styles/styles.js +126 -0
- package/dist/module/styles/styles.js.map +1 -0
- package/dist/module/styles/themes/aiee.js +39 -0
- package/dist/module/styles/themes/aiee.js.map +1 -0
- package/dist/module/styles/themes/ash.js +38 -0
- package/dist/module/styles/themes/ash.js.map +1 -0
- package/dist/module/styles/themes/azureOrange.js +35 -0
- package/dist/module/styles/themes/azureOrange.js.map +1 -0
- package/dist/module/styles/themes/bee.js +35 -0
- package/dist/module/styles/themes/bee.js.map +1 -0
- package/dist/module/styles/themes/blackAndWhite.js +35 -0
- package/dist/module/styles/themes/blackAndWhite.js.map +1 -0
- package/dist/module/styles/themes/blue.js +39 -0
- package/dist/module/styles/themes/blue.js.map +1 -0
- package/dist/module/styles/themes/brick.js +35 -0
- package/dist/module/styles/themes/brick.js.map +1 -0
- package/dist/module/styles/themes/candy.js +35 -0
- package/dist/module/styles/themes/candy.js.map +1 -0
- package/dist/module/styles/themes/cherry.js +39 -0
- package/dist/module/styles/themes/cherry.js.map +1 -0
- package/dist/module/styles/themes/coldGray.js +36 -0
- package/dist/module/styles/themes/coldGray.js.map +1 -0
- package/dist/module/styles/themes/counterStrike.js +35 -0
- package/dist/module/styles/themes/counterStrike.js.map +1 -0
- package/dist/module/styles/themes/darkTeal.js +39 -0
- package/dist/module/styles/themes/darkTeal.js.map +1 -0
- package/dist/module/styles/themes/eggplant.js +35 -0
- package/dist/module/styles/themes/eggplant.js.map +1 -0
- package/dist/module/styles/themes/fxDev.js +39 -0
- package/dist/module/styles/themes/fxDev.js.map +1 -0
- package/dist/module/styles/themes/highContrast.js +35 -0
- package/dist/module/styles/themes/highContrast.js.map +1 -0
- package/dist/module/styles/themes/hotChocolate.js +39 -0
- package/dist/module/styles/themes/hotChocolate.js.map +1 -0
- package/dist/module/styles/themes/index.js +105 -0
- package/dist/module/styles/themes/index.js.map +1 -0
- package/dist/module/styles/themes/lilac.js +35 -0
- package/dist/module/styles/themes/lilac.js.map +1 -0
- package/dist/module/styles/themes/lilacRoseDark.js +36 -0
- package/dist/module/styles/themes/lilacRoseDark.js.map +1 -0
- package/dist/module/styles/themes/maple.js +35 -0
- package/dist/module/styles/themes/maple.js.map +1 -0
- package/dist/module/styles/themes/marine.js +35 -0
- package/dist/module/styles/themes/marine.js.map +1 -0
- package/dist/module/styles/themes/matrix.js +35 -0
- package/dist/module/styles/themes/matrix.js.map +1 -0
- package/dist/module/styles/themes/millenium.js +35 -0
- package/dist/module/styles/themes/millenium.js.map +1 -0
- package/dist/module/styles/themes/modernDark.js +35 -0
- package/dist/module/styles/themes/modernDark.js.map +1 -0
- package/dist/module/styles/themes/molecule.js +35 -0
- package/dist/module/styles/themes/molecule.js.map +1 -0
- package/dist/module/styles/themes/monochrome.js +2 -0
- package/dist/module/styles/themes/monochrome.js.map +1 -0
- package/dist/module/styles/themes/ninjaTurtles.js +35 -0
- package/dist/module/styles/themes/ninjaTurtles.js.map +1 -0
- package/dist/module/styles/themes/olive.js +35 -0
- package/dist/module/styles/themes/olive.js.map +1 -0
- package/dist/module/styles/themes/original.js +35 -0
- package/dist/module/styles/themes/original.js.map +1 -0
- package/dist/module/styles/themes/pamelaAnderson.js +35 -0
- package/dist/module/styles/themes/pamelaAnderson.js.map +1 -0
- package/dist/module/styles/themes/plum.js +35 -0
- package/dist/module/styles/themes/plum.js.map +1 -0
- package/dist/module/styles/themes/polarized.js +39 -0
- package/dist/module/styles/themes/polarized.js.map +1 -0
- package/dist/module/styles/themes/powerShell.js +39 -0
- package/dist/module/styles/themes/powerShell.js.map +1 -0
- package/dist/module/styles/themes/rainyDay.js +35 -0
- package/dist/module/styles/themes/rainyDay.js.map +1 -0
- package/dist/module/styles/themes/raspberry.js +39 -0
- package/dist/module/styles/themes/raspberry.js.map +1 -0
- package/dist/module/styles/themes/redWine.js +39 -0
- package/dist/module/styles/themes/redWine.js.map +1 -0
- package/dist/module/styles/themes/rose.js +35 -0
- package/dist/module/styles/themes/rose.js.map +1 -0
- package/dist/module/styles/themes/seawater.js +39 -0
- package/dist/module/styles/themes/seawater.js.map +1 -0
- package/dist/module/styles/themes/slate.js +35 -0
- package/dist/module/styles/themes/slate.js.map +1 -0
- package/dist/module/styles/themes/solarizedDark.js +39 -0
- package/dist/module/styles/themes/solarizedDark.js.map +1 -0
- package/dist/module/styles/themes/solarizedLight.js +39 -0
- package/dist/module/styles/themes/solarizedLight.js.map +1 -0
- package/dist/module/styles/themes/spruce.js +35 -0
- package/dist/module/styles/themes/spruce.js.map +1 -0
- package/dist/module/styles/themes/stormClouds.js +39 -0
- package/dist/module/styles/themes/stormClouds.js.map +1 -0
- package/dist/module/styles/themes/theSixtiesUSA.js +35 -0
- package/dist/module/styles/themes/theSixtiesUSA.js.map +1 -0
- package/dist/module/styles/themes/tokyoDark.js +35 -0
- package/dist/module/styles/themes/tokyoDark.js.map +1 -0
- package/dist/module/styles/themes/tooSexy.js +35 -0
- package/dist/module/styles/themes/tooSexy.js.map +1 -0
- package/dist/module/styles/themes/travel.js +35 -0
- package/dist/module/styles/themes/travel.js.map +1 -0
- package/dist/module/styles/themes/vaporTeal.js +35 -0
- package/dist/module/styles/themes/vaporTeal.js.map +1 -0
- package/dist/module/styles/themes/vermillion.js +35 -0
- package/dist/module/styles/themes/vermillion.js.map +1 -0
- package/dist/module/styles/themes/violetDark.js +35 -0
- package/dist/module/styles/themes/violetDark.js.map +1 -0
- package/dist/module/styles/themes/water.js +35 -0
- package/dist/module/styles/themes/water.js.map +1 -0
- package/dist/module/styles/themes/wmii.js +39 -0
- package/dist/module/styles/themes/wmii.js.map +1 -0
- package/dist/module/types.js +4 -0
- package/dist/module/types.js.map +1 -0
- package/dist/module/utils/index.js +47 -0
- package/dist/module/utils/index.js.map +1 -0
- package/dist/typescript/jest.setup.d.ts +2 -0
- package/dist/typescript/jest.setup.d.ts.map +1 -0
- package/dist/typescript/src/components/AppBar/AppBar.d.ts +152 -0
- package/dist/typescript/src/components/AppBar/AppBar.d.ts.map +1 -0
- package/dist/typescript/src/components/AppBar/AppBar.spec.d.ts +2 -0
- package/dist/typescript/src/components/AppBar/AppBar.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/AppBar/AppBarBackAction.d.ts +7 -0
- package/dist/typescript/src/components/AppBar/AppBarBackAction.d.ts.map +1 -0
- package/dist/typescript/src/components/AppBar/AppBarContent.d.ts +21 -0
- package/dist/typescript/src/components/AppBar/AppBarContent.d.ts.map +1 -0
- package/dist/typescript/src/components/AppBar/index.d.ts +2 -0
- package/dist/typescript/src/components/AppBar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Button/Button.d.ts +24 -0
- package/dist/typescript/src/components/Button/Button.d.ts.map +1 -0
- package/dist/typescript/src/components/Button/Button.spec.d.ts +2 -0
- package/dist/typescript/src/components/Button/Button.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Button/index.d.ts +2 -0
- package/dist/typescript/src/components/Button/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Card/Card.d.ts +20 -0
- package/dist/typescript/src/components/Card/Card.d.ts.map +1 -0
- package/dist/typescript/src/components/Card/Card.spec.d.ts +2 -0
- package/dist/typescript/src/components/Card/Card.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Card/CardContent.d.ts +9 -0
- package/dist/typescript/src/components/Card/CardContent.d.ts.map +1 -0
- package/dist/typescript/src/components/Card/index.d.ts +2 -0
- package/dist/typescript/src/components/Card/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Checkbox/Checkbox.d.ts +7 -0
- package/dist/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/typescript/src/components/Checkbox/index.d.ts +2 -0
- package/dist/typescript/src/components/Checkbox/index.d.ts.map +1 -0
- package/dist/typescript/src/components/ColorButton/ColorButton.d.ts +12 -0
- package/dist/typescript/src/components/ColorButton/ColorButton.d.ts.map +1 -0
- package/dist/typescript/src/components/ColorButton/index.d.ts +2 -0
- package/dist/typescript/src/components/ColorButton/index.d.ts.map +1 -0
- package/dist/typescript/src/components/ColorPicker/ColorPicker.d.ts +17 -0
- package/dist/typescript/src/components/ColorPicker/ColorPicker.d.ts.map +1 -0
- package/dist/typescript/src/components/ColorPicker/index.d.ts +2 -0
- package/dist/typescript/src/components/ColorPicker/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Desktop/Desktop.d.ts +14 -0
- package/dist/typescript/src/components/Desktop/Desktop.d.ts.map +1 -0
- package/dist/typescript/src/components/Desktop/Desktop.spec.d.ts +2 -0
- package/dist/typescript/src/components/Desktop/Desktop.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Desktop/index.d.ts +2 -0
- package/dist/typescript/src/components/Desktop/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Divider/Divider.d.ts +15 -0
- package/dist/typescript/src/components/Divider/Divider.d.ts.map +1 -0
- package/dist/typescript/src/components/Divider/Divider.spec.d.ts +2 -0
- package/dist/typescript/src/components/Divider/Divider.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Divider/index.d.ts +2 -0
- package/dist/typescript/src/components/Divider/index.d.ts.map +1 -0
- package/dist/typescript/src/components/FAB/FAB.d.ts +68 -0
- package/dist/typescript/src/components/FAB/FAB.d.ts.map +1 -0
- package/dist/typescript/src/components/FAB/FABGroup.d.ts +132 -0
- package/dist/typescript/src/components/FAB/FABGroup.d.ts.map +1 -0
- package/dist/typescript/src/components/FAB/index.d.ts +2 -0
- package/dist/typescript/src/components/FAB/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Fieldset/Fieldset.d.ts +18 -0
- package/dist/typescript/src/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/typescript/src/components/Fieldset/Fieldset.spec.d.ts +2 -0
- package/dist/typescript/src/components/Fieldset/Fieldset.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Fieldset/index.d.ts +2 -0
- package/dist/typescript/src/components/Fieldset/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Hourglass/Hourglass.d.ts +10 -0
- package/dist/typescript/src/components/Hourglass/Hourglass.d.ts.map +1 -0
- package/dist/typescript/src/components/Hourglass/Hourglass.spec.d.ts +2 -0
- package/dist/typescript/src/components/Hourglass/Hourglass.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Hourglass/base64hourglass.d.ts +3 -0
- package/dist/typescript/src/components/Hourglass/base64hourglass.d.ts.map +1 -0
- package/dist/typescript/src/components/Hourglass/index.d.ts +2 -0
- package/dist/typescript/src/components/Hourglass/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Icons/ArrowIcon.d.ts +17 -0
- package/dist/typescript/src/components/Icons/ArrowIcon.d.ts.map +1 -0
- package/dist/typescript/src/components/Icons/CheckmarkIcon.d.ts +13 -0
- package/dist/typescript/src/components/Icons/CheckmarkIcon.d.ts.map +1 -0
- package/dist/typescript/src/components/Icons/ChevronIcon.d.ts +16 -0
- package/dist/typescript/src/components/Icons/ChevronIcon.d.ts.map +1 -0
- package/dist/typescript/src/components/Icons/CloseIcon.d.ts +14 -0
- package/dist/typescript/src/components/Icons/CloseIcon.d.ts.map +1 -0
- package/dist/typescript/src/components/Icons/index.d.ts +5 -0
- package/dist/typescript/src/components/Icons/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Label/Label.d.ts +18 -0
- package/dist/typescript/src/components/Label/Label.d.ts.map +1 -0
- package/dist/typescript/src/components/Label/index.d.ts +2 -0
- package/dist/typescript/src/components/Label/index.d.ts.map +1 -0
- package/dist/typescript/src/components/List/List.d.ts +4 -0
- package/dist/typescript/src/components/List/List.d.ts.map +1 -0
- package/dist/typescript/src/components/List/ListAccordion.d.ts +27 -0
- package/dist/typescript/src/components/List/ListAccordion.d.ts.map +1 -0
- package/dist/typescript/src/components/List/ListItem.d.ts +17 -0
- package/dist/typescript/src/components/List/ListItem.d.ts.map +1 -0
- package/dist/typescript/src/components/List/ListSection.d.ts +15 -0
- package/dist/typescript/src/components/List/ListSection.d.ts.map +1 -0
- package/dist/typescript/src/components/List/index.d.ts +3 -0
- package/dist/typescript/src/components/List/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Menu/Menu.d.ts +47 -0
- package/dist/typescript/src/components/Menu/Menu.d.ts.map +1 -0
- package/dist/typescript/src/components/Menu/MenuItem.d.ts +18 -0
- package/dist/typescript/src/components/Menu/MenuItem.d.ts.map +1 -0
- package/dist/typescript/src/components/Menu/index.d.ts +2 -0
- package/dist/typescript/src/components/Menu/index.d.ts.map +1 -0
- package/dist/typescript/src/components/NumberInput/NumberInput.d.ts +21 -0
- package/dist/typescript/src/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/dist/typescript/src/components/NumberInput/NumberInput.spec.d.ts +2 -0
- package/dist/typescript/src/components/NumberInput/NumberInput.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/NumberInput/index.d.ts +2 -0
- package/dist/typescript/src/components/NumberInput/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Panel/Panel.d.ts +19 -0
- package/dist/typescript/src/components/Panel/Panel.d.ts.map +1 -0
- package/dist/typescript/src/components/Panel/Panel.spec.d.ts +2 -0
- package/dist/typescript/src/components/Panel/Panel.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Panel/index.d.ts +2 -0
- package/dist/typescript/src/components/Panel/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Portal/Portal.d.ts +21 -0
- package/dist/typescript/src/components/Portal/Portal.d.ts.map +1 -0
- package/dist/typescript/src/components/Portal/PortalConsumer.d.ts +16 -0
- package/dist/typescript/src/components/Portal/PortalConsumer.d.ts.map +1 -0
- package/dist/typescript/src/components/Portal/PortalHost.d.ts +46 -0
- package/dist/typescript/src/components/Portal/PortalHost.d.ts.map +1 -0
- package/dist/typescript/src/components/Portal/PortalManager.d.ts +19 -0
- package/dist/typescript/src/components/Portal/PortalManager.d.ts.map +1 -0
- package/dist/typescript/src/components/Portal/index.d.ts +2 -0
- package/dist/typescript/src/components/Portal/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Progress/Progress.d.ts +15 -0
- package/dist/typescript/src/components/Progress/Progress.d.ts.map +1 -0
- package/dist/typescript/src/components/Progress/index.d.ts +2 -0
- package/dist/typescript/src/components/Progress/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Radio/Radio.d.ts +10 -0
- package/dist/typescript/src/components/Radio/Radio.d.ts.map +1 -0
- package/dist/typescript/src/components/Radio/index.d.ts +2 -0
- package/dist/typescript/src/components/Radio/index.d.ts.map +1 -0
- package/dist/typescript/src/components/ScrollPanel/ScrollPanel.d.ts +13 -0
- package/dist/typescript/src/components/ScrollPanel/ScrollPanel.d.ts.map +1 -0
- package/dist/typescript/src/components/ScrollPanel/index.d.ts +2 -0
- package/dist/typescript/src/components/ScrollPanel/index.d.ts.map +1 -0
- package/dist/typescript/src/components/ScrollView/ScrollView.d.ts +17 -0
- package/dist/typescript/src/components/ScrollView/ScrollView.d.ts.map +1 -0
- package/dist/typescript/src/components/ScrollView/index.d.ts +2 -0
- package/dist/typescript/src/components/ScrollView/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Select/Select.d.ts +18 -0
- package/dist/typescript/src/components/Select/Select.d.ts.map +1 -0
- package/dist/typescript/src/components/Select/SelectBase.d.ts +15 -0
- package/dist/typescript/src/components/Select/SelectBase.d.ts.map +1 -0
- package/dist/typescript/src/components/Select/SelectBox.d.ts +16 -0
- package/dist/typescript/src/components/Select/SelectBox.d.ts.map +1 -0
- package/dist/typescript/src/components/Select/index.d.ts +3 -0
- package/dist/typescript/src/components/Select/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Slider/Slider.d.ts +24 -0
- package/dist/typescript/src/components/Slider/Slider.d.ts.map +1 -0
- package/dist/typescript/src/components/Slider/index.d.ts +2 -0
- package/dist/typescript/src/components/Slider/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Snackbar/Snackbar.d.ts +51 -0
- package/dist/typescript/src/components/Snackbar/Snackbar.d.ts.map +1 -0
- package/dist/typescript/src/components/Snackbar/SnackbarContent.d.ts +9 -0
- package/dist/typescript/src/components/Snackbar/SnackbarContent.d.ts.map +1 -0
- package/dist/typescript/src/components/Snackbar/index.d.ts +2 -0
- package/dist/typescript/src/components/Snackbar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/SwitchBase/SwitchBase.d.ts +21 -0
- package/dist/typescript/src/components/SwitchBase/SwitchBase.d.ts.map +1 -0
- package/dist/typescript/src/components/SwitchBase/index.d.ts +2 -0
- package/dist/typescript/src/components/SwitchBase/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Tabs/Tabs.d.ts +38 -0
- package/dist/typescript/src/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/typescript/src/components/Tabs/index.d.ts +2 -0
- package/dist/typescript/src/components/Tabs/index.d.ts.map +1 -0
- package/dist/typescript/src/components/TextInput/TextInput.d.ts +16 -0
- package/dist/typescript/src/components/TextInput/TextInput.d.ts.map +1 -0
- package/dist/typescript/src/components/TextInput/index.d.ts +2 -0
- package/dist/typescript/src/components/TextInput/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Toolbar/Toolbar.d.ts +10 -0
- package/dist/typescript/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/typescript/src/components/Toolbar/index.d.ts +2 -0
- package/dist/typescript/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Typography/Anchor.d.ts +12 -0
- package/dist/typescript/src/components/Typography/Anchor.d.ts.map +1 -0
- package/dist/typescript/src/components/Typography/Text.d.ts +16 -0
- package/dist/typescript/src/components/Typography/Text.d.ts.map +1 -0
- package/dist/typescript/src/components/Typography/Text.spec.d.ts +2 -0
- package/dist/typescript/src/components/Typography/Text.spec.d.ts.map +1 -0
- package/dist/typescript/src/components/Typography/Title.d.ts +12 -0
- package/dist/typescript/src/components/Typography/Title.d.ts.map +1 -0
- package/dist/typescript/src/components/Typography/index.d.ts +4 -0
- package/dist/typescript/src/components/Typography/index.d.ts.map +1 -0
- package/dist/typescript/src/components/Window/Window.d.ts +18 -0
- package/dist/typescript/src/components/Window/Window.d.ts.map +1 -0
- package/dist/typescript/src/components/Window/index.d.ts +2 -0
- package/dist/typescript/src/components/Window/index.d.ts.map +1 -0
- package/dist/typescript/src/core/Provider.d.ts +9 -0
- package/dist/typescript/src/core/Provider.d.ts.map +1 -0
- package/dist/typescript/src/core/theming.d.ts +10 -0
- package/dist/typescript/src/core/theming.d.ts.map +1 -0
- package/dist/typescript/src/hooks/useAsyncReference.d.ts +8 -0
- package/dist/typescript/src/hooks/useAsyncReference.d.ts.map +1 -0
- package/dist/typescript/src/hooks/useControlledOrUncontrolled.d.ts +8 -0
- package/dist/typescript/src/hooks/useControlledOrUncontrolled.d.ts.map +1 -0
- package/dist/typescript/src/index.d.ts +36 -0
- package/dist/typescript/src/index.d.ts.map +1 -0
- package/dist/typescript/src/styles/shadow.d.ts +15 -0
- package/dist/typescript/src/styles/shadow.d.ts.map +1 -0
- package/dist/typescript/src/styles/styleElements.d.ts +17 -0
- package/dist/typescript/src/styles/styleElements.d.ts.map +1 -0
- package/dist/typescript/src/styles/styles.d.ts +117 -0
- package/dist/typescript/src/styles/styles.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/aiee.d.ts +34 -0
- package/dist/typescript/src/styles/themes/aiee.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/ash.d.ts +34 -0
- package/dist/typescript/src/styles/themes/ash.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/azureOrange.d.ts +34 -0
- package/dist/typescript/src/styles/themes/azureOrange.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/bee.d.ts +34 -0
- package/dist/typescript/src/styles/themes/bee.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/blackAndWhite.d.ts +34 -0
- package/dist/typescript/src/styles/themes/blackAndWhite.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/blue.d.ts +34 -0
- package/dist/typescript/src/styles/themes/blue.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/brick.d.ts +34 -0
- package/dist/typescript/src/styles/themes/brick.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/candy.d.ts +34 -0
- package/dist/typescript/src/styles/themes/candy.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/cherry.d.ts +34 -0
- package/dist/typescript/src/styles/themes/cherry.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/coldGray.d.ts +35 -0
- package/dist/typescript/src/styles/themes/coldGray.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/counterStrike.d.ts +34 -0
- package/dist/typescript/src/styles/themes/counterStrike.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/darkTeal.d.ts +34 -0
- package/dist/typescript/src/styles/themes/darkTeal.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/eggplant.d.ts +34 -0
- package/dist/typescript/src/styles/themes/eggplant.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/fxDev.d.ts +34 -0
- package/dist/typescript/src/styles/themes/fxDev.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/highContrast.d.ts +34 -0
- package/dist/typescript/src/styles/themes/highContrast.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/hotChocolate.d.ts +34 -0
- package/dist/typescript/src/styles/themes/hotChocolate.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/index.d.ts +1606 -0
- package/dist/typescript/src/styles/themes/index.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/lilac.d.ts +34 -0
- package/dist/typescript/src/styles/themes/lilac.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/lilacRoseDark.d.ts +35 -0
- package/dist/typescript/src/styles/themes/lilacRoseDark.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/maple.d.ts +34 -0
- package/dist/typescript/src/styles/themes/maple.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/marine.d.ts +34 -0
- package/dist/typescript/src/styles/themes/marine.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/matrix.d.ts +34 -0
- package/dist/typescript/src/styles/themes/matrix.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/millenium.d.ts +34 -0
- package/dist/typescript/src/styles/themes/millenium.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/modernDark.d.ts +34 -0
- package/dist/typescript/src/styles/themes/modernDark.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/molecule.d.ts +34 -0
- package/dist/typescript/src/styles/themes/molecule.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/monochrome.d.ts +1 -0
- package/dist/typescript/src/styles/themes/monochrome.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/ninjaTurtles.d.ts +34 -0
- package/dist/typescript/src/styles/themes/ninjaTurtles.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/olive.d.ts +34 -0
- package/dist/typescript/src/styles/themes/olive.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/original.d.ts +34 -0
- package/dist/typescript/src/styles/themes/original.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/pamelaAnderson.d.ts +34 -0
- package/dist/typescript/src/styles/themes/pamelaAnderson.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/plum.d.ts +34 -0
- package/dist/typescript/src/styles/themes/plum.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/polarized.d.ts +34 -0
- package/dist/typescript/src/styles/themes/polarized.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/powerShell.d.ts +34 -0
- package/dist/typescript/src/styles/themes/powerShell.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/rainyDay.d.ts +34 -0
- package/dist/typescript/src/styles/themes/rainyDay.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/raspberry.d.ts +34 -0
- package/dist/typescript/src/styles/themes/raspberry.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/redWine.d.ts +34 -0
- package/dist/typescript/src/styles/themes/redWine.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/rose.d.ts +34 -0
- package/dist/typescript/src/styles/themes/rose.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/seawater.d.ts +34 -0
- package/dist/typescript/src/styles/themes/seawater.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/slate.d.ts +34 -0
- package/dist/typescript/src/styles/themes/slate.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/solarizedDark.d.ts +34 -0
- package/dist/typescript/src/styles/themes/solarizedDark.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/solarizedLight.d.ts +34 -0
- package/dist/typescript/src/styles/themes/solarizedLight.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/spruce.d.ts +34 -0
- package/dist/typescript/src/styles/themes/spruce.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/stormClouds.d.ts +34 -0
- package/dist/typescript/src/styles/themes/stormClouds.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/theSixtiesUSA.d.ts +34 -0
- package/dist/typescript/src/styles/themes/theSixtiesUSA.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/tokyoDark.d.ts +34 -0
- package/dist/typescript/src/styles/themes/tokyoDark.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/tooSexy.d.ts +34 -0
- package/dist/typescript/src/styles/themes/tooSexy.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/travel.d.ts +34 -0
- package/dist/typescript/src/styles/themes/travel.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/vaporTeal.d.ts +34 -0
- package/dist/typescript/src/styles/themes/vaporTeal.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/vermillion.d.ts +34 -0
- package/dist/typescript/src/styles/themes/vermillion.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/violetDark.d.ts +34 -0
- package/dist/typescript/src/styles/themes/violetDark.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/water.d.ts +34 -0
- package/dist/typescript/src/styles/themes/water.d.ts.map +1 -0
- package/dist/typescript/src/styles/themes/wmii.d.ts +34 -0
- package/dist/typescript/src/styles/themes/wmii.d.ts.map +1 -0
- package/dist/typescript/src/types.d.ts +42 -0
- package/dist/typescript/src/types.d.ts.map +1 -0
- package/dist/typescript/src/utils/index.d.ts +7 -0
- package/dist/typescript/src/utils/index.d.ts.map +1 -0
- package/package.json +18 -65
- package/src/components/AppBar/AppBarContent.tsx +1 -1
- package/src/components/Button/Button.tsx +0 -2
- package/src/components/Divider/Divider.tsx +1 -0
- package/src/components/FAB/FAB.tsx +0 -2
- package/src/components/FAB/FABGroup.tsx +0 -6
- package/src/components/Hourglass/Hourglass.tsx +1 -0
- package/src/components/NumberInput/NumberInput.tsx +1 -0
- package/src/components/Select/SelectBase.tsx +1 -1
- package/src/components/SwitchBase/SwitchBase.tsx +2 -4
- package/src/components/Tabs/Tabs.tsx +1 -2
- package/src/hooks/useControlledOrUncontrolled.ts +1 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import { StyleSheet, View, PanResponder, ImageBackground } from 'react-native';
|
|
5
|
+
import useAsyncReference from '../../hooks/useAsyncReference';
|
|
6
|
+
import { withTheme } from '../../core/theming';
|
|
7
|
+
import { buildBorderStyles } from '../../styles/styles';
|
|
8
|
+
import { Border } from '../../styles/styleElements';
|
|
9
|
+
import { clamp, roundValueToStep, findClosest } from '../../utils';
|
|
10
|
+
import { Panel, Text, Label } from '../..';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
function percentToValue(percent, min, max) {
|
|
13
|
+
return (max - min) * percent + min;
|
|
14
|
+
}
|
|
15
|
+
const Slider = ({
|
|
16
|
+
disabled = false,
|
|
17
|
+
marks: marksProp,
|
|
18
|
+
max = 100,
|
|
19
|
+
min = 0,
|
|
20
|
+
onChange,
|
|
21
|
+
onChangeCommitted,
|
|
22
|
+
step = 1,
|
|
23
|
+
style,
|
|
24
|
+
theme,
|
|
25
|
+
value = 0,
|
|
26
|
+
...rest
|
|
27
|
+
}) => {
|
|
28
|
+
const [isUsed, setIsUsed] = useState(false);
|
|
29
|
+
let marks;
|
|
30
|
+
// if marks is set to true, we only show ticks at specified steps
|
|
31
|
+
if (marksProp === true && step !== null) {
|
|
32
|
+
marks = [...Array(Math.round((max - min) / step) + 1)].map((_, index) => ({
|
|
33
|
+
value: min + step * index
|
|
34
|
+
}));
|
|
35
|
+
// otherwise we display ticks and optional labels specified by the developer
|
|
36
|
+
} else if (Array.isArray(marksProp)) {
|
|
37
|
+
marks = marksProp;
|
|
38
|
+
// otherwise don't display any marks or labels
|
|
39
|
+
} else {
|
|
40
|
+
marks = [];
|
|
41
|
+
}
|
|
42
|
+
const [sliderSize, setSliderSize] = useAsyncReference(0);
|
|
43
|
+
const handleLayout = e => {
|
|
44
|
+
setSliderSize(e.nativeEvent.layout.width);
|
|
45
|
+
};
|
|
46
|
+
const getNewValue = e => {
|
|
47
|
+
const percent = clamp(e.nativeEvent.locationX / sliderSize.current, 0, 1);
|
|
48
|
+
let newValue = percentToValue(percent, min, max);
|
|
49
|
+
if (step) {
|
|
50
|
+
newValue = roundValueToStep(newValue, step, min);
|
|
51
|
+
} else {
|
|
52
|
+
const marksValues = marks.map(mark => mark.value);
|
|
53
|
+
const closestIndex = findClosest(marksValues, newValue);
|
|
54
|
+
newValue = marksValues[closestIndex];
|
|
55
|
+
}
|
|
56
|
+
newValue = clamp(newValue, min, max);
|
|
57
|
+
return newValue;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// TODO: is this a good approach?
|
|
61
|
+
const valueRef = useRef(value);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
valueRef.current = value;
|
|
64
|
+
}, [value]);
|
|
65
|
+
const handleChange = newValue => {
|
|
66
|
+
if (valueRef.current !== newValue) {
|
|
67
|
+
onChange?.(newValue);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const panResponder = useRef(PanResponder.create({
|
|
71
|
+
onStartShouldSetPanResponder: () => true,
|
|
72
|
+
onStartShouldSetPanResponderCapture: () => true,
|
|
73
|
+
onMoveShouldSetPanResponder: () => true,
|
|
74
|
+
onMoveShouldSetPanResponderCapture: () => true,
|
|
75
|
+
onPanResponderStart: e => {
|
|
76
|
+
setIsUsed(true);
|
|
77
|
+
const newValue = getNewValue(e);
|
|
78
|
+
handleChange(newValue);
|
|
79
|
+
},
|
|
80
|
+
onPanResponderMove: e => {
|
|
81
|
+
const newValue = getNewValue(e);
|
|
82
|
+
handleChange(newValue);
|
|
83
|
+
},
|
|
84
|
+
onPanResponderEnd: e => {
|
|
85
|
+
setIsUsed(false);
|
|
86
|
+
const newValue = getNewValue(e);
|
|
87
|
+
onChangeCommitted?.(newValue);
|
|
88
|
+
},
|
|
89
|
+
onPanResponderTerminationRequest: () => true
|
|
90
|
+
})).current;
|
|
91
|
+
const borderStyles = buildBorderStyles(theme);
|
|
92
|
+
return /*#__PURE__*/_jsx(View, {
|
|
93
|
+
style: [styles.wrapper, style],
|
|
94
|
+
...rest,
|
|
95
|
+
accessibilityRole: "adjustable",
|
|
96
|
+
accessibilityState: {
|
|
97
|
+
disabled
|
|
98
|
+
},
|
|
99
|
+
accessibilityValue: {
|
|
100
|
+
min,
|
|
101
|
+
max,
|
|
102
|
+
now: value
|
|
103
|
+
},
|
|
104
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
105
|
+
style: [styles.inner, isUsed ? borderStyles.focusOutline : {
|
|
106
|
+
borderWidth: 2,
|
|
107
|
+
borderColor: 'transparent'
|
|
108
|
+
}],
|
|
109
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
110
|
+
pointerEvents: disabled ? 'none' : 'auto',
|
|
111
|
+
style: [styles.track],
|
|
112
|
+
onLayout: handleLayout,
|
|
113
|
+
...panResponder.panHandlers,
|
|
114
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
115
|
+
style: [styles.trackInner],
|
|
116
|
+
children: [/*#__PURE__*/_jsx(Border, {
|
|
117
|
+
theme: theme,
|
|
118
|
+
variant: "cutout"
|
|
119
|
+
}), /*#__PURE__*/_jsxs(Panel, {
|
|
120
|
+
theme: theme,
|
|
121
|
+
pointerEvents: "none",
|
|
122
|
+
style: [styles.thumb, {
|
|
123
|
+
left: `${100 * (value - min) / (max - min)}%`
|
|
124
|
+
}],
|
|
125
|
+
children: [disabled && /*#__PURE__*/_jsx(ImageBackground, {
|
|
126
|
+
style: {
|
|
127
|
+
flex: 1
|
|
128
|
+
},
|
|
129
|
+
imageStyle: {
|
|
130
|
+
resizeMode: 'repeat'
|
|
131
|
+
},
|
|
132
|
+
source: {
|
|
133
|
+
// TODO: create util function for generating checkered background
|
|
134
|
+
uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAIUlEQVQoU2P8////fwYkwMjIyIjCp4MCZPtAbAwraa8AAEGrH/nfAIhgAAAAAElFTkSuQmCC'
|
|
135
|
+
}
|
|
136
|
+
}), isUsed && /*#__PURE__*/_jsx(View, {
|
|
137
|
+
style: styles.tooltipWrapper,
|
|
138
|
+
children: /*#__PURE__*/_jsx(Label, {
|
|
139
|
+
elevation: 4,
|
|
140
|
+
style: styles.tooltip,
|
|
141
|
+
children: value
|
|
142
|
+
})
|
|
143
|
+
})]
|
|
144
|
+
})]
|
|
145
|
+
})
|
|
146
|
+
}), marks && /*#__PURE__*/_jsx(View, {
|
|
147
|
+
style: styles.marksWrapper,
|
|
148
|
+
children: marks.map((m, index) => /*#__PURE__*/_jsxs(View, {
|
|
149
|
+
style: [styles.mark, {
|
|
150
|
+
position: index === 0 ? 'relative' : 'absolute',
|
|
151
|
+
left: `${(m.value - min) / (max - min) * 100}%`
|
|
152
|
+
}],
|
|
153
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
154
|
+
style: [styles.tick, {
|
|
155
|
+
backgroundColor: disabled ? theme.materialTextDisabled : theme.materialText,
|
|
156
|
+
// TODO: util function to create disabled shadows
|
|
157
|
+
shadowColor: disabled ? theme.materialTextDisabledShadow : 'transparent',
|
|
158
|
+
shadowOffset: {
|
|
159
|
+
width: 1,
|
|
160
|
+
height: 1
|
|
161
|
+
},
|
|
162
|
+
shadowOpacity: 1,
|
|
163
|
+
shadowRadius: 0
|
|
164
|
+
}]
|
|
165
|
+
}), m.label ? /*#__PURE__*/_jsx(Text, {
|
|
166
|
+
style: styles.markText,
|
|
167
|
+
disabled: disabled,
|
|
168
|
+
children: m.label
|
|
169
|
+
}) : null]
|
|
170
|
+
}, m.value / (max - min) * 100))
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
const thumbWidth = 18;
|
|
176
|
+
const thumbHeight = 32;
|
|
177
|
+
const tickSize = 6;
|
|
178
|
+
const styles = StyleSheet.create({
|
|
179
|
+
wrapper: {
|
|
180
|
+
paddingVertical: 4
|
|
181
|
+
},
|
|
182
|
+
inner: {
|
|
183
|
+
position: 'relative',
|
|
184
|
+
paddingHorizontal: 16
|
|
185
|
+
},
|
|
186
|
+
track: {
|
|
187
|
+
paddingVertical: thumbHeight / 2
|
|
188
|
+
},
|
|
189
|
+
trackInner: {
|
|
190
|
+
height: 8,
|
|
191
|
+
width: '100%',
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
justifyContent: 'center'
|
|
194
|
+
},
|
|
195
|
+
thumb: {
|
|
196
|
+
position: 'absolute',
|
|
197
|
+
width: thumbWidth,
|
|
198
|
+
height: thumbHeight,
|
|
199
|
+
transform: [{
|
|
200
|
+
translateX: -thumbWidth / 2
|
|
201
|
+
}]
|
|
202
|
+
},
|
|
203
|
+
tooltipWrapper: {
|
|
204
|
+
position: 'absolute',
|
|
205
|
+
top: -44,
|
|
206
|
+
left: thumbWidth / 2,
|
|
207
|
+
alignItems: 'center'
|
|
208
|
+
},
|
|
209
|
+
tooltip: {
|
|
210
|
+
position: 'absolute',
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
justifyContent: 'center'
|
|
213
|
+
},
|
|
214
|
+
marksWrapper: {
|
|
215
|
+
position: 'relative'
|
|
216
|
+
},
|
|
217
|
+
mark: {
|
|
218
|
+
transform: [{
|
|
219
|
+
translateX: -1
|
|
220
|
+
}]
|
|
221
|
+
},
|
|
222
|
+
tick: {
|
|
223
|
+
height: tickSize,
|
|
224
|
+
marginBottom: 2,
|
|
225
|
+
width: 2
|
|
226
|
+
},
|
|
227
|
+
markText: {
|
|
228
|
+
fontSize: 14,
|
|
229
|
+
// TODO: is there a way to translate by 0.5 of a character width?
|
|
230
|
+
// tick should centered above
|
|
231
|
+
transform: [{
|
|
232
|
+
translateX: -2
|
|
233
|
+
}]
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export default withTheme(Slider);
|
|
237
|
+
//# sourceMappingURL=Slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","useEffect","StyleSheet","View","PanResponder","ImageBackground","useAsyncReference","withTheme","buildBorderStyles","Border","clamp","roundValueToStep","findClosest","Panel","Text","Label","jsx","_jsx","jsxs","_jsxs","percentToValue","percent","min","max","Slider","disabled","marks","marksProp","onChange","onChangeCommitted","step","style","theme","value","rest","isUsed","setIsUsed","Array","Math","round","map","_","index","isArray","sliderSize","setSliderSize","handleLayout","e","nativeEvent","layout","width","getNewValue","locationX","current","newValue","marksValues","mark","closestIndex","valueRef","handleChange","panResponder","create","onStartShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderStart","onPanResponderMove","onPanResponderEnd","onPanResponderTerminationRequest","borderStyles","styles","wrapper","accessibilityRole","accessibilityState","accessibilityValue","now","children","inner","focusOutline","borderWidth","borderColor","pointerEvents","track","onLayout","panHandlers","trackInner","variant","thumb","left","flex","imageStyle","resizeMode","source","uri","tooltipWrapper","elevation","tooltip","marksWrapper","m","position","tick","backgroundColor","materialTextDisabled","materialText","shadowColor","materialTextDisabledShadow","shadowOffset","height","shadowOpacity","shadowRadius","label","markText","thumbWidth","thumbHeight","tickSize","paddingVertical","paddingHorizontal","alignItems","justifyContent","transform","translateX","top","marginBottom","fontSize"],"sourceRoot":"../../../../src","sources":["components/Slider/Slider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC1D,SAEEC,UAAU,EACVC,IAAI,EAIJC,YAAY,EACZC,eAAe,QACV,cAAc;AACrB,OAAOC,iBAAiB,MAAM,+BAA+B;AAG7D,SAASC,SAAS,QAAQ,oBAAoB;AAE9C,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,MAAM,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"],"sourceRoot":"../../../../src","sources":["components/Slider/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Animated, SafeAreaView, StyleSheet, View, ImageBackground, TouchableOpacity } from 'react-native';
|
|
5
|
+
import { withTheme } from '../../core/theming';
|
|
6
|
+
import { Text } from '../..';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const DURATION_SHORT = 4000;
|
|
9
|
+
const DURATION_MEDIUM = 7000;
|
|
10
|
+
const DURATION_LONG = 10000;
|
|
11
|
+
const shadowOffset = 8;
|
|
12
|
+
const radius = 4;
|
|
13
|
+
const Snackbar = ({
|
|
14
|
+
visible,
|
|
15
|
+
action,
|
|
16
|
+
duration = DURATION_MEDIUM,
|
|
17
|
+
onDismiss,
|
|
18
|
+
children,
|
|
19
|
+
wrapperStyle,
|
|
20
|
+
style,
|
|
21
|
+
theme,
|
|
22
|
+
...rest
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
current: opacity
|
|
26
|
+
} = React.useRef(new Animated.Value(0.0));
|
|
27
|
+
const [hidden, setHidden] = React.useState(!visible);
|
|
28
|
+
const hideTimeout = React.useRef(undefined);
|
|
29
|
+
const scale = 0.5;
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
return () => {
|
|
32
|
+
if (hideTimeout.current) clearTimeout(hideTimeout.current);
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
React.useLayoutEffect(() => {
|
|
36
|
+
if (visible) {
|
|
37
|
+
// show
|
|
38
|
+
if (hideTimeout.current) clearTimeout(hideTimeout.current);
|
|
39
|
+
setHidden(false);
|
|
40
|
+
Animated.timing(opacity, {
|
|
41
|
+
toValue: 1,
|
|
42
|
+
duration: 200 * scale,
|
|
43
|
+
useNativeDriver: true
|
|
44
|
+
}).start(({
|
|
45
|
+
finished
|
|
46
|
+
}) => {
|
|
47
|
+
if (finished) {
|
|
48
|
+
const isInfinity = duration === Number.POSITIVE_INFINITY || duration === Number.NEGATIVE_INFINITY;
|
|
49
|
+
if (finished && !isInfinity) {
|
|
50
|
+
hideTimeout.current = setTimeout(onDismiss, duration);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
// hide
|
|
56
|
+
if (hideTimeout.current) clearTimeout(hideTimeout.current);
|
|
57
|
+
Animated.timing(opacity, {
|
|
58
|
+
toValue: 0,
|
|
59
|
+
duration: 100 * scale,
|
|
60
|
+
useNativeDriver: true
|
|
61
|
+
}).start(({
|
|
62
|
+
finished
|
|
63
|
+
}) => {
|
|
64
|
+
if (finished) setHidden(true);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, [visible, duration, opacity, scale, onDismiss]);
|
|
68
|
+
if (hidden) return null;
|
|
69
|
+
return /*#__PURE__*/_jsx(SafeAreaView, {
|
|
70
|
+
pointerEvents: "box-none",
|
|
71
|
+
style: [styles.wrapper, wrapperStyle],
|
|
72
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
73
|
+
pointerEvents: "box-none",
|
|
74
|
+
accessibilityLiveRegion: "polite"
|
|
75
|
+
// TODO: fix this TS error
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
,
|
|
79
|
+
style: [styles.container, {
|
|
80
|
+
opacity,
|
|
81
|
+
transform: [{
|
|
82
|
+
scale: visible ? opacity.interpolate({
|
|
83
|
+
inputRange: [0, 1],
|
|
84
|
+
outputRange: [0.9, 1]
|
|
85
|
+
}) : 1
|
|
86
|
+
}]
|
|
87
|
+
}, style],
|
|
88
|
+
...rest,
|
|
89
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: styles.inner,
|
|
91
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
92
|
+
style: styles.shadow,
|
|
93
|
+
children: /*#__PURE__*/_jsx(ImageBackground, {
|
|
94
|
+
style: [{
|
|
95
|
+
width: '100%',
|
|
96
|
+
height: '100%'
|
|
97
|
+
}],
|
|
98
|
+
imageStyle: {
|
|
99
|
+
resizeMode: 'repeat'
|
|
100
|
+
},
|
|
101
|
+
source: {
|
|
102
|
+
uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQoU2NkYGD4z4AKGJG5IA4dFKA5AdVKFAdBVaK4iXIFAEiuCAWq9MdHAAAAAElFTkSuQmCC'
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
106
|
+
style: [styles.card, {
|
|
107
|
+
backgroundColor: theme.tooltip,
|
|
108
|
+
borderColor: theme.borderDarkest
|
|
109
|
+
}],
|
|
110
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
111
|
+
style: [styles.content, {
|
|
112
|
+
marginRight: action ? 0 : 16
|
|
113
|
+
}],
|
|
114
|
+
children: children
|
|
115
|
+
}), action ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
116
|
+
activeOpacity: 0.4,
|
|
117
|
+
accessibilityLabel: action.accessibilityLabel,
|
|
118
|
+
onPress: () => {
|
|
119
|
+
action.onPress();
|
|
120
|
+
onDismiss();
|
|
121
|
+
},
|
|
122
|
+
style: styles.button,
|
|
123
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
124
|
+
bold: true,
|
|
125
|
+
style: styles.buttonText,
|
|
126
|
+
children: action.label
|
|
127
|
+
})
|
|
128
|
+
}) : null]
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
Snackbar.DURATION_SHORT = DURATION_SHORT;
|
|
135
|
+
Snackbar.DURATION_MEDIUM = DURATION_MEDIUM;
|
|
136
|
+
Snackbar.DURATION_LONG = DURATION_LONG;
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
wrapper: {
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
bottom: 0,
|
|
141
|
+
width: '100%'
|
|
142
|
+
},
|
|
143
|
+
container: {
|
|
144
|
+
margin: 16
|
|
145
|
+
},
|
|
146
|
+
content: {
|
|
147
|
+
marginLeft: 16,
|
|
148
|
+
marginVertical: 16
|
|
149
|
+
},
|
|
150
|
+
button: {
|
|
151
|
+
marginHorizontal: 8,
|
|
152
|
+
marginVertical: 8,
|
|
153
|
+
textTransform: 'uppercase',
|
|
154
|
+
alignSelf: 'flex-end',
|
|
155
|
+
height: 36,
|
|
156
|
+
paddingHorizontal: 8,
|
|
157
|
+
alignContent: 'center',
|
|
158
|
+
justifyContent: 'center'
|
|
159
|
+
},
|
|
160
|
+
buttonText: {
|
|
161
|
+
textTransform: 'uppercase'
|
|
162
|
+
},
|
|
163
|
+
inner: {
|
|
164
|
+
flex: 1,
|
|
165
|
+
marginRight: shadowOffset,
|
|
166
|
+
marginBottom: shadowOffset
|
|
167
|
+
},
|
|
168
|
+
card: {
|
|
169
|
+
borderWidth: 2,
|
|
170
|
+
borderRadius: radius,
|
|
171
|
+
flexWrap: 'wrap',
|
|
172
|
+
flexDirection: 'row',
|
|
173
|
+
justifyContent: 'space-between',
|
|
174
|
+
alignItems: 'center'
|
|
175
|
+
},
|
|
176
|
+
shadow: {
|
|
177
|
+
position: 'absolute',
|
|
178
|
+
top: shadowOffset,
|
|
179
|
+
left: shadowOffset,
|
|
180
|
+
overflow: 'hidden',
|
|
181
|
+
borderRadius: radius,
|
|
182
|
+
width: '100%',
|
|
183
|
+
height: '100%'
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
export default withTheme(Snackbar);
|
|
187
|
+
//# sourceMappingURL=Snackbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","SafeAreaView","StyleSheet","View","ImageBackground","TouchableOpacity","withTheme","Text","jsx","_jsx","jsxs","_jsxs","DURATION_SHORT","DURATION_MEDIUM","DURATION_LONG","shadowOffset","radius","Snackbar","visible","action","duration","onDismiss","children","wrapperStyle","style","theme","rest","current","opacity","useRef","Value","hidden","setHidden","useState","hideTimeout","undefined","scale","useEffect","clearTimeout","useLayoutEffect","timing","toValue","useNativeDriver","start","finished","isInfinity","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","setTimeout","pointerEvents","styles","wrapper","accessibilityLiveRegion","container","transform","interpolate","inputRange","outputRange","inner","shadow","width","height","imageStyle","resizeMode","source","uri","card","backgroundColor","tooltip","borderColor","borderDarkest","content","marginRight","activeOpacity","accessibilityLabel","onPress","button","bold","buttonText","label","create","position","bottom","margin","marginLeft","marginVertical","marginHorizontal","textTransform","alignSelf","paddingHorizontal","alignContent","justifyContent","flex","marginBottom","borderWidth","borderRadius","flexWrap","flexDirection","alignItems","top","left","overflow"],"sourceRoot":"../../../../src","sources":["components/Snackbar/Snackbar.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,YAAY,EAEZC,UAAU,EAEVC,IAAI,EACJC,eAAe,EACfC,gBAAgB,QACX,cAAc;AAGrB,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,IAAI,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyC7B,MAAMC,cAAc,GAAG,IAAI;AAC3B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,aAAa,GAAG,KAAK;AAE3B,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,MAAM,GAAG,CAAC;AAEhB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,OAAO;EACPC,MAAM;EACNC,QAAQ,GAAGP,eAAe;EAC1BQ,SAAS;EACTC,QAAQ;EACRC,YAAY;EACZC,KAAK;EACLC,KAAK;EACL,GAAG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GjD,UAAU,CAAC+E,MAAM,CAAC;EAC/B7B,OAAO,EAAE;IACP8B,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTtB,KAAK,EAAE;EACT,CAAC;EACDP,SAAS,EAAE;IACT8B,MAAM,EAAE;EACV,CAAC;EACDZ,OAAO,EAAE;IACPa,UAAU,EAAE,EAAE;IACdC,cAAc,EAAE;EAClB,CAAC;EACDT,MAAM,EAAE;IACNU,gBAAgB,EAAE,CAAC;IACnBD,cAAc,EAAE,CAAC;IACjBE,aAAa,EAAE,WAAW;IAC1BC,SAAS,EAAE,UAAU;IACrB3B,MAAM,EAAE,EAAE;IACV4B,iBAAiB,EAAE,CAAC;IACpBC,YAAY,EAAE,QAAQ;IACtBC,cAAc,EAAE;EAClB,CAAC;EACDb,UAAU,EAAE;IACVS,aAAa,EAAE;EACjB,CAAC;EACD7B,KAAK,EAAE;IACLkC,IAAI,EAAE,CAAC;IACPpB,WAAW,EAAE1D,YAAY;IACzB+E,YAAY,EAAE/E;EAChB,CAAC;EACDoD,IAAI,EAAE;IACJ4B,WAAW,EAAE,CAAC;IACdC,YAAY,EAAEhF,MAAM;IACpBiF,QAAQ,EAAE,MAAM;IAChBC,aAAa,EAAE,KAAK;IACpBN,cAAc,EAAE,eAAe;IAC/BO,UAAU,EAAE;EACd,CAAC;EACDvC,MAAM,EAAE;IACNsB,QAAQ,EAAE,UAAU;IACpBkB,GAAG,EAAErF,YAAY;IACjBsF,IAAI,EAAEtF,YAAY;IAClBuF,QAAQ,EAAE,QAAQ;IAClBN,YAAY,EAAEhF,MAAM;IACpB6C,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAexD,SAAS,CAACW,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const SnackbarContent = ({
|
|
7
|
+
children,
|
|
8
|
+
style = {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/_jsx(View, {
|
|
12
|
+
style: [styles.wrapper, style],
|
|
13
|
+
...rest,
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const styles = StyleSheet.create({
|
|
18
|
+
wrapper: {
|
|
19
|
+
padding: 8
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export default SnackbarContent;
|
|
23
|
+
//# sourceMappingURL=SnackbarContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","jsx","_jsx","SnackbarContent","children","style","rest","styles","wrapper","create","padding"],"sourceRoot":"../../../../src","sources":["components/Snackbar/SnackbarContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,UAAU,EAAaC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOtE,MAAMC,eAAe,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,KAAK,GAAG,CAAC,CAAC;EAAE,GAAGC;AAAY,CAAC,KAAK;EACpE,oBACEJ,IAAA,CAACF,IAAI;IAACK,KAAK,EAAE,CAACE,MAAM,CAACC,OAAO,EAAEH,KAAK,CAAE;IAAA,GAAKC,IAAI;IAAAF,QAAA,EAC3CA;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGR,UAAU,CAACU,MAAM,CAAC;EAC/BD,OAAO,EAAE;IACPE,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAeP,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../../../src","sources":["components/Snackbar/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, TouchableHighlight, ImageBackground, View } from 'react-native';
|
|
5
|
+
import { withTheme } from '../../core/theming';
|
|
6
|
+
import { buildBorderStyles } from '../../styles/styles';
|
|
7
|
+
import { Border } from '../../styles/styleElements';
|
|
8
|
+
import { Text, CheckmarkIcon } from '../..';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const checkboxSize = 20;
|
|
11
|
+
const radioSize = 20;
|
|
12
|
+
// TODO: see if ref is passed
|
|
13
|
+
|
|
14
|
+
const SwitchBase = ({
|
|
15
|
+
component,
|
|
16
|
+
disabled = false,
|
|
17
|
+
label = '',
|
|
18
|
+
variant = 'default',
|
|
19
|
+
onPress = () => {},
|
|
20
|
+
status,
|
|
21
|
+
style = {},
|
|
22
|
+
theme,
|
|
23
|
+
...rest
|
|
24
|
+
}) => {
|
|
25
|
+
const [isPressed, setIsPressed] = React.useState(false);
|
|
26
|
+
const isRadio = component === 'radio';
|
|
27
|
+
const switchSize = !isRadio ? checkboxSize : radioSize;
|
|
28
|
+
const boxSize = variant === 'flat' ? switchSize - 4 : switchSize;
|
|
29
|
+
const borderRadius = isRadio ? boxSize / 2 : 0;
|
|
30
|
+
const checked = status === 'checked';
|
|
31
|
+
const borders = buildBorderStyles(theme);
|
|
32
|
+
const renderCheckmark = () => {
|
|
33
|
+
if (checked) {
|
|
34
|
+
return isRadio ? /*#__PURE__*/_jsx(View, {
|
|
35
|
+
style: {
|
|
36
|
+
borderRadius: 6,
|
|
37
|
+
height: 6,
|
|
38
|
+
width: 6,
|
|
39
|
+
backgroundColor: disabled ? theme.checkmarkDisabled : theme.checkmark
|
|
40
|
+
}
|
|
41
|
+
}) : /*#__PURE__*/_jsx(CheckmarkIcon, {
|
|
42
|
+
disabled: disabled
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (status === 'indeterminate') {
|
|
46
|
+
return /*#__PURE__*/_jsx(ImageBackground, {
|
|
47
|
+
style: [{
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '100%'
|
|
50
|
+
}],
|
|
51
|
+
imageStyle: {
|
|
52
|
+
resizeMode: 'repeat'
|
|
53
|
+
},
|
|
54
|
+
source: {
|
|
55
|
+
uri: {
|
|
56
|
+
default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQoU2NkYGD4z4AKGJG5IA4dFKA5AdVKFAdBVaK4iXIFAEiuCAWq9MdHAAAAAElFTkSuQmCC',
|
|
57
|
+
disabled: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQoU2NsaW35z4AEaqprGJH5jHRQgGwfiI1uJYqDaKMAAHKtGjlbjgHwAAAAAElFTkSuQmCC'
|
|
58
|
+
}[disabled ? 'disabled' : 'default']
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
63
|
+
children: " "
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const getBackgroundColor = () => {
|
|
67
|
+
if (variant === 'flat') {
|
|
68
|
+
return disabled ? theme.flatLight : theme.canvas;
|
|
69
|
+
}
|
|
70
|
+
return disabled ? theme.material : theme.canvas;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/*const getAccessibilityComponentType = () => {
|
|
74
|
+
if (isRadio) {
|
|
75
|
+
return checked ? 'radiobutton_checked' : 'radiobutton_unchecked';
|
|
76
|
+
}
|
|
77
|
+
return 'button';
|
|
78
|
+
};*/
|
|
79
|
+
|
|
80
|
+
return /*#__PURE__*/_jsx(TouchableHighlight, {
|
|
81
|
+
style: [styles.wrapper],
|
|
82
|
+
onPress: onPress,
|
|
83
|
+
activeOpacity: 1,
|
|
84
|
+
disabled: disabled,
|
|
85
|
+
onHideUnderlay: () => setIsPressed(false),
|
|
86
|
+
onShowUnderlay: () => setIsPressed(true)
|
|
87
|
+
// TODO: check if those accessibility properties are correct
|
|
88
|
+
,
|
|
89
|
+
accessibilityRole: component,
|
|
90
|
+
accessibilityState: {
|
|
91
|
+
disabled,
|
|
92
|
+
checked
|
|
93
|
+
},
|
|
94
|
+
accessibilityLiveRegion: "polite",
|
|
95
|
+
underlayColor: "none",
|
|
96
|
+
...rest,
|
|
97
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
98
|
+
style: [styles.content, style],
|
|
99
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
100
|
+
style: [styles.switchSymbol, {
|
|
101
|
+
width: boxSize,
|
|
102
|
+
height: boxSize,
|
|
103
|
+
backgroundColor: getBackgroundColor(),
|
|
104
|
+
borderRadius,
|
|
105
|
+
overflow: 'hidden'
|
|
106
|
+
}],
|
|
107
|
+
children: [renderCheckmark(), /*#__PURE__*/_jsx(Border, {
|
|
108
|
+
variant: variant === 'flat' ? 'flat' : 'cutout',
|
|
109
|
+
radius: borderRadius
|
|
110
|
+
})]
|
|
111
|
+
}), Boolean(label) && /*#__PURE__*/_jsx(View, {
|
|
112
|
+
style: [styles.labelWrapper, !disabled && isPressed ? borders.focusOutline : {
|
|
113
|
+
borderWidth: 2,
|
|
114
|
+
borderColor: 'transparent'
|
|
115
|
+
}],
|
|
116
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
117
|
+
disabled: disabled,
|
|
118
|
+
style: [styles.label],
|
|
119
|
+
children: label
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const styles = StyleSheet.create({
|
|
126
|
+
wrapper: {
|
|
127
|
+
width: 'auto',
|
|
128
|
+
alignSelf: 'flex-start',
|
|
129
|
+
padding: 4
|
|
130
|
+
},
|
|
131
|
+
content: {
|
|
132
|
+
flexDirection: 'row',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
width: 'auto'
|
|
135
|
+
},
|
|
136
|
+
switchSymbol: {
|
|
137
|
+
marginRight: 4,
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
justifyContent: 'center'
|
|
140
|
+
},
|
|
141
|
+
labelWrapper: {
|
|
142
|
+
paddingHorizontal: 4
|
|
143
|
+
},
|
|
144
|
+
label: {
|
|
145
|
+
fontSize: 16
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
const SwitchBaseWithTheme = withTheme(SwitchBase);
|
|
149
|
+
export { SwitchBaseWithTheme as SwitchBase };
|
|
150
|
+
//# sourceMappingURL=SwitchBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","TouchableHighlight","ImageBackground","View","withTheme","buildBorderStyles","Border","Text","CheckmarkIcon","jsx","_jsx","jsxs","_jsxs","checkboxSize","radioSize","SwitchBase","component","disabled","label","variant","onPress","status","style","theme","rest","isPressed","setIsPressed","useState","isRadio","switchSize","boxSize","borderRadius","checked","borders","renderCheckmark","height","width","backgroundColor","checkmarkDisabled","checkmark","imageStyle","resizeMode","source","uri","default","children","getBackgroundColor","flatLight","canvas","material","styles","wrapper","activeOpacity","onHideUnderlay","onShowUnderlay","accessibilityRole","accessibilityState","accessibilityLiveRegion","underlayColor","content","switchSymbol","overflow","radius","Boolean","labelWrapper","focusOutline","borderWidth","borderColor","create","alignSelf","padding","flexDirection","alignItems","marginRight","justifyContent","paddingHorizontal","fontSize","SwitchBaseWithTheme"],"sourceRoot":"../../../../src","sources":["components/SwitchBase/SwitchBase.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,UAAU,EACVC,kBAAkB,EAClBC,eAAe,EACfC,IAAI,QAGC,cAAc;AAGrB,SAASC,SAAS,QAAQ,oBAAoB;AAE9C,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,IAA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AC;IACdD,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE;EAClB,CAAC;EACDV,YAAY,EAAE;IACZW,iBAAiB,EAAE;EACrB,CAAC;EACDzD,KAAK,EAAE;IACL0D,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,MAAMC,mBAAmB,GAAGzE,SAAS,CAACW,UAAU,CAAC;AACjD,SAAS8D,mBAAmB,IAAI9D,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/SwitchBase/index.ts"],"mappings":";;AAAA,cAAc,cAAc","ignoreList":[]}
|