@komensal/ui 0.15.0 → 0.16.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/cn.ts","../src/utils/color.ts","../src/utils/format.ts","../src/utils/styles.ts","../src/utils/tag-emoji.ts","../src/utils/toast-emitter.ts","../src/utils/url.ts","../src/utils/z-index.ts","../src/components/form-context.ts","../src/components/form.tsx","../src/components/label.tsx","../src/components/form-fields/label-field.tsx","../src/components/google-map-picker.tsx","../src/components/use-google-map-picker.ts","../src/components/form-fields/form-field-shell.tsx","../src/components/form-fields/map-picker-field.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","export function isLightColor(hex: string): boolean {\n const normalized = hex.replace('#', '')\n const r = parseInt(normalized.slice(0, 2), 16)\n const g = parseInt(normalized.slice(2, 4), 16)\n const b = parseInt(normalized.slice(4, 6), 16)\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255\n\n return luminance > 0.6\n}\n","const DEFAULT_CURRENCY = 'COP'\nconst DEFAULT_LOCALE = 'es-CO'\n\nexport function capitalize(value: null | string | undefined): string {\n if (!value) return ''\n const trimmed = value.trimStart()\n if (trimmed.length === 0) return value\n return trimmed.charAt(0).toLocaleUpperCase('es') + trimmed.slice(1)\n}\n\nexport function formatNumber(value: number, locale = DEFAULT_LOCALE): string {\n return new Intl.NumberFormat(locale, { style: 'decimal' }).format(value)\n}\n\nexport function formatPrice(value: number, locale = DEFAULT_LOCALE, currency = DEFAULT_CURRENCY): string {\n return new Intl.NumberFormat(locale, {\n currency,\n maximumFractionDigits: 0,\n style: 'currency'\n })\n .format(value)\n .replace(/\\s/g, '')\n}\n","import { cn } from './cn'\n\nexport const focusRing = cn('focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none')\n\nexport const inputSurface = cn(\n 'w-full rounded-[10px] px-3 text-base font-normal',\n 'border-border bg-surface text-foreground border',\n 'transition-all duration-200 ease-in-out',\n 'placeholder:text-icon-muted placeholder:text-sm placeholder:leading-none placeholder:font-normal',\n 'disabled:bg-inactive disabled:text-inactive-text disabled:border-inactive disabled:placeholder:text-inactive-text disabled:cursor-not-allowed'\n)\n\nexport const inputBase = cn('flex h-[50px] items-center justify-between gap-[10px]', inputSurface)\n\nexport const inputPlaceholder = cn('text-icon-muted text-sm leading-none font-normal')\n\nexport const inputDisabled = cn('cursor-not-allowed opacity-50')\n\nexport const inputCompact = cn(\n 'border-border bg-surface text-foreground focus:border-primary focus:ring-ring h-9 w-full rounded-lg border px-2.5 text-sm focus:ring-2 focus:outline-none'\n)\n\nexport const inputFocus = cn(\n 'focus:outline-none focus-visible:outline-none',\n 'focus-visible:ring-ring focus-visible:border-primary focus-visible:ring-2',\n 'data-[state=open]:ring-ring data-[state=open]:border-primary data-[state=open]:ring-2'\n)\n","const TAG_EMOJI_RULES: { emoji: string; keywords: string[] }[] = [\n { emoji: '🌶️', keywords: ['picante', 'picoso', 'spicy'] },\n { emoji: '🥜', keywords: ['nuez', 'nueces', 'mani', 'cacahuate', 'frutos secos'] },\n { emoji: '🌱', keywords: ['vegano', 'vegetariano', 'vegan'] },\n { emoji: '🌾', keywords: ['sin gluten', 'gluten free'] },\n { emoji: '🥛', keywords: ['lacteos', 'leche', 'lactosa'] },\n { emoji: '🦐', keywords: ['marisco', 'camaron'] },\n { emoji: '🔥', keywords: ['popular', 'top ventas'] },\n { emoji: '🆕', keywords: ['nuevo', 'new'] },\n { emoji: '🍬', keywords: ['dulce'] },\n { emoji: '🧊', keywords: ['frio', 'helado'] }\n]\n\nexport function getTagEmoji(tag: string): null | string {\n const normalized = normalize(tag)\n const match = TAG_EMOJI_RULES.find((rule) => rule.keywords.some((keyword) => normalized.includes(keyword)))\n return match?.emoji ?? null\n}\n\nfunction normalize(text: string): string {\n return text\n .toLowerCase()\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '')\n}\n","import { ToastOptions, ToastType } from '../types/toast'\n\ntype ToastEmitter = ((type: ToastType, options: ToastOptions) => void) | null\n\nlet emitToast: ToastEmitter = null\n\nexport const toast = {\n error(options: string | ToastOptions) {\n emit('destructive', options)\n },\n info(options: string | ToastOptions) {\n emit('info', options)\n },\n success(options: string | ToastOptions) {\n emit('success', options)\n },\n wait(options: string | ToastOptions) {\n emit('wait', options)\n },\n warning(options: string | ToastOptions) {\n emit('warning', options)\n }\n}\n\nexport function registerToastEmitter(fn: ToastEmitter) {\n emitToast = fn\n}\n\nfunction emit(type: ToastType, options: string | ToastOptions) {\n if (!emitToast) return\n\n if (typeof options === 'string') {\n emitToast(type, { title: options })\n } else {\n emitToast(type, options)\n }\n}\n","export function isSafeUrl(url: string): boolean {\n try {\n const parsed = new URL(url, 'https://placeholder.invalid')\n return parsed.protocol === 'http:' || parsed.protocol === 'https:'\n } catch {\n return false\n }\n}\n","export const zPopover = 'z-50'\nexport const zDialogOverlay = 'z-60'\nexport const zDialogContent = 'z-70'\nexport const zPopoverAboveDialog = 'z-100'\nexport const zToast = 'z-4000'\n","import * as React from 'react'\nimport { FieldPath, FieldValues, useFormContext } from 'react-hook-form'\n\nexport interface FormControlA11yProps {\n 'aria-describedby'?: string\n 'aria-invalid': boolean\n id: string\n}\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> {\n name: TName\n}\n\ninterface FormItemContextValue {\n id: string\n}\n\nexport const FormFieldContext = React.createContext<FormFieldContextValue | null>(null)\n\nexport const FormItemContext = React.createContext<FormItemContextValue | null>(null)\n\nexport const getFormItemId = (id: string) => `${id}-form-item`\n\nexport const useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { formState, getFieldState } = useFormContext()\n\n if (!fieldContext) {\n throw new Error('useFormField must be used within <FormField>')\n }\n\n if (!itemContext) {\n throw new Error('useFormField must be used within <FormItem>')\n }\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext\n\n return {\n formDescriptionId: `${id}-form-item-description`,\n formItemId: getFormItemId(id),\n formMessageId: `${id}-form-item-message`,\n id,\n name: fieldContext.name,\n ...fieldState\n }\n}\n\nexport const useFormControlProps = (): FormControlA11yProps => {\n const { error, formItemId, formMessageId } = useFormField()\n\n return {\n 'aria-describedby': error?.message ? formMessageId : undefined,\n 'aria-invalid': !!error,\n id: formItemId\n }\n}\n\nexport const useOptionalFormItemId = () => {\n const itemContext = React.useContext(FormItemContext)\n return itemContext ? getFormItemId(itemContext.id) : undefined\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\nimport { Controller, ControllerProps, FieldPath, FieldValues, FormProvider } from 'react-hook-form'\n\nimport { cn } from '../utils'\nimport { FormFieldContext, FormItemContext, useFormControlProps, useFormField } from './form-context'\n\nconst Form = FormProvider\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div className={cn('space-y-1', className)} ref={ref} {...props} />\n </FormItemContext.Provider>\n )\n }\n)\nFormItem.displayName = 'FormItem'\n\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(\n ({ ...props }, ref) => {\n const controlProps = useFormControlProps()\n\n return <Slot {...controlProps} ref={ref} {...props} />\n }\n)\nFormControl.displayName = 'FormControl'\n\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\n ({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error?.message ? String(error.message) : children\n\n if (!body) {\n return null\n }\n\n return (\n <p className={cn('text-destructive text-xs font-medium', className)} id={formMessageId} ref={ref} {...props}>\n {body}\n </p>\n )\n }\n)\nFormMessage.displayName = 'FormMessage'\n\nexport { Form, FormControl, FormField, FormItem, FormMessage, useFormField }\n","import * as LabelPrimitive from '@radix-ui/react-label'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../utils'\n\nconst labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70')\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root className={cn(labelVariants(), className)} ref={ref} {...props} />\n))\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","import { cn } from '../../utils'\nimport { useOptionalFormItemId } from '../form-context'\nimport { Label } from '../label'\n\ninterface LabelFieldProps {\n htmlFor?: string\n label?: string\n labelClassName?: string\n name: string\n visualRequired?: boolean\n}\n\nexport const LabelField = ({ htmlFor, label, labelClassName, name, visualRequired }: LabelFieldProps) => {\n const formItemId = useOptionalFormItemId()\n\n return (\n <Label\n className={cn('text-body mb-2 text-start text-sm leading-none font-normal tracking-normal', labelClassName)}\n htmlFor={htmlFor ?? formItemId ?? name}\n >\n <span>{label}</span> {visualRequired && <span className='text-destructive'> *</span>}\n </Label>\n )\n}\n","import { AdvancedMarker, APIProvider, Map } from '@vis.gl/react-google-maps'\nimport { useId } from 'react'\n\nimport { cn, focusRing, inputBase, inputFocus, zPopover } from '../utils'\nimport { PICKER_MAP_ID, useGoogleMapPicker } from './use-google-map-picker'\n\nconst DEFAULT_CENTER = { lat: 4.711, lng: -74.0721 }\n\nexport interface GoogleMapPickerProps {\n apiKey?: string\n 'aria-describedby'?: string\n 'aria-invalid'?: boolean\n 'aria-label'?: string\n 'aria-labelledby'?: string\n centerOn?: google.maps.LatLngLiteral\n countryCode?: string\n disabled?: boolean\n hasError?: boolean\n id?: string\n initialPosition?: google.maps.LatLngLiteral\n locationQuery?: string\n locationZoom?: number\n mapId?: string\n onAddressResolved?: (resolved: ResolvedAddress) => void\n onChange: (address: string) => void\n onError?: (error: unknown) => void\n placeholder?: string\n value: string\n}\n\nexport interface ResolvedAddress {\n address: string\n city: null | string\n country: null | string\n countryName: null | string\n department: null | string\n lat: null | number\n lng: null | number\n}\n\nconst MapPickerContent = (props: GoogleMapPickerProps) => {\n const {\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n disabled,\n hasError,\n id,\n mapId,\n placeholder\n } = props\n const listboxId = useId()\n const {\n handleBlur,\n handleInputChange,\n handleMapClick,\n handleMarkerDragEnd,\n handleSelect,\n inputValue,\n position,\n setShowDropdown,\n showDropdown,\n suggestions\n } = useGoogleMapPicker(props)\n\n const isExpanded = showDropdown && suggestions.length > 0\n\n return (\n <div className='flex flex-col gap-3'>\n <div className='relative'>\n <input\n aria-autocomplete='list'\n aria-controls={isExpanded ? listboxId : undefined}\n aria-describedby={ariaDescribedBy}\n aria-expanded={isExpanded}\n aria-invalid={ariaInvalid ?? (hasError ? true : undefined)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className={cn(inputBase, inputFocus, hasError && 'border-destructive')}\n disabled={disabled}\n id={id}\n onBlur={handleBlur}\n onChange={handleInputChange}\n onFocus={() => suggestions.length > 0 && setShowDropdown(true)}\n placeholder={placeholder}\n role='combobox'\n type='text'\n value={inputValue}\n />\n\n {isExpanded && (\n <ul\n className={cn(\n 'border-border bg-surface absolute mt-1 w-full overflow-hidden rounded-[10px] border shadow-md',\n zPopover\n )}\n id={listboxId}\n role='listbox'\n >\n {suggestions.map((suggestion) => (\n <li key={suggestion.placePrediction?.placeId ?? suggestion.placePrediction?.text.text} role='none'>\n <button\n aria-selected={false}\n className={cn(\n 'text-foreground hover:bg-hover w-full px-4 py-3 text-left text-sm transition-colors focus-visible:ring-inset',\n focusRing\n )}\n onClick={() => void handleSelect(suggestion)}\n role='option'\n type='button'\n >\n {suggestion.placePrediction?.text.text ?? ''}\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n\n <div className='border-border h-59 overflow-hidden rounded-[10px] border md:h-87.5'>\n <Map\n defaultCenter={DEFAULT_CENTER}\n defaultZoom={5}\n disableDefaultUI\n gestureHandling='cooperative'\n id={PICKER_MAP_ID}\n mapId={mapId ?? import.meta.env.VITE_GOOGLE_MAPS_MAP_ID ?? 'DEMO_MAP_ID'}\n onClick={handleMapClick}\n style={{ height: '100%', width: '100%' }}\n >\n {position && <AdvancedMarker draggable={!disabled} onDragEnd={handleMarkerDragEnd} position={position} />}\n </Map>\n </div>\n </div>\n )\n}\n\nexport const GoogleMapPicker = (props: GoogleMapPickerProps) => (\n <APIProvider apiKey={props.apiKey ?? import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? ''} language='es' region='CO'>\n <MapPickerContent {...props} />\n </APIProvider>\n)\n","import type { MapMouseEvent } from '@vis.gl/react-google-maps'\n\nimport { useMap, useMapsLibrary } from '@vis.gl/react-google-maps'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\nimport type { GoogleMapPickerProps } from './google-map-picker'\n\nexport const PICKER_MAP_ID = 'komensal-restaurant-map'\nconst SELECTED_ZOOM = 15\nconst CITY_ZOOM = 12\nconst DEBOUNCE_MS = 300\nconst BLUR_CLOSE_DELAY_MS = 150\n\ninterface RawComponent {\n long: null | string\n short: null | string\n types: string[]\n}\n\nconst parseComponents = (components: RawComponent[]) => {\n const find = (type: string) => components.find((c) => c.types.includes(type))\n const country = find('country')\n const department = find('administrative_area_level_1')\n const city = find('locality') ?? find('administrative_area_level_2')\n return {\n city: city?.long ?? null,\n country: country?.short ?? null,\n countryName: country?.long ?? null,\n department: department?.long ?? null\n }\n}\n\nexport function useGoogleMapPicker({\n centerOn,\n countryCode,\n disabled,\n initialPosition,\n locationQuery,\n locationZoom,\n onAddressResolved,\n onChange,\n onError,\n value\n}: GoogleMapPickerProps) {\n const placesLib = useMapsLibrary('places')\n const geocodingLib = useMapsLibrary('geocoding')\n const map = useMap(PICKER_MAP_ID)\n const onChangeRef = useRef(onChange)\n const onResolvedRef = useRef(onAddressResolved)\n const onErrorRef = useRef(onError)\n const geocoder = useMemo<google.maps.Geocoder | null>(\n () => (geocodingLib ? new geocodingLib.Geocoder() : null),\n [geocodingLib]\n )\n const debounceRef = useRef<null | ReturnType<typeof setTimeout>>(null)\n const blurTimeoutRef = useRef<null | ReturnType<typeof setTimeout>>(null)\n\n const [inputValue, setInputValue] = useState(value)\n const [suggestions, setSuggestions] = useState<google.maps.places.AutocompleteSuggestion[]>([])\n const [showDropdown, setShowDropdown] = useState(false)\n const [sessionToken, setSessionToken] = useState<google.maps.places.AutocompleteSessionToken | undefined>()\n const [position, setPosition] = useState<google.maps.LatLngLiteral | null>(initialPosition ?? null)\n\n useEffect(() => {\n onChangeRef.current = onChange\n onResolvedRef.current = onAddressResolved\n onErrorRef.current = onError\n })\n\n useEffect(\n () => () => {\n if (debounceRef.current) clearTimeout(debounceRef.current)\n if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current)\n },\n []\n )\n\n const [prevValue, setPrevValue] = useState(value)\n if (prevValue !== value) {\n setPrevValue(value)\n setInputValue(value)\n }\n\n useEffect(() => {\n if (map && centerOn) {\n map.panTo(centerOn)\n map.setZoom(CITY_ZOOM)\n }\n }, [map, centerOn])\n\n useEffect(() => {\n if (map && position) {\n map.panTo(position)\n map.setZoom(SELECTED_ZOOM)\n }\n }, [map, position])\n\n const [prevPlacesLib, setPrevPlacesLib] = useState(placesLib)\n if (prevPlacesLib !== placesLib) {\n setPrevPlacesLib(placesLib)\n if (placesLib) setSessionToken(new placesLib.AutocompleteSessionToken())\n }\n\n useEffect(() => {\n if (!geocoder || !locationQuery || !map || position) return\n const g = geocoder\n const ctrl = { cancelled: false }\n void (async () => {\n try {\n const { results } = await g.geocode({ address: locationQuery })\n if (ctrl.cancelled || results.length === 0) return\n const loc = results[0].geometry.location\n map.panTo({ lat: loc.lat(), lng: loc.lng() })\n map.setZoom(locationZoom ?? CITY_ZOOM)\n } catch (error) {\n if (!ctrl.cancelled) {\n console.error('[GoogleMapPicker] geocode by query failed', error)\n onErrorRef.current?.(error)\n }\n }\n })()\n return () => {\n ctrl.cancelled = true\n }\n }, [geocoder, locationQuery, locationZoom, map, position])\n\n const fetchSuggestions = useCallback(\n async (input: string) => {\n if (!placesLib || input.length < 2) {\n setSuggestions([])\n return\n }\n try {\n const result = await placesLib.AutocompleteSuggestion.fetchAutocompleteSuggestions({\n includedRegionCodes: countryCode ? [countryCode.trim().toLowerCase()] : undefined,\n input,\n sessionToken\n })\n setSuggestions(result.suggestions)\n setShowDropdown(true)\n } catch (error) {\n console.error('[GoogleMapPicker] fetchAutocompleteSuggestions failed', error)\n onErrorRef.current?.(error)\n setSuggestions([])\n }\n },\n [placesLib, sessionToken, countryCode]\n )\n\n const reverseGeocode = useCallback(\n async (latLng: google.maps.LatLngLiteral) => {\n if (!geocoder) return\n try {\n const { results } = await geocoder.geocode({ location: latLng })\n if (results.length > 0) {\n const result = results[0]\n const address = result.formatted_address\n setInputValue(address)\n onChangeRef.current(address)\n const parts = parseComponents(\n result.address_components.map((c) => ({ long: c.long_name, short: c.short_name, types: c.types }))\n )\n onResolvedRef.current?.({ address, lat: latLng.lat, lng: latLng.lng, ...parts })\n }\n } catch (error) {\n console.error('[GoogleMapPicker] reverse geocode failed', error)\n onErrorRef.current?.(error)\n }\n },\n [geocoder]\n )\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const val = e.target.value\n setInputValue(val)\n onChangeRef.current(val)\n\n if (debounceRef.current) clearTimeout(debounceRef.current)\n debounceRef.current = setTimeout(() => void fetchSuggestions(val), DEBOUNCE_MS)\n }\n\n const handleSelect = async (suggestion: google.maps.places.AutocompleteSuggestion) => {\n const prediction = suggestion.placePrediction\n if (!prediction) return\n\n const place = prediction.toPlace()\n await place.fetchFields({ fields: ['formattedAddress', 'location', 'addressComponents'] })\n\n const address = place.formattedAddress ?? prediction.text.text\n setInputValue(address)\n onChangeRef.current(address)\n setSuggestions([])\n setShowDropdown(false)\n\n const lat = place.location?.lat() ?? null\n const lng = place.location?.lng() ?? null\n if (place.location) {\n setPosition({ lat: place.location.lat(), lng: place.location.lng() })\n }\n\n const parts = parseComponents(\n (place.addressComponents ?? []).map((c) => ({ long: c.longText, short: c.shortText, types: c.types }))\n )\n onResolvedRef.current?.({ address, lat, lng, ...parts })\n\n if (placesLib) setSessionToken(new placesLib.AutocompleteSessionToken())\n }\n\n const handleBlur = () => {\n if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current)\n blurTimeoutRef.current = setTimeout(() => setShowDropdown(false), BLUR_CLOSE_DELAY_MS)\n }\n\n const handleMapClick = useCallback(\n (e: MapMouseEvent) => {\n if (disabled || !e.detail.latLng) return\n const latLng = e.detail.latLng\n setPosition(latLng)\n void reverseGeocode(latLng)\n },\n [disabled, reverseGeocode]\n )\n\n const handleMarkerDragEnd = useCallback(\n (e: google.maps.MapMouseEvent) => {\n const latLng = e.latLng\n if (!latLng) return\n const pos = { lat: latLng.lat(), lng: latLng.lng() }\n setPosition(pos)\n void reverseGeocode(pos)\n },\n [reverseGeocode]\n )\n\n return {\n handleBlur,\n handleInputChange,\n handleMapClick,\n handleMarkerDragEnd,\n handleSelect,\n inputValue,\n position,\n setShowDropdown,\n showDropdown,\n suggestions\n }\n}\n","import type { ReactNode } from 'react'\n\nimport { cn } from '../../utils'\nimport { FormItem, FormMessage } from '../form'\nimport { type FormControlA11yProps, useFormControlProps } from '../form-context'\nimport { LabelField } from './label-field'\n\ninterface FormFieldShellProps {\n children: (controlProps: FormControlA11yProps) => ReactNode\n hasError?: boolean\n label?: string\n labelClassName?: string\n mainClassName?: string\n name: string\n visualRequired?: boolean\n}\n\nconst FieldControl = ({ children }: { children: FormFieldShellProps['children'] }) => {\n const controlProps = useFormControlProps()\n return <>{children(controlProps)}</>\n}\n\nexport const FormFieldShell = ({\n children,\n hasError,\n label,\n labelClassName,\n mainClassName,\n name,\n visualRequired\n}: FormFieldShellProps) => (\n <FormItem className={cn('flex flex-col', mainClassName)}>\n <LabelField\n label={label}\n labelClassName={cn(labelClassName, hasError && 'text-destructive')}\n name={name}\n visualRequired={visualRequired}\n />\n <FieldControl>{children}</FieldControl>\n <FormMessage />\n </FormItem>\n)\n","import type { Control, FieldValues, Path } from 'react-hook-form'\n\nimport { FormField } from '../form'\nimport { GoogleMapPicker, type GoogleMapPickerProps } from '../google-map-picker'\nimport { FormFieldShell } from './form-field-shell'\n\ntype MapPickerFieldProps<T extends FieldValues> = Omit<GoogleMapPickerProps, 'hasError' | 'onChange' | 'value'> & {\n control: Control<T>\n label?: string\n labelClassName?: string\n mainClassName?: string\n name: Path<T>\n visualRequired?: boolean\n}\n\nexport const MapPickerField = <T extends FieldValues>({\n control,\n label,\n labelClassName,\n mainClassName,\n name,\n visualRequired,\n ...pickerProps\n}: MapPickerFieldProps<T>) => (\n <FormField\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <FormFieldShell\n hasError={!!fieldState.error}\n label={label}\n labelClassName={labelClassName}\n mainClassName={mainClassName}\n name={name}\n visualRequired={visualRequired}\n >\n {(controlProps) => (\n <GoogleMapPicker\n {...pickerProps}\n {...controlProps}\n hasError={!!fieldState.error}\n onChange={field.onChange}\n value={field.value ?? ''}\n />\n )}\n </FormFieldShell>\n )}\n />\n)\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLO,SAAS,aAAa,K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AA,YACJ,UAAU,CAAC,CAAC,WAAW;AAAA,YACvB,UAAU,MAAM;AAAA,YAChB,OAAO,MAAM,SAAS;AAAA;AAAA,QACxB;AAAA;AAAA,IAEJ;AAAA;AAEJ;","names":["React","React","jsx","jsx","useId","jsx","jsxs","useId","jsx","jsxs","jsx"]}
@@ -0,0 +1,41 @@
1
+ // src/locales/es/ui.json
2
+ var ui_default = {
3
+ inputField: {
4
+ showPassword: "Mostrar contrase\xF1a",
5
+ hidePassword: "Ocultar contrase\xF1a",
6
+ clear: "Limpiar"
7
+ },
8
+ dialog: {
9
+ close: "Cerrar"
10
+ },
11
+ selectInput: {
12
+ placeholder: "Selecciona...",
13
+ loading: "Cargando...",
14
+ search: "Buscar...",
15
+ noResults: "Sin resultados.",
16
+ clear: "Limpiar selecci\xF3n"
17
+ },
18
+ passwordChecklist: {
19
+ minLength: "M\xEDnimo {{min}} caracteres",
20
+ hasUpperAndLower: "Una may\xFAscula y min\xFAscula",
21
+ hasNumber: "Un n\xFAmero",
22
+ hasSpecialChar: "Un car\xE1cter especial"
23
+ },
24
+ spinner: {
25
+ loading: "Cargando..."
26
+ },
27
+ breadcrumb: {
28
+ label: "Ruta de navegaci\xF3n"
29
+ },
30
+ timeColumns: {
31
+ am: "AM",
32
+ pm: "PM",
33
+ hours: "Horas",
34
+ minutes: "Minutos"
35
+ }
36
+ };
37
+
38
+ export {
39
+ ui_default
40
+ };
41
+ //# sourceMappingURL=chunk-FDVY36KS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/locales/es/ui.json"],"sourcesContent":["{\n \"inputField\": {\n \"showPassword\": \"Mostrar contraseña\",\n \"hidePassword\": \"Ocultar contraseña\",\n \"clear\": \"Limpiar\"\n },\n \"dialog\": {\n \"close\": \"Cerrar\"\n },\n \"selectInput\": {\n \"placeholder\": \"Selecciona...\",\n \"loading\": \"Cargando...\",\n \"search\": \"Buscar...\",\n \"noResults\": \"Sin resultados.\",\n \"clear\": \"Limpiar selección\"\n },\n \"passwordChecklist\": {\n \"minLength\": \"Mínimo {{min}} caracteres\",\n \"hasUpperAndLower\": \"Una mayúscula y minúscula\",\n \"hasNumber\": \"Un número\",\n \"hasSpecialChar\": \"Un carácter especial\"\n },\n \"spinner\": {\n \"loading\": \"Cargando...\"\n },\n \"breadcrumb\": {\n \"label\": \"Ruta de navegación\"\n },\n \"timeColumns\": {\n \"am\": \"AM\",\n \"pm\": \"PM\",\n \"hours\": \"Horas\",\n \"minutes\": \"Minutos\"\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,YAAc;AAAA,IACZ,cAAgB;AAAA,IAChB,cAAgB;AAAA,IAChB,OAAS;AAAA,EACX;AAAA,EACA,QAAU;AAAA,IACR,OAAS;AAAA,EACX;AAAA,EACA,aAAe;AAAA,IACb,aAAe;AAAA,IACf,SAAW;AAAA,IACX,QAAU;AAAA,IACV,WAAa;AAAA,IACb,OAAS;AAAA,EACX;AAAA,EACA,mBAAqB;AAAA,IACnB,WAAa;AAAA,IACb,kBAAoB;AAAA,IACpB,WAAa;AAAA,IACb,gBAAkB;AAAA,EACpB;AAAA,EACA,SAAW;AAAA,IACT,SAAW;AAAA,EACb;AAAA,EACA,YAAc;AAAA,IACZ,OAAS;AAAA,EACX;AAAA,EACA,aAAe;AAAA,IACb,IAAM;AAAA,IACN,IAAM;AAAA,IACN,OAAS;AAAA,IACT,SAAW;AAAA,EACb;AACF;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  import * as React from 'react';
2
- import React__default, { ReactNode, JSX } from 'react';
2
+ import React__default, { ReactNode, HTMLAttributes, FocusEvent, JSX } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as DialogPrimitive from '@radix-ui/react-dialog';
6
6
  import { DialogProps } from '@radix-ui/react-dialog';
7
7
  import * as react_hook_form from 'react-hook-form';
8
8
  import { FieldValues, FieldPath, ControllerProps, Control, Path, FieldError, Noop } from 'react-hook-form';
9
+ export { GoogleMapPicker, GoogleMapPickerProps, MapPickerField, ResolvedAddress } from './maps.js';
9
10
  import * as LabelPrimitive from '@radix-ui/react-label';
10
11
  import { OTPInput } from 'input-otp';
11
12
  import * as PopoverPrimitive from '@radix-ui/react-popover';
13
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
12
14
  import { $NormalizeIntoArray } from './typescript/helpers.js';
13
15
  import { DefaultNamespace, FlatNamespace, InitOptions, InterpolationOptions, Resource, FormatFunction, ResourceKey, ResourceLanguage, TOptions, Namespace, TypeOptions } from './typescript/options.js';
14
16
  import { TFunction, SelectorKey, KeyPrefixSelector, KeyPrefix } from './typescript/t.js';
@@ -41,10 +43,10 @@ interface BreadcrumbItem {
41
43
  loading?: boolean;
42
44
  onClick?: () => void;
43
45
  }
44
- interface BreadcrumbProps extends React.HTMLAttributes<HTMLDivElement> {
46
+ interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
45
47
  items: BreadcrumbItem[];
46
48
  }
47
- declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>>;
49
+ declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
48
50
 
49
51
  declare const buttonVariants: (props?: ({
50
52
  hoverStyle?: "none" | "highlight" | "shine" | null | undefined;
@@ -176,8 +178,6 @@ declare const DialogFooter: {
176
178
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
177
179
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
178
180
 
179
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
180
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
181
181
  declare const useFormField: () => {
182
182
  invalid: boolean;
183
183
  isDirty: boolean;
@@ -190,6 +190,9 @@ declare const useFormField: () => {
190
190
  id: string;
191
191
  name: string;
192
192
  };
193
+
194
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
195
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
193
196
  declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
194
197
  declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement> & {
195
198
  children?: React.ReactNode;
@@ -197,68 +200,36 @@ declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
197
200
  declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
198
201
 
199
202
  interface InputFieldProps<T extends FieldValues = FieldValues> {
203
+ autoComplete?: string;
200
204
  clearLabel?: string;
201
205
  control: Control<T>;
202
206
  disabled?: boolean;
203
207
  hidePasswordLabel?: string;
204
208
  inputClassName?: string;
209
+ inputMode?: HTMLAttributes<HTMLInputElement>['inputMode'];
205
210
  isClearable?: boolean;
206
211
  label?: string;
207
212
  labelClassName?: string;
208
213
  mainClassName?: string;
214
+ maxLength?: number;
209
215
  name: Path<T>;
216
+ onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
210
217
  onClear?: () => void;
211
218
  placeholder?: string;
212
219
  showPasswordLabel?: string;
213
220
  type?: string;
214
221
  visualRequired?: boolean;
215
222
  }
216
- declare const InputField: <T extends FieldValues = FieldValues>({ clearLabel, control, disabled, hidePasswordLabel, inputClassName, isClearable, label, labelClassName, mainClassName, name, onClear, placeholder, showPasswordLabel, type, visualRequired }: InputFieldProps<T>) => React.JSX.Element;
223
+ declare const InputField: <T extends FieldValues = FieldValues>({ autoComplete, clearLabel, control, disabled, hidePasswordLabel, inputClassName, inputMode, isClearable, label, labelClassName, mainClassName, maxLength, name, onBlur, onClear, placeholder, showPasswordLabel, type, visualRequired }: InputFieldProps<T>) => React.JSX.Element;
217
224
 
218
225
  interface LabelFieldProps {
226
+ htmlFor?: string;
219
227
  label?: string;
220
228
  labelClassName?: string;
221
229
  name: string;
222
230
  visualRequired?: boolean;
223
231
  }
224
- declare const LabelField: ({ label, labelClassName, name, visualRequired }: LabelFieldProps) => React.JSX.Element;
225
-
226
- interface GoogleMapPickerProps {
227
- apiKey?: string;
228
- centerOn?: google.maps.LatLngLiteral;
229
- countryCode?: string;
230
- disabled?: boolean;
231
- hasError?: boolean;
232
- initialPosition?: google.maps.LatLngLiteral;
233
- locationQuery?: string;
234
- locationZoom?: number;
235
- mapId?: string;
236
- onAddressResolved?: (resolved: ResolvedAddress) => void;
237
- onChange: (address: string) => void;
238
- onError?: (error: unknown) => void;
239
- placeholder?: string;
240
- value: string;
241
- }
242
- interface ResolvedAddress {
243
- address: string;
244
- city: null | string;
245
- country: null | string;
246
- countryName: null | string;
247
- department: null | string;
248
- lat: null | number;
249
- lng: null | number;
250
- }
251
- declare const GoogleMapPicker: (props: GoogleMapPickerProps) => React.JSX.Element;
252
-
253
- type MapPickerFieldProps<T extends FieldValues> = Omit<GoogleMapPickerProps, 'hasError' | 'onChange' | 'value'> & {
254
- control: Control<T>;
255
- label?: string;
256
- labelClassName?: string;
257
- mainClassName?: string;
258
- name: Path<T>;
259
- visualRequired?: boolean;
260
- };
261
- declare const MapPickerField: <T extends FieldValues>({ control, label, labelClassName, mainClassName, name, visualRequired, ...pickerProps }: MapPickerFieldProps<T>) => React.JSX.Element;
232
+ declare const LabelField: ({ htmlFor, label, labelClassName, name, visualRequired }: LabelFieldProps) => React.JSX.Element;
262
233
 
263
234
  interface OtpInputFormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
264
235
  autoFocus?: boolean;
@@ -333,9 +304,14 @@ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimit
333
304
 
334
305
  interface SelectInputProps<Label extends string, Value extends string> {
335
306
  ableDeleteOption?: boolean;
307
+ 'aria-describedby'?: string;
308
+ 'aria-invalid'?: boolean;
309
+ 'aria-label'?: string;
310
+ 'aria-labelledby'?: string;
336
311
  className?: string;
337
312
  disabled?: boolean;
338
313
  error?: FieldError;
314
+ id?: string;
339
315
  items?: null | Record<Label | Value, number | string>[];
340
316
  labelKey?: string;
341
317
  leftIcon?: JSX.Element;
@@ -432,12 +408,17 @@ declare function Toast({ duration, id, onClose, subtitle, title, type }: ToastPr
432
408
  declare function ToastProvider(): React.JSX.Element;
433
409
 
434
410
  interface TooltipProps {
411
+ asChild?: boolean;
435
412
  children: React.ReactNode;
436
413
  childrenClassName?: string;
437
414
  className?: string;
438
415
  message: string;
439
416
  sideTooltip?: 'bottom' | 'left' | 'right' | 'top';
440
417
  }
418
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
419
+ declare const TooltipRoot: React.FC<TooltipPrimitive.TooltipProps>;
420
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
421
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
441
422
  declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
442
423
 
443
424
  interface WrapperProps {
@@ -979,6 +960,7 @@ declare function capitalize(value: null | string | undefined): string;
979
960
  declare function formatNumber(value: number, locale?: string): string;
980
961
  declare function formatPrice(value: number, locale?: string, currency?: string): string;
981
962
 
963
+ declare const focusRing: string;
982
964
  declare const inputBase: string;
983
965
  declare const inputPlaceholder: string;
984
966
  declare const inputDisabled: string;
@@ -999,4 +981,4 @@ declare function registerToastEmitter(fn: ToastEmitter): void;
999
981
 
1000
982
  declare function isSafeUrl(url: string): boolean;
1001
983
 
1002
- export { AddTile, type AddTileProps, Alert, AuthHeader, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Chip, type ChipProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormField, FormItem, FormMessage, GoogleMapPicker, type GoogleMapPickerProps, Input, InputField, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, LabelField, MapPickerField, OTPField, type Options, PasswordChecklist, type PasswordRule, type PasswordRulesConfig, Popover, PopoverContent, PopoverTrigger, type ResolvedAddress, SelectField, SelectInput, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, StepHeader, Stepper, type StepperStep, Switch, type SwitchProps, Textarea, type TextareaProps, Toast, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, Tooltip, Wrapper, type WrapperProps, buttonVariants, capitalize, chipVariants, cn, formatNumber, formatPrice, getTagEmoji, inputBase, inputCompact, inputDisabled, inputFocus, inputPlaceholder, isLightColor, isSafeUrl, registerToastEmitter, setUiLanguage, toast, uiI18n, useFormField };
984
+ export { AddTile, type AddTileProps, Alert, AuthHeader, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Chip, type ChipProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormField, FormItem, FormMessage, Input, InputField, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, LabelField, OTPField, type Options, PasswordChecklist, type PasswordRule, type PasswordRulesConfig, Popover, PopoverContent, PopoverTrigger, SelectField, SelectInput, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, StepHeader, Stepper, type StepperStep, Switch, type SwitchProps, Textarea, type TextareaProps, Toast, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, Wrapper, type WrapperProps, buttonVariants, capitalize, chipVariants, cn, focusRing, formatNumber, formatPrice, getTagEmoji, inputBase, inputCompact, inputDisabled, inputFocus, inputPlaceholder, isLightColor, isSafeUrl, registerToastEmitter, setUiLanguage, toast, uiI18n, useFormField };