Skip to content

Commit 7195cdd

Browse files
committed
Ready for merge
1 parent ddd3b89 commit 7195cdd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+178
-115
lines changed

README.md

+58-40

docs.json

+1-1
Large diffs are not rendered by default.

docs/assets/appBar.png

5.14 KB

docs/assets/button.png

4.01 KB

docs/assets/buttonRow.png

5.61 KB

docs/assets/dialog.png

2.49 KB

docs/assets/icon.png

17 KB

docs/assets/layout.png

6.05 KB

docs/assets/list.png

19.4 KB

docs/assets/material/alertDialog.png

13.4 KB

docs/assets/material/cardColumn.png

12.4 KB

docs/assets/material/chip.png

6.5 KB
9.74 KB
28.1 KB
25.7 KB
26.7 KB
26.1 KB

docs/assets/material/iconButton.png

9.03 KB

docs/assets/material/imageItem.png

25.6 KB

docs/assets/material/insetDivider.png

24.1 KB

docs/assets/material/insetHeader.png

27.1 KB

docs/assets/material/insetItem.png

25.1 KB

docs/assets/material/menuBar.png

8.16 KB
26.3 KB
26.8 KB

docs/assets/material/multiSelect.png

5.98 KB
9.98 KB
5.93 KB

docs/assets/material/selectItem.png

26 KB

docs/assets/material/sideSheet.png

9.86 KB

docs/assets/material/snackbar.png

14.3 KB

docs/assets/material/sortTable.png

12.6 KB

docs/assets/material/switch.png

4.42 KB

docs/assets/material/tab.png

9.78 KB

docs/assets/material/tabBar.png

8.15 KB

docs/assets/material/tabButton.png

8.31 KB

docs/assets/material/textButton.png

9.2 KB

docs/assets/material/textInput.png

9.21 KB

docs/assets/material/toggleButton.png

4.39 KB

docs/assets/modal.png

5.79 KB

docs/assets/multiSelect.png

768 Bytes

docs/assets/progressIndicator.png

441 Bytes

docs/assets/select.png

673 Bytes

docs/assets/sheet.png

5.14 KB

docs/assets/snackbar.png

3.71 KB

docs/assets/sortTable.png

2.25 KB

docs/assets/switch.png

3.01 KB

docs/assets/tab.png

1.61 KB

docs/assets/textInput.png

1.79 KB

elm.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Orasund/elm-ui-widgets",
44
"summary": "Collection of reusable views for elm-ui.",
55
"license": "BSD-3-Clause",
6-
"version": "2.3.0",
6+
"version": "3.0.0",
77
"exposed-modules": [
88
"Widget",
99
"Widget.Material",
@@ -30,4 +30,4 @@
3030
"elm-explorations/test": "1.2.1 <= v < 2.0.0",
3131
"icidasset/elm-material-icons": "5.0.0 <= v < 6.0.0"
3232
}
33-
}
33+
}

src/Widget.elm

+19-36
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ module Widget exposing
88
, RowStyle, row, buttonRow
99
, ColumnStyle, column, buttonColumn
1010
, ItemStyle, Item
11+
, FullBleedItemStyle, fullBleedItem
12+
, InsetItem, InsetItemStyle, insetItem
1113
, ExpansionItemStyle, ExpansionItem, expansionItem
1214
, ImageItemStyle, ImageItem, imageItem
1315
, MultiLineItemStyle, MultiLineItem, multiLineItem
@@ -20,13 +22,10 @@ module Widget exposing
2022
, TextInputStyle, TextInput, textInput
2123
, TabStyle, Tab, tab
2224
, ProgressIndicatorStyle, ProgressIndicator, circularProgressIndicator
23-
, FullBleedItemStyle, InsetItem, InsetItemStyle, fullBleedItem, insetItem
2425
)
2526

