Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Upgraded to elm 0.19 #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
elm-stuff
tmp
tests/index.html
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2019

This library include images from the Google Material Design Icons library: https://github.com/google/material-design-icons

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 changes: 10 additions & 10 deletions elm-package.json → elm.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"version": "1.1.0",
"type": "package",
"name": "savardd/material-icons",
"summary": "Material Icons Library",
"repository": "https://github.com/elm-community/material-icons.git",
"license": "BSD3",
"source-directories": [
"src"
],
"license": "BSD-3-Clause",
"version": "1.0.0",
"exposed-modules": [
"Material.Icons.Action",
"Material.Icons.Alert",
Expand All @@ -23,9 +21,11 @@
"Material.Icons.Social",
"Material.Icons.Toggle"
],
"elm-version": "0.19.0 <= v < 0.20.0",
"dependencies": {
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"elm-lang/svg": "2.0.0 <= v < 3.0.0"
"avh4/elm-color": "1.0.0 <= v < 2.0.0",
"elm/core": "1.0.2 <= v < 2.0.0",
"elm/svg": "1.0.1 <= v < 2.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
"test-dependencies": {}
}
12 changes: 11 additions & 1 deletion gen/generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,18 @@ def elm_node(node_fn_name, attributes, pick)
puts "Processing #{cat}"

# {file} Pt. 1
append_to_file cat_out, "module Material.Icons.#{cat} exposing ("

svg_files.each_with_index do |obj,index|
icon_name = obj[:name]
if index > 0
append_to_file cat_out, ", "
end
append_to_file cat_out, "#{icon_name}"
end

append_to_file cat_out, <<~HERE
module Material.Icons.#{cat} exposing (..)
)

{-|

Expand Down
1,516 changes: 433 additions & 1,083 deletions src/Material/Icons/Action.elm

Large diffs are not rendered by default.

32 changes: 9 additions & 23 deletions src/Material/Icons/Alert.elm
Original file line number Diff line number Diff line change
@@ -1,42 +1,28 @@
module Material.Icons.Alert exposing (..)
module Material.Icons.Alert exposing (add_alert, error, error_outline, warning)

{-|


# Icons

@docs add_alert
@docs error
@docs error_outline
@docs warning

-}

import Color exposing (Color)
import Svg exposing (Svg)
import Svg.Attributes exposing (cx, cy, d, fillOpacity, r)
import Material.Icons.Internal exposing (icon)


{-| -}
{-|-}
add_alert : Color -> Int -> Svg msg
add_alert =
icon "0 0 48 48" [ Svg.path [ d "M20.02 41.02c0 2.2 1.78 3.98 3.98 3.98s3.98-1.78 3.98-3.98h-7.96zm17.74-8.38V21c0-6.5-4.5-11.94-10.58-13.38V6.18C27.18 4.42 25.76 3 24 3s-3.18 1.42-3.18 3.18v1.44C14.74 9.06 10.24 14.5 10.24 21v11.64L6 36.88V39h36v-2.12l-4.24-4.24zM32 25.01h-6v6h-4v-6h-6V21h6v-6h4v6h6v4.01z" ] [] ]


{-| -}
add_alert = icon "0 0 48 48" [ Svg.path [ d "M20.02 41.02c0 2.2 1.78 3.98 3.98 3.98s3.98-1.78 3.98-3.98h-7.96zm17.74-8.38V21c0-6.5-4.5-11.94-10.58-13.38V6.18C27.18 4.42 25.76 3 24 3s-3.18 1.42-3.18 3.18v1.44C14.74 9.06 10.24 14.5 10.24 21v11.64L6 36.88V39h36v-2.12l-4.24-4.24zM32 25.01h-6v6h-4v-6h-6V21h6v-6h4v6h6v4.01z" ] [] ]
{-|-}
error : Color -> Int -> Svg msg
error =
icon "0 0 48 48" [ Svg.path [ d "M24 4C12.96 4 4 12.95 4 24s8.96 20 20 20 20-8.95 20-20S35.04 4 24 4zm2 30h-4v-4h4v4zm0-8h-4V14h4v12z" ] [] ]


{-| -}
error = icon "0 0 48 48" [ Svg.path [ d "M24 4C12.96 4 4 12.95 4 24s8.96 20 20 20 20-8.95 20-20S35.04 4 24 4zm2 30h-4v-4h4v4zm0-8h-4V14h4v12z" ] [] ]
{-|-}
error_outline : Color -> Int -> Svg msg
error_outline =
icon "0 0 48 48" [ Svg.path [ d "M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z" ] [] ]


{-| -}
error_outline = icon "0 0 48 48" [ Svg.path [ d "M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z" ] [] ]
{-|-}
warning : Color -> Int -> Svg msg
warning =
icon "0 0 48 48" [ Svg.path [ d "M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z" ] [] ]
warning = icon "0 0 48 48" [ Svg.path [ d "M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z" ] [] ]
Loading