@longline/aqua-ui 1.0.9 → 1.0.11
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/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/Form/index.d.ts +1 -0
- package/containers/Form/index.js +1 -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/InfoBox/index.d.ts +1 -0
- package/containers/InfoBox/index.js +1 -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/containers/Tabs/index.d.ts +1 -0
- package/containers/Tabs/index.js +1 -0
- package/controls/Chip/Chip.d.ts +35 -0
- package/controls/Chip/Chip.js +83 -0
- package/controls/Chip/index.d.ts +1 -0
- package/controls/Chip/index.js +1 -0
- package/controls/Fab/Fab.d.ts +73 -0
- package/controls/Fab/Fab.js +94 -0
- package/controls/Fab/index.d.ts +1 -0
- package/controls/Fab/index.js +1 -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/LinearChart/index.d.ts +1 -0
- package/controls/LinearChart/index.js +1 -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/Progress/index.d.ts +1 -0
- package/controls/Progress/index.js +1 -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/controls/View/index.d.ts +1 -0
- package/controls/View/index.js +1 -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/Date/index.d.ts +1 -0
- package/formatters/Date/index.js +1 -0
- package/formatters/Filesize/Filesize.d.ts +29 -0
- package/formatters/Filesize/Filesize.js +54 -0
- package/formatters/Filesize/index.d.ts +1 -0
- package/formatters/Filesize/index.js +1 -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/alpha.d.ts +8 -0
- package/helper/alpha.js +17 -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/md5.d.ts +2 -0
- package/helper/md5.js +162 -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/Dropdown/index.d.ts +1 -0
- package/inputs/Dropdown/index.js +1 -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/index.d.ts +1 -0
- package/inputs/Editor/index.js +1 -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/Slider/index.d.ts +1 -0
- package/inputs/Slider/index.js +1 -0
- package/inputs/Textarea/Textarea.d.ts +79 -0
- package/inputs/Textarea/Textarea.js +65 -0
- package/inputs/Textarea/index.d.ts +1 -0
- package/inputs/Textarea/index.js +1 -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/PositionsManager/index.d.ts +1 -0
- package/map/PositionsManager/index.js +1 -0
- package/map/controls/CompassButton/CompassButton.d.ts +33 -0
- package/map/controls/CompassButton/CompassButton.js +88 -0
- package/map/controls/CompassButton/index.d.ts +2 -0
- package/map/controls/CompassButton/index.js +2 -0
- package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
- package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
- package/map/controls/FullscreenButton/index.d.ts +2 -0
- package/map/controls/FullscreenButton/index.js +2 -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/Geocoder/index.d.ts +2 -0
- package/map/controls/Geocoder/index.js +2 -0
- package/map/controls/Graticule/Graticule.d.ts +35 -0
- package/map/controls/Graticule/Graticule.js +142 -0
- package/map/controls/Graticule/index.d.ts +1 -0
- package/map/controls/Graticule/index.js +1 -0
- package/map/controls/MapLoader/MapLoader.d.ts +33 -0
- package/map/controls/MapLoader/MapLoader.js +73 -0
- package/map/controls/MapLoader/index.d.ts +1 -0
- package/map/controls/MapLoader/index.js +1 -0
- package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
- package/map/controls/ScaleControl/ScaleControl.js +107 -0
- package/map/controls/ScaleControl/index.d.ts +1 -0
- package/map/controls/ScaleControl/index.js +1 -0
- package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
- package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
- package/map/controls/ZoomInButton/index.d.ts +2 -0
- package/map/controls/ZoomInButton/index.js +2 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
- package/map/controls/ZoomOutButton/index.d.ts +2 -0
- package/map/controls/ZoomOutButton/index.js +2 -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/MapButtonGroup/index.d.ts +1 -0
- package/map/controls/base/MapButtonGroup/index.js +1 -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/HtmlMarkerLayer/index.d.ts +1 -0
- package/map/layers/HtmlMarkerLayer/index.js +1 -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/InterpolationLayer/index.d.ts +1 -0
- package/map/layers/InterpolationLayer/index.js +1 -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/layers/ParticlesLayer/index.d.ts +1 -0
- package/map/layers/ParticlesLayer/index.js +1 -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/map/markers/RiskMarker/index.d.ts +1 -0
- package/map/markers/RiskMarker/index.js +1 -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/index.d.ts +1 -0
- package/modules/Root/index.js +1 -0
- package/modules/Root/stories/SampleContent.d.ts +7 -0
- package/modules/Root/stories/SampleContent.js +44 -0
- package/package.json +7 -7
- 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/Dialog/index.d.ts +1 -0
- package/services/Dialog/index.js +1 -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/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/styles/styled-theme.d.ts +0 -0
- package/styles/styled-theme.js +1 -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,47 @@
|
|
|
1
|
+
var HslColor = /** @class */ (function () {
|
|
2
|
+
function HslColor(hue, saturation, lightness, alpha) {
|
|
3
|
+
this.hue = hue;
|
|
4
|
+
this.saturation = saturation;
|
|
5
|
+
this.lightness = lightness;
|
|
6
|
+
this.alpha = alpha || 1;
|
|
7
|
+
}
|
|
8
|
+
HslColor.FromRgb = function (color) {
|
|
9
|
+
var red = color.red / 255;
|
|
10
|
+
var green = color.green / 255;
|
|
11
|
+
var blue = color.blue / 255;
|
|
12
|
+
var max = Math.max(red, green, blue);
|
|
13
|
+
var min = Math.min(red, green, blue);
|
|
14
|
+
var lightness = (max + min) / 2;
|
|
15
|
+
if (max === min) {
|
|
16
|
+
// achromatic
|
|
17
|
+
return new HslColor(0, 0, lightness, color.alpha);
|
|
18
|
+
}
|
|
19
|
+
var hue;
|
|
20
|
+
var delta = max - min;
|
|
21
|
+
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
22
|
+
switch (max) {
|
|
23
|
+
case red:
|
|
24
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
25
|
+
break;
|
|
26
|
+
case green:
|
|
27
|
+
hue = (blue - red) / delta + 2;
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
// blue case
|
|
31
|
+
hue = (red - green) / delta + 4;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
hue *= 60;
|
|
35
|
+
return new HslColor(hue, saturation, lightness, color.alpha);
|
|
36
|
+
};
|
|
37
|
+
HslColor.prototype.toString = function () {
|
|
38
|
+
if (this.alpha === 1) {
|
|
39
|
+
return "hsl(".concat(this.hue, ", ").concat(Math.round(this.saturation * 100), "%, ").concat(Math.round(this.lightness * 100), "%)");
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return "hsla(".concat(this.hue, ", ").concat(Math.round(this.saturation * 100), "%, ").concat(Math.round(this.lightness * 100), "%, ").concat(this.alpha, ")");
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return HslColor;
|
|
46
|
+
}());
|
|
47
|
+
export { HslColor };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { HslColor } from './HslColor';
|
|
2
|
+
/**
|
|
3
|
+
* `RgbColor` encapsulates an RGB color, optionally with an alpha component.
|
|
4
|
+
* It offers parsing from and to a HTML color string.
|
|
5
|
+
*/
|
|
6
|
+
declare class RgbColor {
|
|
7
|
+
red: number;
|
|
8
|
+
blue: number;
|
|
9
|
+
green: number;
|
|
10
|
+
alpha: number;
|
|
11
|
+
/** Construct an RgbColor instance.
|
|
12
|
+
* If alpha is not provided, it is assumed to be 1 (opaque).
|
|
13
|
+
*/
|
|
14
|
+
constructor(red: number, green: number, blue: number, alpha?: number);
|
|
15
|
+
/** Parses a color string into an RgbColor instance.
|
|
16
|
+
* Color strings may be:
|
|
17
|
+
*
|
|
18
|
+
* SteelBlue (and friends)
|
|
19
|
+
* #RRGGBB
|
|
20
|
+
* #RRGGBBAA
|
|
21
|
+
* #RGB
|
|
22
|
+
* #RGBA
|
|
23
|
+
* rgb(r,g,b)
|
|
24
|
+
* rgba(r,g,b,a)
|
|
25
|
+
* hsl(h,s,l)
|
|
26
|
+
* hsla(h,s,l,a)
|
|
27
|
+
*/
|
|
28
|
+
static FromString(color: string): RgbColor;
|
|
29
|
+
/**
|
|
30
|
+
* Convert a HslColor instance to an RgbColor instance.
|
|
31
|
+
*/
|
|
32
|
+
static FromHsl(color: HslColor): RgbColor;
|
|
33
|
+
private toHex;
|
|
34
|
+
/**
|
|
35
|
+
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
36
|
+
*/
|
|
37
|
+
private reduceHexValue;
|
|
38
|
+
/**
|
|
39
|
+
* Return string representation of this RgbColor instance.
|
|
40
|
+
*/
|
|
41
|
+
toString(): string;
|
|
42
|
+
}
|
|
43
|
+
export { RgbColor };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { nameToHex } from './nameToHex';
|
|
2
|
+
import { HslColor } from './HslColor';
|
|
3
|
+
/**
|
|
4
|
+
* `RgbColor` encapsulates an RGB color, optionally with an alpha component.
|
|
5
|
+
* It offers parsing from and to a HTML color string.
|
|
6
|
+
*/
|
|
7
|
+
var RgbColor = /** @class */ (function () {
|
|
8
|
+
/** Construct an RgbColor instance.
|
|
9
|
+
* If alpha is not provided, it is assumed to be 1 (opaque).
|
|
10
|
+
*/
|
|
11
|
+
function RgbColor(red, green, blue, alpha) {
|
|
12
|
+
/**
|
|
13
|
+
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
14
|
+
*/
|
|
15
|
+
this.reduceHexValue = function (value) {
|
|
16
|
+
if (value.length === 7
|
|
17
|
+
&& value[1] === value[2]
|
|
18
|
+
&& value[3] === value[4]
|
|
19
|
+
&& value[5] === value[6]) {
|
|
20
|
+
return "#".concat(value[1]).concat(value[3]).concat(value[5]);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
this.red = red;
|
|
25
|
+
this.green = green;
|
|
26
|
+
this.blue = blue;
|
|
27
|
+
this.alpha = alpha !== null && alpha !== void 0 ? alpha : 1;
|
|
28
|
+
}
|
|
29
|
+
/** Parses a color string into an RgbColor instance.
|
|
30
|
+
* Color strings may be:
|
|
31
|
+
*
|
|
32
|
+
* SteelBlue (and friends)
|
|
33
|
+
* #RRGGBB
|
|
34
|
+
* #RRGGBBAA
|
|
35
|
+
* #RGB
|
|
36
|
+
* #RGBA
|
|
37
|
+
* rgb(r,g,b)
|
|
38
|
+
* rgba(r,g,b,a)
|
|
39
|
+
* hsl(h,s,l)
|
|
40
|
+
* hsla(h,s,l,a)
|
|
41
|
+
*/
|
|
42
|
+
RgbColor.FromString = function (color) {
|
|
43
|
+
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
44
|
+
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
45
|
+
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
46
|
+
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
47
|
+
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
|
|
48
|
+
var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
|
|
49
|
+
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/;
|
|
50
|
+
var hslaRegex = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
|
|
51
|
+
// If the color is not even a string, make it white.
|
|
52
|
+
if (typeof color !== "string")
|
|
53
|
+
color = "#ffffff";
|
|
54
|
+
// This may be a named color. Convert it to hex first.
|
|
55
|
+
var normalizedColor = nameToHex(color);
|
|
56
|
+
if (normalizedColor.match(hexRegex)) {
|
|
57
|
+
return new RgbColor(parseInt("".concat(normalizedColor[1]).concat(normalizedColor[2]), 16), parseInt("".concat(normalizedColor[3]).concat(normalizedColor[4]), 16), parseInt("".concat(normalizedColor[5]).concat(normalizedColor[6]), 16));
|
|
58
|
+
}
|
|
59
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
60
|
+
var alpha = parseFloat((parseInt("".concat(normalizedColor[7]).concat(normalizedColor[8]), 16) / 255).toFixed(2));
|
|
61
|
+
return new RgbColor(parseInt("".concat(normalizedColor[1]).concat(normalizedColor[2]), 16), parseInt("".concat(normalizedColor[3]).concat(normalizedColor[4]), 16), parseInt("".concat(normalizedColor[5]).concat(normalizedColor[6]), 16), alpha);
|
|
62
|
+
}
|
|
63
|
+
if (normalizedColor.match(reducedHexRegex)) {
|
|
64
|
+
return new RgbColor(parseInt("".concat(normalizedColor[1]).concat(normalizedColor[1]), 16), parseInt("".concat(normalizedColor[2]).concat(normalizedColor[2]), 16), parseInt("".concat(normalizedColor[3]).concat(normalizedColor[3]), 16));
|
|
65
|
+
}
|
|
66
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
67
|
+
var alpha = parseFloat((parseInt("".concat(normalizedColor[4]).concat(normalizedColor[4]), 16) / 255).toFixed(2));
|
|
68
|
+
return new RgbColor(parseInt("".concat(normalizedColor[1]).concat(normalizedColor[1]), 16), parseInt("".concat(normalizedColor[2]).concat(normalizedColor[2]), 16), parseInt("".concat(normalizedColor[3]).concat(normalizedColor[3]), 16), alpha);
|
|
69
|
+
}
|
|
70
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
71
|
+
if (rgbMatched) {
|
|
72
|
+
return new RgbColor(parseInt("".concat(rgbMatched[1]), 10), parseInt("".concat(rgbMatched[2]), 10), parseInt("".concat(rgbMatched[3]), 10));
|
|
73
|
+
}
|
|
74
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor);
|
|
75
|
+
if (rgbaMatched) {
|
|
76
|
+
return new RgbColor(parseInt("".concat(rgbaMatched[1]), 10), parseInt("".concat(rgbaMatched[2]), 10), parseInt("".concat(rgbaMatched[3]), 10), parseFloat("".concat(rgbaMatched[4])));
|
|
77
|
+
}
|
|
78
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
79
|
+
if (hslMatched) {
|
|
80
|
+
var hue = parseInt("".concat(hslMatched[1]), 10);
|
|
81
|
+
var saturation = parseInt("".concat(hslMatched[2]), 10) / 100;
|
|
82
|
+
var lightness = parseInt("".concat(hslMatched[3]), 10) / 100;
|
|
83
|
+
var hsl = new HslColor(hue, saturation, lightness);
|
|
84
|
+
return RgbColor.FromHsl(hsl);
|
|
85
|
+
}
|
|
86
|
+
var hslaMatched = hslaRegex.exec(normalizedColor);
|
|
87
|
+
if (hslaMatched) {
|
|
88
|
+
var hue = parseInt("".concat(hslaMatched[1]), 10);
|
|
89
|
+
var saturation = parseInt("".concat(hslaMatched[2]), 10) / 100;
|
|
90
|
+
var lightness = parseInt("".concat(hslaMatched[3]), 10) / 100;
|
|
91
|
+
var alpha = parseFloat("".concat(hslaMatched[4]));
|
|
92
|
+
var hsl = new HslColor(hue, saturation, lightness, alpha);
|
|
93
|
+
return RgbColor.FromHsl(hsl);
|
|
94
|
+
}
|
|
95
|
+
// console.error("RgbColor.FromString parse error for: " + color);
|
|
96
|
+
// In case of parse error, assume white.
|
|
97
|
+
return new RgbColor(255, 255, 255);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Convert a HslColor instance to an RgbColor instance.
|
|
101
|
+
*/
|
|
102
|
+
RgbColor.FromHsl = function (color) {
|
|
103
|
+
if (color.saturation === 0) {
|
|
104
|
+
// achromatic
|
|
105
|
+
return new RgbColor(Math.round(color.lightness * 255), Math.round(color.lightness * 255), Math.round(color.lightness * 255), color.alpha);
|
|
106
|
+
}
|
|
107
|
+
// formular from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
108
|
+
var huePrime = color.hue % 360 / 60;
|
|
109
|
+
var chroma = (1 - Math.abs(2 * color.lightness - 1)) * color.saturation;
|
|
110
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
111
|
+
var red = 0;
|
|
112
|
+
var green = 0;
|
|
113
|
+
var blue = 0;
|
|
114
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
115
|
+
red = chroma;
|
|
116
|
+
green = secondComponent;
|
|
117
|
+
}
|
|
118
|
+
else if (huePrime >= 1 && huePrime < 2) {
|
|
119
|
+
red = secondComponent;
|
|
120
|
+
green = chroma;
|
|
121
|
+
}
|
|
122
|
+
else if (huePrime >= 2 && huePrime < 3) {
|
|
123
|
+
green = chroma;
|
|
124
|
+
blue = secondComponent;
|
|
125
|
+
}
|
|
126
|
+
else if (huePrime >= 3 && huePrime < 4) {
|
|
127
|
+
green = secondComponent;
|
|
128
|
+
blue = chroma;
|
|
129
|
+
}
|
|
130
|
+
else if (huePrime >= 4 && huePrime < 5) {
|
|
131
|
+
red = secondComponent;
|
|
132
|
+
blue = chroma;
|
|
133
|
+
}
|
|
134
|
+
else if (huePrime >= 5 && huePrime < 6) {
|
|
135
|
+
red = chroma;
|
|
136
|
+
blue = secondComponent;
|
|
137
|
+
}
|
|
138
|
+
var lightnessModification = color.lightness - chroma / 2;
|
|
139
|
+
var finalRed = red + lightnessModification;
|
|
140
|
+
var finalGreen = green + lightnessModification;
|
|
141
|
+
var finalBlue = blue + lightnessModification;
|
|
142
|
+
return new RgbColor(Math.round(finalRed * 255), Math.round(finalGreen * 255), Math.round(finalBlue * 255), color.alpha);
|
|
143
|
+
};
|
|
144
|
+
RgbColor.prototype.toHex = function (value) {
|
|
145
|
+
var hex = value.toString(16);
|
|
146
|
+
return hex.length === 1 ? "0".concat(hex) : hex;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Return string representation of this RgbColor instance.
|
|
150
|
+
*/
|
|
151
|
+
RgbColor.prototype.toString = function () {
|
|
152
|
+
// Convert RGB to hex string.
|
|
153
|
+
var hex = "#".concat(this.toHex(this.red)).concat(this.toHex(this.green)).concat(this.toHex(this.blue));
|
|
154
|
+
if (this.alpha !== 1) {
|
|
155
|
+
hex += "".concat(this.toHex(Math.round(this.alpha * 255)));
|
|
156
|
+
}
|
|
157
|
+
// Reduce #FFFFFF to #FFF if possible:
|
|
158
|
+
return this.reduceHexValue(hex);
|
|
159
|
+
};
|
|
160
|
+
return RgbColor;
|
|
161
|
+
}());
|
|
162
|
+
export { RgbColor };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Size } from "../Types";
|
|
2
|
+
export type Ratio = 'minorSecond' | 'majorSecond' | 'minorThird' | 'majorThird' | 'perfectFourth' | 'augFourth' | 'perfectFifth' | 'minorSixth' | 'goldenSection' | 'majorSixth' | 'minorSeventh' | 'majorSeventh' | 'octave' | 'majorTenth' | 'majorEleventh' | 'majorTwelfth' | 'doubleOctave';
|
|
3
|
+
export declare function modularScale(steps: number, base: number, ratio: Ratio): number;
|
|
4
|
+
/**
|
|
5
|
+
* Scale a Size to a local unit.
|
|
6
|
+
* @param size Source size
|
|
7
|
+
* @param base Base size, in local units
|
|
8
|
+
* @param ratio ModularScale ratio to use
|
|
9
|
+
*/
|
|
10
|
+
export declare function scaleSize(size: Size, base: number, ratio: Ratio): number;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function getRatioValue(ratio) {
|
|
2
|
+
switch (ratio) {
|
|
3
|
+
case 'minorSecond': return 1.067;
|
|
4
|
+
case 'majorSecond': return 1.125;
|
|
5
|
+
case 'minorThird': return 1.2;
|
|
6
|
+
case 'majorThird': return 1.25;
|
|
7
|
+
case 'perfectFourth': return 1.333;
|
|
8
|
+
case 'augFourth': return 1.414;
|
|
9
|
+
case 'perfectFifth': return 1.5;
|
|
10
|
+
case 'minorSixth': return 1.6;
|
|
11
|
+
case 'goldenSection': return 1.618;
|
|
12
|
+
case 'majorSixth': return 1.667;
|
|
13
|
+
case 'minorSeventh': return 1.778;
|
|
14
|
+
case 'majorSeventh': return 1.875;
|
|
15
|
+
case 'octave': return 2;
|
|
16
|
+
case 'majorTenth': return 2.5;
|
|
17
|
+
case 'majorEleventh': return 2.667;
|
|
18
|
+
case 'majorTwelfth': return 3;
|
|
19
|
+
case 'doubleOctave': return 4;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
;
|
|
23
|
+
export function modularScale(steps, base, ratio) {
|
|
24
|
+
if (base === 0)
|
|
25
|
+
base = 1;
|
|
26
|
+
var ratioValue = getRatioValue(ratio);
|
|
27
|
+
return base * Math.pow(ratioValue, steps);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Convert a Size to a scale.
|
|
31
|
+
*
|
|
32
|
+
* If size is undefined, 'medium' will be assumed.
|
|
33
|
+
*/
|
|
34
|
+
function sizeToScale(size) {
|
|
35
|
+
if (size === void 0) { size = 'medium'; }
|
|
36
|
+
var sizeToScale = {
|
|
37
|
+
'mini': -3,
|
|
38
|
+
'tiny': -2,
|
|
39
|
+
'small': -1,
|
|
40
|
+
'medium': 0,
|
|
41
|
+
'large': 1,
|
|
42
|
+
'big': 2,
|
|
43
|
+
'huge': 3,
|
|
44
|
+
'massive': 4
|
|
45
|
+
};
|
|
46
|
+
return sizeToScale[size];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Scale a Size to a local unit.
|
|
50
|
+
* @param size Source size
|
|
51
|
+
* @param base Base size, in local units
|
|
52
|
+
* @param ratio ModularScale ratio to use
|
|
53
|
+
*/
|
|
54
|
+
export function scaleSize(size, base, ratio) {
|
|
55
|
+
return modularScale(sizeToScale(size), base, ratio);
|
|
56
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds an alpha component to a color.
|
|
3
|
+
* @param amount Alpha value to add (0-1).
|
|
4
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
5
|
+
* @returns Alphaized color in RGB format.
|
|
6
|
+
*/
|
|
7
|
+
declare function alpha(amount: number, color: string): string;
|
|
8
|
+
export { alpha };
|
package/helper/alpha.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { guard } from './guard';
|
|
2
|
+
import { RgbColor } from './RgbColor';
|
|
3
|
+
/**
|
|
4
|
+
* Adds an alpha component to a color.
|
|
5
|
+
* @param amount Alpha value to add (0-1).
|
|
6
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
7
|
+
* @returns Alphaized color in RGB format.
|
|
8
|
+
*/
|
|
9
|
+
function alpha(amount, color) {
|
|
10
|
+
amount = guard(0, 1, amount);
|
|
11
|
+
if (color === 'transparent')
|
|
12
|
+
return color;
|
|
13
|
+
var rgbColor = RgbColor.FromString(color);
|
|
14
|
+
rgbColor.alpha = amount;
|
|
15
|
+
return rgbColor.toString();
|
|
16
|
+
}
|
|
17
|
+
export { alpha };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Darkens an input color by an amount.
|
|
3
|
+
* @param amount Amount of lightness to reduce.
|
|
4
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
5
|
+
* @returns Darkened color in RGB format.
|
|
6
|
+
*/
|
|
7
|
+
declare function darken(amount: number, color: string): string;
|
|
8
|
+
export { darken };
|
package/helper/darken.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { guard } from './guard';
|
|
2
|
+
import { RgbColor } from './RgbColor';
|
|
3
|
+
import { HslColor } from './HslColor';
|
|
4
|
+
/**
|
|
5
|
+
* Darkens an input color by an amount.
|
|
6
|
+
* @param amount Amount of lightness to reduce.
|
|
7
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
8
|
+
* @returns Darkened color in RGB format.
|
|
9
|
+
*/
|
|
10
|
+
function darken(amount, color) {
|
|
11
|
+
if (color === 'transparent')
|
|
12
|
+
return color;
|
|
13
|
+
var rgbColor = RgbColor.FromString(color);
|
|
14
|
+
var hslColor = HslColor.FromRgb(rgbColor);
|
|
15
|
+
hslColor.lightness = guard(0, 1, hslColor.lightness - amount);
|
|
16
|
+
return RgbColor.FromHsl(hslColor).toString();
|
|
17
|
+
}
|
|
18
|
+
export { darken };
|
package/helper/guard.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightens an input color by an amount.
|
|
3
|
+
* @param amount Amount of lightness to increase.
|
|
4
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
5
|
+
* @returns Lightened color in RGB format.
|
|
6
|
+
*/
|
|
7
|
+
declare function lighten(amount: number, color: string): string;
|
|
8
|
+
export { lighten };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { darken } from './darken';
|
|
2
|
+
/**
|
|
3
|
+
* Lightens an input color by an amount.
|
|
4
|
+
* @param amount Amount of lightness to increase.
|
|
5
|
+
* @param color Color in RGB format, e.g. "red" or "#ff0000".
|
|
6
|
+
* @returns Lightened color in RGB format.
|
|
7
|
+
*/
|
|
8
|
+
function lighten(amount, color) {
|
|
9
|
+
return darken(-amount, color);
|
|
10
|
+
}
|
|
11
|
+
export { lighten };
|
package/helper/md5.d.ts
ADDED
package/helper/md5.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
function md5cycle(x, k) {
|
|
2
|
+
var a = x[0], b = x[1], c = x[2], d = x[3];
|
|
3
|
+
a = ff(a, b, c, d, k[0], 7, -680876936);
|
|
4
|
+
d = ff(d, a, b, c, k[1], 12, -389564586);
|
|
5
|
+
c = ff(c, d, a, b, k[2], 17, 606105819);
|
|
6
|
+
b = ff(b, c, d, a, k[3], 22, -1044525330);
|
|
7
|
+
a = ff(a, b, c, d, k[4], 7, -176418897);
|
|
8
|
+
d = ff(d, a, b, c, k[5], 12, 1200080426);
|
|
9
|
+
c = ff(c, d, a, b, k[6], 17, -1473231341);
|
|
10
|
+
b = ff(b, c, d, a, k[7], 22, -45705983);
|
|
11
|
+
a = ff(a, b, c, d, k[8], 7, 1770035416);
|
|
12
|
+
d = ff(d, a, b, c, k[9], 12, -1958414417);
|
|
13
|
+
c = ff(c, d, a, b, k[10], 17, -42063);
|
|
14
|
+
b = ff(b, c, d, a, k[11], 22, -1990404162);
|
|
15
|
+
a = ff(a, b, c, d, k[12], 7, 1804603682);
|
|
16
|
+
d = ff(d, a, b, c, k[13], 12, -40341101);
|
|
17
|
+
c = ff(c, d, a, b, k[14], 17, -1502002290);
|
|
18
|
+
b = ff(b, c, d, a, k[15], 22, 1236535329);
|
|
19
|
+
a = gg(a, b, c, d, k[1], 5, -165796510);
|
|
20
|
+
d = gg(d, a, b, c, k[6], 9, -1069501632);
|
|
21
|
+
c = gg(c, d, a, b, k[11], 14, 643717713);
|
|
22
|
+
b = gg(b, c, d, a, k[0], 20, -373897302);
|
|
23
|
+
a = gg(a, b, c, d, k[5], 5, -701558691);
|
|
24
|
+
d = gg(d, a, b, c, k[10], 9, 38016083);
|
|
25
|
+
c = gg(c, d, a, b, k[15], 14, -660478335);
|
|
26
|
+
b = gg(b, c, d, a, k[4], 20, -405537848);
|
|
27
|
+
a = gg(a, b, c, d, k[9], 5, 568446438);
|
|
28
|
+
d = gg(d, a, b, c, k[14], 9, -1019803690);
|
|
29
|
+
c = gg(c, d, a, b, k[3], 14, -187363961);
|
|
30
|
+
b = gg(b, c, d, a, k[8], 20, 1163531501);
|
|
31
|
+
a = gg(a, b, c, d, k[13], 5, -1444681467);
|
|
32
|
+
d = gg(d, a, b, c, k[2], 9, -51403784);
|
|
33
|
+
c = gg(c, d, a, b, k[7], 14, 1735328473);
|
|
34
|
+
b = gg(b, c, d, a, k[12], 20, -1926607734);
|
|
35
|
+
a = hh(a, b, c, d, k[5], 4, -378558);
|
|
36
|
+
d = hh(d, a, b, c, k[8], 11, -2022574463);
|
|
37
|
+
c = hh(c, d, a, b, k[11], 16, 1839030562);
|
|
38
|
+
b = hh(b, c, d, a, k[14], 23, -35309556);
|
|
39
|
+
a = hh(a, b, c, d, k[1], 4, -1530992060);
|
|
40
|
+
d = hh(d, a, b, c, k[4], 11, 1272893353);
|
|
41
|
+
c = hh(c, d, a, b, k[7], 16, -155497632);
|
|
42
|
+
b = hh(b, c, d, a, k[10], 23, -1094730640);
|
|
43
|
+
a = hh(a, b, c, d, k[13], 4, 681279174);
|
|
44
|
+
d = hh(d, a, b, c, k[0], 11, -358537222);
|
|
45
|
+
c = hh(c, d, a, b, k[3], 16, -722521979);
|
|
46
|
+
b = hh(b, c, d, a, k[6], 23, 76029189);
|
|
47
|
+
a = hh(a, b, c, d, k[9], 4, -640364487);
|
|
48
|
+
d = hh(d, a, b, c, k[12], 11, -421815835);
|
|
49
|
+
c = hh(c, d, a, b, k[15], 16, 530742520);
|
|
50
|
+
b = hh(b, c, d, a, k[2], 23, -995338651);
|
|
51
|
+
a = ii(a, b, c, d, k[0], 6, -198630844);
|
|
52
|
+
d = ii(d, a, b, c, k[7], 10, 1126891415);
|
|
53
|
+
c = ii(c, d, a, b, k[14], 15, -1416354905);
|
|
54
|
+
b = ii(b, c, d, a, k[5], 21, -57434055);
|
|
55
|
+
a = ii(a, b, c, d, k[12], 6, 1700485571);
|
|
56
|
+
d = ii(d, a, b, c, k[3], 10, -1894986606);
|
|
57
|
+
c = ii(c, d, a, b, k[10], 15, -1051523);
|
|
58
|
+
b = ii(b, c, d, a, k[1], 21, -2054922799);
|
|
59
|
+
a = ii(a, b, c, d, k[8], 6, 1873313359);
|
|
60
|
+
d = ii(d, a, b, c, k[15], 10, -30611744);
|
|
61
|
+
c = ii(c, d, a, b, k[6], 15, -1560198380);
|
|
62
|
+
b = ii(b, c, d, a, k[13], 21, 1309151649);
|
|
63
|
+
a = ii(a, b, c, d, k[4], 6, -145523070);
|
|
64
|
+
d = ii(d, a, b, c, k[11], 10, -1120210379);
|
|
65
|
+
c = ii(c, d, a, b, k[2], 15, 718787259);
|
|
66
|
+
b = ii(b, c, d, a, k[9], 21, -343485551);
|
|
67
|
+
x[0] = add32(a, x[0]);
|
|
68
|
+
x[1] = add32(b, x[1]);
|
|
69
|
+
x[2] = add32(c, x[2]);
|
|
70
|
+
x[3] = add32(d, x[3]);
|
|
71
|
+
}
|
|
72
|
+
function cmn(q, a, b, x, s, t) {
|
|
73
|
+
a = add32(add32(a, q), add32(x, t));
|
|
74
|
+
return add32((a << s) | (a >>> (32 - s)), b);
|
|
75
|
+
}
|
|
76
|
+
function ff(a, b, c, d, x, s, t) {
|
|
77
|
+
return cmn((b & c) | ((~b) & d), a, b, x, s, t);
|
|
78
|
+
}
|
|
79
|
+
function gg(a, b, c, d, x, s, t) {
|
|
80
|
+
return cmn((b & d) | (c & (~d)), a, b, x, s, t);
|
|
81
|
+
}
|
|
82
|
+
function hh(a, b, c, d, x, s, t) {
|
|
83
|
+
return cmn(b ^ c ^ d, a, b, x, s, t);
|
|
84
|
+
}
|
|
85
|
+
function ii(a, b, c, d, x, s, t) {
|
|
86
|
+
return cmn(c ^ (b | (~d)), a, b, x, s, t);
|
|
87
|
+
}
|
|
88
|
+
function md51(s) {
|
|
89
|
+
var txt = '';
|
|
90
|
+
var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i;
|
|
91
|
+
for (i = 64; i <= s.length; i += 64) {
|
|
92
|
+
md5cycle(state, md5blk(s.substring(i - 64, i)));
|
|
93
|
+
}
|
|
94
|
+
s = s.substring(i - 64);
|
|
95
|
+
var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
96
|
+
for (i = 0; i < s.length; i++) {
|
|
97
|
+
tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
|
|
98
|
+
}
|
|
99
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
|
100
|
+
if (i > 55) {
|
|
101
|
+
md5cycle(state, tail);
|
|
102
|
+
for (i = 0; i < 16; i++)
|
|
103
|
+
tail[i] = 0;
|
|
104
|
+
}
|
|
105
|
+
tail[14] = n * 8;
|
|
106
|
+
md5cycle(state, tail);
|
|
107
|
+
return state;
|
|
108
|
+
}
|
|
109
|
+
/* there needs to be support for Unicode here,
|
|
110
|
+
* unless we pretend that we can redefine the MD-5
|
|
111
|
+
* algorithm for multi-byte characters (perhaps
|
|
112
|
+
* by adding every four 16-bit characters and
|
|
113
|
+
* shortening the sum to 32 bits). Otherwise
|
|
114
|
+
* I suggest performing MD-5 as if every character
|
|
115
|
+
* was two bytes--e.g., 0040 0025 = @%--but then
|
|
116
|
+
* how will an ordinary MD-5 sum be matched?
|
|
117
|
+
* There is no way to standardize text to something
|
|
118
|
+
* like UTF-8 before transformation; speed cost is
|
|
119
|
+
* utterly prohibitive. The JavaScript standard
|
|
120
|
+
* itself needs to look at this: it should start
|
|
121
|
+
* providing access to strings as preformed UTF-8
|
|
122
|
+
* 8-bit unsigned value arrays.
|
|
123
|
+
*/
|
|
124
|
+
function md5blk(s) {
|
|
125
|
+
var md5blks = [], i; /* Andy King said do it this way. */
|
|
126
|
+
for (i = 0; i < 64; i += 4) {
|
|
127
|
+
md5blks[i >> 2] = s.charCodeAt(i)
|
|
128
|
+
+ (s.charCodeAt(i + 1) << 8)
|
|
129
|
+
+ (s.charCodeAt(i + 2) << 16)
|
|
130
|
+
+ (s.charCodeAt(i + 3) << 24);
|
|
131
|
+
}
|
|
132
|
+
return md5blks;
|
|
133
|
+
}
|
|
134
|
+
var hex_chr = '0123456789abcdef'.split('');
|
|
135
|
+
function rhex(n) {
|
|
136
|
+
var s = '', j = 0;
|
|
137
|
+
for (; j < 4; j++)
|
|
138
|
+
s += hex_chr[(n >> (j * 8 + 4)) & 0x0F]
|
|
139
|
+
+ hex_chr[(n >> (j * 8)) & 0x0F];
|
|
140
|
+
return s;
|
|
141
|
+
}
|
|
142
|
+
function hex(x) {
|
|
143
|
+
for (var i = 0; i < x.length; i++)
|
|
144
|
+
x[i] = rhex(x[i]);
|
|
145
|
+
return x.join('');
|
|
146
|
+
}
|
|
147
|
+
function md5(s) {
|
|
148
|
+
return hex(md51(s));
|
|
149
|
+
}
|
|
150
|
+
/* this function is much faster,
|
|
151
|
+
so if possible we use it. Some IEs
|
|
152
|
+
are the only ones I know of that
|
|
153
|
+
need the idiotic second function,
|
|
154
|
+
generated by an if clause. */
|
|
155
|
+
var add32 = function (a, b) { return (a + b) & 0xFFFFFFFF; };
|
|
156
|
+
if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
|
|
157
|
+
add32 = function (x, y) {
|
|
158
|
+
var lsw = (x & 0xFFFF) + (y & 0xFFFF), msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
159
|
+
return (msw << 16) | (lsw & 0xFFFF);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
export { md5 };
|