Prep for release

This commit is contained in:
Tessa Kelly 2023-08-08 10:51:32 -06:00
parent 004ab089da
commit 7f536bab5d
7 changed files with 29 additions and 12 deletions

View File

@ -1,4 +1,6 @@
Nri.Ui.Block.V4,upgrade to V5
Nri.Ui.WhenFocusLeaves.V1,upgrade to V2
Nri.Ui.Mark.V2,upgrade to V3
Nri.Ui.Message.V3,upgrade to V4
Nri.Ui.Table.V6,upgrade to V7
Nri.Ui.Tabs.V6,upgrade to V8

1 Nri.Ui.Block.V4 upgrade to V5
2 Nri.Ui.WhenFocusLeaves.V1 upgrade to V2
3 Nri.Ui.Mark.V2 upgrade to V3
4 Nri.Ui.Message.V3 upgrade to V4
5 Nri.Ui.Table.V6 upgrade to V7
6 Nri.Ui.Tabs.V6 upgrade to V8

View File

@ -29,6 +29,7 @@
"Nri.Ui.Divider.V2",
"Nri.Ui.Effects.V1",
"Nri.Ui.WhenFocusLeaves.V1",
"Nri.Ui.WhenFocusLeaves.V2",
"Nri.Ui.FocusLoop.V1",
"Nri.Ui.FocusRing.V1",
"Nri.Ui.FocusTrap.V1",

View File

@ -149,6 +149,9 @@ hint = 'upgrade to V3'
[forbidden."Nri.Ui.Message.V2"]
hint = 'upgrade to V3'
[forbidden."Nri.Ui.Message.V3"]
hint = 'upgrade to V4'
[forbidden."Nri.Ui.Modal.V10"]
hint = 'upgrade to V11'
usages = ['component-catalog-app/Examples/RadioButton.elm']
@ -269,3 +272,6 @@ usages = ['component-catalog/../src/Nri/Ui/Menu/V1.elm']
[forbidden."Nri.Ui.Tooltip.V2"]
hint = 'upgrade to V3'
[forbidden."Nri.Ui.WhenFocusLeaves.V1"]
hint = 'upgrade to V2'

View File

@ -1,13 +1,17 @@
module Nri.Ui.FocusTrap.V1 exposing (FocusTrap, toAttribute)
{-| Create a focus trap.
{-| Patch changes:
- Use Nri.Ui.WhenFocusLeaves.V2
Create a focus trap.
@docs FocusTrap, toAttribute
-}
import Accessibility.Styled as Html
import Nri.Ui.WhenFocusLeaves.V1 as WhenFocusLeaves
import Nri.Ui.WhenFocusLeaves.V2 as WhenFocusLeaves
{-| Defines how focus will wrap in reponse to tab keypresses in a part of the UI.
@ -28,8 +32,8 @@ type alias FocusTrap msg =
toAttribute : FocusTrap msg -> Html.Attribute msg
toAttribute { firstId, lastId, focus } =
WhenFocusLeaves.onKeyDownPreventDefault []
{ firstId = firstId
, lastId = lastId
{ firstIds = [ firstId ]
, lastIds = [ lastId ]
, -- if the user tabs back while on the first id,
-- we want to wrap around to the last id.
tabBackAction = focus lastId

View File

@ -14,6 +14,7 @@ module Nri.Ui.Menu.V4 exposing
{-| Patch changes:
- improve interoperability with Tooltip (Note that tooltip keyboard events are not fully supported!)
- Use Nri.Ui.WhenFocusLeaves.V2
Changes from V3:
@ -73,7 +74,7 @@ import Nri.Ui.Html.Attributes.V2 as AttributesExtra
import Nri.Ui.Shadows.V1 as Shadows
import Nri.Ui.Svg.V1 as Svg
import Nri.Ui.Tooltip.V3 as Tooltip
import Nri.Ui.WhenFocusLeaves.V1 as WhenFocusLeaves
import Nri.Ui.WhenFocusLeaves.V2 as WhenFocusLeaves
{-| -}
@ -419,8 +420,8 @@ viewCustom focusAndToggle config entries =
}
)
]
{ firstId = config.buttonId
, lastId = lastId
{ firstIds = [ config.buttonId ]
, lastIds = [ lastId ]
, tabBackAction =
focusAndToggle
{ isOpen = False
@ -442,8 +443,8 @@ viewCustom focusAndToggle config entries =
}
)
]
{ firstId = firstId
, lastId = lastId
{ firstIds = [ firstId ]
, lastIds = [ lastId ]
, tabBackAction =
focusAndToggle
{ isOpen = True

View File

@ -32,6 +32,7 @@ module Nri.Ui.Tooltip.V3 exposing
- use internal `Content` module
- adds `paragraph` and `markdown` support
- add partially-transparent white border around tooltips
- Use Nri.Ui.WhenFocusLeaves.V2
Changes from V2:
@ -97,7 +98,7 @@ import Nri.Ui.Html.Attributes.V2 as ExtraAttributes
import Nri.Ui.MediaQuery.V1 as MediaQuery exposing (mobileBreakpoint, narrowMobileBreakpoint, quizEngineBreakpoint)
import Nri.Ui.Shadows.V1 as Shadows
import Nri.Ui.UiIcon.V1 as UiIcon
import Nri.Ui.WhenFocusLeaves.V1 as WhenFocusLeaves
import Nri.Ui.WhenFocusLeaves.V2 as WhenFocusLeaves
{-| -}
@ -933,8 +934,8 @@ viewTooltip_ { trigger, id } tooltip =
( [ Events.onMouseEnter (msg True)
, Events.onMouseLeave (msg False)
, WhenFocusLeaves.onKeyDown []
{ firstId = triggerId
, lastId = Maybe.withDefault triggerId lastId
{ firstIds = [ triggerId ]
, lastIds = [ Maybe.withDefault triggerId lastId ]
, tabBackAction = msg False
, tabForwardAction = msg False
}

View File

@ -25,6 +25,7 @@
"Nri.Ui.Divider.V2",
"Nri.Ui.Effects.V1",
"Nri.Ui.WhenFocusLeaves.V1",
"Nri.Ui.WhenFocusLeaves.V2",
"Nri.Ui.FocusLoop.V1",
"Nri.Ui.FocusRing.V1",
"Nri.Ui.FocusTrap.V1",
@ -41,6 +42,7 @@
"Nri.Ui.Loading.V1",
"Nri.Ui.Logo.V1",
"Nri.Ui.Mark.V2",
"Nri.Ui.Mark.V3",
"Nri.Ui.MasteryIcon.V1",
"Nri.Ui.MediaQuery.V1",
"Nri.Ui.Menu.V4",