@longline/aqua-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/Types.d.ts +6 -0
- package/Types.js +5 -0
- package/containers/Anchor/Anchor.d.ts +63 -0
- package/containers/Anchor/Anchor.js +113 -0
- package/containers/Anchor/index.d.ts +1 -0
- package/containers/Anchor/index.js +1 -0
- package/containers/Dock/Dock.d.ts +45 -0
- package/containers/Dock/Dock.js +61 -0
- package/containers/Dock/Dockable.d.ts +60 -0
- package/containers/Dock/Dockable.js +98 -0
- package/containers/Dock/index.d.ts +2 -0
- package/containers/Dock/index.js +2 -0
- package/containers/Form/Field.d.ts +104 -0
- package/containers/Form/Field.js +168 -0
- package/containers/Form/Form.d.ts +51 -0
- package/containers/Form/Form.js +89 -0
- package/containers/Form/Validation.d.ts +212 -0
- package/containers/Form/Validation.js +232 -0
- package/containers/Form/context/FormContext.d.ts +10 -0
- package/containers/Form/context/FormContext.js +3 -0
- package/containers/Form/context/useForm.d.ts +5 -0
- package/containers/Form/context/useForm.js +9 -0
- package/containers/Form/elements/BoxWrapper.d.ts +15 -0
- package/containers/Form/elements/BoxWrapper.js +35 -0
- package/containers/Form/elements/Hint.d.ts +21 -0
- package/containers/Form/elements/Hint.js +15 -0
- package/containers/Form/elements/Label.d.ts +22 -0
- package/containers/Form/elements/Label.js +15 -0
- package/containers/Form/elements/SimpleWrapper.d.ts +15 -0
- package/containers/Form/elements/SimpleWrapper.js +17 -0
- package/containers/GlassPane/GlassPane.d.ts +36 -0
- package/containers/GlassPane/GlassPane.js +66 -0
- package/containers/GlassPane/index.d.ts +1 -0
- package/containers/GlassPane/index.js +1 -0
- package/containers/InfoBox/InfoBox.d.ts +34 -0
- package/containers/InfoBox/InfoBox.js +45 -0
- package/containers/InfoBox/elements/Content.d.ts +23 -0
- package/containers/InfoBox/elements/Content.js +37 -0
- package/containers/InfoBox/elements/Footer.d.ts +9 -0
- package/containers/InfoBox/elements/Footer.js +24 -0
- package/containers/InfoBox/elements/Header.d.ts +9 -0
- package/containers/InfoBox/elements/Header.js +24 -0
- package/containers/List/List.d.ts +45 -0
- package/containers/List/List.js +47 -0
- package/containers/List/ListCell.d.ts +13 -0
- package/containers/List/ListCell.js +24 -0
- package/containers/List/ListRow.d.ts +15 -0
- package/containers/List/ListRow.js +24 -0
- package/containers/List/index.d.ts +3 -0
- package/containers/List/index.js +3 -0
- package/containers/Tabs/Pane.d.ts +29 -0
- package/containers/Tabs/Pane.js +45 -0
- package/containers/Tabs/Tabs.d.ts +66 -0
- package/containers/Tabs/Tabs.js +144 -0
- package/controls/Chip/Chip.d.ts +35 -0
- package/controls/Chip/Chip.js +83 -0
- package/controls/Fab/Fab.d.ts +73 -0
- package/controls/Fab/Fab.js +94 -0
- package/controls/Icon/Icon.d.ts +98 -0
- package/controls/Icon/Icon.js +79 -0
- package/controls/Icon/index.d.ts +1 -0
- package/controls/Icon/index.js +1 -0
- package/controls/Key/Key.d.ts +22 -0
- package/controls/Key/Key.js +74 -0
- package/controls/Key/index.d.ts +1 -0
- package/controls/Key/index.js +1 -0
- package/controls/LinearChart/LinearChart.d.ts +31 -0
- package/controls/LinearChart/LinearChart.js +58 -0
- package/controls/ListView/Body.d.ts +8 -0
- package/controls/ListView/Body.js +24 -0
- package/controls/ListView/Column.d.ts +55 -0
- package/controls/ListView/Column.js +8 -0
- package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +11 -0
- package/controls/ListView/ColumnsManager/ColumnDraggable.js +83 -0
- package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +12 -0
- package/controls/ListView/ColumnsManager/ColumnsManager.js +63 -0
- package/controls/ListView/ColumnsManager/OrderColumns.d.ts +11 -0
- package/controls/ListView/ColumnsManager/OrderColumns.js +62 -0
- package/controls/ListView/ColumnsManager/SourceColumns.d.ts +10 -0
- package/controls/ListView/ColumnsManager/SourceColumns.js +45 -0
- package/controls/ListView/Ghost.d.ts +9 -0
- package/controls/ListView/Ghost.js +52 -0
- package/controls/ListView/Header.d.ts +12 -0
- package/controls/ListView/Header.js +35 -0
- package/controls/ListView/HeaderButton.d.ts +8 -0
- package/controls/ListView/HeaderButton.js +8 -0
- package/controls/ListView/HeaderCell.d.ts +20 -0
- package/controls/ListView/HeaderCell.js +47 -0
- package/controls/ListView/IListViewProps.d.ts +105 -0
- package/controls/ListView/IListViewProps.js +1 -0
- package/controls/ListView/ListView.d.ts +20 -0
- package/controls/ListView/ListView.js +97 -0
- package/controls/ListView/NoData.d.ts +19 -0
- package/controls/ListView/NoData.js +30 -0
- package/controls/ListView/SortButton.d.ts +16 -0
- package/controls/ListView/SortButton.js +26 -0
- package/controls/ListView/Table.d.ts +18 -0
- package/controls/ListView/Table.js +99 -0
- package/controls/ListView/Total.d.ts +9 -0
- package/controls/ListView/Total.js +28 -0
- package/controls/ListView/sortItems.d.ts +6 -0
- package/controls/ListView/sortItems.js +35 -0
- package/controls/Mouse/Mouse.d.ts +38 -0
- package/controls/Mouse/Mouse.js +51 -0
- package/controls/Mouse/index.d.ts +1 -0
- package/controls/Mouse/index.js +1 -0
- package/controls/PrimaryButton/PrimaryButton.d.ts +63 -0
- package/controls/PrimaryButton/PrimaryButton.js +83 -0
- package/controls/PrimaryButton/index.d.ts +1 -0
- package/controls/PrimaryButton/index.js +1 -0
- package/controls/Progress/Progress.d.ts +35 -0
- package/controls/Progress/Progress.js +49 -0
- package/controls/SecondaryButton/SecondaryButton.d.ts +58 -0
- package/controls/SecondaryButton/SecondaryButton.js +73 -0
- package/controls/SecondaryButton/index.d.ts +1 -0
- package/controls/SecondaryButton/index.js +1 -0
- package/controls/TabBar/Tab.d.ts +21 -0
- package/controls/TabBar/Tab.js +25 -0
- package/controls/TabBar/TabBar.d.ts +34 -0
- package/controls/TabBar/TabBar.js +134 -0
- package/controls/TabBar/Underliner.d.ts +7 -0
- package/controls/TabBar/Underliner.js +27 -0
- package/controls/TabBar/index.d.ts +1 -0
- package/controls/TabBar/index.js +1 -0
- package/controls/TertiaryButton/TertiaryButton.d.ts +28 -0
- package/controls/TertiaryButton/TertiaryButton.js +65 -0
- package/controls/TertiaryButton/index.d.ts +1 -0
- package/controls/TertiaryButton/index.js +1 -0
- package/controls/View/View.d.ts +35 -0
- package/controls/View/View.js +58 -0
- package/formatters/Date/DateTime.d.ts +45 -0
- package/formatters/Date/DateTime.js +64 -0
- package/formatters/Date/elements/Custom.d.ts +18 -0
- package/formatters/Date/elements/Custom.js +22 -0
- package/formatters/Date/elements/Distance.d.ts +24 -0
- package/formatters/Date/elements/Distance.js +45 -0
- package/formatters/Date/elements/LongDate.d.ts +17 -0
- package/formatters/Date/elements/LongDate.js +11 -0
- package/formatters/Date/elements/LongDateTime.d.ts +14 -0
- package/formatters/Date/elements/LongDateTime.js +10 -0
- package/formatters/Date/elements/LongTime.d.ts +14 -0
- package/formatters/Date/elements/LongTime.js +10 -0
- package/formatters/Date/elements/ShortDate.d.ts +14 -0
- package/formatters/Date/elements/ShortDate.js +10 -0
- package/formatters/Date/elements/ShortDateTime.d.ts +14 -0
- package/formatters/Date/elements/ShortDateTime.js +10 -0
- package/formatters/Date/elements/ShortTime.d.ts +18 -0
- package/formatters/Date/elements/ShortTime.js +10 -0
- package/formatters/Date/elements/toDate.d.ts +2 -0
- package/formatters/Date/elements/toDate.js +13 -0
- package/formatters/Filesize/Filesize.d.ts +29 -0
- package/formatters/Filesize/Filesize.js +54 -0
- package/formatters/GIS/Latitude.d.ts +23 -0
- package/formatters/GIS/Latitude.js +13 -0
- package/formatters/GIS/Longitude.d.ts +23 -0
- package/formatters/GIS/Longitude.js +13 -0
- package/formatters/GIS/index.d.ts +2 -0
- package/formatters/GIS/index.js +2 -0
- package/formatters/GIS/toDMS.d.ts +2 -0
- package/formatters/GIS/toDMS.js +16 -0
- package/formatters/Highlight/Highlight.d.ts +22 -0
- package/formatters/Highlight/Highlight.js +32 -0
- package/formatters/Highlight/index.d.ts +1 -0
- package/formatters/Highlight/index.js +1 -0
- package/formatters/Human/Human.d.ts +18 -0
- package/formatters/Human/Human.js +34 -0
- package/formatters/Human/index.d.ts +1 -0
- package/formatters/Human/index.js +1 -0
- package/formatters/Number/Number.d.ts +24 -0
- package/formatters/Number/Number.js +36 -0
- package/formatters/Number/index.d.ts +1 -0
- package/formatters/Number/index.js +1 -0
- package/helper/DMS.d.ts +22 -0
- package/helper/DMS.js +46 -0
- package/helper/HslColor.d.ts +11 -0
- package/helper/HslColor.js +47 -0
- package/helper/RgbColor.d.ts +43 -0
- package/helper/RgbColor.js +162 -0
- package/helper/SizeHelper.d.ts +10 -0
- package/helper/SizeHelper.js +56 -0
- package/helper/darken.d.ts +8 -0
- package/helper/darken.js +18 -0
- package/helper/guard.d.ts +5 -0
- package/helper/guard.js +7 -0
- package/helper/lighten.d.ts +8 -0
- package/helper/lighten.js +11 -0
- package/helper/nameToHex.d.ts +6 -0
- package/helper/nameToHex.js +163 -0
- package/inputs/DateInput/Body.d.ts +34 -0
- package/inputs/DateInput/Body.js +50 -0
- package/inputs/DateInput/Calendar.d.ts +15 -0
- package/inputs/DateInput/Calendar.js +60 -0
- package/inputs/DateInput/DateInput.d.ts +73 -0
- package/inputs/DateInput/DateInput.js +143 -0
- package/inputs/DateInput/Day.d.ts +32 -0
- package/inputs/DateInput/Day.js +33 -0
- package/inputs/DateInput/InfiniteList.d.ts +26 -0
- package/inputs/DateInput/InfiniteList.js +87 -0
- package/inputs/DateInput/Nav.d.ts +11 -0
- package/inputs/DateInput/Nav.js +24 -0
- package/inputs/DateInput/Navbar.d.ts +16 -0
- package/inputs/DateInput/Navbar.js +33 -0
- package/inputs/DateInput/NumericInput.d.ts +14 -0
- package/inputs/DateInput/NumericInput.js +48 -0
- package/inputs/DateInput/Selector.d.ts +47 -0
- package/inputs/DateInput/Selector.js +55 -0
- package/inputs/DateInput/SimpleList.d.ts +19 -0
- package/inputs/DateInput/SimpleList.js +31 -0
- package/inputs/Dropdown/Body.d.ts +25 -0
- package/inputs/Dropdown/Body.js +14 -0
- package/inputs/Dropdown/Column.d.ts +21 -0
- package/inputs/Dropdown/Column.js +6 -0
- package/inputs/Dropdown/Dropdown.d.ts +136 -0
- package/inputs/Dropdown/Dropdown.js +446 -0
- package/inputs/Dropdown/Selection.d.ts +11 -0
- package/inputs/Dropdown/Selection.js +23 -0
- package/inputs/Dropdown/Selector.d.ts +29 -0
- package/inputs/Dropdown/Selector.js +16 -0
- package/inputs/Editor/Editor.d.ts +45 -0
- package/inputs/Editor/Editor.js +60 -0
- package/inputs/Editor/buttons/BoldButton.d.ts +7 -0
- package/inputs/Editor/buttons/BoldButton.js +7 -0
- package/inputs/Editor/buttons/BulletListButton.d.ts +7 -0
- package/inputs/Editor/buttons/BulletListButton.js +7 -0
- package/inputs/Editor/buttons/CodeBlockButton.d.ts +7 -0
- package/inputs/Editor/buttons/CodeBlockButton.js +7 -0
- package/inputs/Editor/buttons/CodeButton.d.ts +7 -0
- package/inputs/Editor/buttons/CodeButton.js +7 -0
- package/inputs/Editor/buttons/ItalicButton.d.ts +7 -0
- package/inputs/Editor/buttons/ItalicButton.js +7 -0
- package/inputs/Editor/buttons/OrderedListButton.d.ts +7 -0
- package/inputs/Editor/buttons/OrderedListButton.js +7 -0
- package/inputs/Editor/buttons/StrikethroughButton.d.ts +7 -0
- package/inputs/Editor/buttons/StrikethroughButton.js +7 -0
- package/inputs/Editor/menu/MenuBar.d.ts +9 -0
- package/inputs/Editor/menu/MenuBar.js +44 -0
- package/inputs/Editor/menu/MenuButton.d.ts +35 -0
- package/inputs/Editor/menu/MenuButton.js +34 -0
- package/inputs/Editor/menu/MenuSeparator.d.ts +7 -0
- package/inputs/Editor/menu/MenuSeparator.js +24 -0
- package/inputs/Input/Clear.d.ts +7 -0
- package/inputs/Input/Clear.js +14 -0
- package/inputs/Input/Input.d.ts +133 -0
- package/inputs/Input/Input.js +64 -0
- package/inputs/Input/InputWrapper.d.ts +23 -0
- package/inputs/Input/InputWrapper.js +57 -0
- package/inputs/Input/index.d.ts +1 -0
- package/inputs/Input/index.js +1 -0
- package/inputs/Selector/ISelectorProps.d.ts +29 -0
- package/inputs/Selector/ISelectorProps.js +1 -0
- package/inputs/Selector/Selector.d.ts +29 -0
- package/inputs/Selector/Selector.js +77 -0
- package/inputs/Selector/index.d.ts +1 -0
- package/inputs/Selector/index.js +1 -0
- package/inputs/Selector/widgets/Checkbox.d.ts +6 -0
- package/inputs/Selector/widgets/Checkbox.js +29 -0
- package/inputs/Selector/widgets/Toggle.d.ts +6 -0
- package/inputs/Selector/widgets/Toggle.js +24 -0
- package/inputs/Slider/Slider.d.ts +63 -0
- package/inputs/Slider/Slider.js +198 -0
- package/inputs/Textarea/Textarea.d.ts +79 -0
- package/inputs/Textarea/Textarea.js +65 -0
- package/main.js +32 -0
- package/map/Map/Map.d.ts +47 -0
- package/map/Map/Map.js +221 -0
- package/map/Map/index.d.ts +1 -0
- package/map/Map/index.js +1 -0
- package/map/PositionsManager/PositionBox.d.ts +14 -0
- package/map/PositionsManager/PositionBox.js +86 -0
- package/map/PositionsManager/PositionsManager.d.ts +27 -0
- package/map/PositionsManager/PositionsManager.js +99 -0
- package/map/controls/CompassButton/CompassButton.d.ts +33 -0
- package/map/controls/CompassButton/CompassButton.js +88 -0
- package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
- package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
- package/map/controls/Geocoder/Geocoder.d.ts +49 -0
- package/map/controls/Geocoder/Geocoder.js +179 -0
- package/map/controls/Geocoder/GeocoderApi.d.ts +59 -0
- package/map/controls/Geocoder/GeocoderApi.js +68 -0
- package/map/controls/Geocoder/GeocoderEntry.d.ts +15 -0
- package/map/controls/Geocoder/GeocoderEntry.js +18 -0
- package/map/controls/Geocoder/GeocoderList.d.ts +10 -0
- package/map/controls/Geocoder/GeocoderList.js +18 -0
- package/map/controls/Geocoder/GeocoderSelector.d.ts +16 -0
- package/map/controls/Geocoder/GeocoderSelector.js +25 -0
- package/map/controls/Graticule/Graticule.d.ts +35 -0
- package/map/controls/Graticule/Graticule.js +142 -0
- package/map/controls/MapLoader/MapLoader.d.ts +33 -0
- package/map/controls/MapLoader/MapLoader.js +73 -0
- package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
- package/map/controls/ScaleControl/ScaleControl.js +107 -0
- package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
- package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
- package/map/controls/base/MapButton/Hint.d.ts +17 -0
- package/map/controls/base/MapButton/Hint.js +34 -0
- package/map/controls/base/MapButton/MapButton.d.ts +46 -0
- package/map/controls/base/MapButton/MapButton.js +71 -0
- package/map/controls/base/MapButton/index.d.ts +1 -0
- package/map/controls/base/MapButton/index.js +1 -0
- package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +17 -0
- package/map/controls/base/MapButtonGroup/MapButtonGroup.js +24 -0
- package/map/controls/base/MapControl/MapControl.d.ts +36 -0
- package/map/controls/base/MapControl/MapControl.js +77 -0
- package/map/controls/base/MapControl/index.d.ts +1 -0
- package/map/controls/base/MapControl/index.js +1 -0
- package/map/layers/ClusterLayer/ClusterLayer.d.ts +79 -0
- package/map/layers/ClusterLayer/ClusterLayer.js +118 -0
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +51 -0
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +151 -0
- package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/ContoursFragmentShader.js +2 -0
- package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/ContoursVertexShader.js +2 -0
- package/map/layers/InterpolationLayer/IGradientStop.d.ts +5 -0
- package/map/layers/InterpolationLayer/IGradientStop.js +1 -0
- package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +35 -0
- package/map/layers/InterpolationLayer/InterpolationLayer.js +256 -0
- package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/LevelsFragmentShader.js +2 -0
- package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/LevelsVertexShader.js +2 -0
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +2 -0
- package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +40 -0
- package/map/layers/ParticlesLayer/ParticlesLayer.js +337 -0
- package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/ParticlesVertexShader.js +2 -0
- package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/UVFragmentShader.js +2 -0
- package/map/layers/ParticlesLayer/UVVertexShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/UVVertexShader.js +2 -0
- package/map/markers/ClusterMarker/ClusterMarker.d.ts +36 -0
- package/map/markers/ClusterMarker/ClusterMarker.js +99 -0
- package/map/markers/ClusterMarker/index.d.ts +1 -0
- package/map/markers/ClusterMarker/index.js +1 -0
- package/map/markers/RiskMarker/RiskMarker.d.ts +22 -0
- package/map/markers/RiskMarker/RiskMarker.js +61 -0
- package/modules/MainMenu/Item.d.ts +42 -0
- package/modules/MainMenu/Item.js +94 -0
- package/modules/MainMenu/MainMenu.d.ts +20 -0
- package/modules/MainMenu/MainMenu.js +41 -0
- package/modules/MainMenu/index.d.ts +1 -0
- package/modules/MainMenu/index.js +1 -0
- package/modules/Root/Content.d.ts +16 -0
- package/modules/Root/Content.js +25 -0
- package/modules/Root/Overlay.d.ts +23 -0
- package/modules/Root/Overlay.js +33 -0
- package/modules/Root/Root.d.ts +7 -0
- package/modules/Root/Root.js +45 -0
- package/modules/Root/Shader.d.ts +15 -0
- package/modules/Root/Shader.js +24 -0
- package/modules/Root/Sidebar.d.ts +13 -0
- package/modules/Root/Sidebar.js +24 -0
- package/modules/Root/stories/SampleContent.d.ts +7 -0
- package/modules/Root/stories/SampleContent.js +44 -0
- package/package.json +64 -0
- package/services/Dialog/AlertDialog.d.ts +31 -0
- package/services/Dialog/AlertDialog.js +29 -0
- package/services/Dialog/ConfirmDialog.d.ts +34 -0
- package/services/Dialog/ConfirmDialog.js +30 -0
- package/services/Dialog/Dialog.d.ts +91 -0
- package/services/Dialog/Dialog.js +92 -0
- package/services/Dialog/DialogBackground.d.ts +7 -0
- package/services/Dialog/DialogBackground.js +12 -0
- package/services/Dialog/DialogContent.d.ts +25 -0
- package/services/Dialog/DialogContent.js +38 -0
- package/services/Dialog/DialogFooter.d.ts +24 -0
- package/services/Dialog/DialogFooter.js +50 -0
- package/services/Dialog/DialogHeader.d.ts +18 -0
- package/services/Dialog/DialogHeader.js +36 -0
- package/services/Dialog/DialogWindow.d.ts +13 -0
- package/services/Dialog/DialogWindow.js +12 -0
- package/services/Dialog/XhrDialog.d.ts +34 -0
- package/services/Dialog/XhrDialog.js +321 -0
- package/services/Toast/IToastMessage.d.ts +10 -0
- package/services/Toast/IToastMessage.js +1 -0
- package/services/Toast/IToastProps.d.ts +23 -0
- package/services/Toast/IToastProps.js +1 -0
- package/services/Toast/Toast.d.ts +21 -0
- package/services/Toast/Toast.js +79 -0
- package/services/Toast/ToastContainer.d.ts +40 -0
- package/services/Toast/ToastContainer.js +65 -0
- package/services/Toast/ToastContext.d.ts +22 -0
- package/services/Toast/ToastContext.js +7 -0
- package/services/Toast/ToastProvider.d.ts +19 -0
- package/services/Toast/ToastProvider.js +67 -0
- package/services/Toast/index.d.ts +2 -0
- package/services/Toast/index.js +2 -0
- package/services/Toast/useToast.d.ts +5 -0
- package/services/Toast/useToast.js +9 -0
- package/spritemap.svg +1 -0
- package/styles/NormalTheme.d.ts +3 -0
- package/styles/NormalTheme.js +65 -0
- package/styles/StyleBase.d.ts +2 -0
- package/styles/StyleBase.js +8 -0
- package/styles/StyleReset.d.ts +2 -0
- package/styles/StyleReset.js +8 -0
- package/svg/editor/index.d.ts +10 -0
- package/svg/editor/index.js +11 -0
- package/svg/file/index.d.ts +5 -0
- package/svg/file/index.js +6 -0
- package/svg/icons/index.d.ts +36 -0
- package/svg/icons/index.js +37 -0
- package/svg/index.d.ts +11 -0
- package/svg/index.js +5 -0
- package/svg/menu/index.d.ts +8 -0
- package/svg/menu/index.js +9 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Button content. Can be JSX. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* A disabled button cannot be interacted with.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Fired when the button is clicked.
|
|
14
|
+
*/
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The `TertiaryButton` is connected to a specific area or component such as
|
|
19
|
+
* an `InfoBox`. It renders as a `<button>` element.
|
|
20
|
+
*
|
|
21
|
+
* The component's `children` are the button content. Any text will be
|
|
22
|
+
* capitalized.
|
|
23
|
+
*
|
|
24
|
+
* There is no support for icons (although the React children of the component
|
|
25
|
+
* could force one in).
|
|
26
|
+
*/
|
|
27
|
+
declare const TertiaryButton: ({ disabled, ...props }: IProps) => React.JSX.Element;
|
|
28
|
+
export { TertiaryButton, IProps };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import * as React from 'react';
|
|
28
|
+
import styled, { css } from 'styled-components';
|
|
29
|
+
var TertiaryButtonBase = function (props) {
|
|
30
|
+
var handleClick = function () {
|
|
31
|
+
if (props.disabled)
|
|
32
|
+
return;
|
|
33
|
+
if (props.onClick)
|
|
34
|
+
props.onClick();
|
|
35
|
+
};
|
|
36
|
+
return (React.createElement("button", { className: props.className, onClick: handleClick }, props.children));
|
|
37
|
+
};
|
|
38
|
+
var TertiaryButtonStyled = styled(TertiaryButtonBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject([" \n // Size:\n height: 42px;\n min-width: 92px;\n padding-left: 16px; // TODO: Check this\n padding-right: 16px; // TODO: Check this\n\n // Font\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n border-radius: ", "px;\n transition: background-color ease-in-out ", "ms, box-shadow ease-in-out ", "ms;\n border: none;\n cursor: pointer;\n text-transform: uppercase;\n user-select: none;\n outline: none;\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-wrap: no-wrap;\n white-space: nowrap;\n \n // Shadow:\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n &:active {\n ", " \n }\n\n // Disabled:\n ", "\n"], [" \n // Size:\n height: 42px;\n min-width: 92px;\n padding-left: 16px; // TODO: Check this\n padding-right: 16px; // TODO: Check this\n\n // Font\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n border-radius: ", "px;\n transition: background-color ease-in-out ", "ms, box-shadow ease-in-out ", "ms;\n border: none;\n cursor: pointer;\n text-transform: uppercase;\n user-select: none;\n outline: none;\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-wrap: no-wrap;\n white-space: nowrap;\n \n // Shadow:\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n &:active {\n ", " \n }\n\n // Disabled:\n ", "\n"
|
|
39
|
+
/**
|
|
40
|
+
* The `TertiaryButton` is connected to a specific area or component such as
|
|
41
|
+
* an `InfoBox`. It renders as a `<button>` element.
|
|
42
|
+
*
|
|
43
|
+
* The component's `children` are the button content. Any text will be
|
|
44
|
+
* capitalized.
|
|
45
|
+
*
|
|
46
|
+
* There is no support for icons (although the React children of the component
|
|
47
|
+
* could force one in).
|
|
48
|
+
*/
|
|
49
|
+
])), function (p) { return p.theme.font.labelSmall; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.shadows.medium; }, function (p) { return p.theme.shadows.large; }, function (p) { return !p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n box-shadow: none;\n "], ["\n background-color: ", ";\n box-shadow: none;\n "])), p.theme.colors.neutral[95]); }, function (p) { return p.disabled && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n cursor: auto;\n box-shadow: none;\n pointer-events: none;\n "], ["\n background-color: ", ";\n cursor: auto;\n box-shadow: none;\n pointer-events: none;\n "])), p.theme.colors.neutral[50]); });
|
|
50
|
+
/**
|
|
51
|
+
* The `TertiaryButton` is connected to a specific area or component such as
|
|
52
|
+
* an `InfoBox`. It renders as a `<button>` element.
|
|
53
|
+
*
|
|
54
|
+
* The component's `children` are the button content. Any text will be
|
|
55
|
+
* capitalized.
|
|
56
|
+
*
|
|
57
|
+
* There is no support for icons (although the React children of the component
|
|
58
|
+
* could force one in).
|
|
59
|
+
*/
|
|
60
|
+
var TertiaryButton = function (_a) {
|
|
61
|
+
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, props = __rest(_a, ["disabled"]);
|
|
62
|
+
return React.createElement(TertiaryButtonStyled, __assign({ disabled: disabled }, props));
|
|
63
|
+
};
|
|
64
|
+
export { TertiaryButton };
|
|
65
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TertiaryButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TertiaryButton';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* The `View`'s children are its value. Can be JSX.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* `View` label, e.g. `Email address`. Can be JSX.
|
|
12
|
+
*/
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Views may provide their weight in relative units to other Views,
|
|
16
|
+
* for flexbox alignment, e.g. `2`.
|
|
17
|
+
*/
|
|
18
|
+
weight?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Is this `View` in ghost mode? Value (i.e. `children`) will not be
|
|
21
|
+
* displayed.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
ghost?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A `View` is used to display static (read-only) data. A `View` has a label, and its
|
|
28
|
+
* children are its value.
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <View label="Email address">{email}</View>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare const View: ({ ghost, ...props }: IProps) => React.JSX.Element;
|
|
35
|
+
export { View };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import * as React from 'react';
|
|
28
|
+
import styled, { css } from 'styled-components';
|
|
29
|
+
import { Label } from '../../containers/Form/elements/Label';
|
|
30
|
+
var ViewBase = function (props) {
|
|
31
|
+
return (React.createElement("div", { className: props.className },
|
|
32
|
+
React.createElement(Label, null, props.label),
|
|
33
|
+
!props.ghost && props.children));
|
|
34
|
+
};
|
|
35
|
+
var ViewStyled = styled(ViewBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n margin-bottom: 8px;\n height: 80px;\n z-index: 0; // for :before\n padding-left: 12px;\n padding-right: 12px;\n\n // Appearance:\n border-radius: ", "px;\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: start;\n overflow: hidden;\n\n // Hint/error background:\n &:before {\n z-index: -1;\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n right: 0;\n height: 22px;\n background: ", ";\n }\n\n ", " {\n position: absolute;\n left: 12px;\n right: 12px;\n top: 10px;\n color: ", ";\n }\n\n // Ghost state:\n ", "\n\n // Views may provide their weight in relative units to other fields.\n ", "\n"], ["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n margin-bottom: 8px;\n height: 80px;\n z-index: 0; // for :before\n padding-left: 12px;\n padding-right: 12px;\n\n // Appearance:\n border-radius: ", "px;\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: start;\n overflow: hidden;\n\n // Hint/error background:\n &:before {\n z-index: -1;\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n right: 0;\n height: 22px;\n background: ", ";\n }\n\n ", " {\n position: absolute;\n left: 12px;\n right: 12px;\n top: 10px;\n color: ", ";\n }\n\n // Ghost state:\n ", "\n\n // Views may provide their weight in relative units to other fields.\n ", "\n"
|
|
36
|
+
/**
|
|
37
|
+
* A `View` is used to display static (read-only) data. A `View` has a label, and its
|
|
38
|
+
* children are its value.
|
|
39
|
+
*
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <View label="Email address">{email}</View>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
])), function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.font.bodyMedium; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[2]; }, Label, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.ghost && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n outline: dashed 1px ", ";\n background-color: transparent;\n color: transparent;\n text-shadow: 0 0 3px rgb(from ", " r g b / 50%);\n pointer-events: none;\n user-select: none;\n \n ", " {\n color: transparent;\n text-shadow: 0 0 3px rgb(from ", " r g b / 50%);\n } \n "], ["\n outline: dashed 1px ", ";\n background-color: transparent;\n color: transparent;\n text-shadow: 0 0 3px rgb(from ", " r g b / 50%);\n pointer-events: none;\n user-select: none;\n \n ", " {\n color: transparent;\n text-shadow: 0 0 3px rgb(from ", " r g b / 50%);\n } \n "])), p.theme.colors.primary[2], function (p) { return p.theme.colors.neutral[100]; }, Label, function (p) { return p.theme.colors.neutral[100]; }); }, function (p) { return p.weight && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["flex: ", ""], ["flex: ", ""])), p.weight); });
|
|
45
|
+
/**
|
|
46
|
+
* A `View` is used to display static (read-only) data. A `View` has a label, and its
|
|
47
|
+
* children are its value.
|
|
48
|
+
*
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <View label="Email address">{email}</View>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
var View = function (_a) {
|
|
54
|
+
var _b = _a.ghost, ghost = _b === void 0 ? false : _b, props = __rest(_a, ["ghost"]);
|
|
55
|
+
return React.createElement(ViewStyled, __assign({ ghost: ghost }, props));
|
|
56
|
+
};
|
|
57
|
+
export { View };
|
|
58
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from "date-fns";
|
|
3
|
+
type TType = 'longdate' | 'shortdate' | 'longdatetime' | 'shortdatetime' | 'longtime' | 'shorttime' | 'fuzzydistance' | 'strictdistance' | 'custom';
|
|
4
|
+
interface IProps {
|
|
5
|
+
/**
|
|
6
|
+
* Preset format.
|
|
7
|
+
* @default longdate
|
|
8
|
+
*/
|
|
9
|
+
type?: TType;
|
|
10
|
+
/**
|
|
11
|
+
* Input date. This can either be a `Date` or a `string`.
|
|
12
|
+
*/
|
|
13
|
+
value: string | Date;
|
|
14
|
+
/**
|
|
15
|
+
* Optional `Locale`. This is a locale from https://date-fns.org/v4.1.0/docs/I18n.
|
|
16
|
+
*/
|
|
17
|
+
locale?: Locale;
|
|
18
|
+
/**
|
|
19
|
+
* Optional custom format string.
|
|
20
|
+
*/
|
|
21
|
+
format?: string;
|
|
22
|
+
/**
|
|
23
|
+
* If set, distance formatting will be animated.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
animated?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* `DateTime` formats a date or time to a string.
|
|
30
|
+
*
|
|
31
|
+
* If the input date fails to parse (in case of a `string`), or isn't a valid date (in case of a `Date`),
|
|
32
|
+
* then the formatter falls back to today's date/time. An input of `null` is not rendered at all.
|
|
33
|
+
*
|
|
34
|
+
* If `animated` is set, then date distances will be updated every second.
|
|
35
|
+
*
|
|
36
|
+
* Optionally, a `locale` is supported:
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { es } from 'date-fns/locale'
|
|
40
|
+
*
|
|
41
|
+
* <DateTime type='longdate' value='1992-03-08' locale={es}/>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const DateTime: ({ type, animated, ...props }: IProps) => React.JSX.Element;
|
|
45
|
+
export { DateTime, IProps };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import * as React from 'react';
|
|
24
|
+
import { ShortDate } from "./elements/ShortDate";
|
|
25
|
+
import { LongDate } from "./elements/LongDate";
|
|
26
|
+
import { DistanceDate } from "./elements/Distance";
|
|
27
|
+
import { ShortDateTime } from "./elements/ShortDateTime";
|
|
28
|
+
import { LongDateTime } from "./elements/LongDateTime";
|
|
29
|
+
import { LongTime } from './elements/LongTime';
|
|
30
|
+
import { ShortTime } from './elements/ShortTime';
|
|
31
|
+
import { Custom } from "./elements/Custom";
|
|
32
|
+
/**
|
|
33
|
+
* `DateTime` formats a date or time to a string.
|
|
34
|
+
*
|
|
35
|
+
* If the input date fails to parse (in case of a `string`), or isn't a valid date (in case of a `Date`),
|
|
36
|
+
* then the formatter falls back to today's date/time. An input of `null` is not rendered at all.
|
|
37
|
+
*
|
|
38
|
+
* If `animated` is set, then date distances will be updated every second.
|
|
39
|
+
*
|
|
40
|
+
* Optionally, a `locale` is supported:
|
|
41
|
+
*
|
|
42
|
+
* ```tsx
|
|
43
|
+
* import { es } from 'date-fns/locale'
|
|
44
|
+
*
|
|
45
|
+
* <DateTime type='longdate' value='1992-03-08' locale={es}/>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
var DateTime = function (_a) {
|
|
49
|
+
var _b = _a.type, type = _b === void 0 ? 'longdate' : _b, _c = _a.animated, animated = _c === void 0 ? false : _c, props = __rest(_a, ["type", "animated"]);
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'longdate': return React.createElement(LongDate, __assign({}, props));
|
|
52
|
+
case 'shortdate': return React.createElement(ShortDate, __assign({}, props));
|
|
53
|
+
case 'longdatetime': return React.createElement(LongDateTime, __assign({}, props));
|
|
54
|
+
case 'shortdatetime': return React.createElement(ShortDateTime, __assign({}, props));
|
|
55
|
+
case 'longtime': return React.createElement(LongTime, __assign({}, props));
|
|
56
|
+
case 'shorttime': return React.createElement(ShortTime, __assign({}, props));
|
|
57
|
+
case 'fuzzydistance': return React.createElement(DistanceDate, __assign({ animated: animated }, props));
|
|
58
|
+
case 'strictdistance': return React.createElement(DistanceDate, __assign({ animated: animated, strict: true }, props));
|
|
59
|
+
case 'custom': return React.createElement(Custom, __assign({}, props));
|
|
60
|
+
default:
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export { DateTime };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date/time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Format string.
|
|
10
|
+
*/
|
|
11
|
+
format?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional locale.
|
|
14
|
+
*/
|
|
15
|
+
locale?: Locale;
|
|
16
|
+
}
|
|
17
|
+
declare const Custom: ({ format, ...props }: IProps) => React.JSX.Element;
|
|
18
|
+
export { Custom, IProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { format as dFormat } from 'date-fns';
|
|
14
|
+
import { toDate } from './toDate';
|
|
15
|
+
var Custom = function (_a) {
|
|
16
|
+
var _b = _a.format, format = _b === void 0 ? "dd-MM-yyyy" : _b, props = __rest(_a, ["format"]);
|
|
17
|
+
if (props.value == null)
|
|
18
|
+
return null;
|
|
19
|
+
var date = toDate(props.value);
|
|
20
|
+
return React.createElement(React.Fragment, null, dFormat(date, format, props.locale ? { locale: props.locale } : {}));
|
|
21
|
+
};
|
|
22
|
+
export { Custom };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date/time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
/**
|
|
13
|
+
* A strict formatter does not use helpers like 'almost', 'over',
|
|
14
|
+
* 'less than' and the like.
|
|
15
|
+
*/
|
|
16
|
+
strict?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* If set, value gets updated every second.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
animated?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const DistanceDate: ({ animated, ...props }: IProps) => React.JSX.Element;
|
|
24
|
+
export { DistanceDate, IProps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { format, formatDistanceToNow, formatDistanceToNowStrict } from 'date-fns';
|
|
14
|
+
import { toDate } from './toDate';
|
|
15
|
+
var DistanceDate = function (_a) {
|
|
16
|
+
var _b = _a.animated, animated = _b === void 0 ? false : _b, props = __rest(_a, ["animated"]);
|
|
17
|
+
var interval = React.useRef(null);
|
|
18
|
+
var _c = React.useState(0), timestamp = _c[0], setTimestamp = _c[1];
|
|
19
|
+
// Create an interval every second.
|
|
20
|
+
React.useEffect(function () {
|
|
21
|
+
if (interval.current != null)
|
|
22
|
+
clearInterval(interval.current);
|
|
23
|
+
if (animated)
|
|
24
|
+
interval.current = window.setInterval(update, 1000);
|
|
25
|
+
return function () {
|
|
26
|
+
if (interval.current != null)
|
|
27
|
+
clearInterval(interval.current);
|
|
28
|
+
};
|
|
29
|
+
}, [animated]);
|
|
30
|
+
var update = function () {
|
|
31
|
+
// Force the component to rerender by updating its state.
|
|
32
|
+
setTimestamp(Date.now());
|
|
33
|
+
};
|
|
34
|
+
if (props.value == null)
|
|
35
|
+
return null;
|
|
36
|
+
var date = toDate(props.value);
|
|
37
|
+
var options = {
|
|
38
|
+
includeSeconds: true, // If false, only minutes are shown
|
|
39
|
+
addSuffix: true // Add "ago"
|
|
40
|
+
};
|
|
41
|
+
if (props.locale)
|
|
42
|
+
options.locale = props.locale;
|
|
43
|
+
return (React.createElement("span", { title: format(date, 'eeee, d MMMM yyyy', props.locale ? { locale: props.locale } : {}) }, props.strict ? formatDistanceToNowStrict(date, options) : formatDistanceToNow(date, options)));
|
|
44
|
+
};
|
|
45
|
+
export { DistanceDate };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}
|
|
13
|
+
declare const LongDate: {
|
|
14
|
+
(props: IProps): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export { LongDate, IProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var LongDate = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", { title: format(date, 'eeee, d MMMM yyyy', props.locale ? { locale: props.locale } : {}) }, format(date, 'eee, d MMMM yyyy', props.locale ? { locale: props.locale } : {})));
|
|
9
|
+
};
|
|
10
|
+
LongDate.displayName = "Date.Long";
|
|
11
|
+
export { LongDate };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date/time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}
|
|
13
|
+
declare const LongDateTime: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export { LongDateTime, IProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var LongDateTime = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", { title: format(date, 'eeee, d MMMM yyyy HH:mm:ss', props.locale ? { locale: props.locale } : {}) }, format(date, 'eee, d MMMM yyyy HH:mm:ss', props.locale ? { locale: props.locale } : {})));
|
|
9
|
+
};
|
|
10
|
+
export { LongDateTime };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}
|
|
13
|
+
declare const LongTime: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export { LongTime, IProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var LongTime = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", null, format(date, 'HH:mm:ss')));
|
|
9
|
+
};
|
|
10
|
+
export { LongTime };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}
|
|
13
|
+
declare const ShortDate: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export { ShortDate, IProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var ShortDate = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", { title: format(date, 'eeee, d MMMM yyyy', props.locale ? { locale: props.locale } : {}) }, format(date, 'dd-MM-yyyy', props.locale ? { locale: props.locale } : {})));
|
|
9
|
+
};
|
|
10
|
+
export { ShortDate };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Date/time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}
|
|
13
|
+
declare const ShortDateTime: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export { ShortDateTime, IProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var ShortDateTime = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", { title: format(date, 'eeee, d MMMM yyyy HH:mm:ss', props.locale ? { locale: props.locale } : {}) }, format(date, 'dd-MM-yyyy HH:mm:ss', props.locale ? { locale: props.locale } : {})));
|
|
9
|
+
};
|
|
10
|
+
export { ShortDateTime };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/**
|
|
5
|
+
* Time to format.
|
|
6
|
+
*/
|
|
7
|
+
value: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional locale.
|
|
10
|
+
*/
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
/**
|
|
13
|
+
* Seconds are shown if set.
|
|
14
|
+
*/
|
|
15
|
+
seconds?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const ShortTime: (props: IProps) => React.JSX.Element;
|
|
18
|
+
export { ShortTime, IProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { toDate } from './toDate';
|
|
4
|
+
var ShortTime = function (props) {
|
|
5
|
+
if (props.value == null)
|
|
6
|
+
return null;
|
|
7
|
+
var date = toDate(props.value);
|
|
8
|
+
return (React.createElement("span", null, format(date, 'HH:mm')));
|
|
9
|
+
};
|
|
10
|
+
export { ShortTime };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function toDate(value) {
|
|
2
|
+
// If date is a string, parse it to a Date.
|
|
3
|
+
if (typeof value === 'string') {
|
|
4
|
+
var d = new Date(value);
|
|
5
|
+
if (isNaN(d.getDate()))
|
|
6
|
+
return new Date(Date.now());
|
|
7
|
+
return d;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export { toDate };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/**
|
|
4
|
+
* File size in bytes
|
|
5
|
+
*/
|
|
6
|
+
value: number | string;
|
|
7
|
+
/**
|
|
8
|
+
* Unit type, `si` or `binary`
|
|
9
|
+
* @default si
|
|
10
|
+
*/
|
|
11
|
+
unit?: 'si' | 'binary';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Filesize takes a `value` prop (in bytes) and renders a human-readable filesize
|
|
15
|
+
* string. If provided with a string, `Filesize` will convert it to a number
|
|
16
|
+
* first.
|
|
17
|
+
*
|
|
18
|
+
* E.g. `10000` => `10.0 kB`
|
|
19
|
+
*
|
|
20
|
+
* The `unit` type can optionally be specified, either `si` (International
|
|
21
|
+
* System of Units, where 1 kilobyte is 1,000 byes), or `binary (where 1
|
|
22
|
+
* kilobyte equals 1,024 bytes).
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Filesize value={10000} unit='binary'/>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare const Filesize: ({ unit, ...props }: IProps) => React.JSX.Element;
|
|
29
|
+
export { Filesize, IProps };
|