@hitachivantara/uikit-react-lab 2.6.18
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/CHANGELOG.md +2334 -0
- package/LICENSE.txt +201 -0
- package/README.md +11 -0
- package/dist/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/AppSwitcherPanel/Action/Action.js +255 -0
- package/dist/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/AppSwitcherPanel/Action/index.js +21 -0
- package/dist/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/AppSwitcherPanel/Action/styles.js +91 -0
- package/dist/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.js +230 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/AppSwitcherPanel/index.js +21 -0
- package/dist/AppSwitcherPanel/index.js.map +1 -0
- package/dist/AppSwitcherPanel/styles.js +83 -0
- package/dist/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/CodeEditor/CodeEditor.js +144 -0
- package/dist/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/CodeEditor/index.d.ts +2 -0
- package/dist/CodeEditor/index.js +16 -0
- package/dist/CodeEditor/index.js.map +1 -0
- package/dist/CodeEditor/styles.js +53 -0
- package/dist/CodeEditor/styles.js.map +1 -0
- package/dist/Footer/Footer.d.ts +12 -0
- package/dist/Footer/Footer.js +67 -0
- package/dist/Footer/Footer.js.map +1 -0
- package/dist/Footer/index.d.ts +2 -0
- package/dist/Footer/index.js +16 -0
- package/dist/Footer/index.js.map +1 -0
- package/dist/Footer/styles.js +54 -0
- package/dist/Footer/styles.js.map +1 -0
- package/dist/FormComposer/FormComposer.d.ts +41 -0
- package/dist/FormComposer/FormComposer.js +258 -0
- package/dist/FormComposer/FormComposer.js.map +1 -0
- package/dist/FormComposer/index.d.ts +2 -0
- package/dist/FormComposer/index.js +16 -0
- package/dist/FormComposer/index.js.map +1 -0
- package/dist/FormComposer/styles.js +39 -0
- package/dist/FormComposer/styles.js.map +1 -0
- package/dist/Loading/Loading.d.ts +32 -0
- package/dist/Loading/Loading.js +89 -0
- package/dist/Loading/Loading.js.map +1 -0
- package/dist/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/Loading/LoadingWithDelay.js +135 -0
- package/dist/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/Loading/index.d.ts +2 -0
- package/dist/Loading/index.js +16 -0
- package/dist/Loading/index.js.map +1 -0
- package/dist/Loading/styles.js +85 -0
- package/dist/Loading/styles.js.map +1 -0
- package/dist/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/NavigationAnchors/NavigationAnchors.js +297 -0
- package/dist/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/NavigationAnchors/index.d.ts +2 -0
- package/dist/NavigationAnchors/index.js +16 -0
- package/dist/NavigationAnchors/index.js.map +1 -0
- package/dist/NavigationAnchors/styles.js +87 -0
- package/dist/NavigationAnchors/styles.js.map +1 -0
- package/dist/NotificationPanel/Notification/Notification.js +153 -0
- package/dist/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/NotificationPanel/Notification/index.js +21 -0
- package/dist/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/NotificationPanel/Notification/styles.js +73 -0
- package/dist/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/NotificationPanel/NotificationPanel.js +219 -0
- package/dist/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/NotificationPanel/Panel/Panel.js +202 -0
- package/dist/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/NotificationPanel/Panel/index.js +21 -0
- package/dist/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/NotificationPanel/Panel/styles.js +84 -0
- package/dist/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/NotificationPanel/index.d.ts +2 -0
- package/dist/NotificationPanel/index.js +16 -0
- package/dist/NotificationPanel/index.js.map +1 -0
- package/dist/NotificationPanel/styles.js +16 -0
- package/dist/NotificationPanel/styles.js.map +1 -0
- package/dist/Slider/KnobRing/KnobRing.js +26 -0
- package/dist/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/Slider/KnobRing/index.js +19 -0
- package/dist/Slider/KnobRing/index.js.map +1 -0
- package/dist/Slider/KnobRing/styles.js +40 -0
- package/dist/Slider/KnobRing/styles.js.map +1 -0
- package/dist/Slider/Slider.d.ts +133 -0
- package/dist/Slider/Slider.js +607 -0
- package/dist/Slider/Slider.js.map +1 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +16 -0
- package/dist/Slider/index.js.map +1 -0
- package/dist/Slider/styles.js +125 -0
- package/dist/Slider/styles.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/PeriodPicker.js +128 -0
- package/dist/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/index.js +21 -0
- package/dist/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/styles.js +63 -0
- package/dist/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/TimePicker/TimePicker.d.ts +77 -0
- package/dist/TimePicker/TimePicker.js +425 -0
- package/dist/TimePicker/TimePicker.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js +225 -0
- package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/index.js +21 -0
- package/dist/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/styles.js +80 -0
- package/dist/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/TimePicker/enums.js +40 -0
- package/dist/TimePicker/enums.js.map +1 -0
- package/dist/TimePicker/index.d.ts +2 -0
- package/dist/TimePicker/index.js +16 -0
- package/dist/TimePicker/index.js.map +1 -0
- package/dist/TimePicker/styles.js +113 -0
- package/dist/TimePicker/styles.js.map +1 -0
- package/dist/TimePicker/timePickerConverter.js +90 -0
- package/dist/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/TimePicker/timePickerFormatter.js +77 -0
- package/dist/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/TimePicker/timePickerUtils.js +36 -0
- package/dist/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.js +214 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.js +7 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/styles.js +83 -0
- package/dist/legacy/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js +195 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/legacy/AppSwitcherPanel/index.js +7 -0
- package/dist/legacy/AppSwitcherPanel/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/styles.js +65 -0
- package/dist/legacy/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/legacy/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/legacy/CodeEditor/CodeEditor.js +114 -0
- package/dist/legacy/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/legacy/CodeEditor/index.d.ts +2 -0
- package/dist/legacy/CodeEditor/index.js +2 -0
- package/dist/legacy/CodeEditor/index.js.map +1 -0
- package/dist/legacy/CodeEditor/styles.js +45 -0
- package/dist/legacy/CodeEditor/styles.js.map +1 -0
- package/dist/legacy/Footer/Footer.d.ts +12 -0
- package/dist/legacy/Footer/Footer.js +51 -0
- package/dist/legacy/Footer/Footer.js.map +1 -0
- package/dist/legacy/Footer/index.d.ts +2 -0
- package/dist/legacy/Footer/index.js +2 -0
- package/dist/legacy/Footer/index.js.map +1 -0
- package/dist/legacy/Footer/styles.js +44 -0
- package/dist/legacy/Footer/styles.js.map +1 -0
- package/dist/legacy/FormComposer/FormComposer.d.ts +41 -0
- package/dist/legacy/FormComposer/FormComposer.js +218 -0
- package/dist/legacy/FormComposer/FormComposer.js.map +1 -0
- package/dist/legacy/FormComposer/index.d.ts +2 -0
- package/dist/legacy/FormComposer/index.js +2 -0
- package/dist/legacy/FormComposer/index.js.map +1 -0
- package/dist/legacy/FormComposer/styles.js +31 -0
- package/dist/legacy/FormComposer/styles.js.map +1 -0
- package/dist/legacy/Loading/Loading.d.ts +32 -0
- package/dist/legacy/Loading/Loading.js +71 -0
- package/dist/legacy/Loading/Loading.js.map +1 -0
- package/dist/legacy/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/legacy/Loading/LoadingWithDelay.js +97 -0
- package/dist/legacy/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/legacy/Loading/index.d.ts +2 -0
- package/dist/legacy/Loading/index.js +2 -0
- package/dist/legacy/Loading/index.js.map +1 -0
- package/dist/legacy/Loading/styles.js +78 -0
- package/dist/legacy/Loading/styles.js.map +1 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.js +275 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/legacy/NavigationAnchors/index.d.ts +2 -0
- package/dist/legacy/NavigationAnchors/index.js +2 -0
- package/dist/legacy/NavigationAnchors/index.js.map +1 -0
- package/dist/legacy/NavigationAnchors/styles.js +70 -0
- package/dist/legacy/NavigationAnchors/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/Notification.js +119 -0
- package/dist/legacy/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/index.js +7 -0
- package/dist/legacy/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/styles.js +56 -0
- package/dist/legacy/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.js +182 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/Panel.js +166 -0
- package/dist/legacy/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/index.js +7 -0
- package/dist/legacy/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/styles.js +66 -0
- package/dist/legacy/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/index.d.ts +2 -0
- package/dist/legacy/NotificationPanel/index.js +2 -0
- package/dist/legacy/NotificationPanel/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/styles.js +9 -0
- package/dist/legacy/NotificationPanel/styles.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/KnobRing.js +15 -0
- package/dist/legacy/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/index.js +5 -0
- package/dist/legacy/Slider/KnobRing/index.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/styles.js +32 -0
- package/dist/legacy/Slider/KnobRing/styles.js.map +1 -0
- package/dist/legacy/Slider/Slider.d.ts +133 -0
- package/dist/legacy/Slider/Slider.js +583 -0
- package/dist/legacy/Slider/Slider.js.map +1 -0
- package/dist/legacy/Slider/index.d.ts +2 -0
- package/dist/legacy/Slider/index.js +2 -0
- package/dist/legacy/Slider/index.js.map +1 -0
- package/dist/legacy/Slider/styles.js +108 -0
- package/dist/legacy/Slider/styles.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js +110 -0
- package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/index.js +7 -0
- package/dist/legacy/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/styles.js +46 -0
- package/dist/legacy/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/TimePicker.d.ts +77 -0
- package/dist/legacy/TimePicker/TimePicker.js +402 -0
- package/dist/legacy/TimePicker/TimePicker.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js +207 -0
- package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/index.js +7 -0
- package/dist/legacy/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/styles.js +63 -0
- package/dist/legacy/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/enums.js +32 -0
- package/dist/legacy/TimePicker/enums.js.map +1 -0
- package/dist/legacy/TimePicker/index.d.ts +2 -0
- package/dist/legacy/TimePicker/index.js +2 -0
- package/dist/legacy/TimePicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/styles.js +96 -0
- package/dist/legacy/TimePicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerConverter.js +71 -0
- package/dist/legacy/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerFormatter.js +63 -0
- package/dist/legacy/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerUtils.js +27 -0
- package/dist/legacy/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/legacy/index.d.ts +26 -0
- package/dist/legacy/index.js +11 -0
- package/dist/legacy/index.js.map +1 -0
- package/dist/legacy/withStyleProps/WithStyleProps.js +14 -0
- package/dist/legacy/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/legacy/withStyleProps/index.js +2 -0
- package/dist/legacy/withStyleProps/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.js +177 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/modern/AppSwitcherPanel/Action/index.js +7 -0
- package/dist/modern/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/styles.js +77 -0
- package/dist/modern/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js +167 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/modern/AppSwitcherPanel/index.js +7 -0
- package/dist/modern/AppSwitcherPanel/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/styles.js +55 -0
- package/dist/modern/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/modern/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/modern/CodeEditor/CodeEditor.js +109 -0
- package/dist/modern/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/modern/CodeEditor/index.d.ts +2 -0
- package/dist/modern/CodeEditor/index.js +2 -0
- package/dist/modern/CodeEditor/index.js.map +1 -0
- package/dist/modern/CodeEditor/styles.js +43 -0
- package/dist/modern/CodeEditor/styles.js.map +1 -0
- package/dist/modern/Footer/Footer.d.ts +12 -0
- package/dist/modern/Footer/Footer.js +51 -0
- package/dist/modern/Footer/Footer.js.map +1 -0
- package/dist/modern/Footer/index.d.ts +2 -0
- package/dist/modern/Footer/index.js +2 -0
- package/dist/modern/Footer/index.js.map +1 -0
- package/dist/modern/Footer/styles.js +43 -0
- package/dist/modern/Footer/styles.js.map +1 -0
- package/dist/modern/FormComposer/FormComposer.d.ts +41 -0
- package/dist/modern/FormComposer/FormComposer.js +183 -0
- package/dist/modern/FormComposer/FormComposer.js.map +1 -0
- package/dist/modern/FormComposer/index.d.ts +2 -0
- package/dist/modern/FormComposer/index.js +2 -0
- package/dist/modern/FormComposer/index.js.map +1 -0
- package/dist/modern/FormComposer/styles.js +29 -0
- package/dist/modern/FormComposer/styles.js.map +1 -0
- package/dist/modern/Loading/Loading.d.ts +32 -0
- package/dist/modern/Loading/Loading.js +72 -0
- package/dist/modern/Loading/Loading.js.map +1 -0
- package/dist/modern/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/modern/Loading/LoadingWithDelay.js +92 -0
- package/dist/modern/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/modern/Loading/index.d.ts +2 -0
- package/dist/modern/Loading/index.js +2 -0
- package/dist/modern/Loading/index.js.map +1 -0
- package/dist/modern/Loading/styles.js +76 -0
- package/dist/modern/Loading/styles.js.map +1 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.js +243 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/modern/NavigationAnchors/index.d.ts +2 -0
- package/dist/modern/NavigationAnchors/index.js +2 -0
- package/dist/modern/NavigationAnchors/index.js.map +1 -0
- package/dist/modern/NavigationAnchors/styles.js +61 -0
- package/dist/modern/NavigationAnchors/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/Notification.js +90 -0
- package/dist/modern/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/index.js +7 -0
- package/dist/modern/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/styles.js +45 -0
- package/dist/modern/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/modern/NotificationPanel/NotificationPanel.js +153 -0
- package/dist/modern/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/Panel.js +133 -0
- package/dist/modern/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/index.js +7 -0
- package/dist/modern/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/styles.js +56 -0
- package/dist/modern/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/index.d.ts +2 -0
- package/dist/modern/NotificationPanel/index.js +2 -0
- package/dist/modern/NotificationPanel/index.js.map +1 -0
- package/dist/modern/NotificationPanel/styles.js +9 -0
- package/dist/modern/NotificationPanel/styles.js.map +1 -0
- package/dist/modern/Slider/KnobRing/KnobRing.js +17 -0
- package/dist/modern/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/modern/Slider/KnobRing/index.js +5 -0
- package/dist/modern/Slider/KnobRing/index.js.map +1 -0
- package/dist/modern/Slider/KnobRing/styles.js +34 -0
- package/dist/modern/Slider/KnobRing/styles.js.map +1 -0
- package/dist/modern/Slider/Slider.d.ts +133 -0
- package/dist/modern/Slider/Slider.js +542 -0
- package/dist/modern/Slider/Slider.js.map +1 -0
- package/dist/modern/Slider/index.d.ts +2 -0
- package/dist/modern/Slider/index.js +2 -0
- package/dist/modern/Slider/index.js.map +1 -0
- package/dist/modern/Slider/styles.js +99 -0
- package/dist/modern/Slider/styles.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js +88 -0
- package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/index.js +7 -0
- package/dist/modern/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/styles.js +37 -0
- package/dist/modern/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/TimePicker.d.ts +77 -0
- package/dist/modern/TimePicker/TimePicker.js +394 -0
- package/dist/modern/TimePicker/TimePicker.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js +186 -0
- package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/index.js +7 -0
- package/dist/modern/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/styles.js +54 -0
- package/dist/modern/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/enums.js +32 -0
- package/dist/modern/TimePicker/enums.js.map +1 -0
- package/dist/modern/TimePicker/index.d.ts +2 -0
- package/dist/modern/TimePicker/index.js +2 -0
- package/dist/modern/TimePicker/index.js.map +1 -0
- package/dist/modern/TimePicker/styles.js +87 -0
- package/dist/modern/TimePicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/timePickerConverter.js +66 -0
- package/dist/modern/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/modern/TimePicker/timePickerFormatter.js +62 -0
- package/dist/modern/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/modern/TimePicker/timePickerUtils.js +26 -0
- package/dist/modern/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/modern/index.d.ts +26 -0
- package/dist/modern/index.js +11 -0
- package/dist/modern/index.js.map +1 -0
- package/dist/modern/withStyleProps/WithStyleProps.js +10 -0
- package/dist/modern/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/modern/withStyleProps/index.js +2 -0
- package/dist/modern/withStyleProps/index.js.map +1 -0
- package/dist/withStyleProps/WithStyleProps.js +25 -0
- package/dist/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/withStyleProps/index.js +16 -0
- package/dist/withStyleProps/index.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
export interface HvLoadingProps
|
|
5
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvLoadingClassKey> {
|
|
6
|
+
/**
|
|
7
|
+
* The size of the loading indicator.
|
|
8
|
+
*/
|
|
9
|
+
size?: "regular" | "small";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The position where the loading indicator is to be positioned in,
|
|
13
|
+
* center of the page or inline in the container where its inserted.
|
|
14
|
+
*/
|
|
15
|
+
position?: "center" | "inline";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The text to be displayed.
|
|
19
|
+
*/
|
|
20
|
+
text?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HvLoadingClassKey =
|
|
24
|
+
| "input"
|
|
25
|
+
| "characterCounter"
|
|
26
|
+
| "inline"
|
|
27
|
+
| "separator"
|
|
28
|
+
| "maxCharacter"
|
|
29
|
+
| "currentCounter"
|
|
30
|
+
| "disabled";
|
|
31
|
+
|
|
32
|
+
export default function HvLoading(props: HvLoadingProps): JSX.Element | null;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import isEmpty from "lodash/isEmpty";
|
|
5
|
+
import { withStyles } from "@material-ui/core";
|
|
6
|
+
import { HvTypography, withDeprecated } from "@hitachivantara/uikit-react-core";
|
|
7
|
+
import styles from "./styles";
|
|
8
|
+
/**
|
|
9
|
+
* A Loading Component component, still in development.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const Loading = ({
|
|
13
|
+
classes,
|
|
14
|
+
size,
|
|
15
|
+
position,
|
|
16
|
+
text
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: clsx(classes.loading, {
|
|
20
|
+
"center": classes.centerPosition,
|
|
21
|
+
"inline": classes.inlinePosition
|
|
22
|
+
}[position])
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: clsx(classes.loadingBar, size)
|
|
25
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: clsx(classes.loadingBar, size)
|
|
27
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: clsx(classes.loadingBar, size)
|
|
29
|
+
})), !isEmpty(text) ? /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: classes.loadingText
|
|
31
|
+
}, /*#__PURE__*/React.createElement(HvTypography, {
|
|
32
|
+
variant: "normalText"
|
|
33
|
+
}, text)) : null);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
process.env.NODE_ENV !== "production" ? Loading.propTypes = {
|
|
37
|
+
/**
|
|
38
|
+
* Styles applied to the Drawer Paper element.
|
|
39
|
+
*/
|
|
40
|
+
classes: PropTypes.PropTypes.shape({
|
|
41
|
+
loadingBar: PropTypes.string,
|
|
42
|
+
loadingText: PropTypes.string,
|
|
43
|
+
loading: PropTypes.string,
|
|
44
|
+
centerPosition: PropTypes.string,
|
|
45
|
+
inlinePosition: PropTypes.string
|
|
46
|
+
}).isRequired,
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The size of the loading indicator.
|
|
50
|
+
*/
|
|
51
|
+
size: PropTypes.oneOf(["regular", "small"]),
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The position where the loading indicator is to be positioned in,
|
|
55
|
+
* center of the page or inline in the container where its inserted.
|
|
56
|
+
*/
|
|
57
|
+
position: PropTypes.oneOf(["center", "inline"]),
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The text to be displayed.
|
|
61
|
+
*/
|
|
62
|
+
text: PropTypes.string
|
|
63
|
+
} : void 0;
|
|
64
|
+
Loading.defaultProps = {
|
|
65
|
+
size: "regular",
|
|
66
|
+
position: "center",
|
|
67
|
+
text: ""
|
|
68
|
+
};
|
|
69
|
+
export default withDeprecated(withStyles(styles, {
|
|
70
|
+
name: "HvLoading"
|
|
71
|
+
})(Loading), "Please use the Loading component in the Core Package");
|
|
72
|
+
//# sourceMappingURL=Loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.js","names":["React","PropTypes","clsx","isEmpty","withStyles","HvTypography","withDeprecated","styles","Loading","classes","size","position","text","loading","centerPosition","inlinePosition","loadingBar","loadingText","propTypes","shape","string","isRequired","oneOf","defaultProps","name"],"sources":["../../../src/Loading/Loading.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport isEmpty from \"lodash/isEmpty\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvTypography, withDeprecated } from \"@hitachivantara/uikit-react-core\";\nimport styles from \"./styles\";\n\n/**\n * A Loading Component component, still in development.\n */\nconst Loading = ({ classes, size, position, text }) => {\n return (\n <div\n className={clsx(classes.loading, {\n [classes.centerPosition]: position === \"center\",\n [classes.inlinePosition]: position === \"inline\",\n })}\n >\n <div>\n <div className={clsx(classes.loadingBar, size)} />\n <div className={clsx(classes.loadingBar, size)} />\n <div className={clsx(classes.loadingBar, size)} />\n </div>\n {!isEmpty(text) ? (\n <div className={classes.loadingText}>\n <HvTypography variant=\"normalText\">{text}</HvTypography>\n </div>\n ) : null}\n </div>\n );\n};\n\nLoading.propTypes = {\n /**\n * Styles applied to the Drawer Paper element.\n */\n classes: PropTypes.PropTypes.shape({\n loadingBar: PropTypes.string,\n loadingText: PropTypes.string,\n loading: PropTypes.string,\n centerPosition: PropTypes.string,\n inlinePosition: PropTypes.string,\n }).isRequired,\n /**\n * The size of the loading indicator.\n */\n size: PropTypes.oneOf([\"regular\", \"small\"]),\n /**\n * The position where the loading indicator is to be positioned in,\n * center of the page or inline in the container where its inserted.\n */\n position: PropTypes.oneOf([\"center\", \"inline\"]),\n /**\n * The text to be displayed.\n */\n text: PropTypes.string,\n};\n\nLoading.defaultProps = {\n size: \"regular\",\n position: \"center\",\n text: \"\",\n};\n\nexport default withDeprecated(\n withStyles(styles, { name: \"HvLoading\" })(Loading),\n \"Please use the Loading component in the Core Package\"\n);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,kCAA7C;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;AACA,MAAMC,OAAO,GAAG,CAAC;EAAEC,OAAF;EAAWC,IAAX;EAAiBC,QAAjB;EAA2BC;AAA3B,CAAD,KAAuC;EACrD,oBACE;IACE,SAAS,EAAEV,IAAI,CAACO,OAAO,CAACI,OAAT;MAC0B,QAD1B,EACZJ,OAAO,CAACK,cADI;MAE0B,QAF1B,EAEZL,OAAO,CAACM;IAFI,EACaJ,QADb;EADjB,gBAME,8CACE;IAAK,SAAS,EAAET,IAAI,CAACO,OAAO,CAACO,UAAT,EAAqBN,IAArB;EAApB,EADF,eAEE;IAAK,SAAS,EAAER,IAAI,CAACO,OAAO,CAACO,UAAT,EAAqBN,IAArB;EAApB,EAFF,eAGE;IAAK,SAAS,EAAER,IAAI,CAACO,OAAO,CAACO,UAAT,EAAqBN,IAArB;EAApB,EAHF,CANF,EAWG,CAACP,OAAO,CAACS,IAAD,CAAR,gBACC;IAAK,SAAS,EAAEH,OAAO,CAACQ;EAAxB,gBACE,oBAAC,YAAD;IAAc,OAAO,EAAC;EAAtB,GAAoCL,IAApC,CADF,CADD,GAIG,IAfN,CADF;AAmBD,CApBD;;AAsBA,wCAAAJ,OAAO,CAACU,SAAR,GAAoB;EAClB;AACF;AACA;EACET,OAAO,EAAER,SAAS,CAACA,SAAV,CAAoBkB,KAApB,CAA0B;IACjCH,UAAU,EAAEf,SAAS,CAACmB,MADW;IAEjCH,WAAW,EAAEhB,SAAS,CAACmB,MAFU;IAGjCP,OAAO,EAAEZ,SAAS,CAACmB,MAHc;IAIjCN,cAAc,EAAEb,SAAS,CAACmB,MAJO;IAKjCL,cAAc,EAAEd,SAAS,CAACmB;EALO,CAA1B,EAMNC,UAVe;;EAWlB;AACF;AACA;EACEX,IAAI,EAAET,SAAS,CAACqB,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,CAAhB,CAdY;;EAelB;AACF;AACA;AACA;EACEX,QAAQ,EAAEV,SAAS,CAACqB,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CAnBQ;;EAoBlB;AACF;AACA;EACEV,IAAI,EAAEX,SAAS,CAACmB;AAvBE,CAApB;AA0BAZ,OAAO,CAACe,YAAR,GAAuB;EACrBb,IAAI,EAAE,SADe;EAErBC,QAAQ,EAAE,QAFW;EAGrBC,IAAI,EAAE;AAHe,CAAvB;AAMA,eAAeN,cAAc,CAC3BF,UAAU,CAACG,MAAD,EAAS;EAAEiB,IAAI,EAAE;AAAR,CAAT,CAAV,CAA0ChB,OAA1C,CAD2B,EAE3B,sDAF2B,CAA7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
import { HvLoadingProps } from "./Loading";
|
|
4
|
+
|
|
5
|
+
export interface HvLoadingWithDelayProps extends HvLoadingProps {
|
|
6
|
+
/**
|
|
7
|
+
* The amount of milliseconds that the component should wait before showing the Loading
|
|
8
|
+
*/
|
|
9
|
+
delay?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function HvLoadingWithDelay(props: HvLoadingWithDelayProps): JSX.Element | null;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
const _excluded = ["delay"];
|
|
3
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
4
|
+
import React, { useState, useEffect } from "react";
|
|
5
|
+
import { withStyles } from "@material-ui/core";
|
|
6
|
+
import PropTypes from "prop-types";
|
|
7
|
+
import { withDeprecated } from "@hitachivantara/uikit-react-core";
|
|
8
|
+
import Loading from "./Loading";
|
|
9
|
+
import styles from "./styles";
|
|
10
|
+
|
|
11
|
+
const LoadingWithDelay = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
delay = 0
|
|
14
|
+
} = _ref,
|
|
15
|
+
loadingProps = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
|
|
17
|
+
const [shouldDisplay, setShouldDisplay] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const timer = setTimeout(() => setShouldDisplay(true), delay);
|
|
20
|
+
return () => {
|
|
21
|
+
clearTimeout(timer);
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
return shouldDisplay && /*#__PURE__*/React.createElement(Loading, loadingProps);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
process.env.NODE_ENV !== "production" ? LoadingWithDelay.propTypes = {
|
|
28
|
+
/**
|
|
29
|
+
* Styles applied to the Drawer Paper element.
|
|
30
|
+
*/
|
|
31
|
+
classes: PropTypes.PropTypes.shape({
|
|
32
|
+
/**
|
|
33
|
+
* The class applied on the text area input box.
|
|
34
|
+
*/
|
|
35
|
+
input: PropTypes.string,
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The class applied on the character counter.
|
|
39
|
+
*/
|
|
40
|
+
characterCounter: PropTypes.string,
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The class controlling the layout of the counter.
|
|
44
|
+
*/
|
|
45
|
+
inline: PropTypes.string,
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The class applied to the separator element of the character counter.
|
|
49
|
+
*/
|
|
50
|
+
separator: PropTypes.string,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The class applied to the max counter element of the character counter.
|
|
54
|
+
*/
|
|
55
|
+
maxCharacter: PropTypes.string,
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The class applied to the current counter element of the character counter.
|
|
59
|
+
*/
|
|
60
|
+
currentCounter: PropTypes.string,
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The class applied to the character counter when it is disabled.
|
|
64
|
+
*/
|
|
65
|
+
disabled: PropTypes.string
|
|
66
|
+
}).isRequired,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The size of the loading indicator.
|
|
70
|
+
*/
|
|
71
|
+
size: PropTypes.oneOf(["regular", "small"]),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The position where the loading indicator is to be positioned in,
|
|
75
|
+
* center of the page or inline in the container where its inserted.
|
|
76
|
+
*/
|
|
77
|
+
position: PropTypes.oneOf(["center", "inline"]),
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The text to be displayed.
|
|
81
|
+
*/
|
|
82
|
+
text: PropTypes.string,
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The amount of milliseconds that the component should wait before showing the Loading
|
|
86
|
+
*/
|
|
87
|
+
delay: PropTypes.number
|
|
88
|
+
} : void 0;
|
|
89
|
+
export default withDeprecated(withStyles(styles, {
|
|
90
|
+
name: "HvLoadingWithDelay"
|
|
91
|
+
})(LoadingWithDelay), "Please use the Loading component in the Core Package");
|
|
92
|
+
//# sourceMappingURL=LoadingWithDelay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingWithDelay.js","names":["React","useState","useEffect","withStyles","PropTypes","withDeprecated","Loading","styles","LoadingWithDelay","delay","loadingProps","shouldDisplay","setShouldDisplay","timer","setTimeout","clearTimeout","propTypes","classes","shape","input","string","characterCounter","inline","separator","maxCharacter","currentCounter","disabled","isRequired","size","oneOf","position","text","number","name"],"sources":["../../../src/Loading/LoadingWithDelay.js"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { withStyles } from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport { withDeprecated } from \"@hitachivantara/uikit-react-core\";\nimport Loading from \"./Loading\";\nimport styles from \"./styles\";\n\nconst LoadingWithDelay = ({ delay = 0, ...loadingProps }) => {\n const [shouldDisplay, setShouldDisplay] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => setShouldDisplay(true), delay);\n\n return () => {\n clearTimeout(timer);\n };\n }, []);\n\n return shouldDisplay && <Loading {...loadingProps} />;\n};\n\nLoadingWithDelay.propTypes = {\n /**\n * Styles applied to the Drawer Paper element.\n */\n classes: PropTypes.PropTypes.shape({\n /**\n * The class applied on the text area input box.\n */\n input: PropTypes.string,\n /**\n * The class applied on the character counter.\n */\n characterCounter: PropTypes.string,\n /**\n * The class controlling the layout of the counter.\n */\n inline: PropTypes.string,\n /**\n * The class applied to the separator element of the character counter.\n */\n separator: PropTypes.string,\n /**\n * The class applied to the max counter element of the character counter.\n */\n maxCharacter: PropTypes.string,\n /**\n * The class applied to the current counter element of the character counter.\n */\n currentCounter: PropTypes.string,\n /**\n * The class applied to the character counter when it is disabled.\n */\n disabled: PropTypes.string,\n }).isRequired,\n /**\n * The size of the loading indicator.\n */\n size: PropTypes.oneOf([\"regular\", \"small\"]),\n /**\n * The position where the loading indicator is to be positioned in,\n * center of the page or inline in the container where its inserted.\n */\n position: PropTypes.oneOf([\"center\", \"inline\"]),\n /**\n * The text to be displayed.\n */\n text: PropTypes.string,\n /**\n * The amount of milliseconds that the component should wait before showing the Loading\n */\n delay: PropTypes.number,\n};\n\nexport default withDeprecated(\n withStyles(styles, { name: \"HvLoadingWithDelay\" })(LoadingWithDelay),\n \"Please use the Loading component in the Core Package\"\n);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA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,SAAS,CAACyB,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,CAAhB,CArCqB;;EAsC3B;AACF;AACA;AACA;EACEC,QAAQ,EAAE1B,SAAS,CAACyB,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CA1CiB;;EA2C3B;AACF;AACA;EACEE,IAAI,EAAE3B,SAAS,CAACgB,MA9CW;;EA+C3B;AACF;AACA;EACEX,KAAK,EAAEL,SAAS,CAAC4B;AAlDU,CAA7B;AAqDA,eAAe3B,cAAc,CAC3BF,UAAU,CAACI,MAAD,EAAS;EAAE0B,IAAI,EAAE;AAAR,CAAT,CAAV,CAAmDzB,gBAAnD,CAD2B,EAE3B,sDAF2B,CAA7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Loading/index.js"],"sourcesContent":["export { default } from \"./LoadingWithDelay\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,oBAAxB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const interval = 0.11;
|
|
2
|
+
|
|
3
|
+
const styles = theme => ({
|
|
4
|
+
loading: {
|
|
5
|
+
textAlign: "center"
|
|
6
|
+
},
|
|
7
|
+
centerPosition: {
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "100%",
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center"
|
|
13
|
+
},
|
|
14
|
+
inlinePosition: {
|
|
15
|
+
marginTop: "5px"
|
|
16
|
+
},
|
|
17
|
+
loadingBar: {
|
|
18
|
+
display: "inline-block",
|
|
19
|
+
backgroundColor: theme.hv.palette.accent.acce1,
|
|
20
|
+
"&.regular": {
|
|
21
|
+
animation: "$loading-regular 1s ease-in-out infinite",
|
|
22
|
+
width: "4px",
|
|
23
|
+
height: "14px",
|
|
24
|
+
margin: "3px",
|
|
25
|
+
"&:nth-child(1)": {
|
|
26
|
+
animationDelay: "0"
|
|
27
|
+
},
|
|
28
|
+
"&:nth-child(2)": {
|
|
29
|
+
animationDelay: `${interval * 2}s`
|
|
30
|
+
},
|
|
31
|
+
"&:nth-child(3)": {
|
|
32
|
+
animationDelay: `${interval * 4}s`
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"&.small": {
|
|
36
|
+
animation: "$loading-small 1s ease-in-out infinite",
|
|
37
|
+
width: "2px",
|
|
38
|
+
height: "10px",
|
|
39
|
+
margin: "4px 2px 2px 2px",
|
|
40
|
+
"&:nth-child(1)": {
|
|
41
|
+
animationDelay: "0"
|
|
42
|
+
},
|
|
43
|
+
"&:nth-child(2)": {
|
|
44
|
+
animationDelay: `${interval}s`
|
|
45
|
+
},
|
|
46
|
+
"&:nth-child(3)": {
|
|
47
|
+
animationDelay: `${interval * 2}s`
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"@keyframes loading-regular": {
|
|
52
|
+
"0%": {
|
|
53
|
+
transform: "scale(1)",
|
|
54
|
+
backgroundColor: theme.hv.palette.accent.acce1
|
|
55
|
+
},
|
|
56
|
+
"50%": {
|
|
57
|
+
transform: "scale(1, 1.9)",
|
|
58
|
+
backgroundColor: theme.hv.palette.accent.acce3
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"@keyframes loading-small": {
|
|
62
|
+
"0%": {
|
|
63
|
+
transform: "scale(1)",
|
|
64
|
+
backgroundColor: theme.hv.palette.accent.acce1
|
|
65
|
+
},
|
|
66
|
+
"50%": {
|
|
67
|
+
transform: "scale(1, 1.9)"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
loadingText: {
|
|
71
|
+
marginTop: "20px"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export default styles;
|
|
76
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["interval","styles","theme","loading","textAlign","centerPosition","width","height","display","alignItems","justifyContent","inlinePosition","marginTop","loadingBar","backgroundColor","hv","palette","accent","acce1","animation","margin","animationDelay","transform","acce3","loadingText"],"sources":["../../../src/Loading/styles.js"],"sourcesContent":["const interval = 0.11;\n\nconst styles = (theme) => ({\n loading: {\n textAlign: \"center\",\n },\n\n centerPosition: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n\n inlinePosition: {\n marginTop: \"5px\",\n },\n\n loadingBar: {\n display: \"inline-block\",\n backgroundColor: theme.hv.palette.accent.acce1,\n\n \"&.regular\": {\n animation: \"$loading-regular 1s ease-in-out infinite\",\n width: \"4px\",\n height: \"14px\",\n margin: \"3px\",\n\n \"&:nth-child(1)\": {\n animationDelay: \"0\",\n },\n \"&:nth-child(2)\": {\n animationDelay: `${interval * 2}s`,\n },\n \"&:nth-child(3)\": {\n animationDelay: `${interval * 4}s`,\n },\n },\n\n \"&.small\": {\n animation: \"$loading-small 1s ease-in-out infinite\",\n width: \"2px\",\n height: \"10px\",\n margin: \"4px 2px 2px 2px\",\n\n \"&:nth-child(1)\": {\n animationDelay: \"0\",\n },\n \"&:nth-child(2)\": {\n animationDelay: `${interval}s`,\n },\n \"&:nth-child(3)\": {\n animationDelay: `${interval * 2}s`,\n },\n },\n },\n\n \"@keyframes loading-regular\": {\n \"0%\": {\n transform: \"scale(1)\",\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"50%\": {\n transform: \"scale(1, 1.9)\",\n backgroundColor: theme.hv.palette.accent.acce3,\n },\n },\n\n \"@keyframes loading-small\": {\n \"0%\": {\n transform: \"scale(1)\",\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"50%\": {\n transform: \"scale(1, 1.9)\",\n },\n },\n\n loadingText: {\n marginTop: \"20px\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAG,IAAjB;;AAEA,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,OAAO,EAAE;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EAmEzB,4BAA4B;IAC1B,MAAM;MACJD,SAAS,EAAE,UADP;MAEJR,eAAe,EAAEZ,KAAK,CAACa,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IAFrC,CADoB;IAK1B,OAAO;MACLI,SAAS,EAAE;IADN;EALmB,CAnEH;EA6EzBE,WAAW,EAAE;IACXZ,SAAS,EAAE;EADA;AA7EY,CAAZ,CAAf;;AAkFA,eAAeX,MAAf"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StandardProps, DrawerProps } from "@material-ui/core";
|
|
2
|
+
|
|
3
|
+
interface Option {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type HvNavigationAnchorsClassKey =
|
|
10
|
+
| "drawer"
|
|
11
|
+
| "dense"
|
|
12
|
+
| "drawerPaper"
|
|
13
|
+
| "drawerPaperPositionInherit"
|
|
14
|
+
| "listRoot"
|
|
15
|
+
| "listDense"
|
|
16
|
+
| "listItemSelected"
|
|
17
|
+
| "listItemRoot"
|
|
18
|
+
| "listItemGutters"
|
|
19
|
+
| "listItemTextSelected"
|
|
20
|
+
| "listItemTextDense";
|
|
21
|
+
|
|
22
|
+
export interface HvNavigationAnchorsProps
|
|
23
|
+
extends StandardProps<DrawerProps, HvNavigationAnchorsClassKey> {
|
|
24
|
+
/**
|
|
25
|
+
* An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied
|
|
26
|
+
*/
|
|
27
|
+
options: Option[];
|
|
28
|
+
/**
|
|
29
|
+
* True if the href location link should be applied. It will create an a element around every list item
|
|
30
|
+
*/
|
|
31
|
+
href?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the anchors are always in a fixed position
|
|
34
|
+
*/
|
|
35
|
+
floating?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Currently selected index passed from the parent.
|
|
38
|
+
*/
|
|
39
|
+
selectedIndex?: number;
|
|
40
|
+
/**
|
|
41
|
+
* The Id of the scrollable container containing displayed elements
|
|
42
|
+
*/
|
|
43
|
+
scrollElementId?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default function HvNavigationAnchors(props: HvNavigationAnchorsProps): JSX.Element | null;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { Drawer, List, ListItem, ListItemText, withStyles } from "@material-ui/core";
|
|
6
|
+
import styles from "./styles";
|
|
7
|
+
const RETRY_MAX = 5;
|
|
8
|
+
/**
|
|
9
|
+
* A navigation component to help in changing views, still in development
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class NavigationAnchors extends React.Component {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
|
|
16
|
+
_defineProperty(this, "afterLoadScrollIntoView", () => {
|
|
17
|
+
const hashValue = document.location.hash.split("#")[1] || "";
|
|
18
|
+
let ele = document.getElementById(hashValue);
|
|
19
|
+
let retry = 0;
|
|
20
|
+
this.checkRenderedInterval = setInterval(() => {
|
|
21
|
+
ele = document.getElementById(hashValue);
|
|
22
|
+
|
|
23
|
+
if (ele) {
|
|
24
|
+
ele.scrollIntoView({
|
|
25
|
+
behavior: "smooth"
|
|
26
|
+
});
|
|
27
|
+
clearInterval(this.checkRenderedInterval);
|
|
28
|
+
} else {
|
|
29
|
+
retry += 1;
|
|
30
|
+
|
|
31
|
+
if (retry === RETRY_MAX) {
|
|
32
|
+
clearInterval(this.checkRenderedInterval);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, 1000);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
_defineProperty(this, "checkScroll", () => {
|
|
39
|
+
const {
|
|
40
|
+
throttle
|
|
41
|
+
} = this.state;
|
|
42
|
+
|
|
43
|
+
if (!throttle) {
|
|
44
|
+
const selectedIndex = this.hasScrolledIntoView();
|
|
45
|
+
|
|
46
|
+
if (selectedIndex > -1) {
|
|
47
|
+
this.setState({
|
|
48
|
+
selectedIndex
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
this.setState({
|
|
53
|
+
throttle: true
|
|
54
|
+
});
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
this.setState({
|
|
57
|
+
throttle: false
|
|
58
|
+
});
|
|
59
|
+
}, 100);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
_defineProperty(this, "hasScrolledIntoView", () => {
|
|
64
|
+
const {
|
|
65
|
+
options,
|
|
66
|
+
scrollElementId
|
|
67
|
+
} = this.props; // Select last nav item if user has scrolled to bottom of page
|
|
68
|
+
|
|
69
|
+
const page = document.getElementById(scrollElementId);
|
|
70
|
+
|
|
71
|
+
if (!!page && page.scrollHeight - page.scrollTop === page.offsetHeight) {
|
|
72
|
+
return options.length - 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const bounds = this.scrollEle.getBoundingClientRect();
|
|
76
|
+
const midPoint = bounds.top + window.scrollY + bounds.height / 2; // Find index of element where top is between the top and mid point of container
|
|
77
|
+
|
|
78
|
+
for (let i = 0; i < options.length; i += 1) {
|
|
79
|
+
const ele = document.getElementById(options[i].value);
|
|
80
|
+
|
|
81
|
+
if (ele) {
|
|
82
|
+
const rect = ele.getBoundingClientRect();
|
|
83
|
+
const elemTop = rect.top + window.scrollY; // Bounding rectangle relative to the top left corner of the parent.
|
|
84
|
+
|
|
85
|
+
if (elemTop >= bounds.top + window.scrollY && elemTop <= midPoint) {
|
|
86
|
+
return i;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return -1;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
_defineProperty(this, "handleListItemClick", (event, id, index) => {
|
|
95
|
+
this.setState({
|
|
96
|
+
selectedIndex: index
|
|
97
|
+
});
|
|
98
|
+
const ele = document.getElementById(id);
|
|
99
|
+
|
|
100
|
+
if (ele) {
|
|
101
|
+
ele.scrollIntoView({
|
|
102
|
+
behavior: "smooth"
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const {
|
|
107
|
+
href,
|
|
108
|
+
onClick,
|
|
109
|
+
options
|
|
110
|
+
} = this.props;
|
|
111
|
+
|
|
112
|
+
if (!href && onClick) {
|
|
113
|
+
onClick(event, index);
|
|
114
|
+
} else if (href) {
|
|
115
|
+
window.history.pushState({}, "", `#${options[index].value}`);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
this.state = {
|
|
120
|
+
selectedIndex: props.selectedIndex || 0,
|
|
121
|
+
throttle: false
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
componentDidMount() {
|
|
126
|
+
const {
|
|
127
|
+
scrollElementId
|
|
128
|
+
} = this.props;
|
|
129
|
+
this.afterLoadScrollIntoView(); // Check if scrolled
|
|
130
|
+
|
|
131
|
+
this.scrollEle = document.getElementById(scrollElementId);
|
|
132
|
+
|
|
133
|
+
if (this.scrollEle) {
|
|
134
|
+
this.scrollEle.addEventListener("wheel", this.checkScroll);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
componentWillUnmount() {
|
|
139
|
+
if (this.scrollEle) {
|
|
140
|
+
this.scrollEle.removeEventListener("wheel", this.checkScroll);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
clearInterval(this.checkRenderedInterval);
|
|
144
|
+
} // afterLoadScrollIntoView waits for the elements to be rendered on the page
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
render() {
|
|
148
|
+
const {
|
|
149
|
+
classes,
|
|
150
|
+
options,
|
|
151
|
+
floating
|
|
152
|
+
} = this.props;
|
|
153
|
+
const {
|
|
154
|
+
selectedIndex
|
|
155
|
+
} = this.state;
|
|
156
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
157
|
+
className: clsx(classes.drawer, classes.dense),
|
|
158
|
+
variant: "persistent",
|
|
159
|
+
anchor: "left",
|
|
160
|
+
open: true,
|
|
161
|
+
classes: {
|
|
162
|
+
paper: clsx(classes.drawerPaper, !floating && classes.drawerPaperPositionInherit)
|
|
163
|
+
}
|
|
164
|
+
}, /*#__PURE__*/React.createElement(List, {
|
|
165
|
+
dense: true,
|
|
166
|
+
classes: {
|
|
167
|
+
root: classes.listRoot,
|
|
168
|
+
dense: classes.listDense
|
|
169
|
+
}
|
|
170
|
+
}, options.map((option, index) => /*#__PURE__*/React.createElement(ListItem, {
|
|
171
|
+
button: true,
|
|
172
|
+
classes: {
|
|
173
|
+
selected: classes.listItemSelected,
|
|
174
|
+
root: classes.listItemRoot,
|
|
175
|
+
gutters: classes.listItemGutters
|
|
176
|
+
},
|
|
177
|
+
key: option.key || option.label,
|
|
178
|
+
onClick: event => this.handleListItemClick(event, option.value, index),
|
|
179
|
+
selected: selectedIndex === index
|
|
180
|
+
}, /*#__PURE__*/React.createElement(ListItemText, {
|
|
181
|
+
classes: {
|
|
182
|
+
primary: clsx(selectedIndex === index && classes.listItemTextSelected),
|
|
183
|
+
dense: classes.listItemTextDense
|
|
184
|
+
},
|
|
185
|
+
primary: option.label
|
|
186
|
+
})))));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
process.env.NODE_ENV !== "production" ? NavigationAnchors.propTypes = {
|
|
192
|
+
/**
|
|
193
|
+
* Styles applied to the Drawer Paper element
|
|
194
|
+
*/
|
|
195
|
+
classes: PropTypes.instanceOf(Object).isRequired,
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied
|
|
199
|
+
*/
|
|
200
|
+
options: PropTypes.arrayOf((propValue, key, componentName, location, propFullName) => {
|
|
201
|
+
if (propValue[key].label === undefined || propValue[key].value === undefined) {
|
|
202
|
+
return new Error(`Invalid prop "${propFullName}" supplied to "${componentName}". Validation Failed.`);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return null;
|
|
206
|
+
}).isRequired,
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* True if the href location link should be applied. It will create an a element around every list item
|
|
210
|
+
*/
|
|
211
|
+
href: PropTypes.bool,
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A callback called on click of every list item, if the href is false
|
|
215
|
+
*/
|
|
216
|
+
onClick: PropTypes.func,
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Whether the anchors are always in a fixed position
|
|
220
|
+
*/
|
|
221
|
+
floating: PropTypes.bool,
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Currently selected index passed from the parent.
|
|
225
|
+
*/
|
|
226
|
+
selectedIndex: PropTypes.number,
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The Id of the scrollable container containing displayed elements
|
|
230
|
+
*/
|
|
231
|
+
scrollElementId: PropTypes.string
|
|
232
|
+
} : void 0;
|
|
233
|
+
NavigationAnchors.defaultProps = {
|
|
234
|
+
href: true,
|
|
235
|
+
onClick: undefined,
|
|
236
|
+
floating: true,
|
|
237
|
+
selectedIndex: 0,
|
|
238
|
+
scrollElementId: ""
|
|
239
|
+
};
|
|
240
|
+
export default withStyles(styles, {
|
|
241
|
+
name: "HvNavigationAnchors"
|
|
242
|
+
})(NavigationAnchors);
|
|
243
|
+
//# sourceMappingURL=NavigationAnchors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationAnchors.js","names":["React","PropTypes","clsx","Drawer","List","ListItem","ListItemText","withStyles","styles","RETRY_MAX","NavigationAnchors","Component","constructor","props","hashValue","document","location","hash","split","ele","getElementById","retry","checkRenderedInterval","setInterval","scrollIntoView","behavior","clearInterval","throttle","state","selectedIndex","hasScrolledIntoView","setState","setTimeout","options","scrollElementId","page","scrollHeight","scrollTop","offsetHeight","length","bounds","scrollEle","getBoundingClientRect","midPoint","top","window","scrollY","height","i","value","rect","elemTop","event","id","index","href","onClick","history","pushState","componentDidMount","afterLoadScrollIntoView","addEventListener","checkScroll","componentWillUnmount","removeEventListener","render","classes","floating","drawer","dense","paper","drawerPaper","drawerPaperPositionInherit","root","listRoot","listDense","map","option","selected","listItemSelected","listItemRoot","gutters","listItemGutters","key","label","handleListItemClick","primary","listItemTextSelected","listItemTextDense","propTypes","instanceOf","Object","isRequired","arrayOf","propValue","componentName","propFullName","undefined","Error","bool","func","number","string","defaultProps","name"],"sources":["../../../src/NavigationAnchors/NavigationAnchors.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { Drawer, List, ListItem, ListItemText, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\nconst RETRY_MAX = 5;\n\n/**\n * A navigation component to help in changing views, still in development\n */\nclass NavigationAnchors extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n selectedIndex: props.selectedIndex || 0,\n throttle: false,\n };\n }\n\n componentDidMount() {\n const { scrollElementId } = this.props;\n this.afterLoadScrollIntoView();\n // Check if scrolled\n this.scrollEle = document.getElementById(scrollElementId);\n if (this.scrollEle) {\n this.scrollEle.addEventListener(\"wheel\", this.checkScroll);\n }\n }\n\n componentWillUnmount() {\n if (this.scrollEle) {\n this.scrollEle.removeEventListener(\"wheel\", this.checkScroll);\n }\n clearInterval(this.checkRenderedInterval);\n }\n\n // afterLoadScrollIntoView waits for the elements to be rendered on the page\n afterLoadScrollIntoView = () => {\n const hashValue = document.location.hash.split(\"#\")[1] || \"\";\n let ele = document.getElementById(hashValue);\n\n let retry = 0;\n this.checkRenderedInterval = setInterval(() => {\n ele = document.getElementById(hashValue);\n if (ele) {\n ele.scrollIntoView({ behavior: \"smooth\" });\n clearInterval(this.checkRenderedInterval);\n } else {\n retry += 1;\n if (retry === RETRY_MAX) {\n clearInterval(this.checkRenderedInterval);\n }\n }\n }, 1000);\n };\n\n checkScroll = () => {\n const { throttle } = this.state;\n if (!throttle) {\n const selectedIndex = this.hasScrolledIntoView();\n if (selectedIndex > -1) {\n this.setState({ selectedIndex });\n }\n this.setState({\n throttle: true,\n });\n setTimeout(() => {\n this.setState({\n throttle: false,\n });\n }, 100);\n }\n };\n\n hasScrolledIntoView = () => {\n const { options, scrollElementId } = this.props;\n\n // Select last nav item if user has scrolled to bottom of page\n const page = document.getElementById(scrollElementId);\n if (!!page && page.scrollHeight - page.scrollTop === page.offsetHeight) {\n return options.length - 1;\n }\n\n const bounds = this.scrollEle.getBoundingClientRect();\n const midPoint = bounds.top + window.scrollY + bounds.height / 2;\n\n // Find index of element where top is between the top and mid point of container\n for (let i = 0; i < options.length; i += 1) {\n const ele = document.getElementById(options[i].value);\n if (ele) {\n const rect = ele.getBoundingClientRect();\n const elemTop = rect.top + window.scrollY;\n\n // Bounding rectangle relative to the top left corner of the parent.\n if (elemTop >= bounds.top + window.scrollY && elemTop <= midPoint) {\n return i;\n }\n }\n }\n return -1;\n };\n\n handleListItemClick = (event, id, index) => {\n this.setState({ selectedIndex: index });\n\n const ele = document.getElementById(id);\n if (ele) {\n ele.scrollIntoView({ behavior: \"smooth\" });\n }\n\n const { href, onClick, options } = this.props;\n if (!href && onClick) {\n onClick(event, index);\n } else if (href) {\n window.history.pushState({}, \"\", `#${options[index].value}`);\n }\n };\n\n render() {\n const { classes, options, floating } = this.props;\n const { selectedIndex } = this.state;\n\n return (\n <Drawer\n className={clsx(classes.drawer, classes.dense)}\n variant=\"persistent\"\n anchor=\"left\"\n open\n classes={{\n paper: clsx(classes.drawerPaper, {\n [classes.drawerPaperPositionInherit]: !floating,\n }),\n }}\n >\n <List\n dense\n classes={{\n root: classes.listRoot,\n dense: classes.listDense,\n }}\n >\n {options.map((option, index) => (\n <ListItem\n button\n classes={{\n selected: classes.listItemSelected,\n root: classes.listItemRoot,\n gutters: classes.listItemGutters,\n }}\n key={option.key || option.label}\n onClick={(event) => this.handleListItemClick(event, option.value, index)}\n selected={selectedIndex === index}\n >\n <ListItemText\n classes={{\n primary: clsx({\n [classes.listItemTextSelected]: selectedIndex === index,\n }),\n dense: classes.listItemTextDense,\n }}\n primary={option.label}\n />\n </ListItem>\n ))}\n </List>\n </Drawer>\n );\n }\n}\n\nNavigationAnchors.propTypes = {\n /**\n * Styles applied to the Drawer Paper element\n */\n classes: PropTypes.instanceOf(Object).isRequired,\n /**\n * An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied\n */\n options: PropTypes.arrayOf((propValue, key, componentName, location, propFullName) => {\n if (propValue[key].label === undefined || propValue[key].value === undefined) {\n return new Error(\n `Invalid prop \"${propFullName}\" supplied to \"${componentName}\". Validation Failed.`\n );\n }\n return null;\n }).isRequired,\n /**\n * True if the href location link should be applied. It will create an a element around every list item\n */\n href: PropTypes.bool,\n /**\n * A callback called on click of every list item, if the href is false\n */\n onClick: PropTypes.func,\n /**\n * Whether the anchors are always in a fixed position\n */\n floating: PropTypes.bool,\n /**\n * Currently selected index passed from the parent.\n */\n selectedIndex: PropTypes.number,\n /**\n * The Id of the scrollable container containing displayed elements\n */\n scrollElementId: PropTypes.string,\n};\n\nNavigationAnchors.defaultProps = {\n href: true,\n onClick: undefined,\n floating: true,\n selectedIndex: 0,\n scrollElementId: \"\",\n};\n\nexport default withStyles(styles, { name: \"HvNavigationAnchors\" })(NavigationAnchors);\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,QAAvB,EAAiCC,YAAjC,EAA+CC,UAA/C,QAAiE,mBAAjE;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,SAAS,GAAG,CAAlB;AAEA;AACA;AACA;;AACA,MAAMC,iBAAN,SAAgCV,KAAK,CAACW,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C,UAJV;;EAK5B;AACF;AACA;EACE3D,OAAO,EAAEhC,SAAS,CAAC4F,OAAV,CAAkB,CAACC,SAAD,EAAYX,GAAZ,EAAiBY,aAAjB,EAAgC/E,QAAhC,EAA0CgF,YAA1C,KAA2D;IACpF,IAAIF,SAAS,CAACX,GAAD,CAAT,CAAeC,KAAf,KAAyBa,SAAzB,IAAsCH,SAAS,CAACX,GAAD,CAAT,CAAelC,KAAf,KAAyBgD,SAAnE,EAA8E;MAC5E,OAAO,IAAIC,KAAJ,CACJ,iBAAgBF,YAAa,kBAAiBD,aAAc,uBADxD,CAAP;IAGD;;IACD,OAAO,IAAP;EACD,CAPQ,EAONH,UAfyB;;EAgB5B;AACF;AACA;EACErC,IAAI,EAAEtD,SAAS,CAACkG,IAnBY;;EAoB5B;AACF;AACA;EACE3C,OAAO,EAAEvD,SAAS,CAACmG,IAvBS;;EAwB5B;AACF;AACA;EACEjC,QAAQ,EAAElE,SAAS,CAACkG,IA3BQ;;EA4B5B;AACF;AACA;EACEtE,aAAa,EAAE5B,SAAS,CAACoG,MA/BG;;EAgC5B;AACF;AACA;EACEnE,eAAe,EAAEjC,SAAS,CAACqG;AAnCC,CAA9B;AAsCA5F,iBAAiB,CAAC6F,YAAlB,GAAiC;EAC/BhD,IAAI,EAAE,IADyB;EAE/BC,OAAO,EAAEyC,SAFsB;EAG/B9B,QAAQ,EAAE,IAHqB;EAI/BtC,aAAa,EAAE,CAJgB;EAK/BK,eAAe,EAAE;AALc,CAAjC;AAQA,eAAe3B,UAAU,CAACC,MAAD,EAAS;EAAEgG,IAAI,EAAE;AAAR,CAAT,CAAV,CAAoD9F,iBAApD,CAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/NavigationAnchors/index.js"],"sourcesContent":["export { default } from \"./NavigationAnchors\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,qBAAxB"}
|