mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-13 07:48:26 +03:00
Use InputStyles.V4 without content creation styles
This commit is contained in:
parent
788a5dc7e6
commit
35e6a28c39
@ -1,4 +1,5 @@
|
||||
Nri.Ui.BreadCrumbs.V1,upgrade to V2
|
||||
Nri.Ui.Checkbox.V5,upgrade to V6
|
||||
Nri.Ui.InputStyles.V3,upgrade to V4
|
||||
Nri.Ui.Tabs.V6,upgrade to V7
|
||||
Nri.Ui.TextArea.V4,upgrade to V5
|
||||
|
|
@ -68,6 +68,10 @@ hint = 'upgrade to V5'
|
||||
[forbidden."Nri.Ui.InputStyles.V2"]
|
||||
hint = 'upgrade to V3'
|
||||
|
||||
[forbidden."Nri.Ui.InputStyles.V3"]
|
||||
hint = 'upgrade to V4'
|
||||
usages = ['styleguide/../src/Nri/Ui/TextArea/V4.elm']
|
||||
|
||||
[forbidden."Nri.Ui.Menu.V1"]
|
||||
hint = 'upgrade to V3'
|
||||
|
||||
|
@ -12,7 +12,7 @@ import Css
|
||||
import Html.Styled.Attributes as Attributes
|
||||
import InputErrorAndGuidanceInternal exposing (ErrorState)
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles exposing (Theme)
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles exposing (Theme)
|
||||
|
||||
|
||||
{-| -}
|
||||
|
@ -20,7 +20,7 @@ import Css exposing (Color)
|
||||
import Css.Global exposing (Snippet)
|
||||
import Nri.Ui.Colors.Extra exposing (toCssString)
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles exposing (focusedErrorInputBoxShadow, focusedInputBoxShadow)
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles exposing (focusedErrorInputBoxShadow, focusedInputBoxShadow)
|
||||
|
||||
|
||||
{-| When :focus-visible, add the two-tone focus ring.
|
||||
|
@ -1,10 +1,27 @@
|
||||
module Nri.Ui.InputStyles.V3 exposing
|
||||
module Nri.Ui.InputStyles.V4 exposing
|
||||
( label, Theme(..), input
|
||||
, inputPaddingVertical, inputLineHeight, textAreaHeight, writingLineHeight, writingPadding, writingPaddingTop, writingMinHeight, defaultMarginTop
|
||||
, focusedInputBoxShadow, focusedErrorInputBoxShadow, errorClass, inputClass
|
||||
)
|
||||
|
||||
{-| InputStyles used by the TextInput and TextArea widgets.
|
||||
{-|
|
||||
|
||||
|
||||
### Changes from V3
|
||||
|
||||
- Remove ContentCreation theme
|
||||
|
||||
|
||||
### Patch changes
|
||||
|
||||
- expose defaultMarginTop
|
||||
|
||||
|
||||
### Changes from V2
|
||||
|
||||
- adds UserGenerated
|
||||
|
||||
InputStyles used by the TextInput and TextArea widgets.
|
||||
|
||||
@docs label, Theme, input
|
||||
|
||||
@ -14,13 +31,6 @@ module Nri.Ui.InputStyles.V3 exposing
|
||||
@docs inputPaddingVertical, inputLineHeight, textAreaHeight, writingLineHeight, writingPadding, writingPaddingTop, writingMinHeight, defaultMarginTop
|
||||
@docs focusedInputBoxShadow, focusedErrorInputBoxShadow, errorClass, inputClass
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
- patch: expose defaultMarginTop
|
||||
|
||||
- V3: add UserGenerated
|
||||
|
||||
-}
|
||||
|
||||
import Css exposing (..)
|
||||
@ -32,8 +42,7 @@ import Nri.Ui.Fonts.V1
|
||||
|
||||
{-| -}
|
||||
type Theme
|
||||
= ContentCreation
|
||||
| Standard
|
||||
= Standard
|
||||
| UserGenerated
|
||||
| Writing
|
||||
|
||||
@ -82,17 +91,6 @@ label theme inError =
|
||||
batch []
|
||||
]
|
||||
|
||||
ContentCreation ->
|
||||
batch
|
||||
[ sharedStyles
|
||||
, border3 (px 1) solid gray75
|
||||
, borderRadius (px 4)
|
||||
, padding2 zero (px 5)
|
||||
, fontSize (Css.px 11)
|
||||
, color gray45
|
||||
, padding2 (px 2) (px 5)
|
||||
]
|
||||
|
||||
Writing ->
|
||||
batch
|
||||
[ sharedStyles
|
||||
@ -223,14 +221,6 @@ input theme =
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
ContentCreation ->
|
||||
batch
|
||||
[ sharedStyles
|
||||
, padding2 inputPaddingVertical (px 15)
|
||||
, fontSize (px 15)
|
||||
, Nri.Ui.Fonts.V1.baseFont
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -57,7 +57,7 @@ import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.CssVendorPrefix.V1 as VendorPrefixed
|
||||
import Nri.Ui.Fonts.V1 as Fonts
|
||||
import Nri.Ui.Html.Attributes.V2 as Extra
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles
|
||||
import Nri.Ui.Util
|
||||
import SolidColor
|
||||
|
||||
|
@ -36,7 +36,7 @@ import Html.Styled as Html exposing (Html)
|
||||
import Html.Styled.Attributes as Attributes
|
||||
import Html.Styled.Events as Events
|
||||
import Nri.Ui.Html.Attributes.V2 as Extra
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles
|
||||
exposing
|
||||
( Theme(..)
|
||||
)
|
||||
@ -104,9 +104,6 @@ view_ theme model =
|
||||
UserGenerated ->
|
||||
InputStyles.textAreaHeight
|
||||
|
||||
ContentCreation ->
|
||||
InputStyles.textAreaHeight
|
||||
|
||||
Writing ->
|
||||
InputStyles.writingMinHeight
|
||||
in
|
||||
@ -191,9 +188,6 @@ calculateMinHeight textAreaStyle specifiedHeight =
|
||||
Writing ->
|
||||
writingSingleLineHeight
|
||||
|
||||
ContentCreation ->
|
||||
singleLineHeight
|
||||
|
||||
DefaultHeight ->
|
||||
case textAreaStyle of
|
||||
Standard ->
|
||||
@ -205,9 +199,6 @@ calculateMinHeight textAreaStyle specifiedHeight =
|
||||
Writing ->
|
||||
InputStyles.writingMinHeight
|
||||
|
||||
ContentCreation ->
|
||||
InputStyles.textAreaHeight
|
||||
|
||||
|
||||
singleLineHeight : Css.Px
|
||||
singleLineHeight =
|
||||
|
@ -63,7 +63,7 @@ import Nri.Ui.ClickableSvg.V2 as ClickableSvg
|
||||
import Nri.Ui.ClickableText.V3 as ClickableText
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.Html.Attributes.V2 as Extra
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles exposing (defaultMarginTop)
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles exposing (defaultMarginTop)
|
||||
import Nri.Ui.Svg.V1 as Svg
|
||||
import Nri.Ui.UiIcon.V1 as UiIcon
|
||||
import Nri.Ui.Util exposing (dashify)
|
||||
|
@ -16,7 +16,7 @@ import Html.Styled as Html exposing (Html)
|
||||
import Html.Styled.Attributes as Attributes exposing (css)
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.Heading.V3 as Heading
|
||||
import Nri.Ui.InputStyles.V3 as InputStyles exposing (Theme(..))
|
||||
import Nri.Ui.InputStyles.V4 as InputStyles exposing (Theme(..))
|
||||
import Nri.Ui.TextArea.V5 as TextArea
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
"Nri.Ui.Html.Attributes.V2",
|
||||
"Nri.Ui.Html.V3",
|
||||
"Nri.Ui.InputStyles.V3",
|
||||
"Nri.Ui.InputStyles.V4",
|
||||
"Nri.Ui.Loading.V1",
|
||||
"Nri.Ui.Logo.V1",
|
||||
"Nri.Ui.MasteryIcon.V1",
|
||||
|
Loading…
Reference in New Issue
Block a user