UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

1 lines 22.8 kB
{"version":3,"sources":["../../src/form-field/FormField.tsx","../../src/form-field/FormFieldContext.tsx","../../src/form-field/FormFieldProvider.tsx","../../src/form-field/FormFieldStateMessage.tsx","../../src/form-field/FormFieldMessage.tsx","../../src/form-field/FormFieldAlertMessage.tsx","../../src/form-field/FormFieldCharactersCount.tsx","../../src/form-field/FormFieldControl.tsx","../../src/form-field/FormFieldErrorMessage.tsx","../../src/form-field/FormFieldHelperMessage.tsx","../../src/form-field/FormFieldLabel.tsx","../../src/form-field/FormFieldRequiredIndicator.tsx","../../src/form-field/FormFieldSuccessMessage.tsx","../../src/form-field/index.ts"],"sourcesContent":["import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref, useId } from 'react'\n\nimport { Slot } from '../slot'\nimport { FormFieldContextState, ID_PREFIX } from './FormFieldContext'\nimport { FormFieldProvider } from './FormFieldProvider'\n\nexport interface FormFieldProps\n extends ComponentPropsWithoutRef<'div'>,\n Pick<FormFieldContextState, 'name' | 'state' | 'isRequired'> {\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n */\n asChild?: boolean\n /**\n * When `true`, prevents the user from interacting.\n */\n disabled?: boolean\n /**\n * Sets the component as interactive or not.\n */\n readOnly?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const FormField = ({\n className,\n disabled = false,\n readOnly = false,\n name,\n state,\n isRequired = false,\n asChild = false,\n ref,\n ...others\n}: FormFieldProps) => {\n const id = `${ID_PREFIX}-${useId()}`\n const Component = asChild ? Slot : 'div'\n\n return (\n <FormFieldProvider\n id={id}\n name={name}\n isRequired={isRequired}\n disabled={disabled}\n readOnly={readOnly}\n state={state}\n >\n <Component\n ref={ref}\n data-spark-component=\"form-field\"\n className={cx(className, 'gap-sm flex flex-col')}\n {...others}\n />\n </FormFieldProvider>\n )\n}\n\nFormField.displayName = 'FormField'\n","import { createContext, useContext } from 'react'\n\nexport interface FormFieldContextState {\n /**\n * Generated id for the input component.\n */\n id: string\n /**\n * Generated id for the label component.\n */\n labelId?: string\n /**\n * The name of the input. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * A set of ids separated by a space used to describe the input component given by a set of messages.\n */\n description?: string\n /**\n * Disables the field and its associated input\n */\n disabled?: boolean\n /**\n * Marks the field and its associated input as read only\n */\n readOnly?: boolean\n /**\n * The validation state of the input.\n */\n state?: 'error' | 'success' | 'alert'\n /**\n * If true, the form field will be invalid.\n */\n isInvalid?: boolean\n /**\n * If true, the form field will be required.\n */\n isRequired?: boolean\n /**\n * Callback used to store a descriptive message.\n */\n onMessageIdAdd: (id: string) => void\n /**\n * Callback used to remove a descriptive message.\n */\n onMessageIdRemove: (id: string) => void\n}\n\nexport const FormFieldContext = createContext<FormFieldContextState | null>(null)\n\nexport const ID_PREFIX = ':form-field'\n\nexport const useFormField = () => {\n const context = useContext(FormFieldContext)\n\n if (!context) {\n throw Error('useFormField must be used within a FormField provider')\n }\n\n return context\n}\n","import { ReactNode, useCallback, useId, useMemo, useState } from 'react'\n\nimport { FormFieldContext, FormFieldContextState, ID_PREFIX } from './FormFieldContext'\n\nexport interface FormFieldProviderProps\n extends Pick<\n FormFieldContextState,\n 'id' | 'name' | 'disabled' | 'readOnly' | 'state' | 'isRequired'\n > {\n children: ReactNode\n}\n\nexport const FormFieldProvider = ({\n id,\n name,\n disabled = false,\n readOnly = false,\n state,\n isRequired,\n children,\n}: FormFieldProviderProps) => {\n const labelId = `${ID_PREFIX}-label-${useId()}`\n const [messageIds, setMessageIds] = useState<string[]>([])\n const description = messageIds.length > 0 ? messageIds.join(' ') : undefined\n\n const handleMessageIdAdd = useCallback((msgId: string) => {\n setMessageIds(ids => [...ids, msgId])\n }, [])\n\n const handleMessageIdRemove = useCallback((msgId: string) => {\n setMessageIds(ids => ids.filter(current => current !== msgId))\n }, [])\n\n const value = useMemo(() => {\n const isInvalid = state === 'error'\n\n return {\n id,\n labelId,\n name,\n disabled,\n readOnly,\n state,\n isRequired,\n isInvalid,\n description,\n onMessageIdAdd: handleMessageIdAdd,\n onMessageIdRemove: handleMessageIdRemove,\n }\n }, [\n id,\n labelId,\n name,\n disabled,\n readOnly,\n description,\n state,\n isRequired,\n handleMessageIdAdd,\n handleMessageIdRemove,\n ])\n\n return <FormFieldContext.Provider value={value}>{children}</FormFieldContext.Provider>\n}\n\nFormFieldProvider.displayName = 'FormFieldProvider'\n","import { AlertOutline } from '@spark-ui/icons/AlertOutline'\nimport { Check } from '@spark-ui/icons/Check'\nimport { WarningOutline } from '@spark-ui/icons/WarningOutline'\nimport { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { useFormField } from './FormFieldContext'\nimport { FormFieldMessage, FormFieldMessageProps } from './FormFieldMessage'\n\nexport interface FormFieldStateMessageProps extends FormFieldMessageProps {\n state: 'error' | 'alert' | 'success'\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldStateMessage = ({\n className,\n state,\n children,\n ref,\n ...others\n}: FormFieldStateMessageProps) => {\n const field = useFormField()\n\n if (field.state !== state) {\n return null\n }\n\n return (\n <FormFieldMessage\n ref={ref}\n data-spark-component=\"form-field-state-message\"\n className={cx(\n 'gap-sm flex items-center',\n state === 'error' ? 'text-error' : 'text-on-surface/dim-1',\n className\n )}\n {...others}\n >\n {state === 'alert' && (\n <Icon size=\"sm\">\n <WarningOutline />\n </Icon>\n )}\n {state === 'error' && (\n <Icon size=\"sm\" intent=\"error\">\n <AlertOutline />\n </Icon>\n )}\n {state === 'success' && (\n <Icon size=\"sm\">\n <Check />\n </Icon>\n )}\n\n {children}\n </FormFieldMessage>\n )\n}\n\nFormFieldStateMessage.displayName = 'FormField.StateMessage'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref, useEffect, useId } from 'react'\n\nimport { ID_PREFIX, useFormField } from './FormFieldContext'\n\nexport type FormFieldMessageProps = ComponentPropsWithoutRef<'span'> & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldMessage = ({\n id: idProp,\n className,\n ref,\n ...others\n}: FormFieldMessageProps) => {\n const { onMessageIdAdd, onMessageIdRemove } = useFormField()\n const currentId = `${ID_PREFIX}-message-${useId()}`\n const id = idProp || currentId\n\n useEffect(() => {\n onMessageIdAdd(id)\n\n return () => {\n onMessageIdRemove(id)\n }\n }, [id, onMessageIdAdd, onMessageIdRemove])\n\n return (\n <span\n ref={ref}\n id={id}\n data-spark-component=\"form-field-message\"\n className={cx(className, 'text-caption')}\n {...others}\n />\n )\n}\n\nFormFieldMessage.displayName = 'FormField.Message'\n","import { Ref } from 'react'\n\nimport { FormFieldStateMessage, FormFieldStateMessageProps } from './FormFieldStateMessage'\n\nexport type FormFieldAlertMessageProps = Omit<FormFieldStateMessageProps, 'state'> & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldAlertMessage = ({ ref, ...props }: FormFieldAlertMessageProps) => {\n return (\n <FormFieldStateMessage\n ref={ref}\n data-spark-component=\"form-field-alert-message\"\n state=\"alert\"\n {...props}\n />\n )\n}\n\nFormFieldAlertMessage.displayName = 'FormField.AlertMessage'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nexport type FormFieldCharactersCountProps = ComponentPropsWithoutRef<'span'> & {\n /**\n * Current value for the input this component belongs to.\n */\n value?: string\n /**\n * Maximum numeric value to be displayed.\n */\n maxLength: number\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldCharactersCount = ({\n className,\n value = '',\n maxLength,\n ref,\n ...others\n}: FormFieldCharactersCountProps) => {\n const displayValue = `${value.length}/${maxLength}`\n\n return (\n <span\n ref={ref}\n data-spark-component=\"form-field-characters-count\"\n className={cx(className, 'text-caption', 'text-neutral')}\n {...others}\n >\n {displayValue}\n </span>\n )\n}\n\nFormFieldCharactersCount.displayName = 'FormField.CharactersCount'\n","import { ReactNode, useContext } from 'react'\n\nimport { FormFieldContext, FormFieldContextState } from './FormFieldContext'\n\ntype State = Partial<\n Pick<\n FormFieldContextState,\n | 'id'\n | 'name'\n | 'description'\n | 'labelId'\n | 'disabled'\n | 'readOnly'\n | 'state'\n | 'isInvalid'\n | 'isRequired'\n >\n>\n\nexport interface FormFieldControlProps {\n children: (state: State) => ReactNode\n}\n\nexport const useFormFieldControl = () => {\n const { id, name, description, disabled, readOnly, state, labelId, isInvalid, isRequired } =\n useContext(FormFieldContext) || {}\n\n return {\n id,\n name,\n description,\n disabled,\n readOnly,\n state,\n labelId,\n isInvalid,\n isRequired,\n } as State\n}\n\nexport const FormFieldControl = ({ children }: FormFieldControlProps) => {\n const props = useFormFieldControl()\n\n return <>{children(props)}</>\n}\n\nFormFieldControl.displayName = 'FormField.Control'\n","import { Ref } from 'react'\n\nimport { FormFieldStateMessage, FormFieldStateMessageProps } from './FormFieldStateMessage'\n\nexport type FormFieldErrorMessageProps = Omit<FormFieldStateMessageProps, 'state'> & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldErrorMessage = ({ ref, ...props }: FormFieldErrorMessageProps) => {\n return (\n <FormFieldStateMessage\n ref={ref}\n data-spark-component=\"form-field-error-message\"\n state=\"error\"\n {...props}\n />\n )\n}\n\nFormFieldErrorMessage.displayName = 'FormField.ErrorMessage'\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { FormFieldMessage, FormFieldMessageProps } from './FormFieldMessage'\n\nexport type FormFieldHelperMessageProps = FormFieldMessageProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldHelperMessage = ({\n className,\n ref,\n ...others\n}: FormFieldHelperMessageProps) => {\n return (\n <FormFieldMessage\n ref={ref}\n data-spark-component=\"form-field-helper-message\"\n className={cx('text-on-surface/dim-1', className)}\n {...others}\n />\n )\n}\n\nFormFieldHelperMessage.displayName = 'FormField.HelperMessage'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode, Ref } from 'react'\n\nimport { Label, LabelProps } from '../label'\nimport { Slottable } from '../slot'\nimport { useFormField } from './FormFieldContext'\nimport { FormFieldRequiredIndicator } from './FormFieldRequiredIndicator'\n\nexport interface FormFieldLabelProps extends LabelProps {\n /**\n * Element shown when the input is required inside the label.\n */\n requiredIndicator?: ReactNode\n ref?: Ref<HTMLLabelElement>\n}\n\nexport const FormFieldLabel = ({\n htmlFor: htmlForProp,\n className,\n children,\n requiredIndicator = <FormFieldRequiredIndicator />,\n asChild,\n ref,\n ...others\n}: FormFieldLabelProps) => {\n const control = useFormField()\n\n const { disabled, labelId, isRequired } = control\n const htmlFor = asChild ? undefined : htmlForProp || control.id\n\n return (\n <Label\n ref={ref}\n id={labelId}\n data-spark-component=\"form-field-label\"\n htmlFor={htmlFor}\n className={cx(className, disabled ? 'text-on-surface/dim-3 pointer-events-none' : undefined)}\n asChild={asChild}\n {...others}\n >\n <>\n <Slottable>{children}</Slottable>\n {isRequired && requiredIndicator}\n </>\n </Label>\n )\n}\n\nFormFieldLabel.displayName = 'FormField.Label'\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { Label, LabelRequiredIndicatorProps } from '../label'\n\nexport type FormFieldRequiredIndicatorProps = LabelRequiredIndicatorProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldRequiredIndicator = ({\n className,\n ref,\n ...props\n}: FormFieldRequiredIndicatorProps) => {\n return <Label.RequiredIndicator ref={ref} className={cx('ml-sm', className)} {...props} />\n}\n\nFormFieldRequiredIndicator.displayName = 'FormField.RequiredIndicator'\n","import { Ref } from 'react'\n\nimport { FormFieldStateMessage, FormFieldStateMessageProps } from './FormFieldStateMessage'\n\nexport type FormFieldSuccessMessageProps = Omit<FormFieldStateMessageProps, 'state'> & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const FormFieldSuccessMessage = ({ ref, ...props }: FormFieldSuccessMessageProps) => {\n return (\n <FormFieldStateMessage\n ref={ref}\n data-spark-component=\"form-field-success-message\"\n state=\"success\"\n {...props}\n />\n )\n}\n\nFormFieldSuccessMessage.displayName = 'FormField.SuccessMessage'\n","import { FormField as Root } from './FormField'\nimport { FormFieldAlertMessage } from './FormFieldAlertMessage'\nimport { FormFieldCharactersCount } from './FormFieldCharactersCount'\nimport { FormFieldControl } from './FormFieldControl'\nimport { FormFieldErrorMessage } from './FormFieldErrorMessage'\nimport { FormFieldHelperMessage } from './FormFieldHelperMessage'\nimport { FormFieldLabel } from './FormFieldLabel'\nimport { FormFieldRequiredIndicator } from './FormFieldRequiredIndicator'\nimport { FormFieldStateMessage } from './FormFieldStateMessage'\nimport { FormFieldSuccessMessage } from './FormFieldSuccessMessage'\n\nexport const FormField: typeof Root & {\n Label: typeof FormFieldLabel\n Control: typeof FormFieldControl\n StateMessage: typeof FormFieldStateMessage\n SuccessMessage: typeof FormFieldSuccessMessage\n AlertMessage: typeof FormFieldAlertMessage\n ErrorMessage: typeof FormFieldErrorMessage\n HelperMessage: typeof FormFieldHelperMessage\n RequiredIndicator: typeof FormFieldRequiredIndicator\n CharactersCount: typeof FormFieldCharactersCount\n} = Object.assign(Root, {\n Label: FormFieldLabel,\n Control: FormFieldControl,\n StateMessage: FormFieldStateMessage,\n SuccessMessage: FormFieldSuccessMessage,\n AlertMessage: FormFieldAlertMessage,\n ErrorMessage: FormFieldErrorMessage,\n HelperMessage: FormFieldHelperMessage,\n RequiredIndicator: FormFieldRequiredIndicator,\n CharactersCount: FormFieldCharactersCount,\n})\n\nFormField.displayName = 'FormField'\nFormFieldLabel.displayName = 'FormField.Label'\nFormFieldControl.displayName = 'FormField.Control'\nFormFieldStateMessage.displayName = 'FormField.StateMessage'\nFormFieldSuccessMessage.displayName = 'FormField.SuccessMessage'\nFormFieldAlertMessage.displayName = 'FormField.AlertMessage'\nFormFieldErrorMessage.displayName = 'FormField.ErrorMessage'\nFormFieldHelperMessage.displayName = 'FormField.HelperMessage'\nFormFieldRequiredIndicator.displayName = 'FormField.RequiredIndicator'\nFormFieldCharactersCount.displayName = 'FormField.CharactersCount'\n\nexport { type FormFieldProps } from './FormField'\nexport { type FormFieldStateMessageProps } from './FormFieldStateMessage'\nexport { type FormFieldControl, useFormFieldControl } from './FormFieldControl'\nexport { type FormFieldHelperMessageProps } from './FormFieldHelperMessage'\nexport { type FormFieldSuccessMessageProps } from './FormFieldSuccessMessage'\nexport { type FormFieldAlertMessageProps } from './FormFieldAlertMessage'\nexport { type FormFieldErrorMessageProps } from './FormFieldErrorMessage'\nexport { type FormFieldLabelProps } from './FormFieldLabel'\nexport { type FormFieldRequiredIndicatorProps } from './FormFieldRequiredIndicator'\nexport { type FormFieldCharactersCountProps } from './FormFieldCharactersCount'\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,UAAU;AACnB,SAAwC,SAAAA,cAAa;;;ACDrD,SAAS,eAAe,kBAAkB;AAiDnC,IAAM,mBAAmB,cAA4C,IAAI;AAEzE,IAAM,YAAY;AAElB,IAAM,eAAe,MAAM;AAChC,QAAM,UAAU,WAAW,gBAAgB;AAE3C,MAAI,CAAC,SAAS;AACZ,UAAM,MAAM,uDAAuD;AAAA,EACrE;AAEA,SAAO;AACT;;;AC7DA,SAAoB,aAAa,OAAO,SAAS,gBAAgB;AA8DxD;AAlDF,IAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AACF,MAA8B;AAC5B,QAAM,UAAU,GAAG,SAAS,UAAU,MAAM,CAAC;AAC7C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAmB,CAAC,CAAC;AACzD,QAAM,cAAc,WAAW,SAAS,IAAI,WAAW,KAAK,GAAG,IAAI;AAEnE,QAAM,qBAAqB,YAAY,CAAC,UAAkB;AACxD,kBAAc,SAAO,CAAC,GAAG,KAAK,KAAK,CAAC;AAAA,EACtC,GAAG,CAAC,CAAC;AAEL,QAAM,wBAAwB,YAAY,CAAC,UAAkB;AAC3D,kBAA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AA,EACE;AAAA,wBAAAC,MAAC,aAAW,UAAS;AAAA,QACpB,cAAc;AAAA,SACjB;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,cAAc;;;AEtCzB,gBAAAG,aAAA;AAFG,IAAM,0BAA0B,CAAC,EAAE,KAAK,GAAG,MAAM,MAAoC;AAC1F,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,wBAAqB;AAAA,MACrB,OAAM;AAAA,MACL,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,wBAAwB,cAAc;;;ACR/B,IAAMC,aAUT,OAAO,OAAO,WAAM;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,iBAAiB;AACnB,CAAC;AAEDA,WAAU,cAAc;AACxB,eAAe,cAAc;AAC7B,iBAAiB,cAAc;AAC/B,sBAAsB,cAAc;AACpC,wBAAwB,cAAc;AACtC,sBAAsB,cAAc;AACpC,sBAAsB,cAAc;AACpC,uBAAuB,cAAc;AACrC,2BAA2B,cAAc;AACzC,yBAAyB,cAAc;","names":["useId","jsx","useId","cx","cx","useId","jsx","useId","cx","jsx","cx","jsx","cx","jsx","useContext","jsx","useContext","jsx","cx","jsx","cx","cx","cx","jsx","cx","Fragment","jsx","jsxs","cx","jsx","FormField"]}