From 1933b81b59519f42896fd6dc14b07ad08a00affd Mon Sep 17 00:00:00 2001 From: Lucas Payr Date: Tue, 26 Jan 2021 14:26:32 +0100 Subject: [PATCH] moved Widget.Style.Material to Widget.Material --- example/src/Data/Style.elm | 2 +- example/src/Data/Theme.elm | 6 +++--- example/src/Example/Button.elm | 8 ++++---- example/src/Example/Dialog.elm | 2 +- example/src/Example/Icon.elm | 2 +- example/src/Example/List.elm | 4 ++-- example/src/Example/Modal.elm | 2 +- example/src/Example/MultiSelect.elm | 2 +- example/src/Example/ProgressIndicator.elm | 2 +- example/src/Example/Select.elm | 2 +- example/src/Example/Snackbar.elm | 2 +- example/src/Example/SortTable.elm | 2 +- example/src/Example/Switch.elm | 2 +- example/src/Example/Tab.elm | 2 +- example/src/Example/TextInput.elm | 2 +- src/Internal/Item.elm | 4 ++-- src/Internal/List.elm | 2 +- src/Internal/Material/Button.elm | 4 ++-- src/Internal/Material/Chip.elm | 2 +- src/Internal/Material/Dialog.elm | 4 ++-- src/Internal/Material/Item.elm | 7 ++----- src/Internal/Material/Layout.elm | 7 +++---- src/Internal/Material/List.elm | 2 +- src/Internal/Material/Snackbar.elm | 4 ++-- src/Internal/Material/Switch.elm | 2 +- src/Internal/Material/Tab.elm | 4 ++-- src/Internal/Material/TextInput.elm | 4 ++-- src/Internal/SortTable.elm | 2 -- src/Internal/Switch.elm | 3 --- src/Internal/Tab.elm | 3 --- src/Widget/{Style => }/Customize.elm | 2 +- src/Widget/Layout.elm | 2 +- src/Widget/{Style => }/Material.elm | 2 +- src/Widget/{Style => }/Material/Color.elm | 2 +- src/Widget/{Style => }/Material/Typography.elm | 2 +- tests/Accessibility.elm | 2 +- 36 files changed, 48 insertions(+), 60 deletions(-) rename src/Widget/{Style => }/Customize.elm (99%) rename src/Widget/{Style => }/Material.elm (99%) rename src/Widget/{Style => }/Material/Color.elm (99%) rename src/Widget/{Style => }/Material/Typography.elm (98%) diff --git a/example/src/Data/Style.elm b/example/src/Data/Style.elm index 9479d35..c515a5b 100644 --- a/example/src/Data/Style.elm +++ b/example/src/Data/Style.elm @@ -32,7 +32,7 @@ import Widget import Widget.Icon as Icon import Widget.Layout exposing (LayoutStyle) import Widget.Snackbar exposing (SnackbarStyle) -import Widget.Style.Material as Material exposing (Palette) +import Widget.Material as Material exposing (Palette) style : Palette -> Style msg diff --git a/example/src/Data/Theme.elm b/example/src/Data/Theme.elm index 3c93b48..8d06b11 100644 --- a/example/src/Data/Theme.elm +++ b/example/src/Data/Theme.elm @@ -1,7 +1,7 @@ module Data.Theme exposing (Theme(..), toStyle) import Data.Style as Style exposing (Style) -import Widget.Style.Material exposing (Palette) +import Widget.Material as Material exposing (Palette) type Theme @@ -13,7 +13,7 @@ toStyle : Theme -> Style msg toStyle theme = case theme of Material -> - Style.style Widget.Style.Material.defaultPalette + Style.style Material.defaultPalette DarkMaterial -> - Style.style Widget.Style.Material.darkPalette + Style.style Material.darkPalette diff --git a/example/src/Example/Button.elm b/example/src/Example/Button.elm index 2e8f01a..309bbf0 100644 --- a/example/src/Example/Button.elm +++ b/example/src/Example/Button.elm @@ -8,10 +8,10 @@ import Material.Icons as MaterialIcons import Material.Icons.Types exposing (Coloring(..)) import Widget exposing (ButtonStyle, ColumnStyle, RowStyle) import Widget.Icon as Icon -import Widget.Style.Customize as Customize -import Widget.Style.Material as Material -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Customize as Customize +import Widget.Material as Material +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography type alias Style style msg = diff --git a/example/src/Example/Dialog.elm b/example/src/Example/Dialog.elm index 563fd62..06b2623 100644 --- a/example/src/Example/Dialog.elm +++ b/example/src/Example/Dialog.elm @@ -5,7 +5,7 @@ import Element exposing (Element) import FeatherIcons import Widget exposing (ButtonStyle, DialogStyle) import Widget.Icon as Icon -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/Icon.elm b/example/src/Example/Icon.elm index e4a2e0f..bed4332 100644 --- a/example/src/Example/Icon.elm +++ b/example/src/Example/Icon.elm @@ -15,7 +15,7 @@ import Material.Icons.Types exposing (Coloring(..)) import Octicons import Widget exposing (ButtonStyle, RowStyle) import Widget.Icon exposing (Icon) -import Widget.Style.Material as Material +import Widget.Material as Material import Zondicons diff --git a/example/src/Example/List.elm b/example/src/Example/List.elm index fa6d02e..1963ccb 100644 --- a/example/src/Example/List.elm +++ b/example/src/Example/List.elm @@ -6,8 +6,8 @@ import Element.Font as Font import FeatherIcons import Widget exposing (ColumnStyle, DividerStyle, ExpansionItemStyle, HeaderStyle, ImageItemStyle, ItemStyle, MultiLineItemStyle, SwitchStyle, TextItemStyle) import Widget.Icon as Icon -import Widget.Style.Material as Material -import Widget.Style.Material.Color as MaterialColor +import Widget.Material as Material +import Widget.Material.Color as MaterialColor type alias Style style msg = diff --git a/example/src/Example/Modal.elm b/example/src/Example/Modal.elm index c5f7828..ecf4f68 100644 --- a/example/src/Example/Modal.elm +++ b/example/src/Example/Modal.elm @@ -5,7 +5,7 @@ import Element exposing (Element) import FeatherIcons import Widget exposing (ButtonStyle, ColumnStyle) import Widget.Icon as Icon -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/MultiSelect.elm b/example/src/Example/MultiSelect.elm index 3951db5..ce6b787 100644 --- a/example/src/Example/MultiSelect.elm +++ b/example/src/Example/MultiSelect.elm @@ -4,7 +4,7 @@ import Browser import Element exposing (Element) import Set exposing (Set) import Widget exposing (ButtonStyle, RowStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/ProgressIndicator.elm b/example/src/Example/ProgressIndicator.elm index 7231f93..f5f472f 100644 --- a/example/src/Example/ProgressIndicator.elm +++ b/example/src/Example/ProgressIndicator.elm @@ -3,7 +3,7 @@ module Example.ProgressIndicator exposing (Model, Msg, init, subscriptions, upda import Browser import Element exposing (Element) import Widget exposing (ProgressIndicatorStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/Select.elm b/example/src/Example/Select.elm index bb2c9bc..10b5eaa 100644 --- a/example/src/Example/Select.elm +++ b/example/src/Example/Select.elm @@ -3,7 +3,7 @@ module Example.Select exposing (Model, Msg, init, subscriptions, update, view) import Browser import Element exposing (Element) import Widget exposing (ButtonStyle, RowStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/Snackbar.elm b/example/src/Example/Snackbar.elm index 5bd801a..50b028e 100644 --- a/example/src/Example/Snackbar.elm +++ b/example/src/Example/Snackbar.elm @@ -6,7 +6,7 @@ import FeatherIcons import Time import Widget exposing (ButtonStyle, ColumnStyle, RowStyle, SnackbarStyle) import Widget.Snackbar as Snackbar exposing (Snackbar) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/SortTable.elm b/example/src/Example/SortTable.elm index f715441..39c75ff 100644 --- a/example/src/Example/SortTable.elm +++ b/example/src/Example/SortTable.elm @@ -3,7 +3,7 @@ module Example.SortTable exposing (Model, Msg, init, subscriptions, update, view import Browser import Element exposing (Element) import Widget exposing (SortTableStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/Switch.elm b/example/src/Example/Switch.elm index 8736b24..33a1a38 100644 --- a/example/src/Example/Switch.elm +++ b/example/src/Example/Switch.elm @@ -4,7 +4,7 @@ import Browser import Element exposing (Element) import FeatherIcons import Widget exposing (RowStyle, SwitchStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/Tab.elm b/example/src/Example/Tab.elm index d77f016..e0c9b1d 100644 --- a/example/src/Example/Tab.elm +++ b/example/src/Example/Tab.elm @@ -3,7 +3,7 @@ module Example.Tab exposing (Model, Msg, init, subscriptions, update, view) import Browser import Element exposing (Element) import Widget exposing (TabStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/example/src/Example/TextInput.elm b/example/src/Example/TextInput.elm index 6df131c..fa9bb4a 100644 --- a/example/src/Example/TextInput.elm +++ b/example/src/Example/TextInput.elm @@ -4,7 +4,7 @@ import Browser import Element exposing (Element) import Set exposing (Set) import Widget exposing (ColumnStyle, TextInputStyle) -import Widget.Style.Material as Material +import Widget.Material as Material type alias Style style msg = diff --git a/src/Internal/Item.elm b/src/Internal/Item.elm index d5d83b2..54aa8cb 100644 --- a/src/Internal/Item.elm +++ b/src/Internal/Item.elm @@ -2,8 +2,8 @@ module Internal.Item exposing (DividerStyle, ExpansionItem, ExpansionItemStyle, import Element exposing (Attribute, Element) import Element.Input as Input -import Widget.Icon as Icon exposing (Icon, IconStyle) -import Widget.Style.Customize exposing (content) +import Widget.Customize exposing (content) +import Widget.Icon exposing (Icon, IconStyle) type alias ItemStyle content msg = diff --git a/src/Internal/List.elm b/src/Internal/List.elm index 880506e..c607b1b 100644 --- a/src/Internal/List.elm +++ b/src/Internal/List.elm @@ -4,7 +4,7 @@ import Element exposing (Attribute, Element) import Internal.Button exposing (Button, ButtonStyle) import Internal.Item as Item exposing (Item) import Internal.Select as Select -import Widget.Style.Customize as Customize +import Widget.Customize as Customize {-| -} diff --git a/src/Internal/Material/Button.elm b/src/Internal/Material/Button.elm index 6d69a0f..6faff4f 100644 --- a/src/Internal/Material/Button.elm +++ b/src/Internal/Material/Button.elm @@ -7,8 +7,8 @@ import Element.Font as Font import Html.Attributes as Attributes import Internal.Button exposing (ButtonStyle) import Internal.Material.Palette exposing (Palette) -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography baseButton : Palette -> ButtonStyle msg diff --git a/src/Internal/Material/Chip.elm b/src/Internal/Material/Chip.elm index f80a51a..345cf9b 100644 --- a/src/Internal/Material/Chip.elm +++ b/src/Internal/Material/Chip.elm @@ -7,7 +7,7 @@ import Element.Font as Font import Internal.Button exposing (ButtonStyle) import Internal.Material.Button as Button import Internal.Material.Palette exposing (Palette) -import Widget.Style.Material.Color as MaterialColor +import Widget.Material.Color as MaterialColor chip : Palette -> ButtonStyle msg diff --git a/src/Internal/Material/Dialog.elm b/src/Internal/Material/Dialog.elm index 821cd0a..494b32a 100644 --- a/src/Internal/Material/Dialog.elm +++ b/src/Internal/Material/Dialog.elm @@ -6,8 +6,8 @@ import Element.Border as Border import Internal.Dialog exposing (DialogStyle) import Internal.Material.Button as Button import Internal.Material.Palette exposing (Palette) -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography alertDialog : Palette -> DialogStyle msg diff --git a/src/Internal/Material/Item.elm b/src/Internal/Material/Item.elm index de6fe31..b8e8b17 100644 --- a/src/Internal/Material/Item.elm +++ b/src/Internal/Material/Item.elm @@ -19,11 +19,8 @@ import Html.Attributes as Attributes import Internal.Item exposing (DividerStyle, ExpansionItemStyle, HeaderStyle, ImageItemStyle, ItemStyle, MultiLineItemStyle, TextItemStyle) import Internal.Material.Icon as Icon import Internal.Material.Palette exposing (Palette) -import Svg -import Svg.Attributes -import Widget.Icon exposing (Icon) -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography fullBleedDivider : Palette -> ItemStyle (DividerStyle msg) msg diff --git a/src/Internal/Material/Layout.elm b/src/Internal/Material/Layout.elm index 7609607..f134126 100644 --- a/src/Internal/Material/Layout.elm +++ b/src/Internal/Material/Layout.elm @@ -1,6 +1,5 @@ module Internal.Material.Layout exposing (drawerButton, layout, menu, menuTabButton, more_vert, search) -import Color import Element import Element.Background as Background import Element.Border as Border @@ -13,11 +12,11 @@ import Internal.Material.Snackbar as Snackbar import Internal.Material.TextInput as TextInput import Svg import Svg.Attributes +import Widget.Customize as Customize import Widget.Icon as Icon exposing (Icon) import Widget.Layout exposing (LayoutStyle) -import Widget.Style.Customize as Customize -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography more_vert : Icon msg diff --git a/src/Internal/Material/List.elm b/src/Internal/Material/List.elm index 389fd94..aa7c71c 100644 --- a/src/Internal/Material/List.elm +++ b/src/Internal/Material/List.elm @@ -11,7 +11,7 @@ import Element.Border as Border import Element.Font as Font import Internal.List exposing (ColumnStyle, RowStyle) import Internal.Material.Palette exposing (Palette) -import Widget.Style.Material.Color as MaterialColor +import Widget.Material.Color as MaterialColor row : RowStyle msg diff --git a/src/Internal/Material/Snackbar.elm b/src/Internal/Material/Snackbar.elm index 443f682..b3ec937 100644 --- a/src/Internal/Material/Snackbar.elm +++ b/src/Internal/Material/Snackbar.elm @@ -6,9 +6,9 @@ import Element.Border as Border import Element.Font as Font import Internal.Material.Button as Button import Internal.Material.Palette exposing (Palette) +import Widget.Customize as Customize +import Widget.Material.Color as MaterialColor import Widget.Snackbar exposing (SnackbarStyle) -import Widget.Style.Customize as Customize -import Widget.Style.Material.Color as MaterialColor snackbar : Palette -> SnackbarStyle msg diff --git a/src/Internal/Material/Switch.elm b/src/Internal/Material/Switch.elm index 1afaa1f..d9cd75c 100644 --- a/src/Internal/Material/Switch.elm +++ b/src/Internal/Material/Switch.elm @@ -7,7 +7,7 @@ import Element.Border as Border import Html.Attributes as Attributes import Internal.Material.Palette exposing (Palette) import Internal.Switch exposing (SwitchStyle) -import Widget.Style.Material.Color as MaterialColor +import Widget.Material.Color as MaterialColor switch : Palette -> SwitchStyle msg diff --git a/src/Internal/Material/Tab.elm b/src/Internal/Material/Tab.elm index 2e882bf..6358261 100644 --- a/src/Internal/Material/Tab.elm +++ b/src/Internal/Material/Tab.elm @@ -8,8 +8,8 @@ import Internal.Button exposing (ButtonStyle) import Internal.Material.Button as Button import Internal.Material.Palette exposing (Palette) import Internal.Tab exposing (TabStyle) -import Widget.Style.Material.Color as MaterialColor -import Widget.Style.Material.Typography as Typography +import Widget.Material.Color as MaterialColor +import Widget.Material.Typography as Typography tabButton : Palette -> ButtonStyle msg diff --git a/src/Internal/Material/TextInput.elm b/src/Internal/Material/TextInput.elm index 000bf3f..c5e713e 100644 --- a/src/Internal/Material/TextInput.elm +++ b/src/Internal/Material/TextInput.elm @@ -5,8 +5,8 @@ import Element.Border as Border import Internal.Material.Chip as Chip import Internal.Material.Palette exposing (Palette) import Internal.TextInput exposing (TextInputStyle) -import Widget.Style.Customize as Customize -import Widget.Style.Material.Color as MaterialColor +import Widget.Customize as Customize +import Widget.Material.Color as MaterialColor textInput : Palette -> TextInputStyle msg diff --git a/src/Internal/SortTable.elm b/src/Internal/SortTable.elm index 9e3a035..b20f287 100644 --- a/src/Internal/SortTable.elm +++ b/src/Internal/SortTable.elm @@ -10,9 +10,7 @@ module Internal.SortTable exposing , unsortableColumn ) -import Color exposing (Color) import Element exposing (Attribute, Element, Length) -import Html exposing (Html) import Internal.Button as Button exposing (ButtonStyle) import Widget.Icon exposing (Icon) diff --git a/src/Internal/Switch.elm b/src/Internal/Switch.elm index f9d418f..bc77824 100644 --- a/src/Internal/Switch.elm +++ b/src/Internal/Switch.elm @@ -1,11 +1,8 @@ module Internal.Switch exposing (Switch, SwitchStyle, switch) -import Color exposing (Color) import Element exposing (Attribute, Element) import Element.Input as Input import Element.Region as Region -import Html exposing (Html) -import Widget.Icon exposing (Icon) {-| -} diff --git a/src/Internal/Tab.elm b/src/Internal/Tab.elm index 99c1db5..dca9639 100644 --- a/src/Internal/Tab.elm +++ b/src/Internal/Tab.elm @@ -1,11 +1,8 @@ module Internal.Tab exposing (Tab, TabStyle, tab) -import Color exposing (Color) import Element exposing (Attribute, Element) -import Html exposing (Html) import Internal.Button exposing (ButtonStyle) import Internal.Select as Select exposing (Select) -import Widget.Icon exposing (Icon) {-| -} diff --git a/src/Widget/Style/Customize.elm b/src/Widget/Customize.elm similarity index 99% rename from src/Widget/Style/Customize.elm rename to src/Widget/Customize.elm index fbf293c..b599d24 100644 --- a/src/Widget/Style/Customize.elm +++ b/src/Widget/Customize.elm @@ -1,4 +1,4 @@ -module Widget.Style.Customize exposing +module Widget.Customize exposing ( element, mapElement , elementButton, mapElementButton , elementColumn, mapElementColumn diff --git a/src/Widget/Layout.elm b/src/Widget/Layout.elm index bf6a398..70e96b5 100644 --- a/src/Widget/Layout.elm +++ b/src/Widget/Layout.elm @@ -34,9 +34,9 @@ import Internal.Button as Button exposing (Button, ButtonStyle) import Internal.Dialog as Dialog import Internal.Select as Select exposing (Select) import Internal.TextInput as TextInput exposing (TextInput, TextInputStyle) +import Widget.Customize as Customize import Widget.Icon exposing (Icon) import Widget.Snackbar as Snackbar exposing (Message, SnackbarStyle) -import Widget.Style.Customize as Customize {-| -} diff --git a/src/Widget/Style/Material.elm b/src/Widget/Material.elm similarity index 99% rename from src/Widget/Style/Material.elm rename to src/Widget/Material.elm index 630fe34..6cb7386 100644 --- a/src/Widget/Style/Material.elm +++ b/src/Widget/Material.elm @@ -1,4 +1,4 @@ -module Widget.Style.Material exposing +module Widget.Material exposing ( Palette, defaultPalette, darkPalette , containedButton, outlinedButton, textButton , iconButton, toggleButton, buttonRow diff --git a/src/Widget/Style/Material/Color.elm b/src/Widget/Material/Color.elm similarity index 99% rename from src/Widget/Style/Material/Color.elm rename to src/Widget/Material/Color.elm index c3c598a..0db521e 100644 --- a/src/Widget/Style/Material/Color.elm +++ b/src/Widget/Material/Color.elm @@ -1,4 +1,4 @@ -module Widget.Style.Material.Color exposing +module Widget.Material.Color exposing ( buttonHoverOpacity, buttonFocusOpacity, buttonPressedOpacity, buttonDisabledOpacity, buttonSelectedOpacity , accessibleTextColor, accessibleWithTextColor , withShade, scaleOpacity diff --git a/src/Widget/Style/Material/Typography.elm b/src/Widget/Material/Typography.elm similarity index 98% rename from src/Widget/Style/Material/Typography.elm rename to src/Widget/Material/Typography.elm index 7fab641..38717e0 100644 --- a/src/Widget/Style/Material/Typography.elm +++ b/src/Widget/Material/Typography.elm @@ -1,4 +1,4 @@ -module Widget.Style.Material.Typography exposing +module Widget.Material.Typography exposing ( h1, h2, h3, h4, h5, h6 , subtitle1, subtitle2 , body1, body2 diff --git a/tests/Accessibility.elm b/tests/Accessibility.elm index 3d3182f..6048c81 100644 --- a/tests/Accessibility.elm +++ b/tests/Accessibility.elm @@ -9,7 +9,7 @@ import Element.Border import Element.Font import Element.Input import Widget exposing (ButtonStyle, ColumnStyle, RowStyle) -import Widget.Style.Material as Material exposing (Palette) +import Widget.Material as Material exposing (Palette) type alias Style style msg =