2627
{-| This module contains different stateless view functions. No wiring required.
2728
28-
These widgets should be used by defining the styling seperately:
29-
3029
Widget.button Material.primaryButton
3130
{ text = "disable me"
3231
, icon =
@@ -52,33 +51,31 @@ You can create you own widgets by sticking widgets types together.
5251
5352
![Button](https://orasund.github.io/elm-ui-widgets/assets/button.png)
5453
55-
[Open in Ellie](https://ellie-app.com/9p5QGZ3hgPLa1)
56-
5754
@docs ButtonStyle, Button, TextButton, iconButton, textButton, button
5855
5956
6057
# Switch
6158
59+
![Switch](https://orasund.github.io/elm-ui-widgets/assets/switch.png)
60+
6261
@docs SwitchStyle, Switch, switch
6362
6463
6564
# Select
6665
6766
![Select](https://orasund.github.io/elm-ui-widgets/assets/select.png)
6867
69-
[Open in Ellie](https://ellie-app.com/9p5QSzQDMCca1)
70-
7168
@docs Select, selectButton, select
7269
7370
![MultiSelect](https://orasund.github.io/elm-ui-widgets/assets/multiSelect.png)
7471
75-
[Open in Ellie](https://ellie-app.com/9p5R5crjqfya1)
76-
7772
@docs MultiSelect, multiSelect
7873
7974
8075
# Modal
8176
77+
![Modal](https://orasund.github.io/elm-ui-widgets/assets/modal.png)
78+
8279
@docs Modal, singleModal, multiModal
8380
8481
@@ -110,8 +107,9 @@ You can create you own widgets by sticking widgets types together.
110107
111108
## Item
112109
113-
@docs ItemStyle, FullBleedStyle, Item, item
114-
@docs TextItemStyle, TextItem, textItem
110+
@docs ItemStyle, Item
111+
@docs FullBleedItemStyle, fullBleedItem
112+
@docs InsetItem, InsetItemStyle, insetItem
115113
@docs ExpansionItemStyle, ExpansionItem, expansionItem
116114
@docs ImageItemStyle, ImageItem, imageItem
117115
@docs MultiLineItemStyle, MultiLineItem, multiLineItem
@@ -123,14 +121,14 @@ You can create you own widgets by sticking widgets types together.
123121
124122
# App Bar
125123
124+
![App Bar](https://orasund.github.io/elm-ui-widgets/assets/appBar.png)
125+
126126
@docs AppBarStyle, menuBar, tabBar
127127
128128
129129
# Sort Table
130130
131-
![SortTable](https://orasund.github.io/elm-ui-widgets/assets/sortTable.png)
132-
133-
[Open in Ellie](https://ellie-app.com/9p5RXw44B4Ja1)
131+
![Sort Table](https://orasund.github.io/elm-ui-widgets/assets/sortTable.png)
134132
135133
@docs SortTableStyle, SortTable, Column, sortTable, floatColumn, intColumn, stringColumn, unsortableColumn
136134
@@ -139,26 +137,20 @@ You can create you own widgets by sticking widgets types together.
139137
140138
![textInput](https://orasund.github.io/elm-ui-widgets/assets/textInput.png)
141139
142-
[Open in Ellie](https://ellie-app.com/9p5S6cvWCmBa1)
143-
144140
@docs TextInputStyle, TextInput, textInput
145141
146142
147143
# Tab
148144
149145
![tab](https://orasund.github.io/elm-ui-widgets/assets/tab.png)
150146
151-
[Open in Ellie](https://ellie-app.com/9p5Sdbvp4jZa1)
152-
153147
@docs TabStyle, Tab, tab
154148
155149
156150
# Progress Indicator
157151
158152
![progress Indicator](https://orasund.github.io/elm-ui-widgets/assets/progressIndicator.png)
159153
160-
[Open in Ellie](https://ellie-app.com/c47GJktH2bqa1)
161-
162154
@docs ProgressIndicatorStyle, ProgressIndicator, circularProgressIndicator
163155
164156
-}
@@ -572,6 +564,7 @@ multiSelect =
572564
----------------------------------------------------------}
573565

574566

567+
{-| -}
575568
type alias Modal msg =
576569
{ onDismiss : Maybe msg
577570
, content : Element msg
@@ -1103,18 +1096,14 @@ headerItem =
11031096
{ onPress = Nothing
11041097
, icon = always Element.none
11051098
, text = "Item"
1106-
, content =
1107-
\{ size, color } ->
1108-
Element.none
1099+
, content = always Element.none
11091100
}
11101101
, Widget.divider (Material.insetDivider Material.defaultPalette )
11111102
, Widget.insetItem (Material.insetItem Material.defaultPalette)
11121103
{ onPress = Nothing
11131104
, icon = always Element.none
11141105
, text = "Item"
1115-
, content =
1116-
\{ size, color } ->
1117-
Element.none
1106+
, content = always Element.none
11181107
}
11191108
]
11201109
|> Widget.itemList (Material.cardColumn Material.defaultPalette)
@@ -1149,9 +1138,7 @@ insetItem =
11491138
, onPress = Nothing
11501139
, icon = always Element.none
11511140
, text = "Item"
1152-
, content =
1153-
\{ size, color } ->
1154-
Element.none
1141+
, content = always Element.none
11551142
}
11561143
]
11571144
|> Widget.itemList (Material.cardColumn Material.defaultPalette)
@@ -1228,8 +1215,6 @@ imageItem =
12281215
12291216
import Element
12301217
import Widget.Material as Material
1231-
import Widget.Material.Color as MaterialColor
1232-
import Element.Font as Font
12331218
12341219
type Msg =
12351220
Toggle Bool
@@ -1239,13 +1224,13 @@ imageItem =
12391224
isExpanded =
12401225
True
12411226
in
1242-
( [ Widget.fullBleedItem (Material.fullBleedItem Material.defaultPalette)
1227+
( ( Widget.fullBleedItem (Material.fullBleedItem Material.defaultPalette)
12431228
{ onPress = Nothing
12441229
, icon = always Element.none
12451230
, text = "Item with Icon"
12461231
}
1247-
]
1248-
++ Widget.expansionItem (Material.expansionItem Material.defaultPalette )
1232+
)
1233+
:: Widget.expansionItem (Material.expansionItem Material.defaultPalette )
12491234
{ onToggle = Toggle
12501235
, isExpanded = isExpanded
12511236
, icon = always Element.none
@@ -1286,8 +1271,6 @@ expansionItem =
12861271
12871272
import Element
12881273
import Widget.Material as Material
1289-
import Widget.Material.Color as MaterialColor
1290-
import Element.Font as Font
12911274
12921275
type Msg =
12931276
Select Int

src/Widget/Customize.elm

-15
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@ module Widget.Customize exposing
1717

1818
{-| Each and every widget can be customized by modifing the Style Type.
1919
20-
{- Make a button fill the full width -}
21-
Widget.textButton
22-
( Material.containedButton
23-
|> (\record ->
24-
{ record
25-
| element = record.element ++ [Element.width Element.fill]
26-
}
27-
)
28-
)
29-
{ onPress = Just PressedButton
30-
, text = "Press Button"
31-
}
32-
33-
This module will contain helpfull functions to make customization easier.
34-
3520
{- Make a button fill the full width -}
3621
Widget.textButton
3722
( Material.containedButton

0 commit comments

Comments
 (0)