mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-04 07:02:12 +03:00
Merge pull request #1692 from NoRedInk/delete-carousel-v1
delete deprecated Nri.Ui.Carousel.V1
This commit is contained in:
commit
8cb0ea4ced
@ -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
elm.json
1
elm.json
@ -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",
|
||||
|
@ -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
|
||||
}
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user