@@ -0,0 +1,129 @@
1+module HeroUI.Tabs where
5+import Effect.Uncurried (EffectFn1)
6+import React.Basic (JSX)
7+import Yoga.React.DOM.Internal (class IsJSX)
8+import Data.Function.Uncurried (runFn4)
9+import HeroUI.Types (Orientation, orientationToString)
10+import HeroUI.Internal (class CoerceHeroProps, createElementTransformImpl)
11+import HeroUI.Raw as Raw
13+data Variant = Primary | Secondary
15+derive instance Eq Variant
16+derive instance Ord Variant
18+variantToString :: Variant -> String
19+variantToString = case _ of
21+ Secondary -> "secondary"
23+data KeyboardActivation = Automatic | Manual
25+derive instance Eq KeyboardActivation
26+derive instance Ord KeyboardActivation
28+keyboardActivationToString :: KeyboardActivation -> String
29+keyboardActivationToString = case _ of
30+ Automatic -> "automatic"
35+ , orientation :: Orientation
36+ , selectedKey :: String
37+ , defaultSelectedKey :: String
38+ , onSelectionChange :: EffectFn1 String Unit
39+ , keyboardActivation :: KeyboardActivation
40+ , isDisabled :: Boolean
41+ , className :: String
46+ :: { variant :: Variant -> String
47+ , orientation :: Orientation -> String
48+ , keyboardActivation :: KeyboardActivation -> String
51+ { variant: variantToString
52+ , orientation: orientationToString
53+ , keyboardActivation: keyboardActivationToString
57+ :: forall givenProps nonDataProps kids
59+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | TabsProps () }
63+tabs props kids = runFn4 createElementTransformImpl tabsTransforms Raw.tabs props kids
67+ , isDisabled :: Boolean
69+ , className :: String
74+ :: forall givenProps nonDataProps kids
76+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | TabProps () }
80+tab props kids = runFn4 createElementTransformImpl {} Raw.tab props kids
82+type PanelProps r = (id :: String, className :: String | r)
85+ :: forall givenProps nonDataProps kids
87+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | PanelProps () }
91+tabPanel props kids = runFn4 createElementTransformImpl {} Raw.tabPanel props kids
93+type SectionProps r = (className :: String | r)
96+ :: forall givenProps nonDataProps kids
98+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | SectionProps () }
102+tabListContainer props kids = runFn4 createElementTransformImpl {} Raw.tabListContainer props kids
105+ :: forall givenProps nonDataProps kids
107+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | SectionProps () }
111+tabList props kids = runFn4 createElementTransformImpl {} Raw.tabList props kids
114+ :: forall givenProps nonDataProps kids
116+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | SectionProps () }
120+tabIndicator props kids = runFn4 createElementTransformImpl {} Raw.tabIndicator props kids
123+ :: forall givenProps nonDataProps kids
125+ => CoerceHeroProps { | givenProps } { | nonDataProps } { | SectionProps () }
129+tabSeparator props kids = runFn4 createElementTransformImpl {} Raw.tabSeparator props kids