From 68396a37175a796a4a591407ba153ddb772db44b Mon Sep 17 00:00:00 2001 From: Lucas Payr Date: Fri, 5 Feb 2021 21:07:11 +0100 Subject: [PATCH] update Website --- docs/3.0.0/index.html | 7334 +++++++------ docs/index.html | 7334 +++++++------ example/index.html | 22683 ---------------------------------------- 3 files changed, 8452 insertions(+), 28899 deletions(-) delete mode 100644 example/index.html diff --git a/docs/3.0.0/index.html b/docs/3.0.0/index.html index 0913684..b6cdf88 100644 --- a/docs/3.0.0/index.html +++ b/docs/3.0.0/index.html @@ -5257,6 +5257,9 @@ var $author$project$Main$LoadedSpecific = function (a) { var $author$project$Main$Resized = function (a) { return {$: 'Resized', a: a}; }; +var $author$project$Main$StatelessSpecific = function (a) { + return {$: 'StatelessSpecific', a: a}; +}; var $author$project$Main$TimePassed = function (a) { return {$: 'TimePassed', a: a}; }; @@ -5898,128 +5901,16 @@ var $elm$browser$Browser$Events$onResize = function (func) { A2($elm$json$Json$Decode$field, 'innerWidth', $elm$json$Json$Decode$int), A2($elm$json$Json$Decode$field, 'innerHeight', $elm$json$Json$Decode$int)))); }; -var $author$project$Main$subscriptions = function (_v0) { - return A2( - $elm$core$Platform$Sub$map, - $author$project$Main$LoadedSpecific, - $elm$core$Platform$Sub$batch( - _List_fromArray( - [ - A2( - $elm$time$Time$every, - 50, - $elm$core$Basics$always( - $author$project$Main$TimePassed(50))), - $elm$browser$Browser$Events$onResize( - F2( - function (h, w) { - return $author$project$Main$Resized( - {height: h, width: w}); - })) - ]))); -}; -var $author$project$Main$Loaded = function (a) { - return {$: 'Loaded', a: a}; -}; -var $author$project$Main$Idle = {$: 'Idle'}; -var $author$project$Data$Theme$Material = {$: 'Material'}; -var $author$project$Main$StatelessSpecific = function (a) { - return {$: 'StatelessSpecific', a: a}; -}; -var $author$project$Main$UpdateScrollingNav = function (a) { - return {$: 'UpdateScrollingNav', a: a}; -}; -var $author$project$Data$Example$ButtonExample = {$: 'ButtonExample'}; -var $author$project$Data$Example$DialogExample = {$: 'DialogExample'}; -var $author$project$Data$Example$IconExample = {$: 'IconExample'}; -var $author$project$Data$Example$ListExample = {$: 'ListExample'}; -var $author$project$Data$Example$ModalExample = {$: 'ModalExample'}; -var $author$project$Data$Example$MultiSelectExample = {$: 'MultiSelectExample'}; -var $author$project$Data$Example$ProgressIndicatorExample = {$: 'ProgressIndicatorExample'}; -var $author$project$Data$Example$SelectExample = {$: 'SelectExample'}; -var $author$project$Data$Example$SortTableExample = {$: 'SortTableExample'}; -var $author$project$Data$Example$SwitchExample = {$: 'SwitchExample'}; -var $author$project$Data$Example$TabExample = {$: 'TabExample'}; -var $author$project$Data$Example$TextInputExample = {$: 'TextInputExample'}; -var $elm$core$List$sortBy = _List_sortBy; -var $author$project$Data$Example$toString = function (example) { - switch (example.$) { - case 'ButtonExample': - return 'Button'; - case 'SwitchExample': - return 'Switch'; - case 'SelectExample': - return 'Select'; - case 'MultiSelectExample': - return 'Multi Select'; - case 'TabExample': - return 'Tab'; - case 'SortTableExample': - return 'SortTable'; - case 'ModalExample': - return 'Modal'; - case 'DialogExample': - return 'Dialog'; - case 'TextInputExample': - return 'TextInput'; - case 'ListExample': - return 'List'; - case 'ProgressIndicatorExample': - return 'Progress Indicator'; - default: - return 'Icon'; - } -}; -var $author$project$Data$Example$asList = A2( - $elm$core$List$sortBy, - $author$project$Data$Example$toString, - _List_fromArray( - [$author$project$Data$Example$ButtonExample, $author$project$Data$Example$SwitchExample, $author$project$Data$Example$SelectExample, $author$project$Data$Example$MultiSelectExample, $author$project$Data$Example$TabExample, $author$project$Data$Example$SortTableExample, $author$project$Data$Example$ModalExample, $author$project$Data$Example$DialogExample, $author$project$Data$Example$TextInputExample, $author$project$Data$Example$ListExample, $author$project$Data$Example$ProgressIndicatorExample, $author$project$Data$Example$IconExample])); -var $elm$core$Platform$Cmd$batch = _Platform_batch; -var $turboMaCk$any_set$Set$Any$AnySet = function (a) { - return {$: 'AnySet', a: a}; -}; -var $turboMaCk$any_dict$Dict$Any$AnyDict = function (a) { - return {$: 'AnyDict', a: a}; -}; -var $turboMaCk$any_dict$Dict$Any$empty = function (toKey) { - return $turboMaCk$any_dict$Dict$Any$AnyDict( - {dict: $elm$core$Dict$empty, toKey: toKey}); -}; -var $turboMaCk$any_set$Set$Any$empty = A2($elm$core$Basics$composeL, $turboMaCk$any_set$Set$Any$AnySet, $turboMaCk$any_dict$Dict$Any$empty); -var $author$project$Data$Example$fromString = function (string) { - switch (string) { - case 'Button': - return $elm$core$Maybe$Just($author$project$Data$Example$ButtonExample); - case 'Switch': - return $elm$core$Maybe$Just($author$project$Data$Example$SwitchExample); - case 'Select': - return $elm$core$Maybe$Just($author$project$Data$Example$SelectExample); - case 'Multi Select': - return $elm$core$Maybe$Just($author$project$Data$Example$MultiSelectExample); - case 'Tab': - return $elm$core$Maybe$Just($author$project$Data$Example$TabExample); - case 'SortTable': - return $elm$core$Maybe$Just($author$project$Data$Example$SortTableExample); - case 'Modal': - return $elm$core$Maybe$Just($author$project$Data$Example$ModalExample); - case 'Dialog': - return $elm$core$Maybe$Just($author$project$Data$Example$DialogExample); - case 'TextInput': - return $elm$core$Maybe$Just($author$project$Data$Example$TextInputExample); - case 'List': - return $elm$core$Maybe$Just($author$project$Data$Example$ListExample); - case 'Progress Indicator': - return $elm$core$Maybe$Just($author$project$Data$Example$ProgressIndicatorExample); - case 'Icon': - return $elm$core$Maybe$Just($author$project$Data$Example$IconExample); - default: - return $elm$core$Maybe$Nothing; - } +var $elm$core$List$singleton = function (value) { + return _List_fromArray( + [value]); }; var $author$project$Stateless$ExampleSpecific = function (a) { return {$: 'ExampleSpecific', a: a}; }; +var $author$project$Data$Example$AppBar = function (a) { + return {$: 'AppBar', a: a}; +}; var $author$project$Data$Example$Button = function (a) { return {$: 'Button', a: a}; }; @@ -6029,6 +5920,9 @@ var $author$project$Data$Example$Dialog = function (a) { var $author$project$Data$Example$Icon = function (a) { return {$: 'Icon', a: a}; }; +var $author$project$Data$Example$Layout = function (a) { + return {$: 'Layout', a: a}; +}; var $author$project$Data$Example$List = function (a) { return {$: 'List', a: a}; }; @@ -6044,6 +5938,12 @@ var $author$project$Data$Example$ProgressIndicator = function (a) { var $author$project$Data$Example$Select = function (a) { return {$: 'Select', a: a}; }; +var $author$project$Data$Example$Sheet = function (a) { + return {$: 'Sheet', a: a}; +}; +var $author$project$Data$Example$Snackbar = function (a) { + return {$: 'Snackbar', a: a}; +}; var $author$project$Data$Example$SortTable = function (a) { return {$: 'SortTable', a: a}; }; @@ -6056,459 +5956,144 @@ var $author$project$Data$Example$Tab = function (a) { var $author$project$Data$Example$TextInput = function (a) { return {$: 'TextInput', a: a}; }; +var $elm$core$Platform$Sub$none = $elm$core$Platform$Sub$batch(_List_Nil); +var $author$project$Example$AppBar$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Button$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Dialog$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Icon$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Layout$Resized = function (a) { + return {$: 'Resized', a: a}; +}; +var $author$project$Example$Layout$TimePassed = function (a) { + return {$: 'TimePassed', a: a}; +}; +var $author$project$Example$Layout$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$batch( + _List_fromArray( + [ + $elm$browser$Browser$Events$onResize( + F2( + function (h, w) { + return $author$project$Example$Layout$Resized( + {height: h, width: w}); + })), + A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Example$Layout$TimePassed(50))) + ])); +}; +var $author$project$Example$List$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Modal$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$MultiSelect$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$ProgressIndicator$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Select$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Sheet$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Snackbar$TimePassed = function (a) { + return {$: 'TimePassed', a: a}; +}; +var $author$project$Example$Snackbar$subscriptions = function (_v0) { + return A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Example$Snackbar$TimePassed(50))); +}; +var $author$project$Example$SortTable$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Switch$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Tab$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$TextInput$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $elm$core$Platform$Cmd$batch = _Platform_batch; var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); -var $author$project$Example$Button$init = _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); +var $author$project$Example$AppBar$update = F2( + function (msg, menu) { + switch (msg.$) { + case 'SetDesign': + var bool = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {isMenuBar: bool}), + $elm$core$Platform$Cmd$none); + case 'SetSelected': + var _int = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {selected: _int}), + $elm$core$Platform$Cmd$none); + default: + var string = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {search: string}), + $elm$core$Platform$Cmd$none); + } + }); +var $elm$core$Basics$ge = _Utils_ge; +var $author$project$Example$Button$update = F2( + function (msg, model) { + switch (msg.$) { + case 'Increase': + var _int = msg.a; + return _Utils_Tuple2(model + _int, $elm$core$Platform$Cmd$none); + case 'Decrease': + var _int = msg.a; + return _Utils_Tuple2( + ((model - _int) >= 0) ? (model - _int) : model, + $elm$core$Platform$Cmd$none); + default: + return _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); + } + }); var $author$project$Example$Dialog$IsOpen = function (a) { return {$: 'IsOpen', a: a}; }; -var $author$project$Example$Dialog$init = _Utils_Tuple2( - $author$project$Example$Dialog$IsOpen(true), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Icon$init = _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); -var $author$project$Example$List$IsExpanded = function (a) { - return {$: 'IsExpanded', a: a}; -}; -var $author$project$Example$List$init = _Utils_Tuple2( - $author$project$Example$List$IsExpanded(false), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Modal$IsEnabled = function (a) { - return {$: 'IsEnabled', a: a}; -}; -var $author$project$Example$Modal$init = _Utils_Tuple2( - $author$project$Example$Modal$IsEnabled(true), - $elm$core$Platform$Cmd$none); -var $author$project$Example$MultiSelect$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $elm$core$Set$Set_elm_builtin = function (a) { - return {$: 'Set_elm_builtin', a: a}; -}; -var $elm$core$Set$empty = $elm$core$Set$Set_elm_builtin($elm$core$Dict$empty); -var $author$project$Example$MultiSelect$init = _Utils_Tuple2( - $author$project$Example$MultiSelect$Selected($elm$core$Set$empty), - $elm$core$Platform$Cmd$none); -var $author$project$Example$ProgressIndicator$MaybeProgress = function (a) { - return {$: 'MaybeProgress', a: a}; -}; -var $author$project$Example$ProgressIndicator$init = _Utils_Tuple2( - $author$project$Example$ProgressIndicator$MaybeProgress($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Select$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $author$project$Example$Select$init = _Utils_Tuple2( - $author$project$Example$Select$Selected($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$SortTable$init = _Utils_Tuple2( - {asc: true, title: 'Name'}, - $elm$core$Platform$Cmd$none); -var $author$project$Example$Switch$IsButtonEnabled = function (a) { - return {$: 'IsButtonEnabled', a: a}; -}; -var $author$project$Example$Switch$init = _Utils_Tuple2( - $author$project$Example$Switch$IsButtonEnabled(false), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Tab$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $author$project$Example$Tab$init = _Utils_Tuple2( - $author$project$Example$Tab$Selected($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$TextInput$init = _Utils_Tuple2( - {chipTextInput: $elm$core$Set$empty, textInput: ''}, - $elm$core$Platform$Cmd$none); -var $elm$core$Platform$Cmd$map = _Platform_map; -var $author$project$Data$Example$init = function () { - var _v0 = $author$project$Example$TextInput$init; - var textInputModel = _v0.a; - var textInputMsg = _v0.b; - var _v1 = $author$project$Example$Tab$init; - var tabModel = _v1.a; - var tabMsg = _v1.b; - var _v2 = $author$project$Example$Switch$init; - var switchModel = _v2.a; - var switchMsg = _v2.b; - var _v3 = $author$project$Example$SortTable$init; - var sortTableModel = _v3.a; - var sortTableMsg = _v3.b; - var _v4 = $author$project$Example$Select$init; - var selectModel = _v4.a; - var selectMsg = _v4.b; - var _v5 = $author$project$Example$ProgressIndicator$init; - var progressIndicatorModel = _v5.a; - var progressIndicatorMsg = _v5.b; - var _v6 = $author$project$Example$MultiSelect$init; - var multiSelectModel = _v6.a; - var multiSelectMsg = _v6.b; - var _v7 = $author$project$Example$Modal$init; - var modalModel = _v7.a; - var modalMsg = _v7.b; - var _v8 = $author$project$Example$List$init; - var listModel = _v8.a; - var listMsg = _v8.b; - var _v9 = $author$project$Example$Icon$init; - var iconModel = _v9.a; - var iconMsg = _v9.b; - var _v10 = $author$project$Example$Dialog$init; - var dialogModel = _v10.a; - var dialogMsg = _v10.b; - var _v11 = $author$project$Example$Button$init; - var buttonModel = _v11.a; - var buttonMsg = _v11.b; - return _Utils_Tuple2( - {button: buttonModel, dialog: dialogModel, icon: iconModel, list: listModel, modal: modalModel, multiSelect: multiSelectModel, progressIndicator: progressIndicatorModel, select: selectModel, sortTable: sortTableModel, _switch: switchModel, tab: tabModel, textInput: textInputModel}, - $elm$core$Platform$Cmd$batch( - _List_fromArray( - [ - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Button, buttonMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Switch, switchMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Select, selectMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$MultiSelect, multiSelectMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Tab, tabMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$SortTable, sortTableMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Modal, modalMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Dialog, dialogMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$TextInput, textInputMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$List, listMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$ProgressIndicator, progressIndicatorMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Icon, iconMsg) - ]))); -}(); -var $author$project$Stateless$init = function () { - var _v0 = $author$project$Data$Example$init; - var example = _v0.a; - var cmd = _v0.b; - return _Utils_Tuple2( - {carousel: 0, example: example}, - A2($elm$core$Platform$Cmd$map, $author$project$Stateless$ExampleSpecific, cmd)); -}(); +var $author$project$Example$Dialog$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Dialog$IsOpen(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$Icon$update = F2( + function (msg, _v0) { + return _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); + }); var $turboMaCk$queue$Queue$Queue = F2( function (a, b) { return {$: 'Queue', a: a, b: b}; }); -var $turboMaCk$queue$Queue$empty = A2($turboMaCk$queue$Queue$Queue, _List_Nil, _List_Nil); -var $author$project$Widget$Snackbar$init = {current: $elm$core$Maybe$Nothing, queue: $turboMaCk$queue$Queue$empty}; -var $author$project$Widget$Layout$init = {active: $elm$core$Maybe$Nothing, snackbar: $author$project$Widget$Snackbar$init}; -var $elm$core$Task$onError = _Scheduler_onError; -var $elm$core$Task$attempt = F2( - function (resultToMessage, task) { - return $elm$core$Task$command( - $elm$core$Task$Perform( - A2( - $elm$core$Task$onError, - A2( - $elm$core$Basics$composeL, - A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), - $elm$core$Result$Err), - A2( - $elm$core$Task$andThen, - A2( - $elm$core$Basics$composeL, - A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), - $elm$core$Result$Ok), - task)))); - }); -var $elm_community$intdict$IntDict$Empty = {$: 'Empty'}; -var $elm_community$intdict$IntDict$empty = $elm_community$intdict$IntDict$Empty; -var $elm$browser$Browser$Dom$getElement = _Browser_getElement; -var $elm_community$intdict$IntDict$Inner = function (a) { - return {$: 'Inner', a: a}; -}; -var $elm_community$intdict$IntDict$size = function (dict) { - switch (dict.$) { - case 'Empty': - return 0; - case 'Leaf': - return 1; - default: - var i = dict.a; - return i.size; - } -}; -var $elm_community$intdict$IntDict$inner = F3( - function (p, l, r) { - var _v0 = _Utils_Tuple2(l, r); - if (_v0.a.$ === 'Empty') { - var _v1 = _v0.a; - return r; - } else { - if (_v0.b.$ === 'Empty') { - var _v2 = _v0.b; - return l; - } else { - return $elm_community$intdict$IntDict$Inner( - { - left: l, - prefix: p, - right: r, - size: $elm_community$intdict$IntDict$size(l) + $elm_community$intdict$IntDict$size(r) - }); - } - } - }); -var $elm$core$Bitwise$and = _Bitwise_and; -var $elm$core$Basics$composeR = F3( - function (f, g, x) { - return g( - f(x)); - }); -var $elm$core$Basics$neq = _Utils_notEqual; -var $elm$core$Bitwise$complement = _Bitwise_complement; -var $elm$core$Bitwise$or = _Bitwise_or; -var $elm$core$Bitwise$shiftRightZfBy = _Bitwise_shiftRightZfBy; -var $elm_community$intdict$IntDict$highestBitSet = function (n) { - var shiftOr = F2( - function (i, shift) { - return i | (i >>> shift); - }); - var n1 = A2(shiftOr, n, 1); - var n2 = A2(shiftOr, n1, 2); - var n3 = A2(shiftOr, n2, 4); - var n4 = A2(shiftOr, n3, 8); - var n5 = A2(shiftOr, n4, 16); - return n5 & (~(n5 >>> 1)); -}; -var $elm$core$Basics$negate = function (n) { - return -n; -}; -var $elm_community$intdict$IntDict$signBit = $elm_community$intdict$IntDict$highestBitSet(-1); -var $elm$core$Bitwise$xor = _Bitwise_xor; -var $elm_community$intdict$IntDict$isBranchingBitSet = function (p) { - return A2( - $elm$core$Basics$composeR, - $elm$core$Bitwise$xor($elm_community$intdict$IntDict$signBit), - A2( - $elm$core$Basics$composeR, - $elm$core$Bitwise$and(p.branchingBit), - $elm$core$Basics$neq(0))); -}; -var $elm_community$intdict$IntDict$higherBitMask = function (branchingBit) { - return branchingBit ^ (~(branchingBit - 1)); -}; -var $elm_community$intdict$IntDict$lcp = F2( - function (x, y) { - var branchingBit = $elm_community$intdict$IntDict$highestBitSet(x ^ y); - var mask = $elm_community$intdict$IntDict$higherBitMask(branchingBit); - var prefixBits = x & mask; - return {branchingBit: branchingBit, prefixBits: prefixBits}; - }); -var $elm_community$intdict$IntDict$Leaf = function (a) { - return {$: 'Leaf', a: a}; -}; -var $elm_community$intdict$IntDict$leaf = F2( - function (k, v) { - return $elm_community$intdict$IntDict$Leaf( - {key: k, value: v}); - }); -var $elm_community$intdict$IntDict$prefixMatches = F2( - function (p, n) { - return _Utils_eq( - n & $elm_community$intdict$IntDict$higherBitMask(p.branchingBit), - p.prefixBits); - }); -var $elm_community$intdict$IntDict$update = F3( - function (key, alter, dict) { - var join = F2( - function (_v2, _v3) { - var k1 = _v2.a; - var l = _v2.b; - var k2 = _v3.a; - var r = _v3.b; - var prefix = A2($elm_community$intdict$IntDict$lcp, k1, k2); - return A2($elm_community$intdict$IntDict$isBranchingBitSet, prefix, k2) ? A3($elm_community$intdict$IntDict$inner, prefix, l, r) : A3($elm_community$intdict$IntDict$inner, prefix, r, l); - }); - var alteredNode = function (mv) { - var _v1 = alter(mv); - if (_v1.$ === 'Just') { - var v = _v1.a; - return A2($elm_community$intdict$IntDict$leaf, key, v); - } else { - return $elm_community$intdict$IntDict$empty; - } - }; - switch (dict.$) { - case 'Empty': - return alteredNode($elm$core$Maybe$Nothing); - case 'Leaf': - var l = dict.a; - return _Utils_eq(l.key, key) ? alteredNode( - $elm$core$Maybe$Just(l.value)) : A2( - join, - _Utils_Tuple2( - key, - alteredNode($elm$core$Maybe$Nothing)), - _Utils_Tuple2(l.key, dict)); - default: - var i = dict.a; - return A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key) ? (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key) ? A3( - $elm_community$intdict$IntDict$inner, - i.prefix, - i.left, - A3($elm_community$intdict$IntDict$update, key, alter, i.right)) : A3( - $elm_community$intdict$IntDict$inner, - i.prefix, - A3($elm_community$intdict$IntDict$update, key, alter, i.left), - i.right)) : A2( - join, - _Utils_Tuple2( - key, - alteredNode($elm$core$Maybe$Nothing)), - _Utils_Tuple2(i.prefix.prefixBits, dict)); - } - }); -var $elm_community$intdict$IntDict$insert = F3( - function (key, value, dict) { - return A3( - $elm_community$intdict$IntDict$update, - key, - $elm$core$Basics$always( - $elm$core$Maybe$Just(value)), - dict); - }); -var $elm$core$Basics$round = _Basics_round; -var $author$project$Widget$ScrollingNav$syncPositions = function (_v0) { - var toString = _v0.toString; - var arrangement = _v0.arrangement; - var fun = F2( - function (_v1, model) { - var pos = _v1.a; - var label = _v1.b; - return _Utils_update( - model, - { - positions: A3( - $elm_community$intdict$IntDict$insert, - pos, - model.toString(label), - model.positions) - }); - }); - return A2( - $elm$core$Task$map, - F2( - function (list, m) { - return A3($elm$core$List$foldl, fun, m, list); - }), - $elm$core$Task$sequence( - A2( - $elm$core$List$map, - function (label) { - return A2( - $elm$core$Task$map, - function (x) { - return _Utils_Tuple2( - $elm$core$Basics$round(x.element.y), - label); - }, - $elm$browser$Browser$Dom$getElement( - toString(label))); - }, - arrangement))); -}; -var $author$project$Widget$ScrollingNav$init = function (_v0) { - var toString = _v0.toString; - var fromString = _v0.fromString; - var arrangement = _v0.arrangement; - var toMsg = _v0.toMsg; - return function (a) { - return _Utils_Tuple2( - a, - A2( - $elm$core$Task$attempt, - toMsg, - $author$project$Widget$ScrollingNav$syncPositions(a))); - }( - {arrangement: arrangement, fromString: fromString, positions: $elm_community$intdict$IntDict$empty, scrollPos: 0, toString: toString}); -}; -var $author$project$Main$initialModel = function (_v0) { - var viewport = _v0.viewport; - var _v1 = $author$project$Stateless$init; - var stateless = _v1.a; - var statelessCmd = _v1.b; - var _v2 = $author$project$Widget$ScrollingNav$init( - { - arrangement: $author$project$Data$Example$asList, - fromString: $author$project$Data$Example$fromString, - toMsg: function (result) { - if (result.$ === 'Ok') { - var fun = result.a; - return $author$project$Main$UpdateScrollingNav(fun); - } else { - return $author$project$Main$Idle; - } - }, - toString: $author$project$Data$Example$toString - }); - var scrollingNav = _v2.a; - var cmd = _v2.b; - return _Utils_Tuple2( - { - displayDialog: false, - expanded: $turboMaCk$any_set$Set$Any$empty($author$project$Data$Example$toString), - layout: $author$project$Widget$Layout$init, - scrollingNav: scrollingNav, - search: {current: '', raw: '', remaining: 0}, - stateless: stateless, - theme: $author$project$Data$Theme$Material, - window: { - height: $elm$core$Basics$round(viewport.height), - width: $elm$core$Basics$round(viewport.width) - } - }, - $elm$core$Platform$Cmd$batch( - _List_fromArray( - [ - cmd, - A2($elm$core$Platform$Cmd$map, $author$project$Main$StatelessSpecific, statelessCmd) - ]))); -}; -var $elm$core$Tuple$mapBoth = F3( - function (funcA, funcB, _v0) { - var x = _v0.a; - var y = _v0.b; - return _Utils_Tuple2( - funcA(x), - funcB(y)); - }); -var $author$project$Main$AddSnackbar = function (a) { - return {$: 'AddSnackbar', a: a}; -}; -var $author$project$Widget$Layout$activate = F2( - function (part, layout) { - return _Utils_update( - layout, - {active: part}); - }); -var $author$project$Widget$ScrollingNav$getPos = A2( - $elm$core$Task$map, - F2( - function (_int, model) { - return _Utils_update( - model, - { - scrollPos: $elm$core$Basics$round(_int.viewport.y) - }); - }), - $elm$browser$Browser$Dom$getViewport); -var $elm$browser$Browser$Dom$setViewport = _Browser_setViewport; -var $author$project$Widget$ScrollingNav$jumpTo = F2( - function (_v0, _v1) { - var section = _v0.section; - var onChange = _v0.onChange; - var toString = _v1.toString; - return A2( - $elm$core$Task$attempt, - onChange, - A2( - $elm$core$Task$andThen, - function (_v2) { - var element = _v2.element; - return A2($elm$browser$Browser$Dom$setViewport, 0, element.y); - }, - $elm$browser$Browser$Dom$getElement( - toString(section)))); - }); -var $elm$browser$Browser$Navigation$load = _Browser_load; var $turboMaCk$queue$Queue$queue = F2( function (fl, rl) { if (!fl.b) { @@ -6551,14 +6136,6 @@ var $author$project$Widget$Snackbar$insertFor = F3( } }); var $author$project$Widget$Snackbar$insert = $author$project$Widget$Snackbar$insertFor(10000); -var $author$project$Widget$Layout$queueMessage = F2( - function (message, layout) { - return _Utils_update( - layout, - { - snackbar: A2($author$project$Widget$Snackbar$insert, message, layout.snackbar) - }); - }); var $turboMaCk$queue$Queue$dequeue = function (_v0) { var fl = _v0.a; var rl = _v0.b; @@ -6597,6 +6174,9 @@ var $elm$core$Tuple$mapSecond = F2( x, func(y)); }); +var $elm$core$Basics$negate = function (n) { + return -n; +}; var $author$project$Widget$Snackbar$timePassed = F2( function (ms, model) { var _v0 = model.current; @@ -6621,51 +6201,114 @@ var $author$project$Widget$Snackbar$timePassed = F2( }); } }); -var $author$project$Widget$Layout$timePassed = F2( - function (sec, layout) { - var _v0 = layout.active; - _v0$2: - while (true) { - if (_v0.$ === 'Just') { - switch (_v0.a.$) { - case 'LeftSheet': - var _v1 = _v0.a; - return layout; - case 'RightSheet': - var _v2 = _v0.a; - return layout; - default: - break _v0$2; - } - } else { - break _v0$2; - } +var $author$project$Example$Layout$update = F2( + function (msg, model) { + switch (msg.$) { + case 'ChangedSidebar': + var maybePart = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {active: maybePart}), + $elm$core$Platform$Cmd$none); + case 'Resized': + var window = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {window: window}), + $elm$core$Platform$Cmd$none); + case 'SetSelected': + var _int = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {selected: _int}), + $elm$core$Platform$Cmd$none); + case 'AddSnackbar': + return _Utils_Tuple2( + _Utils_update( + model, + { + snackbar: A2($author$project$Widget$Snackbar$insert, 'This is a message', model.snackbar) + }), + $elm$core$Platform$Cmd$none); + case 'ShowDialog': + var bool = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {showDialog: bool}), + $elm$core$Platform$Cmd$none); + case 'SetSearchText': + var maybeString = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {searchText: maybeString}), + $elm$core$Platform$Cmd$none); + default: + var sec = msg.a; + return _Utils_Tuple2( + function () { + var _v1 = model.active; + _v1$2: + while (true) { + if (_v1.$ === 'Just') { + switch (_v1.a.$) { + case 'LeftSheet': + var _v2 = _v1.a; + return model; + case 'RightSheet': + var _v3 = _v1.a; + return model; + default: + break _v1$2; + } + } else { + break _v1$2; + } + } + return _Utils_update( + model, + { + snackbar: A2($author$project$Widget$Snackbar$timePassed, sec, model.snackbar) + }); + }(), + $elm$core$Platform$Cmd$none); } - return _Utils_update( - layout, - { - snackbar: A2($author$project$Widget$Snackbar$timePassed, sec, layout.snackbar) - }); }); -var $turboMaCk$any_dict$Dict$Any$insert = F3( - function (k, v, _v0) { - var inner = _v0.a; - return $turboMaCk$any_dict$Dict$Any$AnyDict( - _Utils_update( - inner, - { - dict: A3( - $elm$core$Dict$insert, - inner.toKey(k), - _Utils_Tuple2(k, v), - inner.dict) - })); +var $author$project$Example$List$IsExpanded = function (a) { + return {$: 'IsExpanded', a: a}; +}; +var $author$project$Example$List$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$List$IsExpanded(bool), + $elm$core$Platform$Cmd$none); }); -var $turboMaCk$any_set$Set$Any$insert = F2( - function (a, _v0) { +var $author$project$Example$Modal$IsEnabled = function (a) { + return {$: 'IsEnabled', a: a}; +}; +var $author$project$Example$Modal$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Modal$IsEnabled(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$MultiSelect$Selected = function (a) { + return {$: 'Selected', a: a}; +}; +var $elm$core$Set$Set_elm_builtin = function (a) { + return {$: 'Set_elm_builtin', a: a}; +}; +var $elm$core$Set$insert = F2( + function (key, _v0) { var dict = _v0.a; - return $turboMaCk$any_set$Set$Any$AnySet( - A3($turboMaCk$any_dict$Dict$Any$insert, a, _Utils_Tuple0, dict)); + return $elm$core$Set$Set_elm_builtin( + A3($elm$core$Dict$insert, key, _Utils_Tuple0, dict)); }); var $elm$core$Dict$member = F2( function (key, dict) { @@ -6676,19 +6319,10 @@ var $elm$core$Dict$member = F2( return false; } }); -var $turboMaCk$any_dict$Dict$Any$member = F2( - function (k, _v0) { - var dict = _v0.a.dict; - var toKey = _v0.a.toKey; - return A2( - $elm$core$Dict$member, - toKey(k), - dict); - }); -var $turboMaCk$any_set$Set$Any$member = F2( - function (a, _v0) { +var $elm$core$Set$member = F2( + function (key, _v0) { var dict = _v0.a; - return A2($turboMaCk$any_dict$Dict$Any$member, a, dict); + return A2($elm$core$Dict$member, key, dict); }); var $elm$core$Dict$getMin = function (dict) { getMin: @@ -7052,118 +6686,6 @@ var $elm$core$Dict$remove = F2( return x; } }); -var $turboMaCk$any_dict$Dict$Any$remove = F2( - function (k, _v0) { - var inner = _v0.a; - return $turboMaCk$any_dict$Dict$Any$AnyDict( - _Utils_update( - inner, - { - dict: A2( - $elm$core$Dict$remove, - inner.toKey(k), - inner.dict) - })); - }); -var $turboMaCk$any_set$Set$Any$remove = F2( - function (a, _v0) { - var dict = _v0.a; - return $turboMaCk$any_set$Set$Any$AnySet( - A2($turboMaCk$any_dict$Dict$Any$remove, a, dict)); - }); -var $turboMaCk$any_set$Set$Any$toggle = F2( - function (a, set) { - return A2($turboMaCk$any_set$Set$Any$member, a, set) ? A2($turboMaCk$any_set$Set$Any$remove, a, set) : A2($turboMaCk$any_set$Set$Any$insert, a, set); - }); -var $elm$core$Platform$Sub$none = $elm$core$Platform$Sub$batch(_List_Nil); -var $author$project$Example$Button$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Dialog$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Icon$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$List$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Modal$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$MultiSelect$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$ProgressIndicator$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Select$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$SortTable$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Switch$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Tab$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$TextInput$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $elm$core$Basics$ge = _Utils_ge; -var $author$project$Example$Button$update = F2( - function (msg, model) { - switch (msg.$) { - case 'Increase': - var _int = msg.a; - return _Utils_Tuple2(model + _int, $elm$core$Platform$Cmd$none); - case 'Decrease': - var _int = msg.a; - return _Utils_Tuple2( - ((model - _int) >= 0) ? (model - _int) : model, - $elm$core$Platform$Cmd$none); - default: - return _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); - } - }); -var $author$project$Example$Dialog$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$Dialog$IsOpen(bool), - $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$Icon$update = F2( - function (msg, _v0) { - return _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$List$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$List$IsExpanded(bool), - $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$Modal$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$Modal$IsEnabled(bool), - $elm$core$Platform$Cmd$none); - }); -var $elm$core$Set$insert = F2( - function (key, _v0) { - var dict = _v0.a; - return $elm$core$Set$Set_elm_builtin( - A3($elm$core$Dict$insert, key, _Utils_Tuple0, dict)); - }); -var $elm$core$Set$member = F2( - function (key, _v0) { - var dict = _v0.a; - return A2($elm$core$Dict$member, key, dict); - }); var $elm$core$Set$remove = F2( function (key, _v0) { var dict = _v0.a; @@ -7179,6 +6701,9 @@ var $author$project$Example$MultiSelect$update = F2( (A2($elm$core$Set$member, _int, selected) ? $elm$core$Set$remove(_int) : $elm$core$Set$insert(_int))(selected)), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$ProgressIndicator$MaybeProgress = function (a) { + return {$: 'MaybeProgress', a: a}; +}; var $author$project$Example$ProgressIndicator$update = F2( function (msg, _v0) { var maybeFloat = msg.a; @@ -7186,6 +6711,9 @@ var $author$project$Example$ProgressIndicator$update = F2( $author$project$Example$ProgressIndicator$MaybeProgress(maybeFloat), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Select$Selected = function (a) { + return {$: 'Selected', a: a}; +}; var $author$project$Example$Select$update = F2( function (msg, _v0) { var _int = msg.a; @@ -7194,6 +6722,30 @@ var $author$project$Example$Select$update = F2( $elm$core$Maybe$Just(_int)), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Sheet$IsEnabled = function (a) { + return {$: 'IsEnabled', a: a}; +}; +var $author$project$Example$Sheet$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Sheet$IsEnabled(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$Snackbar$update = F2( + function (msg, model) { + if (msg.$ === 'TimePassed') { + var _int = msg.a; + return _Utils_Tuple2( + A2($author$project$Widget$Snackbar$timePassed, _int, model), + $elm$core$Platform$Cmd$none); + } else { + var snack = msg.a; + return _Utils_Tuple2( + A2($author$project$Widget$Snackbar$insert, snack, model), + $elm$core$Platform$Cmd$none); + } + }); var $elm$core$Basics$not = _Basics_not; var $author$project$Example$SortTable$update = F2( function (msg, model) { @@ -7205,6 +6757,9 @@ var $author$project$Example$SortTable$update = F2( }, $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Switch$IsButtonEnabled = function (a) { + return {$: 'IsButtonEnabled', a: a}; +}; var $author$project$Example$Switch$update = F2( function (msg, _v0) { var buttonEnabled = _v0.a; @@ -7212,6 +6767,9 @@ var $author$project$Example$Switch$update = F2( $author$project$Example$Switch$IsButtonEnabled(!buttonEnabled), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Tab$Selected = function (a) { + return {$: 'Selected', a: a}; +}; var $author$project$Example$Tab$update = F2( function (msg, _v0) { var _int = msg.a; @@ -7241,6 +6799,20 @@ var $author$project$Example$TextInput$update = F2( } }); var $author$project$Data$Example$upgradeRecord = { + appBar: { + from: function ($) { + return $.appBar; + }, + msgMapper: $author$project$Data$Example$AppBar, + subscriptionsFun: $author$project$Example$AppBar$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {appBar: a}); + }), + updateFun: $author$project$Example$AppBar$update + }, button: { from: function ($) { return $.button; @@ -7283,6 +6855,20 @@ var $author$project$Data$Example$upgradeRecord = { }), updateFun: $author$project$Example$Icon$update }, + layout: { + from: function ($) { + return $.layout; + }, + msgMapper: $author$project$Data$Example$Layout, + subscriptionsFun: $author$project$Example$Layout$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {layout: a}); + }), + updateFun: $author$project$Example$Layout$update + }, list: { from: function ($) { return $.list; @@ -7353,6 +6939,34 @@ var $author$project$Data$Example$upgradeRecord = { }), updateFun: $author$project$Example$Select$update }, + sheet: { + from: function ($) { + return $.sheet; + }, + msgMapper: $author$project$Data$Example$Sheet, + subscriptionsFun: $author$project$Example$Sheet$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {sheet: a}); + }), + updateFun: $author$project$Example$Sheet$update + }, + snackbar: { + from: function ($) { + return $.snackbar; + }, + msgMapper: $author$project$Data$Example$Snackbar, + subscriptionsFun: $author$project$Example$Snackbar$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {snackbar: a}); + }), + updateFun: $author$project$Example$Snackbar$update + }, sortTable: { from: function ($) { return $.sortTable; @@ -7410,6 +7024,695 @@ var $author$project$Data$Example$upgradeRecord = { updateFun: $author$project$Example$TextInput$update } }; +var $author$project$Data$Example$subscriptions = function (model) { + var subFun = function (_v0) { + var from = _v0.from; + var msgMapper = _v0.msgMapper; + var subscriptionsFun = _v0.subscriptionsFun; + return A2( + $elm$core$Platform$Sub$map, + msgMapper, + subscriptionsFun( + from(model))); + }; + return $elm$core$Platform$Sub$batch( + _List_fromArray( + [ + subFun($author$project$Data$Example$upgradeRecord.button), + subFun($author$project$Data$Example$upgradeRecord._switch), + subFun($author$project$Data$Example$upgradeRecord.select), + subFun($author$project$Data$Example$upgradeRecord.multiSelect), + subFun($author$project$Data$Example$upgradeRecord.tab), + subFun($author$project$Data$Example$upgradeRecord.sortTable), + subFun($author$project$Data$Example$upgradeRecord.modal), + subFun($author$project$Data$Example$upgradeRecord.dialog), + subFun($author$project$Data$Example$upgradeRecord.textInput), + subFun($author$project$Data$Example$upgradeRecord.list), + subFun($author$project$Data$Example$upgradeRecord.progressIndicator), + subFun($author$project$Data$Example$upgradeRecord.icon), + subFun($author$project$Data$Example$upgradeRecord.sheet), + subFun($author$project$Data$Example$upgradeRecord.appBar), + subFun($author$project$Data$Example$upgradeRecord.layout), + subFun($author$project$Data$Example$upgradeRecord.snackbar) + ])); +}; +var $author$project$Stateless$subscriptions = function (model) { + return A2( + $elm$core$Platform$Sub$map, + $author$project$Stateless$ExampleSpecific, + $author$project$Data$Example$subscriptions(model.example)); +}; +var $author$project$Main$subscriptions = function (model) { + return A2( + $elm$core$Platform$Sub$map, + $author$project$Main$LoadedSpecific, + $elm$core$Platform$Sub$batch( + _Utils_ap( + _List_fromArray( + [ + A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Main$TimePassed(50))), + $elm$browser$Browser$Events$onResize( + F2( + function (h, w) { + return $author$project$Main$Resized( + {height: h, width: w}); + })) + ]), + function () { + if (model.$ === 'Loading') { + return _List_Nil; + } else { + var stateless = model.a.stateless; + return $elm$core$List$singleton( + A2( + $elm$core$Platform$Sub$map, + $author$project$Main$StatelessSpecific, + $author$project$Stateless$subscriptions(stateless))); + } + }()))); +}; +var $author$project$Main$Loaded = function (a) { + return {$: 'Loaded', a: a}; +}; +var $author$project$Main$Idle = {$: 'Idle'}; +var $author$project$Data$Theme$Material = {$: 'Material'}; +var $author$project$Main$UpdateScrollingNav = function (a) { + return {$: 'UpdateScrollingNav', a: a}; +}; +var $author$project$Data$Example$AppBarExample = {$: 'AppBarExample'}; +var $author$project$Data$Example$ButtonExample = {$: 'ButtonExample'}; +var $author$project$Data$Example$DialogExample = {$: 'DialogExample'}; +var $author$project$Data$Example$IconExample = {$: 'IconExample'}; +var $author$project$Data$Example$LayoutExample = {$: 'LayoutExample'}; +var $author$project$Data$Example$ListExample = {$: 'ListExample'}; +var $author$project$Data$Example$ModalExample = {$: 'ModalExample'}; +var $author$project$Data$Example$MultiSelectExample = {$: 'MultiSelectExample'}; +var $author$project$Data$Example$ProgressIndicatorExample = {$: 'ProgressIndicatorExample'}; +var $author$project$Data$Example$SelectExample = {$: 'SelectExample'}; +var $author$project$Data$Example$SheetExample = {$: 'SheetExample'}; +var $author$project$Data$Example$SnackbarExample = {$: 'SnackbarExample'}; +var $author$project$Data$Example$SortTableExample = {$: 'SortTableExample'}; +var $author$project$Data$Example$SwitchExample = {$: 'SwitchExample'}; +var $author$project$Data$Example$TabExample = {$: 'TabExample'}; +var $author$project$Data$Example$TextInputExample = {$: 'TextInputExample'}; +var $elm$core$List$sortBy = _List_sortBy; +var $author$project$Data$Example$toString = function (example) { + switch (example.$) { + case 'ButtonExample': + return 'Button'; + case 'SwitchExample': + return 'Switch'; + case 'SelectExample': + return 'Select'; + case 'MultiSelectExample': + return 'Multi Select'; + case 'TabExample': + return 'Tab'; + case 'SortTableExample': + return 'SortTable'; + case 'ModalExample': + return 'Modal'; + case 'DialogExample': + return 'Dialog'; + case 'TextInputExample': + return 'TextInput'; + case 'ListExample': + return 'List'; + case 'ProgressIndicatorExample': + return 'Progress Indicator'; + case 'IconExample': + return 'Icon'; + case 'SheetExample': + return 'Sheet'; + case 'AppBarExample': + return 'App Bar'; + case 'LayoutExample': + return 'Layout'; + default: + return 'Snackbar'; + } +}; +var $author$project$Data$Example$asList = A2( + $elm$core$List$sortBy, + $author$project$Data$Example$toString, + _List_fromArray( + [$author$project$Data$Example$ButtonExample, $author$project$Data$Example$SwitchExample, $author$project$Data$Example$SelectExample, $author$project$Data$Example$MultiSelectExample, $author$project$Data$Example$TabExample, $author$project$Data$Example$SortTableExample, $author$project$Data$Example$ModalExample, $author$project$Data$Example$DialogExample, $author$project$Data$Example$TextInputExample, $author$project$Data$Example$ListExample, $author$project$Data$Example$ProgressIndicatorExample, $author$project$Data$Example$IconExample, $author$project$Data$Example$SheetExample, $author$project$Data$Example$AppBarExample, $author$project$Data$Example$LayoutExample, $author$project$Data$Example$SnackbarExample])); +var $turboMaCk$any_set$Set$Any$AnySet = function (a) { + return {$: 'AnySet', a: a}; +}; +var $turboMaCk$any_dict$Dict$Any$AnyDict = function (a) { + return {$: 'AnyDict', a: a}; +}; +var $turboMaCk$any_dict$Dict$Any$empty = function (toKey) { + return $turboMaCk$any_dict$Dict$Any$AnyDict( + {dict: $elm$core$Dict$empty, toKey: toKey}); +}; +var $turboMaCk$any_set$Set$Any$empty = A2($elm$core$Basics$composeL, $turboMaCk$any_set$Set$Any$AnySet, $turboMaCk$any_dict$Dict$Any$empty); +var $author$project$Data$Example$fromString = function (string) { + switch (string) { + case 'Button': + return $elm$core$Maybe$Just($author$project$Data$Example$ButtonExample); + case 'Switch': + return $elm$core$Maybe$Just($author$project$Data$Example$SwitchExample); + case 'Select': + return $elm$core$Maybe$Just($author$project$Data$Example$SelectExample); + case 'Multi Select': + return $elm$core$Maybe$Just($author$project$Data$Example$MultiSelectExample); + case 'Tab': + return $elm$core$Maybe$Just($author$project$Data$Example$TabExample); + case 'SortTable': + return $elm$core$Maybe$Just($author$project$Data$Example$SortTableExample); + case 'Modal': + return $elm$core$Maybe$Just($author$project$Data$Example$ModalExample); + case 'Dialog': + return $elm$core$Maybe$Just($author$project$Data$Example$DialogExample); + case 'TextInput': + return $elm$core$Maybe$Just($author$project$Data$Example$TextInputExample); + case 'List': + return $elm$core$Maybe$Just($author$project$Data$Example$ListExample); + case 'Progress Indicator': + return $elm$core$Maybe$Just($author$project$Data$Example$ProgressIndicatorExample); + case 'Icon': + return $elm$core$Maybe$Just($author$project$Data$Example$IconExample); + case 'Sheet': + return $elm$core$Maybe$Just($author$project$Data$Example$SheetExample); + case 'App Bar': + return $elm$core$Maybe$Just($author$project$Data$Example$AppBarExample); + case 'Layout': + return $elm$core$Maybe$Just($author$project$Data$Example$LayoutExample); + case 'Snackbar': + return $elm$core$Maybe$Just($author$project$Data$Example$SnackbarExample); + default: + return $elm$core$Maybe$Nothing; + } +}; +var $author$project$Example$AppBar$init = _Utils_Tuple2( + {isMenuBar: true, search: '', selected: 0}, + $elm$core$Platform$Cmd$none); +var $author$project$Example$Button$init = _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); +var $author$project$Example$Dialog$init = _Utils_Tuple2( + $author$project$Example$Dialog$IsOpen(true), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Icon$init = _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); +var $author$project$Example$Layout$RightSheet = {$: 'RightSheet'}; +var $turboMaCk$queue$Queue$empty = A2($turboMaCk$queue$Queue$Queue, _List_Nil, _List_Nil); +var $author$project$Widget$Snackbar$init = {current: $elm$core$Maybe$Nothing, queue: $turboMaCk$queue$Queue$empty}; +var $author$project$Example$Layout$init = _Utils_Tuple2( + { + active: $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet), + searchText: '', + selected: 0, + showDialog: false, + snackbar: $author$project$Widget$Snackbar$init, + window: {height: 200, width: 400} + }, + $elm$core$Platform$Cmd$none); +var $author$project$Example$List$init = _Utils_Tuple2( + $author$project$Example$List$IsExpanded(false), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Modal$init = _Utils_Tuple2( + $author$project$Example$Modal$IsEnabled(true), + $elm$core$Platform$Cmd$none); +var $elm$core$Set$empty = $elm$core$Set$Set_elm_builtin($elm$core$Dict$empty); +var $author$project$Example$MultiSelect$init = _Utils_Tuple2( + $author$project$Example$MultiSelect$Selected($elm$core$Set$empty), + $elm$core$Platform$Cmd$none); +var $author$project$Example$ProgressIndicator$init = _Utils_Tuple2( + $author$project$Example$ProgressIndicator$MaybeProgress($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Select$init = _Utils_Tuple2( + $author$project$Example$Select$Selected($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Sheet$init = _Utils_Tuple2( + $author$project$Example$Sheet$IsEnabled(true), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Snackbar$init = _Utils_Tuple2($author$project$Widget$Snackbar$init, $elm$core$Platform$Cmd$none); +var $author$project$Example$SortTable$init = _Utils_Tuple2( + {asc: true, title: 'Name'}, + $elm$core$Platform$Cmd$none); +var $author$project$Example$Switch$init = _Utils_Tuple2( + $author$project$Example$Switch$IsButtonEnabled(false), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Tab$init = _Utils_Tuple2( + $author$project$Example$Tab$Selected($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$TextInput$init = _Utils_Tuple2( + {chipTextInput: $elm$core$Set$empty, textInput: ''}, + $elm$core$Platform$Cmd$none); +var $elm$core$Platform$Cmd$map = _Platform_map; +var $author$project$Data$Example$init = function () { + var _v0 = $author$project$Example$TextInput$init; + var textInputModel = _v0.a; + var textInputMsg = _v0.b; + var _v1 = $author$project$Example$Tab$init; + var tabModel = _v1.a; + var tabMsg = _v1.b; + var _v2 = $author$project$Example$Switch$init; + var switchModel = _v2.a; + var switchMsg = _v2.b; + var _v3 = $author$project$Example$SortTable$init; + var sortTableModel = _v3.a; + var sortTableMsg = _v3.b; + var _v4 = $author$project$Example$Snackbar$init; + var snackbarModel = _v4.a; + var snackbarMsg = _v4.b; + var _v5 = $author$project$Example$Sheet$init; + var sheetModel = _v5.a; + var sheetMsg = _v5.b; + var _v6 = $author$project$Example$Select$init; + var selectModel = _v6.a; + var selectMsg = _v6.b; + var _v7 = $author$project$Example$ProgressIndicator$init; + var progressIndicatorModel = _v7.a; + var progressIndicatorMsg = _v7.b; + var _v8 = $author$project$Example$MultiSelect$init; + var multiSelectModel = _v8.a; + var multiSelectMsg = _v8.b; + var _v9 = $author$project$Example$Modal$init; + var modalModel = _v9.a; + var modalMsg = _v9.b; + var _v10 = $author$project$Example$List$init; + var listModel = _v10.a; + var listMsg = _v10.b; + var _v11 = $author$project$Example$Layout$init; + var layoutModel = _v11.a; + var layoutMsg = _v11.b; + var _v12 = $author$project$Example$Icon$init; + var iconModel = _v12.a; + var iconMsg = _v12.b; + var _v13 = $author$project$Example$Dialog$init; + var dialogModel = _v13.a; + var dialogMsg = _v13.b; + var _v14 = $author$project$Example$Button$init; + var buttonModel = _v14.a; + var buttonMsg = _v14.b; + var _v15 = $author$project$Example$AppBar$init; + var appBarModel = _v15.a; + var appBarMsg = _v15.b; + return _Utils_Tuple2( + {appBar: appBarModel, button: buttonModel, dialog: dialogModel, icon: iconModel, layout: layoutModel, list: listModel, modal: modalModel, multiSelect: multiSelectModel, progressIndicator: progressIndicatorModel, select: selectModel, sheet: sheetModel, snackbar: snackbarModel, sortTable: sortTableModel, _switch: switchModel, tab: tabModel, textInput: textInputModel}, + $elm$core$Platform$Cmd$batch( + _List_fromArray( + [ + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Button, buttonMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Switch, switchMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Select, selectMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$MultiSelect, multiSelectMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Tab, tabMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$SortTable, sortTableMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Modal, modalMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Dialog, dialogMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$TextInput, textInputMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$List, listMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$ProgressIndicator, progressIndicatorMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Icon, iconMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Sheet, sheetMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$AppBar, appBarMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Layout, layoutMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Snackbar, snackbarMsg) + ]))); +}(); +var $author$project$Stateless$init = function () { + var _v0 = $author$project$Data$Example$init; + var example = _v0.a; + var cmd = _v0.b; + return _Utils_Tuple2( + {carousel: 0, example: example}, + A2($elm$core$Platform$Cmd$map, $author$project$Stateless$ExampleSpecific, cmd)); +}(); +var $elm$core$Task$onError = _Scheduler_onError; +var $elm$core$Task$attempt = F2( + function (resultToMessage, task) { + return $elm$core$Task$command( + $elm$core$Task$Perform( + A2( + $elm$core$Task$onError, + A2( + $elm$core$Basics$composeL, + A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), + $elm$core$Result$Err), + A2( + $elm$core$Task$andThen, + A2( + $elm$core$Basics$composeL, + A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), + $elm$core$Result$Ok), + task)))); + }); +var $elm_community$intdict$IntDict$Empty = {$: 'Empty'}; +var $elm_community$intdict$IntDict$empty = $elm_community$intdict$IntDict$Empty; +var $elm$browser$Browser$Dom$getElement = _Browser_getElement; +var $elm_community$intdict$IntDict$Inner = function (a) { + return {$: 'Inner', a: a}; +}; +var $elm_community$intdict$IntDict$size = function (dict) { + switch (dict.$) { + case 'Empty': + return 0; + case 'Leaf': + return 1; + default: + var i = dict.a; + return i.size; + } +}; +var $elm_community$intdict$IntDict$inner = F3( + function (p, l, r) { + var _v0 = _Utils_Tuple2(l, r); + if (_v0.a.$ === 'Empty') { + var _v1 = _v0.a; + return r; + } else { + if (_v0.b.$ === 'Empty') { + var _v2 = _v0.b; + return l; + } else { + return $elm_community$intdict$IntDict$Inner( + { + left: l, + prefix: p, + right: r, + size: $elm_community$intdict$IntDict$size(l) + $elm_community$intdict$IntDict$size(r) + }); + } + } + }); +var $elm$core$Bitwise$and = _Bitwise_and; +var $elm$core$Basics$composeR = F3( + function (f, g, x) { + return g( + f(x)); + }); +var $elm$core$Basics$neq = _Utils_notEqual; +var $elm$core$Bitwise$complement = _Bitwise_complement; +var $elm$core$Bitwise$or = _Bitwise_or; +var $elm$core$Bitwise$shiftRightZfBy = _Bitwise_shiftRightZfBy; +var $elm_community$intdict$IntDict$highestBitSet = function (n) { + var shiftOr = F2( + function (i, shift) { + return i | (i >>> shift); + }); + var n1 = A2(shiftOr, n, 1); + var n2 = A2(shiftOr, n1, 2); + var n3 = A2(shiftOr, n2, 4); + var n4 = A2(shiftOr, n3, 8); + var n5 = A2(shiftOr, n4, 16); + return n5 & (~(n5 >>> 1)); +}; +var $elm_community$intdict$IntDict$signBit = $elm_community$intdict$IntDict$highestBitSet(-1); +var $elm$core$Bitwise$xor = _Bitwise_xor; +var $elm_community$intdict$IntDict$isBranchingBitSet = function (p) { + return A2( + $elm$core$Basics$composeR, + $elm$core$Bitwise$xor($elm_community$intdict$IntDict$signBit), + A2( + $elm$core$Basics$composeR, + $elm$core$Bitwise$and(p.branchingBit), + $elm$core$Basics$neq(0))); +}; +var $elm_community$intdict$IntDict$higherBitMask = function (branchingBit) { + return branchingBit ^ (~(branchingBit - 1)); +}; +var $elm_community$intdict$IntDict$lcp = F2( + function (x, y) { + var branchingBit = $elm_community$intdict$IntDict$highestBitSet(x ^ y); + var mask = $elm_community$intdict$IntDict$higherBitMask(branchingBit); + var prefixBits = x & mask; + return {branchingBit: branchingBit, prefixBits: prefixBits}; + }); +var $elm_community$intdict$IntDict$Leaf = function (a) { + return {$: 'Leaf', a: a}; +}; +var $elm_community$intdict$IntDict$leaf = F2( + function (k, v) { + return $elm_community$intdict$IntDict$Leaf( + {key: k, value: v}); + }); +var $elm_community$intdict$IntDict$prefixMatches = F2( + function (p, n) { + return _Utils_eq( + n & $elm_community$intdict$IntDict$higherBitMask(p.branchingBit), + p.prefixBits); + }); +var $elm_community$intdict$IntDict$update = F3( + function (key, alter, dict) { + var join = F2( + function (_v2, _v3) { + var k1 = _v2.a; + var l = _v2.b; + var k2 = _v3.a; + var r = _v3.b; + var prefix = A2($elm_community$intdict$IntDict$lcp, k1, k2); + return A2($elm_community$intdict$IntDict$isBranchingBitSet, prefix, k2) ? A3($elm_community$intdict$IntDict$inner, prefix, l, r) : A3($elm_community$intdict$IntDict$inner, prefix, r, l); + }); + var alteredNode = function (mv) { + var _v1 = alter(mv); + if (_v1.$ === 'Just') { + var v = _v1.a; + return A2($elm_community$intdict$IntDict$leaf, key, v); + } else { + return $elm_community$intdict$IntDict$empty; + } + }; + switch (dict.$) { + case 'Empty': + return alteredNode($elm$core$Maybe$Nothing); + case 'Leaf': + var l = dict.a; + return _Utils_eq(l.key, key) ? alteredNode( + $elm$core$Maybe$Just(l.value)) : A2( + join, + _Utils_Tuple2( + key, + alteredNode($elm$core$Maybe$Nothing)), + _Utils_Tuple2(l.key, dict)); + default: + var i = dict.a; + return A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key) ? (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key) ? A3( + $elm_community$intdict$IntDict$inner, + i.prefix, + i.left, + A3($elm_community$intdict$IntDict$update, key, alter, i.right)) : A3( + $elm_community$intdict$IntDict$inner, + i.prefix, + A3($elm_community$intdict$IntDict$update, key, alter, i.left), + i.right)) : A2( + join, + _Utils_Tuple2( + key, + alteredNode($elm$core$Maybe$Nothing)), + _Utils_Tuple2(i.prefix.prefixBits, dict)); + } + }); +var $elm_community$intdict$IntDict$insert = F3( + function (key, value, dict) { + return A3( + $elm_community$intdict$IntDict$update, + key, + $elm$core$Basics$always( + $elm$core$Maybe$Just(value)), + dict); + }); +var $elm$core$Basics$round = _Basics_round; +var $author$project$Widget$ScrollingNav$syncPositions = function (_v0) { + var toString = _v0.toString; + var arrangement = _v0.arrangement; + var fun = F2( + function (_v1, model) { + var pos = _v1.a; + var label = _v1.b; + return _Utils_update( + model, + { + positions: A3( + $elm_community$intdict$IntDict$insert, + pos, + model.toString(label), + model.positions) + }); + }); + return A2( + $elm$core$Task$map, + F2( + function (list, m) { + return A3($elm$core$List$foldl, fun, m, list); + }), + $elm$core$Task$sequence( + A2( + $elm$core$List$map, + function (label) { + return A2( + $elm$core$Task$map, + function (x) { + return _Utils_Tuple2( + $elm$core$Basics$round(x.element.y), + label); + }, + $elm$browser$Browser$Dom$getElement( + toString(label))); + }, + arrangement))); +}; +var $author$project$Widget$ScrollingNav$init = function (_v0) { + var toString = _v0.toString; + var fromString = _v0.fromString; + var arrangement = _v0.arrangement; + var toMsg = _v0.toMsg; + return function (a) { + return _Utils_Tuple2( + a, + A2( + $elm$core$Task$attempt, + toMsg, + $author$project$Widget$ScrollingNav$syncPositions(a))); + }( + {arrangement: arrangement, fromString: fromString, positions: $elm_community$intdict$IntDict$empty, scrollPos: 0, toString: toString}); +}; +var $author$project$Main$initialModel = function (_v0) { + var viewport = _v0.viewport; + var _v1 = $author$project$Stateless$init; + var stateless = _v1.a; + var statelessCmd = _v1.b; + var _v2 = $author$project$Widget$ScrollingNav$init( + { + arrangement: $author$project$Data$Example$asList, + fromString: $author$project$Data$Example$fromString, + toMsg: function (result) { + if (result.$ === 'Ok') { + var fun = result.a; + return $author$project$Main$UpdateScrollingNav(fun); + } else { + return $author$project$Main$Idle; + } + }, + toString: $author$project$Data$Example$toString + }); + var scrollingNav = _v2.a; + var cmd = _v2.b; + return _Utils_Tuple2( + { + active: $elm$core$Maybe$Nothing, + displayDialog: false, + expanded: $turboMaCk$any_set$Set$Any$empty($author$project$Data$Example$toString), + scrollingNav: scrollingNav, + search: {current: '', raw: '', remaining: 0}, + snackbar: $author$project$Widget$Snackbar$init, + stateless: stateless, + theme: $author$project$Data$Theme$Material, + window: { + height: $elm$core$Basics$round(viewport.height), + width: $elm$core$Basics$round(viewport.width) + } + }, + $elm$core$Platform$Cmd$batch( + _List_fromArray( + [ + cmd, + A2($elm$core$Platform$Cmd$map, $author$project$Main$StatelessSpecific, statelessCmd) + ]))); +}; +var $elm$core$Tuple$mapBoth = F3( + function (funcA, funcB, _v0) { + var x = _v0.a; + var y = _v0.b; + return _Utils_Tuple2( + funcA(x), + funcB(y)); + }); +var $author$project$Main$AddSnackbar = function (a) { + return {$: 'AddSnackbar', a: a}; +}; +var $author$project$Widget$ScrollingNav$getPos = A2( + $elm$core$Task$map, + F2( + function (_int, model) { + return _Utils_update( + model, + { + scrollPos: $elm$core$Basics$round(_int.viewport.y) + }); + }), + $elm$browser$Browser$Dom$getViewport); +var $elm$browser$Browser$Dom$setViewport = _Browser_setViewport; +var $author$project$Widget$ScrollingNav$jumpTo = F2( + function (_v0, _v1) { + var section = _v0.section; + var onChange = _v0.onChange; + var toString = _v1.toString; + return A2( + $elm$core$Task$attempt, + onChange, + A2( + $elm$core$Task$andThen, + function (_v2) { + var element = _v2.element; + return A2($elm$browser$Browser$Dom$setViewport, 0, element.y); + }, + $elm$browser$Browser$Dom$getElement( + toString(section)))); + }); +var $elm$browser$Browser$Navigation$load = _Browser_load; +var $turboMaCk$any_dict$Dict$Any$insert = F3( + function (k, v, _v0) { + var inner = _v0.a; + return $turboMaCk$any_dict$Dict$Any$AnyDict( + _Utils_update( + inner, + { + dict: A3( + $elm$core$Dict$insert, + inner.toKey(k), + _Utils_Tuple2(k, v), + inner.dict) + })); + }); +var $turboMaCk$any_set$Set$Any$insert = F2( + function (a, _v0) { + var dict = _v0.a; + return $turboMaCk$any_set$Set$Any$AnySet( + A3($turboMaCk$any_dict$Dict$Any$insert, a, _Utils_Tuple0, dict)); + }); +var $turboMaCk$any_dict$Dict$Any$member = F2( + function (k, _v0) { + var dict = _v0.a.dict; + var toKey = _v0.a.toKey; + return A2( + $elm$core$Dict$member, + toKey(k), + dict); + }); +var $turboMaCk$any_set$Set$Any$member = F2( + function (a, _v0) { + var dict = _v0.a; + return A2($turboMaCk$any_dict$Dict$Any$member, a, dict); + }); +var $turboMaCk$any_dict$Dict$Any$remove = F2( + function (k, _v0) { + var inner = _v0.a; + return $turboMaCk$any_dict$Dict$Any$AnyDict( + _Utils_update( + inner, + { + dict: A2( + $elm$core$Dict$remove, + inner.toKey(k), + inner.dict) + })); + }); +var $turboMaCk$any_set$Set$Any$remove = F2( + function (a, _v0) { + var dict = _v0.a; + return $turboMaCk$any_set$Set$Any$AnySet( + A2($turboMaCk$any_dict$Dict$Any$remove, a, dict)); + }); +var $turboMaCk$any_set$Set$Any$toggle = F2( + function (a, set) { + return A2($turboMaCk$any_set$Set$Any$member, a, set) ? A2($turboMaCk$any_set$Set$Any$remove, a, set) : A2($turboMaCk$any_set$Set$Any$insert, a, set); + }); var $author$project$Data$Example$updateField = F3( function (getter, msg, model) { var _v0 = getter($author$project$Data$Example$upgradeRecord); @@ -7518,7 +7821,7 @@ var $author$project$Data$Example$update = F2( return $.progressIndicator; }, m); - default: + case 'Icon': var m = msg.a; return A2( $author$project$Data$Example$updateField, @@ -7526,6 +7829,38 @@ var $author$project$Data$Example$update = F2( return $.icon; }, m); + case 'Sheet': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.sheet; + }, + m); + case 'AppBar': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.appBar; + }, + m); + case 'Layout': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.layout; + }, + m); + default: + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.snackbar; + }, + m); } }()(model); }); @@ -7575,24 +7910,44 @@ var $author$project$Main$updateLoaded = F2( _Utils_update( model, { - layout: A2($author$project$Widget$Layout$timePassed, _int, model.layout), search: (search.remaining > 0) ? ((_Utils_cmp(search.remaining, _int) < 1) ? _Utils_update( search, {current: search.raw, remaining: 0}) : _Utils_update( search, - {remaining: search.remaining - _int})) : model.search + {remaining: search.remaining - _int})) : model.search, + snackbar: function () { + var _v1 = model.active; + _v1$2: + while (true) { + if (_v1.$ === 'Just') { + switch (_v1.a.$) { + case 'LeftSheet': + var _v2 = _v1.a; + return model.snackbar; + case 'RightSheet': + var _v3 = _v1.a; + return model.snackbar; + default: + break _v1$2; + } + } else { + break _v1$2; + } + } + return A2($author$project$Widget$Snackbar$timePassed, _int, model.snackbar); + }() }), A2($elm$core$Task$perform, $author$project$Main$UpdateScrollingNav, $author$project$Widget$ScrollingNav$getPos)); case 'AddSnackbar': - var _v1 = msg.a; - var string = _v1.a; - var bool = _v1.b; + var _v4 = msg.a; + var string = _v4.a; + var bool = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - layout: A2( - $author$project$Widget$Layout$queueMessage, + snackbar: A2( + $author$project$Widget$Snackbar$insert, { button: bool ? $elm$core$Maybe$Just( { @@ -7603,16 +7958,9 @@ var $author$project$Main$updateLoaded = F2( }) : $elm$core$Maybe$Nothing, text: string }, - model.layout) + model.snackbar) }), $elm$core$Platform$Cmd$none); - case 'ToggleDialog': - var bool = msg.a; - return _Utils_Tuple2( - _Utils_update( - model, - {displayDialog: bool}), - $elm$core$Platform$Cmd$none); case 'Resized': var window = msg.a; return _Utils_Tuple2( @@ -7625,9 +7973,7 @@ var $author$project$Main$updateLoaded = F2( return _Utils_Tuple2( _Utils_update( model, - { - layout: A2($author$project$Widget$Layout$activate, sidebar, model.layout) - }), + {active: sidebar}), $elm$core$Platform$Cmd$none); case 'Load': var string = msg.a; @@ -7710,86 +8056,36 @@ var $author$project$Main$update = F2( } return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); }); -var $author$project$Main$ChangedSearch = function (a) { - return {$: 'ChangedSearch', a: a}; +var $mdgriffith$elm_ui$Internal$Style$classes = {above: 'a', active: 'atv', alignBottom: 'ab', alignCenterX: 'cx', alignCenterY: 'cy', alignContainerBottom: 'acb', alignContainerCenterX: 'accx', alignContainerCenterY: 'accy', alignContainerRight: 'acr', alignLeft: 'al', alignRight: 'ar', alignTop: 'at', alignedHorizontally: 'ah', alignedVertically: 'av', any: 's', behind: 'bh', below: 'b', bold: 'w7', borderDashed: 'bd', borderDotted: 'bdt', borderNone: 'bn', borderSolid: 'bs', capturePointerEvents: 'cpe', clip: 'cp', clipX: 'cpx', clipY: 'cpy', column: 'c', container: 'ctr', contentBottom: 'cb', contentCenterX: 'ccx', contentCenterY: 'ccy', contentLeft: 'cl', contentRight: 'cr', contentTop: 'ct', cursorPointer: 'cptr', cursorText: 'ctxt', focus: 'fcs', focusedWithin: 'focus-within', fullSize: 'fs', grid: 'g', hasBehind: 'hbh', heightContent: 'hc', heightExact: 'he', heightFill: 'hf', heightFillPortion: 'hfp', hover: 'hv', imageContainer: 'ic', inFront: 'fr', inputLabel: 'lbl', inputMultiline: 'iml', inputMultilineFiller: 'imlf', inputMultilineParent: 'imlp', inputMultilineWrapper: 'implw', inputText: 'it', italic: 'i', link: 'lnk', nearby: 'nb', noTextSelection: 'notxt', onLeft: 'ol', onRight: 'or', opaque: 'oq', overflowHidden: 'oh', page: 'pg', paragraph: 'p', passPointerEvents: 'ppe', root: 'ui', row: 'r', scrollbars: 'sb', scrollbarsX: 'sbx', scrollbarsY: 'sby', seButton: 'sbt', single: 'e', sizeByCapital: 'cap', spaceEvenly: 'sev', strike: 'sk', text: 't', textCenter: 'tc', textExtraBold: 'w8', textExtraLight: 'w2', textHeavy: 'w9', textJustify: 'tj', textJustifyAll: 'tja', textLeft: 'tl', textLight: 'w3', textMedium: 'w5', textNormalWeight: 'w4', textRight: 'tr', textSemiBold: 'w6', textThin: 'w1', textUnitalicized: 'tun', transition: 'ts', transparent: 'clr', underline: 'u', widthContent: 'wc', widthExact: 'we', widthFill: 'wf', widthFillPortion: 'wfp', wrapped: 'wrp'}; +var $mdgriffith$elm_ui$Internal$Model$Attr = function (a) { + return {$: 'Attr', a: a}; }; -var $author$project$Main$ChangedSidebar = function (a) { - return {$: 'ChangedSidebar', a: a}; -}; -var $author$project$Data$Theme$DarkMaterial = {$: 'DarkMaterial'}; -var $author$project$Main$JumpTo = function (a) { - return {$: 'JumpTo', a: a}; -}; -var $author$project$Main$Load = function (a) { - return {$: 'Load', a: a}; -}; -var $author$project$Main$SetTheme = function (a) { - return {$: 'SetTheme', a: a}; -}; -var $author$project$Main$ToggleDialog = function (a) { - return {$: 'ToggleDialog', a: a}; -}; -var $elm$svg$Svg$Attributes$d = _VirtualDom_attribute('d'); -var $feathericons$elm_feather$FeatherIcons$Icon = function (a) { - return {$: 'Icon', a: a}; -}; -var $feathericons$elm_feather$FeatherIcons$defaultAttributes = function (name) { - return { - _class: $elm$core$Maybe$Just('feather feather-' + name), - size: 24, - sizeUnit: '', - strokeWidth: 2, - viewBox: '0 0 24 24' - }; -}; -var $feathericons$elm_feather$FeatherIcons$makeBuilder = F2( - function (name, src) { - return $feathericons$elm_feather$FeatherIcons$Icon( - { - attrs: $feathericons$elm_feather$FeatherIcons$defaultAttributes(name), - src: src - }); +var $elm$json$Json$Encode$string = _Json_wrap; +var $elm$html$Html$Attributes$stringProperty = F2( + function (key, string) { + return A2( + _VirtualDom_property, + key, + $elm$json$Json$Encode$string(string)); }); -var $elm$svg$Svg$trustedNode = _VirtualDom_nodeNS('http://www.w3.org/2000/svg'); -var $elm$svg$Svg$path = $elm$svg$Svg$trustedNode('path'); -var $feathericons$elm_feather$FeatherIcons$book = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'book', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M4 19.5A2.5 2.5 0 0 1 6.5 17H20') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) { - return {$: 'AlignX', a: a}; +var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); +var $mdgriffith$elm_ui$Internal$Model$htmlClass = function (cls) { + return $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$class(cls)); }; -var $mdgriffith$elm_ui$Internal$Model$Right = {$: 'Right'}; -var $mdgriffith$elm_ui$Element$alignRight = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Right); -var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'}; -var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX); -var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) { - return {$: 'AlignY', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'}; -var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY); +var $mdgriffith$elm_ui$Internal$Model$OnlyDynamic = F2( + function (a, b) { + return {$: 'OnlyDynamic', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Model$StaticRootAndDynamic = F2( + function (a, b) { + return {$: 'StaticRootAndDynamic', a: a, b: b}; + }); var $mdgriffith$elm_ui$Internal$Model$Unkeyed = function (a) { return {$: 'Unkeyed', a: a}; }; -var $mdgriffith$elm_ui$Internal$Model$AsColumn = {$: 'AsColumn'}; -var $mdgriffith$elm_ui$Internal$Model$asColumn = $mdgriffith$elm_ui$Internal$Model$AsColumn; -var $mdgriffith$elm_ui$Internal$Style$classes = {above: 'a', active: 'atv', alignBottom: 'ab', alignCenterX: 'cx', alignCenterY: 'cy', alignContainerBottom: 'acb', alignContainerCenterX: 'accx', alignContainerCenterY: 'accy', alignContainerRight: 'acr', alignLeft: 'al', alignRight: 'ar', alignTop: 'at', alignedHorizontally: 'ah', alignedVertically: 'av', any: 's', behind: 'bh', below: 'b', bold: 'w7', borderDashed: 'bd', borderDotted: 'bdt', borderNone: 'bn', borderSolid: 'bs', capturePointerEvents: 'cpe', clip: 'cp', clipX: 'cpx', clipY: 'cpy', column: 'c', container: 'ctr', contentBottom: 'cb', contentCenterX: 'ccx', contentCenterY: 'ccy', contentLeft: 'cl', contentRight: 'cr', contentTop: 'ct', cursorPointer: 'cptr', cursorText: 'ctxt', focus: 'fcs', focusedWithin: 'focus-within', fullSize: 'fs', grid: 'g', hasBehind: 'hbh', heightContent: 'hc', heightExact: 'he', heightFill: 'hf', heightFillPortion: 'hfp', hover: 'hv', imageContainer: 'ic', inFront: 'fr', inputLabel: 'lbl', inputMultiline: 'iml', inputMultilineFiller: 'imlf', inputMultilineParent: 'imlp', inputMultilineWrapper: 'implw', inputText: 'it', italic: 'i', link: 'lnk', nearby: 'nb', noTextSelection: 'notxt', onLeft: 'ol', onRight: 'or', opaque: 'oq', overflowHidden: 'oh', page: 'pg', paragraph: 'p', passPointerEvents: 'ppe', root: 'ui', row: 'r', scrollbars: 'sb', scrollbarsX: 'sbx', scrollbarsY: 'sby', seButton: 'sbt', single: 'e', sizeByCapital: 'cap', spaceEvenly: 'sev', strike: 'sk', text: 't', textCenter: 'tc', textExtraBold: 'w8', textExtraLight: 'w2', textHeavy: 'w9', textJustify: 'tj', textJustifyAll: 'tja', textLeft: 'tl', textLight: 'w3', textMedium: 'w5', textNormalWeight: 'w4', textRight: 'tr', textSemiBold: 'w6', textThin: 'w1', textUnitalicized: 'tun', transition: 'ts', transparent: 'clr', underline: 'u', widthContent: 'wc', widthExact: 'we', widthFill: 'wf', widthFillPortion: 'wfp', wrapped: 'wrp'}; +var $mdgriffith$elm_ui$Internal$Model$AsEl = {$: 'AsEl'}; +var $mdgriffith$elm_ui$Internal$Model$asEl = $mdgriffith$elm_ui$Internal$Model$AsEl; var $mdgriffith$elm_ui$Internal$Model$Generic = {$: 'Generic'}; var $mdgriffith$elm_ui$Internal$Model$div = $mdgriffith$elm_ui$Internal$Model$Generic; var $mdgriffith$elm_ui$Internal$Model$NoNearbyChildren = {$: 'NoNearbyChildren'}; @@ -7889,8 +8185,6 @@ var $mdgriffith$elm_ui$Internal$Model$addKeyedChildren = F3( inFront))); } }); -var $mdgriffith$elm_ui$Internal$Model$AsEl = {$: 'AsEl'}; -var $mdgriffith$elm_ui$Internal$Model$asEl = $mdgriffith$elm_ui$Internal$Model$AsEl; var $mdgriffith$elm_ui$Internal$Model$AsParagraph = {$: 'AsParagraph'}; var $mdgriffith$elm_ui$Internal$Model$asParagraph = $mdgriffith$elm_ui$Internal$Model$AsParagraph; var $mdgriffith$elm_ui$Internal$Flag$Flag = function (a) { @@ -7907,15 +8201,6 @@ var $mdgriffith$elm_ui$Internal$Flag$alignBottom = $mdgriffith$elm_ui$Internal$F var $mdgriffith$elm_ui$Internal$Flag$alignRight = $mdgriffith$elm_ui$Internal$Flag$flag(40); var $mdgriffith$elm_ui$Internal$Flag$centerX = $mdgriffith$elm_ui$Internal$Flag$flag(42); var $mdgriffith$elm_ui$Internal$Flag$centerY = $mdgriffith$elm_ui$Internal$Flag$flag(43); -var $elm$json$Json$Encode$string = _Json_wrap; -var $elm$html$Html$Attributes$stringProperty = F2( - function (key, string) { - return A2( - _VirtualDom_property, - key, - $elm$json$Json$Encode$string(string)); - }); -var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); var $elm$html$Html$div = _VirtualDom_node('div'); var $mdgriffith$elm_ui$Internal$Model$lengthClassName = function (x) { switch (x.$) { @@ -8601,13 +8886,32 @@ var $mdgriffith$elm_ui$Internal$Style$baseSheet = _List_fromArray( [ A2($mdgriffith$elm_ui$Internal$Style$Prop, 'display', 'block'), A2( - $mdgriffith$elm_ui$Internal$Style$Child, - 'img', + $mdgriffith$elm_ui$Internal$Style$Descriptor, + $mdgriffith$elm_ui$Internal$Style$dot($mdgriffith$elm_ui$Internal$Style$classes.heightFill), _List_fromArray( [ - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-height', '100%'), - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-width', '100%'), - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + A2( + $mdgriffith$elm_ui$Internal$Style$Child, + 'img', + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-height', '100%'), + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + ])) + ])), + A2( + $mdgriffith$elm_ui$Internal$Style$Descriptor, + $mdgriffith$elm_ui$Internal$Style$dot($mdgriffith$elm_ui$Internal$Style$classes.widthFill), + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Internal$Style$Child, + 'img', + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-width', '100%'), + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + ])) ])) ])), A2( @@ -13153,814 +13457,12 @@ var $mdgriffith$elm_ui$Internal$Model$element = F4( $mdgriffith$elm_ui$Internal$Model$NoNearbyChildren, $elm$core$List$reverse(attributes))); }); -var $mdgriffith$elm_ui$Internal$Model$Height = function (a) { - return {$: 'Height', a: a}; -}; -var $mdgriffith$elm_ui$Element$height = $mdgriffith$elm_ui$Internal$Model$Height; -var $mdgriffith$elm_ui$Internal$Model$Attr = function (a) { - return {$: 'Attr', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$htmlClass = function (cls) { - return $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$class(cls)); -}; -var $mdgriffith$elm_ui$Internal$Model$Content = {$: 'Content'}; -var $mdgriffith$elm_ui$Element$shrink = $mdgriffith$elm_ui$Internal$Model$Content; -var $mdgriffith$elm_ui$Internal$Model$Width = function (a) { - return {$: 'Width', a: a}; -}; -var $mdgriffith$elm_ui$Element$width = $mdgriffith$elm_ui$Internal$Model$Width; -var $mdgriffith$elm_ui$Element$column = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asColumn, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentTop + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentLeft)), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Element$el = F2( - function (attrs, child) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asEl, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - attrs)), - $mdgriffith$elm_ui$Internal$Model$Unkeyed( - _List_fromArray( - [child]))); - }); -var $mdgriffith$elm_ui$Internal$Model$Class = F2( - function (a, b) { - return {$: 'Class', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Flag$overflow = $mdgriffith$elm_ui$Internal$Flag$flag(20); -var $mdgriffith$elm_ui$Element$clip = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$overflow, $mdgriffith$elm_ui$Internal$Style$classes.clip); -var $mdgriffith$elm_ui$Internal$Model$Colored = F3( - function (a, b, c) { - return {$: 'Colored', a: a, b: b, c: c}; - }); -var $mdgriffith$elm_ui$Internal$Model$StyleClass = F2( - function (a, b) { - return {$: 'StyleClass', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Flag$bgColor = $mdgriffith$elm_ui$Internal$Flag$flag(8); -var $mdgriffith$elm_ui$Internal$Model$formatColorClass = function (_v0) { - var red = _v0.a; - var green = _v0.b; - var blue = _v0.c; - var alpha = _v0.d; - return $mdgriffith$elm_ui$Internal$Model$floatClass(red) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(green) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(blue) + ('-' + $mdgriffith$elm_ui$Internal$Model$floatClass(alpha)))))); -}; -var $mdgriffith$elm_ui$Element$Background$color = function (clr) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$bgColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'bg-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), - 'background-color', - clr)); -}; -var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) { - return {$: 'Fill', a: a}; -}; -var $mdgriffith$elm_ui$Element$fill = $mdgriffith$elm_ui$Internal$Model$Fill(1); -var $mdgriffith$elm_ui$Internal$Model$InFront = {$: 'InFront'}; -var $mdgriffith$elm_ui$Internal$Model$Nearby = F2( - function (a, b) { - return {$: 'Nearby', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$NoAttribute = {$: 'NoAttribute'}; -var $mdgriffith$elm_ui$Element$createNearby = F2( - function (loc, element) { - if (element.$ === 'Empty') { - return $mdgriffith$elm_ui$Internal$Model$NoAttribute; - } else { - return A2($mdgriffith$elm_ui$Internal$Model$Nearby, loc, element); - } - }); -var $mdgriffith$elm_ui$Element$inFront = function (element) { - return A2($mdgriffith$elm_ui$Element$createNearby, $mdgriffith$elm_ui$Internal$Model$InFront, element); -}; -var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'}; -var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty; -var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 'Normal', a: a}; -}; -var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; -var $elm$html$Html$Events$on = F2( - function (event, decoder) { - return A2( - $elm$virtual_dom$VirtualDom$on, - event, - $elm$virtual_dom$VirtualDom$Normal(decoder)); - }); -var $elm$html$Html$Events$onClick = function (msg) { - return A2( - $elm$html$Html$Events$on, - 'click', - $elm$json$Json$Decode$succeed(msg)); -}; -var $mdgriffith$elm_ui$Element$Events$onClick = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Attr, $elm$html$Html$Events$onClick); +var $mdgriffith$elm_ui$Internal$Model$AllowHover = {$: 'AllowHover'}; +var $mdgriffith$elm_ui$Internal$Model$Layout = {$: 'Layout'}; var $mdgriffith$elm_ui$Internal$Model$Rgba = F4( function (a, b, c, d) { return {$: 'Rgba', a: a, b: b, c: c, d: d}; }); -var $mdgriffith$elm_ui$Element$rgba255 = F4( - function (red, green, blue, a) { - return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, a); - }); -var $elm$core$List$singleton = function (value) { - return _List_fromArray( - [value]); -}; -var $author$project$Internal$Dialog$modal = function (_v0) { - var onDismiss = _v0.onDismiss; - var content = _v0.content; - return _List_fromArray( - [ - $mdgriffith$elm_ui$Element$inFront( - A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$Background$color( - A4($mdgriffith$elm_ui$Element$rgba255, 0, 0, 0, 0.5)) - ]), - A2( - $elm$core$Maybe$withDefault, - _List_Nil, - A2( - $elm$core$Maybe$map, - A2($elm$core$Basics$composeR, $mdgriffith$elm_ui$Element$Events$onClick, $elm$core$List$singleton), - onDismiss))), - $mdgriffith$elm_ui$Element$none)), - $mdgriffith$elm_ui$Element$inFront(content), - $mdgriffith$elm_ui$Element$clip - ]); -}; -var $mdgriffith$elm_ui$Internal$Model$Describe = function (a) { - return {$: 'Describe', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$Paragraph = {$: 'Paragraph'}; -var $mdgriffith$elm_ui$Internal$Model$SpacingStyle = F3( - function (a, b, c) { - return {$: 'SpacingStyle', a: a, b: b, c: c}; - }); -var $mdgriffith$elm_ui$Internal$Flag$spacing = $mdgriffith$elm_ui$Internal$Flag$flag(3); -var $mdgriffith$elm_ui$Internal$Model$spacingName = F2( - function (x, y) { - return 'spacing-' + ($elm$core$String$fromInt(x) + ('-' + $elm$core$String$fromInt(y))); - }); -var $mdgriffith$elm_ui$Element$spacing = function (x) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$spacing, - A3( - $mdgriffith$elm_ui$Internal$Model$SpacingStyle, - A2($mdgriffith$elm_ui$Internal$Model$spacingName, x, x), - x, - x)); -}; -var $mdgriffith$elm_ui$Element$paragraph = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asParagraph, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Paragraph), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$spacing(5), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Internal$Model$AsRow = {$: 'AsRow'}; -var $mdgriffith$elm_ui$Internal$Model$asRow = $mdgriffith$elm_ui$Internal$Model$AsRow; -var $mdgriffith$elm_ui$Element$row = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asRow, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentLeft + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentCenterY)), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Internal$Model$Text = function (a) { - return {$: 'Text', a: a}; -}; -var $mdgriffith$elm_ui$Element$text = function (content) { - return $mdgriffith$elm_ui$Internal$Model$Text(content); -}; -var $mdgriffith$elm_ui$Internal$Model$Button = {$: 'Button'}; -var $elm$json$Json$Encode$bool = _Json_wrap; -var $elm$html$Html$Attributes$boolProperty = F2( - function (key, bool) { - return A2( - _VirtualDom_property, - key, - $elm$json$Json$Encode$bool(bool)); - }); -var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); -var $mdgriffith$elm_ui$Element$Input$hasFocusStyle = function (attr) { - if (((attr.$ === 'StyleClass') && (attr.b.$ === 'PseudoSelector')) && (attr.b.a.$ === 'Focus')) { - var _v1 = attr.b; - var _v2 = _v1.a; - return true; - } else { - return false; - } -}; -var $mdgriffith$elm_ui$Element$Input$focusDefault = function (attrs) { - return A2($elm$core$List$any, $mdgriffith$elm_ui$Element$Input$hasFocusStyle, attrs) ? $mdgriffith$elm_ui$Internal$Model$NoAttribute : $mdgriffith$elm_ui$Internal$Model$htmlClass('focusable'); -}; -var $mdgriffith$elm_ui$Element$Input$enter = 'Enter'; -var $elm$json$Json$Decode$andThen = _Json_andThen; -var $elm$json$Json$Decode$fail = _Json_fail; -var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 'MayPreventDefault', a: a}; -}; -var $elm$html$Html$Events$preventDefaultOn = F2( - function (event, decoder) { - return A2( - $elm$virtual_dom$VirtualDom$on, - event, - $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); - }); -var $elm$json$Json$Decode$string = _Json_decodeString; -var $mdgriffith$elm_ui$Element$Input$onKey = F2( - function (desiredCode, msg) { - var decode = function (code) { - return _Utils_eq(code, desiredCode) ? $elm$json$Json$Decode$succeed(msg) : $elm$json$Json$Decode$fail('Not the enter key'); - }; - var isKey = A2( - $elm$json$Json$Decode$andThen, - decode, - A2($elm$json$Json$Decode$field, 'key', $elm$json$Json$Decode$string)); - return $mdgriffith$elm_ui$Internal$Model$Attr( - A2( - $elm$html$Html$Events$preventDefaultOn, - 'keyup', - A2( - $elm$json$Json$Decode$map, - function (fired) { - return _Utils_Tuple2(fired, true); - }, - isKey))); - }); -var $mdgriffith$elm_ui$Element$Input$onEnter = function (msg) { - return A2($mdgriffith$elm_ui$Element$Input$onKey, $mdgriffith$elm_ui$Element$Input$enter, msg); -}; -var $mdgriffith$elm_ui$Internal$Flag$cursor = $mdgriffith$elm_ui$Internal$Flag$flag(21); -var $mdgriffith$elm_ui$Element$pointer = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$cursor, $mdgriffith$elm_ui$Internal$Style$classes.cursorPointer); -var $elm$html$Html$Attributes$tabindex = function (n) { - return A2( - _VirtualDom_attribute, - 'tabIndex', - $elm$core$String$fromInt(n)); -}; -var $mdgriffith$elm_ui$Element$Input$button = F2( - function (attrs, _v0) { - var onPress = _v0.onPress; - var label = _v0.label; - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asEl, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentCenterX + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.contentCenterY + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.seButton + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.noTextSelection)))))), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$pointer, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Input$focusDefault(attrs), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Button), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$tabindex(0)), - function () { - if (onPress.$ === 'Nothing') { - return A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$disabled(true)), - attrs); - } else { - var msg = onPress.a; - return A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Events$onClick(msg), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Input$onEnter(msg), - attrs)); - } - }()))))))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed( - _List_fromArray( - [label]))); - }); -var $author$project$Internal$Button$button = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - var icon = _v0.icon; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), - { - label: A2( - $mdgriffith$elm_ui$Element$row, - style.content.elementRow, - _List_fromArray( - [ - icon( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise), - A2( - $mdgriffith$elm_ui$Element$el, - style.content.content.text.contentText, - $mdgriffith$elm_ui$Element$text(text)) - ])), - onPress: onPress - }); - }); -var $author$project$Internal$Button$textButton = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - return A2( - $author$project$Internal$Button$button, - style, - { - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - onPress: onPress, - text: text - }); - }); -var $author$project$Internal$Dialog$dialog = F2( - function (style, _v0) { - var title = _v0.title; - var text = _v0.text; - var accept = _v0.accept; - var dismiss = _v0.dismiss; - return $author$project$Internal$Dialog$modal( - { - content: A2( - $mdgriffith$elm_ui$Element$column, - _Utils_ap( - _List_fromArray( - [$mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY]), - style.elementColumn), - _List_fromArray( - [ - A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - $mdgriffith$elm_ui$Element$text, - $mdgriffith$elm_ui$Element$el(style.content.title.contentText)), - title)), - A2( - $mdgriffith$elm_ui$Element$paragraph, - style.content.text.contentText, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text(text))), - A2( - $mdgriffith$elm_ui$Element$row, - _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$alignRight, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) - ]), - style.content.buttons.elementRow), - function () { - var _v1 = _Utils_Tuple2(accept, dismiss); - if (_v1.a.$ === 'Just') { - if (_v1.b.$ === 'Nothing') { - var acceptButton = _v1.a.a; - var _v2 = _v1.b; - return $elm$core$List$singleton( - A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton)); - } else { - var acceptButton = _v1.a.a; - var dismissButton = _v1.b.a; - return _List_fromArray( - [ - A2($author$project$Internal$Button$textButton, style.content.buttons.content.dismiss, dismissButton), - A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton) - ]); - } - } else { - return _List_Nil; - } - }()) - ])), - onDismiss: function () { - var _v3 = _Utils_Tuple2(accept, dismiss); - if (_v3.a.$ === 'Nothing') { - if (_v3.b.$ === 'Nothing') { - var _v4 = _v3.a; - var _v5 = _v3.b; - return $elm$core$Maybe$Nothing; - } else { - var _v6 = _v3.a; - var onPress = _v3.b.a.onPress; - return onPress; - } - } else { - return $elm$core$Maybe$Nothing; - } - }() - }); - }); -var $author$project$Widget$dialog = function () { - var fun = $author$project$Internal$Dialog$dialog; - return fun; -}(); -var $elm$svg$Svg$Attributes$height = _VirtualDom_attribute('height'); -var $mdgriffith$elm_ui$Internal$Model$unstyled = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Unstyled, $elm$core$Basics$always); -var $mdgriffith$elm_ui$Element$html = $mdgriffith$elm_ui$Internal$Model$unstyled; -var $elm$svg$Svg$Attributes$stroke = _VirtualDom_attribute('stroke'); -var $avh4$elm_color$Color$toCssString = function (_v0) { - var r = _v0.a; - var g = _v0.b; - var b = _v0.c; - var a = _v0.d; - var roundTo = function (x) { - return $elm$core$Basics$round(x * 1000) / 1000; - }; - var pct = function (x) { - return $elm$core$Basics$round(x * 10000) / 100; - }; - return $elm$core$String$concat( - _List_fromArray( - [ - 'rgba(', - $elm$core$String$fromFloat( - pct(r)), - '%,', - $elm$core$String$fromFloat( - pct(g)), - '%,', - $elm$core$String$fromFloat( - pct(b)), - '%,', - $elm$core$String$fromFloat( - roundTo(a)), - ')' - ])); -}; -var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); -var $author$project$Widget$Icon$elmFeather = F2( - function (fun, icon) { - return function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_Nil, - $mdgriffith$elm_ui$Element$html( - A2( - fun, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$width( - $elm$core$String$fromInt(size)), - $elm$svg$Svg$Attributes$height( - $elm$core$String$fromInt(size)), - $elm$svg$Svg$Attributes$stroke( - $avh4$elm_color$Color$toCssString(color)) - ]), - icon))); - }; - }); -var $elm$core$Array$fromListHelp = F3( - function (list, nodeList, nodeListSize) { - fromListHelp: - while (true) { - var _v0 = A2($elm$core$Elm$JsArray$initializeFromList, $elm$core$Array$branchFactor, list); - var jsArray = _v0.a; - var remainingItems = _v0.b; - if (_Utils_cmp( - $elm$core$Elm$JsArray$length(jsArray), - $elm$core$Array$branchFactor) < 0) { - return A2( - $elm$core$Array$builderToArray, - true, - {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); - } else { - var $temp$list = remainingItems, - $temp$nodeList = A2( - $elm$core$List$cons, - $elm$core$Array$Leaf(jsArray), - nodeList), - $temp$nodeListSize = nodeListSize + 1; - list = $temp$list; - nodeList = $temp$nodeList; - nodeListSize = $temp$nodeListSize; - continue fromListHelp; - } - } - }); -var $elm$core$Array$fromList = function (list) { - if (!list.b) { - return $elm$core$Array$empty; - } else { - return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); - } -}; -var $elm$core$Array$bitMask = 4294967295 >>> (32 - $elm$core$Array$shiftStep); -var $elm$core$Elm$JsArray$unsafeGet = _JsArray_unsafeGet; -var $elm$core$Array$getHelp = F3( - function (shift, index, tree) { - getHelp: - while (true) { - var pos = $elm$core$Array$bitMask & (index >>> shift); - var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { - var subTree = _v0.a; - var $temp$shift = shift - $elm$core$Array$shiftStep, - $temp$index = index, - $temp$tree = subTree; - shift = $temp$shift; - index = $temp$index; - tree = $temp$tree; - continue getHelp; - } else { - var values = _v0.a; - return A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, values); - } - } - }); -var $elm$core$Array$tailIndex = function (len) { - return (len >>> 5) << 5; -}; -var $elm$core$Array$get = F2( - function (index, _v0) { - var len = _v0.a; - var startShift = _v0.b; - var tree = _v0.c; - var tail = _v0.d; - return ((index < 0) || (_Utils_cmp(index, len) > -1)) ? $elm$core$Maybe$Nothing : ((_Utils_cmp( - index, - $elm$core$Array$tailIndex(len)) > -1) ? $elm$core$Maybe$Just( - A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, tail)) : $elm$core$Maybe$Just( - A3($elm$core$Array$getHelp, startShift, index, tree))); - }); -var $feathericons$elm_feather$FeatherIcons$github = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'github', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Internal$Model$Left = {$: 'Left'}; -var $mdgriffith$elm_ui$Element$alignLeft = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Left); -var $mdgriffith$elm_ui$Internal$Flag$fontWeight = $mdgriffith$elm_ui$Internal$Flag$flag(13); -var $mdgriffith$elm_ui$Element$Font$bold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.bold); -var $elm$core$Basics$clamp = F3( - function (low, high, number) { - return (_Utils_cmp(number, low) < 0) ? low : ((_Utils_cmp(number, high) > 0) ? high : number); - }); -var $mdgriffith$elm_ui$Internal$Model$Heading = function (a) { - return {$: 'Heading', a: a}; -}; -var $mdgriffith$elm_ui$Element$Region$heading = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Heading); -var $mdgriffith$elm_ui$Internal$Model$PaddingStyle = F5( - function (a, b, c, d, e) { - return {$: 'PaddingStyle', a: a, b: b, c: c, d: d, e: e}; - }); -var $mdgriffith$elm_ui$Internal$Flag$padding = $mdgriffith$elm_ui$Internal$Flag$flag(2); -var $mdgriffith$elm_ui$Internal$Model$paddingName = F4( - function (top, right, bottom, left) { - return 'pad-' + ($elm$core$String$fromInt(top) + ('-' + ($elm$core$String$fromInt(right) + ('-' + ($elm$core$String$fromInt(bottom) + ('-' + $elm$core$String$fromInt(left))))))); - }); -var $mdgriffith$elm_ui$Element$paddingEach = function (_v0) { - var top = _v0.top; - var right = _v0.right; - var bottom = _v0.bottom; - var left = _v0.left; - if (_Utils_eq(top, right) && (_Utils_eq(top, bottom) && _Utils_eq(top, left))) { - var topFloat = top; - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$padding, - A5( - $mdgriffith$elm_ui$Internal$Model$PaddingStyle, - 'p-' + $elm$core$String$fromInt(top), - topFloat, - topFloat, - topFloat, - topFloat)); - } else { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$padding, - A5( - $mdgriffith$elm_ui$Internal$Model$PaddingStyle, - A4($mdgriffith$elm_ui$Internal$Model$paddingName, top, right, bottom, left), - top, - right, - bottom, - left)); - } -}; -var $mdgriffith$elm_ui$Internal$Model$FontSize = function (a) { - return {$: 'FontSize', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Flag$fontSize = $mdgriffith$elm_ui$Internal$Flag$flag(4); -var $mdgriffith$elm_ui$Element$Font$size = function (i) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontSize, - $mdgriffith$elm_ui$Internal$Model$FontSize(i)); -}; -var $Orasund$elm_ui_framework$Framework$Heading$h = function (inputLevel) { - var level = A3($elm$core$Basics$clamp, 1, 6, inputLevel); - var size = (level === 6) ? 14 : (32 - ((level - 1) * 4)); - return _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Region$heading(level), - $mdgriffith$elm_ui$Element$Font$size(size), - $mdgriffith$elm_ui$Element$paddingEach( - {bottom: 2, left: 0, right: 0, top: 2}), - $mdgriffith$elm_ui$Element$alignLeft, - $mdgriffith$elm_ui$Element$Font$bold - ]); -}; -var $Orasund$elm_ui_framework$Framework$Heading$h1 = $Orasund$elm_ui_framework$Framework$Heading$h(1); -var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; -var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; -var $elm$svg$Svg$circle = $elm$svg$Svg$trustedNode('circle'); -var $elm$svg$Svg$Attributes$cx = _VirtualDom_attribute('cx'); -var $elm$svg$Svg$Attributes$cy = _VirtualDom_attribute('cy'); -var $elm$svg$Svg$Attributes$r = _VirtualDom_attribute('r'); -var $feathericons$elm_feather$FeatherIcons$penTool = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'pen-tool', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M12 19l7-7 3 3-7 7-3-3z') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M2 2l7.586 7.586') - ]), - _List_Nil), - A2( - $elm$svg$Svg$circle, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$cx('11'), - $elm$svg$Svg$Attributes$cy('11'), - $elm$svg$Svg$Attributes$r('2') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Element$Input$Placeholder = F2( - function (a, b) { - return {$: 'Placeholder', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Element$Input$placeholder = $mdgriffith$elm_ui$Element$Input$Placeholder; -var $elm$html$Html$Attributes$attribute = $elm$virtual_dom$VirtualDom$attribute; -var $mdgriffith$elm_ui$Internal$Flag$fontColor = $mdgriffith$elm_ui$Internal$Flag$flag(14); -var $mdgriffith$elm_ui$Element$Font$color = function (fontColor) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'fc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(fontColor), - 'color', - fontColor)); -}; -var $mdgriffith$elm_ui$Element$rgb255 = F3( - function (red, green, blue) { - return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, 1); - }); -var $Orasund$elm_ui_framework$Framework$Color$darkerGrey = A3($mdgriffith$elm_ui$Element$rgb255, 18, 18, 18); -var $mdgriffith$elm_ui$Internal$Flag$borderColor = $mdgriffith$elm_ui$Internal$Flag$flag(28); -var $mdgriffith$elm_ui$Element$Border$color = function (clr) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$borderColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'bc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), - 'border-color', - clr)); -}; -var $Orasund$elm_ui_framework$Framework$Color$lighterGrey = A3($mdgriffith$elm_ui$Element$rgb255, 245, 245, 245); -var $Orasund$elm_ui_framework$Framework$Color$light = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey), - $mdgriffith$elm_ui$Element$Border$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey) - ]); -var $Orasund$elm_ui_framework$Framework$layoutAttributes = _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$size(16), - $mdgriffith$elm_ui$Element$Font$color($Orasund$elm_ui_framework$Framework$Color$darkerGrey) - ]), - $Orasund$elm_ui_framework$Framework$Color$light); -var $mdgriffith$elm_ui$Internal$Model$FocusStyleOption = function (a) { - return {$: 'FocusStyleOption', a: a}; -}; -var $mdgriffith$elm_ui$Element$focusStyle = $mdgriffith$elm_ui$Internal$Model$FocusStyleOption; -var $Orasund$elm_ui_framework$Framework$Color$turquoise = A3($mdgriffith$elm_ui$Element$rgb255, 0, 209, 178); -var $Orasund$elm_ui_framework$Framework$layoutOptions = $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$focusStyle( - { - backgroundColor: $elm$core$Maybe$Nothing, - borderColor: $elm$core$Maybe$Just($Orasund$elm_ui_framework$Framework$Color$turquoise), - shadow: $elm$core$Maybe$Just( - { - blur: 10, - color: $Orasund$elm_ui_framework$Framework$Color$turquoise, - offset: _Utils_Tuple2(0, 0), - size: 1 - }) - })); -var $mdgriffith$elm_ui$Internal$Model$OnlyDynamic = F2( - function (a, b) { - return {$: 'OnlyDynamic', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$StaticRootAndDynamic = F2( - function (a, b) { - return {$: 'StaticRootAndDynamic', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$AllowHover = {$: 'AllowHover'}; -var $mdgriffith$elm_ui$Internal$Model$Layout = {$: 'Layout'}; var $mdgriffith$elm_ui$Internal$Model$focusDefaultStyle = { backgroundColor: $elm$core$Maybe$Nothing, borderColor: $elm$core$Maybe$Nothing, @@ -14095,15 +13597,36 @@ var $mdgriffith$elm_ui$Internal$Model$renderRoot = F3( _List_fromArray( [child])))); }); +var $mdgriffith$elm_ui$Internal$Model$Colored = F3( + function (a, b, c) { + return {$: 'Colored', a: a, b: b, c: c}; + }); var $mdgriffith$elm_ui$Internal$Model$FontFamily = F2( function (a, b) { return {$: 'FontFamily', a: a, b: b}; }); +var $mdgriffith$elm_ui$Internal$Model$FontSize = function (a) { + return {$: 'FontSize', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$SansSerif = {$: 'SansSerif'}; +var $mdgriffith$elm_ui$Internal$Model$StyleClass = F2( + function (a, b) { + return {$: 'StyleClass', a: a, b: b}; + }); var $mdgriffith$elm_ui$Internal$Model$Typeface = function (a) { return {$: 'Typeface', a: a}; }; +var $mdgriffith$elm_ui$Internal$Flag$bgColor = $mdgriffith$elm_ui$Internal$Flag$flag(8); +var $mdgriffith$elm_ui$Internal$Flag$fontColor = $mdgriffith$elm_ui$Internal$Flag$flag(14); var $mdgriffith$elm_ui$Internal$Flag$fontFamily = $mdgriffith$elm_ui$Internal$Flag$flag(5); +var $mdgriffith$elm_ui$Internal$Flag$fontSize = $mdgriffith$elm_ui$Internal$Flag$flag(4); +var $mdgriffith$elm_ui$Internal$Model$formatColorClass = function (_v0) { + var red = _v0.a; + var green = _v0.b; + var blue = _v0.c; + var alpha = _v0.d; + return $mdgriffith$elm_ui$Internal$Model$floatClass(red) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(green) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(blue) + ('-' + $mdgriffith$elm_ui$Internal$Model$floatClass(alpha)))))); +}; var $elm$core$String$toLower = _String_toLower; var $elm$core$String$words = _String_words; var $mdgriffith$elm_ui$Internal$Model$renderFontClassName = F2( @@ -14201,6 +13724,86 @@ var $mdgriffith$elm_ui$Element$layoutWith = F3( _Utils_ap($mdgriffith$elm_ui$Internal$Model$rootStyle, attrs)), child); }); +var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith( + {options: _List_Nil}); +var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; +var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; +var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'}; +var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty; +var $elm$html$Html$Attributes$attribute = $elm$virtual_dom$VirtualDom$attribute; +var $mdgriffith$elm_ui$Element$Font$color = function (fontColor) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'fc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(fontColor), + 'color', + fontColor)); +}; +var $mdgriffith$elm_ui$Element$rgb255 = F3( + function (red, green, blue) { + return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, 1); + }); +var $Orasund$elm_ui_framework$Framework$Color$darkerGrey = A3($mdgriffith$elm_ui$Element$rgb255, 18, 18, 18); +var $mdgriffith$elm_ui$Element$Background$color = function (clr) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$bgColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'bg-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), + 'background-color', + clr)); +}; +var $mdgriffith$elm_ui$Internal$Flag$borderColor = $mdgriffith$elm_ui$Internal$Flag$flag(28); +var $mdgriffith$elm_ui$Element$Border$color = function (clr) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$borderColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'bc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), + 'border-color', + clr)); +}; +var $Orasund$elm_ui_framework$Framework$Color$lighterGrey = A3($mdgriffith$elm_ui$Element$rgb255, 245, 245, 245); +var $Orasund$elm_ui_framework$Framework$Color$light = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey), + $mdgriffith$elm_ui$Element$Border$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey) + ]); +var $mdgriffith$elm_ui$Element$Font$size = function (i) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontSize, + $mdgriffith$elm_ui$Internal$Model$FontSize(i)); +}; +var $Orasund$elm_ui_framework$Framework$layoutAttributes = _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$size(16), + $mdgriffith$elm_ui$Element$Font$color($Orasund$elm_ui_framework$Framework$Color$darkerGrey) + ]), + $Orasund$elm_ui_framework$Framework$Color$light); +var $mdgriffith$elm_ui$Internal$Model$FocusStyleOption = function (a) { + return {$: 'FocusStyleOption', a: a}; +}; +var $mdgriffith$elm_ui$Element$focusStyle = $mdgriffith$elm_ui$Internal$Model$FocusStyleOption; +var $Orasund$elm_ui_framework$Framework$Color$turquoise = A3($mdgriffith$elm_ui$Element$rgb255, 0, 209, 178); +var $Orasund$elm_ui_framework$Framework$layoutOptions = $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$focusStyle( + { + backgroundColor: $elm$core$Maybe$Nothing, + borderColor: $elm$core$Maybe$Just($Orasund$elm_ui_framework$Framework$Color$turquoise), + shadow: $elm$core$Maybe$Just( + { + blur: 10, + color: $Orasund$elm_ui_framework$Framework$Color$turquoise, + offset: _Utils_Tuple2(0, 0), + size: 1 + }) + })); var $Orasund$elm_ui_framework$Framework$layout = function (attributes) { return A2( $mdgriffith$elm_ui$Element$layoutWith, @@ -14227,236 +13830,6 @@ var $Orasund$elm_ui_framework$Framework$responsiveLayout = F2( A2($Orasund$elm_ui_framework$Framework$layout, attributes, view) ])); }); -var $elm$svg$Svg$Attributes$class = _VirtualDom_attribute('class'); -var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); -var $elm$svg$Svg$map = $elm$virtual_dom$VirtualDom$map; -var $elm$svg$Svg$Attributes$strokeLinecap = _VirtualDom_attribute('stroke-linecap'); -var $elm$svg$Svg$Attributes$strokeLinejoin = _VirtualDom_attribute('stroke-linejoin'); -var $elm$svg$Svg$Attributes$strokeWidth = _VirtualDom_attribute('stroke-width'); -var $elm$svg$Svg$svg = $elm$svg$Svg$trustedNode('svg'); -var $elm$svg$Svg$Attributes$viewBox = _VirtualDom_attribute('viewBox'); -var $feathericons$elm_feather$FeatherIcons$toHtml = F2( - function (attributes, _v0) { - var src = _v0.a.src; - var attrs = _v0.a.attrs; - var strSize = $elm$core$String$fromFloat(attrs.size); - var baseAttributes = _List_fromArray( - [ - $elm$svg$Svg$Attributes$fill('none'), - $elm$svg$Svg$Attributes$height( - _Utils_ap(strSize, attrs.sizeUnit)), - $elm$svg$Svg$Attributes$width( - _Utils_ap(strSize, attrs.sizeUnit)), - $elm$svg$Svg$Attributes$stroke('currentColor'), - $elm$svg$Svg$Attributes$strokeLinecap('round'), - $elm$svg$Svg$Attributes$strokeLinejoin('round'), - $elm$svg$Svg$Attributes$strokeWidth( - $elm$core$String$fromFloat(attrs.strokeWidth)), - $elm$svg$Svg$Attributes$viewBox(attrs.viewBox) - ]); - var combinedAttributes = _Utils_ap( - function () { - var _v1 = attrs._class; - if (_v1.$ === 'Just') { - var c = _v1.a; - return A2( - $elm$core$List$cons, - $elm$svg$Svg$Attributes$class(c), - baseAttributes); - } else { - return baseAttributes; - } - }(), - attributes); - return A2( - $elm$svg$Svg$svg, - combinedAttributes, - A2( - $elm$core$List$map, - $elm$svg$Svg$map($elm$core$Basics$never), - src)); - }); -var $elm_community$intdict$IntDict$findMin = function (dict) { - findMin: - while (true) { - switch (dict.$) { - case 'Empty': - return $elm$core$Maybe$Nothing; - case 'Leaf': - var l = dict.a; - return $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = dict.a; - var $temp$dict = i.left; - dict = $temp$dict; - continue findMin; - } - } -}; -var $elm_community$intdict$IntDict$after = F2( - function (key, dict) { - var go = F2( - function (def, currentDict) { - go: - while (true) { - switch (currentDict.$) { - case 'Empty': - return $elm_community$intdict$IntDict$findMin(def); - case 'Leaf': - var l = currentDict.a; - return (_Utils_cmp(l.key, key) < 1) ? $elm_community$intdict$IntDict$findMin(def) : $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = currentDict.a; - if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { - return (_Utils_cmp(i.prefix.prefixBits, key) < 0) ? $elm_community$intdict$IntDict$findMin(def) : $elm_community$intdict$IntDict$findMin(i.left); - } else { - if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { - var $temp$def = def, - $temp$currentDict = i.right; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } else { - var $temp$def = i.right, - $temp$currentDict = i.left; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } - } - } - } - }); - return A2(go, $elm_community$intdict$IntDict$Empty, dict); - }); -var $elm$core$Maybe$andThen = F2( - function (callback, maybeValue) { - if (maybeValue.$ === 'Just') { - var value = maybeValue.a; - return callback(value); - } else { - return $elm$core$Maybe$Nothing; - } - }); -var $elm_community$intdict$IntDict$findMax = function (dict) { - findMax: - while (true) { - switch (dict.$) { - case 'Empty': - return $elm$core$Maybe$Nothing; - case 'Leaf': - var l = dict.a; - return $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = dict.a; - var $temp$dict = i.right; - dict = $temp$dict; - continue findMax; - } - } -}; -var $elm_community$intdict$IntDict$before = F2( - function (key, dict) { - var go = F2( - function (def, currentDict) { - go: - while (true) { - switch (currentDict.$) { - case 'Empty': - return $elm_community$intdict$IntDict$findMax(def); - case 'Leaf': - var l = currentDict.a; - return (_Utils_cmp(l.key, key) > -1) ? $elm_community$intdict$IntDict$findMax(def) : $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = currentDict.a; - if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { - return (_Utils_cmp(i.prefix.prefixBits, key) > 0) ? $elm_community$intdict$IntDict$findMax(def) : $elm_community$intdict$IntDict$findMax(i.right); - } else { - if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { - var $temp$def = i.left, - $temp$currentDict = i.right; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } else { - var $temp$def = def, - $temp$currentDict = i.left; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } - } - } - } - }); - return A2(go, $elm_community$intdict$IntDict$Empty, dict); - }); -var $author$project$Widget$ScrollingNav$current = F2( - function (fromString, _v0) { - var positions = _v0.positions; - var scrollPos = _v0.scrollPos; - return A2( - $elm$core$Maybe$andThen, - fromString, - A2( - $elm$core$Maybe$map, - $elm$core$Tuple$second, - A2( - $elm$core$Maybe$withDefault, - A2($elm_community$intdict$IntDict$after, scrollPos + 1, positions), - A2( - $elm$core$Maybe$map, - $elm$core$Maybe$Just, - A2($elm_community$intdict$IntDict$before, scrollPos + 1, positions))))); - }); -var $elm$core$List$head = function (list) { - if (list.b) { - var x = list.a; - var xs = list.b; - return $elm$core$Maybe$Just(x); - } else { - return $elm$core$Maybe$Nothing; - } -}; -var $author$project$Widget$ScrollingNav$toSelect = F2( - function (onSelect, model) { - var arrangement = model.arrangement; - var toString = model.toString; - var fromString = model.fromString; - return { - onSelect: onSelect, - options: A2( - $elm$core$List$map, - function (s) { - return { - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - text: toString(s) - }; - }, - arrangement), - selected: $elm$core$List$head( - A2( - $elm$core$List$filterMap, - function (_v0) { - var i = _v0.a; - var s = _v0.b; - return _Utils_eq( - $elm$core$Maybe$Just(s), - A2($author$project$Widget$ScrollingNav$current, fromString, model)) ? $elm$core$Maybe$Just(i) : $elm$core$Maybe$Nothing; - }, - A2( - $elm$core$List$indexedMap, - F2( - function (i, s) { - return _Utils_Tuple2(i, s); - }), - arrangement))) - }; - }); var $avh4$elm_color$Color$RgbaSpace = F4( function (a, b, c, d) { return {$: 'RgbaSpace', a: a, b: b, c: c, d: d}; @@ -14503,8 +13876,16 @@ var $author$project$Internal$Material$Palette$defaultPalette = { surface: A3($avh4$elm_color$Color$rgb255, 255, 255, 255) }; var $author$project$Widget$Material$defaultPalette = $author$project$Internal$Material$Palette$defaultPalette; +var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) { + return {$: 'AlignY', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$Bottom = {$: 'Bottom'}; var $mdgriffith$elm_ui$Element$alignBottom = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$Bottom); +var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) { + return {$: 'AlignX', a: a}; +}; +var $mdgriffith$elm_ui$Internal$Model$Right = {$: 'Right'}; +var $mdgriffith$elm_ui$Element$alignRight = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Right); var $elm$core$Basics$pow = _Basics_pow; var $avh4$elm_color$Color$toRgba = function (_v0) { var r = _v0.a; @@ -14547,6 +13928,11 @@ var $mdgriffith$elm_ui$Element$Font$letterSpacing = function (offset) { 'letter-spacing', $elm$core$String$fromFloat(offset) + 'px')); }; +var $mdgriffith$elm_ui$Internal$Model$Class = F2( + function (a, b) { + return {$: 'Class', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Flag$fontWeight = $mdgriffith$elm_ui$Internal$Flag$flag(13); var $mdgriffith$elm_ui$Element$Font$semiBold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.textSemiBold); var $elm$virtual_dom$VirtualDom$style = _VirtualDom_style; var $elm$html$Html$Attributes$style = $elm$virtual_dom$VirtualDom$style; @@ -14558,7 +13944,15 @@ var $author$project$Widget$Material$Typography$button = _List_fromArray( $mdgriffith$elm_ui$Element$Font$semiBold, $mdgriffith$elm_ui$Element$Font$letterSpacing(1.25) ]); +var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'}; +var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX); +var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'}; +var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY); var $author$project$Widget$Material$Color$gray = A3($avh4$elm_color$Color$rgb255, 119, 119, 119); +var $mdgriffith$elm_ui$Internal$Model$Height = function (a) { + return {$: 'Height', a: a}; +}; +var $mdgriffith$elm_ui$Element$height = $mdgriffith$elm_ui$Internal$Model$Height; var $mdgriffith$elm_ui$Internal$Model$Min = F2( function (a, b) { return {$: 'Min', a: a, b: b}; @@ -14567,6 +13961,11 @@ var $mdgriffith$elm_ui$Element$minimum = F2( function (i, l) { return A2($mdgriffith$elm_ui$Internal$Model$Min, i, l); }); +var $mdgriffith$elm_ui$Internal$Model$PaddingStyle = F5( + function (a, b, c, d, e) { + return {$: 'PaddingStyle', a: a, b: b, c: c, d: d, e: e}; + }); +var $mdgriffith$elm_ui$Internal$Flag$padding = $mdgriffith$elm_ui$Internal$Flag$flag(2); var $mdgriffith$elm_ui$Element$paddingXY = F2( function (x, y) { if (_Utils_eq(x, y)) { @@ -14611,6 +14010,31 @@ var $mdgriffith$elm_ui$Element$Border$rounded = function (radius) { 'border-radius', $elm$core$String$fromInt(radius) + 'px')); }; +var $mdgriffith$elm_ui$Internal$Model$Content = {$: 'Content'}; +var $mdgriffith$elm_ui$Element$shrink = $mdgriffith$elm_ui$Internal$Model$Content; +var $mdgriffith$elm_ui$Internal$Model$SpacingStyle = F3( + function (a, b, c) { + return {$: 'SpacingStyle', a: a, b: b, c: c}; + }); +var $mdgriffith$elm_ui$Internal$Flag$spacing = $mdgriffith$elm_ui$Internal$Flag$flag(3); +var $mdgriffith$elm_ui$Internal$Model$spacingName = F2( + function (x, y) { + return 'spacing-' + ($elm$core$String$fromInt(x) + ('-' + $elm$core$String$fromInt(y))); + }); +var $mdgriffith$elm_ui$Element$spacing = function (x) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$spacing, + A3( + $mdgriffith$elm_ui$Internal$Model$SpacingStyle, + A2($mdgriffith$elm_ui$Internal$Model$spacingName, x, x), + x, + x)); +}; +var $mdgriffith$elm_ui$Internal$Model$Width = function (a) { + return {$: 'Width', a: a}; +}; +var $mdgriffith$elm_ui$Element$width = $mdgriffith$elm_ui$Internal$Model$Width; var $author$project$Internal$Material$Button$baseButton = function (_v0) { return { content: { @@ -14661,10 +14085,21 @@ var $mdgriffith$elm_ui$Internal$Model$PseudoSelector = F2( return {$: 'PseudoSelector', a: a, b: b}; }); var $mdgriffith$elm_ui$Internal$Flag$focus = $mdgriffith$elm_ui$Internal$Flag$flag(31); +var $mdgriffith$elm_ui$Internal$Model$Describe = function (a) { + return {$: 'Describe', a: a}; +}; +var $mdgriffith$elm_ui$Internal$Model$Nearby = F2( + function (a, b) { + return {$: 'Nearby', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Model$NoAttribute = {$: 'NoAttribute'}; var $mdgriffith$elm_ui$Internal$Model$TransformComponent = F2( function (a, b) { return {$: 'TransformComponent', a: a, b: b}; }); +var $mdgriffith$elm_ui$Internal$Model$Text = function (a) { + return {$: 'Text', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$map = F2( function (fn, el) { switch (el.$) { @@ -14853,6 +14288,10 @@ var $mdgriffith$elm_ui$Element$Border$shadow = function (almostShade) { 'box-shadow', $mdgriffith$elm_ui$Internal$Model$formatBoxShadow(shade))); }; +var $mdgriffith$elm_ui$Element$rgba255 = F4( + function (red, green, blue, a) { + return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, a); + }); var $author$project$Widget$Material$Color$shadow = function (_float) { return { blur: _float, @@ -14877,6 +14316,10 @@ var $noahzgordon$elm_color_extra$Color$Convert$labToXyz = function (_v0) { z: c(y - (b / 200)) * 108.883 }; }; +var $elm$core$Basics$clamp = F3( + function (low, high, number) { + return (_Utils_cmp(number, low) < 0) ? low : ((_Utils_cmp(number, high) > 0) ? high : number); + }); var $avh4$elm_color$Color$rgb = F3( function (r, g, b) { return A4($avh4$elm_color$Color$RgbaSpace, r, g, b, 1.0); @@ -15075,6 +14518,10 @@ var $author$project$Internal$Material$Button$containedButton = function (palette ]) }; }; +var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) { + return {$: 'Fill', a: a}; +}; +var $mdgriffith$elm_ui$Element$fill = $mdgriffith$elm_ui$Internal$Model$Fill(1); var $author$project$Widget$Material$Typography$h6 = _List_fromArray( [ $mdgriffith$elm_ui$Element$Font$size(20), @@ -15351,6 +14798,40 @@ var $author$project$Internal$Material$List$cardColumn = function (palette) { }; var $author$project$Widget$Material$cardColumn = $author$project$Internal$Material$List$cardColumn; var $author$project$Widget$Material$Color$buttonSelectedOpacity = 0.16; +var $mdgriffith$elm_ui$Internal$Model$paddingName = F4( + function (top, right, bottom, left) { + return 'pad-' + ($elm$core$String$fromInt(top) + ('-' + ($elm$core$String$fromInt(right) + ('-' + ($elm$core$String$fromInt(bottom) + ('-' + $elm$core$String$fromInt(left))))))); + }); +var $mdgriffith$elm_ui$Element$paddingEach = function (_v0) { + var top = _v0.top; + var right = _v0.right; + var bottom = _v0.bottom; + var left = _v0.left; + if (_Utils_eq(top, right) && (_Utils_eq(top, bottom) && _Utils_eq(top, left))) { + var topFloat = top; + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$padding, + A5( + $mdgriffith$elm_ui$Internal$Model$PaddingStyle, + 'p-' + $elm$core$String$fromInt(top), + topFloat, + topFloat, + topFloat, + topFloat)); + } else { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$padding, + A5( + $mdgriffith$elm_ui$Internal$Model$PaddingStyle, + A4($mdgriffith$elm_ui$Internal$Model$paddingName, top, right, bottom, left), + top, + right, + bottom, + left)); + } +}; var $author$project$Widget$Material$Color$textAndBackground = function (color) { return _List_fromArray( [ @@ -15491,6 +14972,62 @@ var $author$project$Internal$Material$List$column = { }; var $author$project$Widget$Material$column = $author$project$Internal$Material$List$column; var $author$project$Widget$Material$containedButton = $author$project$Internal$Material$Button$containedButton; +var $elm$svg$Svg$Attributes$d = _VirtualDom_attribute('d'); +var $mdgriffith$elm_ui$Element$el = F2( + function (attrs, child) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asEl, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + attrs)), + $mdgriffith$elm_ui$Internal$Model$Unkeyed( + _List_fromArray( + [child]))); + }); +var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); +var $elm$svg$Svg$Attributes$height = _VirtualDom_attribute('height'); +var $mdgriffith$elm_ui$Internal$Model$unstyled = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Unstyled, $elm$core$Basics$always); +var $mdgriffith$elm_ui$Element$html = $mdgriffith$elm_ui$Internal$Model$unstyled; +var $elm$svg$Svg$Attributes$stroke = _VirtualDom_attribute('stroke'); +var $elm$svg$Svg$trustedNode = _VirtualDom_nodeNS('http://www.w3.org/2000/svg'); +var $elm$svg$Svg$svg = $elm$svg$Svg$trustedNode('svg'); +var $avh4$elm_color$Color$toCssString = function (_v0) { + var r = _v0.a; + var g = _v0.b; + var b = _v0.c; + var a = _v0.d; + var roundTo = function (x) { + return $elm$core$Basics$round(x * 1000) / 1000; + }; + var pct = function (x) { + return $elm$core$Basics$round(x * 10000) / 100; + }; + return $elm$core$String$concat( + _List_fromArray( + [ + 'rgba(', + $elm$core$String$fromFloat( + pct(r)), + '%,', + $elm$core$String$fromFloat( + pct(g)), + '%,', + $elm$core$String$fromFloat( + pct(b)), + '%,', + $elm$core$String$fromFloat( + roundTo(a)), + ')' + ])); +}; +var $elm$svg$Svg$Attributes$viewBox = _VirtualDom_attribute('viewBox'); +var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); var $author$project$Internal$Material$Icon$icon = function (_v0) { var viewBox = _v0.viewBox; var size = _v0.size; @@ -15515,6 +15052,7 @@ var $author$project$Internal$Material$Icon$icon = function (_v0) { $mdgriffith$elm_ui$Element$html, $mdgriffith$elm_ui$Element$el(_List_Nil))); }; +var $elm$svg$Svg$path = $elm$svg$Svg$trustedNode('path'); var $author$project$Internal$Material$Icon$expand_less = function (_v0) { var size = _v0.size; var color = _v0.color; @@ -15562,7 +15100,7 @@ var $mdgriffith$elm_ui$Element$padding = function (x) { f, f)); }; -var $author$project$Internal$Material$Item$textItem = function (_v0) { +var $author$project$Internal$Material$Item$insetItem = function (_v0) { return { content: { content: { @@ -15639,10 +15177,19 @@ var $author$project$Internal$Material$Item$expansionItem = function (palette) { return { collapseIcon: $author$project$Internal$Material$Icon$expand_less, expandIcon: $author$project$Internal$Material$Icon$expand_more, - item: $author$project$Internal$Material$Item$textItem(palette) + item: $author$project$Internal$Material$Item$insetItem(palette) }; }; var $author$project$Widget$Material$expansionItem = $author$project$Internal$Material$Item$expansionItem; +var $mdgriffith$elm_ui$Element$Font$family = function (families) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontFamily, + A2( + $mdgriffith$elm_ui$Internal$Model$FontFamily, + A3($elm$core$List$foldl, $mdgriffith$elm_ui$Internal$Model$renderFontClassName, 'ff-', families), + families)); +}; var $avh4$elm_color$Color$gray = A4($avh4$elm_color$Color$RgbaSpace, 211 / 255, 215 / 255, 207 / 255, 1.0); var $author$project$Internal$Material$Item$fullBleedDivider = function (_v0) { return { @@ -15728,6 +15275,22 @@ var $author$project$Internal$Material$Item$fullBleedHeader = function (palette) }; }; var $author$project$Widget$Material$fullBleedHeader = $author$project$Internal$Material$Item$fullBleedHeader; +var $author$project$Internal$Material$Item$fullBleedItem = function (palette) { + var i = $author$project$Internal$Material$Item$insetItem(palette); + return { + content: { + content: { + content: {icon: i.content.content.content.content, text: i.content.content.content.text}, + elementRow: i.content.content.elementRow + }, + elementButton: i.content.elementButton, + ifDisabled: i.content.ifDisabled, + otherwise: i.content.otherwise + }, + element: i.element + }; +}; +var $author$project$Widget$Material$fullBleedItem = $author$project$Internal$Material$Item$fullBleedItem; var $author$project$Internal$Material$Button$iconButton = function (palette) { return { content: { @@ -15738,10 +15301,8 @@ var $author$project$Internal$Material$Button$iconButton = function (palette) { otherwise: {color: palette.primary, size: 18} }, text: { - contentText: function (b) { - return b.content.content.text.contentText; - }( - $author$project$Internal$Material$Button$baseButton(palette)) + contentText: _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX]) } }, elementRow: _List_fromArray( @@ -15913,97 +15474,7 @@ var $author$project$Internal$Material$Item$insetHeader = function (palette) { }; }; var $author$project$Widget$Material$insetHeader = $author$project$Internal$Material$Item$insetHeader; -var $author$project$Internal$Material$Layout$drawerButton = function (palette) { - return { - content: { - content: { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), - size: 18 - }, - ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), - size: 18 - } - }, - text: { - contentText: function (b) { - return b.content.content.text.contentText; - }( - $author$project$Internal$Material$Button$baseButton(palette)) - } - }, - elementRow: $author$project$Internal$Material$Button$baseButton(palette).content.elementRow - }, - elementButton: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$size(14), - $mdgriffith$elm_ui$Element$Font$semiBold, - $mdgriffith$elm_ui$Element$Font$letterSpacing(0.25), - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(36)), - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - A2($mdgriffith$elm_ui$Element$paddingXY, 8, 8), - $mdgriffith$elm_ui$Element$Border$rounded(4), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor(palette.surface))), - $mdgriffith$elm_ui$Element$mouseDown( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$focused( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$mouseOver( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) - ])) - ]), - ifActive: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor(palette.primary)) - ]), - ifDisabled: _Utils_ap( - $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), - $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), - $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), - $mdgriffith$elm_ui$Element$focused(_List_Nil) - ])), - otherwise: _List_Nil - }; -}; -var $mdgriffith$elm_ui$Element$Font$family = function (families) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontFamily, - A2( - $mdgriffith$elm_ui$Internal$Model$FontFamily, - A3($elm$core$List$foldl, $mdgriffith$elm_ui$Internal$Model$renderFontClassName, 'ff-', families), - families)); -}; -var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith( - {options: _List_Nil}); +var $author$project$Widget$Material$insetItem = $author$project$Internal$Material$Item$insetItem; var $author$project$Widget$Customize$mapContent = F2( function (fun, a) { return _Utils_update( @@ -16012,104 +15483,7 @@ var $author$project$Widget$Customize$mapContent = F2( content: fun(a.content) }); }); -var $author$project$Internal$Material$Layout$menu = function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $author$project$Internal$Material$Icon$icon, - {color: color, size: size, viewBox: '0 0 48 48'}, - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z') - ]), - _List_Nil) - ])); -}; -var $author$project$Internal$Material$Layout$menuTabButton = function (palette) { - return { - content: { - content: { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: 18 - }, - ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: 18 - } - }, - text: {contentText: _List_Nil} - }, - elementRow: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$spacing(8), - $mdgriffith$elm_ui$Element$centerY, - $mdgriffith$elm_ui$Element$centerX - ]) - }, - elementButton: _Utils_ap( - $author$project$Widget$Material$Typography$button, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(56)), - $mdgriffith$elm_ui$Element$width( - A2( - $mdgriffith$elm_ui$Element$minimum, - 90, - A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill))), - A2($mdgriffith$elm_ui$Element$paddingXY, 12, 16), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor(palette.primary))), - $mdgriffith$elm_ui$Element$alignBottom, - $mdgriffith$elm_ui$Element$mouseDown( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$focused( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$mouseOver( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) - ])) - ])), - ifActive: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Border$widthEach( - {bottom: 2, left: 0, right: 0, top: 0}) - ]), - ifDisabled: _Utils_ap( - $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), - $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), - $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), - $mdgriffith$elm_ui$Element$focused(_List_Nil) - ])), - otherwise: _List_Nil - }; -}; -var $author$project$Internal$Material$Layout$more_vert = function (_v0) { +var $author$project$Internal$Material$Icon$more_vert = function (_v0) { var size = _v0.size; var color = _v0.color; return A2( @@ -16126,8 +15500,7 @@ var $author$project$Internal$Material$Layout$more_vert = function (_v0) { _List_Nil) ])); }; -var $mdgriffith$elm_ui$Element$Font$sansSerif = $mdgriffith$elm_ui$Internal$Model$SansSerif; -var $author$project$Internal$Material$Layout$search = function (_v0) { +var $author$project$Internal$Material$Icon$search = function (_v0) { var size = _v0.size; var color = _v0.color; return A2( @@ -16225,165 +15598,93 @@ var $author$project$Internal$Material$TextInput$searchInput = function (palette) ])), $author$project$Internal$Material$TextInput$textInputBase(palette))); }; -var $author$project$Widget$Material$Color$accessibleWithTextColor = F2( - function (c, color) { - var newConstrast = 7; - var l2 = 1 + ($avh4$elm_color$Color$toRgba(color).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(color) - 1)); - var lighterLuminance = (newConstrast * (l2 + 0.05)) - 0.05; - var l1 = 1 + ($avh4$elm_color$Color$toRgba(c).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(c) - 1)); - var darkerLuminance = (l2 + 0.05) - (0.05 / newConstrast); - return ((_Utils_cmp(l1, l2) > 0) ? ((((l1 + 0.05) / (l2 + 0.05)) < 7) ? A2( - $elm$core$Basics$composeR, - $noahzgordon$elm_color_extra$Color$Convert$colorToLab, - A2( - $elm$core$Basics$composeR, - function (col) { - return _Utils_update( - col, - {l: 100 * lighterLuminance}); +var $author$project$Internal$Material$AppBar$internalBar = F2( + function (content, palette) { + return { + content: { + actions: { + content: { + button: A2( + $author$project$Widget$Customize$mapContent, + $author$project$Widget$Customize$mapContent( + function (record) { + return _Utils_update( + record, + { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: record.icon.ifActive.size + }, + ifDisabled: record.icon.ifDisabled, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: record.icon.otherwise.size + } + } + }); + }), + $author$project$Internal$Material$Button$iconButton(palette)), + moreVerticalIcon: $author$project$Internal$Material$Icon$more_vert, + searchIcon: $author$project$Internal$Material$Icon$search + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignRight, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]) }, - $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity) : ((((l2 + 0.05) / (l1 + 0.05)) < 7) ? A2( - $elm$core$Basics$composeR, - $noahzgordon$elm_color_extra$Color$Convert$colorToLab, - A2( - $elm$core$Basics$composeR, - function (col) { - return _Utils_update( - col, - {l: 100 * darkerLuminance}); + menu: { + content: content, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + $mdgriffith$elm_ui$Element$spacing(8) + ]) }, - $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity))(c); - }); -var $author$project$Widget$Material$Color$dark = A3($avh4$elm_color$Color$rgb255, 50, 50, 50); -var $author$project$Widget$Customize$mapElementButton = F2( - function (fun, a) { - return _Utils_update( - a, - { - elementButton: fun(a.elementButton) - }); - }); -var $author$project$Widget$Customize$elementButton = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementButton, - function (b) { - return _Utils_ap(b, list); + search: $author$project$Internal$Material$TextInput$searchInput(palette) }, - a); - }); -var $author$project$Internal$Material$Snackbar$snackbar = function (palette) { - return { - content: { - button: A2( - $author$project$Widget$Customize$elementButton, + elementRow: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground(palette.primary), _List_fromArray( [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$accessibleWithTextColor, palette.primary, $author$project$Widget$Material$Color$dark))) - ]), - $author$project$Internal$Material$Button$textButton(palette)), - text: { - elementText: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$centerX, - A2($mdgriffith$elm_ui$Element$paddingXY, 10, 8) - ]) - } - }, - elementRow: _List_fromArray( + $mdgriffith$elm_ui$Element$padding(0), + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 360, $mdgriffith$elm_ui$Element$fill)) + ])) + }; + }); +var $author$project$Internal$Material$Icon$menu = function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $author$project$Internal$Material$Icon$icon, + {color: color, size: size, viewBox: '0 0 48 48'}, + _List_fromArray( [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$dark)), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor($author$project$Widget$Material$Color$dark))), - $mdgriffith$elm_ui$Element$Border$rounded(4), - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 344, $mdgriffith$elm_ui$Element$fill)), - A2($mdgriffith$elm_ui$Element$paddingXY, 8, 6), - $mdgriffith$elm_ui$Element$spacing(8), - $mdgriffith$elm_ui$Element$Border$shadow( - $author$project$Widget$Material$Color$shadow(2)) - ]) - }; + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z') + ]), + _List_Nil) + ])); }; -var $mdgriffith$elm_ui$Element$Font$typeface = $mdgriffith$elm_ui$Internal$Model$Typeface; -var $author$project$Internal$Material$Layout$layout = function (palette) { - return { - container: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.background), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$family( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$typeface('Roboto'), - $mdgriffith$elm_ui$Element$Font$sansSerif - ])), - $mdgriffith$elm_ui$Element$Font$size(16), - $mdgriffith$elm_ui$Element$Font$letterSpacing(0.5) - ])), - header: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.primary), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(56)), - $mdgriffith$elm_ui$Element$padding(16), - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$minimum, 360, $mdgriffith$elm_ui$Element$fill)) - ])), - layout: $mdgriffith$elm_ui$Element$layout, - menuButton: A2( - $author$project$Widget$Customize$mapContent, - $author$project$Widget$Customize$mapContent( - function (record) { - return _Utils_update( - record, - { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: record.icon.ifActive.size - }, - ifDisabled: record.icon.ifDisabled, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: record.icon.otherwise.size - } - } - }); - }), - $author$project$Internal$Material$Button$iconButton(palette)), - menuIcon: $author$project$Internal$Material$Layout$menu, - menuTabButton: $author$project$Internal$Material$Layout$menuTabButton(palette), - moreVerticalIcon: $author$project$Internal$Material$Layout$more_vert, - search: $author$project$Internal$Material$TextInput$searchInput(palette), - searchFill: $author$project$Internal$Material$TextInput$textInputBase(palette), - searchIcon: $author$project$Internal$Material$Layout$search, - sheet: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.surface), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill)), - $mdgriffith$elm_ui$Element$padding(8), - $mdgriffith$elm_ui$Element$spacing(8) - ])), - sheetButton: $author$project$Internal$Material$Layout$drawerButton(palette), - snackbar: $author$project$Internal$Material$Snackbar$snackbar(palette), - spacing: 8, +var $author$project$Internal$Material$AppBar$menuBar = $author$project$Internal$Material$AppBar$internalBar( + { + menuIcon: $author$project$Internal$Material$Icon$menu, title: _Utils_ap( $author$project$Widget$Material$Typography$h6, _List_fromArray( [ A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) ])) - }; -}; -var $author$project$Widget$Material$layout = $author$project$Internal$Material$Layout$layout; + }); +var $author$project$Widget$Material$menuBar = $author$project$Internal$Material$AppBar$menuBar; var $author$project$Internal$Material$Item$middleDivider = function (_v0) { return { content: { @@ -16577,9 +15878,15 @@ var $author$project$Internal$Material$Button$outlinedButton = function (palette) }; }; var $author$project$Widget$Material$outlinedButton = $author$project$Internal$Material$Button$outlinedButton; +var $elm$svg$Svg$circle = $elm$svg$Svg$trustedNode('circle'); +var $elm$svg$Svg$Attributes$cx = _VirtualDom_attribute('cx'); +var $elm$svg$Svg$Attributes$cy = _VirtualDom_attribute('cy'); var $elm$svg$Svg$g = $elm$svg$Svg$trustedNode('g'); +var $elm$svg$Svg$Attributes$r = _VirtualDom_attribute('r'); var $elm$svg$Svg$Attributes$strokeDasharray = _VirtualDom_attribute('stroke-dasharray'); var $elm$svg$Svg$Attributes$strokeDashoffset = _VirtualDom_attribute('stroke-dashoffset'); +var $elm$svg$Svg$Attributes$strokeLinecap = _VirtualDom_attribute('stroke-linecap'); +var $elm$svg$Svg$Attributes$strokeWidth = _VirtualDom_attribute('stroke-width'); var $elm$svg$Svg$Attributes$transform = _VirtualDom_attribute('transform'); var $elm$svg$Svg$Attributes$xmlSpace = A2(_VirtualDom_attributeNS, 'http://www.w3.org/XML/1998/namespace', 'xml:space'); var $author$project$Internal$Material$ProgressIndicator$determinateCircularIcon = F3( @@ -16745,6 +16052,207 @@ var $author$project$Internal$Material$List$row = { ]) }; var $author$project$Widget$Material$row = $author$project$Internal$Material$List$row; +var $mdgriffith$elm_ui$Element$Font$sansSerif = $mdgriffith$elm_ui$Internal$Model$SansSerif; +var $author$project$Internal$Material$Item$selectItem = function (palette) { + return { + content: { + content: { + content: { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), + size: 18 + }, + ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), + size: 18 + } + }, + text: { + contentText: _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX]) + } + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 32, $mdgriffith$elm_ui$Element$shrink)), + $mdgriffith$elm_ui$Element$centerY + ]) + }, + elementButton: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$size(14), + $mdgriffith$elm_ui$Element$Font$semiBold, + $mdgriffith$elm_ui$Element$Font$letterSpacing(0.25), + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(36)), + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 8), + $mdgriffith$elm_ui$Element$Border$rounded(4), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor(palette.surface))), + $mdgriffith$elm_ui$Element$mouseDown( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$focused( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$mouseOver( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) + ])) + ]), + ifActive: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor(palette.primary)) + ]), + ifDisabled: _Utils_ap( + $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), + $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])), + otherwise: _List_Nil + }, + element: _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 4) + ]) + }; +}; +var $author$project$Widget$Material$selectItem = $author$project$Internal$Material$Item$selectItem; +var $author$project$Internal$Material$List$sideSheet = function (palette) { + return { + content: { + element: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + ifFirst: _List_Nil, + ifLast: _List_Nil, + ifSingleton: _List_Nil, + otherwise: _List_Nil + }, + elementColumn: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground(palette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), + A2($mdgriffith$elm_ui$Element$paddingXY, 0, 8) + ])) + }; +}; +var $author$project$Widget$Material$sideSheet = $author$project$Internal$Material$List$sideSheet; +var $author$project$Widget$Material$Color$accessibleWithTextColor = F2( + function (c, color) { + var newConstrast = 7; + var l2 = 1 + ($avh4$elm_color$Color$toRgba(color).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(color) - 1)); + var lighterLuminance = (newConstrast * (l2 + 0.05)) - 0.05; + var l1 = 1 + ($avh4$elm_color$Color$toRgba(c).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(c) - 1)); + var darkerLuminance = (l2 + 0.05) - (0.05 / newConstrast); + return ((_Utils_cmp(l1, l2) > 0) ? ((((l1 + 0.05) / (l2 + 0.05)) < 7) ? A2( + $elm$core$Basics$composeR, + $noahzgordon$elm_color_extra$Color$Convert$colorToLab, + A2( + $elm$core$Basics$composeR, + function (col) { + return _Utils_update( + col, + {l: 100 * lighterLuminance}); + }, + $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity) : ((((l2 + 0.05) / (l1 + 0.05)) < 7) ? A2( + $elm$core$Basics$composeR, + $noahzgordon$elm_color_extra$Color$Convert$colorToLab, + A2( + $elm$core$Basics$composeR, + function (col) { + return _Utils_update( + col, + {l: 100 * darkerLuminance}); + }, + $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity))(c); + }); +var $author$project$Widget$Material$Color$dark = A3($avh4$elm_color$Color$rgb255, 50, 50, 50); +var $author$project$Widget$Customize$mapElementButton = F2( + function (fun, a) { + return _Utils_update( + a, + { + elementButton: fun(a.elementButton) + }); + }); +var $author$project$Widget$Customize$elementButton = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementButton, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $author$project$Internal$Material$Snackbar$snackbar = function (palette) { + return { + content: { + button: A2( + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$accessibleWithTextColor, palette.primary, $author$project$Widget$Material$Color$dark))) + ]), + $author$project$Internal$Material$Button$textButton(palette)), + text: { + elementText: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$centerX, + A2($mdgriffith$elm_ui$Element$paddingXY, 10, 8) + ]) + } + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$dark)), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor($author$project$Widget$Material$Color$dark))), + $mdgriffith$elm_ui$Element$Border$rounded(4), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 344, $mdgriffith$elm_ui$Element$fill)), + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 6), + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$Border$shadow( + $author$project$Widget$Material$Color$shadow(2)) + ]) + }; +}; +var $author$project$Widget$Material$snackbar = $author$project$Internal$Material$Snackbar$snackbar; var $author$project$Internal$Material$SortTable$sortTable = function (palette) { return { content: { @@ -16757,6 +16265,8 @@ var $author$project$Internal$Material$SortTable$sortTable = function (palette) { }; }; var $author$project$Widget$Material$sortTable = $author$project$Internal$Material$SortTable$sortTable; +var $mdgriffith$elm_ui$Internal$Model$Left = {$: 'Left'}; +var $mdgriffith$elm_ui$Element$alignLeft = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Left); var $mdgriffith$elm_ui$Internal$Model$MoveX = function (a) { return {$: 'MoveX', a: a}; }; @@ -17026,6 +16536,101 @@ var $author$project$Internal$Material$Tab$tab = function (palette) { }; }; var $author$project$Widget$Material$tab = $author$project$Internal$Material$Tab$tab; +var $author$project$Internal$Material$AppBar$menuTabButton = function (palette) { + return { + content: { + content: { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: 18 + }, + ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: 18 + } + }, + text: {contentText: _List_Nil} + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$centerY, + $mdgriffith$elm_ui$Element$centerX + ]) + }, + elementButton: _Utils_ap( + $author$project$Widget$Material$Typography$button, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)), + $mdgriffith$elm_ui$Element$width( + A2( + $mdgriffith$elm_ui$Element$minimum, + 90, + A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill))), + A2($mdgriffith$elm_ui$Element$paddingXY, 12, 16), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor(palette.primary))), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$mouseDown( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$focused( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$mouseOver( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) + ])) + ])), + ifActive: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Border$widthEach( + {bottom: 2, left: 0, right: 0, top: 0}) + ]), + ifDisabled: _Utils_ap( + $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), + $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])), + otherwise: _List_Nil + }; +}; +var $author$project$Internal$Material$AppBar$tabBar = function (palette) { + return A2( + $author$project$Internal$Material$AppBar$internalBar, + { + menuTabButton: $author$project$Internal$Material$AppBar$menuTabButton(palette), + title: _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])) + }, + palette); +}; +var $author$project$Widget$Material$tabBar = $author$project$Internal$Material$AppBar$tabBar; var $author$project$Widget$Material$textButton = $author$project$Internal$Material$Button$textButton; var $author$project$Internal$Material$TextInput$textInput = function (palette) { return { @@ -17078,7 +16683,6 @@ var $author$project$Internal$Material$TextInput$textInput = function (palette) { }; }; var $author$project$Widget$Material$textInput = $author$project$Internal$Material$TextInput$textInput; -var $author$project$Widget$Material$textItem = $author$project$Internal$Material$Item$textItem; var $author$project$Internal$Material$Button$toggleButton = function (palette) { return { content: { @@ -17196,6 +16800,7 @@ var $author$project$Internal$Material$Button$toggleButton = function (palette) { }; }; var $author$project$Widget$Material$toggleButton = $author$project$Internal$Material$Button$toggleButton; +var $mdgriffith$elm_ui$Element$Font$typeface = $mdgriffith$elm_ui$Internal$Model$Typeface; var $author$project$Data$Style$style = function (palette) { return { button: $author$project$Widget$Material$outlinedButton(palette), @@ -17204,28 +16809,75 @@ var $author$project$Data$Style$style = function (palette) { chipButton: $author$project$Widget$Material$chip(palette), column: $author$project$Widget$Material$column, containedButton: $author$project$Widget$Material$containedButton($author$project$Widget$Material$defaultPalette), + container: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.background), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$family( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$typeface('Roboto'), + $mdgriffith$elm_ui$Element$Font$sansSerif + ])), + $mdgriffith$elm_ui$Element$Font$size(16), + $mdgriffith$elm_ui$Element$Font$letterSpacing(0.5) + ])), dialog: $author$project$Widget$Material$alertDialog(palette), - expansionItem: $author$project$Widget$Material$expansionItem($author$project$Widget$Material$defaultPalette), + expansionItem: $author$project$Widget$Material$expansionItem(palette), fullBleedDivider: $author$project$Widget$Material$fullBleedDivider(palette), fullBleedHeader: $author$project$Widget$Material$fullBleedHeader(palette), + fullBleedItem: $author$project$Widget$Material$fullBleedItem($author$project$Widget$Material$defaultPalette), iconButton: $author$project$Widget$Material$iconButton($author$project$Widget$Material$defaultPalette), imageItem: $author$project$Widget$Material$imageItem(palette), insetDivider: $author$project$Widget$Material$insetDivider(palette), insetHeader: $author$project$Widget$Material$insetHeader(palette), - layout: $author$project$Widget$Material$layout(palette), + insetItem: $author$project$Widget$Material$insetItem(palette), + menuBar: $author$project$Widget$Material$menuBar($author$project$Widget$Material$defaultPalette), middleDivider: $author$project$Widget$Material$middleDivider(palette), multiLineItem: $author$project$Widget$Material$multiLineItem(palette), outlinedButton: $author$project$Widget$Material$outlinedButton($author$project$Widget$Material$defaultPalette), primaryButton: $author$project$Widget$Material$containedButton(palette), progressIndicator: $author$project$Widget$Material$progressIndicator(palette), row: $author$project$Widget$Material$row, + searchFill: { + content: { + chips: { + content: $author$project$Widget$Material$chip($author$project$Widget$Material$defaultPalette), + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8) + ]) + }, + text: { + elementTextInput: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Border$width(0), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])) + } + }, + elementRow: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)) + ])) + }, selectButton: $author$project$Widget$Material$toggleButton(palette), + selectItem: $author$project$Widget$Material$selectItem($author$project$Widget$Material$defaultPalette), + sheetButton: $author$project$Widget$Material$selectItem($author$project$Widget$Material$defaultPalette), + sideSheet: $author$project$Widget$Material$sideSheet(palette), + snackbar: $author$project$Widget$Material$snackbar($author$project$Widget$Material$defaultPalette), sortTable: $author$project$Widget$Material$sortTable(palette), _switch: $author$project$Widget$Material$switch(palette), tab: $author$project$Widget$Material$tab(palette), + tabBar: $author$project$Widget$Material$tabBar($author$project$Widget$Material$defaultPalette), textButton: $author$project$Widget$Material$textButton($author$project$Widget$Material$defaultPalette), - textInput: $author$project$Widget$Material$textInput(palette), - textItem: $author$project$Widget$Material$textItem(palette) + textInput: $author$project$Widget$Material$textInput(palette) }; }; var $author$project$Data$Theme$toStyle = function (theme) { @@ -17235,35 +16887,167 @@ var $author$project$Data$Theme$toStyle = function (theme) { return $author$project$Data$Style$style($author$project$Widget$Material$darkPalette); } }; -var $author$project$Widget$Layout$buttonSheet = F2( - function (style, actions) { - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - style.element, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill) - ])), +var $author$project$Main$ChangedSearch = function (a) { + return {$: 'ChangedSearch', a: a}; +}; +var $author$project$Main$ChangedSidebar = function (a) { + return {$: 'ChangedSidebar', a: a}; +}; +var $author$project$Data$Theme$DarkMaterial = {$: 'DarkMaterial'}; +var $author$project$Main$JumpTo = function (a) { + return {$: 'JumpTo', a: a}; +}; +var $author$project$Main$LeftSheet = {$: 'LeftSheet'}; +var $author$project$Main$Load = function (a) { + return {$: 'Load', a: a}; +}; +var $mdgriffith$elm_ui$Element$Phone = {$: 'Phone'}; +var $author$project$Main$RightSheet = {$: 'RightSheet'}; +var $author$project$Main$Search = {$: 'Search'}; +var $author$project$Main$SetTheme = function (a) { + return {$: 'SetTheme', a: a}; +}; +var $mdgriffith$elm_ui$Element$Tablet = {$: 'Tablet'}; +var $feathericons$elm_feather$FeatherIcons$Icon = function (a) { + return {$: 'Icon', a: a}; +}; +var $feathericons$elm_feather$FeatherIcons$defaultAttributes = function (name) { + return { + _class: $elm$core$Maybe$Just('feather feather-' + name), + size: 24, + sizeUnit: '', + strokeWidth: 2, + viewBox: '0 0 24 24' + }; +}; +var $feathericons$elm_feather$FeatherIcons$makeBuilder = F2( + function (name, src) { + return $feathericons$elm_feather$FeatherIcons$Icon( + { + attrs: $feathericons$elm_feather$FeatherIcons$defaultAttributes(name), + src: src + }); + }); +var $feathericons$elm_feather$FeatherIcons$book = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'book', + _List_fromArray( + [ A2( - $mdgriffith$elm_ui$Element$column, - _Utils_ap( - style.content.elementColumn, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ])), - A2( - $elm$core$List$map, - $author$project$Internal$Button$button(style.content.content), - actions))); + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M4 19.5A2.5 2.5 0 0 1 6.5 17H20') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z') + ]), + _List_Nil) + ])); +var $author$project$Widget$Icon$elmFeather = F2( + function (fun, icon) { + return function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_Nil, + $mdgriffith$elm_ui$Element$html( + A2( + fun, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$width( + $elm$core$String$fromInt(size)), + $elm$svg$Svg$Attributes$height( + $elm$core$String$fromInt(size)), + $elm$svg$Svg$Attributes$stroke( + $avh4$elm_color$Color$toCssString(color)) + ]), + icon))); + }; + }); +var $elm$core$Array$fromListHelp = F3( + function (list, nodeList, nodeListSize) { + fromListHelp: + while (true) { + var _v0 = A2($elm$core$Elm$JsArray$initializeFromList, $elm$core$Array$branchFactor, list); + var jsArray = _v0.a; + var remainingItems = _v0.b; + if (_Utils_cmp( + $elm$core$Elm$JsArray$length(jsArray), + $elm$core$Array$branchFactor) < 0) { + return A2( + $elm$core$Array$builderToArray, + true, + {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); + } else { + var $temp$list = remainingItems, + $temp$nodeList = A2( + $elm$core$List$cons, + $elm$core$Array$Leaf(jsArray), + nodeList), + $temp$nodeListSize = nodeListSize + 1; + list = $temp$list; + nodeList = $temp$nodeList; + nodeListSize = $temp$nodeListSize; + continue fromListHelp; + } + } + }); +var $elm$core$Array$fromList = function (list) { + if (!list.b) { + return $elm$core$Array$empty; + } else { + return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); + } +}; +var $elm$core$Array$bitMask = 4294967295 >>> (32 - $elm$core$Array$shiftStep); +var $elm$core$Elm$JsArray$unsafeGet = _JsArray_unsafeGet; +var $elm$core$Array$getHelp = F3( + function (shift, index, tree) { + getHelp: + while (true) { + var pos = $elm$core$Array$bitMask & (index >>> shift); + var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); + if (_v0.$ === 'SubTree') { + var subTree = _v0.a; + var $temp$shift = shift - $elm$core$Array$shiftStep, + $temp$index = index, + $temp$tree = subTree; + shift = $temp$shift; + index = $temp$index; + tree = $temp$tree; + continue getHelp; + } else { + var values = _v0.a; + return A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, values); + } + } + }); +var $elm$core$Array$tailIndex = function (len) { + return (len >>> 5) << 5; +}; +var $elm$core$Array$get = F2( + function (index, _v0) { + var len = _v0.a; + var startShift = _v0.b; + var tree = _v0.c; + var tail = _v0.d; + return ((index < 0) || (_Utils_cmp(index, len) > -1)) ? $elm$core$Maybe$Nothing : ((_Utils_cmp( + index, + $elm$core$Array$tailIndex(len)) > -1) ? $elm$core$Maybe$Just( + A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, tail)) : $elm$core$Maybe$Just( + A3($elm$core$Array$getHelp, startShift, index, tree))); }); var $mdgriffith$elm_ui$Element$BigDesktop = {$: 'BigDesktop'}; var $mdgriffith$elm_ui$Element$Desktop = {$: 'Desktop'}; var $mdgriffith$elm_ui$Element$Landscape = {$: 'Landscape'}; -var $mdgriffith$elm_ui$Element$Phone = {$: 'Phone'}; var $mdgriffith$elm_ui$Element$Portrait = {$: 'Portrait'}; -var $mdgriffith$elm_ui$Element$Tablet = {$: 'Tablet'}; var $mdgriffith$elm_ui$Element$classifyDevice = function (window) { return { _class: function () { @@ -17277,159 +17061,402 @@ var $mdgriffith$elm_ui$Element$classifyDevice = function (window) { var $author$project$Widget$Layout$getDeviceClass = function (window) { return $mdgriffith$elm_ui$Element$classifyDevice(window)._class; }; -var $elm$core$List$drop = F2( - function (n, list) { - drop: - while (true) { - if (n <= 0) { - return list; - } else { - if (!list.b) { - return list; - } else { - var x = list.a; - var xs = list.b; - var $temp$n = n - 1, - $temp$list = xs; - n = $temp$n; - list = $temp$list; - continue drop; - } - } - } - }); -var $elm$core$List$takeReverse = F3( - function (n, list, kept) { - takeReverse: - while (true) { - if (n <= 0) { - return kept; - } else { - if (!list.b) { - return kept; - } else { - var x = list.a; - var xs = list.b; - var $temp$n = n - 1, - $temp$list = xs, - $temp$kept = A2($elm$core$List$cons, x, kept); - n = $temp$n; - list = $temp$list; - kept = $temp$kept; - continue takeReverse; - } - } - } - }); -var $elm$core$List$takeTailRec = F2( - function (n, list) { - return $elm$core$List$reverse( - A3($elm$core$List$takeReverse, n, list, _List_Nil)); - }); -var $elm$core$List$takeFast = F3( - function (ctr, n, list) { - if (n <= 0) { - return _List_Nil; +var $feathericons$elm_feather$FeatherIcons$github = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'github', + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22') + ]), + _List_Nil) + ])); +var $mdgriffith$elm_ui$Internal$Model$InFront = {$: 'InFront'}; +var $mdgriffith$elm_ui$Element$createNearby = F2( + function (loc, element) { + if (element.$ === 'Empty') { + return $mdgriffith$elm_ui$Internal$Model$NoAttribute; } else { - var _v0 = _Utils_Tuple2(n, list); - _v0$1: - while (true) { - _v0$5: - while (true) { - if (!_v0.b.b) { - return list; - } else { - if (_v0.b.b.b) { - switch (_v0.a) { - case 1: - break _v0$1; - case 2: - var _v2 = _v0.b; - var x = _v2.a; - var _v3 = _v2.b; - var y = _v3.a; - return _List_fromArray( - [x, y]); - case 3: - if (_v0.b.b.b.b) { - var _v4 = _v0.b; - var x = _v4.a; - var _v5 = _v4.b; - var y = _v5.a; - var _v6 = _v5.b; - var z = _v6.a; - return _List_fromArray( - [x, y, z]); - } else { - break _v0$5; - } - default: - if (_v0.b.b.b.b && _v0.b.b.b.b.b) { - var _v7 = _v0.b; - var x = _v7.a; - var _v8 = _v7.b; - var y = _v8.a; - var _v9 = _v8.b; - var z = _v9.a; - var _v10 = _v9.b; - var w = _v10.a; - var tl = _v10.b; - return (ctr > 1000) ? A2( - $elm$core$List$cons, - x, - A2( - $elm$core$List$cons, - y, - A2( - $elm$core$List$cons, - z, - A2( - $elm$core$List$cons, - w, - A2($elm$core$List$takeTailRec, n - 4, tl))))) : A2( - $elm$core$List$cons, - x, - A2( - $elm$core$List$cons, - y, - A2( - $elm$core$List$cons, - z, - A2( - $elm$core$List$cons, - w, - A3($elm$core$List$takeFast, ctr + 1, n - 4, tl))))); - } else { - break _v0$5; - } - } - } else { - if (_v0.a === 1) { - break _v0$1; - } else { - break _v0$5; - } - } - } - } - return list; - } - var _v1 = _v0.b; - var x = _v1.a; - return _List_fromArray( - [x]); + return A2($mdgriffith$elm_ui$Internal$Model$Nearby, loc, element); } }); -var $elm$core$List$take = F2( - function (n, list) { - return A3($elm$core$List$takeFast, 0, n, list); - }); -var $author$project$Widget$Layout$partitionActions = function (actions) { - return { - moreActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$drop, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$drop, 1, actions) : (($elm$core$List$length(actions) === 3) ? actions : A2($elm$core$List$drop, 2, actions))), - primaryActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$take, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$take, 1, actions) : (($elm$core$List$length(actions) === 3) ? _List_Nil : A2($elm$core$List$take, 2, actions))) - }; +var $mdgriffith$elm_ui$Element$inFront = function (element) { + return A2($mdgriffith$elm_ui$Element$createNearby, $mdgriffith$elm_ui$Internal$Model$InFront, element); }; +var $author$project$Internal$Item$toItem = F2( + function (style, element) { + return function (attr) { + return A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap(attr, style.element), + element(style.content)); + }; + }); +var $author$project$Internal$Item$asItem = function (element) { + return A2( + $author$project$Internal$Item$toItem, + {content: _Utils_Tuple0, element: _List_Nil}, + $elm$core$Basics$always(element)); +}; +var $author$project$Widget$Customize$mapElementColumn = F2( + function (fun, a) { + return _Utils_update( + a, + { + elementColumn: fun(a.elementColumn) + }); + }); +var $author$project$Widget$Customize$elementColumn = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementColumn, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $mdgriffith$elm_ui$Internal$Model$AsColumn = {$: 'AsColumn'}; +var $mdgriffith$elm_ui$Internal$Model$asColumn = $mdgriffith$elm_ui$Internal$Model$AsColumn; +var $mdgriffith$elm_ui$Element$column = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asColumn, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentTop + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentLeft)), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $author$project$Internal$List$internal = F2( + function (style, list) { + return A2( + $elm$core$List$indexedMap, + F2( + function (i, fun) { + return fun( + _Utils_ap( + style.element, + ($elm$core$List$length(list) === 1) ? style.ifSingleton : ((!i) ? style.ifFirst : (_Utils_eq( + i, + $elm$core$List$length(list) - 1) ? style.ifLast : style.otherwise)))); + }), + list); + }); +var $author$project$Internal$List$itemList = function (style) { + return A2( + $elm$core$Basics$composeR, + $author$project$Internal$List$internal(style.content), + $mdgriffith$elm_ui$Element$column(style.elementColumn)); +}; +var $author$project$Internal$Select$select = function (_v0) { + var selected = _v0.selected; + var options = _v0.options; + var onSelect = _v0.onSelect; + return A2( + $elm$core$List$indexedMap, + F2( + function (i, a) { + return _Utils_Tuple2( + _Utils_eq( + selected, + $elm$core$Maybe$Just(i)), + { + icon: a.icon, + onPress: onSelect(i), + text: a.text + }); + }), + options); +}; +var $mdgriffith$elm_ui$Internal$Model$Button = {$: 'Button'}; +var $elm$json$Json$Encode$bool = _Json_wrap; +var $elm$html$Html$Attributes$boolProperty = F2( + function (key, bool) { + return A2( + _VirtualDom_property, + key, + $elm$json$Json$Encode$bool(bool)); + }); +var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); +var $mdgriffith$elm_ui$Element$Input$hasFocusStyle = function (attr) { + if (((attr.$ === 'StyleClass') && (attr.b.$ === 'PseudoSelector')) && (attr.b.a.$ === 'Focus')) { + var _v1 = attr.b; + var _v2 = _v1.a; + return true; + } else { + return false; + } +}; +var $mdgriffith$elm_ui$Element$Input$focusDefault = function (attrs) { + return A2($elm$core$List$any, $mdgriffith$elm_ui$Element$Input$hasFocusStyle, attrs) ? $mdgriffith$elm_ui$Internal$Model$NoAttribute : $mdgriffith$elm_ui$Internal$Model$htmlClass('focusable'); +}; +var $elm$virtual_dom$VirtualDom$Normal = function (a) { + return {$: 'Normal', a: a}; +}; +var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; +var $elm$html$Html$Events$on = F2( + function (event, decoder) { + return A2( + $elm$virtual_dom$VirtualDom$on, + event, + $elm$virtual_dom$VirtualDom$Normal(decoder)); + }); +var $elm$html$Html$Events$onClick = function (msg) { + return A2( + $elm$html$Html$Events$on, + 'click', + $elm$json$Json$Decode$succeed(msg)); +}; +var $mdgriffith$elm_ui$Element$Events$onClick = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Attr, $elm$html$Html$Events$onClick); +var $mdgriffith$elm_ui$Element$Input$enter = 'Enter'; +var $elm$json$Json$Decode$andThen = _Json_andThen; +var $elm$json$Json$Decode$fail = _Json_fail; +var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { + return {$: 'MayPreventDefault', a: a}; +}; +var $elm$html$Html$Events$preventDefaultOn = F2( + function (event, decoder) { + return A2( + $elm$virtual_dom$VirtualDom$on, + event, + $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); + }); +var $elm$json$Json$Decode$string = _Json_decodeString; +var $mdgriffith$elm_ui$Element$Input$onKey = F2( + function (desiredCode, msg) { + var decode = function (code) { + return _Utils_eq(code, desiredCode) ? $elm$json$Json$Decode$succeed(msg) : $elm$json$Json$Decode$fail('Not the enter key'); + }; + var isKey = A2( + $elm$json$Json$Decode$andThen, + decode, + A2($elm$json$Json$Decode$field, 'key', $elm$json$Json$Decode$string)); + return $mdgriffith$elm_ui$Internal$Model$Attr( + A2( + $elm$html$Html$Events$preventDefaultOn, + 'keyup', + A2( + $elm$json$Json$Decode$map, + function (fired) { + return _Utils_Tuple2(fired, true); + }, + isKey))); + }); +var $mdgriffith$elm_ui$Element$Input$onEnter = function (msg) { + return A2($mdgriffith$elm_ui$Element$Input$onKey, $mdgriffith$elm_ui$Element$Input$enter, msg); +}; +var $mdgriffith$elm_ui$Internal$Flag$cursor = $mdgriffith$elm_ui$Internal$Flag$flag(21); +var $mdgriffith$elm_ui$Element$pointer = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$cursor, $mdgriffith$elm_ui$Internal$Style$classes.cursorPointer); +var $elm$html$Html$Attributes$tabindex = function (n) { + return A2( + _VirtualDom_attribute, + 'tabIndex', + $elm$core$String$fromInt(n)); +}; +var $mdgriffith$elm_ui$Element$Input$button = F2( + function (attrs, _v0) { + var onPress = _v0.onPress; + var label = _v0.label; + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asEl, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentCenterX + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.contentCenterY + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.seButton + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.noTextSelection)))))), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$pointer, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Input$focusDefault(attrs), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Button), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$tabindex(0)), + function () { + if (onPress.$ === 'Nothing') { + return A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$disabled(true)), + attrs); + } else { + var msg = onPress.a; + return A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Events$onClick(msg), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Input$onEnter(msg), + attrs)); + } + }()))))))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed( + _List_fromArray( + [label]))); + }); +var $mdgriffith$elm_ui$Internal$Model$AsRow = {$: 'AsRow'}; +var $mdgriffith$elm_ui$Internal$Model$asRow = $mdgriffith$elm_ui$Internal$Model$AsRow; +var $mdgriffith$elm_ui$Element$row = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asRow, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentLeft + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentCenterY)), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $mdgriffith$elm_ui$Element$text = function (content) { + return $mdgriffith$elm_ui$Internal$Model$Text(content); +}; +var $author$project$Internal$Select$selectButton = F2( + function (style, _v0) { + var selected = _v0.a; + var b = _v0.b; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : (selected ? style.ifActive : style.otherwise)), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + b.icon( + _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : (selected ? style.content.content.icon.ifActive : style.content.content.icon.otherwise)), + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.contentText, + $mdgriffith$elm_ui$Element$text(b.text)) + ])), + onPress: b.onPress + }); + }); +var $author$project$Internal$Item$selectItem = F2( + function (s, select) { + return A2( + $elm$core$List$map, + function (b) { + return A2( + $author$project$Internal$Item$toItem, + s, + function (style) { + return A2($author$project$Internal$Select$selectButton, style, b); + }); + }, + $author$project$Internal$Select$select(select)); + }); +var $author$project$Widget$Layout$leftSheet = F2( + function (style, _v0) { + var title = _v0.title; + var onDismiss = _v0.onDismiss; + var menu = _v0.menu; + return { + content: A2( + $author$project$Internal$List$itemList, + A2( + $author$project$Widget$Customize$elementColumn, + _List_fromArray( + [$mdgriffith$elm_ui$Element$alignLeft]), + style.sheet), + A2( + $elm$core$List$cons, + $author$project$Internal$Item$asItem(title), + A2($author$project$Internal$Item$selectItem, style.button, menu))), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $mdgriffith$elm_ui$Internal$Model$Label = function (a) { + return {$: 'Label', a: a}; +}; +var $mdgriffith$elm_ui$Element$Region$description = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Label); +var $author$project$Internal$Button$iconButton = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_ap( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Region$description(text) + ]))), + { + label: A2( + $mdgriffith$elm_ui$Element$el, + style.content.elementRow, + icon( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise)), + onPress: onPress + }); + }); +var $author$project$Internal$Button$button = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + icon( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise), + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.contentText, + $mdgriffith$elm_ui$Element$text(text)) + ])), + onPress: onPress + }); + }); +var $mdgriffith$elm_ui$Element$Input$Placeholder = F2( + function (a, b) { + return {$: 'Placeholder', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Element$Input$placeholder = $mdgriffith$elm_ui$Element$Input$Placeholder; var $mdgriffith$elm_ui$Element$Input$HiddenLabel = function (a) { return {$: 'HiddenLabel', a: a}; }; @@ -17559,6 +17586,8 @@ var $mdgriffith$elm_ui$Element$Input$calcMoveToCompensateForPadding = function ( $elm$core$Basics$floor(vSpace / 2)); } }; +var $mdgriffith$elm_ui$Internal$Flag$overflow = $mdgriffith$elm_ui$Internal$Flag$flag(20); +var $mdgriffith$elm_ui$Element$clip = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$overflow, $mdgriffith$elm_ui$Internal$Style$classes.clip); var $mdgriffith$elm_ui$Element$rgb = F3( function (r, g, b) { return A4($mdgriffith$elm_ui$Internal$Model$Rgba, r, g, b, 1); @@ -17585,8 +17614,14 @@ var $mdgriffith$elm_ui$Element$Input$getHeight = function (attr) { return $elm$core$Maybe$Nothing; } }; -var $mdgriffith$elm_ui$Internal$Model$Label = function (a) { - return {$: 'Label', a: a}; +var $elm$core$List$head = function (list) { + if (list.b) { + var x = list.a; + var xs = list.b; + return $elm$core$Maybe$Just(x); + } else { + return $elm$core$Maybe$Nothing; + } }; var $mdgriffith$elm_ui$Element$Input$hiddenLabelAttribute = function (label) { if (label.$ === 'HiddenLabel') { @@ -18275,222 +18310,25 @@ var $author$project$Internal$TextInput$textInput = F2( }) ])); }); -var $author$project$Widget$Snackbar$current = function (model) { - return A2($elm$core$Maybe$map, $elm$core$Tuple$first, model.current); -}; -var $author$project$Widget$Snackbar$view = F3( - function (style, toMessage, model) { - return A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - toMessage, - function (_v0) { - var text = _v0.text; - var button = _v0.button; - return A2( - $mdgriffith$elm_ui$Element$row, - style.elementRow, - _List_fromArray( - [ - A2( - $mdgriffith$elm_ui$Element$paragraph, - style.content.text.elementText, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text(text))), - A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - $author$project$Internal$Button$textButton(style.content.button), - button)) - ])); - }), - $author$project$Widget$Snackbar$current(model)); - }); -var $author$project$Internal$Select$select = function (_v0) { - var selected = _v0.selected; - var options = _v0.options; - var onSelect = _v0.onSelect; - return A2( - $elm$core$List$indexedMap, - F2( - function (i, a) { - return _Utils_Tuple2( - _Utils_eq( - selected, - $elm$core$Maybe$Just(i)), - { - icon: a.icon, - onPress: onSelect(i), - text: a.text - }); - }), - options); -}; -var $author$project$Internal$Select$selectButton = F2( - function (style, _v0) { - var selected = _v0.a; - var b = _v0.b; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : (selected ? style.ifActive : style.otherwise)), - { - label: A2( - $mdgriffith$elm_ui$Element$row, - style.content.elementRow, - _List_fromArray( - [ - b.icon( - _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : (selected ? style.content.content.icon.ifActive : style.content.content.icon.otherwise)), - A2( - $mdgriffith$elm_ui$Element$el, - style.content.content.text.contentText, - $mdgriffith$elm_ui$Element$text(b.text)) - ])), - onPress: b.onPress - }); - }); -var $author$project$Widget$Layout$viewLeftSheet = F2( - function (style, _v0) { - var title = _v0.title; - var menu = _v0.menu; - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - style.sheet, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$alignLeft - ])), - A2( - $mdgriffith$elm_ui$Element$column, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]), - $elm$core$List$concat( - _List_fromArray( - [ - _List_fromArray( - [title]), - A2( - $elm$core$List$map, - $author$project$Internal$Select$selectButton(style.sheetButton), - $author$project$Internal$Select$select(menu)) - ])))); - }); -var $author$project$Widget$Layout$LeftSheet = {$: 'LeftSheet'}; -var $author$project$Widget$Layout$RightSheet = {$: 'RightSheet'}; -var $author$project$Widget$Layout$Search = {$: 'Search'}; -var $mdgriffith$elm_ui$Element$Region$description = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Label); -var $author$project$Internal$Button$iconButton = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - var icon = _v0.icon; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_ap( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Region$description(text) - ]))), - { - label: A2( - $mdgriffith$elm_ui$Element$el, - style.content.elementRow, - icon( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise)), - onPress: onPress - }); - }); -var $author$project$Widget$Layout$viewNav = F2( - function (style, _v0) { - var title = _v0.title; - var menu = _v0.menu; +var $author$project$Internal$AppBar$internalNav = F3( + function (menuElements, style, _v0) { var deviceClass = _v0.deviceClass; - var onChangedSidebar = _v0.onChangedSidebar; + var openRightSheet = _v0.openRightSheet; + var openTopSheet = _v0.openTopSheet; var primaryActions = _v0.primaryActions; - var moreActions = _v0.moreActions; var search = _v0.search; return A2( $mdgriffith$elm_ui$Element$row, _Utils_ap( - style.header, + style.elementRow, _List_fromArray( [ - $mdgriffith$elm_ui$Element$padding(0), - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$spacing(style.spacing), $mdgriffith$elm_ui$Element$alignTop, $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) ])), _List_fromArray( [ - A2( - $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - $mdgriffith$elm_ui$Element$spacing(style.spacing) - ]), - (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? _List_fromArray( - [ - A2( - $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.menuIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$LeftSheet))), - text: 'Menu' - }), - A2( - $mdgriffith$elm_ui$Element$el, - style.title, - A2( - $elm$core$Maybe$withDefault, - title, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - function ($) { - return $.text; - }, - $mdgriffith$elm_ui$Element$text), - A2( - $elm$core$Maybe$andThen, - function (option) { - return A2( - $elm$core$Array$get, - option, - $elm$core$Array$fromList(menu.options)); - }, - menu.selected)))) - ]) : _List_fromArray( - [ - A2($mdgriffith$elm_ui$Element$el, style.title, title), - A2( - $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) - ]), - A2( - $elm$core$List$map, - $author$project$Internal$Select$selectButton(style.menuTabButton), - $author$project$Internal$Select$select(menu))) - ])), + A2($mdgriffith$elm_ui$Element$row, style.content.menu.elementRow, menuElements), (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet)) ? $mdgriffith$elm_ui$Element$none : A2( $elm$core$Maybe$withDefault, $mdgriffith$elm_ui$Element$none, @@ -18502,7 +18340,7 @@ var $author$project$Widget$Layout$viewNav = F2( var label = _v1.label; return A2( $author$project$Internal$TextInput$textInput, - style.search, + style.content.search, { chips: _List_Nil, label: label, @@ -18518,11 +18356,7 @@ var $author$project$Widget$Layout$viewNav = F2( search)), A2( $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - $mdgriffith$elm_ui$Element$alignRight - ]), + style.content.actions.elementRow, $elm$core$List$concat( _List_fromArray( [ @@ -18537,214 +18371,289 @@ var $author$project$Widget$Layout$viewNav = F2( [ A2( $author$project$Internal$Button$button, - style.menuButton, - { - icon: style.searchIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$Search))), - text: label - }) + A2( + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.actions.content.button), + {icon: style.content.actions.content.searchIcon, onPress: openTopSheet, text: label}) ]) : (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? _List_fromArray( [ A2( $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.searchIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$Search))), - text: label - }) + style.content.actions.content.button, + {icon: style.content.actions.content.searchIcon, onPress: openTopSheet, text: label}) ]) : _List_Nil); }, search)), A2( $elm$core$List$map, - _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? $author$project$Internal$Button$iconButton(style.menuButton) : $author$project$Internal$Button$button(style.menuButton), - primaryActions), - $elm$core$List$isEmpty(moreActions) ? _List_Nil : _List_fromArray( - [ + _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? $author$project$Internal$Button$iconButton(style.content.actions.content.button) : $author$project$Internal$Button$button( A2( - $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.moreVerticalIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$RightSheet))), - text: 'More' - }) - ]) + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.actions.content.button)), + primaryActions), + function () { + if (openRightSheet.$ === 'Nothing') { + return _List_Nil; + } else { + return _List_fromArray( + [ + A2( + $author$project$Internal$Button$iconButton, + style.content.actions.content.button, + {icon: style.content.actions.content.moreVerticalIcon, onPress: openRightSheet, text: 'More'}) + ]); + } + }() ]))) ])); }); -var $author$project$Widget$Layout$view = F3( - function (style, _v0, content) { - var search = _v0.search; - var title = _v0.title; - var onChangedSidebar = _v0.onChangedSidebar; - var menu = _v0.menu; - var actions = _v0.actions; - var window = _v0.window; - var dialog = _v0.dialog; - var layout = _v0.layout; - var snackbar = A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - $mdgriffith$elm_ui$Element$el( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$padding(style.spacing), - $mdgriffith$elm_ui$Element$alignBottom, - $mdgriffith$elm_ui$Element$alignRight - ])), - A3($author$project$Widget$Snackbar$view, style.snackbar, $elm$core$Basics$identity, layout.snackbar))); - var deviceClass = $author$project$Widget$Layout$getDeviceClass(window); - var _v1 = $author$project$Widget$Layout$partitionActions(actions); - var primaryActions = _v1.primaryActions; - var moreActions = _v1.moreActions; - var sheet = function () { - var _v3 = layout.active; - if (_v3.$ === 'Just') { - switch (_v3.a.$) { - case 'LeftSheet': - var _v4 = _v3.a; - return A2( - $author$project$Widget$Layout$viewLeftSheet, - style, - {menu: menu, title: title}); - case 'RightSheet': - var _v5 = _v3.a; - return A2( - $author$project$Widget$Layout$buttonSheet, - { - content: {content: style.sheetButton, elementColumn: _List_Nil}, - element: _Utils_ap( - style.sheet, - _List_fromArray( - [$mdgriffith$elm_ui$Element$alignRight])) - }, - moreActions); - default: - var _v6 = _v3.a; - return A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - $author$project$Internal$TextInput$textInput( - A2( - $author$project$Widget$Customize$mapContent, - function (record) { - return _Utils_update( - record, - { - text: A2( - $author$project$Widget$Customize$elementTextInput, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]), - record.text) - }); - }, - style.searchFill)), - $mdgriffith$elm_ui$Element$el( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$alignTop, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]))), - search)); - } +var $author$project$Internal$AppBar$menuBar = F2( + function (style, m) { + return A3( + $author$project$Internal$AppBar$internalNav, + _List_fromArray( + [ + A2( + $author$project$Internal$Button$iconButton, + style.content.actions.content.button, + {icon: style.content.menu.content.menuIcon, onPress: m.openLeftSheet, text: 'Menu'}), + A2($mdgriffith$elm_ui$Element$el, style.content.menu.content.title, m.title) + ]), + { + content: { + actions: style.content.actions, + menu: {elementRow: style.content.menu.elementRow}, + search: style.content.search + }, + elementRow: style.elementRow + }, + m); + }); +var $author$project$Widget$menuBar = $author$project$Internal$AppBar$menuBar; +var $author$project$Widget$Layout$orderModals = function (modals) { + return A2( + $elm$core$List$filterMap, + $elm$core$Basics$identity, + _List_fromArray( + [modals.dialog, modals.leftSheet, modals.rightSheet, modals.topSheet])); +}; +var $elm$core$List$drop = F2( + function (n, list) { + drop: + while (true) { + if (n <= 0) { + return list; } else { - return $mdgriffith$elm_ui$Element$none; + if (!list.b) { + return list; + } else { + var x = list.a; + var xs = list.b; + var $temp$n = n - 1, + $temp$list = xs; + n = $temp$n; + list = $temp$list; + continue drop; + } } - }(); - var nav = A2( - $author$project$Widget$Layout$viewNav, - style, - {deviceClass: deviceClass, menu: menu, moreActions: moreActions, onChangedSidebar: onChangedSidebar, primaryActions: primaryActions, search: search, title: title}); - return A2( - style.layout, - $elm$core$List$concat( - _List_fromArray( - [ - style.container, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$inFront(nav), - $mdgriffith$elm_ui$Element$inFront(snackbar) - ]), - function () { - if ((!_Utils_eq(layout.active, $elm$core$Maybe$Nothing)) || (!_Utils_eq(dialog, $elm$core$Maybe$Nothing))) { - if (dialog.$ === 'Just') { - var dialogConfig = dialog.a; - return dialogConfig; - } else { - return $author$project$Internal$Dialog$modal( - { - content: sheet, - onDismiss: $elm$core$Maybe$Just( - onChangedSidebar($elm$core$Maybe$Nothing)) - }); + } + }); +var $elm$core$List$takeReverse = F3( + function (n, list, kept) { + takeReverse: + while (true) { + if (n <= 0) { + return kept; + } else { + if (!list.b) { + return kept; + } else { + var x = list.a; + var xs = list.b; + var $temp$n = n - 1, + $temp$list = xs, + $temp$kept = A2($elm$core$List$cons, x, kept); + n = $temp$n; + list = $temp$list; + kept = $temp$kept; + continue takeReverse; + } + } + } + }); +var $elm$core$List$takeTailRec = F2( + function (n, list) { + return $elm$core$List$reverse( + A3($elm$core$List$takeReverse, n, list, _List_Nil)); + }); +var $elm$core$List$takeFast = F3( + function (ctr, n, list) { + if (n <= 0) { + return _List_Nil; + } else { + var _v0 = _Utils_Tuple2(n, list); + _v0$1: + while (true) { + _v0$5: + while (true) { + if (!_v0.b.b) { + return list; + } else { + if (_v0.b.b.b) { + switch (_v0.a) { + case 1: + break _v0$1; + case 2: + var _v2 = _v0.b; + var x = _v2.a; + var _v3 = _v2.b; + var y = _v3.a; + return _List_fromArray( + [x, y]); + case 3: + if (_v0.b.b.b.b) { + var _v4 = _v0.b; + var x = _v4.a; + var _v5 = _v4.b; + var y = _v5.a; + var _v6 = _v5.b; + var z = _v6.a; + return _List_fromArray( + [x, y, z]); + } else { + break _v0$5; + } + default: + if (_v0.b.b.b.b && _v0.b.b.b.b.b) { + var _v7 = _v0.b; + var x = _v7.a; + var _v8 = _v7.b; + var y = _v8.a; + var _v9 = _v8.b; + var z = _v9.a; + var _v10 = _v9.b; + var w = _v10.a; + var tl = _v10.b; + return (ctr > 1000) ? A2( + $elm$core$List$cons, + x, + A2( + $elm$core$List$cons, + y, + A2( + $elm$core$List$cons, + z, + A2( + $elm$core$List$cons, + w, + A2($elm$core$List$takeTailRec, n - 4, tl))))) : A2( + $elm$core$List$cons, + x, + A2( + $elm$core$List$cons, + y, + A2( + $elm$core$List$cons, + z, + A2( + $elm$core$List$cons, + w, + A3($elm$core$List$takeFast, ctr + 1, n - 4, tl))))); + } else { + break _v0$5; + } } } else { - return _List_Nil; + if (_v0.a === 1) { + break _v0$1; + } else { + break _v0$5; + } } - }() - ])), - content); + } + } + return list; + } + var _v1 = _v0.b; + var x = _v1.a; + return _List_fromArray( + [x]); + } }); -var $author$project$Data$Section$ReusableViews = {$: 'ReusableViews'}; -var $author$project$Data$Section$StatelessViews = {$: 'StatelessViews'}; -var $author$project$Main$ToggledExample = function (a) { - return {$: 'ToggledExample', a: a}; -}; -var $Orasund$elm_ui_framework$Framework$Grid$compact = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$alignTop - ]); -var $mdgriffith$elm_ui$Internal$Model$Main = {$: 'Main'}; -var $mdgriffith$elm_ui$Element$Region$mainContent = $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Main); -var $Orasund$elm_ui_framework$Framework$container = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$centerY, - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 1200, $mdgriffith$elm_ui$Element$fill)), - $mdgriffith$elm_ui$Element$padding(20), - $mdgriffith$elm_ui$Element$Region$mainContent, - $mdgriffith$elm_ui$Element$Background$color( - A3($mdgriffith$elm_ui$Element$rgb255, 255, 255, 255)) - ]); -var $author$project$Internal$Item$toItem = F2( - function (style, element) { - return function (attr) { - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap(attr, style.element), - element(style.content)); - }; +var $elm$core$List$take = F2( + function (n, list) { + return A3($elm$core$List$takeFast, 0, n, list); }); -var $author$project$Internal$Item$divider = function (style) { - return A2( - $author$project$Internal$Item$toItem, - style, - function (_v0) { - var element = _v0.element; - return A2($mdgriffith$elm_ui$Element$el, element, $mdgriffith$elm_ui$Element$none); - }); +var $author$project$Widget$Layout$partitionActions = function (actions) { + return { + moreActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$drop, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$drop, 1, actions) : (($elm$core$List$length(actions) === 3) ? actions : A2($elm$core$List$drop, 2, actions))), + primaryActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$take, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$take, 1, actions) : (($elm$core$List$length(actions) === 3) ? _List_Nil : A2($elm$core$List$take, 2, actions))) + }; }; -var $author$project$Widget$divider = $author$project$Internal$Item$divider; -var $author$project$Internal$Item$textItem = F2( +var $feathericons$elm_feather$FeatherIcons$penTool = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'pen-tool', + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M12 19l7-7 3 3-7 7-3-3z') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M2 2l7.586 7.586') + ]), + _List_Nil), + A2( + $elm$svg$Svg$circle, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$cx('11'), + $elm$svg$Svg$Attributes$cy('11'), + $elm$svg$Svg$Attributes$r('2') + ]), + _List_Nil) + ])); +var $mdgriffith$elm_ui$Internal$Model$Paragraph = {$: 'Paragraph'}; +var $mdgriffith$elm_ui$Element$paragraph = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asParagraph, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Paragraph), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$spacing(5), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $author$project$Internal$Item$insetItem = F2( function (s, _v0) { var onPress = _v0.onPress; var text = _v0.text; @@ -18783,6 +18692,603 @@ var $author$project$Internal$Item$textItem = F2( }); }); }); +var $author$project$Widget$Layout$rightSheet = F2( + function (style, _v0) { + var onDismiss = _v0.onDismiss; + var moreActions = _v0.moreActions; + return { + content: A2( + $author$project$Internal$List$itemList, + A2( + $author$project$Widget$Customize$elementColumn, + _List_fromArray( + [$mdgriffith$elm_ui$Element$alignRight]), + style.sheet), + A2( + $elm$core$List$map, + function (_v1) { + var onPress = _v1.onPress; + var text = _v1.text; + var icon = _v1.icon; + return A2( + $author$project$Internal$Item$insetItem, + style.insetItem, + { + content: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + icon: icon, + onPress: onPress, + text: text + }); + }, + moreActions)), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $author$project$Widget$Customize$elementRow = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementRow, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $author$project$Widget$Layout$searchSheet = F2( + function (style, _v0) { + var onDismiss = _v0.onDismiss; + var search = _v0.search; + return { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignTop, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + A2( + $author$project$Internal$TextInput$textInput, + A2( + $author$project$Widget$Customize$mapContent, + function (record) { + return _Utils_update( + record, + {text: record.text}); + }, + A2( + $author$project$Widget$Customize$elementRow, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + style)), + search)), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $author$project$Internal$Modal$background = function (onDismiss) { + return _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront( + A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$Background$color( + A4($mdgriffith$elm_ui$Element$rgba255, 0, 0, 0, 0.5)) + ]), + A2( + $elm$core$Maybe$withDefault, + _List_Nil, + A2( + $elm$core$Maybe$map, + A2($elm$core$Basics$composeR, $mdgriffith$elm_ui$Element$Events$onClick, $elm$core$List$singleton), + onDismiss))), + $mdgriffith$elm_ui$Element$none)), + $mdgriffith$elm_ui$Element$clip + ]); +}; +var $author$project$Internal$Modal$singleModal = A2( + $elm$core$Basics$composeR, + $elm$core$List$head, + A2( + $elm$core$Basics$composeR, + $elm$core$Maybe$map( + function (_v0) { + var onDismiss = _v0.onDismiss; + var content = _v0.content; + return _Utils_ap( + $author$project$Internal$Modal$background(onDismiss), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(content) + ])); + }), + $elm$core$Maybe$withDefault(_List_Nil))); +var $author$project$Widget$singleModal = $author$project$Internal$Modal$singleModal; +var $author$project$Internal$AppBar$tabBar = F2( + function (style, m) { + return A3( + $author$project$Internal$AppBar$internalNav, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$el, style.content.menu.content.title, m.title), + A2( + $mdgriffith$elm_ui$Element$row, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + A2( + $elm$core$List$map, + $author$project$Internal$Select$selectButton(style.content.menu.content.menuTabButton), + $author$project$Internal$Select$select(m.menu))) + ]), + { + content: { + actions: style.content.actions, + menu: {elementRow: style.content.menu.elementRow}, + search: style.content.search + }, + elementRow: style.elementRow + }, + m); + }); +var $author$project$Widget$tabBar = $author$project$Internal$AppBar$tabBar; +var $elm$svg$Svg$Attributes$class = _VirtualDom_attribute('class'); +var $elm$svg$Svg$map = $elm$virtual_dom$VirtualDom$map; +var $elm$svg$Svg$Attributes$strokeLinejoin = _VirtualDom_attribute('stroke-linejoin'); +var $feathericons$elm_feather$FeatherIcons$toHtml = F2( + function (attributes, _v0) { + var src = _v0.a.src; + var attrs = _v0.a.attrs; + var strSize = $elm$core$String$fromFloat(attrs.size); + var baseAttributes = _List_fromArray( + [ + $elm$svg$Svg$Attributes$fill('none'), + $elm$svg$Svg$Attributes$height( + _Utils_ap(strSize, attrs.sizeUnit)), + $elm$svg$Svg$Attributes$width( + _Utils_ap(strSize, attrs.sizeUnit)), + $elm$svg$Svg$Attributes$stroke('currentColor'), + $elm$svg$Svg$Attributes$strokeLinecap('round'), + $elm$svg$Svg$Attributes$strokeLinejoin('round'), + $elm$svg$Svg$Attributes$strokeWidth( + $elm$core$String$fromFloat(attrs.strokeWidth)), + $elm$svg$Svg$Attributes$viewBox(attrs.viewBox) + ]); + var combinedAttributes = _Utils_ap( + function () { + var _v1 = attrs._class; + if (_v1.$ === 'Just') { + var c = _v1.a; + return A2( + $elm$core$List$cons, + $elm$svg$Svg$Attributes$class(c), + baseAttributes); + } else { + return baseAttributes; + } + }(), + attributes); + return A2( + $elm$svg$Svg$svg, + combinedAttributes, + A2( + $elm$core$List$map, + $elm$svg$Svg$map($elm$core$Basics$never), + src)); + }); +var $elm_community$intdict$IntDict$findMin = function (dict) { + findMin: + while (true) { + switch (dict.$) { + case 'Empty': + return $elm$core$Maybe$Nothing; + case 'Leaf': + var l = dict.a; + return $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = dict.a; + var $temp$dict = i.left; + dict = $temp$dict; + continue findMin; + } + } +}; +var $elm_community$intdict$IntDict$after = F2( + function (key, dict) { + var go = F2( + function (def, currentDict) { + go: + while (true) { + switch (currentDict.$) { + case 'Empty': + return $elm_community$intdict$IntDict$findMin(def); + case 'Leaf': + var l = currentDict.a; + return (_Utils_cmp(l.key, key) < 1) ? $elm_community$intdict$IntDict$findMin(def) : $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = currentDict.a; + if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { + return (_Utils_cmp(i.prefix.prefixBits, key) < 0) ? $elm_community$intdict$IntDict$findMin(def) : $elm_community$intdict$IntDict$findMin(i.left); + } else { + if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { + var $temp$def = def, + $temp$currentDict = i.right; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } else { + var $temp$def = i.right, + $temp$currentDict = i.left; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } + } + } + } + }); + return A2(go, $elm_community$intdict$IntDict$Empty, dict); + }); +var $elm$core$Maybe$andThen = F2( + function (callback, maybeValue) { + if (maybeValue.$ === 'Just') { + var value = maybeValue.a; + return callback(value); + } else { + return $elm$core$Maybe$Nothing; + } + }); +var $elm_community$intdict$IntDict$findMax = function (dict) { + findMax: + while (true) { + switch (dict.$) { + case 'Empty': + return $elm$core$Maybe$Nothing; + case 'Leaf': + var l = dict.a; + return $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = dict.a; + var $temp$dict = i.right; + dict = $temp$dict; + continue findMax; + } + } +}; +var $elm_community$intdict$IntDict$before = F2( + function (key, dict) { + var go = F2( + function (def, currentDict) { + go: + while (true) { + switch (currentDict.$) { + case 'Empty': + return $elm_community$intdict$IntDict$findMax(def); + case 'Leaf': + var l = currentDict.a; + return (_Utils_cmp(l.key, key) > -1) ? $elm_community$intdict$IntDict$findMax(def) : $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = currentDict.a; + if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { + return (_Utils_cmp(i.prefix.prefixBits, key) > 0) ? $elm_community$intdict$IntDict$findMax(def) : $elm_community$intdict$IntDict$findMax(i.right); + } else { + if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { + var $temp$def = i.left, + $temp$currentDict = i.right; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } else { + var $temp$def = def, + $temp$currentDict = i.left; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } + } + } + } + }); + return A2(go, $elm_community$intdict$IntDict$Empty, dict); + }); +var $author$project$Widget$ScrollingNav$current = F2( + function (fromString, _v0) { + var positions = _v0.positions; + var scrollPos = _v0.scrollPos; + return A2( + $elm$core$Maybe$andThen, + fromString, + A2( + $elm$core$Maybe$map, + $elm$core$Tuple$second, + A2( + $elm$core$Maybe$withDefault, + A2($elm_community$intdict$IntDict$after, scrollPos + 1, positions), + A2( + $elm$core$Maybe$map, + $elm$core$Maybe$Just, + A2($elm_community$intdict$IntDict$before, scrollPos + 1, positions))))); + }); +var $author$project$Widget$ScrollingNav$toSelect = F2( + function (onSelect, model) { + var arrangement = model.arrangement; + var toString = model.toString; + var fromString = model.fromString; + return { + onSelect: onSelect, + options: A2( + $elm$core$List$map, + function (s) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: toString(s) + }; + }, + arrangement), + selected: $elm$core$List$head( + A2( + $elm$core$List$filterMap, + function (_v0) { + var i = _v0.a; + var s = _v0.b; + return _Utils_eq( + $elm$core$Maybe$Just(s), + A2($author$project$Widget$ScrollingNav$current, fromString, model)) ? $elm$core$Maybe$Just(i) : $elm$core$Maybe$Nothing; + }, + A2( + $elm$core$List$indexedMap, + F2( + function (i, s) { + return _Utils_Tuple2(i, s); + }), + arrangement))) + }; + }); +var $author$project$Widget$Snackbar$current = function (model) { + return A2($elm$core$Maybe$map, $elm$core$Tuple$first, model.current); +}; +var $author$project$Internal$Button$textButton = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + return A2( + $author$project$Internal$Button$button, + style, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: onPress, + text: text + }); + }); +var $author$project$Widget$Snackbar$view = F3( + function (style, toMessage, model) { + return A2( + $elm$core$Maybe$map, + A2( + $elm$core$Basics$composeR, + toMessage, + function (_v0) { + var text = _v0.text; + var button = _v0.button; + return A2( + $mdgriffith$elm_ui$Element$row, + style.elementRow, + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Element$paragraph, + style.content.text.elementText, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text))), + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $author$project$Internal$Button$textButton(style.content.button), + button)) + ])); + }), + $author$project$Widget$Snackbar$current(model)); + }); +var $author$project$Main$viewLayout = F3( + function (msgMapper, style, model) { + var title = A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])), + $mdgriffith$elm_ui$Element$text('Elm-Ui-Widgets')); + var snackbarElem = A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3($author$project$Widget$Snackbar$view, style.snackbar, $elm$core$Basics$identity, model.snackbar))); + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Main$ChangedSearch, msgMapper), + placeholder: $elm$core$Maybe$Just( + A2( + $mdgriffith$elm_ui$Element$Input$placeholder, + _List_Nil, + $mdgriffith$elm_ui$Element$text('Search Widgets...'))), + text: model.search.raw + }; + var onDismiss = msgMapper( + $author$project$Main$ChangedSidebar($elm$core$Maybe$Nothing)); + var onChangedSidebar = $author$project$Main$ChangedSidebar; + var menu = A2( + $author$project$Widget$ScrollingNav$toSelect, + function (_int) { + return A2( + $elm$core$Maybe$map, + $author$project$Main$JumpTo, + A2( + $elm$core$Array$get, + _int, + $elm$core$Array$fromList(model.scrollingNav.arrangement))); + }, + model.scrollingNav); + var dialog = $elm$core$Maybe$Nothing; + var deviceClass = $author$project$Widget$Layout$getDeviceClass(model.window); + var actions = _List_fromArray( + [ + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$book), + onPress: $elm$core$Maybe$Just( + $author$project$Main$Load('https://package.elm-lang.org/packages/Orasund/elm-ui-widgets/latest/')), + text: 'Docs' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$github), + onPress: $elm$core$Maybe$Just( + $author$project$Main$Load('https://github.com/Orasund/elm-ui-widgets')), + text: 'Github' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), + onPress: (!_Utils_eq(model.theme, $author$project$Data$Theme$Material)) ? $elm$core$Maybe$Just( + $author$project$Main$SetTheme($author$project$Data$Theme$Material)) : $elm$core$Maybe$Nothing, + text: 'Material Theme' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), + onPress: (!_Utils_eq(model.theme, $author$project$Data$Theme$DarkMaterial)) ? $elm$core$Maybe$Just( + $author$project$Main$SetTheme($author$project$Data$Theme$DarkMaterial)) : $elm$core$Maybe$Nothing, + text: 'Dark Material Theme' + } + ]); + var _v0 = $author$project$Widget$Layout$partitionActions(actions); + var primaryActions = _v0.primaryActions; + var moreActions = _v0.moreActions; + var modals = $author$project$Widget$Layout$orderModals( + { + bottomSheet: $elm$core$Maybe$Nothing, + dialog: dialog, + leftSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$LeftSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$leftSheet, + {button: style.sheetButton, sheet: style.sideSheet}, + {menu: menu, onDismiss: onDismiss, title: title})) : $elm$core$Maybe$Nothing, + rightSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$RightSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$rightSheet, + {insetItem: style.insetItem, sheet: style.sideSheet}, + {moreActions: moreActions, onDismiss: onDismiss})) : $elm$core$Maybe$Nothing, + topSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$Search)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$searchSheet, + style.searchFill, + {onDismiss: onDismiss, search: search})) : $elm$core$Maybe$Nothing + }); + var nav = (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: deviceClass, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$LeftSheet)))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$RightSheet)))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$Search)))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: deviceClass, + menu: menu, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$RightSheet)))), + openTopSheet: $elm$core$Maybe$Nothing, + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }); + return $elm$core$List$concat( + _List_fromArray( + [ + style.container, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(snackbarElem), + $mdgriffith$elm_ui$Element$inFront(nav) + ]), + $author$project$Widget$singleModal(modals) + ])); + }); +var $author$project$Data$Section$ReusableViews = {$: 'ReusableViews'}; +var $author$project$Data$Section$StatelessViews = {$: 'StatelessViews'}; +var $author$project$Main$ToggledExample = function (a) { + return {$: 'ToggledExample', a: a}; +}; +var $author$project$Widget$asItem = $author$project$Internal$Item$asItem; +var $Orasund$elm_ui_framework$Framework$Grid$compact = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$alignTop + ]); +var $mdgriffith$elm_ui$Internal$Model$Main = {$: 'Main'}; +var $mdgriffith$elm_ui$Element$Region$mainContent = $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Main); +var $Orasund$elm_ui_framework$Framework$container = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY, + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 1200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$padding(20), + $mdgriffith$elm_ui$Element$Region$mainContent, + $mdgriffith$elm_ui$Element$Background$color( + A3($mdgriffith$elm_ui$Element$rgb255, 255, 255, 255)) + ]); +var $author$project$Internal$Item$divider = function (style) { + return A2( + $author$project$Internal$Item$toItem, + style, + function (_v0) { + var element = _v0.element; + return A2($mdgriffith$elm_ui$Element$el, element, $mdgriffith$elm_ui$Element$none); + }); +}; +var $author$project$Widget$divider = $author$project$Internal$Item$divider; var $author$project$Internal$Item$expansionItem = F2( function (s, _v0) { var icon = _v0.icon; @@ -18793,7 +19299,7 @@ var $author$project$Internal$Item$expansionItem = F2( return A2( $elm$core$List$cons, A2( - $author$project$Internal$Item$textItem, + $author$project$Internal$Item$insetItem, s.item, { content: isExpanded ? s.collapseIcon : s.expandIcon, @@ -18804,49 +19310,35 @@ var $author$project$Internal$Item$expansionItem = F2( }), isExpanded ? content : _List_Nil); }); -var $author$project$Widget$expansionItem = $author$project$Internal$Item$expansionItem; +var $author$project$Widget$expansionItem = function () { + var fun = $author$project$Internal$Item$expansionItem; + return fun; +}(); +var $mdgriffith$elm_ui$Element$Font$bold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.bold); +var $mdgriffith$elm_ui$Internal$Model$Heading = function (a) { + return {$: 'Heading', a: a}; +}; +var $mdgriffith$elm_ui$Element$Region$heading = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Heading); +var $Orasund$elm_ui_framework$Framework$Heading$h = function (inputLevel) { + var level = A3($elm$core$Basics$clamp, 1, 6, inputLevel); + var size = (level === 6) ? 14 : (32 - ((level - 1) * 4)); + return _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Region$heading(level), + $mdgriffith$elm_ui$Element$Font$size(size), + $mdgriffith$elm_ui$Element$paddingEach( + {bottom: 2, left: 0, right: 0, top: 2}), + $mdgriffith$elm_ui$Element$alignLeft, + $mdgriffith$elm_ui$Element$Font$bold + ]); +}; var $Orasund$elm_ui_framework$Framework$Heading$h2 = $Orasund$elm_ui_framework$Framework$Heading$h(2); var $Orasund$elm_ui_framework$Framework$Heading$h3 = $Orasund$elm_ui_framework$Framework$Heading$h(3); -var $elm$html$Html$Attributes$href = function (url) { - return A2( - $elm$html$Html$Attributes$stringProperty, - 'href', - _VirtualDom_noJavaScriptUri(url)); -}; var $elm$html$Html$Attributes$id = $elm$html$Html$Attributes$stringProperty('id'); -var $author$project$Internal$Item$item = function (element) { - return A2( - $author$project$Internal$Item$toItem, - {content: _Utils_Tuple0, element: _List_Nil}, - $elm$core$Basics$always(element)); -}; -var $author$project$Widget$item = $author$project$Internal$Item$item; -var $author$project$Internal$List$internal = F2( - function (style, list) { - return A2( - $elm$core$List$indexedMap, - F2( - function (i, fun) { - return fun( - _Utils_ap( - style.element, - ($elm$core$List$length(list) === 1) ? style.ifSingleton : ((!i) ? style.ifFirst : (_Utils_eq( - i, - $elm$core$List$length(list) - 1) ? style.ifLast : style.otherwise)))); - }), - list); - }); -var $author$project$Internal$List$itemList = function (style) { - return A2( - $elm$core$Basics$composeR, - $author$project$Internal$List$internal(style.content), - $mdgriffith$elm_ui$Element$column(style.elementColumn)); -}; var $author$project$Widget$itemList = function () { var fun = $author$project$Internal$List$itemList; return fun; }(); -var $elm$html$Html$Attributes$rel = _VirtualDom_attribute('rel'); var $Orasund$elm_ui_framework$Framework$Color$lightGrey = A3($mdgriffith$elm_ui$Element$rgb255, 219, 219, 219); var $Orasund$elm_ui_framework$Framework$Grid$simple = _List_fromArray( [ @@ -18864,26 +19356,6 @@ var $Orasund$elm_ui_framework$Framework$Grid$section = _Utils_ap( $mdgriffith$elm_ui$Element$paddingEach( {bottom: 30, left: 0, right: 0, top: 10}) ])); -var $author$project$Reusable$layout = function (_v0) { - return _Utils_Tuple3( - 'Layout', - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('The layout combines the menu bar, both side bar, the dialog window and the snackbar. Try using all of them and also try resizing the window to see how they interact with each other.'))), - _List_Nil); -}; -var $author$project$Reusable$scrollingNavCard = function (_v0) { - return _Utils_Tuple3( - 'Scrolling Nav', - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('Resize the screen and open the side-menu. Then start scrolling to see the scrolling navigation in action.'))), - _List_Nil); -}; var $author$project$Widget$button = function () { var fun = $author$project$Internal$Button$button; return fun; @@ -18928,9 +19400,7 @@ var $author$project$Reusable$view = function (_v0) { description: 'Reusable views have an internal state but no update function. You will need to do some wiring, but nothing complicated.', items: _List_fromArray( [ - A2($author$project$Reusable$snackbar, style, addSnackbar), - $author$project$Reusable$scrollingNavCard(style), - $author$project$Reusable$layout(style) + A2($author$project$Reusable$snackbar, style, addSnackbar) ]), title: 'Reusable Views' }; @@ -18982,10 +19452,26 @@ var $author$project$Data$Example$get = function (example) { return function ($) { return $.progressIndicator; }; - default: + case 'IconExample': return function ($) { return $.icon; }; + case 'SheetExample': + return function ($) { + return $.sheet; + }; + case 'AppBarExample': + return function ($) { + return $.appBar; + }; + case 'LayoutExample': + return function ($) { + return $.layout; + }; + default: + return function ($) { + return $.snackbar; + }; } }; var $Orasund$elm_ui_framework$Framework$Grid$spacedEvenly = _List_fromArray( @@ -18996,6 +19482,10 @@ var $Orasund$elm_ui_framework$Framework$Grid$spacedEvenly = _List_fromArray( $mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY ]); +var $author$project$View$States$appBar = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Widget$iconButton = function () { var fun = $author$project$Internal$Button$iconButton; return fun; @@ -19101,6 +19591,10 @@ var $author$project$View$States$icon = F2( function (_v0, style) { return _List_Nil; }); +var $author$project$View$States$layout = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Internal$List$column = function (style) { return A2( $elm$core$Basics$composeR, @@ -19511,6 +20005,14 @@ var $author$project$View$States$select = F2( }))) ]); }); +var $author$project$View$States$sheet = F2( + function (_v0, style) { + return _List_Nil; + }); +var $author$project$View$States$snackbar = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Internal$SortTable$Column = function (a) { return {$: 'Column', a: a}; }; @@ -20367,20 +20869,30 @@ var $author$project$Data$Example$toTests = function (example) { return $author$project$View$States$list; case 'ProgressIndicatorExample': return $author$project$View$States$progressIndicator; - default: + case 'IconExample': return $author$project$View$States$icon; + case 'SheetExample': + return $author$project$View$States$sheet; + case 'AppBarExample': + return $author$project$View$States$appBar; + case 'LayoutExample': + return $author$project$View$States$layout; + default: + return $author$project$View$States$snackbar; } }; var $icidasset$elm_material_icons$Material$Icons$Types$Color = function (a) { return {$: 'Color', a: a}; }; -var $author$project$Example$Button$Decrease = function (a) { - return {$: 'Decrease', a: a}; +var $author$project$Example$AppBar$SetDesign = function (a) { + return {$: 'SetDesign', a: a}; }; -var $author$project$Example$Button$Increase = function (a) { - return {$: 'Increase', a: a}; +var $author$project$Example$AppBar$SetSearch = function (a) { + return {$: 'SetSearch', a: a}; +}; +var $author$project$Example$AppBar$SetSelected = function (a) { + return {$: 'SetSelected', a: a}; }; -var $author$project$Example$Button$Reset = {$: 'Reset'}; var $icidasset$elm_material_icons$Material$Icons$Internal$icon = F4( function (attributes, nodes, size, coloring) { var sizeAsString = $elm$core$String$fromInt(size); @@ -20412,6 +20924,134 @@ var $icidasset$elm_material_icons$Material$Icons$Internal$icon = F4( nodes) ])); }); +var $icidasset$elm_material_icons$Material$Icons$change_history = A2( + $icidasset$elm_material_icons$Material$Icons$Internal$icon, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$viewBox('0 0 24 24') + ]), + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M0 0h24v24H0V0z'), + $elm$svg$Svg$Attributes$fill('none') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z') + ]), + _List_Nil) + ])); +var $author$project$Widget$Icon$elmMaterialIcons = F2( + function (wrapper, fun) { + return function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_Nil, + $mdgriffith$elm_ui$Element$html( + A2( + fun, + size, + wrapper(color)))); + }; + }); +var $author$project$Example$AppBar$view = F3( + function (msgMapper, style, model) { + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Example$AppBar$SetSearch, msgMapper), + placeholder: $elm$core$Maybe$Nothing, + text: model.search + }; + var primaryActions = _List_fromArray( + [ + { + icon: A2($author$project$Widget$Icon$elmMaterialIcons, $icidasset$elm_material_icons$Material$Icons$Types$Color, $icidasset$elm_material_icons$Material$Icons$change_history), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + text: 'Action' + } + ]); + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]), + model.isMenuBar ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: $mdgriffith$elm_ui$Element$Tablet, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Title')) + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: $mdgriffith$elm_ui$Element$Phone, + menu: { + onSelect: A2( + $elm$core$Basics$composeR, + $author$project$Example$AppBar$SetSelected, + A2($elm$core$Basics$composeR, msgMapper, $elm$core$Maybe$Just)), + options: A2( + $elm$core$List$map, + function (string) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: string + }; + }, + _List_fromArray( + ['Home', 'About'])), + selected: $elm$core$Maybe$Just(model.selected) + }, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Title')) + })); + }); +var $author$project$Example$Button$Decrease = function (a) { + return {$: 'Decrease', a: a}; +}; +var $author$project$Example$Button$Increase = function (a) { + return {$: 'Increase', a: a}; +}; +var $author$project$Example$Button$Reset = {$: 'Reset'}; var $icidasset$elm_material_icons$Material$Icons$add = A2( $icidasset$elm_material_icons$Material$Icons$Internal$icon, _List_fromArray( @@ -20453,47 +21093,6 @@ var $author$project$Widget$Customize$element = F2( }, a); }); -var $author$project$Widget$Customize$mapElementColumn = F2( - function (fun, a) { - return _Utils_update( - a, - { - elementColumn: fun(a.elementColumn) - }); - }); -var $author$project$Widget$Customize$elementColumn = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementColumn, - function (b) { - return _Utils_ap(b, list); - }, - a); - }); -var $author$project$Widget$Customize$elementRow = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementRow, - function (b) { - return _Utils_ap(b, list); - }, - a); - }); -var $author$project$Widget$Icon$elmMaterialIcons = F2( - function (wrapper, fun) { - return function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_Nil, - $mdgriffith$elm_ui$Element$html( - A2( - fun, - size, - wrapper(color)))); - }; - }); var $icidasset$elm_material_icons$Material$Icons$exposure_plus_2 = A2( $icidasset$elm_material_icons$Material$Icons$Internal$icon, _List_fromArray( @@ -20688,6 +21287,89 @@ var $author$project$Example$Button$view = F3( var $author$project$Example$Dialog$OpenDialog = function (a) { return {$: 'OpenDialog', a: a}; }; +var $author$project$Internal$Dialog$dialog = F2( + function (style, _v0) { + var title = _v0.title; + var text = _v0.text; + var accept = _v0.accept; + var dismiss = _v0.dismiss; + return { + content: A2( + $mdgriffith$elm_ui$Element$column, + _Utils_ap( + _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY]), + style.elementColumn), + _List_fromArray( + [ + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + A2( + $elm$core$Basics$composeR, + $mdgriffith$elm_ui$Element$text, + $mdgriffith$elm_ui$Element$el(style.content.title.contentText)), + title)), + A2( + $mdgriffith$elm_ui$Element$paragraph, + style.content.text.contentText, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text))), + A2( + $mdgriffith$elm_ui$Element$row, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignRight, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.buttons.elementRow), + function () { + var _v1 = _Utils_Tuple2(accept, dismiss); + if (_v1.a.$ === 'Just') { + if (_v1.b.$ === 'Nothing') { + var acceptButton = _v1.a.a; + var _v2 = _v1.b; + return $elm$core$List$singleton( + A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton)); + } else { + var acceptButton = _v1.a.a; + var dismissButton = _v1.b.a; + return _List_fromArray( + [ + A2($author$project$Internal$Button$textButton, style.content.buttons.content.dismiss, dismissButton), + A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton) + ]); + } + } else { + return _List_Nil; + } + }()) + ])), + onDismiss: function () { + var _v3 = _Utils_Tuple2(accept, dismiss); + if (_v3.a.$ === 'Nothing') { + if (_v3.b.$ === 'Nothing') { + var _v4 = _v3.a; + var _v5 = _v3.b; + return $elm$core$Maybe$Nothing; + } else { + var _v6 = _v3.a; + var onPress = _v3.b.a.onPress; + return onPress; + } + } else { + return $elm$core$Maybe$Nothing; + } + }() + }; + }); +var $author$project$Widget$dialog = function () { + var fun = $author$project$Internal$Dialog$dialog; + return fun; +}(); var $feathericons$elm_feather$FeatherIcons$eye = A2( $feathericons$elm_feather$FeatherIcons$makeBuilder, 'eye', @@ -20723,27 +21405,29 @@ var $author$project$Example$Dialog$view = F3( $mdgriffith$elm_ui$Element$width( A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) ]), - isOpen ? A2( - $author$project$Widget$dialog, - style.dialog, - { - accept: $elm$core$Maybe$Just( + isOpen ? $author$project$Widget$singleModal( + $elm$core$List$singleton( + A2( + $author$project$Widget$dialog, + style.dialog, { - onPress: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Dialog$OpenDialog(false))), - text: 'Ok' - }), - dismiss: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Dialog$OpenDialog(false))), - text: 'Dismiss' - }), - text: 'This is a dialog window', - title: $elm$core$Maybe$Just('Dialog') - }) : _List_Nil), + accept: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Dialog$OpenDialog(false))), + text: 'Ok' + }), + dismiss: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Dialog$OpenDialog(false))), + text: 'Dismiss' + }), + text: 'This is a dialog window', + title: $elm$core$Maybe$Just('Dialog') + }))) : _List_Nil), A2( $author$project$Widget$button, style.primaryButton, @@ -20752,7 +21436,7 @@ var $author$project$Example$Dialog$view = F3( onPress: $elm$core$Maybe$Just( msgMapper( $author$project$Example$Dialog$OpenDialog(true))), - text: 'show Dialog' + text: 'Show Dialog' })); }); var $author$project$Widget$Icon$antDesignIconsElm = function (fun) { @@ -21541,9 +22225,253 @@ var $author$project$Example$Icon$view = F3( ]))) ])); }); +var $author$project$Example$Layout$AddSnackbar = {$: 'AddSnackbar'}; +var $author$project$Example$Layout$ChangedSidebar = function (a) { + return {$: 'ChangedSidebar', a: a}; +}; +var $author$project$Example$Layout$LeftSheet = {$: 'LeftSheet'}; +var $author$project$Example$Layout$Search = {$: 'Search'}; +var $author$project$Example$Layout$SetSearchText = function (a) { + return {$: 'SetSearchText', a: a}; +}; +var $author$project$Example$Layout$SetSelected = function (a) { + return {$: 'SetSelected', a: a}; +}; +var $author$project$Example$Layout$ShowDialog = function (a) { + return {$: 'ShowDialog', a: a}; +}; +var $author$project$Example$Layout$view = F3( + function (msgMapper, style, _v0) { + var snackbar = _v0.snackbar; + var searchText = _v0.searchText; + var selected = _v0.selected; + var showDialog = _v0.showDialog; + var active = _v0.active; + var title = A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])), + $mdgriffith$elm_ui$Element$text('Title')); + var snackbarElem = A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3( + $author$project$Widget$Snackbar$view, + style.snackbar, + function (text) { + return {button: $elm$core$Maybe$Nothing, text: text}; + }, + snackbar))); + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Example$Layout$SetSearchText, msgMapper), + placeholder: $elm$core$Maybe$Nothing, + text: searchText + }; + var onDismiss = msgMapper( + $author$project$Example$Layout$ChangedSidebar($elm$core$Maybe$Nothing)); + var onChangedSidebar = $author$project$Example$Layout$ChangedSidebar; + var menu = { + onSelect: A2( + $elm$core$Basics$composeR, + $author$project$Example$Layout$SetSelected, + A2($elm$core$Basics$composeR, msgMapper, $elm$core$Maybe$Just)), + options: A2( + $elm$core$List$map, + function (string) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: string + }; + }, + _List_fromArray( + ['Home', 'About'])), + selected: $elm$core$Maybe$Just(selected) + }; + var dialog = showDialog ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$dialog, + style.dialog, + { + accept: $elm$core$Maybe$Nothing, + dismiss: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ShowDialog(false))), + text: 'Accept' + }), + text: 'This is a dialog window', + title: $elm$core$Maybe$Just('Dialog') + })) : $elm$core$Maybe$Nothing; + var deviceClass = $mdgriffith$elm_ui$Element$Phone; + var actions = A2( + $elm$core$List$repeat, + 5, + { + icon: A2($author$project$Widget$Icon$elmMaterialIcons, $icidasset$elm_material_icons$Material$Icons$Types$Color, $icidasset$elm_material_icons$Material$Icons$change_history), + onPress: $elm$core$Maybe$Nothing, + text: 'Action' + }); + var _v1 = $author$project$Widget$Layout$partitionActions(actions); + var primaryActions = _v1.primaryActions; + var moreActions = _v1.moreActions; + var modals = $author$project$Widget$Layout$orderModals( + { + bottomSheet: $elm$core$Maybe$Nothing, + dialog: dialog, + leftSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$LeftSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$leftSheet, + {button: style.sheetButton, sheet: style.sideSheet}, + {menu: menu, onDismiss: onDismiss, title: title})) : $elm$core$Maybe$Nothing, + rightSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$rightSheet, + {insetItem: style.insetItem, sheet: style.sideSheet}, + {moreActions: moreActions, onDismiss: onDismiss})) : $elm$core$Maybe$Nothing, + topSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$Search)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$searchSheet, + style.searchFill, + {onDismiss: onDismiss, search: search})) : $elm$core$Maybe$Nothing + }); + var nav = (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: deviceClass, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$LeftSheet)))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$Search)))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: deviceClass, + menu: menu, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)))), + openTopSheet: $elm$core$Maybe$Nothing, + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }); + return A2( + $mdgriffith$elm_ui$Element$el, + $elm$core$List$concat( + _List_fromArray( + [ + style.container, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(snackbarElem) + ]), + $author$project$Widget$singleModal(modals), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]) + ])), + A2( + $mdgriffith$elm_ui$Element$column, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$spacing(8) + ]), + _List_fromArray( + [ + nav, + A2( + $author$project$Widget$button, + style.containedButton, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper($author$project$Example$Layout$AddSnackbar)), + text: 'Add Notification' + }) + ]))); + }); var $author$project$Example$List$ToggleCollapsable = function (a) { return {$: 'ToggleCollapsable', a: a}; }; +var $author$project$Internal$Item$fullBleedItem = F2( + function (s, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $author$project$Internal$Item$toItem, + s, + function (style) { + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.elementText, + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text)))), + icon(style.content.content.icon) + ])), + onPress: onPress + }); + }); + }); +var $author$project$Widget$fullBleedItem = function () { + var fun = $author$project$Internal$Item$fullBleedItem; + return fun; +}(); var $author$project$Internal$Item$headerItem = F2( function (style, title) { return A2( @@ -21653,7 +22581,14 @@ var $author$project$Internal$Item$imageItem = F2( }); }); }); -var $author$project$Widget$imageItem = $author$project$Internal$Item$imageItem; +var $author$project$Widget$imageItem = function () { + var fun = $author$project$Internal$Item$imageItem; + return fun; +}(); +var $author$project$Widget$insetItem = function () { + var fun = $author$project$Internal$Item$insetItem; + return fun; +}(); var $author$project$Internal$Item$multiLineItem = F2( function (s, _v0) { var onPress = _v0.onPress; @@ -21702,8 +22637,11 @@ var $author$project$Internal$Item$multiLineItem = F2( }); }); }); -var $author$project$Widget$multiLineItem = $author$project$Internal$Item$multiLineItem; -var $author$project$Widget$textItem = $author$project$Internal$Item$textItem; +var $author$project$Widget$multiLineItem = function () { + var fun = $author$project$Internal$Item$multiLineItem; + return fun; +}(); +var $author$project$Widget$selectItem = $author$project$Internal$Item$selectItem; var $author$project$Example$List$view = F3( function (msgMapper, style, _v0) { var isExpanded = _v0.a; @@ -21714,23 +22652,25 @@ var $author$project$Example$List$view = F3( _List_fromArray( [ A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Section 1'), - $author$project$Widget$item( + $author$project$Widget$asItem( $mdgriffith$elm_ui$Element$text('Custom Item')), $author$project$Widget$divider(style.middleDivider), - $author$project$Widget$item( A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [$mdgriffith$elm_ui$Element$centerY]), - $mdgriffith$elm_ui$Element$text('Custom Item (centered)'))), + $author$project$Widget$fullBleedItem, + style.fullBleedItem, + { + icon: function (_v1) { + return $mdgriffith$elm_ui$Element$none; + }, + onPress: $elm$core$Maybe$Nothing, + text: 'Full Bleed Item' + }), A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Section 2'), A2( - $author$project$Widget$textItem, - style.textItem, + $author$project$Widget$insetItem, + style.insetItem, { - content: function (_v1) { - var size = _v1.size; - var color = _v1.color; + content: function (_v2) { return $mdgriffith$elm_ui$Element$none; }, icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), @@ -21741,9 +22681,9 @@ var $author$project$Example$List$view = F3( $author$project$Widget$imageItem, style.imageItem, { - content: function (_v2) { - var size = _v2.size; - var color = _v2.color; + content: function (_v3) { + var size = _v3.size; + var color = _v3.color; return A2( $mdgriffith$elm_ui$Element$el, _List_fromArray( @@ -21769,12 +22709,12 @@ var $author$project$Example$List$view = F3( }), $author$project$Widget$divider(style.insetDivider), A2( - $author$project$Widget$textItem, - style.textItem, + $author$project$Widget$insetItem, + style.insetItem, { - content: function (_v3) { - var size = _v3.size; - var color = _v3.color; + content: function (_v4) { + var size = _v4.size; + var color = _v4.color; return A2( $mdgriffith$elm_ui$Element$el, _List_fromArray( @@ -21805,9 +22745,7 @@ var $author$project$Example$List$view = F3( $author$project$Widget$imageItem, style.imageItem, { - content: function (_v4) { - var size = _v4.size; - var color = _v4.color; + content: function (_v5) { return A2( $author$project$Widget$switch, style._switch, @@ -21827,45 +22765,94 @@ var $author$project$Example$List$view = F3( }), $author$project$Widget$divider(style.fullBleedDivider) ]), - A2( - $author$project$Widget$expansionItem, - style.expansionItem, - { - content: _List_fromArray( + _Utils_ap( + A2( + $author$project$Widget$expansionItem, + style.expansionItem, + { + content: _List_fromArray( + [ + A2($author$project$Widget$headerItem, style.insetHeader, 'Section 3'), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v6) { + var size = _v6.size; + var color = _v6.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor(color)), + $mdgriffith$elm_ui$Element$Font$size(size) + ]), + $mdgriffith$elm_ui$Element$text('3.')); + }, + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Nothing, + text: 'Item' + }) + ]), + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + isExpanded: isExpanded, + onToggle: A2($elm$core$Basics$composeR, $author$project$Example$List$ToggleCollapsable, msgMapper), + text: 'Expandable Item' + }), + _Utils_ap( + _List_fromArray( [ - A2($author$project$Widget$headerItem, style.insetHeader, 'Section 3'), - A2( - $author$project$Widget$textItem, - style.textItem, - { - content: function (_v5) { - var size = _v5.size; - var color = _v5.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor(color)), - $mdgriffith$elm_ui$Element$Font$size(size) - ]), - $mdgriffith$elm_ui$Element$text('3.')); - }, - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - onPress: $elm$core$Maybe$Nothing, - text: 'Item' - }) + A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Menu') ]), - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - isExpanded: isExpanded, - onToggle: A2($elm$core$Basics$composeR, $author$project$Example$List$ToggleCollapsable, msgMapper), - text: 'Expandable Item' - }))); + A2( + $author$project$Widget$selectItem, + style.selectItem, + { + onSelect: function (_int) { + return $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$List$ToggleCollapsable(_int === 1))); + }, + options: A2( + $elm$core$List$map, + function (bool) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: bool ? 'Expanded' : 'Collapsed' + }; + }, + _List_fromArray( + [true, false])), + selected: isExpanded ? $elm$core$Maybe$Just(1) : $elm$core$Maybe$Just(0) + }))))); }); var $author$project$Example$Modal$ToggleModal = function (a) { return {$: 'ToggleModal', a: a}; }; -var $author$project$Widget$modal = $author$project$Internal$Dialog$modal; +var $author$project$Internal$Modal$multiModal = function (list) { + if (list.b) { + var head = list.a; + var tail = list.b; + return _Utils_ap( + A2( + $elm$core$List$map, + function (_v1) { + var content = _v1.content; + return $mdgriffith$elm_ui$Element$inFront(content); + }, + $elm$core$List$reverse(tail)), + _Utils_ap( + $author$project$Internal$Modal$background(head.onDismiss), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(head.content) + ]))); + } else { + return _List_Nil; + } +}; +var $author$project$Widget$multiModal = $author$project$Internal$Modal$multiModal; var $author$project$Example$Modal$view = F3( function (msgMapper, style, _v0) { var isEnabled = _v0.a; @@ -21879,32 +22866,79 @@ var $author$project$Example$Modal$view = F3( $mdgriffith$elm_ui$Element$width( A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) ]), - isEnabled ? $author$project$Widget$modal( - { - content: A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(100)), - $mdgriffith$elm_ui$Element$width( - $mdgriffith$elm_ui$Element$px(250)), - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$centerY - ]), - A2( - $author$project$Widget$column, - style.cardColumn, - $elm$core$List$singleton( - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('Click on the area around this box to close it.')))))), - onDismiss: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Modal$ToggleModal(false))) - }) : _List_Nil), + isEnabled ? $author$project$Widget$multiModal( + _List_fromArray( + [ + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(250)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('Click on the area around this box to close it.')))))), + onDismiss: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Modal$ToggleModal(false))) + }, + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(150)), + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(200)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('This card can not be selected.')))))), + onDismiss: $elm$core$Maybe$Nothing + }, + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(300)), + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(300)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('This is message is behind the other two')))))), + onDismiss: $elm$core$Maybe$Nothing + } + ])) : _List_Nil), A2( $author$project$Widget$button, style.primaryButton, @@ -21913,7 +22947,7 @@ var $author$project$Example$Modal$view = F3( onPress: $elm$core$Maybe$Just( msgMapper( $author$project$Example$Modal$ToggleModal(true))), - text: 'show Modal' + text: 'Show Modal' })); }); var $author$project$Example$MultiSelect$ChangedSelected = function (a) { @@ -21977,6 +23011,152 @@ var $author$project$Example$Select$view = F3( selected: selected })); }); +var $author$project$Example$Sheet$ToggleModal = function (a) { + return {$: 'ToggleModal', a: a}; +}; +var $author$project$Example$Sheet$view = F3( + function (msgMapper, style, _v0) { + var isEnabled = _v0.a; + return A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]), + isEnabled ? $author$project$Widget$singleModal( + $elm$core$List$singleton( + { + content: A2( + $author$project$Widget$itemList, + style.sideSheet, + _List_fromArray( + [ + $author$project$Widget$asItem( + A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Menu'))), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v1) { + return $mdgriffith$elm_ui$Element$none; + }, + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))), + text: 'Home' + }), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v2) { + return $mdgriffith$elm_ui$Element$none; + }, + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))), + text: 'About' + }) + ])), + onDismiss: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))) + })) : _List_Nil), + A2( + $author$project$Widget$button, + style.primaryButton, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$eye), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(true))), + text: 'Show Sheet' + })); + }); +var $author$project$Example$Snackbar$AddSnackbar = function (a) { + return {$: 'AddSnackbar', a: a}; +}; +var $author$project$Example$Snackbar$view = F3( + function (msgMapper, style, model) { + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$inFront( + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3( + $author$project$Widget$Snackbar$view, + style.snackbar, + function (_v0) { + var text = _v0.a; + var hasButton = _v0.b; + return { + button: hasButton ? $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('This is another message', false)))), + text: 'Add' + }) : $elm$core$Maybe$Nothing, + text: text + }; + }, + model)))) + ]), + A2( + $author$project$Widget$column, + style.column, + _List_fromArray( + [ + A2( + $author$project$Widget$button, + style.button, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('This is a notification. It will disappear after 10 seconds.', false)))), + text: 'Add Notification' + }), + A2( + $author$project$Widget$button, + style.button, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('You can add another notification if you want.', true)))), + text: 'Add Notification with Action' + }) + ]))); + }); var $author$project$Example$SortTable$ChangedSorting = function (a) { return {$: 'ChangedSorting', a: a}; }; @@ -22206,6 +23386,13 @@ var $author$project$Example$TextInput$view = F3( var $author$project$Data$Example$view = F3( function (msgMapper, style, model) { return { + appBar: A3( + $author$project$Example$AppBar$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$AppBar, msgMapper), + style, + function ($) { + return $.appBar; + }(model)), button: A3( $author$project$Example$Button$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$Button, msgMapper), @@ -22227,6 +23414,13 @@ var $author$project$Data$Example$view = F3( function ($) { return $.icon; }(model)), + layout: A3( + $author$project$Example$Layout$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Layout, msgMapper), + style, + function ($) { + return $.layout; + }(model)), list: A3( $author$project$Example$List$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$List, msgMapper), @@ -22262,6 +23456,20 @@ var $author$project$Data$Example$view = F3( function ($) { return $.select; }(model)), + sheet: A3( + $author$project$Example$Sheet$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Sheet, msgMapper), + style, + function ($) { + return $.sheet; + }(model)), + snackbar: A3( + $author$project$Example$Snackbar$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Snackbar, msgMapper), + style, + function ($) { + return $.snackbar; + }(model)), sortTable: A3( $author$project$Example$SortTable$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$SortTable, msgMapper), @@ -22383,7 +23591,7 @@ var $author$project$Main$viewLoaded = function (m) { $mdgriffith$elm_ui$Element$none), A2( $mdgriffith$elm_ui$Element$column, - _Utils_ap($Orasund$elm_ui_framework$Framework$container, style.layout.container), + _Utils_ap($Orasund$elm_ui_framework$Framework$container, style.container), A2( $elm$core$List$map, function (section) { @@ -22427,7 +23635,7 @@ var $author$project$Main$viewLoaded = function (m) { style.cardColumn, A2( $elm$core$List$cons, - $author$project$Widget$item( + $author$project$Widget$asItem( A2( $mdgriffith$elm_ui$Element$column, $Orasund$elm_ui_framework$Framework$Grid$simple, @@ -22456,7 +23664,7 @@ var $author$project$Main$viewLoaded = function (m) { style.expansionItem, { content: $elm$core$List$singleton( - $author$project$Widget$item( + $author$project$Widget$asItem( A2( $mdgriffith$elm_ui$Element$column, _Utils_ap( @@ -22508,17 +23716,7 @@ var $author$project$Main$viewLoaded = function (m) { }()); }, _List_fromArray( - [$author$project$Data$Section$StatelessViews, $author$project$Data$Section$ReusableViews]))), - $mdgriffith$elm_ui$Element$html( - A3( - $elm$html$Html$node, - 'link', - _List_fromArray( - [ - $elm$html$Html$Attributes$rel('stylesheet'), - $elm$html$Html$Attributes$href('https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css') - ]), - _List_Nil)) + [$author$project$Data$Section$StatelessViews, $author$project$Data$Section$ReusableViews]))) ])); }; var $author$project$Main$view = function (model) { @@ -22530,89 +23728,9 @@ var $author$project$Main$view = function (model) { return A2( $elm$html$Html$map, $author$project$Main$LoadedSpecific, - A3( - $author$project$Widget$Layout$view, - style.layout, - { - actions: _List_fromArray( - [ - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$book), - onPress: $elm$core$Maybe$Just( - $author$project$Main$Load('https://package.elm-lang.org/packages/Orasund/elm-ui-widgets/latest/')), - text: 'Docs' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$github), - onPress: $elm$core$Maybe$Just( - $author$project$Main$Load('https://github.com/Orasund/elm-ui-widgets')), - text: 'Github' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), - onPress: (!_Utils_eq(m.theme, $author$project$Data$Theme$Material)) ? $elm$core$Maybe$Just( - $author$project$Main$SetTheme($author$project$Data$Theme$Material)) : $elm$core$Maybe$Nothing, - text: 'Material Theme' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), - onPress: (!_Utils_eq(m.theme, $author$project$Data$Theme$DarkMaterial)) ? $elm$core$Maybe$Just( - $author$project$Main$SetTheme($author$project$Data$Theme$DarkMaterial)) : $elm$core$Maybe$Nothing, - text: 'Dark Material Theme' - } - ]), - dialog: m.displayDialog ? $elm$core$Maybe$Just( - A2( - $author$project$Widget$dialog, - style.dialog, - { - accept: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - $author$project$Main$ToggleDialog(false)), - text: 'Ok' - }), - dismiss: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - $author$project$Main$ToggleDialog(false)), - text: 'Dismiss' - }), - text: 'This is a dialog window', - title: $elm$core$Maybe$Just('Dialog') - })) : $elm$core$Maybe$Nothing, - layout: m.layout, - menu: A2( - $author$project$Widget$ScrollingNav$toSelect, - function (_int) { - return A2( - $elm$core$Maybe$map, - $author$project$Main$JumpTo, - A2( - $elm$core$Array$get, - _int, - $elm$core$Array$fromList(m.scrollingNav.arrangement))); - }, - m.scrollingNav), - onChangedSidebar: $author$project$Main$ChangedSidebar, - search: $elm$core$Maybe$Just( - { - chips: _List_Nil, - label: 'Search', - onChange: $author$project$Main$ChangedSearch, - placeholder: $elm$core$Maybe$Just( - A2( - $mdgriffith$elm_ui$Element$Input$placeholder, - _List_Nil, - $mdgriffith$elm_ui$Element$text('Search Widgets...'))), - text: m.search.raw - }), - title: A2( - $mdgriffith$elm_ui$Element$el, - $Orasund$elm_ui_framework$Framework$Heading$h1, - $mdgriffith$elm_ui$Element$text('Elm-Ui-Widgets')), - window: m.window - }, + A2( + $mdgriffith$elm_ui$Element$layout, + A3($author$project$Main$viewLayout, $elm$core$Basics$identity, style, m), $author$project$Main$viewLoaded(m))); } }; diff --git a/docs/index.html b/docs/index.html index 0913684..b6cdf88 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5257,6 +5257,9 @@ var $author$project$Main$LoadedSpecific = function (a) { var $author$project$Main$Resized = function (a) { return {$: 'Resized', a: a}; }; +var $author$project$Main$StatelessSpecific = function (a) { + return {$: 'StatelessSpecific', a: a}; +}; var $author$project$Main$TimePassed = function (a) { return {$: 'TimePassed', a: a}; }; @@ -5898,128 +5901,16 @@ var $elm$browser$Browser$Events$onResize = function (func) { A2($elm$json$Json$Decode$field, 'innerWidth', $elm$json$Json$Decode$int), A2($elm$json$Json$Decode$field, 'innerHeight', $elm$json$Json$Decode$int)))); }; -var $author$project$Main$subscriptions = function (_v0) { - return A2( - $elm$core$Platform$Sub$map, - $author$project$Main$LoadedSpecific, - $elm$core$Platform$Sub$batch( - _List_fromArray( - [ - A2( - $elm$time$Time$every, - 50, - $elm$core$Basics$always( - $author$project$Main$TimePassed(50))), - $elm$browser$Browser$Events$onResize( - F2( - function (h, w) { - return $author$project$Main$Resized( - {height: h, width: w}); - })) - ]))); -}; -var $author$project$Main$Loaded = function (a) { - return {$: 'Loaded', a: a}; -}; -var $author$project$Main$Idle = {$: 'Idle'}; -var $author$project$Data$Theme$Material = {$: 'Material'}; -var $author$project$Main$StatelessSpecific = function (a) { - return {$: 'StatelessSpecific', a: a}; -}; -var $author$project$Main$UpdateScrollingNav = function (a) { - return {$: 'UpdateScrollingNav', a: a}; -}; -var $author$project$Data$Example$ButtonExample = {$: 'ButtonExample'}; -var $author$project$Data$Example$DialogExample = {$: 'DialogExample'}; -var $author$project$Data$Example$IconExample = {$: 'IconExample'}; -var $author$project$Data$Example$ListExample = {$: 'ListExample'}; -var $author$project$Data$Example$ModalExample = {$: 'ModalExample'}; -var $author$project$Data$Example$MultiSelectExample = {$: 'MultiSelectExample'}; -var $author$project$Data$Example$ProgressIndicatorExample = {$: 'ProgressIndicatorExample'}; -var $author$project$Data$Example$SelectExample = {$: 'SelectExample'}; -var $author$project$Data$Example$SortTableExample = {$: 'SortTableExample'}; -var $author$project$Data$Example$SwitchExample = {$: 'SwitchExample'}; -var $author$project$Data$Example$TabExample = {$: 'TabExample'}; -var $author$project$Data$Example$TextInputExample = {$: 'TextInputExample'}; -var $elm$core$List$sortBy = _List_sortBy; -var $author$project$Data$Example$toString = function (example) { - switch (example.$) { - case 'ButtonExample': - return 'Button'; - case 'SwitchExample': - return 'Switch'; - case 'SelectExample': - return 'Select'; - case 'MultiSelectExample': - return 'Multi Select'; - case 'TabExample': - return 'Tab'; - case 'SortTableExample': - return 'SortTable'; - case 'ModalExample': - return 'Modal'; - case 'DialogExample': - return 'Dialog'; - case 'TextInputExample': - return 'TextInput'; - case 'ListExample': - return 'List'; - case 'ProgressIndicatorExample': - return 'Progress Indicator'; - default: - return 'Icon'; - } -}; -var $author$project$Data$Example$asList = A2( - $elm$core$List$sortBy, - $author$project$Data$Example$toString, - _List_fromArray( - [$author$project$Data$Example$ButtonExample, $author$project$Data$Example$SwitchExample, $author$project$Data$Example$SelectExample, $author$project$Data$Example$MultiSelectExample, $author$project$Data$Example$TabExample, $author$project$Data$Example$SortTableExample, $author$project$Data$Example$ModalExample, $author$project$Data$Example$DialogExample, $author$project$Data$Example$TextInputExample, $author$project$Data$Example$ListExample, $author$project$Data$Example$ProgressIndicatorExample, $author$project$Data$Example$IconExample])); -var $elm$core$Platform$Cmd$batch = _Platform_batch; -var $turboMaCk$any_set$Set$Any$AnySet = function (a) { - return {$: 'AnySet', a: a}; -}; -var $turboMaCk$any_dict$Dict$Any$AnyDict = function (a) { - return {$: 'AnyDict', a: a}; -}; -var $turboMaCk$any_dict$Dict$Any$empty = function (toKey) { - return $turboMaCk$any_dict$Dict$Any$AnyDict( - {dict: $elm$core$Dict$empty, toKey: toKey}); -}; -var $turboMaCk$any_set$Set$Any$empty = A2($elm$core$Basics$composeL, $turboMaCk$any_set$Set$Any$AnySet, $turboMaCk$any_dict$Dict$Any$empty); -var $author$project$Data$Example$fromString = function (string) { - switch (string) { - case 'Button': - return $elm$core$Maybe$Just($author$project$Data$Example$ButtonExample); - case 'Switch': - return $elm$core$Maybe$Just($author$project$Data$Example$SwitchExample); - case 'Select': - return $elm$core$Maybe$Just($author$project$Data$Example$SelectExample); - case 'Multi Select': - return $elm$core$Maybe$Just($author$project$Data$Example$MultiSelectExample); - case 'Tab': - return $elm$core$Maybe$Just($author$project$Data$Example$TabExample); - case 'SortTable': - return $elm$core$Maybe$Just($author$project$Data$Example$SortTableExample); - case 'Modal': - return $elm$core$Maybe$Just($author$project$Data$Example$ModalExample); - case 'Dialog': - return $elm$core$Maybe$Just($author$project$Data$Example$DialogExample); - case 'TextInput': - return $elm$core$Maybe$Just($author$project$Data$Example$TextInputExample); - case 'List': - return $elm$core$Maybe$Just($author$project$Data$Example$ListExample); - case 'Progress Indicator': - return $elm$core$Maybe$Just($author$project$Data$Example$ProgressIndicatorExample); - case 'Icon': - return $elm$core$Maybe$Just($author$project$Data$Example$IconExample); - default: - return $elm$core$Maybe$Nothing; - } +var $elm$core$List$singleton = function (value) { + return _List_fromArray( + [value]); }; var $author$project$Stateless$ExampleSpecific = function (a) { return {$: 'ExampleSpecific', a: a}; }; +var $author$project$Data$Example$AppBar = function (a) { + return {$: 'AppBar', a: a}; +}; var $author$project$Data$Example$Button = function (a) { return {$: 'Button', a: a}; }; @@ -6029,6 +5920,9 @@ var $author$project$Data$Example$Dialog = function (a) { var $author$project$Data$Example$Icon = function (a) { return {$: 'Icon', a: a}; }; +var $author$project$Data$Example$Layout = function (a) { + return {$: 'Layout', a: a}; +}; var $author$project$Data$Example$List = function (a) { return {$: 'List', a: a}; }; @@ -6044,6 +5938,12 @@ var $author$project$Data$Example$ProgressIndicator = function (a) { var $author$project$Data$Example$Select = function (a) { return {$: 'Select', a: a}; }; +var $author$project$Data$Example$Sheet = function (a) { + return {$: 'Sheet', a: a}; +}; +var $author$project$Data$Example$Snackbar = function (a) { + return {$: 'Snackbar', a: a}; +}; var $author$project$Data$Example$SortTable = function (a) { return {$: 'SortTable', a: a}; }; @@ -6056,459 +5956,144 @@ var $author$project$Data$Example$Tab = function (a) { var $author$project$Data$Example$TextInput = function (a) { return {$: 'TextInput', a: a}; }; +var $elm$core$Platform$Sub$none = $elm$core$Platform$Sub$batch(_List_Nil); +var $author$project$Example$AppBar$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Button$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Dialog$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Icon$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Layout$Resized = function (a) { + return {$: 'Resized', a: a}; +}; +var $author$project$Example$Layout$TimePassed = function (a) { + return {$: 'TimePassed', a: a}; +}; +var $author$project$Example$Layout$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$batch( + _List_fromArray( + [ + $elm$browser$Browser$Events$onResize( + F2( + function (h, w) { + return $author$project$Example$Layout$Resized( + {height: h, width: w}); + })), + A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Example$Layout$TimePassed(50))) + ])); +}; +var $author$project$Example$List$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Modal$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$MultiSelect$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$ProgressIndicator$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Select$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Sheet$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Snackbar$TimePassed = function (a) { + return {$: 'TimePassed', a: a}; +}; +var $author$project$Example$Snackbar$subscriptions = function (_v0) { + return A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Example$Snackbar$TimePassed(50))); +}; +var $author$project$Example$SortTable$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Switch$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$Tab$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $author$project$Example$TextInput$subscriptions = function (_v0) { + return $elm$core$Platform$Sub$none; +}; +var $elm$core$Platform$Cmd$batch = _Platform_batch; var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); -var $author$project$Example$Button$init = _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); +var $author$project$Example$AppBar$update = F2( + function (msg, menu) { + switch (msg.$) { + case 'SetDesign': + var bool = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {isMenuBar: bool}), + $elm$core$Platform$Cmd$none); + case 'SetSelected': + var _int = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {selected: _int}), + $elm$core$Platform$Cmd$none); + default: + var string = msg.a; + return _Utils_Tuple2( + _Utils_update( + menu, + {search: string}), + $elm$core$Platform$Cmd$none); + } + }); +var $elm$core$Basics$ge = _Utils_ge; +var $author$project$Example$Button$update = F2( + function (msg, model) { + switch (msg.$) { + case 'Increase': + var _int = msg.a; + return _Utils_Tuple2(model + _int, $elm$core$Platform$Cmd$none); + case 'Decrease': + var _int = msg.a; + return _Utils_Tuple2( + ((model - _int) >= 0) ? (model - _int) : model, + $elm$core$Platform$Cmd$none); + default: + return _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); + } + }); var $author$project$Example$Dialog$IsOpen = function (a) { return {$: 'IsOpen', a: a}; }; -var $author$project$Example$Dialog$init = _Utils_Tuple2( - $author$project$Example$Dialog$IsOpen(true), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Icon$init = _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); -var $author$project$Example$List$IsExpanded = function (a) { - return {$: 'IsExpanded', a: a}; -}; -var $author$project$Example$List$init = _Utils_Tuple2( - $author$project$Example$List$IsExpanded(false), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Modal$IsEnabled = function (a) { - return {$: 'IsEnabled', a: a}; -}; -var $author$project$Example$Modal$init = _Utils_Tuple2( - $author$project$Example$Modal$IsEnabled(true), - $elm$core$Platform$Cmd$none); -var $author$project$Example$MultiSelect$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $elm$core$Set$Set_elm_builtin = function (a) { - return {$: 'Set_elm_builtin', a: a}; -}; -var $elm$core$Set$empty = $elm$core$Set$Set_elm_builtin($elm$core$Dict$empty); -var $author$project$Example$MultiSelect$init = _Utils_Tuple2( - $author$project$Example$MultiSelect$Selected($elm$core$Set$empty), - $elm$core$Platform$Cmd$none); -var $author$project$Example$ProgressIndicator$MaybeProgress = function (a) { - return {$: 'MaybeProgress', a: a}; -}; -var $author$project$Example$ProgressIndicator$init = _Utils_Tuple2( - $author$project$Example$ProgressIndicator$MaybeProgress($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Select$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $author$project$Example$Select$init = _Utils_Tuple2( - $author$project$Example$Select$Selected($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$SortTable$init = _Utils_Tuple2( - {asc: true, title: 'Name'}, - $elm$core$Platform$Cmd$none); -var $author$project$Example$Switch$IsButtonEnabled = function (a) { - return {$: 'IsButtonEnabled', a: a}; -}; -var $author$project$Example$Switch$init = _Utils_Tuple2( - $author$project$Example$Switch$IsButtonEnabled(false), - $elm$core$Platform$Cmd$none); -var $author$project$Example$Tab$Selected = function (a) { - return {$: 'Selected', a: a}; -}; -var $author$project$Example$Tab$init = _Utils_Tuple2( - $author$project$Example$Tab$Selected($elm$core$Maybe$Nothing), - $elm$core$Platform$Cmd$none); -var $author$project$Example$TextInput$init = _Utils_Tuple2( - {chipTextInput: $elm$core$Set$empty, textInput: ''}, - $elm$core$Platform$Cmd$none); -var $elm$core$Platform$Cmd$map = _Platform_map; -var $author$project$Data$Example$init = function () { - var _v0 = $author$project$Example$TextInput$init; - var textInputModel = _v0.a; - var textInputMsg = _v0.b; - var _v1 = $author$project$Example$Tab$init; - var tabModel = _v1.a; - var tabMsg = _v1.b; - var _v2 = $author$project$Example$Switch$init; - var switchModel = _v2.a; - var switchMsg = _v2.b; - var _v3 = $author$project$Example$SortTable$init; - var sortTableModel = _v3.a; - var sortTableMsg = _v3.b; - var _v4 = $author$project$Example$Select$init; - var selectModel = _v4.a; - var selectMsg = _v4.b; - var _v5 = $author$project$Example$ProgressIndicator$init; - var progressIndicatorModel = _v5.a; - var progressIndicatorMsg = _v5.b; - var _v6 = $author$project$Example$MultiSelect$init; - var multiSelectModel = _v6.a; - var multiSelectMsg = _v6.b; - var _v7 = $author$project$Example$Modal$init; - var modalModel = _v7.a; - var modalMsg = _v7.b; - var _v8 = $author$project$Example$List$init; - var listModel = _v8.a; - var listMsg = _v8.b; - var _v9 = $author$project$Example$Icon$init; - var iconModel = _v9.a; - var iconMsg = _v9.b; - var _v10 = $author$project$Example$Dialog$init; - var dialogModel = _v10.a; - var dialogMsg = _v10.b; - var _v11 = $author$project$Example$Button$init; - var buttonModel = _v11.a; - var buttonMsg = _v11.b; - return _Utils_Tuple2( - {button: buttonModel, dialog: dialogModel, icon: iconModel, list: listModel, modal: modalModel, multiSelect: multiSelectModel, progressIndicator: progressIndicatorModel, select: selectModel, sortTable: sortTableModel, _switch: switchModel, tab: tabModel, textInput: textInputModel}, - $elm$core$Platform$Cmd$batch( - _List_fromArray( - [ - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Button, buttonMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Switch, switchMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Select, selectMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$MultiSelect, multiSelectMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Tab, tabMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$SortTable, sortTableMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Modal, modalMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Dialog, dialogMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$TextInput, textInputMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$List, listMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$ProgressIndicator, progressIndicatorMsg), - A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Icon, iconMsg) - ]))); -}(); -var $author$project$Stateless$init = function () { - var _v0 = $author$project$Data$Example$init; - var example = _v0.a; - var cmd = _v0.b; - return _Utils_Tuple2( - {carousel: 0, example: example}, - A2($elm$core$Platform$Cmd$map, $author$project$Stateless$ExampleSpecific, cmd)); -}(); +var $author$project$Example$Dialog$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Dialog$IsOpen(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$Icon$update = F2( + function (msg, _v0) { + return _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); + }); var $turboMaCk$queue$Queue$Queue = F2( function (a, b) { return {$: 'Queue', a: a, b: b}; }); -var $turboMaCk$queue$Queue$empty = A2($turboMaCk$queue$Queue$Queue, _List_Nil, _List_Nil); -var $author$project$Widget$Snackbar$init = {current: $elm$core$Maybe$Nothing, queue: $turboMaCk$queue$Queue$empty}; -var $author$project$Widget$Layout$init = {active: $elm$core$Maybe$Nothing, snackbar: $author$project$Widget$Snackbar$init}; -var $elm$core$Task$onError = _Scheduler_onError; -var $elm$core$Task$attempt = F2( - function (resultToMessage, task) { - return $elm$core$Task$command( - $elm$core$Task$Perform( - A2( - $elm$core$Task$onError, - A2( - $elm$core$Basics$composeL, - A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), - $elm$core$Result$Err), - A2( - $elm$core$Task$andThen, - A2( - $elm$core$Basics$composeL, - A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), - $elm$core$Result$Ok), - task)))); - }); -var $elm_community$intdict$IntDict$Empty = {$: 'Empty'}; -var $elm_community$intdict$IntDict$empty = $elm_community$intdict$IntDict$Empty; -var $elm$browser$Browser$Dom$getElement = _Browser_getElement; -var $elm_community$intdict$IntDict$Inner = function (a) { - return {$: 'Inner', a: a}; -}; -var $elm_community$intdict$IntDict$size = function (dict) { - switch (dict.$) { - case 'Empty': - return 0; - case 'Leaf': - return 1; - default: - var i = dict.a; - return i.size; - } -}; -var $elm_community$intdict$IntDict$inner = F3( - function (p, l, r) { - var _v0 = _Utils_Tuple2(l, r); - if (_v0.a.$ === 'Empty') { - var _v1 = _v0.a; - return r; - } else { - if (_v0.b.$ === 'Empty') { - var _v2 = _v0.b; - return l; - } else { - return $elm_community$intdict$IntDict$Inner( - { - left: l, - prefix: p, - right: r, - size: $elm_community$intdict$IntDict$size(l) + $elm_community$intdict$IntDict$size(r) - }); - } - } - }); -var $elm$core$Bitwise$and = _Bitwise_and; -var $elm$core$Basics$composeR = F3( - function (f, g, x) { - return g( - f(x)); - }); -var $elm$core$Basics$neq = _Utils_notEqual; -var $elm$core$Bitwise$complement = _Bitwise_complement; -var $elm$core$Bitwise$or = _Bitwise_or; -var $elm$core$Bitwise$shiftRightZfBy = _Bitwise_shiftRightZfBy; -var $elm_community$intdict$IntDict$highestBitSet = function (n) { - var shiftOr = F2( - function (i, shift) { - return i | (i >>> shift); - }); - var n1 = A2(shiftOr, n, 1); - var n2 = A2(shiftOr, n1, 2); - var n3 = A2(shiftOr, n2, 4); - var n4 = A2(shiftOr, n3, 8); - var n5 = A2(shiftOr, n4, 16); - return n5 & (~(n5 >>> 1)); -}; -var $elm$core$Basics$negate = function (n) { - return -n; -}; -var $elm_community$intdict$IntDict$signBit = $elm_community$intdict$IntDict$highestBitSet(-1); -var $elm$core$Bitwise$xor = _Bitwise_xor; -var $elm_community$intdict$IntDict$isBranchingBitSet = function (p) { - return A2( - $elm$core$Basics$composeR, - $elm$core$Bitwise$xor($elm_community$intdict$IntDict$signBit), - A2( - $elm$core$Basics$composeR, - $elm$core$Bitwise$and(p.branchingBit), - $elm$core$Basics$neq(0))); -}; -var $elm_community$intdict$IntDict$higherBitMask = function (branchingBit) { - return branchingBit ^ (~(branchingBit - 1)); -}; -var $elm_community$intdict$IntDict$lcp = F2( - function (x, y) { - var branchingBit = $elm_community$intdict$IntDict$highestBitSet(x ^ y); - var mask = $elm_community$intdict$IntDict$higherBitMask(branchingBit); - var prefixBits = x & mask; - return {branchingBit: branchingBit, prefixBits: prefixBits}; - }); -var $elm_community$intdict$IntDict$Leaf = function (a) { - return {$: 'Leaf', a: a}; -}; -var $elm_community$intdict$IntDict$leaf = F2( - function (k, v) { - return $elm_community$intdict$IntDict$Leaf( - {key: k, value: v}); - }); -var $elm_community$intdict$IntDict$prefixMatches = F2( - function (p, n) { - return _Utils_eq( - n & $elm_community$intdict$IntDict$higherBitMask(p.branchingBit), - p.prefixBits); - }); -var $elm_community$intdict$IntDict$update = F3( - function (key, alter, dict) { - var join = F2( - function (_v2, _v3) { - var k1 = _v2.a; - var l = _v2.b; - var k2 = _v3.a; - var r = _v3.b; - var prefix = A2($elm_community$intdict$IntDict$lcp, k1, k2); - return A2($elm_community$intdict$IntDict$isBranchingBitSet, prefix, k2) ? A3($elm_community$intdict$IntDict$inner, prefix, l, r) : A3($elm_community$intdict$IntDict$inner, prefix, r, l); - }); - var alteredNode = function (mv) { - var _v1 = alter(mv); - if (_v1.$ === 'Just') { - var v = _v1.a; - return A2($elm_community$intdict$IntDict$leaf, key, v); - } else { - return $elm_community$intdict$IntDict$empty; - } - }; - switch (dict.$) { - case 'Empty': - return alteredNode($elm$core$Maybe$Nothing); - case 'Leaf': - var l = dict.a; - return _Utils_eq(l.key, key) ? alteredNode( - $elm$core$Maybe$Just(l.value)) : A2( - join, - _Utils_Tuple2( - key, - alteredNode($elm$core$Maybe$Nothing)), - _Utils_Tuple2(l.key, dict)); - default: - var i = dict.a; - return A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key) ? (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key) ? A3( - $elm_community$intdict$IntDict$inner, - i.prefix, - i.left, - A3($elm_community$intdict$IntDict$update, key, alter, i.right)) : A3( - $elm_community$intdict$IntDict$inner, - i.prefix, - A3($elm_community$intdict$IntDict$update, key, alter, i.left), - i.right)) : A2( - join, - _Utils_Tuple2( - key, - alteredNode($elm$core$Maybe$Nothing)), - _Utils_Tuple2(i.prefix.prefixBits, dict)); - } - }); -var $elm_community$intdict$IntDict$insert = F3( - function (key, value, dict) { - return A3( - $elm_community$intdict$IntDict$update, - key, - $elm$core$Basics$always( - $elm$core$Maybe$Just(value)), - dict); - }); -var $elm$core$Basics$round = _Basics_round; -var $author$project$Widget$ScrollingNav$syncPositions = function (_v0) { - var toString = _v0.toString; - var arrangement = _v0.arrangement; - var fun = F2( - function (_v1, model) { - var pos = _v1.a; - var label = _v1.b; - return _Utils_update( - model, - { - positions: A3( - $elm_community$intdict$IntDict$insert, - pos, - model.toString(label), - model.positions) - }); - }); - return A2( - $elm$core$Task$map, - F2( - function (list, m) { - return A3($elm$core$List$foldl, fun, m, list); - }), - $elm$core$Task$sequence( - A2( - $elm$core$List$map, - function (label) { - return A2( - $elm$core$Task$map, - function (x) { - return _Utils_Tuple2( - $elm$core$Basics$round(x.element.y), - label); - }, - $elm$browser$Browser$Dom$getElement( - toString(label))); - }, - arrangement))); -}; -var $author$project$Widget$ScrollingNav$init = function (_v0) { - var toString = _v0.toString; - var fromString = _v0.fromString; - var arrangement = _v0.arrangement; - var toMsg = _v0.toMsg; - return function (a) { - return _Utils_Tuple2( - a, - A2( - $elm$core$Task$attempt, - toMsg, - $author$project$Widget$ScrollingNav$syncPositions(a))); - }( - {arrangement: arrangement, fromString: fromString, positions: $elm_community$intdict$IntDict$empty, scrollPos: 0, toString: toString}); -}; -var $author$project$Main$initialModel = function (_v0) { - var viewport = _v0.viewport; - var _v1 = $author$project$Stateless$init; - var stateless = _v1.a; - var statelessCmd = _v1.b; - var _v2 = $author$project$Widget$ScrollingNav$init( - { - arrangement: $author$project$Data$Example$asList, - fromString: $author$project$Data$Example$fromString, - toMsg: function (result) { - if (result.$ === 'Ok') { - var fun = result.a; - return $author$project$Main$UpdateScrollingNav(fun); - } else { - return $author$project$Main$Idle; - } - }, - toString: $author$project$Data$Example$toString - }); - var scrollingNav = _v2.a; - var cmd = _v2.b; - return _Utils_Tuple2( - { - displayDialog: false, - expanded: $turboMaCk$any_set$Set$Any$empty($author$project$Data$Example$toString), - layout: $author$project$Widget$Layout$init, - scrollingNav: scrollingNav, - search: {current: '', raw: '', remaining: 0}, - stateless: stateless, - theme: $author$project$Data$Theme$Material, - window: { - height: $elm$core$Basics$round(viewport.height), - width: $elm$core$Basics$round(viewport.width) - } - }, - $elm$core$Platform$Cmd$batch( - _List_fromArray( - [ - cmd, - A2($elm$core$Platform$Cmd$map, $author$project$Main$StatelessSpecific, statelessCmd) - ]))); -}; -var $elm$core$Tuple$mapBoth = F3( - function (funcA, funcB, _v0) { - var x = _v0.a; - var y = _v0.b; - return _Utils_Tuple2( - funcA(x), - funcB(y)); - }); -var $author$project$Main$AddSnackbar = function (a) { - return {$: 'AddSnackbar', a: a}; -}; -var $author$project$Widget$Layout$activate = F2( - function (part, layout) { - return _Utils_update( - layout, - {active: part}); - }); -var $author$project$Widget$ScrollingNav$getPos = A2( - $elm$core$Task$map, - F2( - function (_int, model) { - return _Utils_update( - model, - { - scrollPos: $elm$core$Basics$round(_int.viewport.y) - }); - }), - $elm$browser$Browser$Dom$getViewport); -var $elm$browser$Browser$Dom$setViewport = _Browser_setViewport; -var $author$project$Widget$ScrollingNav$jumpTo = F2( - function (_v0, _v1) { - var section = _v0.section; - var onChange = _v0.onChange; - var toString = _v1.toString; - return A2( - $elm$core$Task$attempt, - onChange, - A2( - $elm$core$Task$andThen, - function (_v2) { - var element = _v2.element; - return A2($elm$browser$Browser$Dom$setViewport, 0, element.y); - }, - $elm$browser$Browser$Dom$getElement( - toString(section)))); - }); -var $elm$browser$Browser$Navigation$load = _Browser_load; var $turboMaCk$queue$Queue$queue = F2( function (fl, rl) { if (!fl.b) { @@ -6551,14 +6136,6 @@ var $author$project$Widget$Snackbar$insertFor = F3( } }); var $author$project$Widget$Snackbar$insert = $author$project$Widget$Snackbar$insertFor(10000); -var $author$project$Widget$Layout$queueMessage = F2( - function (message, layout) { - return _Utils_update( - layout, - { - snackbar: A2($author$project$Widget$Snackbar$insert, message, layout.snackbar) - }); - }); var $turboMaCk$queue$Queue$dequeue = function (_v0) { var fl = _v0.a; var rl = _v0.b; @@ -6597,6 +6174,9 @@ var $elm$core$Tuple$mapSecond = F2( x, func(y)); }); +var $elm$core$Basics$negate = function (n) { + return -n; +}; var $author$project$Widget$Snackbar$timePassed = F2( function (ms, model) { var _v0 = model.current; @@ -6621,51 +6201,114 @@ var $author$project$Widget$Snackbar$timePassed = F2( }); } }); -var $author$project$Widget$Layout$timePassed = F2( - function (sec, layout) { - var _v0 = layout.active; - _v0$2: - while (true) { - if (_v0.$ === 'Just') { - switch (_v0.a.$) { - case 'LeftSheet': - var _v1 = _v0.a; - return layout; - case 'RightSheet': - var _v2 = _v0.a; - return layout; - default: - break _v0$2; - } - } else { - break _v0$2; - } +var $author$project$Example$Layout$update = F2( + function (msg, model) { + switch (msg.$) { + case 'ChangedSidebar': + var maybePart = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {active: maybePart}), + $elm$core$Platform$Cmd$none); + case 'Resized': + var window = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {window: window}), + $elm$core$Platform$Cmd$none); + case 'SetSelected': + var _int = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {selected: _int}), + $elm$core$Platform$Cmd$none); + case 'AddSnackbar': + return _Utils_Tuple2( + _Utils_update( + model, + { + snackbar: A2($author$project$Widget$Snackbar$insert, 'This is a message', model.snackbar) + }), + $elm$core$Platform$Cmd$none); + case 'ShowDialog': + var bool = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {showDialog: bool}), + $elm$core$Platform$Cmd$none); + case 'SetSearchText': + var maybeString = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {searchText: maybeString}), + $elm$core$Platform$Cmd$none); + default: + var sec = msg.a; + return _Utils_Tuple2( + function () { + var _v1 = model.active; + _v1$2: + while (true) { + if (_v1.$ === 'Just') { + switch (_v1.a.$) { + case 'LeftSheet': + var _v2 = _v1.a; + return model; + case 'RightSheet': + var _v3 = _v1.a; + return model; + default: + break _v1$2; + } + } else { + break _v1$2; + } + } + return _Utils_update( + model, + { + snackbar: A2($author$project$Widget$Snackbar$timePassed, sec, model.snackbar) + }); + }(), + $elm$core$Platform$Cmd$none); } - return _Utils_update( - layout, - { - snackbar: A2($author$project$Widget$Snackbar$timePassed, sec, layout.snackbar) - }); }); -var $turboMaCk$any_dict$Dict$Any$insert = F3( - function (k, v, _v0) { - var inner = _v0.a; - return $turboMaCk$any_dict$Dict$Any$AnyDict( - _Utils_update( - inner, - { - dict: A3( - $elm$core$Dict$insert, - inner.toKey(k), - _Utils_Tuple2(k, v), - inner.dict) - })); +var $author$project$Example$List$IsExpanded = function (a) { + return {$: 'IsExpanded', a: a}; +}; +var $author$project$Example$List$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$List$IsExpanded(bool), + $elm$core$Platform$Cmd$none); }); -var $turboMaCk$any_set$Set$Any$insert = F2( - function (a, _v0) { +var $author$project$Example$Modal$IsEnabled = function (a) { + return {$: 'IsEnabled', a: a}; +}; +var $author$project$Example$Modal$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Modal$IsEnabled(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$MultiSelect$Selected = function (a) { + return {$: 'Selected', a: a}; +}; +var $elm$core$Set$Set_elm_builtin = function (a) { + return {$: 'Set_elm_builtin', a: a}; +}; +var $elm$core$Set$insert = F2( + function (key, _v0) { var dict = _v0.a; - return $turboMaCk$any_set$Set$Any$AnySet( - A3($turboMaCk$any_dict$Dict$Any$insert, a, _Utils_Tuple0, dict)); + return $elm$core$Set$Set_elm_builtin( + A3($elm$core$Dict$insert, key, _Utils_Tuple0, dict)); }); var $elm$core$Dict$member = F2( function (key, dict) { @@ -6676,19 +6319,10 @@ var $elm$core$Dict$member = F2( return false; } }); -var $turboMaCk$any_dict$Dict$Any$member = F2( - function (k, _v0) { - var dict = _v0.a.dict; - var toKey = _v0.a.toKey; - return A2( - $elm$core$Dict$member, - toKey(k), - dict); - }); -var $turboMaCk$any_set$Set$Any$member = F2( - function (a, _v0) { +var $elm$core$Set$member = F2( + function (key, _v0) { var dict = _v0.a; - return A2($turboMaCk$any_dict$Dict$Any$member, a, dict); + return A2($elm$core$Dict$member, key, dict); }); var $elm$core$Dict$getMin = function (dict) { getMin: @@ -7052,118 +6686,6 @@ var $elm$core$Dict$remove = F2( return x; } }); -var $turboMaCk$any_dict$Dict$Any$remove = F2( - function (k, _v0) { - var inner = _v0.a; - return $turboMaCk$any_dict$Dict$Any$AnyDict( - _Utils_update( - inner, - { - dict: A2( - $elm$core$Dict$remove, - inner.toKey(k), - inner.dict) - })); - }); -var $turboMaCk$any_set$Set$Any$remove = F2( - function (a, _v0) { - var dict = _v0.a; - return $turboMaCk$any_set$Set$Any$AnySet( - A2($turboMaCk$any_dict$Dict$Any$remove, a, dict)); - }); -var $turboMaCk$any_set$Set$Any$toggle = F2( - function (a, set) { - return A2($turboMaCk$any_set$Set$Any$member, a, set) ? A2($turboMaCk$any_set$Set$Any$remove, a, set) : A2($turboMaCk$any_set$Set$Any$insert, a, set); - }); -var $elm$core$Platform$Sub$none = $elm$core$Platform$Sub$batch(_List_Nil); -var $author$project$Example$Button$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Dialog$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Icon$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$List$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Modal$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$MultiSelect$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$ProgressIndicator$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Select$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$SortTable$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Switch$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$Tab$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $author$project$Example$TextInput$subscriptions = function (_v0) { - return $elm$core$Platform$Sub$none; -}; -var $elm$core$Basics$ge = _Utils_ge; -var $author$project$Example$Button$update = F2( - function (msg, model) { - switch (msg.$) { - case 'Increase': - var _int = msg.a; - return _Utils_Tuple2(model + _int, $elm$core$Platform$Cmd$none); - case 'Decrease': - var _int = msg.a; - return _Utils_Tuple2( - ((model - _int) >= 0) ? (model - _int) : model, - $elm$core$Platform$Cmd$none); - default: - return _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); - } - }); -var $author$project$Example$Dialog$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$Dialog$IsOpen(bool), - $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$Icon$update = F2( - function (msg, _v0) { - return _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$List$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$List$IsExpanded(bool), - $elm$core$Platform$Cmd$none); - }); -var $author$project$Example$Modal$update = F2( - function (msg, _v0) { - var bool = msg.a; - return _Utils_Tuple2( - $author$project$Example$Modal$IsEnabled(bool), - $elm$core$Platform$Cmd$none); - }); -var $elm$core$Set$insert = F2( - function (key, _v0) { - var dict = _v0.a; - return $elm$core$Set$Set_elm_builtin( - A3($elm$core$Dict$insert, key, _Utils_Tuple0, dict)); - }); -var $elm$core$Set$member = F2( - function (key, _v0) { - var dict = _v0.a; - return A2($elm$core$Dict$member, key, dict); - }); var $elm$core$Set$remove = F2( function (key, _v0) { var dict = _v0.a; @@ -7179,6 +6701,9 @@ var $author$project$Example$MultiSelect$update = F2( (A2($elm$core$Set$member, _int, selected) ? $elm$core$Set$remove(_int) : $elm$core$Set$insert(_int))(selected)), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$ProgressIndicator$MaybeProgress = function (a) { + return {$: 'MaybeProgress', a: a}; +}; var $author$project$Example$ProgressIndicator$update = F2( function (msg, _v0) { var maybeFloat = msg.a; @@ -7186,6 +6711,9 @@ var $author$project$Example$ProgressIndicator$update = F2( $author$project$Example$ProgressIndicator$MaybeProgress(maybeFloat), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Select$Selected = function (a) { + return {$: 'Selected', a: a}; +}; var $author$project$Example$Select$update = F2( function (msg, _v0) { var _int = msg.a; @@ -7194,6 +6722,30 @@ var $author$project$Example$Select$update = F2( $elm$core$Maybe$Just(_int)), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Sheet$IsEnabled = function (a) { + return {$: 'IsEnabled', a: a}; +}; +var $author$project$Example$Sheet$update = F2( + function (msg, _v0) { + var bool = msg.a; + return _Utils_Tuple2( + $author$project$Example$Sheet$IsEnabled(bool), + $elm$core$Platform$Cmd$none); + }); +var $author$project$Example$Snackbar$update = F2( + function (msg, model) { + if (msg.$ === 'TimePassed') { + var _int = msg.a; + return _Utils_Tuple2( + A2($author$project$Widget$Snackbar$timePassed, _int, model), + $elm$core$Platform$Cmd$none); + } else { + var snack = msg.a; + return _Utils_Tuple2( + A2($author$project$Widget$Snackbar$insert, snack, model), + $elm$core$Platform$Cmd$none); + } + }); var $elm$core$Basics$not = _Basics_not; var $author$project$Example$SortTable$update = F2( function (msg, model) { @@ -7205,6 +6757,9 @@ var $author$project$Example$SortTable$update = F2( }, $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Switch$IsButtonEnabled = function (a) { + return {$: 'IsButtonEnabled', a: a}; +}; var $author$project$Example$Switch$update = F2( function (msg, _v0) { var buttonEnabled = _v0.a; @@ -7212,6 +6767,9 @@ var $author$project$Example$Switch$update = F2( $author$project$Example$Switch$IsButtonEnabled(!buttonEnabled), $elm$core$Platform$Cmd$none); }); +var $author$project$Example$Tab$Selected = function (a) { + return {$: 'Selected', a: a}; +}; var $author$project$Example$Tab$update = F2( function (msg, _v0) { var _int = msg.a; @@ -7241,6 +6799,20 @@ var $author$project$Example$TextInput$update = F2( } }); var $author$project$Data$Example$upgradeRecord = { + appBar: { + from: function ($) { + return $.appBar; + }, + msgMapper: $author$project$Data$Example$AppBar, + subscriptionsFun: $author$project$Example$AppBar$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {appBar: a}); + }), + updateFun: $author$project$Example$AppBar$update + }, button: { from: function ($) { return $.button; @@ -7283,6 +6855,20 @@ var $author$project$Data$Example$upgradeRecord = { }), updateFun: $author$project$Example$Icon$update }, + layout: { + from: function ($) { + return $.layout; + }, + msgMapper: $author$project$Data$Example$Layout, + subscriptionsFun: $author$project$Example$Layout$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {layout: a}); + }), + updateFun: $author$project$Example$Layout$update + }, list: { from: function ($) { return $.list; @@ -7353,6 +6939,34 @@ var $author$project$Data$Example$upgradeRecord = { }), updateFun: $author$project$Example$Select$update }, + sheet: { + from: function ($) { + return $.sheet; + }, + msgMapper: $author$project$Data$Example$Sheet, + subscriptionsFun: $author$project$Example$Sheet$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {sheet: a}); + }), + updateFun: $author$project$Example$Sheet$update + }, + snackbar: { + from: function ($) { + return $.snackbar; + }, + msgMapper: $author$project$Data$Example$Snackbar, + subscriptionsFun: $author$project$Example$Snackbar$subscriptions, + to: F2( + function (model, a) { + return _Utils_update( + model, + {snackbar: a}); + }), + updateFun: $author$project$Example$Snackbar$update + }, sortTable: { from: function ($) { return $.sortTable; @@ -7410,6 +7024,695 @@ var $author$project$Data$Example$upgradeRecord = { updateFun: $author$project$Example$TextInput$update } }; +var $author$project$Data$Example$subscriptions = function (model) { + var subFun = function (_v0) { + var from = _v0.from; + var msgMapper = _v0.msgMapper; + var subscriptionsFun = _v0.subscriptionsFun; + return A2( + $elm$core$Platform$Sub$map, + msgMapper, + subscriptionsFun( + from(model))); + }; + return $elm$core$Platform$Sub$batch( + _List_fromArray( + [ + subFun($author$project$Data$Example$upgradeRecord.button), + subFun($author$project$Data$Example$upgradeRecord._switch), + subFun($author$project$Data$Example$upgradeRecord.select), + subFun($author$project$Data$Example$upgradeRecord.multiSelect), + subFun($author$project$Data$Example$upgradeRecord.tab), + subFun($author$project$Data$Example$upgradeRecord.sortTable), + subFun($author$project$Data$Example$upgradeRecord.modal), + subFun($author$project$Data$Example$upgradeRecord.dialog), + subFun($author$project$Data$Example$upgradeRecord.textInput), + subFun($author$project$Data$Example$upgradeRecord.list), + subFun($author$project$Data$Example$upgradeRecord.progressIndicator), + subFun($author$project$Data$Example$upgradeRecord.icon), + subFun($author$project$Data$Example$upgradeRecord.sheet), + subFun($author$project$Data$Example$upgradeRecord.appBar), + subFun($author$project$Data$Example$upgradeRecord.layout), + subFun($author$project$Data$Example$upgradeRecord.snackbar) + ])); +}; +var $author$project$Stateless$subscriptions = function (model) { + return A2( + $elm$core$Platform$Sub$map, + $author$project$Stateless$ExampleSpecific, + $author$project$Data$Example$subscriptions(model.example)); +}; +var $author$project$Main$subscriptions = function (model) { + return A2( + $elm$core$Platform$Sub$map, + $author$project$Main$LoadedSpecific, + $elm$core$Platform$Sub$batch( + _Utils_ap( + _List_fromArray( + [ + A2( + $elm$time$Time$every, + 50, + $elm$core$Basics$always( + $author$project$Main$TimePassed(50))), + $elm$browser$Browser$Events$onResize( + F2( + function (h, w) { + return $author$project$Main$Resized( + {height: h, width: w}); + })) + ]), + function () { + if (model.$ === 'Loading') { + return _List_Nil; + } else { + var stateless = model.a.stateless; + return $elm$core$List$singleton( + A2( + $elm$core$Platform$Sub$map, + $author$project$Main$StatelessSpecific, + $author$project$Stateless$subscriptions(stateless))); + } + }()))); +}; +var $author$project$Main$Loaded = function (a) { + return {$: 'Loaded', a: a}; +}; +var $author$project$Main$Idle = {$: 'Idle'}; +var $author$project$Data$Theme$Material = {$: 'Material'}; +var $author$project$Main$UpdateScrollingNav = function (a) { + return {$: 'UpdateScrollingNav', a: a}; +}; +var $author$project$Data$Example$AppBarExample = {$: 'AppBarExample'}; +var $author$project$Data$Example$ButtonExample = {$: 'ButtonExample'}; +var $author$project$Data$Example$DialogExample = {$: 'DialogExample'}; +var $author$project$Data$Example$IconExample = {$: 'IconExample'}; +var $author$project$Data$Example$LayoutExample = {$: 'LayoutExample'}; +var $author$project$Data$Example$ListExample = {$: 'ListExample'}; +var $author$project$Data$Example$ModalExample = {$: 'ModalExample'}; +var $author$project$Data$Example$MultiSelectExample = {$: 'MultiSelectExample'}; +var $author$project$Data$Example$ProgressIndicatorExample = {$: 'ProgressIndicatorExample'}; +var $author$project$Data$Example$SelectExample = {$: 'SelectExample'}; +var $author$project$Data$Example$SheetExample = {$: 'SheetExample'}; +var $author$project$Data$Example$SnackbarExample = {$: 'SnackbarExample'}; +var $author$project$Data$Example$SortTableExample = {$: 'SortTableExample'}; +var $author$project$Data$Example$SwitchExample = {$: 'SwitchExample'}; +var $author$project$Data$Example$TabExample = {$: 'TabExample'}; +var $author$project$Data$Example$TextInputExample = {$: 'TextInputExample'}; +var $elm$core$List$sortBy = _List_sortBy; +var $author$project$Data$Example$toString = function (example) { + switch (example.$) { + case 'ButtonExample': + return 'Button'; + case 'SwitchExample': + return 'Switch'; + case 'SelectExample': + return 'Select'; + case 'MultiSelectExample': + return 'Multi Select'; + case 'TabExample': + return 'Tab'; + case 'SortTableExample': + return 'SortTable'; + case 'ModalExample': + return 'Modal'; + case 'DialogExample': + return 'Dialog'; + case 'TextInputExample': + return 'TextInput'; + case 'ListExample': + return 'List'; + case 'ProgressIndicatorExample': + return 'Progress Indicator'; + case 'IconExample': + return 'Icon'; + case 'SheetExample': + return 'Sheet'; + case 'AppBarExample': + return 'App Bar'; + case 'LayoutExample': + return 'Layout'; + default: + return 'Snackbar'; + } +}; +var $author$project$Data$Example$asList = A2( + $elm$core$List$sortBy, + $author$project$Data$Example$toString, + _List_fromArray( + [$author$project$Data$Example$ButtonExample, $author$project$Data$Example$SwitchExample, $author$project$Data$Example$SelectExample, $author$project$Data$Example$MultiSelectExample, $author$project$Data$Example$TabExample, $author$project$Data$Example$SortTableExample, $author$project$Data$Example$ModalExample, $author$project$Data$Example$DialogExample, $author$project$Data$Example$TextInputExample, $author$project$Data$Example$ListExample, $author$project$Data$Example$ProgressIndicatorExample, $author$project$Data$Example$IconExample, $author$project$Data$Example$SheetExample, $author$project$Data$Example$AppBarExample, $author$project$Data$Example$LayoutExample, $author$project$Data$Example$SnackbarExample])); +var $turboMaCk$any_set$Set$Any$AnySet = function (a) { + return {$: 'AnySet', a: a}; +}; +var $turboMaCk$any_dict$Dict$Any$AnyDict = function (a) { + return {$: 'AnyDict', a: a}; +}; +var $turboMaCk$any_dict$Dict$Any$empty = function (toKey) { + return $turboMaCk$any_dict$Dict$Any$AnyDict( + {dict: $elm$core$Dict$empty, toKey: toKey}); +}; +var $turboMaCk$any_set$Set$Any$empty = A2($elm$core$Basics$composeL, $turboMaCk$any_set$Set$Any$AnySet, $turboMaCk$any_dict$Dict$Any$empty); +var $author$project$Data$Example$fromString = function (string) { + switch (string) { + case 'Button': + return $elm$core$Maybe$Just($author$project$Data$Example$ButtonExample); + case 'Switch': + return $elm$core$Maybe$Just($author$project$Data$Example$SwitchExample); + case 'Select': + return $elm$core$Maybe$Just($author$project$Data$Example$SelectExample); + case 'Multi Select': + return $elm$core$Maybe$Just($author$project$Data$Example$MultiSelectExample); + case 'Tab': + return $elm$core$Maybe$Just($author$project$Data$Example$TabExample); + case 'SortTable': + return $elm$core$Maybe$Just($author$project$Data$Example$SortTableExample); + case 'Modal': + return $elm$core$Maybe$Just($author$project$Data$Example$ModalExample); + case 'Dialog': + return $elm$core$Maybe$Just($author$project$Data$Example$DialogExample); + case 'TextInput': + return $elm$core$Maybe$Just($author$project$Data$Example$TextInputExample); + case 'List': + return $elm$core$Maybe$Just($author$project$Data$Example$ListExample); + case 'Progress Indicator': + return $elm$core$Maybe$Just($author$project$Data$Example$ProgressIndicatorExample); + case 'Icon': + return $elm$core$Maybe$Just($author$project$Data$Example$IconExample); + case 'Sheet': + return $elm$core$Maybe$Just($author$project$Data$Example$SheetExample); + case 'App Bar': + return $elm$core$Maybe$Just($author$project$Data$Example$AppBarExample); + case 'Layout': + return $elm$core$Maybe$Just($author$project$Data$Example$LayoutExample); + case 'Snackbar': + return $elm$core$Maybe$Just($author$project$Data$Example$SnackbarExample); + default: + return $elm$core$Maybe$Nothing; + } +}; +var $author$project$Example$AppBar$init = _Utils_Tuple2( + {isMenuBar: true, search: '', selected: 0}, + $elm$core$Platform$Cmd$none); +var $author$project$Example$Button$init = _Utils_Tuple2(0, $elm$core$Platform$Cmd$none); +var $author$project$Example$Dialog$init = _Utils_Tuple2( + $author$project$Example$Dialog$IsOpen(true), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Icon$init = _Utils_Tuple2(_Utils_Tuple0, $elm$core$Platform$Cmd$none); +var $author$project$Example$Layout$RightSheet = {$: 'RightSheet'}; +var $turboMaCk$queue$Queue$empty = A2($turboMaCk$queue$Queue$Queue, _List_Nil, _List_Nil); +var $author$project$Widget$Snackbar$init = {current: $elm$core$Maybe$Nothing, queue: $turboMaCk$queue$Queue$empty}; +var $author$project$Example$Layout$init = _Utils_Tuple2( + { + active: $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet), + searchText: '', + selected: 0, + showDialog: false, + snackbar: $author$project$Widget$Snackbar$init, + window: {height: 200, width: 400} + }, + $elm$core$Platform$Cmd$none); +var $author$project$Example$List$init = _Utils_Tuple2( + $author$project$Example$List$IsExpanded(false), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Modal$init = _Utils_Tuple2( + $author$project$Example$Modal$IsEnabled(true), + $elm$core$Platform$Cmd$none); +var $elm$core$Set$empty = $elm$core$Set$Set_elm_builtin($elm$core$Dict$empty); +var $author$project$Example$MultiSelect$init = _Utils_Tuple2( + $author$project$Example$MultiSelect$Selected($elm$core$Set$empty), + $elm$core$Platform$Cmd$none); +var $author$project$Example$ProgressIndicator$init = _Utils_Tuple2( + $author$project$Example$ProgressIndicator$MaybeProgress($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Select$init = _Utils_Tuple2( + $author$project$Example$Select$Selected($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Sheet$init = _Utils_Tuple2( + $author$project$Example$Sheet$IsEnabled(true), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Snackbar$init = _Utils_Tuple2($author$project$Widget$Snackbar$init, $elm$core$Platform$Cmd$none); +var $author$project$Example$SortTable$init = _Utils_Tuple2( + {asc: true, title: 'Name'}, + $elm$core$Platform$Cmd$none); +var $author$project$Example$Switch$init = _Utils_Tuple2( + $author$project$Example$Switch$IsButtonEnabled(false), + $elm$core$Platform$Cmd$none); +var $author$project$Example$Tab$init = _Utils_Tuple2( + $author$project$Example$Tab$Selected($elm$core$Maybe$Nothing), + $elm$core$Platform$Cmd$none); +var $author$project$Example$TextInput$init = _Utils_Tuple2( + {chipTextInput: $elm$core$Set$empty, textInput: ''}, + $elm$core$Platform$Cmd$none); +var $elm$core$Platform$Cmd$map = _Platform_map; +var $author$project$Data$Example$init = function () { + var _v0 = $author$project$Example$TextInput$init; + var textInputModel = _v0.a; + var textInputMsg = _v0.b; + var _v1 = $author$project$Example$Tab$init; + var tabModel = _v1.a; + var tabMsg = _v1.b; + var _v2 = $author$project$Example$Switch$init; + var switchModel = _v2.a; + var switchMsg = _v2.b; + var _v3 = $author$project$Example$SortTable$init; + var sortTableModel = _v3.a; + var sortTableMsg = _v3.b; + var _v4 = $author$project$Example$Snackbar$init; + var snackbarModel = _v4.a; + var snackbarMsg = _v4.b; + var _v5 = $author$project$Example$Sheet$init; + var sheetModel = _v5.a; + var sheetMsg = _v5.b; + var _v6 = $author$project$Example$Select$init; + var selectModel = _v6.a; + var selectMsg = _v6.b; + var _v7 = $author$project$Example$ProgressIndicator$init; + var progressIndicatorModel = _v7.a; + var progressIndicatorMsg = _v7.b; + var _v8 = $author$project$Example$MultiSelect$init; + var multiSelectModel = _v8.a; + var multiSelectMsg = _v8.b; + var _v9 = $author$project$Example$Modal$init; + var modalModel = _v9.a; + var modalMsg = _v9.b; + var _v10 = $author$project$Example$List$init; + var listModel = _v10.a; + var listMsg = _v10.b; + var _v11 = $author$project$Example$Layout$init; + var layoutModel = _v11.a; + var layoutMsg = _v11.b; + var _v12 = $author$project$Example$Icon$init; + var iconModel = _v12.a; + var iconMsg = _v12.b; + var _v13 = $author$project$Example$Dialog$init; + var dialogModel = _v13.a; + var dialogMsg = _v13.b; + var _v14 = $author$project$Example$Button$init; + var buttonModel = _v14.a; + var buttonMsg = _v14.b; + var _v15 = $author$project$Example$AppBar$init; + var appBarModel = _v15.a; + var appBarMsg = _v15.b; + return _Utils_Tuple2( + {appBar: appBarModel, button: buttonModel, dialog: dialogModel, icon: iconModel, layout: layoutModel, list: listModel, modal: modalModel, multiSelect: multiSelectModel, progressIndicator: progressIndicatorModel, select: selectModel, sheet: sheetModel, snackbar: snackbarModel, sortTable: sortTableModel, _switch: switchModel, tab: tabModel, textInput: textInputModel}, + $elm$core$Platform$Cmd$batch( + _List_fromArray( + [ + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Button, buttonMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Switch, switchMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Select, selectMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$MultiSelect, multiSelectMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Tab, tabMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$SortTable, sortTableMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Modal, modalMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Dialog, dialogMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$TextInput, textInputMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$List, listMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$ProgressIndicator, progressIndicatorMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Icon, iconMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Sheet, sheetMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$AppBar, appBarMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Layout, layoutMsg), + A2($elm$core$Platform$Cmd$map, $author$project$Data$Example$Snackbar, snackbarMsg) + ]))); +}(); +var $author$project$Stateless$init = function () { + var _v0 = $author$project$Data$Example$init; + var example = _v0.a; + var cmd = _v0.b; + return _Utils_Tuple2( + {carousel: 0, example: example}, + A2($elm$core$Platform$Cmd$map, $author$project$Stateless$ExampleSpecific, cmd)); +}(); +var $elm$core$Task$onError = _Scheduler_onError; +var $elm$core$Task$attempt = F2( + function (resultToMessage, task) { + return $elm$core$Task$command( + $elm$core$Task$Perform( + A2( + $elm$core$Task$onError, + A2( + $elm$core$Basics$composeL, + A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), + $elm$core$Result$Err), + A2( + $elm$core$Task$andThen, + A2( + $elm$core$Basics$composeL, + A2($elm$core$Basics$composeL, $elm$core$Task$succeed, resultToMessage), + $elm$core$Result$Ok), + task)))); + }); +var $elm_community$intdict$IntDict$Empty = {$: 'Empty'}; +var $elm_community$intdict$IntDict$empty = $elm_community$intdict$IntDict$Empty; +var $elm$browser$Browser$Dom$getElement = _Browser_getElement; +var $elm_community$intdict$IntDict$Inner = function (a) { + return {$: 'Inner', a: a}; +}; +var $elm_community$intdict$IntDict$size = function (dict) { + switch (dict.$) { + case 'Empty': + return 0; + case 'Leaf': + return 1; + default: + var i = dict.a; + return i.size; + } +}; +var $elm_community$intdict$IntDict$inner = F3( + function (p, l, r) { + var _v0 = _Utils_Tuple2(l, r); + if (_v0.a.$ === 'Empty') { + var _v1 = _v0.a; + return r; + } else { + if (_v0.b.$ === 'Empty') { + var _v2 = _v0.b; + return l; + } else { + return $elm_community$intdict$IntDict$Inner( + { + left: l, + prefix: p, + right: r, + size: $elm_community$intdict$IntDict$size(l) + $elm_community$intdict$IntDict$size(r) + }); + } + } + }); +var $elm$core$Bitwise$and = _Bitwise_and; +var $elm$core$Basics$composeR = F3( + function (f, g, x) { + return g( + f(x)); + }); +var $elm$core$Basics$neq = _Utils_notEqual; +var $elm$core$Bitwise$complement = _Bitwise_complement; +var $elm$core$Bitwise$or = _Bitwise_or; +var $elm$core$Bitwise$shiftRightZfBy = _Bitwise_shiftRightZfBy; +var $elm_community$intdict$IntDict$highestBitSet = function (n) { + var shiftOr = F2( + function (i, shift) { + return i | (i >>> shift); + }); + var n1 = A2(shiftOr, n, 1); + var n2 = A2(shiftOr, n1, 2); + var n3 = A2(shiftOr, n2, 4); + var n4 = A2(shiftOr, n3, 8); + var n5 = A2(shiftOr, n4, 16); + return n5 & (~(n5 >>> 1)); +}; +var $elm_community$intdict$IntDict$signBit = $elm_community$intdict$IntDict$highestBitSet(-1); +var $elm$core$Bitwise$xor = _Bitwise_xor; +var $elm_community$intdict$IntDict$isBranchingBitSet = function (p) { + return A2( + $elm$core$Basics$composeR, + $elm$core$Bitwise$xor($elm_community$intdict$IntDict$signBit), + A2( + $elm$core$Basics$composeR, + $elm$core$Bitwise$and(p.branchingBit), + $elm$core$Basics$neq(0))); +}; +var $elm_community$intdict$IntDict$higherBitMask = function (branchingBit) { + return branchingBit ^ (~(branchingBit - 1)); +}; +var $elm_community$intdict$IntDict$lcp = F2( + function (x, y) { + var branchingBit = $elm_community$intdict$IntDict$highestBitSet(x ^ y); + var mask = $elm_community$intdict$IntDict$higherBitMask(branchingBit); + var prefixBits = x & mask; + return {branchingBit: branchingBit, prefixBits: prefixBits}; + }); +var $elm_community$intdict$IntDict$Leaf = function (a) { + return {$: 'Leaf', a: a}; +}; +var $elm_community$intdict$IntDict$leaf = F2( + function (k, v) { + return $elm_community$intdict$IntDict$Leaf( + {key: k, value: v}); + }); +var $elm_community$intdict$IntDict$prefixMatches = F2( + function (p, n) { + return _Utils_eq( + n & $elm_community$intdict$IntDict$higherBitMask(p.branchingBit), + p.prefixBits); + }); +var $elm_community$intdict$IntDict$update = F3( + function (key, alter, dict) { + var join = F2( + function (_v2, _v3) { + var k1 = _v2.a; + var l = _v2.b; + var k2 = _v3.a; + var r = _v3.b; + var prefix = A2($elm_community$intdict$IntDict$lcp, k1, k2); + return A2($elm_community$intdict$IntDict$isBranchingBitSet, prefix, k2) ? A3($elm_community$intdict$IntDict$inner, prefix, l, r) : A3($elm_community$intdict$IntDict$inner, prefix, r, l); + }); + var alteredNode = function (mv) { + var _v1 = alter(mv); + if (_v1.$ === 'Just') { + var v = _v1.a; + return A2($elm_community$intdict$IntDict$leaf, key, v); + } else { + return $elm_community$intdict$IntDict$empty; + } + }; + switch (dict.$) { + case 'Empty': + return alteredNode($elm$core$Maybe$Nothing); + case 'Leaf': + var l = dict.a; + return _Utils_eq(l.key, key) ? alteredNode( + $elm$core$Maybe$Just(l.value)) : A2( + join, + _Utils_Tuple2( + key, + alteredNode($elm$core$Maybe$Nothing)), + _Utils_Tuple2(l.key, dict)); + default: + var i = dict.a; + return A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key) ? (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key) ? A3( + $elm_community$intdict$IntDict$inner, + i.prefix, + i.left, + A3($elm_community$intdict$IntDict$update, key, alter, i.right)) : A3( + $elm_community$intdict$IntDict$inner, + i.prefix, + A3($elm_community$intdict$IntDict$update, key, alter, i.left), + i.right)) : A2( + join, + _Utils_Tuple2( + key, + alteredNode($elm$core$Maybe$Nothing)), + _Utils_Tuple2(i.prefix.prefixBits, dict)); + } + }); +var $elm_community$intdict$IntDict$insert = F3( + function (key, value, dict) { + return A3( + $elm_community$intdict$IntDict$update, + key, + $elm$core$Basics$always( + $elm$core$Maybe$Just(value)), + dict); + }); +var $elm$core$Basics$round = _Basics_round; +var $author$project$Widget$ScrollingNav$syncPositions = function (_v0) { + var toString = _v0.toString; + var arrangement = _v0.arrangement; + var fun = F2( + function (_v1, model) { + var pos = _v1.a; + var label = _v1.b; + return _Utils_update( + model, + { + positions: A3( + $elm_community$intdict$IntDict$insert, + pos, + model.toString(label), + model.positions) + }); + }); + return A2( + $elm$core$Task$map, + F2( + function (list, m) { + return A3($elm$core$List$foldl, fun, m, list); + }), + $elm$core$Task$sequence( + A2( + $elm$core$List$map, + function (label) { + return A2( + $elm$core$Task$map, + function (x) { + return _Utils_Tuple2( + $elm$core$Basics$round(x.element.y), + label); + }, + $elm$browser$Browser$Dom$getElement( + toString(label))); + }, + arrangement))); +}; +var $author$project$Widget$ScrollingNav$init = function (_v0) { + var toString = _v0.toString; + var fromString = _v0.fromString; + var arrangement = _v0.arrangement; + var toMsg = _v0.toMsg; + return function (a) { + return _Utils_Tuple2( + a, + A2( + $elm$core$Task$attempt, + toMsg, + $author$project$Widget$ScrollingNav$syncPositions(a))); + }( + {arrangement: arrangement, fromString: fromString, positions: $elm_community$intdict$IntDict$empty, scrollPos: 0, toString: toString}); +}; +var $author$project$Main$initialModel = function (_v0) { + var viewport = _v0.viewport; + var _v1 = $author$project$Stateless$init; + var stateless = _v1.a; + var statelessCmd = _v1.b; + var _v2 = $author$project$Widget$ScrollingNav$init( + { + arrangement: $author$project$Data$Example$asList, + fromString: $author$project$Data$Example$fromString, + toMsg: function (result) { + if (result.$ === 'Ok') { + var fun = result.a; + return $author$project$Main$UpdateScrollingNav(fun); + } else { + return $author$project$Main$Idle; + } + }, + toString: $author$project$Data$Example$toString + }); + var scrollingNav = _v2.a; + var cmd = _v2.b; + return _Utils_Tuple2( + { + active: $elm$core$Maybe$Nothing, + displayDialog: false, + expanded: $turboMaCk$any_set$Set$Any$empty($author$project$Data$Example$toString), + scrollingNav: scrollingNav, + search: {current: '', raw: '', remaining: 0}, + snackbar: $author$project$Widget$Snackbar$init, + stateless: stateless, + theme: $author$project$Data$Theme$Material, + window: { + height: $elm$core$Basics$round(viewport.height), + width: $elm$core$Basics$round(viewport.width) + } + }, + $elm$core$Platform$Cmd$batch( + _List_fromArray( + [ + cmd, + A2($elm$core$Platform$Cmd$map, $author$project$Main$StatelessSpecific, statelessCmd) + ]))); +}; +var $elm$core$Tuple$mapBoth = F3( + function (funcA, funcB, _v0) { + var x = _v0.a; + var y = _v0.b; + return _Utils_Tuple2( + funcA(x), + funcB(y)); + }); +var $author$project$Main$AddSnackbar = function (a) { + return {$: 'AddSnackbar', a: a}; +}; +var $author$project$Widget$ScrollingNav$getPos = A2( + $elm$core$Task$map, + F2( + function (_int, model) { + return _Utils_update( + model, + { + scrollPos: $elm$core$Basics$round(_int.viewport.y) + }); + }), + $elm$browser$Browser$Dom$getViewport); +var $elm$browser$Browser$Dom$setViewport = _Browser_setViewport; +var $author$project$Widget$ScrollingNav$jumpTo = F2( + function (_v0, _v1) { + var section = _v0.section; + var onChange = _v0.onChange; + var toString = _v1.toString; + return A2( + $elm$core$Task$attempt, + onChange, + A2( + $elm$core$Task$andThen, + function (_v2) { + var element = _v2.element; + return A2($elm$browser$Browser$Dom$setViewport, 0, element.y); + }, + $elm$browser$Browser$Dom$getElement( + toString(section)))); + }); +var $elm$browser$Browser$Navigation$load = _Browser_load; +var $turboMaCk$any_dict$Dict$Any$insert = F3( + function (k, v, _v0) { + var inner = _v0.a; + return $turboMaCk$any_dict$Dict$Any$AnyDict( + _Utils_update( + inner, + { + dict: A3( + $elm$core$Dict$insert, + inner.toKey(k), + _Utils_Tuple2(k, v), + inner.dict) + })); + }); +var $turboMaCk$any_set$Set$Any$insert = F2( + function (a, _v0) { + var dict = _v0.a; + return $turboMaCk$any_set$Set$Any$AnySet( + A3($turboMaCk$any_dict$Dict$Any$insert, a, _Utils_Tuple0, dict)); + }); +var $turboMaCk$any_dict$Dict$Any$member = F2( + function (k, _v0) { + var dict = _v0.a.dict; + var toKey = _v0.a.toKey; + return A2( + $elm$core$Dict$member, + toKey(k), + dict); + }); +var $turboMaCk$any_set$Set$Any$member = F2( + function (a, _v0) { + var dict = _v0.a; + return A2($turboMaCk$any_dict$Dict$Any$member, a, dict); + }); +var $turboMaCk$any_dict$Dict$Any$remove = F2( + function (k, _v0) { + var inner = _v0.a; + return $turboMaCk$any_dict$Dict$Any$AnyDict( + _Utils_update( + inner, + { + dict: A2( + $elm$core$Dict$remove, + inner.toKey(k), + inner.dict) + })); + }); +var $turboMaCk$any_set$Set$Any$remove = F2( + function (a, _v0) { + var dict = _v0.a; + return $turboMaCk$any_set$Set$Any$AnySet( + A2($turboMaCk$any_dict$Dict$Any$remove, a, dict)); + }); +var $turboMaCk$any_set$Set$Any$toggle = F2( + function (a, set) { + return A2($turboMaCk$any_set$Set$Any$member, a, set) ? A2($turboMaCk$any_set$Set$Any$remove, a, set) : A2($turboMaCk$any_set$Set$Any$insert, a, set); + }); var $author$project$Data$Example$updateField = F3( function (getter, msg, model) { var _v0 = getter($author$project$Data$Example$upgradeRecord); @@ -7518,7 +7821,7 @@ var $author$project$Data$Example$update = F2( return $.progressIndicator; }, m); - default: + case 'Icon': var m = msg.a; return A2( $author$project$Data$Example$updateField, @@ -7526,6 +7829,38 @@ var $author$project$Data$Example$update = F2( return $.icon; }, m); + case 'Sheet': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.sheet; + }, + m); + case 'AppBar': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.appBar; + }, + m); + case 'Layout': + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.layout; + }, + m); + default: + var m = msg.a; + return A2( + $author$project$Data$Example$updateField, + function ($) { + return $.snackbar; + }, + m); } }()(model); }); @@ -7575,24 +7910,44 @@ var $author$project$Main$updateLoaded = F2( _Utils_update( model, { - layout: A2($author$project$Widget$Layout$timePassed, _int, model.layout), search: (search.remaining > 0) ? ((_Utils_cmp(search.remaining, _int) < 1) ? _Utils_update( search, {current: search.raw, remaining: 0}) : _Utils_update( search, - {remaining: search.remaining - _int})) : model.search + {remaining: search.remaining - _int})) : model.search, + snackbar: function () { + var _v1 = model.active; + _v1$2: + while (true) { + if (_v1.$ === 'Just') { + switch (_v1.a.$) { + case 'LeftSheet': + var _v2 = _v1.a; + return model.snackbar; + case 'RightSheet': + var _v3 = _v1.a; + return model.snackbar; + default: + break _v1$2; + } + } else { + break _v1$2; + } + } + return A2($author$project$Widget$Snackbar$timePassed, _int, model.snackbar); + }() }), A2($elm$core$Task$perform, $author$project$Main$UpdateScrollingNav, $author$project$Widget$ScrollingNav$getPos)); case 'AddSnackbar': - var _v1 = msg.a; - var string = _v1.a; - var bool = _v1.b; + var _v4 = msg.a; + var string = _v4.a; + var bool = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - layout: A2( - $author$project$Widget$Layout$queueMessage, + snackbar: A2( + $author$project$Widget$Snackbar$insert, { button: bool ? $elm$core$Maybe$Just( { @@ -7603,16 +7958,9 @@ var $author$project$Main$updateLoaded = F2( }) : $elm$core$Maybe$Nothing, text: string }, - model.layout) + model.snackbar) }), $elm$core$Platform$Cmd$none); - case 'ToggleDialog': - var bool = msg.a; - return _Utils_Tuple2( - _Utils_update( - model, - {displayDialog: bool}), - $elm$core$Platform$Cmd$none); case 'Resized': var window = msg.a; return _Utils_Tuple2( @@ -7625,9 +7973,7 @@ var $author$project$Main$updateLoaded = F2( return _Utils_Tuple2( _Utils_update( model, - { - layout: A2($author$project$Widget$Layout$activate, sidebar, model.layout) - }), + {active: sidebar}), $elm$core$Platform$Cmd$none); case 'Load': var string = msg.a; @@ -7710,86 +8056,36 @@ var $author$project$Main$update = F2( } return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); }); -var $author$project$Main$ChangedSearch = function (a) { - return {$: 'ChangedSearch', a: a}; +var $mdgriffith$elm_ui$Internal$Style$classes = {above: 'a', active: 'atv', alignBottom: 'ab', alignCenterX: 'cx', alignCenterY: 'cy', alignContainerBottom: 'acb', alignContainerCenterX: 'accx', alignContainerCenterY: 'accy', alignContainerRight: 'acr', alignLeft: 'al', alignRight: 'ar', alignTop: 'at', alignedHorizontally: 'ah', alignedVertically: 'av', any: 's', behind: 'bh', below: 'b', bold: 'w7', borderDashed: 'bd', borderDotted: 'bdt', borderNone: 'bn', borderSolid: 'bs', capturePointerEvents: 'cpe', clip: 'cp', clipX: 'cpx', clipY: 'cpy', column: 'c', container: 'ctr', contentBottom: 'cb', contentCenterX: 'ccx', contentCenterY: 'ccy', contentLeft: 'cl', contentRight: 'cr', contentTop: 'ct', cursorPointer: 'cptr', cursorText: 'ctxt', focus: 'fcs', focusedWithin: 'focus-within', fullSize: 'fs', grid: 'g', hasBehind: 'hbh', heightContent: 'hc', heightExact: 'he', heightFill: 'hf', heightFillPortion: 'hfp', hover: 'hv', imageContainer: 'ic', inFront: 'fr', inputLabel: 'lbl', inputMultiline: 'iml', inputMultilineFiller: 'imlf', inputMultilineParent: 'imlp', inputMultilineWrapper: 'implw', inputText: 'it', italic: 'i', link: 'lnk', nearby: 'nb', noTextSelection: 'notxt', onLeft: 'ol', onRight: 'or', opaque: 'oq', overflowHidden: 'oh', page: 'pg', paragraph: 'p', passPointerEvents: 'ppe', root: 'ui', row: 'r', scrollbars: 'sb', scrollbarsX: 'sbx', scrollbarsY: 'sby', seButton: 'sbt', single: 'e', sizeByCapital: 'cap', spaceEvenly: 'sev', strike: 'sk', text: 't', textCenter: 'tc', textExtraBold: 'w8', textExtraLight: 'w2', textHeavy: 'w9', textJustify: 'tj', textJustifyAll: 'tja', textLeft: 'tl', textLight: 'w3', textMedium: 'w5', textNormalWeight: 'w4', textRight: 'tr', textSemiBold: 'w6', textThin: 'w1', textUnitalicized: 'tun', transition: 'ts', transparent: 'clr', underline: 'u', widthContent: 'wc', widthExact: 'we', widthFill: 'wf', widthFillPortion: 'wfp', wrapped: 'wrp'}; +var $mdgriffith$elm_ui$Internal$Model$Attr = function (a) { + return {$: 'Attr', a: a}; }; -var $author$project$Main$ChangedSidebar = function (a) { - return {$: 'ChangedSidebar', a: a}; -}; -var $author$project$Data$Theme$DarkMaterial = {$: 'DarkMaterial'}; -var $author$project$Main$JumpTo = function (a) { - return {$: 'JumpTo', a: a}; -}; -var $author$project$Main$Load = function (a) { - return {$: 'Load', a: a}; -}; -var $author$project$Main$SetTheme = function (a) { - return {$: 'SetTheme', a: a}; -}; -var $author$project$Main$ToggleDialog = function (a) { - return {$: 'ToggleDialog', a: a}; -}; -var $elm$svg$Svg$Attributes$d = _VirtualDom_attribute('d'); -var $feathericons$elm_feather$FeatherIcons$Icon = function (a) { - return {$: 'Icon', a: a}; -}; -var $feathericons$elm_feather$FeatherIcons$defaultAttributes = function (name) { - return { - _class: $elm$core$Maybe$Just('feather feather-' + name), - size: 24, - sizeUnit: '', - strokeWidth: 2, - viewBox: '0 0 24 24' - }; -}; -var $feathericons$elm_feather$FeatherIcons$makeBuilder = F2( - function (name, src) { - return $feathericons$elm_feather$FeatherIcons$Icon( - { - attrs: $feathericons$elm_feather$FeatherIcons$defaultAttributes(name), - src: src - }); +var $elm$json$Json$Encode$string = _Json_wrap; +var $elm$html$Html$Attributes$stringProperty = F2( + function (key, string) { + return A2( + _VirtualDom_property, + key, + $elm$json$Json$Encode$string(string)); }); -var $elm$svg$Svg$trustedNode = _VirtualDom_nodeNS('http://www.w3.org/2000/svg'); -var $elm$svg$Svg$path = $elm$svg$Svg$trustedNode('path'); -var $feathericons$elm_feather$FeatherIcons$book = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'book', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M4 19.5A2.5 2.5 0 0 1 6.5 17H20') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) { - return {$: 'AlignX', a: a}; +var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); +var $mdgriffith$elm_ui$Internal$Model$htmlClass = function (cls) { + return $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$class(cls)); }; -var $mdgriffith$elm_ui$Internal$Model$Right = {$: 'Right'}; -var $mdgriffith$elm_ui$Element$alignRight = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Right); -var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'}; -var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX); -var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) { - return {$: 'AlignY', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'}; -var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY); +var $mdgriffith$elm_ui$Internal$Model$OnlyDynamic = F2( + function (a, b) { + return {$: 'OnlyDynamic', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Model$StaticRootAndDynamic = F2( + function (a, b) { + return {$: 'StaticRootAndDynamic', a: a, b: b}; + }); var $mdgriffith$elm_ui$Internal$Model$Unkeyed = function (a) { return {$: 'Unkeyed', a: a}; }; -var $mdgriffith$elm_ui$Internal$Model$AsColumn = {$: 'AsColumn'}; -var $mdgriffith$elm_ui$Internal$Model$asColumn = $mdgriffith$elm_ui$Internal$Model$AsColumn; -var $mdgriffith$elm_ui$Internal$Style$classes = {above: 'a', active: 'atv', alignBottom: 'ab', alignCenterX: 'cx', alignCenterY: 'cy', alignContainerBottom: 'acb', alignContainerCenterX: 'accx', alignContainerCenterY: 'accy', alignContainerRight: 'acr', alignLeft: 'al', alignRight: 'ar', alignTop: 'at', alignedHorizontally: 'ah', alignedVertically: 'av', any: 's', behind: 'bh', below: 'b', bold: 'w7', borderDashed: 'bd', borderDotted: 'bdt', borderNone: 'bn', borderSolid: 'bs', capturePointerEvents: 'cpe', clip: 'cp', clipX: 'cpx', clipY: 'cpy', column: 'c', container: 'ctr', contentBottom: 'cb', contentCenterX: 'ccx', contentCenterY: 'ccy', contentLeft: 'cl', contentRight: 'cr', contentTop: 'ct', cursorPointer: 'cptr', cursorText: 'ctxt', focus: 'fcs', focusedWithin: 'focus-within', fullSize: 'fs', grid: 'g', hasBehind: 'hbh', heightContent: 'hc', heightExact: 'he', heightFill: 'hf', heightFillPortion: 'hfp', hover: 'hv', imageContainer: 'ic', inFront: 'fr', inputLabel: 'lbl', inputMultiline: 'iml', inputMultilineFiller: 'imlf', inputMultilineParent: 'imlp', inputMultilineWrapper: 'implw', inputText: 'it', italic: 'i', link: 'lnk', nearby: 'nb', noTextSelection: 'notxt', onLeft: 'ol', onRight: 'or', opaque: 'oq', overflowHidden: 'oh', page: 'pg', paragraph: 'p', passPointerEvents: 'ppe', root: 'ui', row: 'r', scrollbars: 'sb', scrollbarsX: 'sbx', scrollbarsY: 'sby', seButton: 'sbt', single: 'e', sizeByCapital: 'cap', spaceEvenly: 'sev', strike: 'sk', text: 't', textCenter: 'tc', textExtraBold: 'w8', textExtraLight: 'w2', textHeavy: 'w9', textJustify: 'tj', textJustifyAll: 'tja', textLeft: 'tl', textLight: 'w3', textMedium: 'w5', textNormalWeight: 'w4', textRight: 'tr', textSemiBold: 'w6', textThin: 'w1', textUnitalicized: 'tun', transition: 'ts', transparent: 'clr', underline: 'u', widthContent: 'wc', widthExact: 'we', widthFill: 'wf', widthFillPortion: 'wfp', wrapped: 'wrp'}; +var $mdgriffith$elm_ui$Internal$Model$AsEl = {$: 'AsEl'}; +var $mdgriffith$elm_ui$Internal$Model$asEl = $mdgriffith$elm_ui$Internal$Model$AsEl; var $mdgriffith$elm_ui$Internal$Model$Generic = {$: 'Generic'}; var $mdgriffith$elm_ui$Internal$Model$div = $mdgriffith$elm_ui$Internal$Model$Generic; var $mdgriffith$elm_ui$Internal$Model$NoNearbyChildren = {$: 'NoNearbyChildren'}; @@ -7889,8 +8185,6 @@ var $mdgriffith$elm_ui$Internal$Model$addKeyedChildren = F3( inFront))); } }); -var $mdgriffith$elm_ui$Internal$Model$AsEl = {$: 'AsEl'}; -var $mdgriffith$elm_ui$Internal$Model$asEl = $mdgriffith$elm_ui$Internal$Model$AsEl; var $mdgriffith$elm_ui$Internal$Model$AsParagraph = {$: 'AsParagraph'}; var $mdgriffith$elm_ui$Internal$Model$asParagraph = $mdgriffith$elm_ui$Internal$Model$AsParagraph; var $mdgriffith$elm_ui$Internal$Flag$Flag = function (a) { @@ -7907,15 +8201,6 @@ var $mdgriffith$elm_ui$Internal$Flag$alignBottom = $mdgriffith$elm_ui$Internal$F var $mdgriffith$elm_ui$Internal$Flag$alignRight = $mdgriffith$elm_ui$Internal$Flag$flag(40); var $mdgriffith$elm_ui$Internal$Flag$centerX = $mdgriffith$elm_ui$Internal$Flag$flag(42); var $mdgriffith$elm_ui$Internal$Flag$centerY = $mdgriffith$elm_ui$Internal$Flag$flag(43); -var $elm$json$Json$Encode$string = _Json_wrap; -var $elm$html$Html$Attributes$stringProperty = F2( - function (key, string) { - return A2( - _VirtualDom_property, - key, - $elm$json$Json$Encode$string(string)); - }); -var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); var $elm$html$Html$div = _VirtualDom_node('div'); var $mdgriffith$elm_ui$Internal$Model$lengthClassName = function (x) { switch (x.$) { @@ -8601,13 +8886,32 @@ var $mdgriffith$elm_ui$Internal$Style$baseSheet = _List_fromArray( [ A2($mdgriffith$elm_ui$Internal$Style$Prop, 'display', 'block'), A2( - $mdgriffith$elm_ui$Internal$Style$Child, - 'img', + $mdgriffith$elm_ui$Internal$Style$Descriptor, + $mdgriffith$elm_ui$Internal$Style$dot($mdgriffith$elm_ui$Internal$Style$classes.heightFill), _List_fromArray( [ - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-height', '100%'), - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-width', '100%'), - A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + A2( + $mdgriffith$elm_ui$Internal$Style$Child, + 'img', + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-height', '100%'), + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + ])) + ])), + A2( + $mdgriffith$elm_ui$Internal$Style$Descriptor, + $mdgriffith$elm_ui$Internal$Style$dot($mdgriffith$elm_ui$Internal$Style$classes.widthFill), + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Internal$Style$Child, + 'img', + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'max-width', '100%'), + A2($mdgriffith$elm_ui$Internal$Style$Prop, 'object-fit', 'cover') + ])) ])) ])), A2( @@ -13153,814 +13457,12 @@ var $mdgriffith$elm_ui$Internal$Model$element = F4( $mdgriffith$elm_ui$Internal$Model$NoNearbyChildren, $elm$core$List$reverse(attributes))); }); -var $mdgriffith$elm_ui$Internal$Model$Height = function (a) { - return {$: 'Height', a: a}; -}; -var $mdgriffith$elm_ui$Element$height = $mdgriffith$elm_ui$Internal$Model$Height; -var $mdgriffith$elm_ui$Internal$Model$Attr = function (a) { - return {$: 'Attr', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$htmlClass = function (cls) { - return $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$class(cls)); -}; -var $mdgriffith$elm_ui$Internal$Model$Content = {$: 'Content'}; -var $mdgriffith$elm_ui$Element$shrink = $mdgriffith$elm_ui$Internal$Model$Content; -var $mdgriffith$elm_ui$Internal$Model$Width = function (a) { - return {$: 'Width', a: a}; -}; -var $mdgriffith$elm_ui$Element$width = $mdgriffith$elm_ui$Internal$Model$Width; -var $mdgriffith$elm_ui$Element$column = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asColumn, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentTop + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentLeft)), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Element$el = F2( - function (attrs, child) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asEl, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - attrs)), - $mdgriffith$elm_ui$Internal$Model$Unkeyed( - _List_fromArray( - [child]))); - }); -var $mdgriffith$elm_ui$Internal$Model$Class = F2( - function (a, b) { - return {$: 'Class', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Flag$overflow = $mdgriffith$elm_ui$Internal$Flag$flag(20); -var $mdgriffith$elm_ui$Element$clip = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$overflow, $mdgriffith$elm_ui$Internal$Style$classes.clip); -var $mdgriffith$elm_ui$Internal$Model$Colored = F3( - function (a, b, c) { - return {$: 'Colored', a: a, b: b, c: c}; - }); -var $mdgriffith$elm_ui$Internal$Model$StyleClass = F2( - function (a, b) { - return {$: 'StyleClass', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Flag$bgColor = $mdgriffith$elm_ui$Internal$Flag$flag(8); -var $mdgriffith$elm_ui$Internal$Model$formatColorClass = function (_v0) { - var red = _v0.a; - var green = _v0.b; - var blue = _v0.c; - var alpha = _v0.d; - return $mdgriffith$elm_ui$Internal$Model$floatClass(red) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(green) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(blue) + ('-' + $mdgriffith$elm_ui$Internal$Model$floatClass(alpha)))))); -}; -var $mdgriffith$elm_ui$Element$Background$color = function (clr) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$bgColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'bg-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), - 'background-color', - clr)); -}; -var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) { - return {$: 'Fill', a: a}; -}; -var $mdgriffith$elm_ui$Element$fill = $mdgriffith$elm_ui$Internal$Model$Fill(1); -var $mdgriffith$elm_ui$Internal$Model$InFront = {$: 'InFront'}; -var $mdgriffith$elm_ui$Internal$Model$Nearby = F2( - function (a, b) { - return {$: 'Nearby', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$NoAttribute = {$: 'NoAttribute'}; -var $mdgriffith$elm_ui$Element$createNearby = F2( - function (loc, element) { - if (element.$ === 'Empty') { - return $mdgriffith$elm_ui$Internal$Model$NoAttribute; - } else { - return A2($mdgriffith$elm_ui$Internal$Model$Nearby, loc, element); - } - }); -var $mdgriffith$elm_ui$Element$inFront = function (element) { - return A2($mdgriffith$elm_ui$Element$createNearby, $mdgriffith$elm_ui$Internal$Model$InFront, element); -}; -var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'}; -var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty; -var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 'Normal', a: a}; -}; -var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; -var $elm$html$Html$Events$on = F2( - function (event, decoder) { - return A2( - $elm$virtual_dom$VirtualDom$on, - event, - $elm$virtual_dom$VirtualDom$Normal(decoder)); - }); -var $elm$html$Html$Events$onClick = function (msg) { - return A2( - $elm$html$Html$Events$on, - 'click', - $elm$json$Json$Decode$succeed(msg)); -}; -var $mdgriffith$elm_ui$Element$Events$onClick = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Attr, $elm$html$Html$Events$onClick); +var $mdgriffith$elm_ui$Internal$Model$AllowHover = {$: 'AllowHover'}; +var $mdgriffith$elm_ui$Internal$Model$Layout = {$: 'Layout'}; var $mdgriffith$elm_ui$Internal$Model$Rgba = F4( function (a, b, c, d) { return {$: 'Rgba', a: a, b: b, c: c, d: d}; }); -var $mdgriffith$elm_ui$Element$rgba255 = F4( - function (red, green, blue, a) { - return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, a); - }); -var $elm$core$List$singleton = function (value) { - return _List_fromArray( - [value]); -}; -var $author$project$Internal$Dialog$modal = function (_v0) { - var onDismiss = _v0.onDismiss; - var content = _v0.content; - return _List_fromArray( - [ - $mdgriffith$elm_ui$Element$inFront( - A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$Background$color( - A4($mdgriffith$elm_ui$Element$rgba255, 0, 0, 0, 0.5)) - ]), - A2( - $elm$core$Maybe$withDefault, - _List_Nil, - A2( - $elm$core$Maybe$map, - A2($elm$core$Basics$composeR, $mdgriffith$elm_ui$Element$Events$onClick, $elm$core$List$singleton), - onDismiss))), - $mdgriffith$elm_ui$Element$none)), - $mdgriffith$elm_ui$Element$inFront(content), - $mdgriffith$elm_ui$Element$clip - ]); -}; -var $mdgriffith$elm_ui$Internal$Model$Describe = function (a) { - return {$: 'Describe', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Model$Paragraph = {$: 'Paragraph'}; -var $mdgriffith$elm_ui$Internal$Model$SpacingStyle = F3( - function (a, b, c) { - return {$: 'SpacingStyle', a: a, b: b, c: c}; - }); -var $mdgriffith$elm_ui$Internal$Flag$spacing = $mdgriffith$elm_ui$Internal$Flag$flag(3); -var $mdgriffith$elm_ui$Internal$Model$spacingName = F2( - function (x, y) { - return 'spacing-' + ($elm$core$String$fromInt(x) + ('-' + $elm$core$String$fromInt(y))); - }); -var $mdgriffith$elm_ui$Element$spacing = function (x) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$spacing, - A3( - $mdgriffith$elm_ui$Internal$Model$SpacingStyle, - A2($mdgriffith$elm_ui$Internal$Model$spacingName, x, x), - x, - x)); -}; -var $mdgriffith$elm_ui$Element$paragraph = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asParagraph, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Paragraph), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$spacing(5), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Internal$Model$AsRow = {$: 'AsRow'}; -var $mdgriffith$elm_ui$Internal$Model$asRow = $mdgriffith$elm_ui$Internal$Model$AsRow; -var $mdgriffith$elm_ui$Element$row = F2( - function (attrs, children) { - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asRow, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentLeft + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentCenterY)), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - attrs))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); - }); -var $mdgriffith$elm_ui$Internal$Model$Text = function (a) { - return {$: 'Text', a: a}; -}; -var $mdgriffith$elm_ui$Element$text = function (content) { - return $mdgriffith$elm_ui$Internal$Model$Text(content); -}; -var $mdgriffith$elm_ui$Internal$Model$Button = {$: 'Button'}; -var $elm$json$Json$Encode$bool = _Json_wrap; -var $elm$html$Html$Attributes$boolProperty = F2( - function (key, bool) { - return A2( - _VirtualDom_property, - key, - $elm$json$Json$Encode$bool(bool)); - }); -var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); -var $mdgriffith$elm_ui$Element$Input$hasFocusStyle = function (attr) { - if (((attr.$ === 'StyleClass') && (attr.b.$ === 'PseudoSelector')) && (attr.b.a.$ === 'Focus')) { - var _v1 = attr.b; - var _v2 = _v1.a; - return true; - } else { - return false; - } -}; -var $mdgriffith$elm_ui$Element$Input$focusDefault = function (attrs) { - return A2($elm$core$List$any, $mdgriffith$elm_ui$Element$Input$hasFocusStyle, attrs) ? $mdgriffith$elm_ui$Internal$Model$NoAttribute : $mdgriffith$elm_ui$Internal$Model$htmlClass('focusable'); -}; -var $mdgriffith$elm_ui$Element$Input$enter = 'Enter'; -var $elm$json$Json$Decode$andThen = _Json_andThen; -var $elm$json$Json$Decode$fail = _Json_fail; -var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 'MayPreventDefault', a: a}; -}; -var $elm$html$Html$Events$preventDefaultOn = F2( - function (event, decoder) { - return A2( - $elm$virtual_dom$VirtualDom$on, - event, - $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); - }); -var $elm$json$Json$Decode$string = _Json_decodeString; -var $mdgriffith$elm_ui$Element$Input$onKey = F2( - function (desiredCode, msg) { - var decode = function (code) { - return _Utils_eq(code, desiredCode) ? $elm$json$Json$Decode$succeed(msg) : $elm$json$Json$Decode$fail('Not the enter key'); - }; - var isKey = A2( - $elm$json$Json$Decode$andThen, - decode, - A2($elm$json$Json$Decode$field, 'key', $elm$json$Json$Decode$string)); - return $mdgriffith$elm_ui$Internal$Model$Attr( - A2( - $elm$html$Html$Events$preventDefaultOn, - 'keyup', - A2( - $elm$json$Json$Decode$map, - function (fired) { - return _Utils_Tuple2(fired, true); - }, - isKey))); - }); -var $mdgriffith$elm_ui$Element$Input$onEnter = function (msg) { - return A2($mdgriffith$elm_ui$Element$Input$onKey, $mdgriffith$elm_ui$Element$Input$enter, msg); -}; -var $mdgriffith$elm_ui$Internal$Flag$cursor = $mdgriffith$elm_ui$Internal$Flag$flag(21); -var $mdgriffith$elm_ui$Element$pointer = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$cursor, $mdgriffith$elm_ui$Internal$Style$classes.cursorPointer); -var $elm$html$Html$Attributes$tabindex = function (n) { - return A2( - _VirtualDom_attribute, - 'tabIndex', - $elm$core$String$fromInt(n)); -}; -var $mdgriffith$elm_ui$Element$Input$button = F2( - function (attrs, _v0) { - var onPress = _v0.onPress; - var label = _v0.label; - return A4( - $mdgriffith$elm_ui$Internal$Model$element, - $mdgriffith$elm_ui$Internal$Model$asEl, - $mdgriffith$elm_ui$Internal$Model$div, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentCenterX + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.contentCenterY + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.seButton + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.noTextSelection)))))), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$pointer, - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Input$focusDefault(attrs), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Button), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$tabindex(0)), - function () { - if (onPress.$ === 'Nothing') { - return A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Internal$Model$Attr( - $elm$html$Html$Attributes$disabled(true)), - attrs); - } else { - var msg = onPress.a; - return A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Events$onClick(msg), - A2( - $elm$core$List$cons, - $mdgriffith$elm_ui$Element$Input$onEnter(msg), - attrs)); - } - }()))))))), - $mdgriffith$elm_ui$Internal$Model$Unkeyed( - _List_fromArray( - [label]))); - }); -var $author$project$Internal$Button$button = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - var icon = _v0.icon; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), - { - label: A2( - $mdgriffith$elm_ui$Element$row, - style.content.elementRow, - _List_fromArray( - [ - icon( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise), - A2( - $mdgriffith$elm_ui$Element$el, - style.content.content.text.contentText, - $mdgriffith$elm_ui$Element$text(text)) - ])), - onPress: onPress - }); - }); -var $author$project$Internal$Button$textButton = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - return A2( - $author$project$Internal$Button$button, - style, - { - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - onPress: onPress, - text: text - }); - }); -var $author$project$Internal$Dialog$dialog = F2( - function (style, _v0) { - var title = _v0.title; - var text = _v0.text; - var accept = _v0.accept; - var dismiss = _v0.dismiss; - return $author$project$Internal$Dialog$modal( - { - content: A2( - $mdgriffith$elm_ui$Element$column, - _Utils_ap( - _List_fromArray( - [$mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY]), - style.elementColumn), - _List_fromArray( - [ - A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - $mdgriffith$elm_ui$Element$text, - $mdgriffith$elm_ui$Element$el(style.content.title.contentText)), - title)), - A2( - $mdgriffith$elm_ui$Element$paragraph, - style.content.text.contentText, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text(text))), - A2( - $mdgriffith$elm_ui$Element$row, - _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$alignRight, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) - ]), - style.content.buttons.elementRow), - function () { - var _v1 = _Utils_Tuple2(accept, dismiss); - if (_v1.a.$ === 'Just') { - if (_v1.b.$ === 'Nothing') { - var acceptButton = _v1.a.a; - var _v2 = _v1.b; - return $elm$core$List$singleton( - A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton)); - } else { - var acceptButton = _v1.a.a; - var dismissButton = _v1.b.a; - return _List_fromArray( - [ - A2($author$project$Internal$Button$textButton, style.content.buttons.content.dismiss, dismissButton), - A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton) - ]); - } - } else { - return _List_Nil; - } - }()) - ])), - onDismiss: function () { - var _v3 = _Utils_Tuple2(accept, dismiss); - if (_v3.a.$ === 'Nothing') { - if (_v3.b.$ === 'Nothing') { - var _v4 = _v3.a; - var _v5 = _v3.b; - return $elm$core$Maybe$Nothing; - } else { - var _v6 = _v3.a; - var onPress = _v3.b.a.onPress; - return onPress; - } - } else { - return $elm$core$Maybe$Nothing; - } - }() - }); - }); -var $author$project$Widget$dialog = function () { - var fun = $author$project$Internal$Dialog$dialog; - return fun; -}(); -var $elm$svg$Svg$Attributes$height = _VirtualDom_attribute('height'); -var $mdgriffith$elm_ui$Internal$Model$unstyled = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Unstyled, $elm$core$Basics$always); -var $mdgriffith$elm_ui$Element$html = $mdgriffith$elm_ui$Internal$Model$unstyled; -var $elm$svg$Svg$Attributes$stroke = _VirtualDom_attribute('stroke'); -var $avh4$elm_color$Color$toCssString = function (_v0) { - var r = _v0.a; - var g = _v0.b; - var b = _v0.c; - var a = _v0.d; - var roundTo = function (x) { - return $elm$core$Basics$round(x * 1000) / 1000; - }; - var pct = function (x) { - return $elm$core$Basics$round(x * 10000) / 100; - }; - return $elm$core$String$concat( - _List_fromArray( - [ - 'rgba(', - $elm$core$String$fromFloat( - pct(r)), - '%,', - $elm$core$String$fromFloat( - pct(g)), - '%,', - $elm$core$String$fromFloat( - pct(b)), - '%,', - $elm$core$String$fromFloat( - roundTo(a)), - ')' - ])); -}; -var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); -var $author$project$Widget$Icon$elmFeather = F2( - function (fun, icon) { - return function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_Nil, - $mdgriffith$elm_ui$Element$html( - A2( - fun, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$width( - $elm$core$String$fromInt(size)), - $elm$svg$Svg$Attributes$height( - $elm$core$String$fromInt(size)), - $elm$svg$Svg$Attributes$stroke( - $avh4$elm_color$Color$toCssString(color)) - ]), - icon))); - }; - }); -var $elm$core$Array$fromListHelp = F3( - function (list, nodeList, nodeListSize) { - fromListHelp: - while (true) { - var _v0 = A2($elm$core$Elm$JsArray$initializeFromList, $elm$core$Array$branchFactor, list); - var jsArray = _v0.a; - var remainingItems = _v0.b; - if (_Utils_cmp( - $elm$core$Elm$JsArray$length(jsArray), - $elm$core$Array$branchFactor) < 0) { - return A2( - $elm$core$Array$builderToArray, - true, - {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); - } else { - var $temp$list = remainingItems, - $temp$nodeList = A2( - $elm$core$List$cons, - $elm$core$Array$Leaf(jsArray), - nodeList), - $temp$nodeListSize = nodeListSize + 1; - list = $temp$list; - nodeList = $temp$nodeList; - nodeListSize = $temp$nodeListSize; - continue fromListHelp; - } - } - }); -var $elm$core$Array$fromList = function (list) { - if (!list.b) { - return $elm$core$Array$empty; - } else { - return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); - } -}; -var $elm$core$Array$bitMask = 4294967295 >>> (32 - $elm$core$Array$shiftStep); -var $elm$core$Elm$JsArray$unsafeGet = _JsArray_unsafeGet; -var $elm$core$Array$getHelp = F3( - function (shift, index, tree) { - getHelp: - while (true) { - var pos = $elm$core$Array$bitMask & (index >>> shift); - var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { - var subTree = _v0.a; - var $temp$shift = shift - $elm$core$Array$shiftStep, - $temp$index = index, - $temp$tree = subTree; - shift = $temp$shift; - index = $temp$index; - tree = $temp$tree; - continue getHelp; - } else { - var values = _v0.a; - return A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, values); - } - } - }); -var $elm$core$Array$tailIndex = function (len) { - return (len >>> 5) << 5; -}; -var $elm$core$Array$get = F2( - function (index, _v0) { - var len = _v0.a; - var startShift = _v0.b; - var tree = _v0.c; - var tail = _v0.d; - return ((index < 0) || (_Utils_cmp(index, len) > -1)) ? $elm$core$Maybe$Nothing : ((_Utils_cmp( - index, - $elm$core$Array$tailIndex(len)) > -1) ? $elm$core$Maybe$Just( - A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, tail)) : $elm$core$Maybe$Just( - A3($elm$core$Array$getHelp, startShift, index, tree))); - }); -var $feathericons$elm_feather$FeatherIcons$github = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'github', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Internal$Model$Left = {$: 'Left'}; -var $mdgriffith$elm_ui$Element$alignLeft = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Left); -var $mdgriffith$elm_ui$Internal$Flag$fontWeight = $mdgriffith$elm_ui$Internal$Flag$flag(13); -var $mdgriffith$elm_ui$Element$Font$bold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.bold); -var $elm$core$Basics$clamp = F3( - function (low, high, number) { - return (_Utils_cmp(number, low) < 0) ? low : ((_Utils_cmp(number, high) > 0) ? high : number); - }); -var $mdgriffith$elm_ui$Internal$Model$Heading = function (a) { - return {$: 'Heading', a: a}; -}; -var $mdgriffith$elm_ui$Element$Region$heading = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Heading); -var $mdgriffith$elm_ui$Internal$Model$PaddingStyle = F5( - function (a, b, c, d, e) { - return {$: 'PaddingStyle', a: a, b: b, c: c, d: d, e: e}; - }); -var $mdgriffith$elm_ui$Internal$Flag$padding = $mdgriffith$elm_ui$Internal$Flag$flag(2); -var $mdgriffith$elm_ui$Internal$Model$paddingName = F4( - function (top, right, bottom, left) { - return 'pad-' + ($elm$core$String$fromInt(top) + ('-' + ($elm$core$String$fromInt(right) + ('-' + ($elm$core$String$fromInt(bottom) + ('-' + $elm$core$String$fromInt(left))))))); - }); -var $mdgriffith$elm_ui$Element$paddingEach = function (_v0) { - var top = _v0.top; - var right = _v0.right; - var bottom = _v0.bottom; - var left = _v0.left; - if (_Utils_eq(top, right) && (_Utils_eq(top, bottom) && _Utils_eq(top, left))) { - var topFloat = top; - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$padding, - A5( - $mdgriffith$elm_ui$Internal$Model$PaddingStyle, - 'p-' + $elm$core$String$fromInt(top), - topFloat, - topFloat, - topFloat, - topFloat)); - } else { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$padding, - A5( - $mdgriffith$elm_ui$Internal$Model$PaddingStyle, - A4($mdgriffith$elm_ui$Internal$Model$paddingName, top, right, bottom, left), - top, - right, - bottom, - left)); - } -}; -var $mdgriffith$elm_ui$Internal$Model$FontSize = function (a) { - return {$: 'FontSize', a: a}; -}; -var $mdgriffith$elm_ui$Internal$Flag$fontSize = $mdgriffith$elm_ui$Internal$Flag$flag(4); -var $mdgriffith$elm_ui$Element$Font$size = function (i) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontSize, - $mdgriffith$elm_ui$Internal$Model$FontSize(i)); -}; -var $Orasund$elm_ui_framework$Framework$Heading$h = function (inputLevel) { - var level = A3($elm$core$Basics$clamp, 1, 6, inputLevel); - var size = (level === 6) ? 14 : (32 - ((level - 1) * 4)); - return _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Region$heading(level), - $mdgriffith$elm_ui$Element$Font$size(size), - $mdgriffith$elm_ui$Element$paddingEach( - {bottom: 2, left: 0, right: 0, top: 2}), - $mdgriffith$elm_ui$Element$alignLeft, - $mdgriffith$elm_ui$Element$Font$bold - ]); -}; -var $Orasund$elm_ui_framework$Framework$Heading$h1 = $Orasund$elm_ui_framework$Framework$Heading$h(1); -var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; -var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; -var $elm$svg$Svg$circle = $elm$svg$Svg$trustedNode('circle'); -var $elm$svg$Svg$Attributes$cx = _VirtualDom_attribute('cx'); -var $elm$svg$Svg$Attributes$cy = _VirtualDom_attribute('cy'); -var $elm$svg$Svg$Attributes$r = _VirtualDom_attribute('r'); -var $feathericons$elm_feather$FeatherIcons$penTool = A2( - $feathericons$elm_feather$FeatherIcons$makeBuilder, - 'pen-tool', - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M12 19l7-7 3 3-7 7-3-3z') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z') - ]), - _List_Nil), - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M2 2l7.586 7.586') - ]), - _List_Nil), - A2( - $elm$svg$Svg$circle, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$cx('11'), - $elm$svg$Svg$Attributes$cy('11'), - $elm$svg$Svg$Attributes$r('2') - ]), - _List_Nil) - ])); -var $mdgriffith$elm_ui$Element$Input$Placeholder = F2( - function (a, b) { - return {$: 'Placeholder', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Element$Input$placeholder = $mdgriffith$elm_ui$Element$Input$Placeholder; -var $elm$html$Html$Attributes$attribute = $elm$virtual_dom$VirtualDom$attribute; -var $mdgriffith$elm_ui$Internal$Flag$fontColor = $mdgriffith$elm_ui$Internal$Flag$flag(14); -var $mdgriffith$elm_ui$Element$Font$color = function (fontColor) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'fc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(fontColor), - 'color', - fontColor)); -}; -var $mdgriffith$elm_ui$Element$rgb255 = F3( - function (red, green, blue) { - return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, 1); - }); -var $Orasund$elm_ui_framework$Framework$Color$darkerGrey = A3($mdgriffith$elm_ui$Element$rgb255, 18, 18, 18); -var $mdgriffith$elm_ui$Internal$Flag$borderColor = $mdgriffith$elm_ui$Internal$Flag$flag(28); -var $mdgriffith$elm_ui$Element$Border$color = function (clr) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$borderColor, - A3( - $mdgriffith$elm_ui$Internal$Model$Colored, - 'bc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), - 'border-color', - clr)); -}; -var $Orasund$elm_ui_framework$Framework$Color$lighterGrey = A3($mdgriffith$elm_ui$Element$rgb255, 245, 245, 245); -var $Orasund$elm_ui_framework$Framework$Color$light = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey), - $mdgriffith$elm_ui$Element$Border$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey) - ]); -var $Orasund$elm_ui_framework$Framework$layoutAttributes = _Utils_ap( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$size(16), - $mdgriffith$elm_ui$Element$Font$color($Orasund$elm_ui_framework$Framework$Color$darkerGrey) - ]), - $Orasund$elm_ui_framework$Framework$Color$light); -var $mdgriffith$elm_ui$Internal$Model$FocusStyleOption = function (a) { - return {$: 'FocusStyleOption', a: a}; -}; -var $mdgriffith$elm_ui$Element$focusStyle = $mdgriffith$elm_ui$Internal$Model$FocusStyleOption; -var $Orasund$elm_ui_framework$Framework$Color$turquoise = A3($mdgriffith$elm_ui$Element$rgb255, 0, 209, 178); -var $Orasund$elm_ui_framework$Framework$layoutOptions = $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$focusStyle( - { - backgroundColor: $elm$core$Maybe$Nothing, - borderColor: $elm$core$Maybe$Just($Orasund$elm_ui_framework$Framework$Color$turquoise), - shadow: $elm$core$Maybe$Just( - { - blur: 10, - color: $Orasund$elm_ui_framework$Framework$Color$turquoise, - offset: _Utils_Tuple2(0, 0), - size: 1 - }) - })); -var $mdgriffith$elm_ui$Internal$Model$OnlyDynamic = F2( - function (a, b) { - return {$: 'OnlyDynamic', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$StaticRootAndDynamic = F2( - function (a, b) { - return {$: 'StaticRootAndDynamic', a: a, b: b}; - }); -var $mdgriffith$elm_ui$Internal$Model$AllowHover = {$: 'AllowHover'}; -var $mdgriffith$elm_ui$Internal$Model$Layout = {$: 'Layout'}; var $mdgriffith$elm_ui$Internal$Model$focusDefaultStyle = { backgroundColor: $elm$core$Maybe$Nothing, borderColor: $elm$core$Maybe$Nothing, @@ -14095,15 +13597,36 @@ var $mdgriffith$elm_ui$Internal$Model$renderRoot = F3( _List_fromArray( [child])))); }); +var $mdgriffith$elm_ui$Internal$Model$Colored = F3( + function (a, b, c) { + return {$: 'Colored', a: a, b: b, c: c}; + }); var $mdgriffith$elm_ui$Internal$Model$FontFamily = F2( function (a, b) { return {$: 'FontFamily', a: a, b: b}; }); +var $mdgriffith$elm_ui$Internal$Model$FontSize = function (a) { + return {$: 'FontSize', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$SansSerif = {$: 'SansSerif'}; +var $mdgriffith$elm_ui$Internal$Model$StyleClass = F2( + function (a, b) { + return {$: 'StyleClass', a: a, b: b}; + }); var $mdgriffith$elm_ui$Internal$Model$Typeface = function (a) { return {$: 'Typeface', a: a}; }; +var $mdgriffith$elm_ui$Internal$Flag$bgColor = $mdgriffith$elm_ui$Internal$Flag$flag(8); +var $mdgriffith$elm_ui$Internal$Flag$fontColor = $mdgriffith$elm_ui$Internal$Flag$flag(14); var $mdgriffith$elm_ui$Internal$Flag$fontFamily = $mdgriffith$elm_ui$Internal$Flag$flag(5); +var $mdgriffith$elm_ui$Internal$Flag$fontSize = $mdgriffith$elm_ui$Internal$Flag$flag(4); +var $mdgriffith$elm_ui$Internal$Model$formatColorClass = function (_v0) { + var red = _v0.a; + var green = _v0.b; + var blue = _v0.c; + var alpha = _v0.d; + return $mdgriffith$elm_ui$Internal$Model$floatClass(red) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(green) + ('-' + ($mdgriffith$elm_ui$Internal$Model$floatClass(blue) + ('-' + $mdgriffith$elm_ui$Internal$Model$floatClass(alpha)))))); +}; var $elm$core$String$toLower = _String_toLower; var $elm$core$String$words = _String_words; var $mdgriffith$elm_ui$Internal$Model$renderFontClassName = F2( @@ -14201,6 +13724,86 @@ var $mdgriffith$elm_ui$Element$layoutWith = F3( _Utils_ap($mdgriffith$elm_ui$Internal$Model$rootStyle, attrs)), child); }); +var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith( + {options: _List_Nil}); +var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; +var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; +var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'}; +var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty; +var $elm$html$Html$Attributes$attribute = $elm$virtual_dom$VirtualDom$attribute; +var $mdgriffith$elm_ui$Element$Font$color = function (fontColor) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'fc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(fontColor), + 'color', + fontColor)); +}; +var $mdgriffith$elm_ui$Element$rgb255 = F3( + function (red, green, blue) { + return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, 1); + }); +var $Orasund$elm_ui_framework$Framework$Color$darkerGrey = A3($mdgriffith$elm_ui$Element$rgb255, 18, 18, 18); +var $mdgriffith$elm_ui$Element$Background$color = function (clr) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$bgColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'bg-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), + 'background-color', + clr)); +}; +var $mdgriffith$elm_ui$Internal$Flag$borderColor = $mdgriffith$elm_ui$Internal$Flag$flag(28); +var $mdgriffith$elm_ui$Element$Border$color = function (clr) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$borderColor, + A3( + $mdgriffith$elm_ui$Internal$Model$Colored, + 'bc-' + $mdgriffith$elm_ui$Internal$Model$formatColorClass(clr), + 'border-color', + clr)); +}; +var $Orasund$elm_ui_framework$Framework$Color$lighterGrey = A3($mdgriffith$elm_ui$Element$rgb255, 245, 245, 245); +var $Orasund$elm_ui_framework$Framework$Color$light = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey), + $mdgriffith$elm_ui$Element$Border$color($Orasund$elm_ui_framework$Framework$Color$lighterGrey) + ]); +var $mdgriffith$elm_ui$Element$Font$size = function (i) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontSize, + $mdgriffith$elm_ui$Internal$Model$FontSize(i)); +}; +var $Orasund$elm_ui_framework$Framework$layoutAttributes = _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$size(16), + $mdgriffith$elm_ui$Element$Font$color($Orasund$elm_ui_framework$Framework$Color$darkerGrey) + ]), + $Orasund$elm_ui_framework$Framework$Color$light); +var $mdgriffith$elm_ui$Internal$Model$FocusStyleOption = function (a) { + return {$: 'FocusStyleOption', a: a}; +}; +var $mdgriffith$elm_ui$Element$focusStyle = $mdgriffith$elm_ui$Internal$Model$FocusStyleOption; +var $Orasund$elm_ui_framework$Framework$Color$turquoise = A3($mdgriffith$elm_ui$Element$rgb255, 0, 209, 178); +var $Orasund$elm_ui_framework$Framework$layoutOptions = $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$focusStyle( + { + backgroundColor: $elm$core$Maybe$Nothing, + borderColor: $elm$core$Maybe$Just($Orasund$elm_ui_framework$Framework$Color$turquoise), + shadow: $elm$core$Maybe$Just( + { + blur: 10, + color: $Orasund$elm_ui_framework$Framework$Color$turquoise, + offset: _Utils_Tuple2(0, 0), + size: 1 + }) + })); var $Orasund$elm_ui_framework$Framework$layout = function (attributes) { return A2( $mdgriffith$elm_ui$Element$layoutWith, @@ -14227,236 +13830,6 @@ var $Orasund$elm_ui_framework$Framework$responsiveLayout = F2( A2($Orasund$elm_ui_framework$Framework$layout, attributes, view) ])); }); -var $elm$svg$Svg$Attributes$class = _VirtualDom_attribute('class'); -var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); -var $elm$svg$Svg$map = $elm$virtual_dom$VirtualDom$map; -var $elm$svg$Svg$Attributes$strokeLinecap = _VirtualDom_attribute('stroke-linecap'); -var $elm$svg$Svg$Attributes$strokeLinejoin = _VirtualDom_attribute('stroke-linejoin'); -var $elm$svg$Svg$Attributes$strokeWidth = _VirtualDom_attribute('stroke-width'); -var $elm$svg$Svg$svg = $elm$svg$Svg$trustedNode('svg'); -var $elm$svg$Svg$Attributes$viewBox = _VirtualDom_attribute('viewBox'); -var $feathericons$elm_feather$FeatherIcons$toHtml = F2( - function (attributes, _v0) { - var src = _v0.a.src; - var attrs = _v0.a.attrs; - var strSize = $elm$core$String$fromFloat(attrs.size); - var baseAttributes = _List_fromArray( - [ - $elm$svg$Svg$Attributes$fill('none'), - $elm$svg$Svg$Attributes$height( - _Utils_ap(strSize, attrs.sizeUnit)), - $elm$svg$Svg$Attributes$width( - _Utils_ap(strSize, attrs.sizeUnit)), - $elm$svg$Svg$Attributes$stroke('currentColor'), - $elm$svg$Svg$Attributes$strokeLinecap('round'), - $elm$svg$Svg$Attributes$strokeLinejoin('round'), - $elm$svg$Svg$Attributes$strokeWidth( - $elm$core$String$fromFloat(attrs.strokeWidth)), - $elm$svg$Svg$Attributes$viewBox(attrs.viewBox) - ]); - var combinedAttributes = _Utils_ap( - function () { - var _v1 = attrs._class; - if (_v1.$ === 'Just') { - var c = _v1.a; - return A2( - $elm$core$List$cons, - $elm$svg$Svg$Attributes$class(c), - baseAttributes); - } else { - return baseAttributes; - } - }(), - attributes); - return A2( - $elm$svg$Svg$svg, - combinedAttributes, - A2( - $elm$core$List$map, - $elm$svg$Svg$map($elm$core$Basics$never), - src)); - }); -var $elm_community$intdict$IntDict$findMin = function (dict) { - findMin: - while (true) { - switch (dict.$) { - case 'Empty': - return $elm$core$Maybe$Nothing; - case 'Leaf': - var l = dict.a; - return $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = dict.a; - var $temp$dict = i.left; - dict = $temp$dict; - continue findMin; - } - } -}; -var $elm_community$intdict$IntDict$after = F2( - function (key, dict) { - var go = F2( - function (def, currentDict) { - go: - while (true) { - switch (currentDict.$) { - case 'Empty': - return $elm_community$intdict$IntDict$findMin(def); - case 'Leaf': - var l = currentDict.a; - return (_Utils_cmp(l.key, key) < 1) ? $elm_community$intdict$IntDict$findMin(def) : $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = currentDict.a; - if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { - return (_Utils_cmp(i.prefix.prefixBits, key) < 0) ? $elm_community$intdict$IntDict$findMin(def) : $elm_community$intdict$IntDict$findMin(i.left); - } else { - if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { - var $temp$def = def, - $temp$currentDict = i.right; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } else { - var $temp$def = i.right, - $temp$currentDict = i.left; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } - } - } - } - }); - return A2(go, $elm_community$intdict$IntDict$Empty, dict); - }); -var $elm$core$Maybe$andThen = F2( - function (callback, maybeValue) { - if (maybeValue.$ === 'Just') { - var value = maybeValue.a; - return callback(value); - } else { - return $elm$core$Maybe$Nothing; - } - }); -var $elm_community$intdict$IntDict$findMax = function (dict) { - findMax: - while (true) { - switch (dict.$) { - case 'Empty': - return $elm$core$Maybe$Nothing; - case 'Leaf': - var l = dict.a; - return $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = dict.a; - var $temp$dict = i.right; - dict = $temp$dict; - continue findMax; - } - } -}; -var $elm_community$intdict$IntDict$before = F2( - function (key, dict) { - var go = F2( - function (def, currentDict) { - go: - while (true) { - switch (currentDict.$) { - case 'Empty': - return $elm_community$intdict$IntDict$findMax(def); - case 'Leaf': - var l = currentDict.a; - return (_Utils_cmp(l.key, key) > -1) ? $elm_community$intdict$IntDict$findMax(def) : $elm$core$Maybe$Just( - _Utils_Tuple2(l.key, l.value)); - default: - var i = currentDict.a; - if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { - return (_Utils_cmp(i.prefix.prefixBits, key) > 0) ? $elm_community$intdict$IntDict$findMax(def) : $elm_community$intdict$IntDict$findMax(i.right); - } else { - if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { - var $temp$def = i.left, - $temp$currentDict = i.right; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } else { - var $temp$def = def, - $temp$currentDict = i.left; - def = $temp$def; - currentDict = $temp$currentDict; - continue go; - } - } - } - } - }); - return A2(go, $elm_community$intdict$IntDict$Empty, dict); - }); -var $author$project$Widget$ScrollingNav$current = F2( - function (fromString, _v0) { - var positions = _v0.positions; - var scrollPos = _v0.scrollPos; - return A2( - $elm$core$Maybe$andThen, - fromString, - A2( - $elm$core$Maybe$map, - $elm$core$Tuple$second, - A2( - $elm$core$Maybe$withDefault, - A2($elm_community$intdict$IntDict$after, scrollPos + 1, positions), - A2( - $elm$core$Maybe$map, - $elm$core$Maybe$Just, - A2($elm_community$intdict$IntDict$before, scrollPos + 1, positions))))); - }); -var $elm$core$List$head = function (list) { - if (list.b) { - var x = list.a; - var xs = list.b; - return $elm$core$Maybe$Just(x); - } else { - return $elm$core$Maybe$Nothing; - } -}; -var $author$project$Widget$ScrollingNav$toSelect = F2( - function (onSelect, model) { - var arrangement = model.arrangement; - var toString = model.toString; - var fromString = model.fromString; - return { - onSelect: onSelect, - options: A2( - $elm$core$List$map, - function (s) { - return { - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - text: toString(s) - }; - }, - arrangement), - selected: $elm$core$List$head( - A2( - $elm$core$List$filterMap, - function (_v0) { - var i = _v0.a; - var s = _v0.b; - return _Utils_eq( - $elm$core$Maybe$Just(s), - A2($author$project$Widget$ScrollingNav$current, fromString, model)) ? $elm$core$Maybe$Just(i) : $elm$core$Maybe$Nothing; - }, - A2( - $elm$core$List$indexedMap, - F2( - function (i, s) { - return _Utils_Tuple2(i, s); - }), - arrangement))) - }; - }); var $avh4$elm_color$Color$RgbaSpace = F4( function (a, b, c, d) { return {$: 'RgbaSpace', a: a, b: b, c: c, d: d}; @@ -14503,8 +13876,16 @@ var $author$project$Internal$Material$Palette$defaultPalette = { surface: A3($avh4$elm_color$Color$rgb255, 255, 255, 255) }; var $author$project$Widget$Material$defaultPalette = $author$project$Internal$Material$Palette$defaultPalette; +var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) { + return {$: 'AlignY', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$Bottom = {$: 'Bottom'}; var $mdgriffith$elm_ui$Element$alignBottom = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$Bottom); +var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) { + return {$: 'AlignX', a: a}; +}; +var $mdgriffith$elm_ui$Internal$Model$Right = {$: 'Right'}; +var $mdgriffith$elm_ui$Element$alignRight = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Right); var $elm$core$Basics$pow = _Basics_pow; var $avh4$elm_color$Color$toRgba = function (_v0) { var r = _v0.a; @@ -14547,6 +13928,11 @@ var $mdgriffith$elm_ui$Element$Font$letterSpacing = function (offset) { 'letter-spacing', $elm$core$String$fromFloat(offset) + 'px')); }; +var $mdgriffith$elm_ui$Internal$Model$Class = F2( + function (a, b) { + return {$: 'Class', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Flag$fontWeight = $mdgriffith$elm_ui$Internal$Flag$flag(13); var $mdgriffith$elm_ui$Element$Font$semiBold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.textSemiBold); var $elm$virtual_dom$VirtualDom$style = _VirtualDom_style; var $elm$html$Html$Attributes$style = $elm$virtual_dom$VirtualDom$style; @@ -14558,7 +13944,15 @@ var $author$project$Widget$Material$Typography$button = _List_fromArray( $mdgriffith$elm_ui$Element$Font$semiBold, $mdgriffith$elm_ui$Element$Font$letterSpacing(1.25) ]); +var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'}; +var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX); +var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'}; +var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY); var $author$project$Widget$Material$Color$gray = A3($avh4$elm_color$Color$rgb255, 119, 119, 119); +var $mdgriffith$elm_ui$Internal$Model$Height = function (a) { + return {$: 'Height', a: a}; +}; +var $mdgriffith$elm_ui$Element$height = $mdgriffith$elm_ui$Internal$Model$Height; var $mdgriffith$elm_ui$Internal$Model$Min = F2( function (a, b) { return {$: 'Min', a: a, b: b}; @@ -14567,6 +13961,11 @@ var $mdgriffith$elm_ui$Element$minimum = F2( function (i, l) { return A2($mdgriffith$elm_ui$Internal$Model$Min, i, l); }); +var $mdgriffith$elm_ui$Internal$Model$PaddingStyle = F5( + function (a, b, c, d, e) { + return {$: 'PaddingStyle', a: a, b: b, c: c, d: d, e: e}; + }); +var $mdgriffith$elm_ui$Internal$Flag$padding = $mdgriffith$elm_ui$Internal$Flag$flag(2); var $mdgriffith$elm_ui$Element$paddingXY = F2( function (x, y) { if (_Utils_eq(x, y)) { @@ -14611,6 +14010,31 @@ var $mdgriffith$elm_ui$Element$Border$rounded = function (radius) { 'border-radius', $elm$core$String$fromInt(radius) + 'px')); }; +var $mdgriffith$elm_ui$Internal$Model$Content = {$: 'Content'}; +var $mdgriffith$elm_ui$Element$shrink = $mdgriffith$elm_ui$Internal$Model$Content; +var $mdgriffith$elm_ui$Internal$Model$SpacingStyle = F3( + function (a, b, c) { + return {$: 'SpacingStyle', a: a, b: b, c: c}; + }); +var $mdgriffith$elm_ui$Internal$Flag$spacing = $mdgriffith$elm_ui$Internal$Flag$flag(3); +var $mdgriffith$elm_ui$Internal$Model$spacingName = F2( + function (x, y) { + return 'spacing-' + ($elm$core$String$fromInt(x) + ('-' + $elm$core$String$fromInt(y))); + }); +var $mdgriffith$elm_ui$Element$spacing = function (x) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$spacing, + A3( + $mdgriffith$elm_ui$Internal$Model$SpacingStyle, + A2($mdgriffith$elm_ui$Internal$Model$spacingName, x, x), + x, + x)); +}; +var $mdgriffith$elm_ui$Internal$Model$Width = function (a) { + return {$: 'Width', a: a}; +}; +var $mdgriffith$elm_ui$Element$width = $mdgriffith$elm_ui$Internal$Model$Width; var $author$project$Internal$Material$Button$baseButton = function (_v0) { return { content: { @@ -14661,10 +14085,21 @@ var $mdgriffith$elm_ui$Internal$Model$PseudoSelector = F2( return {$: 'PseudoSelector', a: a, b: b}; }); var $mdgriffith$elm_ui$Internal$Flag$focus = $mdgriffith$elm_ui$Internal$Flag$flag(31); +var $mdgriffith$elm_ui$Internal$Model$Describe = function (a) { + return {$: 'Describe', a: a}; +}; +var $mdgriffith$elm_ui$Internal$Model$Nearby = F2( + function (a, b) { + return {$: 'Nearby', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Internal$Model$NoAttribute = {$: 'NoAttribute'}; var $mdgriffith$elm_ui$Internal$Model$TransformComponent = F2( function (a, b) { return {$: 'TransformComponent', a: a, b: b}; }); +var $mdgriffith$elm_ui$Internal$Model$Text = function (a) { + return {$: 'Text', a: a}; +}; var $mdgriffith$elm_ui$Internal$Model$map = F2( function (fn, el) { switch (el.$) { @@ -14853,6 +14288,10 @@ var $mdgriffith$elm_ui$Element$Border$shadow = function (almostShade) { 'box-shadow', $mdgriffith$elm_ui$Internal$Model$formatBoxShadow(shade))); }; +var $mdgriffith$elm_ui$Element$rgba255 = F4( + function (red, green, blue, a) { + return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, a); + }); var $author$project$Widget$Material$Color$shadow = function (_float) { return { blur: _float, @@ -14877,6 +14316,10 @@ var $noahzgordon$elm_color_extra$Color$Convert$labToXyz = function (_v0) { z: c(y - (b / 200)) * 108.883 }; }; +var $elm$core$Basics$clamp = F3( + function (low, high, number) { + return (_Utils_cmp(number, low) < 0) ? low : ((_Utils_cmp(number, high) > 0) ? high : number); + }); var $avh4$elm_color$Color$rgb = F3( function (r, g, b) { return A4($avh4$elm_color$Color$RgbaSpace, r, g, b, 1.0); @@ -15075,6 +14518,10 @@ var $author$project$Internal$Material$Button$containedButton = function (palette ]) }; }; +var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) { + return {$: 'Fill', a: a}; +}; +var $mdgriffith$elm_ui$Element$fill = $mdgriffith$elm_ui$Internal$Model$Fill(1); var $author$project$Widget$Material$Typography$h6 = _List_fromArray( [ $mdgriffith$elm_ui$Element$Font$size(20), @@ -15351,6 +14798,40 @@ var $author$project$Internal$Material$List$cardColumn = function (palette) { }; var $author$project$Widget$Material$cardColumn = $author$project$Internal$Material$List$cardColumn; var $author$project$Widget$Material$Color$buttonSelectedOpacity = 0.16; +var $mdgriffith$elm_ui$Internal$Model$paddingName = F4( + function (top, right, bottom, left) { + return 'pad-' + ($elm$core$String$fromInt(top) + ('-' + ($elm$core$String$fromInt(right) + ('-' + ($elm$core$String$fromInt(bottom) + ('-' + $elm$core$String$fromInt(left))))))); + }); +var $mdgriffith$elm_ui$Element$paddingEach = function (_v0) { + var top = _v0.top; + var right = _v0.right; + var bottom = _v0.bottom; + var left = _v0.left; + if (_Utils_eq(top, right) && (_Utils_eq(top, bottom) && _Utils_eq(top, left))) { + var topFloat = top; + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$padding, + A5( + $mdgriffith$elm_ui$Internal$Model$PaddingStyle, + 'p-' + $elm$core$String$fromInt(top), + topFloat, + topFloat, + topFloat, + topFloat)); + } else { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$padding, + A5( + $mdgriffith$elm_ui$Internal$Model$PaddingStyle, + A4($mdgriffith$elm_ui$Internal$Model$paddingName, top, right, bottom, left), + top, + right, + bottom, + left)); + } +}; var $author$project$Widget$Material$Color$textAndBackground = function (color) { return _List_fromArray( [ @@ -15491,6 +14972,62 @@ var $author$project$Internal$Material$List$column = { }; var $author$project$Widget$Material$column = $author$project$Internal$Material$List$column; var $author$project$Widget$Material$containedButton = $author$project$Internal$Material$Button$containedButton; +var $elm$svg$Svg$Attributes$d = _VirtualDom_attribute('d'); +var $mdgriffith$elm_ui$Element$el = F2( + function (attrs, child) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asEl, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + attrs)), + $mdgriffith$elm_ui$Internal$Model$Unkeyed( + _List_fromArray( + [child]))); + }); +var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); +var $elm$svg$Svg$Attributes$height = _VirtualDom_attribute('height'); +var $mdgriffith$elm_ui$Internal$Model$unstyled = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Unstyled, $elm$core$Basics$always); +var $mdgriffith$elm_ui$Element$html = $mdgriffith$elm_ui$Internal$Model$unstyled; +var $elm$svg$Svg$Attributes$stroke = _VirtualDom_attribute('stroke'); +var $elm$svg$Svg$trustedNode = _VirtualDom_nodeNS('http://www.w3.org/2000/svg'); +var $elm$svg$Svg$svg = $elm$svg$Svg$trustedNode('svg'); +var $avh4$elm_color$Color$toCssString = function (_v0) { + var r = _v0.a; + var g = _v0.b; + var b = _v0.c; + var a = _v0.d; + var roundTo = function (x) { + return $elm$core$Basics$round(x * 1000) / 1000; + }; + var pct = function (x) { + return $elm$core$Basics$round(x * 10000) / 100; + }; + return $elm$core$String$concat( + _List_fromArray( + [ + 'rgba(', + $elm$core$String$fromFloat( + pct(r)), + '%,', + $elm$core$String$fromFloat( + pct(g)), + '%,', + $elm$core$String$fromFloat( + pct(b)), + '%,', + $elm$core$String$fromFloat( + roundTo(a)), + ')' + ])); +}; +var $elm$svg$Svg$Attributes$viewBox = _VirtualDom_attribute('viewBox'); +var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); var $author$project$Internal$Material$Icon$icon = function (_v0) { var viewBox = _v0.viewBox; var size = _v0.size; @@ -15515,6 +15052,7 @@ var $author$project$Internal$Material$Icon$icon = function (_v0) { $mdgriffith$elm_ui$Element$html, $mdgriffith$elm_ui$Element$el(_List_Nil))); }; +var $elm$svg$Svg$path = $elm$svg$Svg$trustedNode('path'); var $author$project$Internal$Material$Icon$expand_less = function (_v0) { var size = _v0.size; var color = _v0.color; @@ -15562,7 +15100,7 @@ var $mdgriffith$elm_ui$Element$padding = function (x) { f, f)); }; -var $author$project$Internal$Material$Item$textItem = function (_v0) { +var $author$project$Internal$Material$Item$insetItem = function (_v0) { return { content: { content: { @@ -15639,10 +15177,19 @@ var $author$project$Internal$Material$Item$expansionItem = function (palette) { return { collapseIcon: $author$project$Internal$Material$Icon$expand_less, expandIcon: $author$project$Internal$Material$Icon$expand_more, - item: $author$project$Internal$Material$Item$textItem(palette) + item: $author$project$Internal$Material$Item$insetItem(palette) }; }; var $author$project$Widget$Material$expansionItem = $author$project$Internal$Material$Item$expansionItem; +var $mdgriffith$elm_ui$Element$Font$family = function (families) { + return A2( + $mdgriffith$elm_ui$Internal$Model$StyleClass, + $mdgriffith$elm_ui$Internal$Flag$fontFamily, + A2( + $mdgriffith$elm_ui$Internal$Model$FontFamily, + A3($elm$core$List$foldl, $mdgriffith$elm_ui$Internal$Model$renderFontClassName, 'ff-', families), + families)); +}; var $avh4$elm_color$Color$gray = A4($avh4$elm_color$Color$RgbaSpace, 211 / 255, 215 / 255, 207 / 255, 1.0); var $author$project$Internal$Material$Item$fullBleedDivider = function (_v0) { return { @@ -15728,6 +15275,22 @@ var $author$project$Internal$Material$Item$fullBleedHeader = function (palette) }; }; var $author$project$Widget$Material$fullBleedHeader = $author$project$Internal$Material$Item$fullBleedHeader; +var $author$project$Internal$Material$Item$fullBleedItem = function (palette) { + var i = $author$project$Internal$Material$Item$insetItem(palette); + return { + content: { + content: { + content: {icon: i.content.content.content.content, text: i.content.content.content.text}, + elementRow: i.content.content.elementRow + }, + elementButton: i.content.elementButton, + ifDisabled: i.content.ifDisabled, + otherwise: i.content.otherwise + }, + element: i.element + }; +}; +var $author$project$Widget$Material$fullBleedItem = $author$project$Internal$Material$Item$fullBleedItem; var $author$project$Internal$Material$Button$iconButton = function (palette) { return { content: { @@ -15738,10 +15301,8 @@ var $author$project$Internal$Material$Button$iconButton = function (palette) { otherwise: {color: palette.primary, size: 18} }, text: { - contentText: function (b) { - return b.content.content.text.contentText; - }( - $author$project$Internal$Material$Button$baseButton(palette)) + contentText: _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX]) } }, elementRow: _List_fromArray( @@ -15913,97 +15474,7 @@ var $author$project$Internal$Material$Item$insetHeader = function (palette) { }; }; var $author$project$Widget$Material$insetHeader = $author$project$Internal$Material$Item$insetHeader; -var $author$project$Internal$Material$Layout$drawerButton = function (palette) { - return { - content: { - content: { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), - size: 18 - }, - ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), - size: 18 - } - }, - text: { - contentText: function (b) { - return b.content.content.text.contentText; - }( - $author$project$Internal$Material$Button$baseButton(palette)) - } - }, - elementRow: $author$project$Internal$Material$Button$baseButton(palette).content.elementRow - }, - elementButton: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$size(14), - $mdgriffith$elm_ui$Element$Font$semiBold, - $mdgriffith$elm_ui$Element$Font$letterSpacing(0.25), - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(36)), - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - A2($mdgriffith$elm_ui$Element$paddingXY, 8, 8), - $mdgriffith$elm_ui$Element$Border$rounded(4), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor(palette.surface))), - $mdgriffith$elm_ui$Element$mouseDown( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$focused( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$mouseOver( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) - ])) - ]), - ifActive: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor(palette.primary)) - ]), - ifDisabled: _Utils_ap( - $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), - $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), - $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), - $mdgriffith$elm_ui$Element$focused(_List_Nil) - ])), - otherwise: _List_Nil - }; -}; -var $mdgriffith$elm_ui$Element$Font$family = function (families) { - return A2( - $mdgriffith$elm_ui$Internal$Model$StyleClass, - $mdgriffith$elm_ui$Internal$Flag$fontFamily, - A2( - $mdgriffith$elm_ui$Internal$Model$FontFamily, - A3($elm$core$List$foldl, $mdgriffith$elm_ui$Internal$Model$renderFontClassName, 'ff-', families), - families)); -}; -var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith( - {options: _List_Nil}); +var $author$project$Widget$Material$insetItem = $author$project$Internal$Material$Item$insetItem; var $author$project$Widget$Customize$mapContent = F2( function (fun, a) { return _Utils_update( @@ -16012,104 +15483,7 @@ var $author$project$Widget$Customize$mapContent = F2( content: fun(a.content) }); }); -var $author$project$Internal$Material$Layout$menu = function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $author$project$Internal$Material$Icon$icon, - {color: color, size: size, viewBox: '0 0 48 48'}, - _List_fromArray( - [ - A2( - $elm$svg$Svg$path, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$d('M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z') - ]), - _List_Nil) - ])); -}; -var $author$project$Internal$Material$Layout$menuTabButton = function (palette) { - return { - content: { - content: { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: 18 - }, - ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: 18 - } - }, - text: {contentText: _List_Nil} - }, - elementRow: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$spacing(8), - $mdgriffith$elm_ui$Element$centerY, - $mdgriffith$elm_ui$Element$centerX - ]) - }, - elementButton: _Utils_ap( - $author$project$Widget$Material$Typography$button, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(56)), - $mdgriffith$elm_ui$Element$width( - A2( - $mdgriffith$elm_ui$Element$minimum, - 90, - A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill))), - A2($mdgriffith$elm_ui$Element$paddingXY, 12, 16), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor(palette.primary))), - $mdgriffith$elm_ui$Element$alignBottom, - $mdgriffith$elm_ui$Element$mouseDown( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$focused( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) - ])), - $mdgriffith$elm_ui$Element$mouseOver( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) - ])) - ])), - ifActive: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Border$widthEach( - {bottom: 2, left: 0, right: 0, top: 0}) - ]), - ifDisabled: _Utils_ap( - $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), - $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), - $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), - $mdgriffith$elm_ui$Element$focused(_List_Nil) - ])), - otherwise: _List_Nil - }; -}; -var $author$project$Internal$Material$Layout$more_vert = function (_v0) { +var $author$project$Internal$Material$Icon$more_vert = function (_v0) { var size = _v0.size; var color = _v0.color; return A2( @@ -16126,8 +15500,7 @@ var $author$project$Internal$Material$Layout$more_vert = function (_v0) { _List_Nil) ])); }; -var $mdgriffith$elm_ui$Element$Font$sansSerif = $mdgriffith$elm_ui$Internal$Model$SansSerif; -var $author$project$Internal$Material$Layout$search = function (_v0) { +var $author$project$Internal$Material$Icon$search = function (_v0) { var size = _v0.size; var color = _v0.color; return A2( @@ -16225,165 +15598,93 @@ var $author$project$Internal$Material$TextInput$searchInput = function (palette) ])), $author$project$Internal$Material$TextInput$textInputBase(palette))); }; -var $author$project$Widget$Material$Color$accessibleWithTextColor = F2( - function (c, color) { - var newConstrast = 7; - var l2 = 1 + ($avh4$elm_color$Color$toRgba(color).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(color) - 1)); - var lighterLuminance = (newConstrast * (l2 + 0.05)) - 0.05; - var l1 = 1 + ($avh4$elm_color$Color$toRgba(c).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(c) - 1)); - var darkerLuminance = (l2 + 0.05) - (0.05 / newConstrast); - return ((_Utils_cmp(l1, l2) > 0) ? ((((l1 + 0.05) / (l2 + 0.05)) < 7) ? A2( - $elm$core$Basics$composeR, - $noahzgordon$elm_color_extra$Color$Convert$colorToLab, - A2( - $elm$core$Basics$composeR, - function (col) { - return _Utils_update( - col, - {l: 100 * lighterLuminance}); +var $author$project$Internal$Material$AppBar$internalBar = F2( + function (content, palette) { + return { + content: { + actions: { + content: { + button: A2( + $author$project$Widget$Customize$mapContent, + $author$project$Widget$Customize$mapContent( + function (record) { + return _Utils_update( + record, + { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: record.icon.ifActive.size + }, + ifDisabled: record.icon.ifDisabled, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: record.icon.otherwise.size + } + } + }); + }), + $author$project$Internal$Material$Button$iconButton(palette)), + moreVerticalIcon: $author$project$Internal$Material$Icon$more_vert, + searchIcon: $author$project$Internal$Material$Icon$search + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignRight, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]) }, - $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity) : ((((l2 + 0.05) / (l1 + 0.05)) < 7) ? A2( - $elm$core$Basics$composeR, - $noahzgordon$elm_color_extra$Color$Convert$colorToLab, - A2( - $elm$core$Basics$composeR, - function (col) { - return _Utils_update( - col, - {l: 100 * darkerLuminance}); + menu: { + content: content, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + $mdgriffith$elm_ui$Element$spacing(8) + ]) }, - $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity))(c); - }); -var $author$project$Widget$Material$Color$dark = A3($avh4$elm_color$Color$rgb255, 50, 50, 50); -var $author$project$Widget$Customize$mapElementButton = F2( - function (fun, a) { - return _Utils_update( - a, - { - elementButton: fun(a.elementButton) - }); - }); -var $author$project$Widget$Customize$elementButton = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementButton, - function (b) { - return _Utils_ap(b, list); + search: $author$project$Internal$Material$TextInput$searchInput(palette) }, - a); - }); -var $author$project$Internal$Material$Snackbar$snackbar = function (palette) { - return { - content: { - button: A2( - $author$project$Widget$Customize$elementButton, + elementRow: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground(palette.primary), _List_fromArray( [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - A2($author$project$Widget$Material$Color$accessibleWithTextColor, palette.primary, $author$project$Widget$Material$Color$dark))) - ]), - $author$project$Internal$Material$Button$textButton(palette)), - text: { - elementText: _List_fromArray( - [ - $mdgriffith$elm_ui$Element$centerX, - A2($mdgriffith$elm_ui$Element$paddingXY, 10, 8) - ]) - } - }, - elementRow: _List_fromArray( + $mdgriffith$elm_ui$Element$padding(0), + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 360, $mdgriffith$elm_ui$Element$fill)) + ])) + }; + }); +var $author$project$Internal$Material$Icon$menu = function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $author$project$Internal$Material$Icon$icon, + {color: color, size: size, viewBox: '0 0 48 48'}, + _List_fromArray( [ - $mdgriffith$elm_ui$Element$Background$color( - $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$dark)), - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor( - $author$project$Widget$Material$Color$accessibleTextColor($author$project$Widget$Material$Color$dark))), - $mdgriffith$elm_ui$Element$Border$rounded(4), - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 344, $mdgriffith$elm_ui$Element$fill)), - A2($mdgriffith$elm_ui$Element$paddingXY, 8, 6), - $mdgriffith$elm_ui$Element$spacing(8), - $mdgriffith$elm_ui$Element$Border$shadow( - $author$project$Widget$Material$Color$shadow(2)) - ]) - }; + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z') + ]), + _List_Nil) + ])); }; -var $mdgriffith$elm_ui$Element$Font$typeface = $mdgriffith$elm_ui$Internal$Model$Typeface; -var $author$project$Internal$Material$Layout$layout = function (palette) { - return { - container: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.background), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$family( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$typeface('Roboto'), - $mdgriffith$elm_ui$Element$Font$sansSerif - ])), - $mdgriffith$elm_ui$Element$Font$size(16), - $mdgriffith$elm_ui$Element$Font$letterSpacing(0.5) - ])), - header: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.primary), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(56)), - $mdgriffith$elm_ui$Element$padding(16), - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$minimum, 360, $mdgriffith$elm_ui$Element$fill)) - ])), - layout: $mdgriffith$elm_ui$Element$layout, - menuButton: A2( - $author$project$Widget$Customize$mapContent, - $author$project$Widget$Customize$mapContent( - function (record) { - return _Utils_update( - record, - { - icon: { - ifActive: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: record.icon.ifActive.size - }, - ifDisabled: record.icon.ifDisabled, - otherwise: { - color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), - size: record.icon.otherwise.size - } - } - }); - }), - $author$project$Internal$Material$Button$iconButton(palette)), - menuIcon: $author$project$Internal$Material$Layout$menu, - menuTabButton: $author$project$Internal$Material$Layout$menuTabButton(palette), - moreVerticalIcon: $author$project$Internal$Material$Layout$more_vert, - search: $author$project$Internal$Material$TextInput$searchInput(palette), - searchFill: $author$project$Internal$Material$TextInput$textInputBase(palette), - searchIcon: $author$project$Internal$Material$Layout$search, - sheet: _Utils_ap( - $author$project$Widget$Material$Color$textAndBackground(palette.surface), - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill)), - $mdgriffith$elm_ui$Element$padding(8), - $mdgriffith$elm_ui$Element$spacing(8) - ])), - sheetButton: $author$project$Internal$Material$Layout$drawerButton(palette), - snackbar: $author$project$Internal$Material$Snackbar$snackbar(palette), - spacing: 8, +var $author$project$Internal$Material$AppBar$menuBar = $author$project$Internal$Material$AppBar$internalBar( + { + menuIcon: $author$project$Internal$Material$Icon$menu, title: _Utils_ap( $author$project$Widget$Material$Typography$h6, _List_fromArray( [ A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) ])) - }; -}; -var $author$project$Widget$Material$layout = $author$project$Internal$Material$Layout$layout; + }); +var $author$project$Widget$Material$menuBar = $author$project$Internal$Material$AppBar$menuBar; var $author$project$Internal$Material$Item$middleDivider = function (_v0) { return { content: { @@ -16577,9 +15878,15 @@ var $author$project$Internal$Material$Button$outlinedButton = function (palette) }; }; var $author$project$Widget$Material$outlinedButton = $author$project$Internal$Material$Button$outlinedButton; +var $elm$svg$Svg$circle = $elm$svg$Svg$trustedNode('circle'); +var $elm$svg$Svg$Attributes$cx = _VirtualDom_attribute('cx'); +var $elm$svg$Svg$Attributes$cy = _VirtualDom_attribute('cy'); var $elm$svg$Svg$g = $elm$svg$Svg$trustedNode('g'); +var $elm$svg$Svg$Attributes$r = _VirtualDom_attribute('r'); var $elm$svg$Svg$Attributes$strokeDasharray = _VirtualDom_attribute('stroke-dasharray'); var $elm$svg$Svg$Attributes$strokeDashoffset = _VirtualDom_attribute('stroke-dashoffset'); +var $elm$svg$Svg$Attributes$strokeLinecap = _VirtualDom_attribute('stroke-linecap'); +var $elm$svg$Svg$Attributes$strokeWidth = _VirtualDom_attribute('stroke-width'); var $elm$svg$Svg$Attributes$transform = _VirtualDom_attribute('transform'); var $elm$svg$Svg$Attributes$xmlSpace = A2(_VirtualDom_attributeNS, 'http://www.w3.org/XML/1998/namespace', 'xml:space'); var $author$project$Internal$Material$ProgressIndicator$determinateCircularIcon = F3( @@ -16745,6 +16052,207 @@ var $author$project$Internal$Material$List$row = { ]) }; var $author$project$Widget$Material$row = $author$project$Internal$Material$List$row; +var $mdgriffith$elm_ui$Element$Font$sansSerif = $mdgriffith$elm_ui$Internal$Model$SansSerif; +var $author$project$Internal$Material$Item$selectItem = function (palette) { + return { + content: { + content: { + content: { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), + size: 18 + }, + ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.surface), + size: 18 + } + }, + text: { + contentText: _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX]) + } + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 32, $mdgriffith$elm_ui$Element$shrink)), + $mdgriffith$elm_ui$Element$centerY + ]) + }, + elementButton: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$size(14), + $mdgriffith$elm_ui$Element$Font$semiBold, + $mdgriffith$elm_ui$Element$Font$letterSpacing(0.25), + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(36)), + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 8), + $mdgriffith$elm_ui$Element$Border$rounded(4), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor(palette.surface))), + $mdgriffith$elm_ui$Element$mouseDown( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$focused( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$mouseOver( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) + ])) + ]), + ifActive: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor(palette.primary)) + ]), + ifDisabled: _Utils_ap( + $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), + $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])), + otherwise: _List_Nil + }, + element: _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 4) + ]) + }; +}; +var $author$project$Widget$Material$selectItem = $author$project$Internal$Material$Item$selectItem; +var $author$project$Internal$Material$List$sideSheet = function (palette) { + return { + content: { + element: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + ifFirst: _List_Nil, + ifLast: _List_Nil, + ifSingleton: _List_Nil, + otherwise: _List_Nil + }, + elementColumn: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground(palette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), + A2($mdgriffith$elm_ui$Element$paddingXY, 0, 8) + ])) + }; +}; +var $author$project$Widget$Material$sideSheet = $author$project$Internal$Material$List$sideSheet; +var $author$project$Widget$Material$Color$accessibleWithTextColor = F2( + function (c, color) { + var newConstrast = 7; + var l2 = 1 + ($avh4$elm_color$Color$toRgba(color).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(color) - 1)); + var lighterLuminance = (newConstrast * (l2 + 0.05)) - 0.05; + var l1 = 1 + ($avh4$elm_color$Color$toRgba(c).alpha * ($noahzgordon$elm_color_extra$Color$Accessibility$luminance(c) - 1)); + var darkerLuminance = (l2 + 0.05) - (0.05 / newConstrast); + return ((_Utils_cmp(l1, l2) > 0) ? ((((l1 + 0.05) / (l2 + 0.05)) < 7) ? A2( + $elm$core$Basics$composeR, + $noahzgordon$elm_color_extra$Color$Convert$colorToLab, + A2( + $elm$core$Basics$composeR, + function (col) { + return _Utils_update( + col, + {l: 100 * lighterLuminance}); + }, + $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity) : ((((l2 + 0.05) / (l1 + 0.05)) < 7) ? A2( + $elm$core$Basics$composeR, + $noahzgordon$elm_color_extra$Color$Convert$colorToLab, + A2( + $elm$core$Basics$composeR, + function (col) { + return _Utils_update( + col, + {l: 100 * darkerLuminance}); + }, + $noahzgordon$elm_color_extra$Color$Convert$labToColor)) : $elm$core$Basics$identity))(c); + }); +var $author$project$Widget$Material$Color$dark = A3($avh4$elm_color$Color$rgb255, 50, 50, 50); +var $author$project$Widget$Customize$mapElementButton = F2( + function (fun, a) { + return _Utils_update( + a, + { + elementButton: fun(a.elementButton) + }); + }); +var $author$project$Widget$Customize$elementButton = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementButton, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $author$project$Internal$Material$Snackbar$snackbar = function (palette) { + return { + content: { + button: A2( + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$accessibleWithTextColor, palette.primary, $author$project$Widget$Material$Color$dark))) + ]), + $author$project$Internal$Material$Button$textButton(palette)), + text: { + elementText: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$centerX, + A2($mdgriffith$elm_ui$Element$paddingXY, 10, 8) + ]) + } + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$dark)), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor($author$project$Widget$Material$Color$dark))), + $mdgriffith$elm_ui$Element$Border$rounded(4), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 344, $mdgriffith$elm_ui$Element$fill)), + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 6), + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$Border$shadow( + $author$project$Widget$Material$Color$shadow(2)) + ]) + }; +}; +var $author$project$Widget$Material$snackbar = $author$project$Internal$Material$Snackbar$snackbar; var $author$project$Internal$Material$SortTable$sortTable = function (palette) { return { content: { @@ -16757,6 +16265,8 @@ var $author$project$Internal$Material$SortTable$sortTable = function (palette) { }; }; var $author$project$Widget$Material$sortTable = $author$project$Internal$Material$SortTable$sortTable; +var $mdgriffith$elm_ui$Internal$Model$Left = {$: 'Left'}; +var $mdgriffith$elm_ui$Element$alignLeft = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$Left); var $mdgriffith$elm_ui$Internal$Model$MoveX = function (a) { return {$: 'MoveX', a: a}; }; @@ -17026,6 +16536,101 @@ var $author$project$Internal$Material$Tab$tab = function (palette) { }; }; var $author$project$Widget$Material$tab = $author$project$Internal$Material$Tab$tab; +var $author$project$Internal$Material$AppBar$menuTabButton = function (palette) { + return { + content: { + content: { + icon: { + ifActive: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: 18 + }, + ifDisabled: {color: $author$project$Widget$Material$Color$gray, size: 18}, + otherwise: { + color: $author$project$Widget$Material$Color$accessibleTextColor(palette.primary), + size: 18 + } + }, + text: {contentText: _List_Nil} + }, + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8), + $mdgriffith$elm_ui$Element$centerY, + $mdgriffith$elm_ui$Element$centerX + ]) + }, + elementButton: _Utils_ap( + $author$project$Widget$Material$Typography$button, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)), + $mdgriffith$elm_ui$Element$width( + A2( + $mdgriffith$elm_ui$Element$minimum, + 90, + A2($mdgriffith$elm_ui$Element$maximum, 360, $mdgriffith$elm_ui$Element$fill))), + A2($mdgriffith$elm_ui$Element$paddingXY, 12, 16), + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor( + $author$project$Widget$Material$Color$accessibleTextColor(palette.primary))), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$mouseDown( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonPressedOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$focused( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonFocusOpacity, palette.primary))) + ])), + $mdgriffith$elm_ui$Element$mouseOver( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Background$color( + $author$project$Widget$Material$Color$fromColor( + A2($author$project$Widget$Material$Color$scaleOpacity, $author$project$Widget$Material$Color$buttonHoverOpacity, palette.primary))) + ])) + ])), + ifActive: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Border$widthEach( + {bottom: 2, left: 0, right: 0, top: 0}) + ]), + ifDisabled: _Utils_ap( + $author$project$Internal$Material$Button$baseButton(palette).ifDisabled, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor($author$project$Widget$Material$Color$gray)), + $mdgriffith$elm_ui$Element$mouseDown(_List_Nil), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])), + otherwise: _List_Nil + }; +}; +var $author$project$Internal$Material$AppBar$tabBar = function (palette) { + return A2( + $author$project$Internal$Material$AppBar$internalBar, + { + menuTabButton: $author$project$Internal$Material$AppBar$menuTabButton(palette), + title: _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])) + }, + palette); +}; +var $author$project$Widget$Material$tabBar = $author$project$Internal$Material$AppBar$tabBar; var $author$project$Widget$Material$textButton = $author$project$Internal$Material$Button$textButton; var $author$project$Internal$Material$TextInput$textInput = function (palette) { return { @@ -17078,7 +16683,6 @@ var $author$project$Internal$Material$TextInput$textInput = function (palette) { }; }; var $author$project$Widget$Material$textInput = $author$project$Internal$Material$TextInput$textInput; -var $author$project$Widget$Material$textItem = $author$project$Internal$Material$Item$textItem; var $author$project$Internal$Material$Button$toggleButton = function (palette) { return { content: { @@ -17196,6 +16800,7 @@ var $author$project$Internal$Material$Button$toggleButton = function (palette) { }; }; var $author$project$Widget$Material$toggleButton = $author$project$Internal$Material$Button$toggleButton; +var $mdgriffith$elm_ui$Element$Font$typeface = $mdgriffith$elm_ui$Internal$Model$Typeface; var $author$project$Data$Style$style = function (palette) { return { button: $author$project$Widget$Material$outlinedButton(palette), @@ -17204,28 +16809,75 @@ var $author$project$Data$Style$style = function (palette) { chipButton: $author$project$Widget$Material$chip(palette), column: $author$project$Widget$Material$column, containedButton: $author$project$Widget$Material$containedButton($author$project$Widget$Material$defaultPalette), + container: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.background), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$family( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$typeface('Roboto'), + $mdgriffith$elm_ui$Element$Font$sansSerif + ])), + $mdgriffith$elm_ui$Element$Font$size(16), + $mdgriffith$elm_ui$Element$Font$letterSpacing(0.5) + ])), dialog: $author$project$Widget$Material$alertDialog(palette), - expansionItem: $author$project$Widget$Material$expansionItem($author$project$Widget$Material$defaultPalette), + expansionItem: $author$project$Widget$Material$expansionItem(palette), fullBleedDivider: $author$project$Widget$Material$fullBleedDivider(palette), fullBleedHeader: $author$project$Widget$Material$fullBleedHeader(palette), + fullBleedItem: $author$project$Widget$Material$fullBleedItem($author$project$Widget$Material$defaultPalette), iconButton: $author$project$Widget$Material$iconButton($author$project$Widget$Material$defaultPalette), imageItem: $author$project$Widget$Material$imageItem(palette), insetDivider: $author$project$Widget$Material$insetDivider(palette), insetHeader: $author$project$Widget$Material$insetHeader(palette), - layout: $author$project$Widget$Material$layout(palette), + insetItem: $author$project$Widget$Material$insetItem(palette), + menuBar: $author$project$Widget$Material$menuBar($author$project$Widget$Material$defaultPalette), middleDivider: $author$project$Widget$Material$middleDivider(palette), multiLineItem: $author$project$Widget$Material$multiLineItem(palette), outlinedButton: $author$project$Widget$Material$outlinedButton($author$project$Widget$Material$defaultPalette), primaryButton: $author$project$Widget$Material$containedButton(palette), progressIndicator: $author$project$Widget$Material$progressIndicator(palette), row: $author$project$Widget$Material$row, + searchFill: { + content: { + chips: { + content: $author$project$Widget$Material$chip($author$project$Widget$Material$defaultPalette), + elementRow: _List_fromArray( + [ + $mdgriffith$elm_ui$Element$spacing(8) + ]) + }, + text: { + elementTextInput: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Border$width(0), + $mdgriffith$elm_ui$Element$mouseOver(_List_Nil), + $mdgriffith$elm_ui$Element$focused(_List_Nil) + ])) + } + }, + elementRow: _Utils_ap( + $author$project$Widget$Material$Color$textAndBackground($author$project$Widget$Material$defaultPalette.surface), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(56)) + ])) + }, selectButton: $author$project$Widget$Material$toggleButton(palette), + selectItem: $author$project$Widget$Material$selectItem($author$project$Widget$Material$defaultPalette), + sheetButton: $author$project$Widget$Material$selectItem($author$project$Widget$Material$defaultPalette), + sideSheet: $author$project$Widget$Material$sideSheet(palette), + snackbar: $author$project$Widget$Material$snackbar($author$project$Widget$Material$defaultPalette), sortTable: $author$project$Widget$Material$sortTable(palette), _switch: $author$project$Widget$Material$switch(palette), tab: $author$project$Widget$Material$tab(palette), + tabBar: $author$project$Widget$Material$tabBar($author$project$Widget$Material$defaultPalette), textButton: $author$project$Widget$Material$textButton($author$project$Widget$Material$defaultPalette), - textInput: $author$project$Widget$Material$textInput(palette), - textItem: $author$project$Widget$Material$textItem(palette) + textInput: $author$project$Widget$Material$textInput(palette) }; }; var $author$project$Data$Theme$toStyle = function (theme) { @@ -17235,35 +16887,167 @@ var $author$project$Data$Theme$toStyle = function (theme) { return $author$project$Data$Style$style($author$project$Widget$Material$darkPalette); } }; -var $author$project$Widget$Layout$buttonSheet = F2( - function (style, actions) { - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - style.element, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill) - ])), +var $author$project$Main$ChangedSearch = function (a) { + return {$: 'ChangedSearch', a: a}; +}; +var $author$project$Main$ChangedSidebar = function (a) { + return {$: 'ChangedSidebar', a: a}; +}; +var $author$project$Data$Theme$DarkMaterial = {$: 'DarkMaterial'}; +var $author$project$Main$JumpTo = function (a) { + return {$: 'JumpTo', a: a}; +}; +var $author$project$Main$LeftSheet = {$: 'LeftSheet'}; +var $author$project$Main$Load = function (a) { + return {$: 'Load', a: a}; +}; +var $mdgriffith$elm_ui$Element$Phone = {$: 'Phone'}; +var $author$project$Main$RightSheet = {$: 'RightSheet'}; +var $author$project$Main$Search = {$: 'Search'}; +var $author$project$Main$SetTheme = function (a) { + return {$: 'SetTheme', a: a}; +}; +var $mdgriffith$elm_ui$Element$Tablet = {$: 'Tablet'}; +var $feathericons$elm_feather$FeatherIcons$Icon = function (a) { + return {$: 'Icon', a: a}; +}; +var $feathericons$elm_feather$FeatherIcons$defaultAttributes = function (name) { + return { + _class: $elm$core$Maybe$Just('feather feather-' + name), + size: 24, + sizeUnit: '', + strokeWidth: 2, + viewBox: '0 0 24 24' + }; +}; +var $feathericons$elm_feather$FeatherIcons$makeBuilder = F2( + function (name, src) { + return $feathericons$elm_feather$FeatherIcons$Icon( + { + attrs: $feathericons$elm_feather$FeatherIcons$defaultAttributes(name), + src: src + }); + }); +var $feathericons$elm_feather$FeatherIcons$book = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'book', + _List_fromArray( + [ A2( - $mdgriffith$elm_ui$Element$column, - _Utils_ap( - style.content.elementColumn, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ])), - A2( - $elm$core$List$map, - $author$project$Internal$Button$button(style.content.content), - actions))); + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M4 19.5A2.5 2.5 0 0 1 6.5 17H20') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z') + ]), + _List_Nil) + ])); +var $author$project$Widget$Icon$elmFeather = F2( + function (fun, icon) { + return function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_Nil, + $mdgriffith$elm_ui$Element$html( + A2( + fun, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$width( + $elm$core$String$fromInt(size)), + $elm$svg$Svg$Attributes$height( + $elm$core$String$fromInt(size)), + $elm$svg$Svg$Attributes$stroke( + $avh4$elm_color$Color$toCssString(color)) + ]), + icon))); + }; + }); +var $elm$core$Array$fromListHelp = F3( + function (list, nodeList, nodeListSize) { + fromListHelp: + while (true) { + var _v0 = A2($elm$core$Elm$JsArray$initializeFromList, $elm$core$Array$branchFactor, list); + var jsArray = _v0.a; + var remainingItems = _v0.b; + if (_Utils_cmp( + $elm$core$Elm$JsArray$length(jsArray), + $elm$core$Array$branchFactor) < 0) { + return A2( + $elm$core$Array$builderToArray, + true, + {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); + } else { + var $temp$list = remainingItems, + $temp$nodeList = A2( + $elm$core$List$cons, + $elm$core$Array$Leaf(jsArray), + nodeList), + $temp$nodeListSize = nodeListSize + 1; + list = $temp$list; + nodeList = $temp$nodeList; + nodeListSize = $temp$nodeListSize; + continue fromListHelp; + } + } + }); +var $elm$core$Array$fromList = function (list) { + if (!list.b) { + return $elm$core$Array$empty; + } else { + return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); + } +}; +var $elm$core$Array$bitMask = 4294967295 >>> (32 - $elm$core$Array$shiftStep); +var $elm$core$Elm$JsArray$unsafeGet = _JsArray_unsafeGet; +var $elm$core$Array$getHelp = F3( + function (shift, index, tree) { + getHelp: + while (true) { + var pos = $elm$core$Array$bitMask & (index >>> shift); + var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); + if (_v0.$ === 'SubTree') { + var subTree = _v0.a; + var $temp$shift = shift - $elm$core$Array$shiftStep, + $temp$index = index, + $temp$tree = subTree; + shift = $temp$shift; + index = $temp$index; + tree = $temp$tree; + continue getHelp; + } else { + var values = _v0.a; + return A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, values); + } + } + }); +var $elm$core$Array$tailIndex = function (len) { + return (len >>> 5) << 5; +}; +var $elm$core$Array$get = F2( + function (index, _v0) { + var len = _v0.a; + var startShift = _v0.b; + var tree = _v0.c; + var tail = _v0.d; + return ((index < 0) || (_Utils_cmp(index, len) > -1)) ? $elm$core$Maybe$Nothing : ((_Utils_cmp( + index, + $elm$core$Array$tailIndex(len)) > -1) ? $elm$core$Maybe$Just( + A2($elm$core$Elm$JsArray$unsafeGet, $elm$core$Array$bitMask & index, tail)) : $elm$core$Maybe$Just( + A3($elm$core$Array$getHelp, startShift, index, tree))); }); var $mdgriffith$elm_ui$Element$BigDesktop = {$: 'BigDesktop'}; var $mdgriffith$elm_ui$Element$Desktop = {$: 'Desktop'}; var $mdgriffith$elm_ui$Element$Landscape = {$: 'Landscape'}; -var $mdgriffith$elm_ui$Element$Phone = {$: 'Phone'}; var $mdgriffith$elm_ui$Element$Portrait = {$: 'Portrait'}; -var $mdgriffith$elm_ui$Element$Tablet = {$: 'Tablet'}; var $mdgriffith$elm_ui$Element$classifyDevice = function (window) { return { _class: function () { @@ -17277,159 +17061,402 @@ var $mdgriffith$elm_ui$Element$classifyDevice = function (window) { var $author$project$Widget$Layout$getDeviceClass = function (window) { return $mdgriffith$elm_ui$Element$classifyDevice(window)._class; }; -var $elm$core$List$drop = F2( - function (n, list) { - drop: - while (true) { - if (n <= 0) { - return list; - } else { - if (!list.b) { - return list; - } else { - var x = list.a; - var xs = list.b; - var $temp$n = n - 1, - $temp$list = xs; - n = $temp$n; - list = $temp$list; - continue drop; - } - } - } - }); -var $elm$core$List$takeReverse = F3( - function (n, list, kept) { - takeReverse: - while (true) { - if (n <= 0) { - return kept; - } else { - if (!list.b) { - return kept; - } else { - var x = list.a; - var xs = list.b; - var $temp$n = n - 1, - $temp$list = xs, - $temp$kept = A2($elm$core$List$cons, x, kept); - n = $temp$n; - list = $temp$list; - kept = $temp$kept; - continue takeReverse; - } - } - } - }); -var $elm$core$List$takeTailRec = F2( - function (n, list) { - return $elm$core$List$reverse( - A3($elm$core$List$takeReverse, n, list, _List_Nil)); - }); -var $elm$core$List$takeFast = F3( - function (ctr, n, list) { - if (n <= 0) { - return _List_Nil; +var $feathericons$elm_feather$FeatherIcons$github = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'github', + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22') + ]), + _List_Nil) + ])); +var $mdgriffith$elm_ui$Internal$Model$InFront = {$: 'InFront'}; +var $mdgriffith$elm_ui$Element$createNearby = F2( + function (loc, element) { + if (element.$ === 'Empty') { + return $mdgriffith$elm_ui$Internal$Model$NoAttribute; } else { - var _v0 = _Utils_Tuple2(n, list); - _v0$1: - while (true) { - _v0$5: - while (true) { - if (!_v0.b.b) { - return list; - } else { - if (_v0.b.b.b) { - switch (_v0.a) { - case 1: - break _v0$1; - case 2: - var _v2 = _v0.b; - var x = _v2.a; - var _v3 = _v2.b; - var y = _v3.a; - return _List_fromArray( - [x, y]); - case 3: - if (_v0.b.b.b.b) { - var _v4 = _v0.b; - var x = _v4.a; - var _v5 = _v4.b; - var y = _v5.a; - var _v6 = _v5.b; - var z = _v6.a; - return _List_fromArray( - [x, y, z]); - } else { - break _v0$5; - } - default: - if (_v0.b.b.b.b && _v0.b.b.b.b.b) { - var _v7 = _v0.b; - var x = _v7.a; - var _v8 = _v7.b; - var y = _v8.a; - var _v9 = _v8.b; - var z = _v9.a; - var _v10 = _v9.b; - var w = _v10.a; - var tl = _v10.b; - return (ctr > 1000) ? A2( - $elm$core$List$cons, - x, - A2( - $elm$core$List$cons, - y, - A2( - $elm$core$List$cons, - z, - A2( - $elm$core$List$cons, - w, - A2($elm$core$List$takeTailRec, n - 4, tl))))) : A2( - $elm$core$List$cons, - x, - A2( - $elm$core$List$cons, - y, - A2( - $elm$core$List$cons, - z, - A2( - $elm$core$List$cons, - w, - A3($elm$core$List$takeFast, ctr + 1, n - 4, tl))))); - } else { - break _v0$5; - } - } - } else { - if (_v0.a === 1) { - break _v0$1; - } else { - break _v0$5; - } - } - } - } - return list; - } - var _v1 = _v0.b; - var x = _v1.a; - return _List_fromArray( - [x]); + return A2($mdgriffith$elm_ui$Internal$Model$Nearby, loc, element); } }); -var $elm$core$List$take = F2( - function (n, list) { - return A3($elm$core$List$takeFast, 0, n, list); - }); -var $author$project$Widget$Layout$partitionActions = function (actions) { - return { - moreActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$drop, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$drop, 1, actions) : (($elm$core$List$length(actions) === 3) ? actions : A2($elm$core$List$drop, 2, actions))), - primaryActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$take, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$take, 1, actions) : (($elm$core$List$length(actions) === 3) ? _List_Nil : A2($elm$core$List$take, 2, actions))) - }; +var $mdgriffith$elm_ui$Element$inFront = function (element) { + return A2($mdgriffith$elm_ui$Element$createNearby, $mdgriffith$elm_ui$Internal$Model$InFront, element); }; +var $author$project$Internal$Item$toItem = F2( + function (style, element) { + return function (attr) { + return A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap(attr, style.element), + element(style.content)); + }; + }); +var $author$project$Internal$Item$asItem = function (element) { + return A2( + $author$project$Internal$Item$toItem, + {content: _Utils_Tuple0, element: _List_Nil}, + $elm$core$Basics$always(element)); +}; +var $author$project$Widget$Customize$mapElementColumn = F2( + function (fun, a) { + return _Utils_update( + a, + { + elementColumn: fun(a.elementColumn) + }); + }); +var $author$project$Widget$Customize$elementColumn = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementColumn, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $mdgriffith$elm_ui$Internal$Model$AsColumn = {$: 'AsColumn'}; +var $mdgriffith$elm_ui$Internal$Model$asColumn = $mdgriffith$elm_ui$Internal$Model$AsColumn; +var $mdgriffith$elm_ui$Element$column = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asColumn, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentTop + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentLeft)), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $author$project$Internal$List$internal = F2( + function (style, list) { + return A2( + $elm$core$List$indexedMap, + F2( + function (i, fun) { + return fun( + _Utils_ap( + style.element, + ($elm$core$List$length(list) === 1) ? style.ifSingleton : ((!i) ? style.ifFirst : (_Utils_eq( + i, + $elm$core$List$length(list) - 1) ? style.ifLast : style.otherwise)))); + }), + list); + }); +var $author$project$Internal$List$itemList = function (style) { + return A2( + $elm$core$Basics$composeR, + $author$project$Internal$List$internal(style.content), + $mdgriffith$elm_ui$Element$column(style.elementColumn)); +}; +var $author$project$Internal$Select$select = function (_v0) { + var selected = _v0.selected; + var options = _v0.options; + var onSelect = _v0.onSelect; + return A2( + $elm$core$List$indexedMap, + F2( + function (i, a) { + return _Utils_Tuple2( + _Utils_eq( + selected, + $elm$core$Maybe$Just(i)), + { + icon: a.icon, + onPress: onSelect(i), + text: a.text + }); + }), + options); +}; +var $mdgriffith$elm_ui$Internal$Model$Button = {$: 'Button'}; +var $elm$json$Json$Encode$bool = _Json_wrap; +var $elm$html$Html$Attributes$boolProperty = F2( + function (key, bool) { + return A2( + _VirtualDom_property, + key, + $elm$json$Json$Encode$bool(bool)); + }); +var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); +var $mdgriffith$elm_ui$Element$Input$hasFocusStyle = function (attr) { + if (((attr.$ === 'StyleClass') && (attr.b.$ === 'PseudoSelector')) && (attr.b.a.$ === 'Focus')) { + var _v1 = attr.b; + var _v2 = _v1.a; + return true; + } else { + return false; + } +}; +var $mdgriffith$elm_ui$Element$Input$focusDefault = function (attrs) { + return A2($elm$core$List$any, $mdgriffith$elm_ui$Element$Input$hasFocusStyle, attrs) ? $mdgriffith$elm_ui$Internal$Model$NoAttribute : $mdgriffith$elm_ui$Internal$Model$htmlClass('focusable'); +}; +var $elm$virtual_dom$VirtualDom$Normal = function (a) { + return {$: 'Normal', a: a}; +}; +var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; +var $elm$html$Html$Events$on = F2( + function (event, decoder) { + return A2( + $elm$virtual_dom$VirtualDom$on, + event, + $elm$virtual_dom$VirtualDom$Normal(decoder)); + }); +var $elm$html$Html$Events$onClick = function (msg) { + return A2( + $elm$html$Html$Events$on, + 'click', + $elm$json$Json$Decode$succeed(msg)); +}; +var $mdgriffith$elm_ui$Element$Events$onClick = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Attr, $elm$html$Html$Events$onClick); +var $mdgriffith$elm_ui$Element$Input$enter = 'Enter'; +var $elm$json$Json$Decode$andThen = _Json_andThen; +var $elm$json$Json$Decode$fail = _Json_fail; +var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { + return {$: 'MayPreventDefault', a: a}; +}; +var $elm$html$Html$Events$preventDefaultOn = F2( + function (event, decoder) { + return A2( + $elm$virtual_dom$VirtualDom$on, + event, + $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); + }); +var $elm$json$Json$Decode$string = _Json_decodeString; +var $mdgriffith$elm_ui$Element$Input$onKey = F2( + function (desiredCode, msg) { + var decode = function (code) { + return _Utils_eq(code, desiredCode) ? $elm$json$Json$Decode$succeed(msg) : $elm$json$Json$Decode$fail('Not the enter key'); + }; + var isKey = A2( + $elm$json$Json$Decode$andThen, + decode, + A2($elm$json$Json$Decode$field, 'key', $elm$json$Json$Decode$string)); + return $mdgriffith$elm_ui$Internal$Model$Attr( + A2( + $elm$html$Html$Events$preventDefaultOn, + 'keyup', + A2( + $elm$json$Json$Decode$map, + function (fired) { + return _Utils_Tuple2(fired, true); + }, + isKey))); + }); +var $mdgriffith$elm_ui$Element$Input$onEnter = function (msg) { + return A2($mdgriffith$elm_ui$Element$Input$onKey, $mdgriffith$elm_ui$Element$Input$enter, msg); +}; +var $mdgriffith$elm_ui$Internal$Flag$cursor = $mdgriffith$elm_ui$Internal$Flag$flag(21); +var $mdgriffith$elm_ui$Element$pointer = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$cursor, $mdgriffith$elm_ui$Internal$Style$classes.cursorPointer); +var $elm$html$Html$Attributes$tabindex = function (n) { + return A2( + _VirtualDom_attribute, + 'tabIndex', + $elm$core$String$fromInt(n)); +}; +var $mdgriffith$elm_ui$Element$Input$button = F2( + function (attrs, _v0) { + var onPress = _v0.onPress; + var label = _v0.label; + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asEl, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentCenterX + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.contentCenterY + (' ' + ($mdgriffith$elm_ui$Internal$Style$classes.seButton + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.noTextSelection)))))), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$pointer, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Input$focusDefault(attrs), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Button), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$tabindex(0)), + function () { + if (onPress.$ === 'Nothing') { + return A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Attr( + $elm$html$Html$Attributes$disabled(true)), + attrs); + } else { + var msg = onPress.a; + return A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Events$onClick(msg), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$Input$onEnter(msg), + attrs)); + } + }()))))))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed( + _List_fromArray( + [label]))); + }); +var $mdgriffith$elm_ui$Internal$Model$AsRow = {$: 'AsRow'}; +var $mdgriffith$elm_ui$Internal$Model$asRow = $mdgriffith$elm_ui$Internal$Model$AsRow; +var $mdgriffith$elm_ui$Element$row = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asRow, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.contentLeft + (' ' + $mdgriffith$elm_ui$Internal$Style$classes.contentCenterY)), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$shrink), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $mdgriffith$elm_ui$Element$text = function (content) { + return $mdgriffith$elm_ui$Internal$Model$Text(content); +}; +var $author$project$Internal$Select$selectButton = F2( + function (style, _v0) { + var selected = _v0.a; + var b = _v0.b; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : (selected ? style.ifActive : style.otherwise)), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + b.icon( + _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : (selected ? style.content.content.icon.ifActive : style.content.content.icon.otherwise)), + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.contentText, + $mdgriffith$elm_ui$Element$text(b.text)) + ])), + onPress: b.onPress + }); + }); +var $author$project$Internal$Item$selectItem = F2( + function (s, select) { + return A2( + $elm$core$List$map, + function (b) { + return A2( + $author$project$Internal$Item$toItem, + s, + function (style) { + return A2($author$project$Internal$Select$selectButton, style, b); + }); + }, + $author$project$Internal$Select$select(select)); + }); +var $author$project$Widget$Layout$leftSheet = F2( + function (style, _v0) { + var title = _v0.title; + var onDismiss = _v0.onDismiss; + var menu = _v0.menu; + return { + content: A2( + $author$project$Internal$List$itemList, + A2( + $author$project$Widget$Customize$elementColumn, + _List_fromArray( + [$mdgriffith$elm_ui$Element$alignLeft]), + style.sheet), + A2( + $elm$core$List$cons, + $author$project$Internal$Item$asItem(title), + A2($author$project$Internal$Item$selectItem, style.button, menu))), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $mdgriffith$elm_ui$Internal$Model$Label = function (a) { + return {$: 'Label', a: a}; +}; +var $mdgriffith$elm_ui$Element$Region$description = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Label); +var $author$project$Internal$Button$iconButton = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_ap( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Region$description(text) + ]))), + { + label: A2( + $mdgriffith$elm_ui$Element$el, + style.content.elementRow, + icon( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise)), + onPress: onPress + }); + }); +var $author$project$Internal$Button$button = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + icon( + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise), + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.contentText, + $mdgriffith$elm_ui$Element$text(text)) + ])), + onPress: onPress + }); + }); +var $mdgriffith$elm_ui$Element$Input$Placeholder = F2( + function (a, b) { + return {$: 'Placeholder', a: a, b: b}; + }); +var $mdgriffith$elm_ui$Element$Input$placeholder = $mdgriffith$elm_ui$Element$Input$Placeholder; var $mdgriffith$elm_ui$Element$Input$HiddenLabel = function (a) { return {$: 'HiddenLabel', a: a}; }; @@ -17559,6 +17586,8 @@ var $mdgriffith$elm_ui$Element$Input$calcMoveToCompensateForPadding = function ( $elm$core$Basics$floor(vSpace / 2)); } }; +var $mdgriffith$elm_ui$Internal$Flag$overflow = $mdgriffith$elm_ui$Internal$Flag$flag(20); +var $mdgriffith$elm_ui$Element$clip = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$overflow, $mdgriffith$elm_ui$Internal$Style$classes.clip); var $mdgriffith$elm_ui$Element$rgb = F3( function (r, g, b) { return A4($mdgriffith$elm_ui$Internal$Model$Rgba, r, g, b, 1); @@ -17585,8 +17614,14 @@ var $mdgriffith$elm_ui$Element$Input$getHeight = function (attr) { return $elm$core$Maybe$Nothing; } }; -var $mdgriffith$elm_ui$Internal$Model$Label = function (a) { - return {$: 'Label', a: a}; +var $elm$core$List$head = function (list) { + if (list.b) { + var x = list.a; + var xs = list.b; + return $elm$core$Maybe$Just(x); + } else { + return $elm$core$Maybe$Nothing; + } }; var $mdgriffith$elm_ui$Element$Input$hiddenLabelAttribute = function (label) { if (label.$ === 'HiddenLabel') { @@ -18275,222 +18310,25 @@ var $author$project$Internal$TextInput$textInput = F2( }) ])); }); -var $author$project$Widget$Snackbar$current = function (model) { - return A2($elm$core$Maybe$map, $elm$core$Tuple$first, model.current); -}; -var $author$project$Widget$Snackbar$view = F3( - function (style, toMessage, model) { - return A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - toMessage, - function (_v0) { - var text = _v0.text; - var button = _v0.button; - return A2( - $mdgriffith$elm_ui$Element$row, - style.elementRow, - _List_fromArray( - [ - A2( - $mdgriffith$elm_ui$Element$paragraph, - style.content.text.elementText, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text(text))), - A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - $author$project$Internal$Button$textButton(style.content.button), - button)) - ])); - }), - $author$project$Widget$Snackbar$current(model)); - }); -var $author$project$Internal$Select$select = function (_v0) { - var selected = _v0.selected; - var options = _v0.options; - var onSelect = _v0.onSelect; - return A2( - $elm$core$List$indexedMap, - F2( - function (i, a) { - return _Utils_Tuple2( - _Utils_eq( - selected, - $elm$core$Maybe$Just(i)), - { - icon: a.icon, - onPress: onSelect(i), - text: a.text - }); - }), - options); -}; -var $author$project$Internal$Select$selectButton = F2( - function (style, _v0) { - var selected = _v0.a; - var b = _v0.b; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : (selected ? style.ifActive : style.otherwise)), - { - label: A2( - $mdgriffith$elm_ui$Element$row, - style.content.elementRow, - _List_fromArray( - [ - b.icon( - _Utils_eq(b.onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : (selected ? style.content.content.icon.ifActive : style.content.content.icon.otherwise)), - A2( - $mdgriffith$elm_ui$Element$el, - style.content.content.text.contentText, - $mdgriffith$elm_ui$Element$text(b.text)) - ])), - onPress: b.onPress - }); - }); -var $author$project$Widget$Layout$viewLeftSheet = F2( - function (style, _v0) { - var title = _v0.title; - var menu = _v0.menu; - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap( - style.sheet, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$alignLeft - ])), - A2( - $mdgriffith$elm_ui$Element$column, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]), - $elm$core$List$concat( - _List_fromArray( - [ - _List_fromArray( - [title]), - A2( - $elm$core$List$map, - $author$project$Internal$Select$selectButton(style.sheetButton), - $author$project$Internal$Select$select(menu)) - ])))); - }); -var $author$project$Widget$Layout$LeftSheet = {$: 'LeftSheet'}; -var $author$project$Widget$Layout$RightSheet = {$: 'RightSheet'}; -var $author$project$Widget$Layout$Search = {$: 'Search'}; -var $mdgriffith$elm_ui$Element$Region$description = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Label); -var $author$project$Internal$Button$iconButton = F2( - function (style, _v0) { - var onPress = _v0.onPress; - var text = _v0.text; - var icon = _v0.icon; - return A2( - $mdgriffith$elm_ui$Element$Input$button, - _Utils_ap( - style.elementButton, - _Utils_ap( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Region$description(text) - ]))), - { - label: A2( - $mdgriffith$elm_ui$Element$el, - style.content.elementRow, - icon( - _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.content.content.icon.ifDisabled : style.content.content.icon.otherwise)), - onPress: onPress - }); - }); -var $author$project$Widget$Layout$viewNav = F2( - function (style, _v0) { - var title = _v0.title; - var menu = _v0.menu; +var $author$project$Internal$AppBar$internalNav = F3( + function (menuElements, style, _v0) { var deviceClass = _v0.deviceClass; - var onChangedSidebar = _v0.onChangedSidebar; + var openRightSheet = _v0.openRightSheet; + var openTopSheet = _v0.openTopSheet; var primaryActions = _v0.primaryActions; - var moreActions = _v0.moreActions; var search = _v0.search; return A2( $mdgriffith$elm_ui$Element$row, _Utils_ap( - style.header, + style.elementRow, _List_fromArray( [ - $mdgriffith$elm_ui$Element$padding(0), - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$spacing(style.spacing), $mdgriffith$elm_ui$Element$alignTop, $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) ])), _List_fromArray( [ - A2( - $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - $mdgriffith$elm_ui$Element$spacing(style.spacing) - ]), - (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? _List_fromArray( - [ - A2( - $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.menuIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$LeftSheet))), - text: 'Menu' - }), - A2( - $mdgriffith$elm_ui$Element$el, - style.title, - A2( - $elm$core$Maybe$withDefault, - title, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - function ($) { - return $.text; - }, - $mdgriffith$elm_ui$Element$text), - A2( - $elm$core$Maybe$andThen, - function (option) { - return A2( - $elm$core$Array$get, - option, - $elm$core$Array$fromList(menu.options)); - }, - menu.selected)))) - ]) : _List_fromArray( - [ - A2($mdgriffith$elm_ui$Element$el, style.title, title), - A2( - $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) - ]), - A2( - $elm$core$List$map, - $author$project$Internal$Select$selectButton(style.menuTabButton), - $author$project$Internal$Select$select(menu))) - ])), + A2($mdgriffith$elm_ui$Element$row, style.content.menu.elementRow, menuElements), (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet)) ? $mdgriffith$elm_ui$Element$none : A2( $elm$core$Maybe$withDefault, $mdgriffith$elm_ui$Element$none, @@ -18502,7 +18340,7 @@ var $author$project$Widget$Layout$viewNav = F2( var label = _v1.label; return A2( $author$project$Internal$TextInput$textInput, - style.search, + style.content.search, { chips: _List_Nil, label: label, @@ -18518,11 +18356,7 @@ var $author$project$Widget$Layout$viewNav = F2( search)), A2( $mdgriffith$elm_ui$Element$row, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink), - $mdgriffith$elm_ui$Element$alignRight - ]), + style.content.actions.elementRow, $elm$core$List$concat( _List_fromArray( [ @@ -18537,214 +18371,289 @@ var $author$project$Widget$Layout$viewNav = F2( [ A2( $author$project$Internal$Button$button, - style.menuButton, - { - icon: style.searchIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$Search))), - text: label - }) + A2( + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.actions.content.button), + {icon: style.content.actions.content.searchIcon, onPress: openTopSheet, text: label}) ]) : (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? _List_fromArray( [ A2( $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.searchIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$Search))), - text: label - }) + style.content.actions.content.button, + {icon: style.content.actions.content.searchIcon, onPress: openTopSheet, text: label}) ]) : _List_Nil); }, search)), A2( $elm$core$List$map, - _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? $author$project$Internal$Button$iconButton(style.menuButton) : $author$project$Internal$Button$button(style.menuButton), - primaryActions), - $elm$core$List$isEmpty(moreActions) ? _List_Nil : _List_fromArray( - [ + _Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) ? $author$project$Internal$Button$iconButton(style.content.actions.content.button) : $author$project$Internal$Button$button( A2( - $author$project$Internal$Button$iconButton, - style.menuButton, - { - icon: style.moreVerticalIcon, - onPress: $elm$core$Maybe$Just( - onChangedSidebar( - $elm$core$Maybe$Just($author$project$Widget$Layout$RightSheet))), - text: 'More' - }) - ]) + $author$project$Widget$Customize$elementButton, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.actions.content.button)), + primaryActions), + function () { + if (openRightSheet.$ === 'Nothing') { + return _List_Nil; + } else { + return _List_fromArray( + [ + A2( + $author$project$Internal$Button$iconButton, + style.content.actions.content.button, + {icon: style.content.actions.content.moreVerticalIcon, onPress: openRightSheet, text: 'More'}) + ]); + } + }() ]))) ])); }); -var $author$project$Widget$Layout$view = F3( - function (style, _v0, content) { - var search = _v0.search; - var title = _v0.title; - var onChangedSidebar = _v0.onChangedSidebar; - var menu = _v0.menu; - var actions = _v0.actions; - var window = _v0.window; - var dialog = _v0.dialog; - var layout = _v0.layout; - var snackbar = A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - $mdgriffith$elm_ui$Element$el( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$padding(style.spacing), - $mdgriffith$elm_ui$Element$alignBottom, - $mdgriffith$elm_ui$Element$alignRight - ])), - A3($author$project$Widget$Snackbar$view, style.snackbar, $elm$core$Basics$identity, layout.snackbar))); - var deviceClass = $author$project$Widget$Layout$getDeviceClass(window); - var _v1 = $author$project$Widget$Layout$partitionActions(actions); - var primaryActions = _v1.primaryActions; - var moreActions = _v1.moreActions; - var sheet = function () { - var _v3 = layout.active; - if (_v3.$ === 'Just') { - switch (_v3.a.$) { - case 'LeftSheet': - var _v4 = _v3.a; - return A2( - $author$project$Widget$Layout$viewLeftSheet, - style, - {menu: menu, title: title}); - case 'RightSheet': - var _v5 = _v3.a; - return A2( - $author$project$Widget$Layout$buttonSheet, - { - content: {content: style.sheetButton, elementColumn: _List_Nil}, - element: _Utils_ap( - style.sheet, - _List_fromArray( - [$mdgriffith$elm_ui$Element$alignRight])) - }, - moreActions); - default: - var _v6 = _v3.a; - return A2( - $elm$core$Maybe$withDefault, - $mdgriffith$elm_ui$Element$none, - A2( - $elm$core$Maybe$map, - A2( - $elm$core$Basics$composeR, - $author$project$Internal$TextInput$textInput( - A2( - $author$project$Widget$Customize$mapContent, - function (record) { - return _Utils_update( - record, - { - text: A2( - $author$project$Widget$Customize$elementTextInput, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]), - record.text) - }); - }, - style.searchFill)), - $mdgriffith$elm_ui$Element$el( - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$alignTop, - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) - ]))), - search)); - } +var $author$project$Internal$AppBar$menuBar = F2( + function (style, m) { + return A3( + $author$project$Internal$AppBar$internalNav, + _List_fromArray( + [ + A2( + $author$project$Internal$Button$iconButton, + style.content.actions.content.button, + {icon: style.content.menu.content.menuIcon, onPress: m.openLeftSheet, text: 'Menu'}), + A2($mdgriffith$elm_ui$Element$el, style.content.menu.content.title, m.title) + ]), + { + content: { + actions: style.content.actions, + menu: {elementRow: style.content.menu.elementRow}, + search: style.content.search + }, + elementRow: style.elementRow + }, + m); + }); +var $author$project$Widget$menuBar = $author$project$Internal$AppBar$menuBar; +var $author$project$Widget$Layout$orderModals = function (modals) { + return A2( + $elm$core$List$filterMap, + $elm$core$Basics$identity, + _List_fromArray( + [modals.dialog, modals.leftSheet, modals.rightSheet, modals.topSheet])); +}; +var $elm$core$List$drop = F2( + function (n, list) { + drop: + while (true) { + if (n <= 0) { + return list; } else { - return $mdgriffith$elm_ui$Element$none; + if (!list.b) { + return list; + } else { + var x = list.a; + var xs = list.b; + var $temp$n = n - 1, + $temp$list = xs; + n = $temp$n; + list = $temp$list; + continue drop; + } } - }(); - var nav = A2( - $author$project$Widget$Layout$viewNav, - style, - {deviceClass: deviceClass, menu: menu, moreActions: moreActions, onChangedSidebar: onChangedSidebar, primaryActions: primaryActions, search: search, title: title}); - return A2( - style.layout, - $elm$core$List$concat( - _List_fromArray( - [ - style.container, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$inFront(nav), - $mdgriffith$elm_ui$Element$inFront(snackbar) - ]), - function () { - if ((!_Utils_eq(layout.active, $elm$core$Maybe$Nothing)) || (!_Utils_eq(dialog, $elm$core$Maybe$Nothing))) { - if (dialog.$ === 'Just') { - var dialogConfig = dialog.a; - return dialogConfig; - } else { - return $author$project$Internal$Dialog$modal( - { - content: sheet, - onDismiss: $elm$core$Maybe$Just( - onChangedSidebar($elm$core$Maybe$Nothing)) - }); + } + }); +var $elm$core$List$takeReverse = F3( + function (n, list, kept) { + takeReverse: + while (true) { + if (n <= 0) { + return kept; + } else { + if (!list.b) { + return kept; + } else { + var x = list.a; + var xs = list.b; + var $temp$n = n - 1, + $temp$list = xs, + $temp$kept = A2($elm$core$List$cons, x, kept); + n = $temp$n; + list = $temp$list; + kept = $temp$kept; + continue takeReverse; + } + } + } + }); +var $elm$core$List$takeTailRec = F2( + function (n, list) { + return $elm$core$List$reverse( + A3($elm$core$List$takeReverse, n, list, _List_Nil)); + }); +var $elm$core$List$takeFast = F3( + function (ctr, n, list) { + if (n <= 0) { + return _List_Nil; + } else { + var _v0 = _Utils_Tuple2(n, list); + _v0$1: + while (true) { + _v0$5: + while (true) { + if (!_v0.b.b) { + return list; + } else { + if (_v0.b.b.b) { + switch (_v0.a) { + case 1: + break _v0$1; + case 2: + var _v2 = _v0.b; + var x = _v2.a; + var _v3 = _v2.b; + var y = _v3.a; + return _List_fromArray( + [x, y]); + case 3: + if (_v0.b.b.b.b) { + var _v4 = _v0.b; + var x = _v4.a; + var _v5 = _v4.b; + var y = _v5.a; + var _v6 = _v5.b; + var z = _v6.a; + return _List_fromArray( + [x, y, z]); + } else { + break _v0$5; + } + default: + if (_v0.b.b.b.b && _v0.b.b.b.b.b) { + var _v7 = _v0.b; + var x = _v7.a; + var _v8 = _v7.b; + var y = _v8.a; + var _v9 = _v8.b; + var z = _v9.a; + var _v10 = _v9.b; + var w = _v10.a; + var tl = _v10.b; + return (ctr > 1000) ? A2( + $elm$core$List$cons, + x, + A2( + $elm$core$List$cons, + y, + A2( + $elm$core$List$cons, + z, + A2( + $elm$core$List$cons, + w, + A2($elm$core$List$takeTailRec, n - 4, tl))))) : A2( + $elm$core$List$cons, + x, + A2( + $elm$core$List$cons, + y, + A2( + $elm$core$List$cons, + z, + A2( + $elm$core$List$cons, + w, + A3($elm$core$List$takeFast, ctr + 1, n - 4, tl))))); + } else { + break _v0$5; + } } } else { - return _List_Nil; + if (_v0.a === 1) { + break _v0$1; + } else { + break _v0$5; + } } - }() - ])), - content); + } + } + return list; + } + var _v1 = _v0.b; + var x = _v1.a; + return _List_fromArray( + [x]); + } }); -var $author$project$Data$Section$ReusableViews = {$: 'ReusableViews'}; -var $author$project$Data$Section$StatelessViews = {$: 'StatelessViews'}; -var $author$project$Main$ToggledExample = function (a) { - return {$: 'ToggledExample', a: a}; -}; -var $Orasund$elm_ui_framework$Framework$Grid$compact = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), - $mdgriffith$elm_ui$Element$alignTop - ]); -var $mdgriffith$elm_ui$Internal$Model$Main = {$: 'Main'}; -var $mdgriffith$elm_ui$Element$Region$mainContent = $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Main); -var $Orasund$elm_ui_framework$Framework$container = _List_fromArray( - [ - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$centerY, - $mdgriffith$elm_ui$Element$width( - A2($mdgriffith$elm_ui$Element$maximum, 1200, $mdgriffith$elm_ui$Element$fill)), - $mdgriffith$elm_ui$Element$padding(20), - $mdgriffith$elm_ui$Element$Region$mainContent, - $mdgriffith$elm_ui$Element$Background$color( - A3($mdgriffith$elm_ui$Element$rgb255, 255, 255, 255)) - ]); -var $author$project$Internal$Item$toItem = F2( - function (style, element) { - return function (attr) { - return A2( - $mdgriffith$elm_ui$Element$el, - _Utils_ap(attr, style.element), - element(style.content)); - }; +var $elm$core$List$take = F2( + function (n, list) { + return A3($elm$core$List$takeFast, 0, n, list); }); -var $author$project$Internal$Item$divider = function (style) { - return A2( - $author$project$Internal$Item$toItem, - style, - function (_v0) { - var element = _v0.element; - return A2($mdgriffith$elm_ui$Element$el, element, $mdgriffith$elm_ui$Element$none); - }); +var $author$project$Widget$Layout$partitionActions = function (actions) { + return { + moreActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$drop, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$drop, 1, actions) : (($elm$core$List$length(actions) === 3) ? actions : A2($elm$core$List$drop, 2, actions))), + primaryActions: ($elm$core$List$length(actions) > 4) ? A2($elm$core$List$take, 2, actions) : (($elm$core$List$length(actions) === 4) ? A2($elm$core$List$take, 1, actions) : (($elm$core$List$length(actions) === 3) ? _List_Nil : A2($elm$core$List$take, 2, actions))) + }; }; -var $author$project$Widget$divider = $author$project$Internal$Item$divider; -var $author$project$Internal$Item$textItem = F2( +var $feathericons$elm_feather$FeatherIcons$penTool = A2( + $feathericons$elm_feather$FeatherIcons$makeBuilder, + 'pen-tool', + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M12 19l7-7 3 3-7 7-3-3z') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M2 2l7.586 7.586') + ]), + _List_Nil), + A2( + $elm$svg$Svg$circle, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$cx('11'), + $elm$svg$Svg$Attributes$cy('11'), + $elm$svg$Svg$Attributes$r('2') + ]), + _List_Nil) + ])); +var $mdgriffith$elm_ui$Internal$Model$Paragraph = {$: 'Paragraph'}; +var $mdgriffith$elm_ui$Element$paragraph = F2( + function (attrs, children) { + return A4( + $mdgriffith$elm_ui$Internal$Model$element, + $mdgriffith$elm_ui$Internal$Model$asParagraph, + $mdgriffith$elm_ui$Internal$Model$div, + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Paragraph), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + A2( + $elm$core$List$cons, + $mdgriffith$elm_ui$Element$spacing(5), + attrs))), + $mdgriffith$elm_ui$Internal$Model$Unkeyed(children)); + }); +var $author$project$Internal$Item$insetItem = F2( function (s, _v0) { var onPress = _v0.onPress; var text = _v0.text; @@ -18783,6 +18692,603 @@ var $author$project$Internal$Item$textItem = F2( }); }); }); +var $author$project$Widget$Layout$rightSheet = F2( + function (style, _v0) { + var onDismiss = _v0.onDismiss; + var moreActions = _v0.moreActions; + return { + content: A2( + $author$project$Internal$List$itemList, + A2( + $author$project$Widget$Customize$elementColumn, + _List_fromArray( + [$mdgriffith$elm_ui$Element$alignRight]), + style.sheet), + A2( + $elm$core$List$map, + function (_v1) { + var onPress = _v1.onPress; + var text = _v1.text; + var icon = _v1.icon; + return A2( + $author$project$Internal$Item$insetItem, + style.insetItem, + { + content: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + icon: icon, + onPress: onPress, + text: text + }); + }, + moreActions)), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $author$project$Widget$Customize$elementRow = F2( + function (list, a) { + return A2( + $author$project$Widget$Customize$mapElementRow, + function (b) { + return _Utils_ap(b, list); + }, + a); + }); +var $author$project$Widget$Layout$searchSheet = F2( + function (style, _v0) { + var onDismiss = _v0.onDismiss; + var search = _v0.search; + return { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignTop, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + A2( + $author$project$Internal$TextInput$textInput, + A2( + $author$project$Widget$Customize$mapContent, + function (record) { + return _Utils_update( + record, + {text: record.text}); + }, + A2( + $author$project$Widget$Customize$elementRow, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill) + ]), + style)), + search)), + onDismiss: $elm$core$Maybe$Just(onDismiss) + }; + }); +var $author$project$Internal$Modal$background = function (onDismiss) { + return _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront( + A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$height($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$Background$color( + A4($mdgriffith$elm_ui$Element$rgba255, 0, 0, 0, 0.5)) + ]), + A2( + $elm$core$Maybe$withDefault, + _List_Nil, + A2( + $elm$core$Maybe$map, + A2($elm$core$Basics$composeR, $mdgriffith$elm_ui$Element$Events$onClick, $elm$core$List$singleton), + onDismiss))), + $mdgriffith$elm_ui$Element$none)), + $mdgriffith$elm_ui$Element$clip + ]); +}; +var $author$project$Internal$Modal$singleModal = A2( + $elm$core$Basics$composeR, + $elm$core$List$head, + A2( + $elm$core$Basics$composeR, + $elm$core$Maybe$map( + function (_v0) { + var onDismiss = _v0.onDismiss; + var content = _v0.content; + return _Utils_ap( + $author$project$Internal$Modal$background(onDismiss), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(content) + ])); + }), + $elm$core$Maybe$withDefault(_List_Nil))); +var $author$project$Widget$singleModal = $author$project$Internal$Modal$singleModal; +var $author$project$Internal$AppBar$tabBar = F2( + function (style, m) { + return A3( + $author$project$Internal$AppBar$internalNav, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$el, style.content.menu.content.title, m.title), + A2( + $mdgriffith$elm_ui$Element$row, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + A2( + $elm$core$List$map, + $author$project$Internal$Select$selectButton(style.content.menu.content.menuTabButton), + $author$project$Internal$Select$select(m.menu))) + ]), + { + content: { + actions: style.content.actions, + menu: {elementRow: style.content.menu.elementRow}, + search: style.content.search + }, + elementRow: style.elementRow + }, + m); + }); +var $author$project$Widget$tabBar = $author$project$Internal$AppBar$tabBar; +var $elm$svg$Svg$Attributes$class = _VirtualDom_attribute('class'); +var $elm$svg$Svg$map = $elm$virtual_dom$VirtualDom$map; +var $elm$svg$Svg$Attributes$strokeLinejoin = _VirtualDom_attribute('stroke-linejoin'); +var $feathericons$elm_feather$FeatherIcons$toHtml = F2( + function (attributes, _v0) { + var src = _v0.a.src; + var attrs = _v0.a.attrs; + var strSize = $elm$core$String$fromFloat(attrs.size); + var baseAttributes = _List_fromArray( + [ + $elm$svg$Svg$Attributes$fill('none'), + $elm$svg$Svg$Attributes$height( + _Utils_ap(strSize, attrs.sizeUnit)), + $elm$svg$Svg$Attributes$width( + _Utils_ap(strSize, attrs.sizeUnit)), + $elm$svg$Svg$Attributes$stroke('currentColor'), + $elm$svg$Svg$Attributes$strokeLinecap('round'), + $elm$svg$Svg$Attributes$strokeLinejoin('round'), + $elm$svg$Svg$Attributes$strokeWidth( + $elm$core$String$fromFloat(attrs.strokeWidth)), + $elm$svg$Svg$Attributes$viewBox(attrs.viewBox) + ]); + var combinedAttributes = _Utils_ap( + function () { + var _v1 = attrs._class; + if (_v1.$ === 'Just') { + var c = _v1.a; + return A2( + $elm$core$List$cons, + $elm$svg$Svg$Attributes$class(c), + baseAttributes); + } else { + return baseAttributes; + } + }(), + attributes); + return A2( + $elm$svg$Svg$svg, + combinedAttributes, + A2( + $elm$core$List$map, + $elm$svg$Svg$map($elm$core$Basics$never), + src)); + }); +var $elm_community$intdict$IntDict$findMin = function (dict) { + findMin: + while (true) { + switch (dict.$) { + case 'Empty': + return $elm$core$Maybe$Nothing; + case 'Leaf': + var l = dict.a; + return $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = dict.a; + var $temp$dict = i.left; + dict = $temp$dict; + continue findMin; + } + } +}; +var $elm_community$intdict$IntDict$after = F2( + function (key, dict) { + var go = F2( + function (def, currentDict) { + go: + while (true) { + switch (currentDict.$) { + case 'Empty': + return $elm_community$intdict$IntDict$findMin(def); + case 'Leaf': + var l = currentDict.a; + return (_Utils_cmp(l.key, key) < 1) ? $elm_community$intdict$IntDict$findMin(def) : $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = currentDict.a; + if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { + return (_Utils_cmp(i.prefix.prefixBits, key) < 0) ? $elm_community$intdict$IntDict$findMin(def) : $elm_community$intdict$IntDict$findMin(i.left); + } else { + if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { + var $temp$def = def, + $temp$currentDict = i.right; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } else { + var $temp$def = i.right, + $temp$currentDict = i.left; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } + } + } + } + }); + return A2(go, $elm_community$intdict$IntDict$Empty, dict); + }); +var $elm$core$Maybe$andThen = F2( + function (callback, maybeValue) { + if (maybeValue.$ === 'Just') { + var value = maybeValue.a; + return callback(value); + } else { + return $elm$core$Maybe$Nothing; + } + }); +var $elm_community$intdict$IntDict$findMax = function (dict) { + findMax: + while (true) { + switch (dict.$) { + case 'Empty': + return $elm$core$Maybe$Nothing; + case 'Leaf': + var l = dict.a; + return $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = dict.a; + var $temp$dict = i.right; + dict = $temp$dict; + continue findMax; + } + } +}; +var $elm_community$intdict$IntDict$before = F2( + function (key, dict) { + var go = F2( + function (def, currentDict) { + go: + while (true) { + switch (currentDict.$) { + case 'Empty': + return $elm_community$intdict$IntDict$findMax(def); + case 'Leaf': + var l = currentDict.a; + return (_Utils_cmp(l.key, key) > -1) ? $elm_community$intdict$IntDict$findMax(def) : $elm$core$Maybe$Just( + _Utils_Tuple2(l.key, l.value)); + default: + var i = currentDict.a; + if (!A2($elm_community$intdict$IntDict$prefixMatches, i.prefix, key)) { + return (_Utils_cmp(i.prefix.prefixBits, key) > 0) ? $elm_community$intdict$IntDict$findMax(def) : $elm_community$intdict$IntDict$findMax(i.right); + } else { + if (A2($elm_community$intdict$IntDict$isBranchingBitSet, i.prefix, key)) { + var $temp$def = i.left, + $temp$currentDict = i.right; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } else { + var $temp$def = def, + $temp$currentDict = i.left; + def = $temp$def; + currentDict = $temp$currentDict; + continue go; + } + } + } + } + }); + return A2(go, $elm_community$intdict$IntDict$Empty, dict); + }); +var $author$project$Widget$ScrollingNav$current = F2( + function (fromString, _v0) { + var positions = _v0.positions; + var scrollPos = _v0.scrollPos; + return A2( + $elm$core$Maybe$andThen, + fromString, + A2( + $elm$core$Maybe$map, + $elm$core$Tuple$second, + A2( + $elm$core$Maybe$withDefault, + A2($elm_community$intdict$IntDict$after, scrollPos + 1, positions), + A2( + $elm$core$Maybe$map, + $elm$core$Maybe$Just, + A2($elm_community$intdict$IntDict$before, scrollPos + 1, positions))))); + }); +var $author$project$Widget$ScrollingNav$toSelect = F2( + function (onSelect, model) { + var arrangement = model.arrangement; + var toString = model.toString; + var fromString = model.fromString; + return { + onSelect: onSelect, + options: A2( + $elm$core$List$map, + function (s) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: toString(s) + }; + }, + arrangement), + selected: $elm$core$List$head( + A2( + $elm$core$List$filterMap, + function (_v0) { + var i = _v0.a; + var s = _v0.b; + return _Utils_eq( + $elm$core$Maybe$Just(s), + A2($author$project$Widget$ScrollingNav$current, fromString, model)) ? $elm$core$Maybe$Just(i) : $elm$core$Maybe$Nothing; + }, + A2( + $elm$core$List$indexedMap, + F2( + function (i, s) { + return _Utils_Tuple2(i, s); + }), + arrangement))) + }; + }); +var $author$project$Widget$Snackbar$current = function (model) { + return A2($elm$core$Maybe$map, $elm$core$Tuple$first, model.current); +}; +var $author$project$Internal$Button$textButton = F2( + function (style, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + return A2( + $author$project$Internal$Button$button, + style, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: onPress, + text: text + }); + }); +var $author$project$Widget$Snackbar$view = F3( + function (style, toMessage, model) { + return A2( + $elm$core$Maybe$map, + A2( + $elm$core$Basics$composeR, + toMessage, + function (_v0) { + var text = _v0.text; + var button = _v0.button; + return A2( + $mdgriffith$elm_ui$Element$row, + style.elementRow, + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Element$paragraph, + style.content.text.elementText, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text))), + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $author$project$Internal$Button$textButton(style.content.button), + button)) + ])); + }), + $author$project$Widget$Snackbar$current(model)); + }); +var $author$project$Main$viewLayout = F3( + function (msgMapper, style, model) { + var title = A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])), + $mdgriffith$elm_ui$Element$text('Elm-Ui-Widgets')); + var snackbarElem = A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3($author$project$Widget$Snackbar$view, style.snackbar, $elm$core$Basics$identity, model.snackbar))); + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Main$ChangedSearch, msgMapper), + placeholder: $elm$core$Maybe$Just( + A2( + $mdgriffith$elm_ui$Element$Input$placeholder, + _List_Nil, + $mdgriffith$elm_ui$Element$text('Search Widgets...'))), + text: model.search.raw + }; + var onDismiss = msgMapper( + $author$project$Main$ChangedSidebar($elm$core$Maybe$Nothing)); + var onChangedSidebar = $author$project$Main$ChangedSidebar; + var menu = A2( + $author$project$Widget$ScrollingNav$toSelect, + function (_int) { + return A2( + $elm$core$Maybe$map, + $author$project$Main$JumpTo, + A2( + $elm$core$Array$get, + _int, + $elm$core$Array$fromList(model.scrollingNav.arrangement))); + }, + model.scrollingNav); + var dialog = $elm$core$Maybe$Nothing; + var deviceClass = $author$project$Widget$Layout$getDeviceClass(model.window); + var actions = _List_fromArray( + [ + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$book), + onPress: $elm$core$Maybe$Just( + $author$project$Main$Load('https://package.elm-lang.org/packages/Orasund/elm-ui-widgets/latest/')), + text: 'Docs' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$github), + onPress: $elm$core$Maybe$Just( + $author$project$Main$Load('https://github.com/Orasund/elm-ui-widgets')), + text: 'Github' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), + onPress: (!_Utils_eq(model.theme, $author$project$Data$Theme$Material)) ? $elm$core$Maybe$Just( + $author$project$Main$SetTheme($author$project$Data$Theme$Material)) : $elm$core$Maybe$Nothing, + text: 'Material Theme' + }, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), + onPress: (!_Utils_eq(model.theme, $author$project$Data$Theme$DarkMaterial)) ? $elm$core$Maybe$Just( + $author$project$Main$SetTheme($author$project$Data$Theme$DarkMaterial)) : $elm$core$Maybe$Nothing, + text: 'Dark Material Theme' + } + ]); + var _v0 = $author$project$Widget$Layout$partitionActions(actions); + var primaryActions = _v0.primaryActions; + var moreActions = _v0.moreActions; + var modals = $author$project$Widget$Layout$orderModals( + { + bottomSheet: $elm$core$Maybe$Nothing, + dialog: dialog, + leftSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$LeftSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$leftSheet, + {button: style.sheetButton, sheet: style.sideSheet}, + {menu: menu, onDismiss: onDismiss, title: title})) : $elm$core$Maybe$Nothing, + rightSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$RightSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$rightSheet, + {insetItem: style.insetItem, sheet: style.sideSheet}, + {moreActions: moreActions, onDismiss: onDismiss})) : $elm$core$Maybe$Nothing, + topSheet: _Utils_eq( + model.active, + $elm$core$Maybe$Just($author$project$Main$Search)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$searchSheet, + style.searchFill, + {onDismiss: onDismiss, search: search})) : $elm$core$Maybe$Nothing + }); + var nav = (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: deviceClass, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$LeftSheet)))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$RightSheet)))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$Search)))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: deviceClass, + menu: menu, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Main$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Main$RightSheet)))), + openTopSheet: $elm$core$Maybe$Nothing, + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }); + return $elm$core$List$concat( + _List_fromArray( + [ + style.container, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(snackbarElem), + $mdgriffith$elm_ui$Element$inFront(nav) + ]), + $author$project$Widget$singleModal(modals) + ])); + }); +var $author$project$Data$Section$ReusableViews = {$: 'ReusableViews'}; +var $author$project$Data$Section$StatelessViews = {$: 'StatelessViews'}; +var $author$project$Main$ToggledExample = function (a) { + return {$: 'ToggledExample', a: a}; +}; +var $author$project$Widget$asItem = $author$project$Internal$Item$asItem; +var $Orasund$elm_ui_framework$Framework$Grid$compact = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$alignTop + ]); +var $mdgriffith$elm_ui$Internal$Model$Main = {$: 'Main'}; +var $mdgriffith$elm_ui$Element$Region$mainContent = $mdgriffith$elm_ui$Internal$Model$Describe($mdgriffith$elm_ui$Internal$Model$Main); +var $Orasund$elm_ui_framework$Framework$container = _List_fromArray( + [ + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY, + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$maximum, 1200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$padding(20), + $mdgriffith$elm_ui$Element$Region$mainContent, + $mdgriffith$elm_ui$Element$Background$color( + A3($mdgriffith$elm_ui$Element$rgb255, 255, 255, 255)) + ]); +var $author$project$Internal$Item$divider = function (style) { + return A2( + $author$project$Internal$Item$toItem, + style, + function (_v0) { + var element = _v0.element; + return A2($mdgriffith$elm_ui$Element$el, element, $mdgriffith$elm_ui$Element$none); + }); +}; +var $author$project$Widget$divider = $author$project$Internal$Item$divider; var $author$project$Internal$Item$expansionItem = F2( function (s, _v0) { var icon = _v0.icon; @@ -18793,7 +19299,7 @@ var $author$project$Internal$Item$expansionItem = F2( return A2( $elm$core$List$cons, A2( - $author$project$Internal$Item$textItem, + $author$project$Internal$Item$insetItem, s.item, { content: isExpanded ? s.collapseIcon : s.expandIcon, @@ -18804,49 +19310,35 @@ var $author$project$Internal$Item$expansionItem = F2( }), isExpanded ? content : _List_Nil); }); -var $author$project$Widget$expansionItem = $author$project$Internal$Item$expansionItem; +var $author$project$Widget$expansionItem = function () { + var fun = $author$project$Internal$Item$expansionItem; + return fun; +}(); +var $mdgriffith$elm_ui$Element$Font$bold = A2($mdgriffith$elm_ui$Internal$Model$Class, $mdgriffith$elm_ui$Internal$Flag$fontWeight, $mdgriffith$elm_ui$Internal$Style$classes.bold); +var $mdgriffith$elm_ui$Internal$Model$Heading = function (a) { + return {$: 'Heading', a: a}; +}; +var $mdgriffith$elm_ui$Element$Region$heading = A2($elm$core$Basics$composeL, $mdgriffith$elm_ui$Internal$Model$Describe, $mdgriffith$elm_ui$Internal$Model$Heading); +var $Orasund$elm_ui_framework$Framework$Heading$h = function (inputLevel) { + var level = A3($elm$core$Basics$clamp, 1, 6, inputLevel); + var size = (level === 6) ? 14 : (32 - ((level - 1) * 4)); + return _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Region$heading(level), + $mdgriffith$elm_ui$Element$Font$size(size), + $mdgriffith$elm_ui$Element$paddingEach( + {bottom: 2, left: 0, right: 0, top: 2}), + $mdgriffith$elm_ui$Element$alignLeft, + $mdgriffith$elm_ui$Element$Font$bold + ]); +}; var $Orasund$elm_ui_framework$Framework$Heading$h2 = $Orasund$elm_ui_framework$Framework$Heading$h(2); var $Orasund$elm_ui_framework$Framework$Heading$h3 = $Orasund$elm_ui_framework$Framework$Heading$h(3); -var $elm$html$Html$Attributes$href = function (url) { - return A2( - $elm$html$Html$Attributes$stringProperty, - 'href', - _VirtualDom_noJavaScriptUri(url)); -}; var $elm$html$Html$Attributes$id = $elm$html$Html$Attributes$stringProperty('id'); -var $author$project$Internal$Item$item = function (element) { - return A2( - $author$project$Internal$Item$toItem, - {content: _Utils_Tuple0, element: _List_Nil}, - $elm$core$Basics$always(element)); -}; -var $author$project$Widget$item = $author$project$Internal$Item$item; -var $author$project$Internal$List$internal = F2( - function (style, list) { - return A2( - $elm$core$List$indexedMap, - F2( - function (i, fun) { - return fun( - _Utils_ap( - style.element, - ($elm$core$List$length(list) === 1) ? style.ifSingleton : ((!i) ? style.ifFirst : (_Utils_eq( - i, - $elm$core$List$length(list) - 1) ? style.ifLast : style.otherwise)))); - }), - list); - }); -var $author$project$Internal$List$itemList = function (style) { - return A2( - $elm$core$Basics$composeR, - $author$project$Internal$List$internal(style.content), - $mdgriffith$elm_ui$Element$column(style.elementColumn)); -}; var $author$project$Widget$itemList = function () { var fun = $author$project$Internal$List$itemList; return fun; }(); -var $elm$html$Html$Attributes$rel = _VirtualDom_attribute('rel'); var $Orasund$elm_ui_framework$Framework$Color$lightGrey = A3($mdgriffith$elm_ui$Element$rgb255, 219, 219, 219); var $Orasund$elm_ui_framework$Framework$Grid$simple = _List_fromArray( [ @@ -18864,26 +19356,6 @@ var $Orasund$elm_ui_framework$Framework$Grid$section = _Utils_ap( $mdgriffith$elm_ui$Element$paddingEach( {bottom: 30, left: 0, right: 0, top: 10}) ])); -var $author$project$Reusable$layout = function (_v0) { - return _Utils_Tuple3( - 'Layout', - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('The layout combines the menu bar, both side bar, the dialog window and the snackbar. Try using all of them and also try resizing the window to see how they interact with each other.'))), - _List_Nil); -}; -var $author$project$Reusable$scrollingNavCard = function (_v0) { - return _Utils_Tuple3( - 'Scrolling Nav', - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('Resize the screen and open the side-menu. Then start scrolling to see the scrolling navigation in action.'))), - _List_Nil); -}; var $author$project$Widget$button = function () { var fun = $author$project$Internal$Button$button; return fun; @@ -18928,9 +19400,7 @@ var $author$project$Reusable$view = function (_v0) { description: 'Reusable views have an internal state but no update function. You will need to do some wiring, but nothing complicated.', items: _List_fromArray( [ - A2($author$project$Reusable$snackbar, style, addSnackbar), - $author$project$Reusable$scrollingNavCard(style), - $author$project$Reusable$layout(style) + A2($author$project$Reusable$snackbar, style, addSnackbar) ]), title: 'Reusable Views' }; @@ -18982,10 +19452,26 @@ var $author$project$Data$Example$get = function (example) { return function ($) { return $.progressIndicator; }; - default: + case 'IconExample': return function ($) { return $.icon; }; + case 'SheetExample': + return function ($) { + return $.sheet; + }; + case 'AppBarExample': + return function ($) { + return $.appBar; + }; + case 'LayoutExample': + return function ($) { + return $.layout; + }; + default: + return function ($) { + return $.snackbar; + }; } }; var $Orasund$elm_ui_framework$Framework$Grid$spacedEvenly = _List_fromArray( @@ -18996,6 +19482,10 @@ var $Orasund$elm_ui_framework$Framework$Grid$spacedEvenly = _List_fromArray( $mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY ]); +var $author$project$View$States$appBar = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Widget$iconButton = function () { var fun = $author$project$Internal$Button$iconButton; return fun; @@ -19101,6 +19591,10 @@ var $author$project$View$States$icon = F2( function (_v0, style) { return _List_Nil; }); +var $author$project$View$States$layout = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Internal$List$column = function (style) { return A2( $elm$core$Basics$composeR, @@ -19511,6 +20005,14 @@ var $author$project$View$States$select = F2( }))) ]); }); +var $author$project$View$States$sheet = F2( + function (_v0, style) { + return _List_Nil; + }); +var $author$project$View$States$snackbar = F2( + function (_v0, style) { + return _List_Nil; + }); var $author$project$Internal$SortTable$Column = function (a) { return {$: 'Column', a: a}; }; @@ -20367,20 +20869,30 @@ var $author$project$Data$Example$toTests = function (example) { return $author$project$View$States$list; case 'ProgressIndicatorExample': return $author$project$View$States$progressIndicator; - default: + case 'IconExample': return $author$project$View$States$icon; + case 'SheetExample': + return $author$project$View$States$sheet; + case 'AppBarExample': + return $author$project$View$States$appBar; + case 'LayoutExample': + return $author$project$View$States$layout; + default: + return $author$project$View$States$snackbar; } }; var $icidasset$elm_material_icons$Material$Icons$Types$Color = function (a) { return {$: 'Color', a: a}; }; -var $author$project$Example$Button$Decrease = function (a) { - return {$: 'Decrease', a: a}; +var $author$project$Example$AppBar$SetDesign = function (a) { + return {$: 'SetDesign', a: a}; }; -var $author$project$Example$Button$Increase = function (a) { - return {$: 'Increase', a: a}; +var $author$project$Example$AppBar$SetSearch = function (a) { + return {$: 'SetSearch', a: a}; +}; +var $author$project$Example$AppBar$SetSelected = function (a) { + return {$: 'SetSelected', a: a}; }; -var $author$project$Example$Button$Reset = {$: 'Reset'}; var $icidasset$elm_material_icons$Material$Icons$Internal$icon = F4( function (attributes, nodes, size, coloring) { var sizeAsString = $elm$core$String$fromInt(size); @@ -20412,6 +20924,134 @@ var $icidasset$elm_material_icons$Material$Icons$Internal$icon = F4( nodes) ])); }); +var $icidasset$elm_material_icons$Material$Icons$change_history = A2( + $icidasset$elm_material_icons$Material$Icons$Internal$icon, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$viewBox('0 0 24 24') + ]), + _List_fromArray( + [ + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M0 0h24v24H0V0z'), + $elm$svg$Svg$Attributes$fill('none') + ]), + _List_Nil), + A2( + $elm$svg$Svg$path, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$d('M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z') + ]), + _List_Nil) + ])); +var $author$project$Widget$Icon$elmMaterialIcons = F2( + function (wrapper, fun) { + return function (_v0) { + var size = _v0.size; + var color = _v0.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_Nil, + $mdgriffith$elm_ui$Element$html( + A2( + fun, + size, + wrapper(color)))); + }; + }); +var $author$project$Example$AppBar$view = F3( + function (msgMapper, style, model) { + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Example$AppBar$SetSearch, msgMapper), + placeholder: $elm$core$Maybe$Nothing, + text: model.search + }; + var primaryActions = _List_fromArray( + [ + { + icon: A2($author$project$Widget$Icon$elmMaterialIcons, $icidasset$elm_material_icons$Material$Icons$Types$Color, $icidasset$elm_material_icons$Material$Icons$change_history), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + text: 'Action' + } + ]); + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]), + model.isMenuBar ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: $mdgriffith$elm_ui$Element$Tablet, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Title')) + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: $mdgriffith$elm_ui$Element$Phone, + menu: { + onSelect: A2( + $elm$core$Basics$composeR, + $author$project$Example$AppBar$SetSelected, + A2($elm$core$Basics$composeR, msgMapper, $elm$core$Maybe$Just)), + options: A2( + $elm$core$List$map, + function (string) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: string + }; + }, + _List_fromArray( + ['Home', 'About'])), + selected: $elm$core$Maybe$Just(model.selected) + }, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$AppBar$SetDesign(!model.isMenuBar))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Title')) + })); + }); +var $author$project$Example$Button$Decrease = function (a) { + return {$: 'Decrease', a: a}; +}; +var $author$project$Example$Button$Increase = function (a) { + return {$: 'Increase', a: a}; +}; +var $author$project$Example$Button$Reset = {$: 'Reset'}; var $icidasset$elm_material_icons$Material$Icons$add = A2( $icidasset$elm_material_icons$Material$Icons$Internal$icon, _List_fromArray( @@ -20453,47 +21093,6 @@ var $author$project$Widget$Customize$element = F2( }, a); }); -var $author$project$Widget$Customize$mapElementColumn = F2( - function (fun, a) { - return _Utils_update( - a, - { - elementColumn: fun(a.elementColumn) - }); - }); -var $author$project$Widget$Customize$elementColumn = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementColumn, - function (b) { - return _Utils_ap(b, list); - }, - a); - }); -var $author$project$Widget$Customize$elementRow = F2( - function (list, a) { - return A2( - $author$project$Widget$Customize$mapElementRow, - function (b) { - return _Utils_ap(b, list); - }, - a); - }); -var $author$project$Widget$Icon$elmMaterialIcons = F2( - function (wrapper, fun) { - return function (_v0) { - var size = _v0.size; - var color = _v0.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_Nil, - $mdgriffith$elm_ui$Element$html( - A2( - fun, - size, - wrapper(color)))); - }; - }); var $icidasset$elm_material_icons$Material$Icons$exposure_plus_2 = A2( $icidasset$elm_material_icons$Material$Icons$Internal$icon, _List_fromArray( @@ -20688,6 +21287,89 @@ var $author$project$Example$Button$view = F3( var $author$project$Example$Dialog$OpenDialog = function (a) { return {$: 'OpenDialog', a: a}; }; +var $author$project$Internal$Dialog$dialog = F2( + function (style, _v0) { + var title = _v0.title; + var text = _v0.text; + var accept = _v0.accept; + var dismiss = _v0.dismiss; + return { + content: A2( + $mdgriffith$elm_ui$Element$column, + _Utils_ap( + _List_fromArray( + [$mdgriffith$elm_ui$Element$centerX, $mdgriffith$elm_ui$Element$centerY]), + style.elementColumn), + _List_fromArray( + [ + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + A2( + $elm$core$Basics$composeR, + $mdgriffith$elm_ui$Element$text, + $mdgriffith$elm_ui$Element$el(style.content.title.contentText)), + title)), + A2( + $mdgriffith$elm_ui$Element$paragraph, + style.content.text.contentText, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text))), + A2( + $mdgriffith$elm_ui$Element$row, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$alignRight, + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$shrink) + ]), + style.content.buttons.elementRow), + function () { + var _v1 = _Utils_Tuple2(accept, dismiss); + if (_v1.a.$ === 'Just') { + if (_v1.b.$ === 'Nothing') { + var acceptButton = _v1.a.a; + var _v2 = _v1.b; + return $elm$core$List$singleton( + A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton)); + } else { + var acceptButton = _v1.a.a; + var dismissButton = _v1.b.a; + return _List_fromArray( + [ + A2($author$project$Internal$Button$textButton, style.content.buttons.content.dismiss, dismissButton), + A2($author$project$Internal$Button$textButton, style.content.buttons.content.accept, acceptButton) + ]); + } + } else { + return _List_Nil; + } + }()) + ])), + onDismiss: function () { + var _v3 = _Utils_Tuple2(accept, dismiss); + if (_v3.a.$ === 'Nothing') { + if (_v3.b.$ === 'Nothing') { + var _v4 = _v3.a; + var _v5 = _v3.b; + return $elm$core$Maybe$Nothing; + } else { + var _v6 = _v3.a; + var onPress = _v3.b.a.onPress; + return onPress; + } + } else { + return $elm$core$Maybe$Nothing; + } + }() + }; + }); +var $author$project$Widget$dialog = function () { + var fun = $author$project$Internal$Dialog$dialog; + return fun; +}(); var $feathericons$elm_feather$FeatherIcons$eye = A2( $feathericons$elm_feather$FeatherIcons$makeBuilder, 'eye', @@ -20723,27 +21405,29 @@ var $author$project$Example$Dialog$view = F3( $mdgriffith$elm_ui$Element$width( A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) ]), - isOpen ? A2( - $author$project$Widget$dialog, - style.dialog, - { - accept: $elm$core$Maybe$Just( + isOpen ? $author$project$Widget$singleModal( + $elm$core$List$singleton( + A2( + $author$project$Widget$dialog, + style.dialog, { - onPress: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Dialog$OpenDialog(false))), - text: 'Ok' - }), - dismiss: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Dialog$OpenDialog(false))), - text: 'Dismiss' - }), - text: 'This is a dialog window', - title: $elm$core$Maybe$Just('Dialog') - }) : _List_Nil), + accept: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Dialog$OpenDialog(false))), + text: 'Ok' + }), + dismiss: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Dialog$OpenDialog(false))), + text: 'Dismiss' + }), + text: 'This is a dialog window', + title: $elm$core$Maybe$Just('Dialog') + }))) : _List_Nil), A2( $author$project$Widget$button, style.primaryButton, @@ -20752,7 +21436,7 @@ var $author$project$Example$Dialog$view = F3( onPress: $elm$core$Maybe$Just( msgMapper( $author$project$Example$Dialog$OpenDialog(true))), - text: 'show Dialog' + text: 'Show Dialog' })); }); var $author$project$Widget$Icon$antDesignIconsElm = function (fun) { @@ -21541,9 +22225,253 @@ var $author$project$Example$Icon$view = F3( ]))) ])); }); +var $author$project$Example$Layout$AddSnackbar = {$: 'AddSnackbar'}; +var $author$project$Example$Layout$ChangedSidebar = function (a) { + return {$: 'ChangedSidebar', a: a}; +}; +var $author$project$Example$Layout$LeftSheet = {$: 'LeftSheet'}; +var $author$project$Example$Layout$Search = {$: 'Search'}; +var $author$project$Example$Layout$SetSearchText = function (a) { + return {$: 'SetSearchText', a: a}; +}; +var $author$project$Example$Layout$SetSelected = function (a) { + return {$: 'SetSelected', a: a}; +}; +var $author$project$Example$Layout$ShowDialog = function (a) { + return {$: 'ShowDialog', a: a}; +}; +var $author$project$Example$Layout$view = F3( + function (msgMapper, style, _v0) { + var snackbar = _v0.snackbar; + var searchText = _v0.searchText; + var selected = _v0.selected; + var showDialog = _v0.showDialog; + var active = _v0.active; + var title = A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + $author$project$Widget$Material$Typography$h6, + _List_fromArray( + [ + A2($mdgriffith$elm_ui$Element$paddingXY, 8, 0) + ])), + $mdgriffith$elm_ui$Element$text('Title')); + var snackbarElem = A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3( + $author$project$Widget$Snackbar$view, + style.snackbar, + function (text) { + return {button: $elm$core$Maybe$Nothing, text: text}; + }, + snackbar))); + var search = { + chips: _List_Nil, + label: 'Search', + onChange: A2($elm$core$Basics$composeR, $author$project$Example$Layout$SetSearchText, msgMapper), + placeholder: $elm$core$Maybe$Nothing, + text: searchText + }; + var onDismiss = msgMapper( + $author$project$Example$Layout$ChangedSidebar($elm$core$Maybe$Nothing)); + var onChangedSidebar = $author$project$Example$Layout$ChangedSidebar; + var menu = { + onSelect: A2( + $elm$core$Basics$composeR, + $author$project$Example$Layout$SetSelected, + A2($elm$core$Basics$composeR, msgMapper, $elm$core$Maybe$Just)), + options: A2( + $elm$core$List$map, + function (string) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: string + }; + }, + _List_fromArray( + ['Home', 'About'])), + selected: $elm$core$Maybe$Just(selected) + }; + var dialog = showDialog ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$dialog, + style.dialog, + { + accept: $elm$core$Maybe$Nothing, + dismiss: $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ShowDialog(false))), + text: 'Accept' + }), + text: 'This is a dialog window', + title: $elm$core$Maybe$Just('Dialog') + })) : $elm$core$Maybe$Nothing; + var deviceClass = $mdgriffith$elm_ui$Element$Phone; + var actions = A2( + $elm$core$List$repeat, + 5, + { + icon: A2($author$project$Widget$Icon$elmMaterialIcons, $icidasset$elm_material_icons$Material$Icons$Types$Color, $icidasset$elm_material_icons$Material$Icons$change_history), + onPress: $elm$core$Maybe$Nothing, + text: 'Action' + }); + var _v1 = $author$project$Widget$Layout$partitionActions(actions); + var primaryActions = _v1.primaryActions; + var moreActions = _v1.moreActions; + var modals = $author$project$Widget$Layout$orderModals( + { + bottomSheet: $elm$core$Maybe$Nothing, + dialog: dialog, + leftSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$LeftSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$leftSheet, + {button: style.sheetButton, sheet: style.sideSheet}, + {menu: menu, onDismiss: onDismiss, title: title})) : $elm$core$Maybe$Nothing, + rightSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$rightSheet, + {insetItem: style.insetItem, sheet: style.sideSheet}, + {moreActions: moreActions, onDismiss: onDismiss})) : $elm$core$Maybe$Nothing, + topSheet: _Utils_eq( + active, + $elm$core$Maybe$Just($author$project$Example$Layout$Search)) ? $elm$core$Maybe$Just( + A2( + $author$project$Widget$Layout$searchSheet, + style.searchFill, + {onDismiss: onDismiss, search: search})) : $elm$core$Maybe$Nothing + }); + var nav = (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Phone) || (_Utils_eq(deviceClass, $mdgriffith$elm_ui$Element$Tablet) || ($elm$core$List$length(menu.options) > 5))) ? A2( + $author$project$Widget$menuBar, + style.menuBar, + { + deviceClass: deviceClass, + openLeftSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$LeftSheet)))), + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)))), + openTopSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$Search)))), + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }) : A2( + $author$project$Widget$tabBar, + style.tabBar, + { + deviceClass: deviceClass, + menu: menu, + openRightSheet: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Layout$ChangedSidebar( + $elm$core$Maybe$Just($author$project$Example$Layout$RightSheet)))), + openTopSheet: $elm$core$Maybe$Nothing, + primaryActions: primaryActions, + search: $elm$core$Maybe$Just(search), + title: title + }); + return A2( + $mdgriffith$elm_ui$Element$el, + $elm$core$List$concat( + _List_fromArray( + [ + style.container, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(snackbarElem) + ]), + $author$project$Widget$singleModal(modals), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]) + ])), + A2( + $mdgriffith$elm_ui$Element$column, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill), + $mdgriffith$elm_ui$Element$spacing(8) + ]), + _List_fromArray( + [ + nav, + A2( + $author$project$Widget$button, + style.containedButton, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper($author$project$Example$Layout$AddSnackbar)), + text: 'Add Notification' + }) + ]))); + }); var $author$project$Example$List$ToggleCollapsable = function (a) { return {$: 'ToggleCollapsable', a: a}; }; +var $author$project$Internal$Item$fullBleedItem = F2( + function (s, _v0) { + var onPress = _v0.onPress; + var text = _v0.text; + var icon = _v0.icon; + return A2( + $author$project$Internal$Item$toItem, + s, + function (style) { + return A2( + $mdgriffith$elm_ui$Element$Input$button, + _Utils_ap( + style.elementButton, + _Utils_eq(onPress, $elm$core$Maybe$Nothing) ? style.ifDisabled : style.otherwise), + { + label: A2( + $mdgriffith$elm_ui$Element$row, + style.content.elementRow, + _List_fromArray( + [ + A2( + $mdgriffith$elm_ui$Element$el, + style.content.content.text.elementText, + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text(text)))), + icon(style.content.content.icon) + ])), + onPress: onPress + }); + }); + }); +var $author$project$Widget$fullBleedItem = function () { + var fun = $author$project$Internal$Item$fullBleedItem; + return fun; +}(); var $author$project$Internal$Item$headerItem = F2( function (style, title) { return A2( @@ -21653,7 +22581,14 @@ var $author$project$Internal$Item$imageItem = F2( }); }); }); -var $author$project$Widget$imageItem = $author$project$Internal$Item$imageItem; +var $author$project$Widget$imageItem = function () { + var fun = $author$project$Internal$Item$imageItem; + return fun; +}(); +var $author$project$Widget$insetItem = function () { + var fun = $author$project$Internal$Item$insetItem; + return fun; +}(); var $author$project$Internal$Item$multiLineItem = F2( function (s, _v0) { var onPress = _v0.onPress; @@ -21702,8 +22637,11 @@ var $author$project$Internal$Item$multiLineItem = F2( }); }); }); -var $author$project$Widget$multiLineItem = $author$project$Internal$Item$multiLineItem; -var $author$project$Widget$textItem = $author$project$Internal$Item$textItem; +var $author$project$Widget$multiLineItem = function () { + var fun = $author$project$Internal$Item$multiLineItem; + return fun; +}(); +var $author$project$Widget$selectItem = $author$project$Internal$Item$selectItem; var $author$project$Example$List$view = F3( function (msgMapper, style, _v0) { var isExpanded = _v0.a; @@ -21714,23 +22652,25 @@ var $author$project$Example$List$view = F3( _List_fromArray( [ A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Section 1'), - $author$project$Widget$item( + $author$project$Widget$asItem( $mdgriffith$elm_ui$Element$text('Custom Item')), $author$project$Widget$divider(style.middleDivider), - $author$project$Widget$item( A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [$mdgriffith$elm_ui$Element$centerY]), - $mdgriffith$elm_ui$Element$text('Custom Item (centered)'))), + $author$project$Widget$fullBleedItem, + style.fullBleedItem, + { + icon: function (_v1) { + return $mdgriffith$elm_ui$Element$none; + }, + onPress: $elm$core$Maybe$Nothing, + text: 'Full Bleed Item' + }), A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Section 2'), A2( - $author$project$Widget$textItem, - style.textItem, + $author$project$Widget$insetItem, + style.insetItem, { - content: function (_v1) { - var size = _v1.size; - var color = _v1.color; + content: function (_v2) { return $mdgriffith$elm_ui$Element$none; }, icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), @@ -21741,9 +22681,9 @@ var $author$project$Example$List$view = F3( $author$project$Widget$imageItem, style.imageItem, { - content: function (_v2) { - var size = _v2.size; - var color = _v2.color; + content: function (_v3) { + var size = _v3.size; + var color = _v3.color; return A2( $mdgriffith$elm_ui$Element$el, _List_fromArray( @@ -21769,12 +22709,12 @@ var $author$project$Example$List$view = F3( }), $author$project$Widget$divider(style.insetDivider), A2( - $author$project$Widget$textItem, - style.textItem, + $author$project$Widget$insetItem, + style.insetItem, { - content: function (_v3) { - var size = _v3.size; - var color = _v3.color; + content: function (_v4) { + var size = _v4.size; + var color = _v4.color; return A2( $mdgriffith$elm_ui$Element$el, _List_fromArray( @@ -21805,9 +22745,7 @@ var $author$project$Example$List$view = F3( $author$project$Widget$imageItem, style.imageItem, { - content: function (_v4) { - var size = _v4.size; - var color = _v4.color; + content: function (_v5) { return A2( $author$project$Widget$switch, style._switch, @@ -21827,45 +22765,94 @@ var $author$project$Example$List$view = F3( }), $author$project$Widget$divider(style.fullBleedDivider) ]), - A2( - $author$project$Widget$expansionItem, - style.expansionItem, - { - content: _List_fromArray( + _Utils_ap( + A2( + $author$project$Widget$expansionItem, + style.expansionItem, + { + content: _List_fromArray( + [ + A2($author$project$Widget$headerItem, style.insetHeader, 'Section 3'), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v6) { + var size = _v6.size; + var color = _v6.color; + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$Font$color( + $author$project$Widget$Material$Color$fromColor(color)), + $mdgriffith$elm_ui$Element$Font$size(size) + ]), + $mdgriffith$elm_ui$Element$text('3.')); + }, + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Nothing, + text: 'Item' + }) + ]), + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + isExpanded: isExpanded, + onToggle: A2($elm$core$Basics$composeR, $author$project$Example$List$ToggleCollapsable, msgMapper), + text: 'Expandable Item' + }), + _Utils_ap( + _List_fromArray( [ - A2($author$project$Widget$headerItem, style.insetHeader, 'Section 3'), - A2( - $author$project$Widget$textItem, - style.textItem, - { - content: function (_v5) { - var size = _v5.size; - var color = _v5.color; - return A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$Font$color( - $author$project$Widget$Material$Color$fromColor(color)), - $mdgriffith$elm_ui$Element$Font$size(size) - ]), - $mdgriffith$elm_ui$Element$text('3.')); - }, - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - onPress: $elm$core$Maybe$Nothing, - text: 'Item' - }) + A2($author$project$Widget$headerItem, style.fullBleedHeader, 'Menu') ]), - icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), - isExpanded: isExpanded, - onToggle: A2($elm$core$Basics$composeR, $author$project$Example$List$ToggleCollapsable, msgMapper), - text: 'Expandable Item' - }))); + A2( + $author$project$Widget$selectItem, + style.selectItem, + { + onSelect: function (_int) { + return $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$List$ToggleCollapsable(_int === 1))); + }, + options: A2( + $elm$core$List$map, + function (bool) { + return { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + text: bool ? 'Expanded' : 'Collapsed' + }; + }, + _List_fromArray( + [true, false])), + selected: isExpanded ? $elm$core$Maybe$Just(1) : $elm$core$Maybe$Just(0) + }))))); }); var $author$project$Example$Modal$ToggleModal = function (a) { return {$: 'ToggleModal', a: a}; }; -var $author$project$Widget$modal = $author$project$Internal$Dialog$modal; +var $author$project$Internal$Modal$multiModal = function (list) { + if (list.b) { + var head = list.a; + var tail = list.b; + return _Utils_ap( + A2( + $elm$core$List$map, + function (_v1) { + var content = _v1.content; + return $mdgriffith$elm_ui$Element$inFront(content); + }, + $elm$core$List$reverse(tail)), + _Utils_ap( + $author$project$Internal$Modal$background(head.onDismiss), + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$inFront(head.content) + ]))); + } else { + return _List_Nil; + } +}; +var $author$project$Widget$multiModal = $author$project$Internal$Modal$multiModal; var $author$project$Example$Modal$view = F3( function (msgMapper, style, _v0) { var isEnabled = _v0.a; @@ -21879,32 +22866,79 @@ var $author$project$Example$Modal$view = F3( $mdgriffith$elm_ui$Element$width( A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) ]), - isEnabled ? $author$project$Widget$modal( - { - content: A2( - $mdgriffith$elm_ui$Element$el, - _List_fromArray( - [ - $mdgriffith$elm_ui$Element$height( - $mdgriffith$elm_ui$Element$px(100)), - $mdgriffith$elm_ui$Element$width( - $mdgriffith$elm_ui$Element$px(250)), - $mdgriffith$elm_ui$Element$centerX, - $mdgriffith$elm_ui$Element$centerY - ]), - A2( - $author$project$Widget$column, - style.cardColumn, - $elm$core$List$singleton( - A2( - $mdgriffith$elm_ui$Element$paragraph, - _List_Nil, - $elm$core$List$singleton( - $mdgriffith$elm_ui$Element$text('Click on the area around this box to close it.')))))), - onDismiss: $elm$core$Maybe$Just( - msgMapper( - $author$project$Example$Modal$ToggleModal(false))) - }) : _List_Nil), + isEnabled ? $author$project$Widget$multiModal( + _List_fromArray( + [ + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(250)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('Click on the area around this box to close it.')))))), + onDismiss: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Modal$ToggleModal(false))) + }, + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(150)), + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(200)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('This card can not be selected.')))))), + onDismiss: $elm$core$Maybe$Nothing + }, + { + content: A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + $mdgriffith$elm_ui$Element$px(300)), + $mdgriffith$elm_ui$Element$width( + $mdgriffith$elm_ui$Element$px(300)), + $mdgriffith$elm_ui$Element$centerX, + $mdgriffith$elm_ui$Element$centerY + ]), + A2( + $author$project$Widget$column, + style.cardColumn, + $elm$core$List$singleton( + A2( + $mdgriffith$elm_ui$Element$paragraph, + _List_Nil, + $elm$core$List$singleton( + $mdgriffith$elm_ui$Element$text('This is message is behind the other two')))))), + onDismiss: $elm$core$Maybe$Nothing + } + ])) : _List_Nil), A2( $author$project$Widget$button, style.primaryButton, @@ -21913,7 +22947,7 @@ var $author$project$Example$Modal$view = F3( onPress: $elm$core$Maybe$Just( msgMapper( $author$project$Example$Modal$ToggleModal(true))), - text: 'show Modal' + text: 'Show Modal' })); }); var $author$project$Example$MultiSelect$ChangedSelected = function (a) { @@ -21977,6 +23011,152 @@ var $author$project$Example$Select$view = F3( selected: selected })); }); +var $author$project$Example$Sheet$ToggleModal = function (a) { + return {$: 'ToggleModal', a: a}; +}; +var $author$project$Example$Sheet$view = F3( + function (msgMapper, style, _v0) { + var isEnabled = _v0.a; + return A2( + $mdgriffith$elm_ui$Element$el, + _Utils_ap( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)) + ]), + isEnabled ? $author$project$Widget$singleModal( + $elm$core$List$singleton( + { + content: A2( + $author$project$Widget$itemList, + style.sideSheet, + _List_fromArray( + [ + $author$project$Widget$asItem( + A2( + $mdgriffith$elm_ui$Element$el, + $author$project$Widget$Material$Typography$h6, + $mdgriffith$elm_ui$Element$text('Menu'))), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v1) { + return $mdgriffith$elm_ui$Element$none; + }, + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))), + text: 'Home' + }), + A2( + $author$project$Widget$insetItem, + style.insetItem, + { + content: function (_v2) { + return $mdgriffith$elm_ui$Element$none; + }, + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$triangle), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))), + text: 'About' + }) + ])), + onDismiss: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(false))) + })) : _List_Nil), + A2( + $author$project$Widget$button, + style.primaryButton, + { + icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$eye), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Sheet$ToggleModal(true))), + text: 'Show Sheet' + })); + }); +var $author$project$Example$Snackbar$AddSnackbar = function (a) { + return {$: 'AddSnackbar', a: a}; +}; +var $author$project$Example$Snackbar$view = F3( + function (msgMapper, style, model) { + return A2( + $mdgriffith$elm_ui$Element$el, + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$height( + A2($mdgriffith$elm_ui$Element$minimum, 200, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$width( + A2($mdgriffith$elm_ui$Element$minimum, 400, $mdgriffith$elm_ui$Element$fill)), + $mdgriffith$elm_ui$Element$inFront( + A2( + $elm$core$Maybe$withDefault, + $mdgriffith$elm_ui$Element$none, + A2( + $elm$core$Maybe$map, + $mdgriffith$elm_ui$Element$el( + _List_fromArray( + [ + $mdgriffith$elm_ui$Element$padding(8), + $mdgriffith$elm_ui$Element$alignBottom, + $mdgriffith$elm_ui$Element$alignRight + ])), + A3( + $author$project$Widget$Snackbar$view, + style.snackbar, + function (_v0) { + var text = _v0.a; + var hasButton = _v0.b; + return { + button: hasButton ? $elm$core$Maybe$Just( + { + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('This is another message', false)))), + text: 'Add' + }) : $elm$core$Maybe$Nothing, + text: text + }; + }, + model)))) + ]), + A2( + $author$project$Widget$column, + style.column, + _List_fromArray( + [ + A2( + $author$project$Widget$button, + style.button, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('This is a notification. It will disappear after 10 seconds.', false)))), + text: 'Add Notification' + }), + A2( + $author$project$Widget$button, + style.button, + { + icon: $elm$core$Basics$always($mdgriffith$elm_ui$Element$none), + onPress: $elm$core$Maybe$Just( + msgMapper( + $author$project$Example$Snackbar$AddSnackbar( + _Utils_Tuple2('You can add another notification if you want.', true)))), + text: 'Add Notification with Action' + }) + ]))); + }); var $author$project$Example$SortTable$ChangedSorting = function (a) { return {$: 'ChangedSorting', a: a}; }; @@ -22206,6 +23386,13 @@ var $author$project$Example$TextInput$view = F3( var $author$project$Data$Example$view = F3( function (msgMapper, style, model) { return { + appBar: A3( + $author$project$Example$AppBar$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$AppBar, msgMapper), + style, + function ($) { + return $.appBar; + }(model)), button: A3( $author$project$Example$Button$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$Button, msgMapper), @@ -22227,6 +23414,13 @@ var $author$project$Data$Example$view = F3( function ($) { return $.icon; }(model)), + layout: A3( + $author$project$Example$Layout$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Layout, msgMapper), + style, + function ($) { + return $.layout; + }(model)), list: A3( $author$project$Example$List$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$List, msgMapper), @@ -22262,6 +23456,20 @@ var $author$project$Data$Example$view = F3( function ($) { return $.select; }(model)), + sheet: A3( + $author$project$Example$Sheet$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Sheet, msgMapper), + style, + function ($) { + return $.sheet; + }(model)), + snackbar: A3( + $author$project$Example$Snackbar$view, + A2($elm$core$Basics$composeR, $author$project$Data$Example$Snackbar, msgMapper), + style, + function ($) { + return $.snackbar; + }(model)), sortTable: A3( $author$project$Example$SortTable$view, A2($elm$core$Basics$composeR, $author$project$Data$Example$SortTable, msgMapper), @@ -22383,7 +23591,7 @@ var $author$project$Main$viewLoaded = function (m) { $mdgriffith$elm_ui$Element$none), A2( $mdgriffith$elm_ui$Element$column, - _Utils_ap($Orasund$elm_ui_framework$Framework$container, style.layout.container), + _Utils_ap($Orasund$elm_ui_framework$Framework$container, style.container), A2( $elm$core$List$map, function (section) { @@ -22427,7 +23635,7 @@ var $author$project$Main$viewLoaded = function (m) { style.cardColumn, A2( $elm$core$List$cons, - $author$project$Widget$item( + $author$project$Widget$asItem( A2( $mdgriffith$elm_ui$Element$column, $Orasund$elm_ui_framework$Framework$Grid$simple, @@ -22456,7 +23664,7 @@ var $author$project$Main$viewLoaded = function (m) { style.expansionItem, { content: $elm$core$List$singleton( - $author$project$Widget$item( + $author$project$Widget$asItem( A2( $mdgriffith$elm_ui$Element$column, _Utils_ap( @@ -22508,17 +23716,7 @@ var $author$project$Main$viewLoaded = function (m) { }()); }, _List_fromArray( - [$author$project$Data$Section$StatelessViews, $author$project$Data$Section$ReusableViews]))), - $mdgriffith$elm_ui$Element$html( - A3( - $elm$html$Html$node, - 'link', - _List_fromArray( - [ - $elm$html$Html$Attributes$rel('stylesheet'), - $elm$html$Html$Attributes$href('https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css') - ]), - _List_Nil)) + [$author$project$Data$Section$StatelessViews, $author$project$Data$Section$ReusableViews]))) ])); }; var $author$project$Main$view = function (model) { @@ -22530,89 +23728,9 @@ var $author$project$Main$view = function (model) { return A2( $elm$html$Html$map, $author$project$Main$LoadedSpecific, - A3( - $author$project$Widget$Layout$view, - style.layout, - { - actions: _List_fromArray( - [ - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$book), - onPress: $elm$core$Maybe$Just( - $author$project$Main$Load('https://package.elm-lang.org/packages/Orasund/elm-ui-widgets/latest/')), - text: 'Docs' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$github), - onPress: $elm$core$Maybe$Just( - $author$project$Main$Load('https://github.com/Orasund/elm-ui-widgets')), - text: 'Github' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), - onPress: (!_Utils_eq(m.theme, $author$project$Data$Theme$Material)) ? $elm$core$Maybe$Just( - $author$project$Main$SetTheme($author$project$Data$Theme$Material)) : $elm$core$Maybe$Nothing, - text: 'Material Theme' - }, - { - icon: A2($author$project$Widget$Icon$elmFeather, $feathericons$elm_feather$FeatherIcons$toHtml, $feathericons$elm_feather$FeatherIcons$penTool), - onPress: (!_Utils_eq(m.theme, $author$project$Data$Theme$DarkMaterial)) ? $elm$core$Maybe$Just( - $author$project$Main$SetTheme($author$project$Data$Theme$DarkMaterial)) : $elm$core$Maybe$Nothing, - text: 'Dark Material Theme' - } - ]), - dialog: m.displayDialog ? $elm$core$Maybe$Just( - A2( - $author$project$Widget$dialog, - style.dialog, - { - accept: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - $author$project$Main$ToggleDialog(false)), - text: 'Ok' - }), - dismiss: $elm$core$Maybe$Just( - { - onPress: $elm$core$Maybe$Just( - $author$project$Main$ToggleDialog(false)), - text: 'Dismiss' - }), - text: 'This is a dialog window', - title: $elm$core$Maybe$Just('Dialog') - })) : $elm$core$Maybe$Nothing, - layout: m.layout, - menu: A2( - $author$project$Widget$ScrollingNav$toSelect, - function (_int) { - return A2( - $elm$core$Maybe$map, - $author$project$Main$JumpTo, - A2( - $elm$core$Array$get, - _int, - $elm$core$Array$fromList(m.scrollingNav.arrangement))); - }, - m.scrollingNav), - onChangedSidebar: $author$project$Main$ChangedSidebar, - search: $elm$core$Maybe$Just( - { - chips: _List_Nil, - label: 'Search', - onChange: $author$project$Main$ChangedSearch, - placeholder: $elm$core$Maybe$Just( - A2( - $mdgriffith$elm_ui$Element$Input$placeholder, - _List_Nil, - $mdgriffith$elm_ui$Element$text('Search Widgets...'))), - text: m.search.raw - }), - title: A2( - $mdgriffith$elm_ui$Element$el, - $Orasund$elm_ui_framework$Framework$Heading$h1, - $mdgriffith$elm_ui$Element$text('Elm-Ui-Widgets')), - window: m.window - }, + A2( + $mdgriffith$elm_ui$Element$layout, + A3($author$project$Main$viewLayout, $elm$core$Basics$identity, style, m), $author$project$Main$viewLoaded(m))); } }; diff --git a/example/index.html b/example/index.html deleted file mode 100644 index fd67e49..0000000 --- a/example/index.html +++ /dev/null @@ -1,22683 +0,0 @@ - - - - - Main - - - - - -

-
-
-
-
-
\ No newline at end of file