@page-speed/forms 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MRGJTFGD.js → chunk-CZYQWVD5.js} +13 -5
- package/dist/chunk-CZYQWVD5.js.map +1 -0
- package/dist/{chunk-RNVK2DOS.js → chunk-EVBK5TLG.js} +15 -12
- package/dist/chunk-EVBK5TLG.js.map +1 -0
- package/dist/{chunk-DDPQKEUI.cjs → chunk-RACQRUM6.cjs} +129 -126
- package/dist/chunk-RACQRUM6.cjs.map +1 -0
- package/dist/{chunk-T2SLAP65.cjs → chunk-XE6H7L7E.cjs} +29 -21
- package/dist/chunk-XE6H7L7E.cjs.map +1 -0
- package/dist/{chunk-EQKN2OPX.js → chunk-ZBRU7R6C.js} +3 -3
- package/dist/{chunk-EQKN2OPX.js.map → chunk-ZBRU7R6C.js.map} +1 -1
- package/dist/{chunk-IGI4JJKE.cjs → chunk-ZLET7YJ2.cjs} +3 -3
- package/dist/{chunk-IGI4JJKE.cjs.map → chunk-ZLET7YJ2.cjs.map} +1 -1
- package/dist/core.cjs +9 -9
- package/dist/core.js +2 -2
- package/dist/index.cjs +13 -13
- package/dist/index.js +2 -2
- package/dist/inputs.cjs +14 -14
- package/dist/inputs.js +2 -2
- package/dist/integration.cjs +55 -44
- package/dist/integration.cjs.map +1 -1
- package/dist/integration.js +35 -24
- package/dist/integration.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DDPQKEUI.cjs.map +0 -1
- package/dist/chunk-MRGJTFGD.js.map +0 -1
- package/dist/chunk-RNVK2DOS.js.map +0 -1
- package/dist/chunk-T2SLAP65.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/components/ui/label.tsx","../src/components/ui/field.tsx","../src/components/ui/input.tsx","../src/inputs/TextInput.tsx","../src/components/ui/button.tsx","../src/core/label-group.tsx"],"names":["twMerge","clsx","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AW,cAAA,EAAA,EACzC,SACA,iBACH,CAAA;AAAA,IAEJ,CAAA,MAAO;AACL,MAAA,cAAA,mDACG,KAAA,EAAA,EAAI,WAAA,EAAU,eAAc,SAAA,EAAW,cAAA,EAAA,EACrC,SACA,iBACH,CAAA;AAAA,IAEJ;AAAA,EACF;AAEA,EAAA,MAAM,mBAAmB,SAAA,mBACvBA,iBAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,EAAA,EAAI,WAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,4BAAA,EAA8B,kBAAkB;AAAA,KAAA;AAAA,IAE7D;AAAA,GACH,GACE,IAAA;AAEJ,EAAA,IAAI,CAAC,cAAA,IAAkB,CAAC,gBAAA,EAAkB,OAAO,IAAA;AAGjD,EAAA,IAAI,YAAY,QAAA,EAAU;AACxB,IAAA,uBACEA,iBAAA,CAAA,aAAA,CAAAA,iBAAA,CAAA,QAAA,EAAA,IAAA,EACG,gBACA,gBACH,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACEA,iBAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,8BAAA,EAAA,EACZ,gBACA,gBACH,CAAA;AAEJ","file":"chunk-IGI4JJKE.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { FormFieldConfig } from \"../integration\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Converts a field name (snake_case or camelCase) to a human-readable label.\n *\n * @example\n * humanizeFieldName(\"first_name\") // \"First name\"\n * humanizeFieldName(\"email\") // \"Email\"\n * humanizeFieldName(\"accepts_sms_marketing\") // \"Accepts sms marketing\"\n */\nexport function humanizeFieldName(name: string): string {\n if (!name) return \"This field\";\n\n // Replace underscores with spaces and split camelCase\n const words = name\n .replace(/_/g, \" \")\n .replace(/([a-z])([A-Z])/g, \"$1 $2\")\n .toLowerCase()\n .trim();\n\n // Capitalize first letter only\n return words.charAt(0).toUpperCase() + words.slice(1);\n}\n\n/**\n * Normalizes browser autofill colors so inputs keep theme colors.\n */\nexport const INPUT_AUTOFILL_RESET_CLASSES =\n \"autofill:bg-transparent autofill:text-foreground \" +\n \"[&:-webkit-autofill]:[-webkit-text-fill-color:hsl(var(--foreground))] \" +\n \"[&:-webkit-autofill]:[caret-color:hsl(var(--foreground))] \" +\n \"[&:-webkit-autofill]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill:hover]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill:focus]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill]:[transition:background-color_9999s_ease-out,color_9999s_ease-out]\";\n\n/**\n * Converts a field name (snake_case or camelCase) to a human-readable label.\n *\n * @example\n * fieldIsChoiceCard(field) // false\n */\nexport function fieldIsChoiceCard(field: FormFieldConfig) {\n if ([\"radio\", \"checkbox-group\"].includes(field.type)) {\n return field?.options\n ? field?.options?.some((opt) => opt.description)\n : false;\n } else {\n return false;\n }\n}\n\n/**\n * Converts file upload meta instructions to human-readable format.\n *\n * @example\n * humanizeFileMeta(\"image/jpeg\") // \"JPEG image\"\n * humanizeFileMeta(\"application/pdf\") // \"PDF document\"\n * humanizeFileMeta(\"text/plain\") // \"Plain text\"\n */\nexport function humanizeFileMeta(meta: string): string {\n const [type, subtype] = meta.split(\"/\");\n const typeLabel = type.charAt(0).toUpperCase() + type.slice(1);\n const subtypeLabel = subtype.charAt(0).toUpperCase() + subtype.slice(1);\n return `${subtypeLabel} ${typeLabel}`;\n}\n","import * as React from \"react\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from \"react\";\nimport { Label } from \"./label\";\nimport { cn } from \"../../lib/utils\";\n\ntype FieldOrientation = \"vertical\" | \"horizontal\";\n\ninterface FieldProps extends React.HTMLAttributes<HTMLDivElement> {\n orientation?: FieldOrientation;\n invalid?: boolean;\n}\n\n/**\n * Field - Container component for form inputs with validation display\n *\n * Provides consistent layout and spacing for form fields with labels,\n * inputs, descriptions, and error messages.\n */\nconst Field = React.forwardRef<HTMLDivElement, FieldProps>(\n ({ className, orientation = \"vertical\", invalid = false, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"field\"\n data-orientation={orientation}\n data-invalid={invalid || undefined}\n className={cn(\n \"relative\",\n // Use space-y instead of flex to avoid interfering with parent grid layouts\n orientation === \"horizontal\"\n ? \"flex items-center gap-2\"\n : \"space-y-1.5\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nField.displayName = \"Field\";\n\n/**\n * FieldGroup - Container for multiple related fields\n *\n * Used to group fields together (e.g., first name + last name in a row)\n */\nconst FieldGroup = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n );\n});\nFieldGroup.displayName = \"FieldGroup\";\n\n/**\n * FieldLabel - Label component for form fields\n *\n * Wrapper around ShadCN Label with consistent styling\n */\nconst FieldLabel = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n }\n>(({ className, required, children, ...props }, ref) => {\n return (\n <Label\n ref={ref}\n data-slot=\"field-label\"\n className={cn(\n \"text-sm font-medium leading-none select-none\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </Label>\n );\n});\nFieldLabel.displayName = \"FieldLabel\";\n\n/**\n * FieldDescription - Helper text for form fields\n *\n * Displays additional information or instructions for the field\n */\nconst FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n data-slot=\"field-description\"\n className={cn(\"text-sm opacity-70\", className)}\n {...props}\n />\n );\n});\nFieldDescription.displayName = \"FieldDescription\";\n\n/**\n * FieldError - Error message display for form fields\n *\n * Shows validation errors with proper styling and accessibility\n */\nconst FieldError = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n data-slot=\"field-error\"\n role=\"alert\"\n aria-live=\"polite\"\n className={cn(\n \"text-xs text-destructive absolute -bottom-1/2 left-0\",\n className,\n )}\n {...props}\n />\n );\n});\nFieldError.displayName = \"FieldError\";\n\nexport { Field, FieldGroup, FieldLabel, FieldDescription, FieldError };\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { INPUT_AUTOFILL_RESET_CLASSES } from \"../../lib/utils\";\n\n/**\n * Input component - Optimized for dynamic theming across thousands of client brands\n *\n * CRITICAL: This component must work with dynamic Section backgrounds (light/dark/primary/etc)\n * Only uses CSS variables that adapt automatically - NO hardcoded semantic colors\n *\n * See: SHADCN_INTEGRATION_GUIDE.md for full documentation\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n ref={ref}\n type={type}\n data-slot=\"input\"\n className={cn(\n // Core structure - no hardcoded colors, uses CSS variables\n \"flex h-9 w-full min-w-0 rounded-md border border-input\",\n \"bg-transparent px-3 py-1 text-base shadow-sm\",\n \"transition-colors outline-none md:text-sm\",\n\n // Focus state - uses ring-ring CSS variable (adapts to theme)\n \"focus-visible:ring-1 focus-visible:ring-ring\",\n\n // Error state - uses destructive CSS variables (adapts to theme)\n \"aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive\",\n\n // Disabled state - no color hardcoding\n \"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n\n // File input specific - inherits text color from parent\n \"file:inline-flex file:h-7 file:border-0 file:bg-transparent\",\n \"file:text-sm file:font-medium\",\n\n // Autofill reset - prevents browser from overriding our dynamic colors\n INPUT_AUTOFILL_RESET_CLASSES,\n\n className,\n )}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { InputProps } from \"../core/types\";\nimport { Input } from \"../components/ui/input\";\nimport { cn } from \"../lib/utils\";\n\n/**\n * TextInput - High-performance text input component (ShadCN-based)\n *\n * Built on ShadCN Input component with form-specific behavior:\n * - Error state handling\n * - Valid value indicator (ring-2)\n * - Form integration (onChange, onBlur)\n * - Full accessibility support\n * - Optional start/end icon support with automatic padding\n *\n * @example\n * ```tsx\n * const form = useForm({ initialValues: { email: '' } });\n *\n * <TextInput\n * {...form.getFieldProps('email')}\n * type=\"email\"\n * placeholder=\"Enter your email\"\n * error={!!form.errors.email}\n * aria-invalid={!!form.errors.email}\n * aria-describedby={form.errors.email ? 'email-error' : undefined}\n * />\n * ```\n *\n * @see https://opensite.ai/developers/page-speed/forms/text-input\n */\nexport function TextInput({\n name,\n value,\n onChange,\n onBlur,\n placeholder,\n disabled = false,\n required = false,\n error = false,\n className = \"\",\n type = \"text\",\n id = \"text\",\n suppressValueRing = false,\n iconStart,\n iconEnd,\n ...props\n}: InputProps<string> & {\n type?: \"text\" | \"email\" | \"password\" | \"url\" | \"tel\" | \"search\";\n /**\n * When true, suppresses the `ring-2 ring-primary` applied when a value is\n * present. Use this when the component is embedded inside a wrapper (e.g.\n * ButtonGroupForm) that renders its own unified ring.\n */\n suppressValueRing?: boolean;\n /**\n * Optional icon rendered at the start (left) of the input.\n * Automatically adjusts input padding when provided.\n */\n iconStart?: React.ReactNode;\n /**\n * Optional icon rendered at the end (right) of the input.\n * Automatically adjusts input padding when provided.\n */\n iconEnd?: React.ReactNode;\n}) {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value);\n };\n\n const handleBlur = () => {\n onBlur?.();\n };\n\n const hasValue = String(value ?? \"\").trim().length > 0;\n const hasIconStart = Boolean(iconStart);\n const hasIconEnd = Boolean(iconEnd);\n\n if (hasIconStart || hasIconEnd) {\n return (\n <div className=\"relative\">\n {hasIconStart && (\n <span\n className={cn(\n \"absolute left-3 top-1/2 -translate-y-1/2\",\n \"pointer-events-none flex items-center justify-center\",\n \"pointer-events-none\",\n )}\n aria-hidden=\"true\"\n >\n {iconStart}\n </span>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n value={value ?? \"\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n className={cn(\n !suppressValueRing && !error && hasValue && \"ring-2 ring-primary\",\n hasIconStart && \"pl-10\",\n hasIconEnd && \"pr-10\",\n className,\n )}\n aria-invalid={error || props[\"aria-invalid\"]}\n aria-describedby={props[\"aria-describedby\"]}\n aria-required={required || props[\"aria-required\"]}\n {...props}\n />\n {hasIconEnd && (\n <span\n className=\"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none\"\n aria-hidden=\"true\"\n >\n {iconEnd}\n </span>\n )}\n </div>\n );\n }\n\n return (\n <Input\n type={type}\n id={id}\n name={name}\n value={value ?? \"\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n className={cn(\n // Valid value indicator - ring-2 when has value, no error, and not suppressed\n !suppressValueRing && !error && hasValue && \"ring-2 ring-primary\",\n // Error state - handled by Input component via aria-invalid\n className,\n )}\n aria-invalid={error || props[\"aria-invalid\"]}\n aria-describedby={props[\"aria-describedby\"]}\n aria-required={required || props[\"aria-required\"]}\n {...props}\n />\n );\n}\n\nTextInput.displayName = \"TextInput\";\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20\",\n outline:\n \"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n xs: \"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { ReactNode } from \"react\";\nimport { FieldDescription, FieldLabel } from \"../components/ui/field\";\nimport { cn } from \"../lib/utils\";\n\nexport type LabelGroupProps = {\n variant?: \"legend\" | \"label\" | \"text\";\n secondary?: ReactNode;\n secondaryId?: string;\n primary?: ReactNode;\n labelHtmlFor?: string;\n required?: boolean;\n primaryClassName?: string;\n secondaryClassName?: string;\n};\n\nconst LabelGroup = ({\n labelHtmlFor,\n required = false,\n variant = \"label\",\n secondaryId,\n secondary,\n primary,\n primaryClassName,\n secondaryClassName,\n}: LabelGroupProps) => {\n const primaryClasses = cn(\n \"text-sm font-medium leading-snug\",\n variant === \"legend\" ? \"mb-2.5\" : \"mb-1 block\",\n primaryClassName,\n );\n\n const requiredIndicator =\n required && variant !== \"label\" ? (\n <span className=\"text-destructive pl-0.5\" aria-label=\"required\">\n *\n </span>\n ) : null;\n\n let primaryElement: ReactNode = null;\n if (primary) {\n if (variant === \"label\") {\n primaryElement = (\n <FieldLabel\n htmlFor={labelHtmlFor}\n required={required}\n className={primaryClasses}\n >\n {primary}\n </FieldLabel>\n );\n } else if (variant === \"legend\") {\n primaryElement = (\n <legend data-slot=\"field-legend\" className={primaryClasses}>\n {primary}\n {requiredIndicator}\n </legend>\n );\n } else {\n primaryElement = (\n <div data-slot=\"field-label\" className={primaryClasses}>\n {primary}\n {requiredIndicator}\n </div>\n );\n }\n }\n\n const secondaryElement = secondary ? (\n <FieldDescription\n id={secondaryId}\n className={cn(\"leading-normal font-normal\", secondaryClassName)}\n >\n {secondary}\n </FieldDescription>\n ) : null;\n\n if (!primaryElement && !secondaryElement) return null;\n\n // Legend should remain a direct child of fieldset for proper semantics.\n if (variant === \"legend\") {\n return (\n <>\n {primaryElement}\n {secondaryElement}\n </>\n );\n }\n\n return (\n <div className=\"flex flex-1 flex-col gap-0.5\">\n {primaryElement}\n {secondaryElement}\n </div>\n );\n};\n\nexport { LabelGroup };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/ui/label.tsx","../src/components/ui/field.tsx","../src/components/ui/input.tsx","../src/inputs/TextInput.tsx","../src/components/ui/button.tsx","../src/core/label-group.tsx"],"names":["twMerge","clsx","React","LabelPrimitive","React2","React3","React4","cva","Slot","React5","React6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;AAUO,SAAS,kBAAkB,IAAA,EAAsB;AACtD,EAAA,IAAI,CAAC,MAAM,OAAO,YAAA;AAGlB,EAAA,MAAM,KAAA,GAAQ,IAAA,CACX,OAAA,CAAQ,IAAA,EAAM,GAAG,CAAA,CACjB,OAAA,CAAQ,iBAAA,EAAmB,OAAO,CAAA,CAClC,WAAA,EAAY,CACZ,IAAA,EAAK;AAGR,EAAA,OAAO,KAAA,CAAM,OAAO,CAAC,CAAA,CAAE,aAAY,GAAI,KAAA,CAAM,MAAM,CAAC,CAAA;AACtD;AAKO,IAAM,4BAAA,GACX;AAcK,SAAS,kBAAkB,KAAA,EAAwB;AACxD,EAAA,IAAI,CAAC,OAAA,EAAS,gBAAgB,EAAE,QAAA,CAAS,KAAA,CAAM,IAAI,CAAA,EAAG;AACpD,IAAA,OAAO,KAAA,EAAO,UACV,KAAA,EAAO,OAAA,EAAS,KAAK,CAAC,GAAA,KAAQ,GAAA,CAAI,WAAW,CAAA,GAC7C,KAAA;AAAA,EACN,CAAA,MAAO;AACL,IAAA,OAAO,KAAA;AAAA,EACT;AACF;;;ACnDA,SAAS,KAAA,CAAM;AAAA,EACb,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqD;AACnD,EAAA,uBACEC,iBAAA,CAAA,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,aAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAS,YAAA;AAAA,UACT,QAAA;AAAA,UACA,SAAA,EAAW;AAAA,SAAA;AAAA,QAEV;AAAA,OACH;AAAA,IAEJ,CAAA,MAAA,IAAW,YAAY,QAAA,EAAU;AAC/B,MAAA,cAAA,mDACG,QAAA,EAAA,EAAO,WAAA,EAAU,gBAAe,SAAA,EAAW,cAAA,EAAA,EACzC,SACA,iBACH,CAAA;AAAA,IAEJ,CAAA,MAAO;AACL,MAAA,cAAA,mDACG,KAAA,EAAA,EAAI,WAAA,EAAU,eAAc,SAAA,EAAW,cAAA,EAAA,EACrC,SACA,iBACH,CAAA;AAAA,IAEJ;AAAA,EACF;AAEA,EAAA,MAAM,mBAAmB,SAAA,mBACvBA,iBAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,EAAA,EAAI,WAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,4BAAA,EAA8B,kBAAkB;AAAA,KAAA;AAAA,IAE7D;AAAA,GACH,GACE,IAAA;AAEJ,EAAA,IAAI,CAAC,cAAA,IAAkB,CAAC,gBAAA,EAAkB,OAAO,IAAA;AAGjD,EAAA,IAAI,YAAY,QAAA,EAAU;AACxB,IAAA,uBACEA,iBAAA,CAAA,aAAA,CAAAA,iBAAA,CAAA,QAAA,EAAA,IAAA,EACG,gBACA,gBACH,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACEA,iBAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,8BAAA,EAAA,EACZ,gBACA,gBACH,CAAA;AAEJ","file":"chunk-ZLET7YJ2.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { FormFieldConfig } from \"../integration\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Converts a field name (snake_case or camelCase) to a human-readable label.\n *\n * @example\n * humanizeFieldName(\"first_name\") // \"First name\"\n * humanizeFieldName(\"email\") // \"Email\"\n * humanizeFieldName(\"accepts_sms_marketing\") // \"Accepts sms marketing\"\n */\nexport function humanizeFieldName(name: string): string {\n if (!name) return \"This field\";\n\n // Replace underscores with spaces and split camelCase\n const words = name\n .replace(/_/g, \" \")\n .replace(/([a-z])([A-Z])/g, \"$1 $2\")\n .toLowerCase()\n .trim();\n\n // Capitalize first letter only\n return words.charAt(0).toUpperCase() + words.slice(1);\n}\n\n/**\n * Normalizes browser autofill colors so inputs keep theme colors.\n */\nexport const INPUT_AUTOFILL_RESET_CLASSES =\n \"autofill:bg-transparent autofill:text-foreground \" +\n \"[&:-webkit-autofill]:[-webkit-text-fill-color:hsl(var(--foreground))] \" +\n \"[&:-webkit-autofill]:[caret-color:hsl(var(--foreground))] \" +\n \"[&:-webkit-autofill]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill:hover]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill:focus]:[box-shadow:0_0_0px_1000px_hsl(var(--background))_inset] \" +\n \"[&:-webkit-autofill]:[transition:background-color_9999s_ease-out,color_9999s_ease-out]\";\n\n/**\n * Converts a field name (snake_case or camelCase) to a human-readable label.\n *\n * @example\n * fieldIsChoiceCard(field) // false\n */\nexport function fieldIsChoiceCard(field: FormFieldConfig) {\n if ([\"radio\", \"checkbox-group\"].includes(field.type)) {\n return field?.options\n ? field?.options?.some((opt) => opt.description)\n : false;\n } else {\n return false;\n }\n}\n\n/**\n * Converts file upload meta instructions to human-readable format.\n *\n * @example\n * humanizeFileMeta(\"image/jpeg\") // \"JPEG image\"\n * humanizeFileMeta(\"application/pdf\") // \"PDF document\"\n * humanizeFileMeta(\"text/plain\") // \"Plain text\"\n */\nexport function humanizeFileMeta(meta: string): string {\n const [type, subtype] = meta.split(\"/\");\n const typeLabel = type.charAt(0).toUpperCase() + type.slice(1);\n const subtypeLabel = subtype.charAt(0).toUpperCase() + subtype.slice(1);\n return `${subtypeLabel} ${typeLabel}`;\n}\n","import * as React from \"react\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from \"react\";\nimport { Label } from \"./label\";\nimport { cn } from \"../../lib/utils\";\n\ntype FieldOrientation = \"vertical\" | \"horizontal\";\n\ninterface FieldProps extends React.HTMLAttributes<HTMLDivElement> {\n orientation?: FieldOrientation;\n invalid?: boolean;\n}\n\n/**\n * Field - Container component for form inputs with validation display\n *\n * Provides consistent layout and spacing for form fields with labels,\n * inputs, descriptions, and error messages.\n */\nconst Field = React.forwardRef<HTMLDivElement, FieldProps>(\n ({ className, orientation = \"vertical\", invalid = false, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"field\"\n data-orientation={orientation}\n data-invalid={invalid || undefined}\n className={cn(\n \"relative\",\n // Use space-y instead of flex to avoid interfering with parent grid layouts\n orientation === \"horizontal\"\n ? \"flex items-center gap-2\"\n : \"space-y-1.5\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nField.displayName = \"Field\";\n\n/**\n * FieldGroup - Container for multiple related fields\n *\n * Used to group fields together (e.g., first name + last name in a row)\n */\nconst FieldGroup = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n );\n});\nFieldGroup.displayName = \"FieldGroup\";\n\n/**\n * FieldLabel - Label component for form fields\n *\n * Wrapper around ShadCN Label with consistent styling\n */\nconst FieldLabel = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n }\n>(({ className, required, children, ...props }, ref) => {\n return (\n <Label\n ref={ref}\n data-slot=\"field-label\"\n className={cn(\n \"text-sm font-medium leading-none select-none\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </Label>\n );\n});\nFieldLabel.displayName = \"FieldLabel\";\n\n/**\n * FieldDescription - Helper text for form fields\n *\n * Displays additional information or instructions for the field\n */\nconst FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n data-slot=\"field-description\"\n className={cn(\"text-sm opacity-70\", className)}\n {...props}\n />\n );\n});\nFieldDescription.displayName = \"FieldDescription\";\n\n/**\n * FieldError - Error message display for form fields\n *\n * Shows validation errors with proper styling and accessibility\n */\nconst FieldError = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n data-slot=\"field-error\"\n role=\"alert\"\n aria-live=\"polite\"\n className={cn(\n \"text-xs text-destructive absolute top-full left-0 mt-0.5\",\n className,\n )}\n {...props}\n />\n );\n});\nFieldError.displayName = \"FieldError\";\n\nexport { Field, FieldGroup, FieldLabel, FieldDescription, FieldError };\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { INPUT_AUTOFILL_RESET_CLASSES } from \"../../lib/utils\";\n\n/**\n * Input component - Optimized for dynamic theming across thousands of client brands\n *\n * CRITICAL: This component must work with dynamic Section backgrounds (light/dark/primary/etc)\n * Only uses CSS variables that adapt automatically - NO hardcoded semantic colors\n *\n * See: SHADCN_INTEGRATION_GUIDE.md for full documentation\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n ref={ref}\n type={type}\n data-slot=\"input\"\n className={cn(\n // Core structure - no hardcoded colors, uses CSS variables\n \"flex h-9 w-full min-w-0 rounded-md border border-input\",\n \"bg-transparent px-3 py-1 text-base shadow-sm\",\n \"transition-colors outline-none md:text-sm\",\n\n // Focus state - uses ring-ring CSS variable (adapts to theme)\n \"focus-visible:ring-1 focus-visible:ring-ring\",\n\n // Error state - uses destructive CSS variables (adapts to theme)\n \"aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive\",\n\n // Disabled state - no color hardcoding\n \"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n\n // File input specific - inherits text color from parent\n \"file:inline-flex file:h-7 file:border-0 file:bg-transparent\",\n \"file:text-sm file:font-medium\",\n\n // Autofill reset - prevents browser from overriding our dynamic colors\n INPUT_AUTOFILL_RESET_CLASSES,\n\n className,\n )}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { InputProps } from \"../core/types\";\nimport { Input } from \"../components/ui/input\";\nimport { cn } from \"../lib/utils\";\n\n/**\n * TextInput - High-performance text input component (ShadCN-based)\n *\n * Built on ShadCN Input component with form-specific behavior:\n * - Error state handling\n * - Valid value indicator (ring-2)\n * - Form integration (onChange, onBlur)\n * - Full accessibility support\n * - Optional start/end icon support with automatic padding\n *\n * @example\n * ```tsx\n * const form = useForm({ initialValues: { email: '' } });\n *\n * <TextInput\n * {...form.getFieldProps('email')}\n * type=\"email\"\n * placeholder=\"Enter your email\"\n * error={!!form.errors.email}\n * aria-invalid={!!form.errors.email}\n * aria-describedby={form.errors.email ? 'email-error' : undefined}\n * />\n * ```\n *\n * @see https://opensite.ai/developers/page-speed/forms/text-input\n */\nexport function TextInput({\n name,\n value,\n onChange,\n onBlur,\n placeholder,\n disabled = false,\n required = false,\n error = false,\n className = \"\",\n type = \"text\",\n id = \"text\",\n suppressValueRing = false,\n iconStart,\n iconEnd,\n ...props\n}: InputProps<string> & {\n type?: \"text\" | \"email\" | \"password\" | \"url\" | \"tel\" | \"search\";\n /**\n * When true, suppresses the `ring-2 ring-primary` applied when a value is\n * present. Use this when the component is embedded inside a wrapper (e.g.\n * ButtonGroupForm) that renders its own unified ring.\n */\n suppressValueRing?: boolean;\n /**\n * Optional icon rendered at the start (left) of the input.\n * Automatically adjusts input padding when provided.\n */\n iconStart?: React.ReactNode;\n /**\n * Optional icon rendered at the end (right) of the input.\n * Automatically adjusts input padding when provided.\n */\n iconEnd?: React.ReactNode;\n}) {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value);\n };\n\n const handleBlur = () => {\n onBlur?.();\n };\n\n const hasValue = String(value ?? \"\").trim().length > 0;\n const hasIconStart = Boolean(iconStart);\n const hasIconEnd = Boolean(iconEnd);\n\n if (hasIconStart || hasIconEnd) {\n return (\n <div className=\"relative\">\n {hasIconStart && (\n <span\n className={cn(\n \"absolute left-3 top-1/2 -translate-y-1/2\",\n \"pointer-events-none flex items-center justify-center\",\n \"pointer-events-none\",\n )}\n aria-hidden=\"true\"\n >\n {iconStart}\n </span>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n value={value ?? \"\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n className={cn(\n !suppressValueRing && !error && hasValue && \"ring-2 ring-primary\",\n hasIconStart && \"pl-10\",\n hasIconEnd && \"pr-10\",\n className,\n )}\n aria-invalid={error || props[\"aria-invalid\"]}\n aria-describedby={props[\"aria-describedby\"]}\n aria-required={required || props[\"aria-required\"]}\n {...props}\n />\n {hasIconEnd && (\n <span\n className=\"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none\"\n aria-hidden=\"true\"\n >\n {iconEnd}\n </span>\n )}\n </div>\n );\n }\n\n return (\n <Input\n type={type}\n id={id}\n name={name}\n value={value ?? \"\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n className={cn(\n // Valid value indicator - ring-2 when has value, no error, and not suppressed\n !suppressValueRing && !error && hasValue && \"ring-2 ring-primary\",\n // Error state - handled by Input component via aria-invalid\n className,\n )}\n aria-invalid={error || props[\"aria-invalid\"]}\n aria-describedby={props[\"aria-describedby\"]}\n aria-required={required || props[\"aria-required\"]}\n {...props}\n />\n );\n}\n\nTextInput.displayName = \"TextInput\";\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20\",\n outline:\n \"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n xs: \"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { ReactNode } from \"react\";\nimport { FieldDescription, FieldLabel } from \"../components/ui/field\";\nimport { cn } from \"../lib/utils\";\n\nexport type LabelGroupProps = {\n variant?: \"legend\" | \"label\" | \"text\";\n secondary?: ReactNode;\n secondaryId?: string;\n primary?: ReactNode;\n labelHtmlFor?: string;\n required?: boolean;\n primaryClassName?: string;\n secondaryClassName?: string;\n};\n\nconst LabelGroup = ({\n labelHtmlFor,\n required = false,\n variant = \"label\",\n secondaryId,\n secondary,\n primary,\n primaryClassName,\n secondaryClassName,\n}: LabelGroupProps) => {\n const primaryClasses = cn(\n \"text-sm font-medium leading-snug\",\n variant === \"legend\" ? \"mb-2.5\" : \"mb-1 block\",\n primaryClassName,\n );\n\n const requiredIndicator =\n required && variant !== \"label\" ? (\n <span className=\"text-destructive pl-0.5\" aria-label=\"required\">\n *\n </span>\n ) : null;\n\n let primaryElement: ReactNode = null;\n if (primary) {\n if (variant === \"label\") {\n primaryElement = (\n <FieldLabel\n htmlFor={labelHtmlFor}\n required={required}\n className={primaryClasses}\n >\n {primary}\n </FieldLabel>\n );\n } else if (variant === \"legend\") {\n primaryElement = (\n <legend data-slot=\"field-legend\" className={primaryClasses}>\n {primary}\n {requiredIndicator}\n </legend>\n );\n } else {\n primaryElement = (\n <div data-slot=\"field-label\" className={primaryClasses}>\n {primary}\n {requiredIndicator}\n </div>\n );\n }\n }\n\n const secondaryElement = secondary ? (\n <FieldDescription\n id={secondaryId}\n className={cn(\"leading-normal font-normal\", secondaryClassName)}\n >\n {secondary}\n </FieldDescription>\n ) : null;\n\n if (!primaryElement && !secondaryElement) return null;\n\n // Legend should remain a direct child of fieldset for proper semantics.\n if (variant === \"legend\") {\n return (\n <>\n {primaryElement}\n {secondaryElement}\n </>\n );\n }\n\n return (\n <div className=\"flex flex-1 flex-col gap-0.5\">\n {primaryElement}\n {secondaryElement}\n </div>\n );\n};\n\nexport { LabelGroup };\n"]}
|
package/dist/core.cjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-V7JSGFCI.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var chunkXE6H7L7E_cjs = require('./chunk-XE6H7L7E.cjs');
|
|
5
|
+
require('./chunk-ZLET7YJ2.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "ButtonGroupForm", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkXE6H7L7E_cjs.ButtonGroupForm; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "Field", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkXE6H7L7E_cjs.Field; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "Form", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkXE6H7L7E_cjs.Form; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "FormContext", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkXE6H7L7E_cjs.FormContext; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "FormFeedback", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkXE6H7L7E_cjs.FormFeedback; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "useField", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkXE6H7L7E_cjs.useField; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "useForm", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkXE6H7L7E_cjs.useForm; }
|
|
36
36
|
});
|
|
37
37
|
//# sourceMappingURL=core.cjs.map
|
|
38
38
|
//# sourceMappingURL=core.cjs.map
|
package/dist/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './chunk-UBDA7CS5.js';
|
|
2
|
-
export { ButtonGroupForm, Field, Form, FormContext, FormFeedback, useField, useForm } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
export { ButtonGroupForm, Field, Form, FormContext, FormFeedback, useField, useForm } from './chunk-CZYQWVD5.js';
|
|
3
|
+
import './chunk-ZBRU7R6C.js';
|
|
4
4
|
//# sourceMappingURL=core.js.map
|
|
5
5
|
//# sourceMappingURL=core.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-V7JSGFCI.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkXE6H7L7E_cjs = require('./chunk-XE6H7L7E.cjs');
|
|
5
|
+
var chunkZLET7YJ2_cjs = require('./chunk-ZLET7YJ2.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "Field", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkXE6H7L7E_cjs.Field; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "Form", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkXE6H7L7E_cjs.Form; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "FormContext", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkXE6H7L7E_cjs.FormContext; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "FormFeedback", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkXE6H7L7E_cjs.FormFeedback; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "useField", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkXE6H7L7E_cjs.useField; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "useForm", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkXE6H7L7E_cjs.useForm; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "FieldDescription", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkZLET7YJ2_cjs.FieldDescription; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "FieldError", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkZLET7YJ2_cjs.FieldError; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "FieldGroup", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkZLET7YJ2_cjs.FieldGroup; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "FieldWrapper", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkZLET7YJ2_cjs.Field; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "FormFieldLabel", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkZLET7YJ2_cjs.FieldLabel; }
|
|
52
52
|
});
|
|
53
53
|
//# sourceMappingURL=index.cjs.map
|
|
54
54
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './chunk-UBDA7CS5.js';
|
|
2
|
-
export { Field, Form, FormContext, FormFeedback, useField, useForm } from './chunk-
|
|
3
|
-
export { FieldDescription, FieldError, FieldGroup, Field as FieldWrapper, FieldLabel as FormFieldLabel } from './chunk-
|
|
2
|
+
export { Field, Form, FormContext, FormFeedback, useField, useForm } from './chunk-CZYQWVD5.js';
|
|
3
|
+
export { FieldDescription, FieldError, FieldGroup, Field as FieldWrapper, FieldLabel as FormFieldLabel } from './chunk-ZBRU7R6C.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/inputs.cjs
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkRACQRUM6_cjs = require('./chunk-RACQRUM6.cjs');
|
|
4
|
+
var chunkZLET7YJ2_cjs = require('./chunk-ZLET7YJ2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Checkbox", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkRACQRUM6_cjs.Checkbox; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "CheckboxGroup", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkRACQRUM6_cjs.CheckboxGroup; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "DatePicker", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkRACQRUM6_cjs.DatePicker; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "DateRangePicker", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkRACQRUM6_cjs.DateRangePicker; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "FileInput", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkRACQRUM6_cjs.FileInput; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "MultiSelect", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkRACQRUM6_cjs.MultiSelect; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "Radio", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkRACQRUM6_cjs.Radio; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Select", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkRACQRUM6_cjs.Select; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "Switch", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkRACQRUM6_cjs.Switch; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "TextArea", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkRACQRUM6_cjs.TextArea; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "TimePicker", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkRACQRUM6_cjs.TimePicker; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "TextInput", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkZLET7YJ2_cjs.TextInput; }
|
|
55
55
|
});
|
|
56
56
|
//# sourceMappingURL=inputs.cjs.map
|
|
57
57
|
//# sourceMappingURL=inputs.cjs.map
|
package/dist/inputs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Checkbox, CheckboxGroup, DatePicker, DateRangePicker, FileInput, MultiSelect, Radio, Select, Switch, TextArea, TimePicker } from './chunk-
|
|
2
|
-
export { TextInput } from './chunk-
|
|
1
|
+
export { Checkbox, CheckboxGroup, DatePicker, DateRangePicker, FileInput, MultiSelect, Radio, Select, Switch, TextArea, TimePicker } from './chunk-EVBK5TLG.js';
|
|
2
|
+
export { TextInput } from './chunk-ZBRU7R6C.js';
|
|
3
3
|
//# sourceMappingURL=inputs.js.map
|
|
4
4
|
//# sourceMappingURL=inputs.js.map
|
package/dist/integration.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkXE6H7L7E_cjs = require('./chunk-XE6H7L7E.cjs');
|
|
4
|
+
var chunkRACQRUM6_cjs = require('./chunk-RACQRUM6.cjs');
|
|
5
|
+
var chunkZLET7YJ2_cjs = require('./chunk-ZLET7YJ2.cjs');
|
|
6
6
|
var React2 = require('react');
|
|
7
7
|
var icon = require('@page-speed/icon');
|
|
8
8
|
|
|
@@ -395,7 +395,7 @@ function generateValidationSchema(fields) {
|
|
|
395
395
|
acc[field.name] = (value, allValues) => {
|
|
396
396
|
if (field.required) {
|
|
397
397
|
if (!value || typeof value === "string" && !value.trim()) {
|
|
398
|
-
const displayName = field.label ||
|
|
398
|
+
const displayName = field.label || chunkZLET7YJ2_cjs.humanizeFieldName(field.name);
|
|
399
399
|
return `${displayName} is required`;
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -440,6 +440,7 @@ function getColumnSpanClass(span) {
|
|
|
440
440
|
const clamped = Math.max(1, Math.min(span, 12));
|
|
441
441
|
return columnSpanClasses[clamped] || "col-span-12";
|
|
442
442
|
}
|
|
443
|
+
var FORM_GRID_FALLBACK_CSS = `[data-psf-grid]{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1.5rem}@media(min-width:768px){[data-psf-grid]{gap:2.5rem}}[data-psf-col]{grid-column:span 12/span 12;min-width:0}@media(min-width:768px){[data-psf-col="1"]{grid-column:span 1/span 1}[data-psf-col="2"]{grid-column:span 2/span 2}[data-psf-col="3"]{grid-column:span 3/span 3}[data-psf-col="4"]{grid-column:span 4/span 4}[data-psf-col="5"]{grid-column:span 5/span 5}[data-psf-col="6"]{grid-column:span 6/span 6}[data-psf-col="7"]{grid-column:span 7/span 7}[data-psf-col="8"]{grid-column:span 8/span 8}[data-psf-col="9"]{grid-column:span 9/span 9}[data-psf-col="10"]{grid-column:span 10/span 10}[data-psf-col="11"]{grid-column:span 11/span 11}[data-psf-col="12"]{grid-column:span 12/span 12}}`;
|
|
443
444
|
var DEFAULT_UPLOAD_ENDPOINT = "https://api.dashtrack.com/contacts/_/contact_form_uploads";
|
|
444
445
|
function useFileUpload(options) {
|
|
445
446
|
const [uploadTokens, setUploadTokens] = React2.useState([]);
|
|
@@ -567,7 +568,7 @@ function useContactForm(options) {
|
|
|
567
568
|
window.location.assign(destination);
|
|
568
569
|
}, 150);
|
|
569
570
|
}, [navigate, redirectUrl]);
|
|
570
|
-
const form =
|
|
571
|
+
const form = chunkXE6H7L7E_cjs.useForm({
|
|
571
572
|
initialValues: React2.useMemo(
|
|
572
573
|
() => generateInitialValues(formFields),
|
|
573
574
|
[formFields]
|
|
@@ -664,11 +665,11 @@ function DynamicFormField({
|
|
|
664
665
|
}) {
|
|
665
666
|
const fieldId = field.name;
|
|
666
667
|
const usesChoiceCard = React2__namespace.useMemo(() => {
|
|
667
|
-
return
|
|
668
|
+
return chunkZLET7YJ2_cjs.fieldIsChoiceCard(field);
|
|
668
669
|
}, [field.type, field.options]);
|
|
669
670
|
const fieldClassName = React2__namespace.useMemo(() => {
|
|
670
671
|
if (usesChoiceCard) {
|
|
671
|
-
return "p-4 border rounded
|
|
672
|
+
return "p-4 border rounded-lg";
|
|
672
673
|
} else {
|
|
673
674
|
return "";
|
|
674
675
|
}
|
|
@@ -677,16 +678,16 @@ function DynamicFormField({
|
|
|
677
678
|
const usesInlineCheckboxLabel = field.type === "checkbox";
|
|
678
679
|
const shouldRenderFieldLabel = renderLabel && !usesGroupLegend && !usesInlineCheckboxLabel;
|
|
679
680
|
return /* @__PURE__ */ React2__namespace.createElement(
|
|
680
|
-
|
|
681
|
+
chunkXE6H7L7E_cjs.Field,
|
|
681
682
|
{
|
|
682
683
|
name: field.name,
|
|
683
684
|
label: shouldRenderFieldLabel ? field.label : void 0,
|
|
684
685
|
description: shouldRenderFieldLabel ? field.description : void 0,
|
|
685
686
|
required: field.required,
|
|
686
|
-
className:
|
|
687
|
+
className: chunkZLET7YJ2_cjs.cn(fieldClassName, className)
|
|
687
688
|
},
|
|
688
689
|
({ field: formField, meta }) => /* @__PURE__ */ React2__namespace.createElement("div", null, (field.type === "text" || field.type === "email" || field.type === "tel" || field.type === "search" || field.type === "password" || field.type === "url") && /* @__PURE__ */ React2__namespace.createElement(
|
|
689
|
-
|
|
690
|
+
chunkZLET7YJ2_cjs.TextInput,
|
|
690
691
|
{
|
|
691
692
|
...formField,
|
|
692
693
|
id: fieldId,
|
|
@@ -698,7 +699,7 @@ function DynamicFormField({
|
|
|
698
699
|
iconStart: getDefaultIconStart(field)
|
|
699
700
|
}
|
|
700
701
|
), field.type === "number" && /* @__PURE__ */ React2__namespace.createElement(
|
|
701
|
-
|
|
702
|
+
chunkZLET7YJ2_cjs.TextInput,
|
|
702
703
|
{
|
|
703
704
|
...formField,
|
|
704
705
|
id: fieldId,
|
|
@@ -709,7 +710,7 @@ function DynamicFormField({
|
|
|
709
710
|
"aria-label": field.label
|
|
710
711
|
}
|
|
711
712
|
), field.type === "textarea" && /* @__PURE__ */ React2__namespace.createElement(
|
|
712
|
-
|
|
713
|
+
chunkRACQRUM6_cjs.TextArea,
|
|
713
714
|
{
|
|
714
715
|
...formField,
|
|
715
716
|
id: fieldId,
|
|
@@ -720,7 +721,7 @@ function DynamicFormField({
|
|
|
720
721
|
"aria-label": field.label
|
|
721
722
|
}
|
|
722
723
|
), field.type === "select" && field.options && /* @__PURE__ */ React2__namespace.createElement(
|
|
723
|
-
|
|
724
|
+
chunkRACQRUM6_cjs.Select,
|
|
724
725
|
{
|
|
725
726
|
...formField,
|
|
726
727
|
id: fieldId,
|
|
@@ -731,7 +732,7 @@ function DynamicFormField({
|
|
|
731
732
|
"aria-label": field.label
|
|
732
733
|
}
|
|
733
734
|
), field.type === "multi-select" && field.options && /* @__PURE__ */ React2__namespace.createElement(
|
|
734
|
-
|
|
735
|
+
chunkRACQRUM6_cjs.MultiSelect,
|
|
735
736
|
{
|
|
736
737
|
...formField,
|
|
737
738
|
id: fieldId,
|
|
@@ -742,7 +743,7 @@ function DynamicFormField({
|
|
|
742
743
|
"aria-label": field.label
|
|
743
744
|
}
|
|
744
745
|
), field.type === "radio" && field.options && /* @__PURE__ */ React2__namespace.createElement(
|
|
745
|
-
|
|
746
|
+
chunkRACQRUM6_cjs.Radio,
|
|
746
747
|
{
|
|
747
748
|
...formField,
|
|
748
749
|
id: fieldId,
|
|
@@ -756,7 +757,7 @@ function DynamicFormField({
|
|
|
756
757
|
"aria-label": field.label
|
|
757
758
|
}
|
|
758
759
|
), field.type === "checkbox" && /* @__PURE__ */ React2__namespace.createElement(
|
|
759
|
-
|
|
760
|
+
chunkRACQRUM6_cjs.Checkbox,
|
|
760
761
|
{
|
|
761
762
|
...formField,
|
|
762
763
|
id: fieldId,
|
|
@@ -770,7 +771,7 @@ function DynamicFormField({
|
|
|
770
771
|
"aria-label": field.label
|
|
771
772
|
}
|
|
772
773
|
), field.type === "checkbox-group" && field.options && /* @__PURE__ */ React2__namespace.createElement(
|
|
773
|
-
|
|
774
|
+
chunkRACQRUM6_cjs.CheckboxGroup,
|
|
774
775
|
{
|
|
775
776
|
...formField,
|
|
776
777
|
id: fieldId,
|
|
@@ -784,7 +785,7 @@ function DynamicFormField({
|
|
|
784
785
|
"aria-label": field.label
|
|
785
786
|
}
|
|
786
787
|
), (field.type === "date-picker" || field.type === "date") && /* @__PURE__ */ React2__namespace.createElement(
|
|
787
|
-
|
|
788
|
+
chunkRACQRUM6_cjs.DatePicker,
|
|
788
789
|
{
|
|
789
790
|
...formField,
|
|
790
791
|
id: fieldId,
|
|
@@ -794,7 +795,7 @@ function DynamicFormField({
|
|
|
794
795
|
"aria-label": field.label
|
|
795
796
|
}
|
|
796
797
|
), field.type === "date-range" && /* @__PURE__ */ React2__namespace.createElement(
|
|
797
|
-
|
|
798
|
+
chunkRACQRUM6_cjs.DateRangePicker,
|
|
798
799
|
{
|
|
799
800
|
...formField,
|
|
800
801
|
id: fieldId,
|
|
@@ -804,7 +805,7 @@ function DynamicFormField({
|
|
|
804
805
|
"aria-label": field.label
|
|
805
806
|
}
|
|
806
807
|
), field.type === "time" && /* @__PURE__ */ React2__namespace.createElement(
|
|
807
|
-
|
|
808
|
+
chunkRACQRUM6_cjs.TimePicker,
|
|
808
809
|
{
|
|
809
810
|
...formField,
|
|
810
811
|
id: fieldId,
|
|
@@ -814,7 +815,7 @@ function DynamicFormField({
|
|
|
814
815
|
"aria-label": field.label
|
|
815
816
|
}
|
|
816
817
|
), field.type === "file" && /* @__PURE__ */ React2__namespace.createElement(
|
|
817
|
-
|
|
818
|
+
chunkRACQRUM6_cjs.FileInput,
|
|
818
819
|
{
|
|
819
820
|
...formField,
|
|
820
821
|
id: fieldId,
|
|
@@ -954,7 +955,7 @@ function FormEngine(props) {
|
|
|
954
955
|
};
|
|
955
956
|
}, [isButtonGroup, buttonGroupSetup, api]);
|
|
956
957
|
return /* @__PURE__ */ React2__namespace.createElement("div", { className: styleRules?.formContainer }, /* @__PURE__ */ React2__namespace.createElement(
|
|
957
|
-
|
|
958
|
+
chunkXE6H7L7E_cjs.Form,
|
|
958
959
|
{
|
|
959
960
|
form,
|
|
960
961
|
fields: isButtonGroup ? formFields : void 0,
|
|
@@ -972,36 +973,46 @@ function FormEngine(props) {
|
|
|
972
973
|
onNewSubmission: resetSubmissionState
|
|
973
974
|
},
|
|
974
975
|
!isButtonGroup && /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(
|
|
976
|
+
"style",
|
|
977
|
+
{
|
|
978
|
+
dangerouslySetInnerHTML: { __html: FORM_GRID_FALLBACK_CSS }
|
|
979
|
+
}
|
|
980
|
+
), /* @__PURE__ */ React2__namespace.createElement(
|
|
975
981
|
"div",
|
|
976
982
|
{
|
|
977
|
-
|
|
983
|
+
"data-psf-grid": "",
|
|
984
|
+
className: chunkZLET7YJ2_cjs.cn(
|
|
978
985
|
"grid grid-cols-12 gap-6 md:gap-10",
|
|
979
986
|
styleRules?.fieldsContainer
|
|
980
987
|
)
|
|
981
988
|
},
|
|
982
|
-
formFields.map((field) =>
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
className: chunkIGI4JJKE_cjs.cn(
|
|
987
|
-
getColumnSpanClass(field.columnSpan ?? 12),
|
|
988
|
-
"min-w-0"
|
|
989
|
-
)
|
|
990
|
-
},
|
|
991
|
-
/* @__PURE__ */ React2__namespace.createElement(
|
|
992
|
-
DynamicFormField,
|
|
989
|
+
formFields.map((field) => {
|
|
990
|
+
const span = field.columnSpan ?? 12;
|
|
991
|
+
return /* @__PURE__ */ React2__namespace.createElement(
|
|
992
|
+
"div",
|
|
993
993
|
{
|
|
994
|
-
field,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
|
|
994
|
+
key: field.name,
|
|
995
|
+
"data-psf-col": String(span),
|
|
996
|
+
className: chunkZLET7YJ2_cjs.cn(
|
|
997
|
+
getColumnSpanClass(span),
|
|
998
|
+
"min-w-0"
|
|
999
|
+
)
|
|
1000
|
+
},
|
|
1001
|
+
/* @__PURE__ */ React2__namespace.createElement(
|
|
1002
|
+
DynamicFormField,
|
|
1003
|
+
{
|
|
1004
|
+
field,
|
|
1005
|
+
className: field.className ?? styleRules?.fieldClassName,
|
|
1006
|
+
uploadProgress,
|
|
1007
|
+
onFileUpload,
|
|
1008
|
+
onFileRemove,
|
|
1009
|
+
isUploading
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
);
|
|
1013
|
+
})
|
|
1003
1014
|
), /* @__PURE__ */ React2__namespace.createElement(
|
|
1004
|
-
|
|
1015
|
+
chunkZLET7YJ2_cjs.Button,
|
|
1005
1016
|
{
|
|
1006
1017
|
type: "submit",
|
|
1007
1018
|
variant: submitButtonSetup?.submitVariant ?? DEFAULT_BUTTON_VARIANT,
|