Merge pull request #1692 from NoRedInk/delete-carousel-v1

delete deprecated Nri.Ui.Carousel.V1
This commit is contained in:
celso 2024-07-31 17:01:47 +00:00 committed by GitHub
commit 8cb0ea4ced
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 69 deletions

View File

@ -1,5 +1,4 @@
Nri.Ui.Accordion.V3,upgrade to V4
Nri.Ui.Carousel.V1,upgrade to V2
Nri.Ui.ClickableText.V3,upgrade to V4
Nri.Ui.Mark.V2,upgrade to V6
Nri.Ui.Pennant.V3,upgrade to V4

1 Nri.Ui.Accordion.V3 upgrade to V4
Nri.Ui.Carousel.V1 upgrade to V2
2 Nri.Ui.ClickableText.V3 upgrade to V4
3 Nri.Ui.Mark.V2 upgrade to V6
4 Nri.Ui.Pennant.V3 upgrade to V4

View File

@ -17,7 +17,6 @@
"Nri.Ui.Block.V6",
"Nri.Ui.BreadCrumbs.V2",
"Nri.Ui.Button.V10",
"Nri.Ui.Carousel.V1",
"Nri.Ui.Carousel.V2",
"Nri.Ui.CharacterIcon.V2",
"Nri.Ui.Checkbox.V7",

View File

@ -1,66 +0,0 @@
module Nri.Ui.Carousel.V1 exposing
( view
, Item
, buildItem
)
{-| Patch changes:
- remove tooltip-related code that is never used for Carousel
@docs view
@docs Item
@docs buildItem
-}
import Css exposing (..)
import Html.Styled as Html exposing (Html)
import TabsInternal.V2 as TabsInternal
{-| -}
type Item id msg
= Item (TabsInternal.Tab id msg)
{-| Builds an selectable item in the Caroursel
`controlHtml` represents the element that will appear in the list of options.
`slideHtml` represents the element that will be shown in your carousel when this item is selected.
-}
buildItem : { id : id, idString : String, slideHtml : Html msg, controlHtml : Html Never } -> Item id msg
buildItem config =
Item
(TabsInternal.fromList { id = config.id, idString = config.idString }
[ \tab -> { tab | panelView = config.slideHtml }
, \tab -> { tab | tabView = [ Html.map never config.controlHtml ] }
]
)
{-| -}
view :
{ focusAndSelect : { select : id, focus : Maybe String } -> msg
, selected : id
, controlStyles : Bool -> List Style
, controlListStyles : List Style
, items : List (Item id msg)
}
-> { controls : Html msg, slides : Html msg }
view config =
let
{ tabList, tabPanels } =
TabsInternal.views
{ focusAndSelect = config.focusAndSelect
, selected = config.selected
, tabs = List.map (\(Item t) -> t) config.items
, tabStyles = always config.controlStyles
, tabListStyles = config.controlListStyles
}
in
{ controls = tabList
, slides = tabPanels
}

View File

@ -13,7 +13,6 @@
"Nri.Ui.Block.V6",
"Nri.Ui.BreadCrumbs.V2",
"Nri.Ui.Button.V10",
"Nri.Ui.Carousel.V1",
"Nri.Ui.Carousel.V2",
"Nri.Ui.CharacterIcon.V2",
"Nri.Ui.Checkbox.V7",
@ -72,6 +71,7 @@
"Nri.Ui.SortableTable.V4",
"Nri.Ui.Spacing.V1",
"Nri.Ui.Sprite.V1",
"Nri.Ui.StickerIcon.V1",
"Nri.Ui.Svg.V1",
"Nri.Ui.Switch.V3",
"Nri.Ui.Table.V7",