@wavemaker/app-rn-runtime 11.6.0-rc.5488 → 11.7.0-next.42251
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -9
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +6 -3
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +33 -14
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +3 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +22 -8
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +7 -0
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +5 -3
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +41 -8
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +7 -0
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +9 -10
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +13 -5
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +64 -12
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +7 -0
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +34 -25
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +4 -0
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +4 -5
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +3 -2
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js +3 -0
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +3 -1
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +4 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js +3 -0
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js +3 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +2 -0
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +2 -0
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +2 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +6 -5
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +0 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +4 -2
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js +3 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +34 -24
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +29 -16
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +0 -2
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +33 -7
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +7 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +9 -2
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +4 -2
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +27 -20
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +7 -4
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +33 -10
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js +215 -0
- app-rn-runtime/components/chart/staticdata.js.map +1 -0
- app-rn-runtime/components/container/container.component.js +11 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +6 -2
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +4 -0
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +17 -14
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +19 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +27 -2
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +6 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +7 -3
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +4 -0
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js +2 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +5 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +136 -25
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +4 -1
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +4 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +3 -0
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +13 -6
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +4 -1
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +3 -0
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +12 -4
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +2 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +7 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +4 -0
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +11 -2
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -0
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -10
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +12 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +13 -6
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +5 -1
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +18 -3
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -0
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +19 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +76 -10
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +5 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +2 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +2 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +13 -2
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -0
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +17 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +7 -2
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +7 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +5 -1
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +8 -1
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +10 -5
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +13 -1
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +17 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +13 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +48 -5
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +4 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +6 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -0
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +11 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -2
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +8 -5
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +8 -5
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +3 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -3
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +7 -0
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +7 -1
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js +84 -0
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.component.js +44 -10
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +82 -15
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/accessibility.js +149 -0
- app-rn-runtime/core/accessibility.js.map +1 -0
- app-rn-runtime/core/base.component.js +21 -3
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js +45 -0
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
- app-rn-runtime/core/components/textinput.component.js +25 -2
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/event-notifier.js +22 -1
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +37 -10
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +11 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +34 -1
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +8 -3
- app-rn-runtime/runtime/App.js +12 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +2 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +0 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +1 -1
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/theme.js +43 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +30 -6
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +2 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +14 -6
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Color","defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","linkDefaultColor","flexDirection","alignItems","text","paddingLeft","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","
|
1
|
+
{"version":3,"names":["Color","defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","linkDefaultColor","flexDirection","alignItems","overflow","text","paddingLeft","paddingRight","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","anchorTextPadding","skeleton","width","height","borderRadius","getLinkStyles","linkPrimaryColor","linkSecondaryColor","linkSuccessColor","linkDangerColor","linkWarningColor","linkInfoColor","linkLightColor","linkDarkColor"],"sources":["anchor.styles.ts"],"sourcesContent":["import Color from 'color';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAnchorStyles = BaseStyles & {\n badge: AllStyle,\n icon: WmIconStyles\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-anchor';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAnchorStyles = defineStyles({\n root: {\n color: themeVariables.linkDefaultColor,\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'visible'\n },\n text: {\n paddingLeft: 8,\n paddingRight: 8,\n color: themeVariables.linkDefaultColor,\n fontSize: 18, \n textDecorationLine: 'underline',\n },\n badge: {\n backgroundColor: Color(themeVariables.linkDefaultColor).fade(0.8).rgb().toString(),\n color: themeVariables.linkDefaultColor,\n alignSelf: 'flex-start',\n marginTop: -12,\n marginLeft: 0,\n fontWeight: 'bold'\n },\n icon: {\n root : {\n alignSelf: 'center'\n },\n text: {\n fontSize: 16,\n paddingRight: themeVariables.anchorTextPadding,\n color: themeVariables.linkDefaultColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: '100%',\n height: 20,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8\n }\n });\n\n const getLinkStyles = (color: string) => {\n return {\n root: {\n color: color\n },\n text: {\n color: color\n },\n icon: {\n text: {\n color: color\n }\n },\n badge: {\n backgroundColor: Color(color).fade(0.8).rgb().toString(),\n color: color,\n }\n } as WmAnchorStyles;\n };\n\n addStyle('link-primary', '', getLinkStyles(themeVariables.linkPrimaryColor));\n addStyle('link-secondary', '', getLinkStyles(themeVariables.linkSecondaryColor));\n addStyle('link-success', '', getLinkStyles(themeVariables.linkSuccessColor));\n addStyle('link-danger', '', getLinkStyles(themeVariables.linkDangerColor));\n addStyle('link-warning', '', getLinkStyles(themeVariables.linkWarningColor));\n addStyle('link-info', '', getLinkStyles(themeVariables.linkInfoColor));\n addStyle('link-light', '', getLinkStyles(themeVariables.linkLightColor));\n addStyle('link-dark', '', getLinkStyles(themeVariables.linkDarkColor));\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,UAAU,MAAoB,wCAAwC;AAS7E,OAAO,MAAMC,aAAa,GAAG,YAAY;AAEzCD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGN,YAAY,CAAC;IAC/CO,IAAI,EAAE;MACFC,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfP,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCO,QAAQ,EAAE,EAAE;MACZC,kBAAkB,EAAE;IACxB,CAAC;IACDC,KAAK,EAAE;MACHC,eAAe,EAAEpB,KAAK,CAACK,cAAc,CAACK,gBAAgB,CAAC,CAACW,IAAI,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;MAClFd,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCc,SAAS,EAAE,YAAY;MACvBC,SAAS,EAAE,CAAC,EAAE;MACdC,UAAU,EAAE,CAAC;MACbC,UAAU,EAAE;IAChB,CAAC;IACDC,IAAI,EA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,CAAC,aAAa,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACiC,eAAe,CAAC,CAAC;EAC1EhC,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACkC,gBAAgB,CAAC,CAAC;EAC5EjC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACmC,aAAa,CAAC,CAAC;EACtElC,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACoC,cAAc,CAAC,CAAC;EACxEnC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACqC,aAAa,CAAC,CAAC;AAC1E,CAAC,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
3
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
@@ -13,6 +14,7 @@ export default class AnimatedviewProps {
|
|
13
14
|
_defineProperty(this, "iterationCount", void 0);
|
14
15
|
_defineProperty(this, "style", void 0);
|
15
16
|
_defineProperty(this, "exitanimation", null);
|
17
|
+
_defineProperty(this, "accessibilityProps", void 0);
|
16
18
|
}
|
17
19
|
}
|
18
20
|
const AnimationMap = {
|
@@ -196,16 +198,16 @@ export class Animatedview extends React.Component {
|
|
196
198
|
}
|
197
199
|
}
|
198
200
|
render() {
|
199
|
-
return this.props.entryanimation ? /*#__PURE__*/React.createElement(Animatable.View, {
|
201
|
+
return this.props.entryanimation ? /*#__PURE__*/React.createElement(Animatable.View, _extends({
|
200
202
|
animation: this.props.entryanimation,
|
201
203
|
duration: this.props.duration,
|
202
204
|
useNativeDriver: true,
|
203
205
|
style: this.props.style,
|
204
206
|
iterationCount: this.props.iterationCount,
|
205
207
|
ref: this.handleViewRef
|
206
|
-
}, this.props.children) : /*#__PURE__*/React.createElement(View, {
|
208
|
+
}, this.props.accessibilityProps), this.props.children) : /*#__PURE__*/React.createElement(View, _extends({
|
207
209
|
style: this.props.style
|
208
|
-
}, this.props.children);
|
210
|
+
}, this.props.accessibilityProps), this.props.children);
|
209
211
|
}
|
210
212
|
}
|
211
213
|
_defineProperty(Animatedview, "defaultProps", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Animatable","initializeRegistryWithDefinitions","View","AnimatedviewProps","constructor","_defineProperty","AnimationMap","bounce","flash","pulse","rotate","rubberBand","shake","swing","tada","wobble","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","flipInX","flipInY","lightSpeedIn","slideInDown","slideInLeft","slideInRight","slideInUp","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","CustomAnimationMap","transform","rotateY","rotateX","flipOutY","flipOutX","from","translateY","to","slideOutUp","slideOutDown","opacity","fadeOutDown","fadeOutUp","Animatedview","Component","props","ref","view","triggerEntry","animate","entryanimation","duration","then","endState","finished","triggerExit","exitanimation","render","createElement","animation","useNativeDriver","style","iterationCount","handleViewRef","children"],"sources":["animatedview.component.tsx"],"sourcesContent":["import React from 'react';\nimport * as Animatable from 'react-native-animatable';\nimport { initializeRegistryWithDefinitions } from 'react-native-animatable';\nimport { View, ViewProps, ViewStyle } from 'react-native';\n\nexport default class AnimatedviewProps {\n entryanimation?: string = null as any;\n children?: any;\n duration?: number = null as any;\n iterationCount?:any;\n style?: any;\n exitanimation?: string = null as any;\n}\n\nconst AnimationMap: any = {\n bounce: 'bounce',\n flash: 'flash',\n pulse: 'pulse',\n rotate: 'rotate',\n rubberBand: 'rubberBand',\n shake: 'shake',\n swing: 'swing',\n tada: 'tada',\n wobble: 'wobble',\n bounceIn: 'bounceOut',\n bounceInDown: 'bounceOutUp',\n bounceInLeft: 'bounceOutRight',\n bounceInRight: 'bounceOutLeft',\n bounceInUp: 'bounceOutDown',\n fadeIn: 'fadeOut',\n fadeInDown: 'fadeOutUp',\n fadeInDownBig: 'fadeOutUpBig',\n fadeInLeft: 'fadeOutRight',\n fadeInLeftBig: 'fadeOutRightBig',\n fadeInRight: 'fadeOutLeft',\n fadeInRightBig: 'fadeOutLeftBig',\n fadeInUp: 'fadeOutDown',\n fadeInUpBig: 'fadeOutDownBig',\n flipInX: 'flipOutX',\n flipInY: 'flipOutY',\n lightSpeedIn: 'lightSpeedOut',\n slideInDown: 'slideOutUp',\n slideInLeft: 'slideOutRight',\n slideInRight: 'slideOutLeft',\n slideInUp: 'slideOutDown',\n zoomIn: 'zoomOut',\n zoomInDown: 'zoomOutUp',\n zoomInLeft: 'zoomOutRight',\n zoomInRight: 'zoomOutLeft',\n zoomInUp: 'zoomOutDown'\n};\n\nconst CustomAnimationMap: any = {\n flipInY: {\n 0: {\n transform: [{rotateY: \"0deg\"}]\n },\n 1: {\n transform: [{rotateY: \"360deg\"}]\n }\n },\n flipInX: {\n 0: {\n transform: [{rotateX: \"0deg\"}]\n },\n 1: {\n transform: [{rotateX: \"360deg\"}]\n }\n },\n flipOutY: {\n 0: {\n transform: [{rotateY: \"3600deg\"}]\n },\n 1: {\n transform: [{rotateY: \"0deg\"}]\n }\n },\n flipOutX: {\n 0: {\n transform: [{rotateX: \"360deg\"}]\n },\n 1: {\n transform: [{rotateX: \"0deg\"}]\n }\n },\n slideInDown : {\n from: { translateY: -20 },\n to: { translateY: 0 }\n },\n slideInUp : {\n from: { translateY: 20 },\n to: { translateY: 0 }\n },\n slideOutUp: {\n from: { translateY: 0 },\n to: { translateY: -20 }\n },\n slideOutDown : {\n from: { translateY: 0 },\n to: { translateY: 20 }\n },\n fadeInDown: {\n from: { opacity: 0, translateY: -20 },\n to: { opacity: 1, translateY: 0 }\n },\n fadeInUp: {\n from: { opacity: 0, translateY: 20 },\n to: { opacity: 1, translateY: 0 }\n },\n fadeOutDown: {\n from: { opacity: 1, translateY: 0 },\n to: { opacity: 0, translateY: 20 }\n },\n fadeOutUp: {\n from: { opacity: 1, translateY: 0 },\n to: { opacity: 0, translateY: -20 }\n }\n};\n\nexport class Animatedview extends React.Component<AnimatedviewProps> {\n static defaultProps: AnimatedviewProps = {\n duration: 200\n };\n\n private view: Animatable.View = null as any;\n\n constructor(props: AnimatedviewProps) {\n super(props);\n initializeRegistryWithDefinitions(CustomAnimationMap);\n }\n\n triggerEntry() {\n return (this as any).view.animate(this.props.entryanimation, this.props.duration).then((endState: any) => endState.finished)\n }\n\n triggerExit() {\n if (!this.view) {\n return;\n }\n if (this.props.exitanimation) {\n return (this as any).view.animate(this.props.exitanimation, this.props.duration, 1).then((endState: any) => endState.finished)\n } else {\n return (this as any).view.animate(AnimationMap[this.props.entryanimation || ''], this.props.duration, 1).then((endState: any) => endState.finished)\n }\n }\n\n // @ts-ignore\n handleViewRef = (ref: Animatable.View<ViewProps, ViewStyle>) => this.view = ref;\n\n render() {\n return this.props.entryanimation ? (\n <Animatable.View\n animation={this.props.entryanimation}\n duration={this.props.duration}\n useNativeDriver={true}\n style={this.props.style}\n iterationCount={this.props.iterationCount}\n ref={this.handleViewRef}>\n {this.props.children}\n </Animatable.View>\n ): (<View style={this.props.style}>{this.props.children}</View>);\n }\n}\n"],"mappings":"
|
1
|
+
{"version":3,"names":["React","Animatable","initializeRegistryWithDefinitions","View","AnimatedviewProps","constructor","_defineProperty","AnimationMap","bounce","flash","pulse","rotate","rubberBand","shake","swing","tada","wobble","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","flipInX","flipInY","lightSpeedIn","slideInDown","slideInLeft","slideInRight","slideInUp","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","CustomAnimationMap","transform","rotateY","rotateX","flipOutY","flipOutX","from","translateY","to","slideOutUp","slideOutDown","opacity","fadeOutDown","fadeOutUp","Animatedview","Component","props","ref","view","triggerEntry","animate","entryanimation","duration","then","endState","finished","triggerExit","exitanimation","render","createElement","_extends","animation","useNativeDriver","style","iterationCount","handleViewRef","accessibilityProps","children"],"sources":["animatedview.component.tsx"],"sourcesContent":["import React from 'react';\nimport * as Animatable from 'react-native-animatable';\nimport { initializeRegistryWithDefinitions } from 'react-native-animatable';\nimport { View, ViewProps, ViewStyle } from 'react-native';\n\nexport default class AnimatedviewProps {\n entryanimation?: string = null as any;\n children?: any;\n duration?: number = null as any;\n iterationCount?:any;\n style?: any;\n exitanimation?: string = null as any;\n accessibilityProps?: any;\n}\n\nconst AnimationMap: any = {\n bounce: 'bounce',\n flash: 'flash',\n pulse: 'pulse',\n rotate: 'rotate',\n rubberBand: 'rubberBand',\n shake: 'shake',\n swing: 'swing',\n tada: 'tada',\n wobble: 'wobble',\n bounceIn: 'bounceOut',\n bounceInDown: 'bounceOutUp',\n bounceInLeft: 'bounceOutRight',\n bounceInRight: 'bounceOutLeft',\n bounceInUp: 'bounceOutDown',\n fadeIn: 'fadeOut',\n fadeInDown: 'fadeOutUp',\n fadeInDownBig: 'fadeOutUpBig',\n fadeInLeft: 'fadeOutRight',\n fadeInLeftBig: 'fadeOutRightBig',\n fadeInRight: 'fadeOutLeft',\n fadeInRightBig: 'fadeOutLeftBig',\n fadeInUp: 'fadeOutDown',\n fadeInUpBig: 'fadeOutDownBig',\n flipInX: 'flipOutX',\n flipInY: 'flipOutY',\n lightSpeedIn: 'lightSpeedOut',\n slideInDown: 'slideOutUp',\n slideInLeft: 'slideOutRight',\n slideInRight: 'slideOutLeft',\n slideInUp: 'slideOutDown',\n zoomIn: 'zoomOut',\n zoomInDown: 'zoomOutUp',\n zoomInLeft: 'zoomOutRight',\n zoomInRight: 'zoomOutLeft',\n zoomInUp: 'zoomOutDown'\n};\n\nconst CustomAnimationMap: any = {\n flipInY: {\n 0: {\n transform: [{rotateY: \"0deg\"}]\n },\n 1: {\n transform: [{rotateY: \"360deg\"}]\n }\n },\n flipInX: {\n 0: {\n transform: [{rotateX: \"0deg\"}]\n },\n 1: {\n transform: [{rotateX: \"360deg\"}]\n }\n },\n flipOutY: {\n 0: {\n transform: [{rotateY: \"3600deg\"}]\n },\n 1: {\n transform: [{rotateY: \"0deg\"}]\n }\n },\n flipOutX: {\n 0: {\n transform: [{rotateX: \"360deg\"}]\n },\n 1: {\n transform: [{rotateX: \"0deg\"}]\n }\n },\n slideInDown : {\n from: { translateY: -20 },\n to: { translateY: 0 }\n },\n slideInUp : {\n from: { translateY: 20 },\n to: { translateY: 0 }\n },\n slideOutUp: {\n from: { translateY: 0 },\n to: { translateY: -20 }\n },\n slideOutDown : {\n from: { translateY: 0 },\n to: { translateY: 20 }\n },\n fadeInDown: {\n from: { opacity: 0, translateY: -20 },\n to: { opacity: 1, translateY: 0 }\n },\n fadeInUp: {\n from: { opacity: 0, translateY: 20 },\n to: { opacity: 1, translateY: 0 }\n },\n fadeOutDown: {\n from: { opacity: 1, translateY: 0 },\n to: { opacity: 0, translateY: 20 }\n },\n fadeOutUp: {\n from: { opacity: 1, translateY: 0 },\n to: { opacity: 0, translateY: -20 }\n }\n};\n\nexport class Animatedview extends React.Component<AnimatedviewProps> {\n static defaultProps: AnimatedviewProps = {\n duration: 200\n };\n\n private view: Animatable.View = null as any;\n\n constructor(props: AnimatedviewProps) {\n super(props);\n initializeRegistryWithDefinitions(CustomAnimationMap);\n }\n\n triggerEntry() {\n return (this as any).view.animate(this.props.entryanimation, this.props.duration).then((endState: any) => endState.finished)\n }\n\n triggerExit() {\n if (!this.view) {\n return;\n }\n if (this.props.exitanimation) {\n return (this as any).view.animate(this.props.exitanimation, this.props.duration, 1).then((endState: any) => endState.finished)\n } else {\n return (this as any).view.animate(AnimationMap[this.props.entryanimation || ''], this.props.duration, 1).then((endState: any) => endState.finished)\n }\n }\n\n // @ts-ignore\n handleViewRef = (ref: Animatable.View<ViewProps, ViewStyle>) => this.view = ref;\n\n render() {\n return this.props.entryanimation ? (\n <Animatable.View\n animation={this.props.entryanimation}\n duration={this.props.duration}\n useNativeDriver={true}\n style={this.props.style}\n iterationCount={this.props.iterationCount}\n ref={this.handleViewRef}\n {...this.props.accessibilityProps}>\n {this.props.children}\n </Animatable.View>\n ): (<View style={this.props.style} {...this.props.accessibilityProps}>{this.props.children}</View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,SAASC,iCAAiC,QAAQ,yBAAyB;AAC3E,SAASC,IAAI,QAA8B,cAAc;AAEzD,eAAe,MAAMC,iBAAiB,CAAC;EAAAC,YAAA;IAAAC,eAAA,yBACX,IAAI;IAAAA,eAAA;IAAAA,eAAA,mBAEV,IAAI;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,wBAGC,IAAI;IAAAA,eAAA;EAAA;AAE/B;AAEA,MAAMC,YAAiB,GAAG;EACxBC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE,QAAQ;EAChBC,UAAU,EAAE,YAAY;EACxBC,KAAK,EAAE,OAAO;EACdC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;E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EAAE,CAAC,CAAC,CAACC,IAAI,CAAEC,QAAa,IAAKA,QAAQ,CAACC,QAAQ,CAAC;IACrJ;EACF;EAKAG,MAAMA,CAAA,EAAG;IACP,OAAO,IAAI,CAACZ,KAAK,CAACK,cAAc,gBAC/BhE,KAAA,CAAAwE,aAAA,CAACvE,UAAU,CAACE,IAAI,EAAAsE,QAAA;MACdC,SAAS,EAAE,IAAI,CAACf,KAAK,CAACK,cAAe;MACrCC,QAAQ,EAAE,IAAI,CAACN,KAAK,CAACM,QAAS;MAC9BU,eAAe,EAAE,IAAK;MACtBC,KAAK,EAAE,IAAI,CAACjB,KAAK,CAACiB,KAAM;MACxBC,cAAc,EAAE,IAAI,CAAClB,KAAK,CAACkB,cAAe;MAC1CjB,GAAG,EAAE,IAAI,CAACkB;IAAc,GACpB,IAAI,CAACnB,KAAK,CAACoB,kBAAkB,GAC/B,IAAI,CAACpB,KAAK,CAACqB,QACG,CAAC,gBAChBhF,KAAA,CAAAwE,aAAA,CAACrE,IAAI,EAAAsE,QAAA;MAACG,KAAK,EAAE,IAAI,CAACjB,KAAK,CAACiB;IAAM,GAAK,IAAI,CAACjB,KAAK,CAACoB,kBAAkB,GAAG,IAAI,CAACpB,KAAK,CAACqB,QAAe,CAAE;EACrG;AACF;AAAC1E,eAAA,CA5CYmD,YAAY,kBACkB;EACvCQ,QAAQ,EAAE;AACZ,CAAC"}
|
@@ -9,17 +9,31 @@ import { DEFAULT_CLASS } from './button.styles';
|
|
9
9
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
10
10
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
11
11
|
import { createSkeleton } from '../skeleton/skeleton.component';
|
12
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
12
13
|
export class WmButtonState extends BaseComponentState {}
|
13
14
|
export default class WmButton extends BaseComponent {
|
14
15
|
constructor(props) {
|
15
16
|
super(props, DEFAULT_CLASS, new WmButtonProps());
|
16
17
|
}
|
17
|
-
prepareIcon(
|
18
|
-
|
18
|
+
prepareIcon(_ref) {
|
19
|
+
let {
|
20
|
+
iconclass,
|
21
|
+
iconurl,
|
22
|
+
name,
|
23
|
+
iconsize,
|
24
|
+
iconheight,
|
25
|
+
iconmargin,
|
26
|
+
iconwidth
|
27
|
+
} = _ref;
|
28
|
+
return iconclass || iconurl ? /*#__PURE__*/React.createElement(WmIcon, _extends({}, this.getTestPropsForLabel('icon'), {
|
19
29
|
styles: this.styles.icon,
|
20
|
-
name:
|
21
|
-
iconclass:
|
22
|
-
iconsize:
|
30
|
+
name: `${name}_icon`,
|
31
|
+
iconclass: iconclass,
|
32
|
+
iconsize: iconsize,
|
33
|
+
iconurl: iconurl,
|
34
|
+
iconheight: iconheight,
|
35
|
+
iconmargin: iconmargin,
|
36
|
+
iconwidth: iconwidth
|
23
37
|
})) : null;
|
24
38
|
}
|
25
39
|
prepareBadge(props) {
|
@@ -36,10 +50,26 @@ export default class WmButton extends BaseComponent {
|
|
36
50
|
});
|
37
51
|
}
|
38
52
|
renderWidget(props) {
|
39
|
-
return /*#__PURE__*/React.createElement(Animatedview, {
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animatedview, {
|
40
54
|
entryanimation: props.animation,
|
41
|
-
style: this.styles.root
|
55
|
+
style: [this.styles.root, {
|
56
|
+
paddingTop: 0,
|
57
|
+
paddingBottom: 0,
|
58
|
+
paddingLeft: 0,
|
59
|
+
paddingRight: 0,
|
60
|
+
overflow: 'hidden'
|
61
|
+
}],
|
62
|
+
accessibilityProps: {
|
63
|
+
...getAccessibilityProps(AccessibilityWidgetType.BUTTON, props)
|
64
|
+
}
|
42
65
|
}, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({
|
66
|
+
styles: {
|
67
|
+
paddingTop: this.styles.root.paddingTop,
|
68
|
+
paddingBottom: this.styles.root.paddingBottom,
|
69
|
+
paddingLeft: this.styles.root.paddingLeft,
|
70
|
+
paddingRight: this.styles.root.paddingRight
|
71
|
+
},
|
72
|
+
rippleColor: this.styles.root.rippleColor,
|
43
73
|
target: this
|
44
74
|
}, this.getTestPropsForAction()), /*#__PURE__*/React.createElement(View, {
|
45
75
|
style: [this.styles.content, {
|
@@ -47,7 +77,10 @@ export default class WmButton extends BaseComponent {
|
|
47
77
|
}]
|
48
78
|
}, props.iconposition === 'top' && this.prepareIcon(props), props.iconposition === 'left' && this.prepareIcon(props), props.caption ? /*#__PURE__*/React.createElement(Text, _extends({
|
49
79
|
style: this.styles.text
|
50
|
-
}, this.getTestPropsForLabel('caption')
|
80
|
+
}, this.getTestPropsForLabel('caption'), {
|
81
|
+
importantForAccessibility: 'no'
|
82
|
+
// accessibilityLabel={`${props.caption}`}
|
83
|
+
}), props.caption) : null, props.iconposition === 'right' && this.prepareIcon(props)))), props.badgevalue && this.prepareBadge(props));
|
51
84
|
}
|
52
85
|
}
|
53
86
|
//# sourceMappingURL=button.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","WmButtonState","WmButton","constructor","props","prepareIcon","_ref","iconclass","iconurl","name","iconsize","iconheight","iconmargin","iconwidth","createElement","_extends","getTestPropsForLabel","styles","icon","prepareBadge","style","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","Fragment","entryanimation","animation","paddingTop","paddingBottom","paddingLeft","paddingRight","overflow","accessibilityProps","BUTTON","_background","rippleColor","target","getTestPropsForAction","content","flexDirection","iconposition","caption","text","importantForAccessibility"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon({\n iconclass,\n iconurl,\n name,\n iconsize,\n iconheight,\n iconmargin,\n iconwidth,\n }: any) {\n return iconclass || iconurl\n ? (<WmIcon\n {...this.getTestPropsForLabel('icon')}\n styles={this.styles.icon} \n name={`${name}_icon`} \n iconclass={iconclass}\n iconsize={iconsize}\n iconurl={iconurl} \n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />): null;\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.styles.root.width)as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <>\n <Animatedview entryanimation={props.animation}\n style={[\n this.styles.root,\n {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n overflow: 'hidden'\n }\n ]}\n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.BUTTON,\n props\n )}}\n >\n {this._background}\n <Tappable\n styles={{\n paddingTop: this.styles.root.paddingTop,\n paddingBottom: this.styles.root.paddingBottom,\n paddingLeft: this.styles.root.paddingLeft,\n paddingRight: this.styles.root.paddingRight\n }}\n rippleColor = {this.styles.root.rippleColor}\n target={this}\n {...this.getTestPropsForAction()}>\n <View\n style={[\n this.styles.content,\n { flexDirection: props.iconposition === 'top' ? 'column' : 'row' }\n ]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (\n <Text\n style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n importantForAccessibility={'no'}\n // accessibilityLabel={`${props.caption}`}\n >\n {props.caption}\n </Text>\n ) : null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n </View>\n </Tappable>\n </Animatedview>\n {props.badgevalue && this.prepareBadge(props)}\n </>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,aAAa,SAASV,kBAAkB,CAAgB;AAIrE,eAAe,MAAMW,QAAQ,SAASZ,aAAa,CAA+C;EAEhGa,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,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,KAAK,MAAM,IAAI,IAAI,CAAC5C,WAAW,CAACD,KAAK,CAAC,EACxDA,KAAK,CAAC8C,OAAO,gBACZ/D,KAAA,CAAA2B,aAAA,CAAC1B,IAAI,EAAA2B,QAAA;MACHK,KAAK,EAAE,IAAI,CAACH,MAAM,CAACkC;IAAK,GACpB,IAAI,CAACnC,oBAAoB,CAAC,SAAS,CAAC;MACxCoC,yBAAyB,EAAE;MAC3B;IAAA,IAEChD,KAAK,CAAC8C,OACH,CAAC,GACL,IAAI,EACP9C,KAAK,CAAC6C,YAAY,KAAK,OAAO,IAAI,IAAI,CAAC5C,WAAW,CAACD,KAAK,CACrD,CACE,CACE,CAAC,EACdA,KAAK,CAACkB,UAAU,IAAI,IAAI,CAACH,YAAY,CAACf,KAAK,CAC1C,CAAC;EAEP;AACF"}
|
@@ -14,6 +14,13 @@ export default class WmButtonProps extends BaseProps {
|
|
14
14
|
_defineProperty(this, "iconsize", 0);
|
15
15
|
_defineProperty(this, "skeletonheight", null);
|
16
16
|
_defineProperty(this, "skeletonwidth", null);
|
17
|
+
_defineProperty(this, "iconurl", null);
|
18
|
+
_defineProperty(this, "iconheight", null);
|
19
|
+
_defineProperty(this, "iconwidth", null);
|
20
|
+
_defineProperty(this, "iconmargin", null);
|
21
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
22
|
+
_defineProperty(this, "hint", undefined);
|
23
|
+
_defineProperty(this, "accessibilityrole", "button");
|
17
24
|
}
|
18
25
|
}
|
19
26
|
//# sourceMappingURL=button.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmButtonProps","constructor","arguments","_defineProperty"],"sources":["button.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmButtonProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = null as any;\n badgevalue?: string = null as any;\n iconclass?: string = null as any;\n iconposition? = 'left';\n onTap?: Function = null as any;\n iconsize?:number = 0;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;
|
1
|
+
{"version":3,"names":["BaseProps","WmButtonProps","constructor","arguments","_defineProperty","undefined"],"sources":["button.props.ts"],"sourcesContent":["import {AccessibilityRole} from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmButtonProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = null as any;\n badgevalue?: string = null as any;\n iconclass?: string = null as any;\n iconposition? = 'left';\n onTap?: Function = null as any;\n iconsize?:number = 0;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = \"button\";\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC5B,IAAI;IAAAA,eAAA,kBACN,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,uBACT,MAAM;IAAAA,eAAA,gBACH,IAAI;IAAAA,eAAA,mBACJ,CAAC;IAAAA,eAAA,yBACM,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,kBACV,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;IAAAA,eAAA,6BACIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;EAAA;AACpD"}
|
@@ -5,12 +5,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
5
|
const defaultStyles = defineStyles({
|
6
6
|
root: {
|
7
7
|
minHeight: 40,
|
8
|
-
borderRadius:
|
9
|
-
paddingTop:
|
10
|
-
paddingBottom:
|
8
|
+
borderRadius: 32,
|
9
|
+
paddingTop: 12,
|
10
|
+
paddingBottom: 12,
|
11
11
|
paddingLeft: 24,
|
12
12
|
paddingRight: 24,
|
13
|
-
alignSelf: 'flex-start'
|
13
|
+
alignSelf: 'flex-start',
|
14
|
+
rippleColor: themeVariables.rippleColor
|
14
15
|
},
|
15
16
|
content: {
|
16
17
|
flexDirection: 'row',
|
@@ -22,17 +23,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
22
23
|
fontFamily: themeVariables.baseFont,
|
23
24
|
fontWeight: '500',
|
24
25
|
textAlign: 'center',
|
25
|
-
textTransform: 'capitalize'
|
26
|
-
marginHorizontal: 4
|
26
|
+
textTransform: 'capitalize'
|
27
27
|
},
|
28
28
|
badge: {
|
29
29
|
backgroundColor: themeVariables.buttonBadgeBackgroundColor,
|
30
30
|
color: themeVariables.buttonBadgeTextColor,
|
31
|
-
alignSelf: 'flex-
|
31
|
+
alignSelf: 'flex-end',
|
32
32
|
position: 'relative',
|
33
|
-
|
34
|
-
|
35
|
-
marginLeft: -16,
|
33
|
+
bottom: 60,
|
34
|
+
marginRight: 18,
|
36
35
|
borderWidth: 1,
|
37
36
|
borderStyle: 'solid'
|
38
37
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderRadius","paddingTop","paddingBottom","paddingLeft","paddingRight","alignSelf","content","flexDirection","alignItems","justifyContent","text","fontSize","fontFamily","baseFont","fontWeight","textAlign","textTransform","marginHorizontal","badge","backgroundColor","buttonBadgeBackgroundColor","color","buttonBadgeTextColor","position","top","marginLeft","borderWidth","borderStyle","icon","buttonTextPadding","skeleton","width","height","opacity","getButtonStyles","bgColor","borderColor","arguments","length","undefined","linkBtnStyle","buttonLinkColor","buttonLinkTextColor","buttonWithOnlyLabel","paddingVertical","textDecorationColor","textDecorationLine","textDecorationStyle","buttonDefaultColor","buttonDefaultTextColor","buttonBorderColor","buttonInfoColor","buttonInfoTextColor","buttonPrimaryColor","buttonPrimaryTextColor","buttonSecondaryColor","buttonSecondaryTextColor","buttonDangerColor","buttonDangerTextColor","buttonSuccessColor","buttonSuccessTextColor","buttonWarningColor","buttonWarningTextColor","buttonDarkColor","buttonDarkTextColor","buttonLightColor","buttonLightTextColor","getStyle","bottom","right","marginRight"],"sources":["button.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmButtonStyles = BaseStyles & {\n content: AllStyle,\n badge: AllStyle,\n icon: WmIconStyles,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-button';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmButtonStyles = defineStyles<WmButtonStyles>({\n root: {\n minHeight: 40,\n borderRadius: 6,\n paddingTop: 11,\n paddingBottom: 11,\n paddingLeft: 24,\n paddingRight: 24,\n alignSelf: 'flex-start'\n },\n content: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center'\n },\n text: {\n fontSize: 14,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center',\n textTransform: 'capitalize',\n marginHorizontal: 4\n },\n badge: {\n backgroundColor: themeVariables.buttonBadgeBackgroundColor,\n color: themeVariables.buttonBadgeTextColor,\n alignSelf: 'flex-start',\n position: 'relative',\n minHeight: 6,\n top: -20,\n marginLeft: -16,\n borderWidth: 1,\n borderStyle: 'solid'\n },\n icon: {\n root : {\n alignSelf: 'auto',\n paddingLeft: -8,\n paddingRight: -8\n },\n text: {\n paddingRight: themeVariables.buttonTextPadding,\n fontSize: 16\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: 96,\n height: 48,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n const getButtonStyles = (bgColor: string, color: string, borderColor = bgColor) => {\n return {\n root: {\n borderWidth: 1,\n borderColor: borderColor,\n borderStyle: 'solid',\n backgroundColor: bgColor\n },\n text: {\n color: color\n },\n badge: {\n backgroundColor: color,\n color: bgColor,\n borderColor: bgColor\n },\n icon: {\n text: {\n color: color\n }\n }\n } as WmButtonStyles;\n }\n\n const linkBtnStyle = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\nconst buttonWithOnlyLabel = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\n\n linkBtnStyle.root.paddingVertical = 4;\n linkBtnStyle.text.textDecorationColor = themeVariables.buttonLinkTextColor;\n linkBtnStyle.text.textDecorationLine = 'underline';\n linkBtnStyle.text.textDecorationStyle = 'solid';\n\n addStyle('btn-default', '', getButtonStyles(themeVariables.buttonDefaultColor, themeVariables.buttonDefaultTextColor, themeVariables.buttonBorderColor));\n addStyle('btn-info', '', getButtonStyles(themeVariables.buttonInfoColor, themeVariables.buttonInfoTextColor));\n addStyle('btn-primary', '', getButtonStyles(themeVariables.buttonPrimaryColor, themeVariables.buttonPrimaryTextColor));\n addStyle('btn-secondary', '', getButtonStyles(themeVariables.buttonSecondaryColor, themeVariables.buttonSecondaryTextColor, themeVariables.buttonSecondaryTextColor));\n addStyle('btn-danger', '', getButtonStyles(themeVariables.buttonDangerColor, themeVariables.buttonDangerTextColor));\n addStyle('btn-success', '', getButtonStyles(themeVariables.buttonSuccessColor, themeVariables.buttonSuccessTextColor));\n addStyle('btn-warning', '', getButtonStyles(themeVariables.buttonWarningColor, themeVariables.buttonWarningTextColor));\n addStyle('btn-link', '', linkBtnStyle);\n addStyle('btn-only-label', '', buttonWithOnlyLabel);\n addStyle('btn-dark', '', getButtonStyles(themeVariables.buttonDarkColor, themeVariables.buttonDarkTextColor));\n addStyle('btn-light', '', getButtonStyles(themeVariables.buttonLightColor, themeVariables.buttonLightTextColor));\n addStyle('fab-btn', 'btn-primary', {\n root : {\n ...BASE_THEME.getStyle('elevate2').root,\n position: 'fixed' as any,\n bottom: 160,\n right: 48,\n width: 56,\n height: 56,\n borderRadius: 56,\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n marginLeft: 0,\n marginRight: 0\n },\n icon: {\n icon: {\n fontSize: 24\n }\n } as WmIconStyles\n } as WmButtonStyles);\n addStyle('mini-fab-btn', 'fab-btn', {\n root : {\n width: 40,\n height: 40\n }\n } as WmButtonStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACFC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,SAAS,EAAE;IACf,CAAC;IACDC,OAAO,EAAE;MACPC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAEjB,cAAc,CAACkB,QAAQ;MACnCC,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE,QAAQ;MACnBC,aAAa,EAAE,YAAY;MAC3BC,gBAAgB,EAAE;IACpB,CAAC;IACDC,KAAK,EAAE;MACLC,eAAe,EAAExB,cAAc,CAACyB,0BAA0B;MAC1DC,KAA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CAAC;AACtB,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderRadius","paddingTop","paddingBottom","paddingLeft","paddingRight","alignSelf","rippleColor","content","flexDirection","alignItems","justifyContent","text","fontSize","fontFamily","baseFont","fontWeight","textAlign","textTransform","badge","backgroundColor","buttonBadgeBackgroundColor","color","buttonBadgeTextColor","position","bottom","marginRight","borderWidth","borderStyle","icon","buttonTextPadding","skeleton","width","height","opacity","getButtonStyles","bgColor","borderColor","arguments","length","undefined","linkBtnStyle","buttonLinkColor","buttonLinkTextColor","buttonWithOnlyLabel","paddingVertical","textDecorationColor","textDecorationLine","textDecorationStyle","buttonDefaultColor","buttonDefaultTextColor","buttonBorderColor","buttonInfoColor","buttonInfoTextColor","buttonPrimaryColor","buttonPrimaryTextColor","buttonSecondaryColor","buttonSecondaryTextColor","buttonDangerColor","buttonDangerTextColor","buttonSuccessColor","buttonSuccessTextColor","buttonWarningColor","buttonWarningTextColor","buttonDarkColor","buttonDarkTextColor","buttonLightColor","buttonLightTextColor","getStyle","right","marginLeft"],"sources":["button.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmButtonStyles = BaseStyles & {\n content: AllStyle,\n badge: AllStyle,\n icon: WmIconStyles,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-button';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmButtonStyles = defineStyles<WmButtonStyles>({\n root: {\n minHeight: 40,\n borderRadius: 32,\n paddingTop: 12,\n paddingBottom: 12,\n paddingLeft: 24,\n paddingRight: 24,\n alignSelf: 'flex-start',\n rippleColor: themeVariables.rippleColor\n },\n content: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center'\n },\n text: {\n fontSize: 14,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center',\n textTransform: 'capitalize',\n },\n badge: {\n backgroundColor: themeVariables.buttonBadgeBackgroundColor,\n color: themeVariables.buttonBadgeTextColor,\n alignSelf: 'flex-end',\n position: 'relative',\n bottom: 60 ,\n marginRight: 18,\n borderWidth: 1,\n borderStyle: 'solid',\n },\n icon: {\n root : {\n alignSelf: 'auto',\n paddingLeft: -8,\n paddingRight: -8\n },\n text: {\n paddingRight: themeVariables.buttonTextPadding,\n fontSize: 16\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: 96,\n height: 48,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n const getButtonStyles = (bgColor: string, color: string, borderColor = bgColor) => {\n return {\n root: {\n borderWidth: 1,\n borderColor: borderColor,\n borderStyle: 'solid',\n backgroundColor: bgColor\n },\n text: {\n color: color\n },\n badge: {\n backgroundColor: color,\n color: bgColor,\n borderColor: bgColor\n },\n icon: {\n text: {\n color: color\n }\n }\n } as WmButtonStyles;\n }\n\n const linkBtnStyle = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\nconst buttonWithOnlyLabel = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\n\n linkBtnStyle.root.paddingVertical = 4;\n linkBtnStyle.text.textDecorationColor = themeVariables.buttonLinkTextColor;\n linkBtnStyle.text.textDecorationLine = 'underline';\n linkBtnStyle.text.textDecorationStyle = 'solid';\n\n addStyle('btn-default', '', getButtonStyles(themeVariables.buttonDefaultColor, themeVariables.buttonDefaultTextColor, themeVariables.buttonBorderColor));\n addStyle('btn-info', '', getButtonStyles(themeVariables.buttonInfoColor, themeVariables.buttonInfoTextColor));\n addStyle('btn-primary', '', getButtonStyles(themeVariables.buttonPrimaryColor, themeVariables.buttonPrimaryTextColor));\n addStyle('btn-secondary', '', getButtonStyles(themeVariables.buttonSecondaryColor, themeVariables.buttonSecondaryTextColor, themeVariables.buttonSecondaryTextColor));\n addStyle('btn-danger', '', getButtonStyles(themeVariables.buttonDangerColor, themeVariables.buttonDangerTextColor));\n addStyle('btn-success', '', getButtonStyles(themeVariables.buttonSuccessColor, themeVariables.buttonSuccessTextColor));\n addStyle('btn-warning', '', getButtonStyles(themeVariables.buttonWarningColor, themeVariables.buttonWarningTextColor));\n addStyle('btn-link', '', linkBtnStyle);\n addStyle('btn-only-label', '', buttonWithOnlyLabel);\n addStyle('btn-dark', '', getButtonStyles(themeVariables.buttonDarkColor, themeVariables.buttonDarkTextColor));\n addStyle('btn-light', '', getButtonStyles(themeVariables.buttonLightColor, themeVariables.buttonLightTextColor));\n addStyle('fab-btn', 'btn-primary', {\n root : {\n ...BASE_THEME.getStyle('elevate2').root,\n position: 'fixed' as any,\n bottom: 160,\n right: 48,\n width: 56,\n height: 56,\n borderRadius: 56,\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n marginLeft: 0,\n marginRight: 0\n },\n icon: {\n icon: {\n fontSize: 24\n }\n } as WmIconStyles\n } as WmButtonStyles);\n addStyle('mini-fab-btn', 'fab-btn', {\n root : {\n width: 40,\n height: 40\n }\n } as WmButtonStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACFC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE,EAAE;MAChBC,UAAU,EAAE,EAAE;MACdC,aAAa,EAA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EAAE,EAAE;MACTrC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVhC,YAAY,EAAE,EAAE;MAChBU,cAAc,EAAE,QAAQ;MACxBD,UAAU,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACJ0D,UAAU,EAAE,CAAC;MACb5C,WAAW,EAAE;IACf,CAAC;IACDG,IAAI,EAAE;MACJA,IAAI,EAAE;QACJhB,QAAQ,EAAE;MACZ;IACF;EACF,CAAmB,CAAC;EACpBhB,QAAQ,CAAC,cAAc,EAAE,SAAS,EAAE;IAClCE,IAAI,EAAG;MACLiC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
|
@@ -11,7 +11,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
11
11
|
borderWidth: 1,
|
12
12
|
borderStyle: 'solid',
|
13
13
|
borderColor: themeVariables.buttonGrpBorderColor,
|
14
|
-
backgroundColor: themeVariables.buttonGrpBgColor
|
14
|
+
backgroundColor: themeVariables.buttonGrpBgColor,
|
15
|
+
overflow: 'hidden'
|
15
16
|
},
|
16
17
|
text: {},
|
17
18
|
skeleton: {
|
@@ -33,15 +34,22 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
33
34
|
backgroundColor: 'transparent',
|
34
35
|
flex: 1,
|
35
36
|
borderColor: themeVariables.buttonGrpBorderColor
|
36
|
-
},
|
37
|
-
text: {
|
38
|
-
color: themeVariables.defaultColor9
|
39
37
|
}
|
40
38
|
});
|
41
39
|
addStyle('btn-group-first-child', '', {
|
42
40
|
root: {
|
43
41
|
borderLeftWidth: 0,
|
44
|
-
|
42
|
+
borderTopLeftRadius: 28,
|
43
|
+
borderBottomLeftRadius: 28,
|
44
|
+
backgroundColor: 'transparent',
|
45
|
+
borderColor: themeVariables.buttonGrpBorderColor
|
46
|
+
}
|
47
|
+
});
|
48
|
+
addStyle('btn-group-last-child', '', {
|
49
|
+
root: {
|
50
|
+
borderRightWidth: 0,
|
51
|
+
borderTopRightRadius: 28,
|
52
|
+
borderBottomRightRadius: 28,
|
45
53
|
backgroundColor: 'transparent',
|
46
54
|
borderColor: themeVariables.buttonGrpBorderColor
|
47
55
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","borderRadius","borderWidth","borderStyle","borderColor","buttonGrpBorderColor","backgroundColor","buttonGrpBgColor","text","skeleton","width","height","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","flex","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","borderRadius","borderWidth","borderStyle","borderColor","buttonGrpBorderColor","backgroundColor","buttonGrpBgColor","overflow","text","skeleton","width","height","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","flex","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius"],"sources":["buttongroup.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '../button/button.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmButtongroupStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-buttongroup';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmButtongroupStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignSelf: 'flex-start',\n alignItems: 'center',\n borderRadius: 100,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.buttonGrpBorderColor,\n backgroundColor: themeVariables.buttonGrpBgColor,\n overflow: 'hidden'\n }, \n text: {},\n skeleton: {\n root : {\n width: '100%',\n height: 48,\n borderRadius: 4,\n borderColor: themeVariables.buttonGrpBorderColor\n }\n } as any as WmSkeletonStyles\n });\n\n\n addStyle('btn-group-child', '', {\n root: {\n borderTopWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 1,\n borderRightWidth: 0,\n borderRadius: 0,\n backgroundColor: 'transparent',\n flex: 1,\n borderColor: themeVariables.buttonGrpBorderColor,\n },\n } as WmButtonStyles);\n addStyle('btn-group-first-child', '', {\n root: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n backgroundColor: 'transparent',\n borderColor: themeVariables.buttonGrpBorderColor\n }\n } as WmButtonStyles);\n addStyle('btn-group-last-child', '', {\n root: {\n borderRightWidth: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: 'transparent',\n borderColor: themeVariables.buttonGrpBorderColor\n }\n } as WmButtonStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,YAAY;MACvBC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE,GAAG;MACjBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEV,cAAc,CAACW,oBAAoB;MAChDC,eAAe,EAAEZ,cAAc,CAACa,gBAAgB;MAChDC,QAAQ,EAAE;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACRb,IAAI,EAAG;QACLc,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVX,YAAY,EAAE,CAAC;QACfG,WAAW,EAAEV,cAAc,CAACW;MAC9B;IACF;EACJ,CAAC,CAAC;EAGFV,QAAQ,CAAC,iBAAiB,EAAE,EAAE,EAAE;IAC9BE,IAAI,EAAE;MACJgB,cAAc,EAAE,CAAC;MACjBC,iBAAiB,EAAE,CAAC;MACpBC,eAAe,EAAE,CAAC;MAClBC,gBAAgB,EAAE,CAAC;MACnBf,YAAY,EAAE,CAAC;MACfK,eAAe,EAAE,aAAa;MAC9BW,IAAI,EAAE,CAAC;MACPb,WAAW,EAAEV,cAAc,CAACW;IAC9B;EACF,CAAmB,CAAC;EACpBV,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAE;IACpCE,IAAI,EAAE;MACJkB,eAAe,EAAE,CAAC;MAClBG,mBAAmB,EAAE,EAAE;MACvBC,sBAAsB,EAAE,EAAE;MAC1Bb,eAAe,EAAE,aAAa;MAC9BF,WAAW,EAAEV,cAAc,CAACW;IAC9B;EACF,CAAmB,CAAC;EACpBV,QAAQ,CAAC,sBAAsB,EAAE,EAAE,EAAE;IACnCE,IAAI,EAAE;MACJmB,gBAAgB,EAAE,CAAC;MACnBI,oBAAoB,EAAE,EAAE;MACxBC,uBAAuB,EAAE,EAAE;MAC3Bf,eAAe,EAAE,aAAa;MAC9BF,WAAW,EAAEV,cAAc,CAACW;IAC9B;EACF,CAAmB,CAAC;EACpBV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
|
@@ -3,9 +3,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
3
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
5
|
import React from 'react';
|
6
|
-
import { Animated, Easing, Text } from 'react-native';
|
6
|
+
import { Animated, Easing, Text, Image, View } from 'react-native';
|
7
7
|
import { FontAwesome } from '@expo/vector-icons';
|
8
8
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
9
|
+
import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
10
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
9
11
|
import WmIconProps from './icon.props';
|
10
12
|
import { DEFAULT_CLASS } from './icon.styles';
|
11
13
|
import WavIcon from './wavicon/wavicon.component';
|
@@ -28,6 +30,7 @@ export default class WmIcon extends BaseComponent {
|
|
28
30
|
_defineProperty(this, "spinValue", new Animated.Value(0));
|
29
31
|
_defineProperty(this, "pulseValue", new Animated.Value(0));
|
30
32
|
_defineProperty(this, "stopAnimation", true);
|
33
|
+
_defineProperty(this, "_iconSource", null);
|
31
34
|
}
|
32
35
|
getIconDef(iconClass) {
|
33
36
|
const iconDef = {
|
@@ -111,15 +114,63 @@ export default class WmIcon extends BaseComponent {
|
|
111
114
|
height: this.props.skeletonheight || this.props.iconsize || this.styles.root.height
|
112
115
|
});
|
113
116
|
}
|
117
|
+
getElementToShow(props, iconSrc) {
|
118
|
+
const {
|
119
|
+
iconmargin,
|
120
|
+
iconheight,
|
121
|
+
iconwidth
|
122
|
+
} = props;
|
123
|
+
let width, height;
|
124
|
+
let elementToshow, source;
|
125
|
+
if (iconwidth) width = iconwidth;else if (iconheight) width = iconheight;else width = 12;
|
126
|
+
if (iconheight) height = iconheight;else if (iconwidth) height = iconwidth;else height = 12;
|
127
|
+
if (isFullPathUrl(iconSrc)) {
|
128
|
+
source = {
|
129
|
+
uri: iconSrc
|
130
|
+
};
|
131
|
+
} else {
|
132
|
+
source = iconSrc;
|
133
|
+
}
|
134
|
+
elementToshow = /*#__PURE__*/React.createElement(Image, {
|
135
|
+
testID: this.getTestId('icon'),
|
136
|
+
style: {
|
137
|
+
margin: iconmargin ?? 0,
|
138
|
+
height: height,
|
139
|
+
width: width
|
140
|
+
},
|
141
|
+
source: source
|
142
|
+
});
|
143
|
+
return elementToshow;
|
144
|
+
}
|
145
|
+
loadIcon(iconImage) {
|
146
|
+
if (!iconImage || !this.loadAsset) {
|
147
|
+
return null;
|
148
|
+
}
|
149
|
+
const iconImageSrc = this.loadAsset(iconImage);
|
150
|
+
if (iconImageSrc && typeof iconImageSrc !== 'function') {
|
151
|
+
return iconImageSrc;
|
152
|
+
}
|
153
|
+
return null;
|
154
|
+
}
|
114
155
|
renderIcon(props) {
|
156
|
+
let iconJsx = null;
|
157
|
+
this._iconSource = this._iconSource || this.loadIcon(props.iconurl);
|
158
|
+
const iconSrc = this._iconSource;
|
159
|
+
if (iconSrc) {
|
160
|
+
return this.getElementToShow(props, iconSrc);
|
161
|
+
}
|
115
162
|
const iconDef = this.state.iconDef;
|
116
163
|
if (!iconDef) {
|
117
164
|
return null;
|
118
165
|
}
|
119
|
-
|
166
|
+
const {
|
167
|
+
root,
|
168
|
+
text,
|
169
|
+
icon
|
170
|
+
} = this.styles;
|
120
171
|
const style = [{
|
121
|
-
color:
|
122
|
-
},
|
172
|
+
color: root.color || text.color
|
173
|
+
}, icon, {
|
123
174
|
transform: [{
|
124
175
|
rotate: iconDef.rotate
|
125
176
|
}]
|
@@ -128,7 +179,7 @@ export default class WmIcon extends BaseComponent {
|
|
128
179
|
const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;
|
129
180
|
if (props.show && iconDef && iconDef.isFontAwesome) {
|
130
181
|
//@ts-ignore type information is not matching
|
131
|
-
|
182
|
+
iconJsx = /*#__PURE__*/React.createElement(FontAwesome, {
|
132
183
|
name: customIcon ? '' : iconDef.type,
|
133
184
|
style: style,
|
134
185
|
size: iconSize
|
@@ -144,13 +195,13 @@ export default class WmIcon extends BaseComponent {
|
|
144
195
|
return null;
|
145
196
|
}
|
146
197
|
//@ts-ignore type information is not matching
|
147
|
-
|
198
|
+
iconJsx = WMCustomIcon ? /*#__PURE__*/React.createElement(WMCustomIcon, {
|
148
199
|
name: customIcon ? '' : iconDef.type,
|
149
200
|
style: style,
|
150
201
|
size: iconSize
|
151
202
|
}, customIcon) : null;
|
152
203
|
}
|
153
|
-
if (
|
204
|
+
if (iconJsx && iconDef.animation === 'spin') {
|
154
205
|
const rotate = this.spinValue.interpolate({
|
155
206
|
inputRange: [0, 1],
|
156
207
|
outputRange: ['0deg', '360deg']
|
@@ -163,8 +214,8 @@ export default class WmIcon extends BaseComponent {
|
|
163
214
|
this.stopAnimation = false;
|
164
215
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
165
216
|
style: animation
|
166
|
-
},
|
167
|
-
} else if (
|
217
|
+
}, iconJsx);
|
218
|
+
} else if (iconJsx && iconDef.animation === 'pulse') {
|
168
219
|
const opacity = this.spinValue.interpolate({
|
169
220
|
inputRange: [0, 1],
|
170
221
|
outputRange: [0, 1]
|
@@ -175,17 +226,18 @@ export default class WmIcon extends BaseComponent {
|
|
175
226
|
this.stopAnimation = false;
|
176
227
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
177
228
|
style: animation
|
178
|
-
},
|
229
|
+
}, iconJsx);
|
179
230
|
} else {
|
180
231
|
this.stopAnimation = true;
|
181
232
|
}
|
182
|
-
return
|
233
|
+
return /*#__PURE__*/React.createElement(View, getAccessibilityProps(AccessibilityWidgetType.ICON, this.props), iconJsx);
|
183
234
|
}
|
184
235
|
renderWidget(props) {
|
185
236
|
let icon = this.renderIcon(props);
|
186
237
|
let iterationCount = props.iterationcount ? props.iterationcount != 'infinite' ? parseInt(props.iterationcount) : 'infinite' : undefined;
|
187
238
|
return /*#__PURE__*/React.createElement(Tappable, _extends({
|
188
|
-
target: this
|
239
|
+
target: this,
|
240
|
+
rippleColor: this.styles.root.rippleColor
|
189
241
|
}, this.getTestPropsForAction()), /*#__PURE__*/React.createElement(Animatedview, {
|
190
242
|
entryanimation: props.animation,
|
191
243
|
style: this.styles.root,
|