react95-native-rabbl 0.1.1 → 0.1.3
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/README.md +11 -0
- 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 +81 -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 +76 -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
- package/src/styles/styleElements.tsx +1 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
|
+
import { StyleSheet, View, ScrollView as RNScrollView, ImageBackground, PanResponder, TouchableWithoutFeedback } from 'react-native';
|
|
5
|
+
import useAsyncReference from '../../hooks/useAsyncReference';
|
|
6
|
+
import { withTheme } from '../../core/theming';
|
|
7
|
+
import { Panel, Button, ArrowIcon } from '../..';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
// TODO: performance improvements (callbacks, refs ...etc)
|
|
10
|
+
// TODO: disable scroll buttons when scroll position reached min or max
|
|
11
|
+
// TODO: add 'scrollIncrement' prop (granularity of scroll buttons)
|
|
12
|
+
const ScrollView = ({
|
|
13
|
+
alwaysShowScrollbars = false,
|
|
14
|
+
children,
|
|
15
|
+
horizontal = false,
|
|
16
|
+
small = false,
|
|
17
|
+
scrollViewProps = {},
|
|
18
|
+
style,
|
|
19
|
+
theme,
|
|
20
|
+
...rest
|
|
21
|
+
}) => {
|
|
22
|
+
const scrollViewRef = useRef(null);
|
|
23
|
+
const [contentOffset, setContentOffset] = useAsyncReference(0);
|
|
24
|
+
const [contentSize, setContentSize] = useAsyncReference(0);
|
|
25
|
+
const [scrollViewSize, setScrollViewSize] = useAsyncReference(0);
|
|
26
|
+
const scrollbarThickness = small ? 26 : 30;
|
|
27
|
+
const scrollbarButtonSize = scrollbarThickness;
|
|
28
|
+
const scrollbarAxis = horizontal ? 'x' : 'y';
|
|
29
|
+
const scrollbarLengthDimension = horizontal ? 'width' : 'height';
|
|
30
|
+
const scrollbarThicknessDimension = horizontal ? 'height' : 'width';
|
|
31
|
+
const contentFullyVisible = contentSize.current <= scrollViewSize.current;
|
|
32
|
+
const visibleContentRatio = scrollViewSize.current / contentSize.current;
|
|
33
|
+
const scrolledContentRatio = contentOffset.current / contentSize.current;
|
|
34
|
+
const thumbPosition = Math.max(0, Math.min(1 - visibleContentRatio, parseFloat(scrolledContentRatio.toFixed(3)))) * 100;
|
|
35
|
+
|
|
36
|
+
// CALLBACKS
|
|
37
|
+
|
|
38
|
+
const scrollTo = (distance, animated = false) => {
|
|
39
|
+
if (scrollViewRef.current) {
|
|
40
|
+
scrollViewRef.current.scrollTo({
|
|
41
|
+
[scrollbarAxis]: distance,
|
|
42
|
+
animated
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleScrollButtonPress = direction => {
|
|
47
|
+
scrollTo(contentOffset.current + 24 * direction, true);
|
|
48
|
+
};
|
|
49
|
+
const handleTrackPress = direction => {
|
|
50
|
+
scrollTo(contentOffset.current + scrollViewSize.current * direction);
|
|
51
|
+
};
|
|
52
|
+
const handleScroll = e => {
|
|
53
|
+
scrollViewProps.onScroll?.(e);
|
|
54
|
+
setContentOffset(e.nativeEvent.contentOffset[scrollbarAxis]);
|
|
55
|
+
};
|
|
56
|
+
const handleContentSizeChange = (width, height) => {
|
|
57
|
+
scrollViewProps.onContentSizeChange?.(width, height);
|
|
58
|
+
setContentSize(horizontal ? width : height);
|
|
59
|
+
};
|
|
60
|
+
const handleLayout = e => {
|
|
61
|
+
scrollViewProps.onLayout?.(e);
|
|
62
|
+
setScrollViewSize(e.nativeEvent.layout[scrollbarLengthDimension]);
|
|
63
|
+
};
|
|
64
|
+
const dragStartScrollPositionRef = useRef(0);
|
|
65
|
+
const panResponder = useRef(PanResponder.create({
|
|
66
|
+
onStartShouldSetPanResponder: () => true,
|
|
67
|
+
onStartShouldSetPanResponderCapture: () => true,
|
|
68
|
+
onMoveShouldSetPanResponder: () => true,
|
|
69
|
+
onMoveShouldSetPanResponderCapture: () => true,
|
|
70
|
+
onPanResponderGrant: () => {
|
|
71
|
+
dragStartScrollPositionRef.current = contentOffset.current;
|
|
72
|
+
},
|
|
73
|
+
onPanResponderMove: (_evt, gestureState) => {
|
|
74
|
+
const scrollTrackLength = scrollViewSize.current - 2 * scrollbarButtonSize;
|
|
75
|
+
const scrollDistanceChange = gestureState[horizontal ? 'dx' : 'dy'] / scrollTrackLength;
|
|
76
|
+
const translatedDistance = scrollDistanceChange * contentSize.current;
|
|
77
|
+
scrollTo(dragStartScrollPositionRef.current + translatedDistance);
|
|
78
|
+
},
|
|
79
|
+
onPanResponderTerminationRequest: () => true
|
|
80
|
+
})).current;
|
|
81
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
82
|
+
style: [styles.wrapper, {
|
|
83
|
+
flexDirection: horizontal ? 'column' : 'row'
|
|
84
|
+
}, style],
|
|
85
|
+
...rest,
|
|
86
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
87
|
+
style: [styles.content],
|
|
88
|
+
children: /*#__PURE__*/_jsx(RNScrollView, {
|
|
89
|
+
...scrollViewProps,
|
|
90
|
+
showsVerticalScrollIndicator: false,
|
|
91
|
+
showsHorizontalScrollIndicator: false,
|
|
92
|
+
scrollEventThrottle: 10,
|
|
93
|
+
ref: scrollViewRef,
|
|
94
|
+
onScroll: handleScroll,
|
|
95
|
+
onContentSizeChange: handleContentSizeChange,
|
|
96
|
+
onLayout: handleLayout,
|
|
97
|
+
horizontal: horizontal,
|
|
98
|
+
children: children
|
|
99
|
+
})
|
|
100
|
+
}), (!contentFullyVisible || alwaysShowScrollbars) && /*#__PURE__*/_jsxs(View, {
|
|
101
|
+
accessibilityRole: "scrollbar",
|
|
102
|
+
style: [{
|
|
103
|
+
flexDirection: horizontal ? 'row' : 'column',
|
|
104
|
+
[scrollbarLengthDimension]: '100%',
|
|
105
|
+
[scrollbarThicknessDimension]: scrollbarThickness,
|
|
106
|
+
backgroundColor: theme.material
|
|
107
|
+
}],
|
|
108
|
+
children: [/*#__PURE__*/_jsx(ImageBackground, {
|
|
109
|
+
style: [styles.background],
|
|
110
|
+
imageStyle: {
|
|
111
|
+
resizeMode: 'repeat'
|
|
112
|
+
},
|
|
113
|
+
source: {
|
|
114
|
+
// TODO: create util function for generating checkered background
|
|
115
|
+
uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAIUlEQVQoU2P8////fwYkwMjIyIjCp4MCZPtAbAwraa8AAEGrH/nfAIhgAAAAAElFTkSuQmCC'
|
|
116
|
+
}
|
|
117
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
118
|
+
theme: theme,
|
|
119
|
+
variant: "raised",
|
|
120
|
+
onPress: () => handleScrollButtonPress(-1),
|
|
121
|
+
disabled: contentFullyVisible,
|
|
122
|
+
style: {
|
|
123
|
+
height: scrollbarButtonSize,
|
|
124
|
+
width: scrollbarButtonSize,
|
|
125
|
+
padding: 0
|
|
126
|
+
},
|
|
127
|
+
children: /*#__PURE__*/_jsx(ArrowIcon, {
|
|
128
|
+
theme: theme,
|
|
129
|
+
direction: horizontal ? 'left' : 'up',
|
|
130
|
+
disabled: contentFullyVisible,
|
|
131
|
+
segments: small ? 3 : 4
|
|
132
|
+
})
|
|
133
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
134
|
+
style: [styles.scrollbarTrack],
|
|
135
|
+
children: !contentFullyVisible && /*#__PURE__*/_jsxs(View, {
|
|
136
|
+
style: {
|
|
137
|
+
flex: 1,
|
|
138
|
+
flexDirection: horizontal ? 'row' : 'column'
|
|
139
|
+
},
|
|
140
|
+
children: [/*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
141
|
+
onPressIn: () => handleTrackPress(-1),
|
|
142
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
143
|
+
style: {
|
|
144
|
+
[scrollbarLengthDimension]: `${thumbPosition}%`
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
}), /*#__PURE__*/_jsx(Panel, {
|
|
148
|
+
theme: theme,
|
|
149
|
+
variant: "raised",
|
|
150
|
+
style: {
|
|
151
|
+
[scrollbarLengthDimension]: `${visibleContentRatio * 100}%`
|
|
152
|
+
},
|
|
153
|
+
...panResponder.panHandlers
|
|
154
|
+
}), /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
155
|
+
onPressIn: () => handleTrackPress(1),
|
|
156
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
157
|
+
style: {
|
|
158
|
+
flex: 1
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
})
|
|
163
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
164
|
+
theme: theme,
|
|
165
|
+
variant: "raised",
|
|
166
|
+
onPress: () => handleScrollButtonPress(1),
|
|
167
|
+
disabled: contentFullyVisible,
|
|
168
|
+
style: {
|
|
169
|
+
height: scrollbarButtonSize,
|
|
170
|
+
width: scrollbarButtonSize,
|
|
171
|
+
padding: 0
|
|
172
|
+
},
|
|
173
|
+
children: /*#__PURE__*/_jsx(ArrowIcon, {
|
|
174
|
+
theme: theme,
|
|
175
|
+
direction: horizontal ? 'right' : 'down',
|
|
176
|
+
disabled: contentFullyVisible,
|
|
177
|
+
segments: small ? 3 : 4
|
|
178
|
+
})
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
const styles = StyleSheet.create({
|
|
184
|
+
wrapper: {
|
|
185
|
+
display: 'flex',
|
|
186
|
+
position: 'relative'
|
|
187
|
+
},
|
|
188
|
+
content: {
|
|
189
|
+
flexGrow: 1,
|
|
190
|
+
flexShrink: 1
|
|
191
|
+
},
|
|
192
|
+
scrollbarTrack: {
|
|
193
|
+
overflow: 'hidden',
|
|
194
|
+
flex: 1
|
|
195
|
+
},
|
|
196
|
+
background: {
|
|
197
|
+
position: 'absolute',
|
|
198
|
+
top: 0,
|
|
199
|
+
right: 0,
|
|
200
|
+
bottom: 0,
|
|
201
|
+
left: 0
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
export default withTheme(ScrollView);
|
|
205
|
+
//# sourceMappingURL=ScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","StyleSheet","View","ScrollView","RNScrollView","ImageBackground","PanResponder","TouchableWithoutFeedback","useAsyncReference","withTheme","Panel","Button","ArrowIcon","jsx","_jsx","jsxs","_jsxs","alwaysShowScrollbars","children","horizontal","small","scrollViewProps","style","theme","rest","scrollViewRef","contentOffset","setContentOffset","contentSize","setContentSize","scrollViewSize","setScrollViewSize","scrollbarThickness","scrollbarButtonSize","scrollbarAxis","scrollbarLengthDimension","scrollbarThicknessDimension","contentFullyVisible","current","visibleContentRatio","scrolledContentRatio","thumbPosition","Math","max","min","parseFloat","toFixed","scrollTo","distance","animated","handleScrollButtonPress","direction","handleTrackPress","handleScroll","e","onScroll","nativeEvent","handleContentSizeChange","width","height","onContentSizeChange","handleLayout","onLayout","layout","dragStartScrollPositionRef","panResponder","create","onStartShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","onPanResponderMove","_evt","gestureState","scrollTrackLength","scrollDistanceChange","translatedDistance","onPanResponderTerminationRequest","styles","wrapper","flexDirection","content","showsVerticalScrollIndicator","showsHorizontalScrollIndicator","scrollEventThrottle","ref","accessibilityRole","backgroundColor","material","background","imageStyle","resizeMode","source","uri","variant","onPress","disabled","padding","segments","scrollbarTrack","flex","onPressIn","panHandlers","display","position","flexGrow","flexShrink","overflow","top","right","bottom","left"],"sourceRoot":"../../../../src","sources":["components/ScrollView/ScrollView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SACEC,UAAU,EACVC,IAAI,EACJC,UAAU,IAAIC,YAAY,EAG1BC,eAAe,EACfC,YAAY,EACZC,wBAAwB,QACnB,cAAc;AAMrB,OAAOC,iBAAiB,MAAM,+BAA+B;AAG7D,SAASC,SAAS,QAAQ,oBAAoB;AA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W,KAAK,EAAEA,KAAM;UACb4B,SAAS,EAAEhC,UAAU,GAAG,OAAO,GAAG,MAAO;UACzC8E,QAAQ,EAAE5D,mBAAoB;UAC9B8D,QAAQ,EAAE/E,KAAK,GAAG,CAAC,GAAG;QAAE,CACzB;MAAC,CACI,CAAC;IAAA,CACL,CACP;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAM2D,MAAM,GAAG9E,UAAU,CAACiE,MAAM,CAAC;EAC/Bc,OAAO,EAAE;IACPwB,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EACZ,CAAC;EACDvB,OAAO,EAAE;IACPwB,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE;EACd,CAAC;EACDP,cAAc,EAAE;IACdQ,QAAQ,EAAE,QAAQ;IAClBP,IAAI,EAAE;EACR,CAAC;EACDX,UAAU,EAAE;IACVe,QAAQ,EAAE,UAAU;IACpBI,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAevG,SAAS,CAACN,UAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../../../src","sources":["components/ScrollView/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { StyleSheet, View, TouchableHighlight } from 'react-native';
|
|
5
|
+
import { withTheme } from '../../core/theming';
|
|
6
|
+
import { blockSizes, buildBorderStyles, builtTextStyles } from '../../styles/styles';
|
|
7
|
+
import shadow from '../../styles/shadow';
|
|
8
|
+
import getSelectOptions from './SelectBase';
|
|
9
|
+
import { ScrollView, Text, ArrowIcon, Panel } from '../..';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const Select = ({
|
|
12
|
+
disabled = false,
|
|
13
|
+
menuMaxHeight,
|
|
14
|
+
onChange,
|
|
15
|
+
options = [],
|
|
16
|
+
style,
|
|
17
|
+
theme,
|
|
18
|
+
value,
|
|
19
|
+
...rest
|
|
20
|
+
}) => {
|
|
21
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
22
|
+
const [isPressed, setIsPressed] = useState(false);
|
|
23
|
+
function handleOptionSelect(option) {
|
|
24
|
+
onChange(option.value);
|
|
25
|
+
setIsOpen(false);
|
|
26
|
+
}
|
|
27
|
+
function getLabelContainerBackgroundColor() {
|
|
28
|
+
if (disabled) {
|
|
29
|
+
return theme.material;
|
|
30
|
+
}
|
|
31
|
+
if (isPressed) {
|
|
32
|
+
return theme.hoverBackground;
|
|
33
|
+
}
|
|
34
|
+
return theme.canvas;
|
|
35
|
+
}
|
|
36
|
+
const [selectedOptions, selectOptions] = getSelectOptions({
|
|
37
|
+
options,
|
|
38
|
+
values: [value],
|
|
39
|
+
onChange: handleOptionSelect,
|
|
40
|
+
theme
|
|
41
|
+
});
|
|
42
|
+
const selectedOption = selectedOptions[0];
|
|
43
|
+
// TODO: close dropdown when user touches outside of component
|
|
44
|
+
// TODO: native prop to use native select
|
|
45
|
+
|
|
46
|
+
const borderStyles = buildBorderStyles(theme);
|
|
47
|
+
const textStyles = builtTextStyles(theme);
|
|
48
|
+
return /*#__PURE__*/_jsx(Panel, {
|
|
49
|
+
theme: theme,
|
|
50
|
+
variant: "cutout",
|
|
51
|
+
background: disabled ? 'material' : 'canvas',
|
|
52
|
+
style: [styles.wrapper, style],
|
|
53
|
+
...rest,
|
|
54
|
+
children: /*#__PURE__*/_jsx(TouchableHighlight, {
|
|
55
|
+
onPress: () => setIsOpen(currentIsOpen => !currentIsOpen),
|
|
56
|
+
activeOpacity: 1,
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
onHideUnderlay: () => setIsPressed(false),
|
|
59
|
+
onShowUnderlay: () => setIsPressed(true)
|
|
60
|
+
// TODO: accessibility
|
|
61
|
+
// accessibilityTraits
|
|
62
|
+
// accessibilityComponentType
|
|
63
|
+
// accessibilityRole
|
|
64
|
+
// accessibilityState
|
|
65
|
+
,
|
|
66
|
+
underlayColor: "none",
|
|
67
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
68
|
+
style: [styles.inner],
|
|
69
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
70
|
+
style: [styles.flex],
|
|
71
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
72
|
+
style: [styles.selectValue, {
|
|
73
|
+
backgroundColor: disabled ? theme.material : theme.canvas
|
|
74
|
+
}],
|
|
75
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
76
|
+
style: [styles.center, {
|
|
77
|
+
borderWidth: 2,
|
|
78
|
+
borderColor: disabled ? theme.material : theme.canvas,
|
|
79
|
+
backgroundColor: getLabelContainerBackgroundColor()
|
|
80
|
+
}, isPressed && borderStyles.focusSecondaryOutline],
|
|
81
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
82
|
+
theme: theme,
|
|
83
|
+
style: [styles.textValue, disabled ? textStyles.disabled : textStyles.default, !disabled && isPressed && {
|
|
84
|
+
color: isPressed ? theme.canvasTextInvert : theme.canvasText
|
|
85
|
+
}],
|
|
86
|
+
children: selectedOption.label
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}), /*#__PURE__*/_jsx(Panel, {
|
|
90
|
+
theme: theme,
|
|
91
|
+
variant: isPressed ? 'default' : 'raised',
|
|
92
|
+
invert: isPressed,
|
|
93
|
+
style: [styles.fakeButton],
|
|
94
|
+
children: /*#__PURE__*/_jsx(ArrowIcon, {
|
|
95
|
+
theme: theme,
|
|
96
|
+
segments: 4,
|
|
97
|
+
direction: "down",
|
|
98
|
+
disabled: disabled,
|
|
99
|
+
style: {
|
|
100
|
+
paddingTop: isPressed ? 2 : 0
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
})]
|
|
104
|
+
}), isOpen && /*#__PURE__*/_jsx(View, {
|
|
105
|
+
style: [styles.options, {
|
|
106
|
+
height: menuMaxHeight || 'auto',
|
|
107
|
+
backgroundColor: theme.canvas,
|
|
108
|
+
borderColor: theme.borderDarkest
|
|
109
|
+
}],
|
|
110
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
111
|
+
theme: theme,
|
|
112
|
+
children: selectOptions
|
|
113
|
+
})
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
const selectHeight = blockSizes.md;
|
|
120
|
+
const styles = StyleSheet.create({
|
|
121
|
+
wrapper: {
|
|
122
|
+
height: selectHeight,
|
|
123
|
+
alignSelf: 'flex-start',
|
|
124
|
+
padding: 0
|
|
125
|
+
},
|
|
126
|
+
inner: {
|
|
127
|
+
position: 'relative',
|
|
128
|
+
padding: 4
|
|
129
|
+
},
|
|
130
|
+
flex: {
|
|
131
|
+
display: 'flex',
|
|
132
|
+
flexDirection: 'row',
|
|
133
|
+
justifyContent: 'space-between',
|
|
134
|
+
alignContent: 'center',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
height: '100%'
|
|
137
|
+
},
|
|
138
|
+
selectValue: {
|
|
139
|
+
flexGrow: 1,
|
|
140
|
+
flex: 1,
|
|
141
|
+
height: '100%',
|
|
142
|
+
padding: 2
|
|
143
|
+
},
|
|
144
|
+
center: {
|
|
145
|
+
flexGrow: 1,
|
|
146
|
+
flex: 1,
|
|
147
|
+
height: '100%',
|
|
148
|
+
justifyContent: 'center'
|
|
149
|
+
},
|
|
150
|
+
textValue: {
|
|
151
|
+
fontSize: 16,
|
|
152
|
+
paddingHorizontal: 4
|
|
153
|
+
},
|
|
154
|
+
fakeButton: {
|
|
155
|
+
position: 'relative',
|
|
156
|
+
height: '100%',
|
|
157
|
+
width: 30,
|
|
158
|
+
padding: 4,
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
justifyContent: 'center'
|
|
161
|
+
},
|
|
162
|
+
options: {
|
|
163
|
+
position: 'absolute',
|
|
164
|
+
top: selectHeight,
|
|
165
|
+
left: 0,
|
|
166
|
+
right: 0,
|
|
167
|
+
borderWidth: 2,
|
|
168
|
+
padding: 2,
|
|
169
|
+
display: 'flex',
|
|
170
|
+
...shadow(2)
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
export default withTheme(Select);
|
|
174
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","View","TouchableHighlight","withTheme","blockSizes","buildBorderStyles","builtTextStyles","shadow","getSelectOptions","ScrollView","Text","ArrowIcon","Panel","jsx","_jsx","jsxs","_jsxs","Select","disabled","menuMaxHeight","onChange","options","style","theme","value","rest","isOpen","setIsOpen","isPressed","setIsPressed","handleOptionSelect","option","getLabelContainerBackgroundColor","material","hoverBackground","canvas","selectedOptions","selectOptions","values","selectedOption","borderStyles","textStyles","variant","background","styles","wrapper","children","onPress","currentIsOpen","activeOpacity","onHideUnderlay","onShowUnderlay","underlayColor","inner","flex","selectValue","backgroundColor","center","borderWidth","borderColor","focusSecondaryOutline","textValue","default","color","canvasTextInvert","canvasText","label","invert","fakeButton","segments","direction","paddingTop","height","borderDarkest","selectHeight","md","create","alignSelf","padding","position","display","flexDirection","justifyContent","alignContent","alignItems","flexGrow","fontSize","paddingHorizontal","width","top","left","right"],"sourceRoot":"../../../../src","sources":["components/Select/Select.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SACEC,UAAU,EACVC,IAAI,EACJC,kBAAkB,QAGb,cAAc;AAGrB,SAASC,SAAS,QAAQ,oBAAoB;AAE9C,SACEC,UAAU,EACVC,iBAAiB,EACjBC,eAAe,QACV,qBAAqB;AAC5B,OAAOC,MAAM,MAAM,qBAAqB;AAExC,OAAOC,gBAAgB,MAAkB,cAAc;AACvD,SAASC,UAA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
+
import React, { useState } from 'react';
|
|
4
|
+
import { StyleSheet, View, TouchableHighlight } from 'react-native';
|
|
5
|
+
import { withTheme } from '../../core/theming';
|
|
6
|
+
import { blockSizes } from '../../styles/styles';
|
|
7
|
+
import { Text } from '../..';
|
|
8
|
+
// TODO: allow for no option selected
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const SelectItem = ({
|
|
11
|
+
isSelected,
|
|
12
|
+
onPress,
|
|
13
|
+
option,
|
|
14
|
+
theme
|
|
15
|
+
}) => {
|
|
16
|
+
const [isPressed, setIsPressed] = useState(false);
|
|
17
|
+
return /*#__PURE__*/_jsx(TouchableHighlight, {
|
|
18
|
+
onPress: () => onPress(option),
|
|
19
|
+
onHideUnderlay: () => setIsPressed(false),
|
|
20
|
+
onShowUnderlay: () => setIsPressed(true),
|
|
21
|
+
underlayColor: "none"
|
|
22
|
+
// delay to prevent item highlighting on scroll
|
|
23
|
+
,
|
|
24
|
+
delayPressIn: 70,
|
|
25
|
+
activeOpacity: 1,
|
|
26
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
27
|
+
style: [styles.center, styles.optionWrapper, {
|
|
28
|
+
borderColor: isPressed ? theme.focusSecondary : 'transparent',
|
|
29
|
+
backgroundColor: isPressed || isSelected ? theme.hoverBackground : theme.canvas
|
|
30
|
+
}],
|
|
31
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
32
|
+
style: [styles.optionText, {
|
|
33
|
+
color: isPressed || isSelected ? theme.canvasTextInvert : theme.canvasText
|
|
34
|
+
}],
|
|
35
|
+
children: option.label
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const SelectItemWithTheme = withTheme(SelectItem);
|
|
41
|
+
const selectHeight = blockSizes.md + 2;
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
center: {
|
|
44
|
+
flexGrow: 1,
|
|
45
|
+
flex: 1,
|
|
46
|
+
height: '100%',
|
|
47
|
+
justifyContent: 'center'
|
|
48
|
+
},
|
|
49
|
+
optionWrapper: {
|
|
50
|
+
height: selectHeight - 4,
|
|
51
|
+
borderWidth: 2,
|
|
52
|
+
borderStyle: 'dotted'
|
|
53
|
+
},
|
|
54
|
+
optionText: {
|
|
55
|
+
fontSize: 16,
|
|
56
|
+
paddingLeft: 6
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export default function getSelectOptions({
|
|
60
|
+
options,
|
|
61
|
+
values,
|
|
62
|
+
onChange,
|
|
63
|
+
theme
|
|
64
|
+
}) {
|
|
65
|
+
const selectedOptions = options.filter(option => values.includes(option.value));
|
|
66
|
+
const optionItems = options.map(option => /*#__PURE__*/_jsx(SelectItemWithTheme, {
|
|
67
|
+
theme: theme,
|
|
68
|
+
option: option,
|
|
69
|
+
isSelected: selectedOptions.includes(option),
|
|
70
|
+
onPress: onChange
|
|
71
|
+
}, option.value));
|
|
72
|
+
return [selectedOptions, optionItems];
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=SelectBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","View","TouchableHighlight","withTheme","blockSizes","Text","jsx","_jsx","SelectItem","isSelected","onPress","option","theme","isPressed","setIsPressed","onHideUnderlay","onShowUnderlay","underlayColor","delayPressIn","activeOpacity","children","style","styles","center","optionWrapper","borderColor","focusSecondary","backgroundColor","hoverBackground","canvas","optionText","color","canvasTextInvert","canvasText","label","SelectItemWithTheme","selectHeight","md","create","flexGrow","flex","height","justifyContent","borderWidth","borderStyle","fontSize","paddingLeft","getSelectOptions","options","values","onChange","selectedOptions","filter","includes","value","optionItems","map"],"sourceRoot":"../../../../src","sources":["components/Select/SelectBase.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,EAAEC,IAAI,EAAEC,kBAAkB,QAAQ,cAAc;AAGnE,SAASC,SAAS,QAAQ,oBAA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EAAE,GAAG,CAAC;AAEtC,MAAMf,MAAM,GAAGtB,UAAU,CAACsC,MAAM,CAAC;EAC/Bf,MAAM,EAAE;IACNgB,QAAQ,EAAE,CAAC;IACXC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE;EAClB,CAAC;EACDlB,aAAa,EAAE;IACbiB,MAAM,EAAEL,YAAY,GAAG,CAAC;IACxBO,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDd,UAAU,EAAE;IACVe,QAAQ,EAAE,EAAE;IACZC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AASF,eAAe,SAASC,gBAAgBA,CAAC;EACvCC,OAAO;EACPC,MAAM;EACNC,QAAQ;EACRtC;AACkB,CAAC,EAAmC;EACtD,MAAMuC,eAAe,GAAGH,OAAO,CAACI,MAAM,CAACzC,MAAM,IAC3CsC,MAAM,CAACI,QAAQ,CAAC1C,MAAM,CAAC2C,KAAK,CAC9B,CAAC;EAED,MAAMC,WAAW,GAAGP,OAAO,CAACQ,GAAG,CAAC7C,MAAM,iBACpCJ,IAAA,CAAC4B,mBAAmB;IAClBvB,KAAK,EAAEA,KAAM;IAEbD,MAAM,EAAEA,MAAO;IACfF,UAAU,EAAE0C,eAAe,CAACE,QAAQ,CAAC1C,MAAM,CAAE;IAC7CD,OAAO,EAAEwC;EAAS,GAHbvC,MAAM,CAAC2C,KAIb,CACF,CAAC;EACF,OAAO,CAACH,eAAe,EAAEI,WAAW,CAAC;AACvC","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { withTheme } from '../../core/theming';
|
|
6
|
+
import getSelectOptions from './SelectBase';
|
|
7
|
+
import { ScrollView, Panel } from '../..';
|
|
8
|
+
|
|
9
|
+
// TODO: multiselect
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
const SelectBox = ({
|
|
12
|
+
onChange,
|
|
13
|
+
options = [],
|
|
14
|
+
style,
|
|
15
|
+
theme,
|
|
16
|
+
value,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
19
|
+
const [, selectOptions] = getSelectOptions({
|
|
20
|
+
theme,
|
|
21
|
+
options,
|
|
22
|
+
values: [value],
|
|
23
|
+
onChange: handleOptionSelect
|
|
24
|
+
});
|
|
25
|
+
function handleOptionSelect(option) {
|
|
26
|
+
onChange(option.value);
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/_jsx(Panel, {
|
|
29
|
+
theme: theme,
|
|
30
|
+
variant: "cutout",
|
|
31
|
+
background: "canvas",
|
|
32
|
+
style: [styles.wrapper, style],
|
|
33
|
+
...rest,
|
|
34
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
35
|
+
theme: theme,
|
|
36
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
37
|
+
style: [styles.content, {
|
|
38
|
+
backgroundColor: theme.canvas
|
|
39
|
+
}],
|
|
40
|
+
children: selectOptions
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export default withTheme(SelectBox);
|
|
46
|
+
const styles = StyleSheet.create({
|
|
47
|
+
wrapper: {
|
|
48
|
+
paddingVertical: 4,
|
|
49
|
+
paddingHorizontal: 4
|
|
50
|
+
},
|
|
51
|
+
content: {
|
|
52
|
+
padding: 2
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=SelectBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","withTheme","getSelectOptions","ScrollView","Panel","jsx","_jsx","SelectBox","onChange","options","style","theme","value","rest","selectOptions","values","handleOptionSelect","option","variant","background","styles","wrapper","children","content","backgroundColor","canvas","create","paddingVertical","paddingHorizontal","padding"],"sourceRoot":"../../../../src","sources":["components/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,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACDL,OAAO,EAAE;IACPM,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","Select","SelectBox"],"sourceRoot":"../../../../src","sources":["components/Select/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,MAAM,QAAQ,UAAU;AAC5C,SAASD,OAAO,IAAIE,SAAS,QAAQ,aAAa","ignoreList":[]}
|