jsxRuntime jsx jsxFrag import * as React from "react" ; import * as p from "@plasmicapp/react-web" ; import { hasVariant , classNames , wrapWithClassName , createPlasmicElementProxy , makeFragment , MultiChoiceArg , SingleBooleanChoiceArg , SingleChoiceArg , pick , omit , useTrigger , StrictProps , deriveRenderOpts , ensureGlobalVariants , } from "@plasmicapp/react-web" ; import "@plasmicapp/react-web/lib/plasmic.css" ; import * as defaultcss from "../plasmic__default_style.module.css" ; import * as projectcss from "./plasmic_plume_main.module.css" ; import * as sty from "./PlasmicCheckbox.module.css" ; import CheckIcon from "./icons/PlasmicIcon__Check" ; import IndeterminateIcon from "./icons/PlasmicIcon__Indeterminate" ; export type PlasmicCheckbox__VariantMembers = { noLabel : "noLabel" ; isDisabled : "isDisabled" ; isChecked : "isChecked" ; isIndeterminate : "isIndeterminate" ; } ; export type PlasmicCheckbox__VariantsArgs = { noLabel ? : SingleBooleanChoiceArg < "noLabel" > ; isDisabled ? : SingleBooleanChoiceArg < "isDisabled" > ; isChecked ? : SingleBooleanChoiceArg < "isChecked" > ; isIndeterminate ? : SingleBooleanChoiceArg < "isIndeterminate" > ; } ; type VariantPropType = keyof PlasmicCheckbox__VariantsArgs ; export const PlasmicCheckbox__VariantProps = new Array < VariantPropType > ( "noLabel" , "isDisabled" , "isChecked" , "isIndeterminate" ) ; export type PlasmicCheckbox__ArgsType = { children ? : React . ReactNode ; name ? : string ; } ; type ArgPropType = keyof PlasmicCheckbox__ArgsType ; export const PlasmicCheckbox__ArgProps = new Array < ArgPropType > ( "children" , "name" ) ; export type PlasmicCheckbox__OverridesType = { root ? : p . Flex < "div" > ; box ? : p . Flex < "div" > ; svg ? : p . Flex < "svg" > ; focusRing ? : p . Flex < "div" > ; labelContainer ? : p . Flex < "div" > ; } ; export interface DefaultCheckboxProps extends p . CheckboxProps { } function PlasmicCheckbox__RenderFunc ( props ) { const { variants , args , overrides , forNode } = props ; const [ isRootFocusVisibleWithin , triggerRootFocusVisibleWithinProps , ] = useTrigger ( "useFocusVisibleWithin" , { isTextInput : false , } ) ; const triggers = { focusVisibleWithin_root : isRootFocusVisibleWithin , } ; return ( < div data - plasmic - name = { "root" } data - plasmic - override = { overrides . root } data - plasmic - root = { true } data - plasmic - for - node = { forNode } className = { classNames ( defaultcss . all , projectcss . root_reset , sty . root , { [ sty . root_____focusVisibleWithin ] : triggers . focusVisibleWithin_root , [ sty . root__isChecked ] : hasVariant ( variants , "isChecked" , "isChecked" ) , [ sty . root__isDisabled ] : hasVariant ( variants , "isDisabled" , "isDisabled" ) , [ sty . root__isIndeterminate ] : hasVariant ( variants , "isIndeterminate" , "isIndeterminate" ) , [ sty . root__noLabel ] : hasVariant ( variants , "noLabel" , "noLabel" ) , } ) } data - plasmic - trigger - props = { [ triggerRootFocusVisibleWithinProps ] } > < div data - plasmic - name = { "box" } data - plasmic - override = { overrides . box } className = { classNames ( defaultcss . all , sty . box , { [ sty . box_____focusVisibleWithin ] : triggers . focusVisibleWithin_root , [ sty . box__isChecked ] : hasVariant ( variants , "isChecked" , "isChecked" ) , [ sty . box__isDisabled ] : hasVariant ( variants , "isDisabled" , "isDisabled" ) , [ sty . box__isIndeterminate ] : hasVariant ( variants , "isIndeterminate" , "isIndeterminate" ) , } ) } > { ( hasVariant ( variants , "isIndeterminate" , "isIndeterminate" ) ? true : hasVariant ( variants , "isChecked" , "isChecked" ) ? true : false ) ? ( < p . PlasmicIcon data - plasmic - name = { "svg" } data - plasmic - override = { overrides . svg } PlasmicIconType = { hasVariant ( variants , "isIndeterminate" , "isIndeterminate" ) ? IndeterminateIcon : hasVariant ( variants , "isChecked" , "isChecked" ) ? CheckIcon : div } className = { classNames ( defaultcss . all , sty . svg , { [ sty . svg__isChecked ] : hasVariant ( variants , "isChecked" , "isChecked" ) , [ sty . svg__isIndeterminate ] : hasVariant ( variants , "isIndeterminate" , "isIndeterminate" ) , } ) } role = { "img" } / > ) : null } { ( triggers . focusVisibleWithin_root ? true : false ) ? ( < div data - plasmic - name = { "focusRing" } data - plasmic - override = { overrides . focusRing } className = { classNames ( defaultcss . all , sty . focusRing , { [ sty . focusRing_____focusVisibleWithin ] : triggers . focusVisibleWithin_root , } ) } />) : null} < /div> { ( hasVariant ( variants , "noLabel" , "noLabel" ) ? false : true ) ? ( < div data - plasmic - name = { "labelContainer" } data - plasmic - override = { overrides . labelContainer } className = { classNames ( defaultcss . all , sty . labelContainer , { [ sty . labelContainer_____focusVisibleWithin ] : triggers . focusVisibleWithin_root , [ sty . labelContainer__noLabel ] : hasVariant ( variants , "noLabel" , "noLabel" ) , } ) } > { p . renderPlasmicSlot ( { defaultContents : "Enter some text" , value : args . children , } ) } < /div>) : null} < /div>) as React.ReactElement | null; } function useBehavior < P extends p . CheckboxProps > ( props , ref ) { return p . useCheckbox < P , typeof PlasmicCheckbox > ( PlasmicCheckbox , props , { isCheckedVariant : { group : "isChecked" , variant : "isChecked" } , isIndeterminateVariant : { group : "isIndeterminate" , variant : "isIndeterminate" , } , isDisabledVariant : { group : "isDisabled" , variant : "isDisabled" } , noLabelVariant : { group : "noLabel" , variant : "noLabel" } , labelSlot : "children" , root : "root" , } , ref ) ; } const PlasmicDescendants = { root : [ "root" , "box" , "svg" , "focusRing" , "labelContainer" ] , box : [ "box" , "svg" , "focusRing" ] , svg : [ "svg" ] , focusRing : [ "focusRing" ] , labelContainer : [ "labelContainer" ] , } as const ; type NodeNameType = keyof typeof PlasmicDescendants ; type DescendantsType < T extends NodeNameType > = typeof PlasmicDescendants [ T ] [ number ] ; type NodeDefaultElementType = { root : "div" ; box : "div" ; svg : "svg" ; focusRing : "div" ; labelContainer : "div" ; } ; type ReservedPropsType = "variants" | "args" | "overrides" ; type NodeOverridesType < T extends NodeNameType > = Pick < PlasmicCheckbox__OverridesType , DescendantsType < T > > ; type NodeComponentProps < T extends NodeNameType > = { variants ? : PlasmicCheckbox__VariantsArgs ; args ? : PlasmicCheckbox__ArgsType ; overrides ? : NodeOverridesType < T > ; } & Omit < PlasmicCheckbox__VariantsArgs , ReservedPropsType > & Omit < PlasmicCheckbox__ArgsType , ReservedPropsType > & Omit < NodeOverridesType < T > , ReservedPropsType | VariantPropType | ArgPropType > & Omit < Partial < React . ComponentProps < NodeDefaultElementType [ T ] > > , ReservedPropsType | VariantPropType | ArgPropType | DescendantsType < T > > ; function makeNodeComponent < NodeName extends NodeNameType > ( nodeName ) { type PropsType = NodeComponentProps < NodeName > & { key ? : React . Key ; } ; const func = function < T extends PropsType > ( props ) { const { variants , args , overrides } = deriveRenderOpts ( props , { name : nodeName , descendantNames : [ ... PlasmicDescendants [ nodeName ] ] , internalArgPropNames : PlasmicCheckbox__ArgProps , internalVariantPropNames : PlasmicCheckbox__VariantProps , } ) ; return PlasmicCheckbox__RenderFunc ( { variants , args , overrides , forNode : nodeName , } ) ; } ; if ( nodeName === "root" ) { func . displayName = "PlasmicCheckbox" ; } else { func . displayName = `PlasmicCheckbox.${ nodeName }` ; } return func ; } export const PlasmicCheckbox = Object . assign ( makeNodeComponent ( "root" ) , { box : makeNodeComponent ( "box" ) , svg : makeNodeComponent ( "svg" ) , focusRing : makeNodeComponent ( "focusRing" ) , labelContainer : makeNodeComponent ( "labelContainer" ) , internalVariantProps : PlasmicCheckbox__VariantProps , internalArgProps : PlasmicCheckbox__ArgProps , useBehavior , } ) ; export default PlasmicCheckbox ;