2020-04-01 02:09:09 +03:00
|
|
|
module Examples exposing (Msg, State, all)
|
2018-02-13 00:32:38 +03:00
|
|
|
|
2020-03-31 23:20:03 +03:00
|
|
|
import Example exposing (Example)
|
2020-03-31 21:31:14 +03:00
|
|
|
import Examples.Accordion as Accordion
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.AssignmentIcon as AssignmentIcon
|
2020-03-31 22:05:56 +03:00
|
|
|
import Examples.Button as Button
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.Checkbox as Checkbox
|
|
|
|
import Examples.ClickableSvg as ClickableSvg
|
|
|
|
import Examples.ClickableText as ClickableText
|
|
|
|
import Examples.Colors as Colors
|
2020-05-15 20:15:35 +03:00
|
|
|
import Examples.Confetti as Confetti
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.DisclosureIndicator as DisclosureIndicator
|
2020-04-09 01:13:06 +03:00
|
|
|
import Examples.Divider as Divider
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.Fonts as Fonts
|
|
|
|
import Examples.Heading as Heading
|
2020-04-03 04:13:29 +03:00
|
|
|
import Examples.Loading as Loading
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.Logo as Logo
|
|
|
|
import Examples.MasteryIcon as MasteryIcon
|
2020-05-07 22:46:21 +03:00
|
|
|
import Examples.Menu as Menu
|
2020-04-28 00:35:33 +03:00
|
|
|
import Examples.Message as Message
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.Modal as Modal
|
|
|
|
import Examples.Page as Page
|
|
|
|
import Examples.Pennant as Pennant
|
2020-07-30 21:12:30 +03:00
|
|
|
import Examples.RadioButton as RadioButton
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.SegmentedControl as SegmentedControl
|
|
|
|
import Examples.Select as Select
|
|
|
|
import Examples.Slide as Slide
|
|
|
|
import Examples.SlideModal as SlideModal
|
|
|
|
import Examples.SortableTable as SortableTable
|
|
|
|
import Examples.Svg as Svg
|
2020-12-10 20:56:52 +03:00
|
|
|
import Examples.Switch as Switch
|
2020-03-31 22:43:32 +03:00
|
|
|
import Examples.Table as Table
|
|
|
|
import Examples.Tabs as Tabs
|
|
|
|
import Examples.Text as Text
|
|
|
|
import Examples.Text.Writing as Writing
|
|
|
|
import Examples.TextArea as TextArea
|
|
|
|
import Examples.TextInput as TextInput
|
|
|
|
import Examples.Tooltip as Tooltip
|
|
|
|
import Examples.UiIcon as UiIcon
|
2018-02-13 00:32:38 +03:00
|
|
|
|
|
|
|
|
2020-04-01 02:09:09 +03:00
|
|
|
all : List (Example State Msg)
|
|
|
|
all =
|
2020-04-01 02:30:18 +03:00
|
|
|
[ Accordion.example
|
|
|
|
|> Example.wrapMsg AccordionMsg
|
|
|
|
(\msg ->
|
2020-04-01 01:42:25 +03:00
|
|
|
case msg of
|
|
|
|
AccordionMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState AccordionState
|
|
|
|
(\msg ->
|
2020-04-01 01:42:25 +03:00
|
|
|
case msg of
|
|
|
|
AccordionState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, AssignmentIcon.example
|
|
|
|
|> Example.wrapMsg AssignmentIconMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
AssignmentIconMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState AssignmentIconState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
AssignmentIconState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 01:42:25 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Button.example
|
|
|
|
|> Example.wrapMsg ButtonMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ButtonMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState ButtonState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ButtonState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Checkbox.example
|
|
|
|
|> Example.wrapMsg CheckboxMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
CheckboxMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState CheckboxState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
CheckboxState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, ClickableSvg.example
|
|
|
|
|> Example.wrapMsg ClickableSvgMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ClickableSvgMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState ClickableSvgState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ClickableSvgState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, ClickableText.example
|
|
|
|
|> Example.wrapMsg ClickableTextMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ClickableTextMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState ClickableTextState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ClickableTextState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Colors.example
|
|
|
|
|> Example.wrapMsg ColorsMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ColorsMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState ColorsState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
ColorsState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-05-15 20:15:35 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Confetti.example
|
|
|
|
|> Example.wrapMsg ConfettiMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
ConfettiMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState ConfettiState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
ConfettiState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, DisclosureIndicator.example
|
|
|
|
|> Example.wrapMsg DisclosureIndicatorMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
DisclosureIndicatorMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState DisclosureIndicatorState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
DisclosureIndicatorState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-09 01:13:06 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Divider.example
|
|
|
|
|> Example.wrapMsg DividerMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
DividerMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState DividerState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
DividerState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Fonts.example
|
|
|
|
|> Example.wrapMsg FontsMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
FontsMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState FontsState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
FontsState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Heading.example
|
|
|
|
|> Example.wrapMsg HeadingMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
HeadingMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState HeadingState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
HeadingState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-03 04:13:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Loading.example
|
|
|
|
|> Example.wrapMsg LoadingMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
LoadingMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState LoadingState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
LoadingState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Logo.example
|
|
|
|
|> Example.wrapMsg LogoMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
LogoMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState LogoState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
LogoState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, MasteryIcon.example
|
|
|
|
|> Example.wrapMsg MasteryIconMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
MasteryIconMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState MasteryIconState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
MasteryIconState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-05-07 22:46:21 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Menu.example
|
|
|
|
|> Example.wrapMsg MenuMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
MenuMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState MenuState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
MenuState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-28 00:35:33 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Message.example
|
|
|
|
|> Example.wrapMsg MessageMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
MessageMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState MessageState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
MessageState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Modal.example
|
|
|
|
|> Example.wrapMsg ModalMsg
|
|
|
|
(\msg ->
|
2020-04-01 01:42:25 +03:00
|
|
|
case msg of
|
|
|
|
ModalMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState ModalState
|
|
|
|
(\msg ->
|
2020-04-01 01:42:25 +03:00
|
|
|
case msg of
|
|
|
|
ModalState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Page.example
|
|
|
|
|> Example.wrapMsg PageMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
PageMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState PageState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
PageState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Pennant.example
|
|
|
|
|> Example.wrapMsg PennantMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
PennantMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState PennantState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
PennantState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-07-30 21:12:30 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, RadioButton.example
|
|
|
|
|> Example.wrapMsg RadioButtonMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
RadioButtonMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState RadioButtonState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
RadioButtonState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, SegmentedControl.example
|
|
|
|
|> Example.wrapMsg SegmentedControlMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SegmentedControlMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SegmentedControlState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SegmentedControlState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Select.example
|
|
|
|
|> Example.wrapMsg SelectMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SelectMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SelectState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SelectState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Slide.example
|
|
|
|
|> Example.wrapMsg SlideMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SlideMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SlideState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SlideState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, SlideModal.example
|
|
|
|
|> Example.wrapMsg SlideModalMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SlideModalMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SlideModalState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SlideModalState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, SortableTable.example
|
|
|
|
|> Example.wrapMsg SortableTableMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SortableTableMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SortableTableState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SortableTableState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Svg.example
|
|
|
|
|> Example.wrapMsg SvgMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SvgMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState SvgState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
SvgState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-12-10 20:56:52 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
, Switch.example
|
|
|
|
|> Example.wrapMsg SwitchMsg
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
SwitchMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
|
|
|
)
|
|
|
|
|> Example.wrapState SwitchState
|
|
|
|
(\msg ->
|
|
|
|
case msg of
|
|
|
|
SwitchState childState ->
|
|
|
|
Just childState
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Table.example
|
|
|
|
|> Example.wrapMsg TableMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TableMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TableState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TableState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Tabs.example
|
|
|
|
|> Example.wrapMsg TabsMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TabsMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TabsState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TabsState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Text.example
|
|
|
|
|> Example.wrapMsg TextMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TextState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Writing.example
|
|
|
|
|> Example.wrapMsg WritingMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
WritingMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState WritingState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
WritingState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, TextArea.example
|
|
|
|
|> Example.wrapMsg TextAreaMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextAreaMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TextAreaState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextAreaState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, TextInput.example
|
|
|
|
|> Example.wrapMsg TextInputMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextInputMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TextInputState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TextInputState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, Tooltip.example
|
|
|
|
|> Example.wrapMsg TooltipMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TooltipMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState TooltipState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
TooltipState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
, UiIcon.example
|
|
|
|
|> Example.wrapMsg UiIconMsg
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
UiIconMsg childMsg ->
|
|
|
|
Just childMsg
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
|
|
|
|> Example.wrapState UiIconState
|
|
|
|
(\msg ->
|
2020-04-01 02:00:29 +03:00
|
|
|
case msg of
|
|
|
|
UiIconState childState ->
|
|
|
|
Just childState
|
|
|
|
|
|
|
|
_ ->
|
|
|
|
Nothing
|
2020-04-01 02:30:18 +03:00
|
|
|
)
|
2020-04-01 01:26:05 +03:00
|
|
|
]
|
2018-02-13 00:32:38 +03:00
|
|
|
|
|
|
|
|
2020-04-01 01:16:10 +03:00
|
|
|
type State
|
|
|
|
= AccordionState Accordion.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| AssignmentIconState AssignmentIcon.State
|
|
|
|
| ButtonState Button.State
|
|
|
|
| CheckboxState Checkbox.State
|
|
|
|
| ClickableSvgState ClickableSvg.State
|
|
|
|
| ClickableTextState ClickableText.State
|
|
|
|
| ColorsState Colors.State
|
2020-05-15 20:15:35 +03:00
|
|
|
| ConfettiState Confetti.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| DisclosureIndicatorState DisclosureIndicator.State
|
2020-04-09 01:13:06 +03:00
|
|
|
| DividerState Divider.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| FontsState Fonts.State
|
|
|
|
| HeadingState Heading.State
|
2020-04-03 04:13:29 +03:00
|
|
|
| LoadingState Loading.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| LogoState Logo.State
|
|
|
|
| MasteryIconState MasteryIcon.State
|
2020-05-07 22:46:21 +03:00
|
|
|
| MenuState Menu.State
|
2020-04-28 00:35:33 +03:00
|
|
|
| MessageState Message.State
|
2020-04-01 01:16:10 +03:00
|
|
|
| ModalState Modal.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| PageState Page.State
|
|
|
|
| PennantState Pennant.State
|
2020-07-30 21:12:30 +03:00
|
|
|
| RadioButtonState RadioButton.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| SegmentedControlState SegmentedControl.State
|
|
|
|
| SelectState Select.State
|
|
|
|
| SlideState Slide.State
|
|
|
|
| SlideModalState SlideModal.State
|
|
|
|
| SortableTableState SortableTable.State
|
|
|
|
| SvgState Svg.State
|
2020-12-10 20:56:52 +03:00
|
|
|
| SwitchState Switch.State
|
2020-04-01 02:00:29 +03:00
|
|
|
| TableState Table.State
|
|
|
|
| TabsState Tabs.State
|
|
|
|
| TextState Text.State
|
|
|
|
| TextAreaState TextArea.State
|
|
|
|
| TextInputState TextInput.State
|
|
|
|
| TooltipState Tooltip.State
|
|
|
|
| UiIconState UiIcon.State
|
|
|
|
| WritingState Writing.State
|
2020-04-01 01:16:10 +03:00
|
|
|
|
|
|
|
|
2020-04-01 02:09:09 +03:00
|
|
|
type Msg
|
2020-03-31 22:05:56 +03:00
|
|
|
= AccordionMsg Accordion.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| AssignmentIconMsg AssignmentIcon.Msg
|
|
|
|
| ButtonMsg Button.Msg
|
|
|
|
| CheckboxMsg Checkbox.Msg
|
|
|
|
| ClickableSvgMsg ClickableSvg.Msg
|
|
|
|
| ClickableTextMsg ClickableText.Msg
|
|
|
|
| ColorsMsg Colors.Msg
|
2020-05-15 20:15:35 +03:00
|
|
|
| ConfettiMsg Confetti.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| DisclosureIndicatorMsg DisclosureIndicator.Msg
|
2020-04-09 01:13:06 +03:00
|
|
|
| DividerMsg Divider.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| FontsMsg Fonts.Msg
|
|
|
|
| HeadingMsg Heading.Msg
|
2020-04-03 04:13:29 +03:00
|
|
|
| LoadingMsg Loading.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| LogoMsg Logo.Msg
|
|
|
|
| MasteryIconMsg MasteryIcon.Msg
|
2020-05-07 22:46:21 +03:00
|
|
|
| MenuMsg Menu.Msg
|
2020-04-28 00:35:33 +03:00
|
|
|
| MessageMsg Message.Msg
|
2020-03-31 22:48:26 +03:00
|
|
|
| ModalMsg Modal.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| PageMsg Page.Msg
|
|
|
|
| PennantMsg Pennant.Msg
|
2020-07-30 21:12:30 +03:00
|
|
|
| RadioButtonMsg RadioButton.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| SegmentedControlMsg SegmentedControl.Msg
|
|
|
|
| SelectMsg Select.Msg
|
|
|
|
| SlideMsg Slide.Msg
|
|
|
|
| SlideModalMsg SlideModal.Msg
|
|
|
|
| SortableTableMsg SortableTable.Msg
|
|
|
|
| SvgMsg Svg.Msg
|
2020-12-10 20:56:52 +03:00
|
|
|
| SwitchMsg Switch.Msg
|
2020-04-01 02:00:29 +03:00
|
|
|
| TableMsg Table.Msg
|
|
|
|
| TabsMsg Tabs.Msg
|
|
|
|
| TextMsg Text.Msg
|
|
|
|
| TextAreaMsg TextArea.Msg
|
|
|
|
| TextInputMsg TextInput.Msg
|
|
|
|
| TooltipMsg Tooltip.Msg
|
|
|
|
| UiIconMsg UiIcon.Msg
|
|
|
|
| WritingMsg Writing.Msg
|