Merge remote-tracking branch 'origin/master' into tessa/upgrate-clickable-text

This commit is contained in:
Tessa Kelly 2019-07-31 17:03:07 -07:00
commit 1696a4ce31
9 changed files with 1330 additions and 836 deletions

View File

@ -3,6 +3,7 @@ SHELL:=env PATH=${PATH} /bin/sh
.PHONY: test
test: node_modules
npx elm-test
npx elm-verify-examples --run-tests
make axe-report
tests/axe-report.json: public script/run-axe.sh script/axe-puppeteer.js

2093
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@
"elm": "^0.19.0-no-deps",
"elm-format": "0.8.1",
"elm-test": "0.19.0-rev6",
"elm-verify-examples": "^4.0.0",
"request": "^2.88.0"
},
"dependencies": {

View File

@ -17,10 +17,15 @@ These changes have required major API changes. Be sure to wire up subscriptions!
import Nri.Ui.Button.V9 as Button
import Nri.Ui.Modal.V6 as Modal
view : Modal.State -> Html Msg
type Msg
= ModalMsg Modal.Msg
| DoSomthing
view : Modal.Model -> Html Msg
view state =
Modal.info
{ title = { title = "Modal Header", visibleTitle = True }
{ title = "Modal Header"
, visibleTitle = True
, wrapMsg = ModalMsg
, content =
\{ onlyFocusableElement } ->
@ -38,10 +43,13 @@ These changes have required major API changes. Be sure to wire up subscriptions!
}
state
subscriptions : Modal.State -> Sub Msg
subscriptions : Modal.Model -> Sub Msg
subscriptions state =
Modal.subscriptions state
view init
--> text "" -- a closed modal
## State and updates

View File

@ -83,22 +83,22 @@ init assets =
|> Control.field "icon" (iconChoice assets)
|> Control.field "button type"
(Control.choice
( "button", Control.value Button )
[ ( "link", Control.value Link )
[ ( "button", Control.value Button )
, ( "link", Control.value Link )
]
)
|> Control.field "width"
(Control.choice
( "exactWidth 120", Control.value (Button.exactWidth 120) )
[ ( "exactWidth 70", Control.value (Button.exactWidth 70) )
[ ( "exactWidth 120", Control.value (Button.exactWidth 120) )
, ( "exactWidth 70", Control.value (Button.exactWidth 70) )
, ( "unboundedWidth", Control.value Button.unboundedWidth )
, ( "fillContainerWidth", Control.value Button.fillContainerWidth )
]
)
|> Control.field "state (button only)"
(Control.choice
( "enabled", Control.value Button.enabled )
[ ( "disabled", Control.value Button.disabled )
[ ( "enabled", Control.value Button.enabled )
, ( "disabled", Control.value Button.disabled )
, ( "error", Control.value Button.error )
, ( "unfulfilled", Control.value Button.unfulfilled )
, ( "loading", Control.value Button.loading )
@ -111,8 +111,10 @@ init assets =
iconChoice : { r | performance : String, lock : String } -> Control.Control (Maybe Svg)
iconChoice assets =
Control.choice
( "Nothing", Control.value Nothing )
[ ( "Just Performance"
[ ( "Nothing"
, Control.value Nothing
)
, ( "Just Performance"
, Icon.performance assets
|> Icon.decorativeIcon
|> NriSvg.fromHtml

View File

@ -52,13 +52,13 @@ init assets =
|> Control.field "icon"
(Control.maybe True <|
Control.choice
( "Help"
, Icon.helpSvg assets
|> Icon.decorativeIcon
|> NriSvg.fromHtml
|> Control.value
)
[ ( "Performance"
[ ( "Help"
, Icon.helpSvg assets
|> Icon.decorativeIcon
|> NriSvg.fromHtml
|> Control.value
)
, ( "Performance"
, Icon.performance assets
|> Icon.decorativeIcon
|> NriSvg.fromHtml

View File

@ -99,15 +99,17 @@ init assets =
Control.record Options
|> Control.field "width"
(Control.choice
( "FitContent", Control.value SegmentedControl.FitContent )
[ ( "FillContainer", Control.value SegmentedControl.FillContainer ) ]
[ ( "FitContent", Control.value SegmentedControl.FitContent )
, ( "FillContainer", Control.value SegmentedControl.FillContainer )
]
)
|> Control.field "icon"
(Control.maybe False (Control.value { alt = "Help", icon = Icon.helpSvg assets }))
|> Control.field "which view function"
(Control.choice
( "view", Control.value False )
[ ( "viewSpa", Control.value True ) ]
[ ( "view", Control.value False )
, ( "viewSpa", Control.value True )
]
)
}

View File

@ -7,8 +7,8 @@
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"NoRedInk/elm-debug-controls-without-datepicker": "1.0.1",
"avh4/elm-color": "1.0.0",
"avh4/elm-debug-controls": "2.0.0",
"elm/browser": "1.0.1",
"elm/core": "1.0.2",
"elm/html": "1.0.0",
@ -18,17 +18,20 @@
"elm/svg": "1.0.1",
"elm/url": "1.0.0",
"elm-community/string-extra": "4.0.1",
"tesk9/accessible-html-with-css": "2.1.1",
"pablohirafuji/elm-markdown": "2.0.5",
"rtfeldman/elm-css": "16.0.0",
"tesk9/accessible-html": "4.0.0",
"tesk9/accessible-html-with-css": "2.1.1",
"tesk9/modal": "5.0.1",
"wernerdegroot/listzipper": "3.2.0"
},
"indirect": {
"NoRedInk/datetimepicker-legacy": "1.0.1",
"Skinney/murmur3": "2.0.8",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.2",
"justinmimbs/date": "3.1.2",
"justinmimbs/time-extra": "1.1.0",
"rtfeldman/elm-hex": "1.0.0"
}
},
@ -36,4 +39,4 @@
"direct": {},
"indirect": {}
}
}
}

View File

@ -0,0 +1,6 @@
{
"root": "../src",
"tests": [
"Nri.Ui.Modal.V6"
]
}