@avenue-ticketing/ui 0.12.0-beta.1 → 0.12.0-beta.3
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/react/badge-groups.js +2 -2
- package/dist/react/badge-groups.js.map +1 -1
- package/dist/react/badge.js +49 -18
- package/dist/react/badge.js.map +1 -1
- package/dist/react/button.js +2 -2
- package/dist/react/button.js.map +1 -1
- package/dist/react/checkbox.js +10 -7
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/combobox.d.ts +3 -2
- package/dist/react/combobox.js +284 -32
- package/dist/react/combobox.js.map +1 -1
- package/dist/react/dropdown-account-breadcrumb.js +176 -14
- package/dist/react/dropdown-account-breadcrumb.js.map +1 -1
- package/dist/react/dropdown-account-button.js +190 -25
- package/dist/react/dropdown-account-button.js.map +1 -1
- package/dist/react/dropdown-account-card-md.js +189 -24
- package/dist/react/dropdown-account-card-md.js.map +1 -1
- package/dist/react/dropdown-account-card-sm.js +189 -24
- package/dist/react/dropdown-account-card-sm.js.map +1 -1
- package/dist/react/dropdown-account-card-xs.js +189 -24
- package/dist/react/dropdown-account-card-xs.js.map +1 -1
- package/dist/react/dropdown-avatar.js +190 -25
- package/dist/react/dropdown-avatar.js.map +1 -1
- package/dist/react/dropdown-button-advanced.js +190 -25
- package/dist/react/dropdown-button-advanced.js.map +1 -1
- package/dist/react/dropdown-button-link.js +189 -24
- package/dist/react/dropdown-button-link.js.map +1 -1
- package/dist/react/dropdown-button-simple.js +190 -25
- package/dist/react/dropdown-button-simple.js.map +1 -1
- package/dist/react/dropdown-icon-advanced.js +189 -24
- package/dist/react/dropdown-icon-advanced.js.map +1 -1
- package/dist/react/dropdown-icon-simple.js +189 -24
- package/dist/react/dropdown-icon-simple.js.map +1 -1
- package/dist/react/dropdown-integration.js +190 -25
- package/dist/react/dropdown-integration.js.map +1 -1
- package/dist/react/dropdown-search-advanced.js +191 -26
- package/dist/react/dropdown-search-advanced.js.map +1 -1
- package/dist/react/dropdown-search-simple.js +191 -26
- package/dist/react/dropdown-search-simple.js.map +1 -1
- package/dist/react/dropdown.d.ts +4 -1
- package/dist/react/dropdown.js +189 -24
- package/dist/react/dropdown.js.map +1 -1
- package/dist/react/input-date.js.map +1 -1
- package/dist/react/input-file.js +3 -3
- package/dist/react/input-file.js.map +1 -1
- package/dist/react/input-group.js.map +1 -1
- package/dist/react/input-number.js +2 -2
- package/dist/react/input-number.js.map +1 -1
- package/dist/react/input-payment.js +1 -1
- package/dist/react/input-payment.js.map +1 -1
- package/dist/react/input-tags-outer.js +9 -9
- package/dist/react/input-tags-outer.js.map +1 -1
- package/dist/react/input-tags.js +8 -8
- package/dist/react/input-tags.js.map +1 -1
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/multi-select.d.ts +3 -2
- package/dist/react/multi-select.js +230 -29
- package/dist/react/multi-select.js.map +1 -1
- package/dist/react/popover.d.ts +10 -1
- package/dist/react/popover.js +195 -18
- package/dist/react/popover.js.map +1 -1
- package/dist/react/radio-buttons.js +2 -1
- package/dist/react/radio-buttons.js.map +1 -1
- package/dist/react/select-item.d.ts +2 -1
- package/dist/react/select-item.js +11 -7
- package/dist/react/select-item.js.map +1 -1
- package/dist/react/select.d.ts +4 -3
- package/dist/react/select.js +298 -42
- package/dist/react/select.js.map +1 -1
- package/dist/react/switch.js +1 -1
- package/dist/react/switch.js.map +1 -1
- package/dist/react/tag-select.d.ts +5 -2
- package/dist/react/tag-select.js +215 -25
- package/dist/react/tag-select.js.map +1 -1
- package/dist/react/tags.js +8 -8
- package/dist/react/tags.js.map +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/select-mobile-sheet-CB2ptDTJ.d.ts +12 -0
- package/dist/{select-shared-B3Y5SMXU.d.ts → select-shared-oJEeJxeB.d.ts} +6 -0
- package/package.json +1 -1
- package/theme.css +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../utils/cx.ts","../../../../components/base/input/hint-text.tsx","../../../../components/base/tooltip/tooltip.tsx","../../../../components/base/input/label.tsx","../../../../components/base/select/popover.tsx","../../../../components/base/select/select-shared.tsx","../../../../hooks/use-resize-observer.ts","../../../../components/base/input/input.tsx","../../../../utils/is-react-component.ts","../../../../components/base/select/combobox.tsx"],"names":["AriaText","AriaTooltipTrigger","jsx","AriaTooltip","AriaOverlayArrow","AriaButton","jsxs","AriaLabel","HelpCircle","AriaPopover","createContext","useContext","AriaGroup","SearchLg","AriaInput","useState","AriaComboBox","AriaListBox"],"mappings":";;;;;;;;;;AAEA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAChC,MAAA,EAAQ;AAAA,IACJ,KAAA,EAAO;AAAA,MACH,MAAM,CAAC,YAAA,EAAc,cAAc,YAAA,EAAc,YAAA,EAAc,cAAc,aAAa;AAAA;AAC9F;AAER,CAAC,CAAA;AAMM,IAAM,EAAA,GAAK,OAAA;ACCX,IAAM,QAAA,GAAW,CAAC,EAAE,SAAA,EAAW,WAAW,IAAA,GAAO,IAAA,EAAM,GAAG,KAAA,EAAM,KAAqB;AACxF,EAAA,uBACI,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACI,GAAG,KAAA;AAAA,MACJ,IAAA,EAAM,YAAY,cAAA,GAAiB,aAAA;AAAA,MACnC,SAAA,EAAW,EAAA;AAAA,QACP,uBAAA;AAAA;AAAA,QAGA,SAAS,IAAA,IAAQ,SAAA;AAAA,QACjB,iCAAA;AAAA;AAAA,QAGA,SAAA,IAAa,oBAAA;AAAA,QACb,kCAAA;AAAA,QAEA;AAAA;AACJ;AAAA,GACJ;AAER,CAAA;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;ACDhB,IAAM,UAAU,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,KAAA,GAAQ,GAAA;AAAA,EACR,UAAA,GAAa,CAAA;AAAA,EACb,OAA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AAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACG,GAAA,EAAK,cAAA;AAAA,QACL,WAAA;AAAA,QACA,QAAA;AAAA,QACA,iBAAA;AAAA,QACA,IAAA;AAAA,QACA,IAAA;AAAA,QACA,WAAW,KAAA,CAAM,SAAA;AAAA,QAGjB,OAAA,EAAS,QAAA;AAAA,QACT,cAAA,EAAgB;AAAA;AAAA,KACpB;AAAA,oBAEAA,IAAC,OAAA,EAAA,EAAQ,IAAA,EAAY,YAAY,cAAA,EAAgB,KAAA,EAAO,EAAE,KAAA,EAAO,YAAA,IAAgB,SAAA,EAAW,UAAA,CAAW,kBACnG,QAAA,kBAAAA,GAAAA,CAACe,WAAY,KAAA,EAAc,SAAA,EAAU,0BAAA,EAChC,QAAA,EACL,CAAA,EACJ,CAAA;AAAA,IAEC,UAAA,CAAW,IAAA,oBACRf,GAAAA,CAAC,YAAS,SAAA,EAAW,KAAA,CAAM,SAAA,EAAW,SAAA,EAAW,GAAG,IAAA,KAAS,IAAA,IAAQ,SAAS,CAAA,EACzE,qBAAW,IAAA,EAChB;AAAA,GAAA,EAER,GAER,CAAA,EACJ,CAAA;AAER","file":"combobox.js","sourcesContent":["import { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n text: [\"display-xs\", \"display-sm\", \"display-md\", \"display-lg\", \"display-xl\", \"display-2xl\"],\n },\n },\n});\n\n/**\n * This function is a wrapper around the twMerge function.\n * It is used to merge the classes inside style objects.\n */\nexport const cx = twMerge;\n\n/**\n * This function does nothing besides helping us to be able to\n * sort the classes inside style objects which is not supported\n * by the Tailwind IntelliSense by default.\n */\nexport function sortCx<T extends Record<string, string | number | Record<string, string | number | Record<string, string | number>>>>(classes: T): T {\n return classes;\n}\n","\"use client\";\n\nimport type { ReactNode, Ref } from \"react\";\nimport type { TextProps as AriaTextProps } from \"react-aria-components\";\nimport { Text as AriaText } from \"react-aria-components\";\nimport { cx } from \"@/utils/cx\";\n\ninterface HintTextProps extends AriaTextProps {\n /** Indicates that the hint text is an error message. */\n isInvalid?: boolean;\n ref?: Ref<HTMLElement>;\n size?: \"sm\" | \"md\";\n children: ReactNode;\n}\n\nexport const HintText = ({ isInvalid, className, size = \"md\", ...props }: HintTextProps) => {\n return (\n <AriaText\n {...props}\n slot={isInvalid ? \"errorMessage\" : \"description\"}\n className={cx(\n \"text-sm text-tertiary\",\n\n // Size\n size === \"sm\" && \"text-xs\",\n \"in-data-[input-size=sm]:text-xs\",\n\n // Invalid state\n isInvalid && \"text-error-primary\",\n \"group-invalid:text-error-primary\",\n\n className,\n )}\n />\n );\n};\n\nHintText.displayName = \"HintText\";\n","\"use client\";\n\n/** Figma: Tooltip (1052:485) */\n\nimport type { ReactNode } from \"react\";\nimport type {\n ButtonProps as AriaButtonProps,\n TooltipProps as AriaTooltipProps,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n} from \"react-aria-components\";\nimport { Button as AriaButton, OverlayArrow as AriaOverlayArrow, Tooltip as AriaTooltip, TooltipTrigger as AriaTooltipTrigger } from \"react-aria-components\";\nimport { cx } from \"@/utils/cx\";\n\ninterface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, \"children\"> {\n /**\n * The title of the tooltip.\n */\n title: ReactNode;\n /**\n * The description of the tooltip.\n */\n description?: ReactNode;\n /**\n * Whether to show the arrow on the tooltip.\n *\n * @default false\n */\n arrow?: boolean;\n /**\n * Delay in milliseconds before the tooltip is shown on first hover.\n *\n * @default 100\n */\n delay?: number;\n}\n\nexport const Tooltip = ({\n title,\n description,\n children,\n arrow = false,\n delay = 100,\n closeDelay = 0,\n trigger,\n isDisabled,\n isOpen,\n defaultOpen,\n offset = 6,\n crossOffset,\n placement = \"top\",\n onOpenChange,\n ...tooltipProps\n}: TooltipProps) => {\n const isTopOrBottomLeft = [\"top left\", \"top end\", \"bottom left\", \"bottom end\"].includes(placement);\n const isTopOrBottomRight = [\"top right\", \"top start\", \"bottom right\", \"bottom start\"].includes(placement);\n // Set negative cross offset for left and right placement to visually balance the tooltip.\n const calculatedCrossOffset = isTopOrBottomLeft ? -12 : isTopOrBottomRight ? 12 : 0;\n\n return (\n <AriaTooltipTrigger {...{ trigger, delay, closeDelay, isDisabled, isOpen, defaultOpen, onOpenChange }}>\n {children}\n\n <AriaTooltip\n {...tooltipProps}\n offset={offset}\n placement={placement}\n crossOffset={crossOffset ?? calculatedCrossOffset}\n className={({ isEntering, isExiting }) => cx(isEntering && \"ease-out animate-in\", isExiting && \"ease-in animate-out\")}\n >\n {({ isEntering, isExiting }) => (\n <div\n className={cx(\n \"z-50 flex max-w-xs origin-(--trigger-anchor-point) flex-col items-start gap-1 rounded-lg bg-primary-solid px-3 shadow-lg will-change-transform\",\n description ? \"py-3\" : \"py-2\",\n\n isEntering &&\n \"ease-out animate-in fade-in zoom-in-95 in-placement-left:slide-in-from-right-0.5 in-placement-right:slide-in-from-left-0.5 in-placement-top:slide-in-from-bottom-0.5 in-placement-bottom:slide-in-from-top-0.5\",\n isExiting &&\n \"ease-in animate-out fade-out zoom-out-95 in-placement-left:slide-out-to-right-0.5 in-placement-right:slide-out-to-left-0.5 in-placement-top:slide-out-to-bottom-0.5 in-placement-bottom:slide-out-to-top-0.5\",\n )}\n >\n <span className=\"text-xs font-semibold text-white\">{title}</span>\n\n {description && <span className=\"text-xs font-medium text-tooltip-supporting-text\">{description}</span>}\n\n {arrow && (\n <AriaOverlayArrow>\n <svg\n viewBox=\"0 0 100 100\"\n className=\"size-2.5 fill-bg-primary-solid in-placement-left:-rotate-90 in-placement-right:rotate-90 in-placement-top:rotate-0 in-placement-bottom:rotate-180\"\n >\n <path d=\"M0,0 L35.858,35.858 Q50,50 64.142,35.858 L100,0 Z\" />\n </svg>\n </AriaOverlayArrow>\n )}\n </div>\n )}\n </AriaTooltip>\n </AriaTooltipTrigger>\n );\n};\n\ninterface TooltipTriggerProps extends AriaButtonProps {}\n\nexport const TooltipTrigger = ({ children, className, ...buttonProps }: TooltipTriggerProps) => {\n return (\n <AriaButton {...buttonProps} className={(values) => cx(\"h-max w-max outline-hidden\", typeof className === \"function\" ? className(values) : className)}>\n {children}\n </AriaButton>\n );\n};\n","\"use client\";\n\nimport type { ReactNode, Ref } from \"react\";\nimport { QuestionIcon as HelpCircle } from \"@phosphor-icons/react/dist/csr/Question\";\nimport type { LabelProps as AriaLabelProps } from \"react-aria-components\";\nimport { Label as AriaLabel } from \"react-aria-components\";\nimport { Tooltip, TooltipTrigger } from \"@/components/base/tooltip/tooltip\";\nimport { cx } from \"@/utils/cx\";\n\ninterface LabelProps extends AriaLabelProps {\n children: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n tooltip?: string;\n tooltipDescription?: string;\n ref?: Ref<HTMLLabelElement>;\n}\n\nexport const Label = ({ isInvalid, isRequired, tooltip, tooltipDescription, className, ...props }: LabelProps) => {\n return (\n <AriaLabel\n // Used for conditionally hiding/showing the label element via CSS:\n // <Input label=\"Visible only on mobile\" className=\"lg:**:data-label:hidden\" />\n // or\n // <Input label=\"Visible only on mobile\" className=\"lg:label:hidden\" />\n data-label=\"true\"\n {...props}\n className={cx(\"flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary\", className)}\n >\n {props.children}\n\n <span\n className={cx(\n \"hidden text-brand-tertiary\",\n isRequired && \"block\",\n typeof isRequired === \"undefined\" && \"group-required:block\",\n\n isInvalid && \"text-error-primary\",\n typeof isInvalid === \"undefined\" && \"group-invalid:text-error-primary\",\n )}\n >\n *\n </span>\n\n {tooltip && (\n <Tooltip title={tooltip} description={tooltipDescription} placement=\"top\">\n <TooltipTrigger\n // `TooltipTrigger` inherits the disabled state from the parent form field\n // but we don't that. We want the tooltip be enabled even if the parent\n // field is disabled.\n isDisabled={false}\n className=\"cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\"\n >\n <HelpCircle className=\"size-4\" />\n </TooltipTrigger>\n </Tooltip>\n )}\n </AriaLabel>\n );\n};\n\nLabel.displayName = \"Label\";\n","\"use client\";\n\n/** Figma: Select menu popover (11132:11643) — floating menu border + shadow. */\n\nimport type { RefAttributes } from \"react\";\nimport type { PopoverProps as AriaPopoverProps } from \"react-aria-components\";\nimport { Popover as AriaPopover } from \"react-aria-components\";\nimport { cx } from \"@/utils/cx\";\n\ninterface PopoverProps extends AriaPopoverProps, RefAttributes<HTMLElement> {\n size: \"sm\" | \"md\" | \"lg\";\n}\n\nexport const Popover = (props: PopoverProps) => {\n return (\n <AriaPopover\n placement=\"bottom\"\n containerPadding={0}\n offset={4}\n {...props}\n className={(state) =>\n cx(\n \"w-(--trigger-width) origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg bg-primary py-1 shadow-lg ring-1 ring-secondary_alt outline-hidden will-change-transform\",\n\n state.isEntering &&\n \"duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5\",\n state.isExiting &&\n \"duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5\",\n\n props.size === \"sm\" && \"max-h-56!\",\n props.size === \"md\" && \"max-h-64!\",\n props.size === \"lg\" && \"max-h-80!\",\n\n typeof props.className === \"function\" ? props.className(state) : props.className,\n )\n }\n />\n );\n};\n","\"use client\";\n\nimport type { FC, ReactNode } from \"react\";\nimport { createContext } from \"react\";\n\nexport type SelectItemType = {\n /** Unique identifier for the item. */\n id: string | number;\n /** The primary display text. */\n label?: string;\n /** Avatar image URL. */\n avatarUrl?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /** Secondary text displayed alongside the label. */\n supportingText?: string;\n /** Leading icon component or element. */\n icon?: FC | ReactNode;\n};\n\nexport interface CommonProps {\n /** Helper text displayed below the input. */\n hint?: string;\n /** Field label displayed above the input. */\n label?: string;\n /** Tooltip text for the help icon next to the label. */\n tooltip?: string;\n /**\n * The size of the component.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Placeholder text when no value is selected. */\n placeholder?: string;\n /** Whether to hide the required indicator from the label. */\n hideRequiredIndicator?: boolean;\n}\n\nexport const sizes = {\n sm: {\n root: \"py-2 pl-3 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]\",\n withIcon: \"\",\n text: \"text-sm\",\n textContainer: \"gap-x-1.5\",\n shortcut: \"pr-2.5\",\n },\n md: { root: \"py-2 px-3 gap-2 *:data-icon:size-5\", withIcon: \"\", text: \"text-md\", textContainer: \"gap-x-1.5\", shortcut: \"pr-2.5\" },\n lg: { root: \"py-2.5 px-3.5 gap-2 *:data-icon:size-5\", withIcon: \"\", text: \"text-md\", textContainer: \"gap-x-1.5\", shortcut: \"pr-3\" },\n};\n\nexport const SelectContext = createContext<{ size: \"sm\" | \"md\" | \"lg\" }>({ size: \"md\" });\n","import { useEffect } from \"react\";\nimport type { RefObject } from \"@react-types/shared\";\n\n/**\n * Checks if the ResizeObserver API is supported.\n * @returns True if the ResizeObserver API is supported, false otherwise.\n */\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== \"undefined\";\n}\n\n/**\n * The options for the useResizeObserver hook.\n */\ntype useResizeObserverOptionsType<T> = {\n /**\n * The ref to the element to observe.\n */\n ref: RefObject<T | undefined | null> | undefined;\n /**\n * The box to observe.\n */\n box?: ResizeObserverBoxOptions;\n /**\n * The callback function to call when the size changes.\n */\n onResize: () => void;\n};\n\n/**\n * A hook that observes the size of an element and calls a callback function when the size changes.\n * @param options - The options for the hook.\n */\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>) {\n const { ref, box, onResize } = options;\n\n useEffect(() => {\n const element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener(\"resize\", onResize, false);\n\n return () => {\n window.removeEventListener(\"resize\", onResize, false);\n };\n } else {\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n\n resizeObserverInstance.observe(element, { box });\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n }, [onResize, ref, box]);\n}\n","\"use client\";\n\nimport { type ComponentType, type HTMLAttributes, type ReactNode, type Ref, createContext, useContext, useState } from \"react\";\nimport { EyeIcon as Eye } from \"@phosphor-icons/react/dist/csr/Eye\";\nimport { EyeSlashIcon as EyeOff } from \"@phosphor-icons/react/dist/csr/EyeSlash\";\nimport { QuestionIcon as HelpCircle } from \"@phosphor-icons/react/dist/csr/Question\";\nimport { InfoIcon as InfoCircle } from \"@phosphor-icons/react/dist/csr/Info\";\nimport type { InputProps as AriaInputProps, TextFieldProps as AriaTextFieldProps } from \"react-aria-components\";\nimport { Button as AriaButton, Group as AriaGroup, Input as AriaInput, TextField as AriaTextField } from \"react-aria-components\";\nimport { HintText } from \"@/components/base/input/hint-text\";\nimport { Label } from \"@/components/base/input/label\";\nimport { Tooltip, TooltipTrigger } from \"@/components/base/tooltip/tooltip\";\nimport { cx, sortCx } from \"@/utils/cx\";\n\n/**\n * Figma: Inputs (85:1269)\n *\n * Default: border (1px) border-primary + shadow-xs.\n * Focus: 1px border-brand + inset ring-brand (2px visual, no layout shift from border-2).\n * Error default: border-error_subtle; error focus: border-error + inset ring-error.\n */\nexport const inputFocusRingShadow = \"border-brand ring-1 ring-inset ring-brand\";\nexport const inputErrorFocusRingShadow = \"border-error ring-1 ring-inset ring-error\";\n/** Shell focus overlay — border + inset ring on one ::after above children (no host border-brand; avoids double-ring gap). */\nexport const inputFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-brand after:ring-1 after:ring-inset after:ring-brand after:content-['']\";\nexport const inputErrorFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-error after:ring-1 after:ring-inset after:ring-error after:content-['']\";\nexport const inputErrorFocusRingGroupInvalidShellOverlay =\n \"group-invalid:focus-within:after:pointer-events-none group-invalid:focus-within:after:absolute group-invalid:focus-within:after:-inset-px group-invalid:focus-within:after:z-10 group-invalid:focus-within:after:rounded-lg group-invalid:focus-within:after:border group-invalid:focus-within:after:border-solid group-invalid:focus-within:after:border-error group-invalid:focus-within:after:ring-1 group-invalid:focus-within:after:ring-inset group-invalid:focus-within:after:ring-error group-invalid:focus-within:after:content-['']\";\nexport const inputFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\";\nexport const inputErrorFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-error focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-error\";\n\nexport interface InputBaseProps extends Omit<AriaInputProps, \"size\"> {\n /** Tooltip message on hover. */\n tooltip?: string;\n /** Whether the input is invalid. */\n isInvalid?: boolean;\n /** Whether the input is disabled. */\n isDisabled?: boolean;\n /** Whether the input is required. */\n isRequired?: boolean;\n /**\n * Input size.\n * @default \"sm\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Placeholder text. */\n placeholder?: string;\n /** Class name for the icon. */\n iconClassName?: string;\n /** Class name for the input. */\n inputClassName?: string;\n /** Class name for the input wrapper. */\n wrapperClassName?: string;\n /** Class name for the tooltip. */\n tooltipClassName?: string;\n /** Keyboard shortcut to display. */\n shortcut?: string | boolean;\n ref?: Ref<HTMLInputElement>;\n groupRef?: Ref<HTMLDivElement>;\n /** Icon component to display on the left side of the input. */\n icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;\n}\n\nexport const InputBase = ({\n ref,\n tooltip,\n shortcut,\n groupRef,\n size = \"md\",\n isInvalid,\n isDisabled,\n isRequired,\n icon: Icon,\n placeholder,\n wrapperClassName,\n tooltipClassName,\n inputClassName,\n iconClassName,\n type = \"text\",\n ...inputProps\n}: InputBaseProps) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n // Check if the input has a leading icon or tooltip\n const hasTrailingIcon = tooltip || isInvalid;\n const hasLeadingIcon = Icon;\n\n // If the input is inside a `TextFieldContext`, use its context to simplify applying styles\n const context = useContext(TextFieldContext);\n\n const inputSize = context?.size || size;\n\n const sizes = sortCx({\n sm: {\n root: cx(\"px-3 py-2 text-sm\", hasLeadingIcon && \"pl-9\", hasTrailingIcon && \"pr-9\"),\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-1.5\",\n },\n md: {\n root: cx(\"px-3 py-2 text-md\", hasLeadingIcon && \"pl-10\", hasTrailingIcon && \"pr-9\"),\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2\",\n },\n lg: {\n root: cx(\"px-3.5 py-2.5 text-md\", hasLeadingIcon && \"pl-10.5\", hasTrailingIcon && \"pr-9.5\"),\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n shortcut: \"pr-2.5\",\n },\n });\n\n return (\n <AriaGroup\n {...{ isDisabled, isInvalid }}\n ref={groupRef}\n className={({ isFocusWithin, isDisabled, isInvalid }) =>\n cx(\n \"group/input relative flex w-full flex-row place-content-center place-items-center rounded-lg border border-solid border-primary bg-primary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear\",\n\n isFocusWithin && !isDisabled && !isInvalid && inputFocusRingShadow,\n\n // Disabled state styles\n isDisabled && \"cursor-not-allowed opacity-50\",\n \"group-disabled:cursor-not-allowed group-disabled:opacity-50\",\n\n // Invalid state styles\n isInvalid && !isFocusWithin && \"border-error_subtle\",\n \"group-invalid:border-error_subtle\",\n \"group-invalid:focus-within:border-error group-invalid:focus-within:ring-1 group-invalid:focus-within:ring-inset group-invalid:focus-within:ring-error\",\n\n // Invalid + focus — darker error stroke (not brand)\n isInvalid && isFocusWithin && inputErrorFocusRingShadow,\n\n context?.wrapperClassName,\n wrapperClassName,\n )\n }\n >\n {/* Leading icon and Payment icon */}\n {Icon && (\n <Icon className={cx(\"pointer-events-none absolute text-fg-quaternary\", sizes[inputSize].iconLeading, context?.iconClassName, iconClassName)} />\n )}\n\n {/* Input field */}\n <AriaInput\n {...(inputProps as AriaInputProps)}\n ref={ref}\n required={isRequired}\n type={type === \"password\" && isPasswordVisible ? \"text\" : type}\n placeholder={placeholder}\n className={cx(\n \"m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed\",\n sizes[inputSize].root,\n context?.inputClassName,\n inputClassName,\n )}\n />\n\n {/* Tooltip and help icon */}\n {tooltip && type !== \"password\" && (\n <Tooltip title={tooltip} placement=\"top\">\n <TooltipTrigger\n className={cx(\n \"absolute cursor-pointer text-fg-quaternary transition duration-100 ease-linear group-invalid/input:hidden hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n sizes[inputSize].iconTrailing,\n context?.tooltipClassName,\n tooltipClassName,\n )}\n >\n <HelpCircle className=\"size-4 stroke-[2.25px]\" />\n </TooltipTrigger>\n </Tooltip>\n )}\n\n {/* Invalid icon */}\n {type !== \"password\" && (\n <InfoCircle\n className={cx(\n \"pointer-events-none absolute hidden size-4 stroke-[2.25px] text-fg-error-secondary group-invalid/input:block\",\n sizes[inputSize].iconTrailing,\n context?.tooltipClassName,\n tooltipClassName,\n )}\n />\n )}\n\n {/* Password visibility toggle */}\n {type === \"password\" && (\n <AriaButton\n aria-label=\"Toggle password visibility\"\n onClick={() => setIsPasswordVisible(!isPasswordVisible)}\n className={cx(\n \"absolute flex cursor-pointer items-center justify-center text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover focus:outline-hidden\",\n sizes[inputSize].iconTrailing,\n )}\n >\n {isPasswordVisible ? <EyeOff className=\"size-4 stroke-[2.25px]\" /> : <Eye className=\"size-4 stroke-[2.25px]\" />}\n </AriaButton>\n )}\n\n {/* Shortcut */}\n {shortcut && (\n <div\n className={cx(\n \"pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n sizes[inputSize].shortcut,\n )}\n >\n <span\n aria-hidden=\"true\"\n className=\"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\"\n >\n {typeof shortcut === \"string\" ? shortcut : \"⌘K\"}\n </span>\n </div>\n )}\n </AriaGroup>\n );\n};\n\nInputBase.displayName = \"InputBase\";\n\ninterface TextFieldContextProps extends Partial<Pick<InputBaseProps, \"size\" | \"wrapperClassName\" | \"inputClassName\" | \"iconClassName\" | \"tooltipClassName\">> {}\n\nconst TextFieldContext = createContext<TextFieldContextProps>({});\n\nexport interface TextFieldProps extends AriaTextFieldProps, TextFieldContextProps {}\n\nexport const TextField = ({ className, size = \"md\", inputClassName, wrapperClassName, iconClassName, tooltipClassName, ...props }: TextFieldProps) => {\n return (\n <TextFieldContext.Provider value={{ inputClassName, wrapperClassName, iconClassName, tooltipClassName, size }}>\n <AriaTextField\n {...props}\n data-input-wrapper\n data-input-size={size}\n className={(state) =>\n cx(\"group flex h-max w-full flex-col items-start justify-start gap-1.5\", typeof className === \"function\" ? className(state) : className)\n }\n />\n </TextFieldContext.Provider>\n );\n};\n\nTextField.displayName = \"TextField\";\n\nexport interface InputProps\n extends\n AriaTextFieldProps,\n Pick<\n InputBaseProps,\n | \"ref\"\n | \"placeholder\"\n | \"icon\"\n | \"shortcut\"\n | \"tooltip\"\n | \"groupRef\"\n | \"size\"\n | \"wrapperClassName\"\n | \"inputClassName\"\n | \"iconClassName\"\n | \"tooltipClassName\"\n > {\n /** Label text for the input */\n label?: string;\n /** Helper text displayed below the input */\n hint?: ReactNode;\n /** Whether to hide required indicator from label */\n hideRequiredIndicator?: boolean;\n}\n\nexport const Input = ({\n size = \"md\",\n placeholder,\n icon: Icon,\n label,\n hint,\n shortcut,\n hideRequiredIndicator,\n className,\n ref,\n groupRef,\n tooltip,\n iconClassName,\n inputClassName,\n wrapperClassName,\n tooltipClassName,\n type = \"text\",\n ...props\n}: InputProps) => {\n return (\n <TextField aria-label={!label ? placeholder : undefined} {...props} size={size} className={className}>\n {({ isRequired, isInvalid }) => (\n <>\n {label && (\n <Label isRequired={hideRequiredIndicator ? !hideRequiredIndicator : isRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n\n <InputBase\n {...{\n ref,\n groupRef,\n size,\n placeholder,\n icon: Icon,\n shortcut,\n iconClassName,\n inputClassName,\n wrapperClassName,\n tooltipClassName,\n tooltip,\n type,\n isInvalid,\n }}\n />\n\n {hint && <HintText isInvalid={isInvalid}>{hint}</HintText>}\n </>\n )}\n </TextField>\n );\n};\n\nInput.displayName = \"Input\";\n","/* We cannot use type `unknown` instead of `any` here because it will break the type assertion `isReactComponent` function is providing. */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from \"react\";\n\ntype ReactComponent = React.FC<any> | React.ComponentClass<any, any>;\n\n/**\n * Checks if a given value is a function component.\n */\nexport const isFunctionComponent = (component: any): component is React.FC<any> => {\n return typeof component === \"function\";\n};\n\n/**\n * Checks if a given value is a class component.\n */\nexport const isClassComponent = (component: any): component is React.ComponentClass<any, any> => {\n return typeof component === \"function\" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);\n};\n\n/**\n * Checks if a given value is a forward ref component.\n */\nexport const isForwardRefComponent = (component: any): component is React.ForwardRefExoticComponent<any> => {\n return typeof component === \"object\" && component !== null && component.$$typeof.toString() === \"Symbol(react.forward_ref)\";\n};\n\n/**\n * Checks if a given value is a valid React component.\n */\nexport const isReactComponent = (component: any): component is ReactComponent => {\n return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);\n};\n","\"use client\";\n\n/** Figma: Select / ComboBox (11132:11643) */\n\nimport type { FC, FocusEventHandler, PointerEventHandler, ReactNode, Ref, RefAttributes } from \"react\";\nimport { isValidElement, useCallback, useContext, useRef, useState } from \"react\";\nimport { MagnifyingGlassIcon as SearchLg } from \"@phosphor-icons/react/dist/csr/MagnifyingGlass\";\nimport type { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps } from \"react-aria-components\";\nimport { ComboBox as AriaComboBox, Group as AriaGroup, Input as AriaInput, ListBox as AriaListBox, ComboBoxStateContext } from \"react-aria-components\";\nimport { HintText } from \"@/components/base/input/hint-text\";\nimport { Label } from \"@/components/base/input/label\";\nimport { Popover } from \"@/components/base/select/popover\";\nimport { type CommonProps, SelectContext, type SelectItemType, sizes } from \"@/components/base/select/select-shared\";\nimport { useResizeObserver } from \"@/hooks/use-resize-observer\";\nimport { cx } from \"@/utils/cx\";\nimport { inputErrorFocusRingShadow, inputFocusRingShadow } from \"@/components/base/input/input\";\nimport { isReactComponent } from \"@/utils/is-react-component\";\n\ninterface ComboBoxProps extends Omit<AriaComboBoxProps<SelectItemType>, \"children\" | \"items\">, RefAttributes<HTMLDivElement>, CommonProps {\n shortcut?: boolean;\n items?: SelectItemType[];\n popoverClassName?: string;\n shortcutClassName?: string;\n /** Leading icon component displayed before the input. */\n icon?: FC | ReactNode;\n children: AriaListBoxProps<SelectItemType>[\"children\"];\n}\n\ninterface ComboBoxValueProps extends AriaGroupProps {\n size: \"sm\" | \"md\" | \"lg\";\n shortcut: boolean;\n placeholder?: string;\n shortcutClassName?: string;\n icon?: FC | ReactNode;\n isInvalid?: boolean;\n onFocus?: FocusEventHandler;\n onPointerEnter?: PointerEventHandler;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst ComboBoxValue = ({ size, shortcut, placeholder, shortcutClassName, icon: IconProp, isInvalid, ref, ...otherProps }: ComboBoxValueProps) => {\n const state = useContext(ComboBoxStateContext);\n\n const value = state?.selectedItem?.value || null;\n const inputValue = state?.inputValue || null;\n\n const first = inputValue?.split(value?.supportingText)?.[0] || \"\";\n const last = inputValue?.split(first)[1];\n\n return (\n <AriaGroup\n ref={ref}\n {...otherProps}\n isInvalid={isInvalid}\n className={({ isFocusWithin, isDisabled, isInvalid: isGroupInvalid }) =>\n cx(\n \"relative flex w-full items-center gap-2 rounded-lg border border-solid border-primary bg-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear\",\n isDisabled && \"cursor-not-allowed opacity-50\",\n !isGroupInvalid && isFocusWithin && inputFocusRingShadow,\n isGroupInvalid && !isFocusWithin && \"border-error_subtle\",\n isGroupInvalid && isFocusWithin && inputErrorFocusRingShadow,\n\n // Icon styles\n \"*:data-icon:shrink-0 *:data-icon:text-fg-quaternary\",\n\n sizes[size].root,\n )\n }\n >\n {isReactComponent(IconProp) ? (\n <IconProp data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n ) : isValidElement(IconProp) ? (\n IconProp\n ) : (\n <SearchLg data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n )}\n\n <div className=\"relative flex w-full items-center\">\n {inputValue && (\n <span className={cx(\"absolute top-1/2 z-0 inline-flex w-full -translate-y-1/2 truncate\", sizes[size].textContainer)} aria-hidden=\"true\">\n <p className={cx(\"font-medium text-primary\", sizes[size].text)}>{first}</p>\n {last && <p className={cx(\"-ml-0.75 text-tertiary\", sizes[size].text)}>{last}</p>}\n </span>\n )}\n\n <AriaInput\n placeholder={placeholder}\n className={cx(\n \"z-10 w-full appearance-none bg-transparent text-transparent caret-alpha-black/90 placeholder:text-placeholder focus:outline-hidden disabled:cursor-not-allowed\",\n sizes[size].text,\n )}\n />\n </div>\n\n {shortcut && (\n <div\n className={cx(\n \"absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n sizes[size].shortcut,\n shortcutClassName,\n )}\n >\n <span\n className=\"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\"\n aria-hidden=\"true\"\n >\n ⌘K\n </span>\n </div>\n )}\n </AriaGroup>\n );\n};\n\nexport const ComboBox = ({\n placeholder = \"Search\",\n shortcut = true,\n size = \"md\",\n children,\n items,\n shortcutClassName,\n icon,\n hideRequiredIndicator,\n ...otherProps\n}: ComboBoxProps) => {\n const placeholderRef = useRef<HTMLDivElement>(null);\n const [popoverWidth, setPopoverWidth] = useState(\"\");\n\n // Resize observer for popover width\n const onResize = useCallback(() => {\n if (!placeholderRef.current) return;\n\n const divRect = placeholderRef.current?.getBoundingClientRect();\n\n setPopoverWidth(divRect.width + \"px\");\n }, [placeholderRef, setPopoverWidth]);\n\n useResizeObserver({\n ref: placeholderRef,\n box: \"border-box\",\n onResize,\n });\n\n return (\n <SelectContext.Provider value={{ size }}>\n <AriaComboBox menuTrigger=\"focus\" {...otherProps}>\n {(state) => (\n <div className=\"flex flex-col gap-1.5\">\n {otherProps.label && (\n <Label isRequired={hideRequiredIndicator ? false : state.isRequired} tooltip={otherProps.tooltip}>\n {otherProps.label}\n </Label>\n )}\n\n <ComboBoxValue\n ref={placeholderRef}\n placeholder={placeholder}\n shortcut={shortcut}\n shortcutClassName={shortcutClassName}\n icon={icon}\n size={size}\n isInvalid={state.isInvalid}\n // This is a workaround to correctly calculating the trigger width\n // while using ResizeObserver wasn't 100% reliable.\n onFocus={onResize}\n onPointerEnter={onResize}\n />\n\n <Popover size={size} triggerRef={placeholderRef} style={{ width: popoverWidth }} className={otherProps.popoverClassName}>\n <AriaListBox items={items} className=\"size-full outline-hidden\">\n {children}\n </AriaListBox>\n </Popover>\n\n {otherProps.hint && (\n <HintText isInvalid={state.isInvalid} className={cx(size === \"sm\" && \"text-xs\")}>\n {otherProps.hint}\n </HintText>\n )}\n </div>\n )}\n </AriaComboBox>\n </SelectContext.Provider>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../utils/cx.ts","../../../../components/base/input/hint-text.tsx","../../../../components/base/tooltip/tooltip.tsx","../../../../components/base/input/label.tsx","../../../../hooks/use-is-mobile.ts","../../../../components/base/select/select-mobile-sheet.ts","../../../../components/base/select/popover.tsx","../../../../components/base/select/select-shared.tsx","../../../../hooks/use-resize-observer.ts","../../../../components/base/input/input.tsx","../../../../utils/is-react-component.ts","../../../../components/base/select/combobox.tsx"],"names":["AriaText","AriaTooltipTrigger","jsx","AriaTooltip","AriaOverlayArrow","AriaButton","jsxs","AriaLabel","HelpCircle","useState","useEffect","X","AriaPopover","createContext","useContext","SearchLg","AriaInput","AriaGroup","useMemo","AriaComboBox","AriaListBox"],"mappings":";;;;;;;;;;;;AAEA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAChC,MAAA,EAAQ;AAAA,IACJ,KAAA,EAAO;AAAA,MACH,MAAM,CAAC,YAAA,EAAc,cAAc,YAAA,EAAc,YAAA,EAAc,cAAc,aAAa;AAAA;AAC9F;AAER,CAAC,CAAA;AAMM,IAAM,EAAA,GAAK,OAAA;ACCX,IAAM,QAAA,GAAW,CAAC,EAAE,SAAA,EAAW,WAAW,IAAA,GAAO,IAAA,EAAM,GAAG,KAAA,EAAM,KAAqB;AACxF,EAAA,uBACI,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACI,GAAG,KAAA;AAAA,MACJ,IAAA,EAAM,YAAY,cAAA,GAAiB,aAAA;AAAA,MACnC,SAAA,EAAW,EAAA;AAAA,QACP,uBAAA;AAAA;AAAA,QAGA,SAAS,IAAA,IAAQ,SAAA;AAAA,QACjB,iCAAA;AAAA;AAAA,QAGA,SAAA,IAAa,oBAAA;AAAA,QACb,kCAAA;AAAA,QAEA;AAAA;AACJ;AAAA,GACJ;AAER,CAAA;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;ACDhB,IAAM,UAAU,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,KAAA,GAAQ,GAAA;AAAA,EACR,UAAA,GAAa,CAAA;AAAA,EACb,OAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,WAAA;AAAA,E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oBAEAlB,GAAAA,CAACkB,WAAY,KAAA,EAAc,SAAA,EAAU,4BAChC,QAAA,EACL;AAAA;AAAA,KAER;AAAA,IAEC,UAAA,CAAW,IAAA,oBACRlB,GAAAA,CAAC,YAAS,SAAA,EAAW,KAAA,CAAM,SAAA,EAAW,SAAA,EAAW,GAAG,IAAA,KAAS,IAAA,IAAQ,SAAS,CAAA,EACzE,qBAAW,IAAA,EAChB;AAAA,GAAA,EAER,GAER,CAAA,EACJ,CAAA;AAER","file":"combobox.js","sourcesContent":["import { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n text: [\"display-xs\", \"display-sm\", \"display-md\", \"display-lg\", \"display-xl\", \"display-2xl\"],\n },\n },\n});\n\n/**\n * This function is a wrapper around the twMerge function.\n * It is used to merge the classes inside style objects.\n */\nexport const cx = twMerge;\n\n/**\n * This function does nothing besides helping us to be able to\n * sort the classes inside style objects which is not supported\n * by the Tailwind IntelliSense by default.\n */\nexport function sortCx<T extends Record<string, string | number | Record<string, string | number | Record<string, string | number>>>>(classes: T): T {\n return classes;\n}\n","\"use client\";\n\nimport type { ReactNode, Ref } from \"react\";\nimport type { TextProps as AriaTextProps } from \"react-aria-components\";\nimport { Text as AriaText } from \"react-aria-components\";\nimport { cx } from \"@/utils/cx\";\n\ninterface HintTextProps extends AriaTextProps {\n /** Indicates that the hint text is an error message. */\n isInvalid?: boolean;\n ref?: Ref<HTMLElement>;\n size?: \"sm\" | \"md\";\n children: ReactNode;\n}\n\nexport const HintText = ({ isInvalid, className, size = \"md\", ...props }: HintTextProps) => {\n return (\n <AriaText\n {...props}\n slot={isInvalid ? \"errorMessage\" : \"description\"}\n className={cx(\n \"text-sm text-tertiary\",\n\n // Size\n size === \"sm\" && \"text-xs\",\n \"in-data-[input-size=sm]:text-xs\",\n\n // Invalid state\n isInvalid && \"text-error-primary\",\n \"group-invalid:text-error-primary\",\n\n className,\n )}\n />\n );\n};\n\nHintText.displayName = \"HintText\";\n","\"use client\";\n\n/** Figma: Tooltip (1052:485) */\n\nimport type { ReactNode } from \"react\";\nimport type {\n ButtonProps as AriaButtonProps,\n TooltipProps as AriaTooltipProps,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n} from \"react-aria-components\";\nimport { Button as AriaButton, OverlayArrow as AriaOverlayArrow, Tooltip as AriaTooltip, TooltipTrigger as AriaTooltipTrigger } from \"react-aria-components\";\nimport { cx } from \"@/utils/cx\";\n\ninterface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, \"children\"> {\n /**\n * The title of the tooltip.\n */\n title: ReactNode;\n /**\n * The description of the tooltip.\n */\n description?: ReactNode;\n /**\n * Whether to show the arrow on the tooltip.\n *\n * @default false\n */\n arrow?: boolean;\n /**\n * Delay in milliseconds before the tooltip is shown on first hover.\n *\n * @default 100\n */\n delay?: number;\n}\n\nexport const Tooltip = ({\n title,\n description,\n children,\n arrow = false,\n delay = 100,\n closeDelay = 0,\n trigger,\n isDisabled,\n isOpen,\n defaultOpen,\n offset = 6,\n crossOffset,\n placement = \"top\",\n onOpenChange,\n ...tooltipProps\n}: TooltipProps) => {\n const isTopOrBottomLeft = [\"top left\", \"top end\", \"bottom left\", \"bottom end\"].includes(placement);\n const isTopOrBottomRight = [\"top right\", \"top start\", \"bottom right\", \"bottom start\"].includes(placement);\n // Set negative cross offset for left and right placement to visually balance the tooltip.\n const calculatedCrossOffset = isTopOrBottomLeft ? -12 : isTopOrBottomRight ? 12 : 0;\n\n return (\n <AriaTooltipTrigger {...{ trigger, delay, closeDelay, isDisabled, isOpen, defaultOpen, onOpenChange }}>\n {children}\n\n <AriaTooltip\n {...tooltipProps}\n offset={offset}\n placement={placement}\n crossOffset={crossOffset ?? calculatedCrossOffset}\n className={({ isEntering, isExiting }) => cx(isEntering && \"ease-out animate-in\", isExiting && \"ease-in animate-out\")}\n >\n {({ isEntering, isExiting }) => (\n <div\n className={cx(\n \"z-50 flex max-w-xs origin-(--trigger-anchor-point) flex-col items-start gap-1 rounded-lg bg-primary-solid px-3 shadow-lg will-change-transform\",\n description ? \"py-3\" : \"py-2\",\n\n isEntering &&\n \"ease-out animate-in fade-in zoom-in-95 in-placement-left:slide-in-from-right-0.5 in-placement-right:slide-in-from-left-0.5 in-placement-top:slide-in-from-bottom-0.5 in-placement-bottom:slide-in-from-top-0.5\",\n isExiting &&\n \"ease-in animate-out fade-out zoom-out-95 in-placement-left:slide-out-to-right-0.5 in-placement-right:slide-out-to-left-0.5 in-placement-top:slide-out-to-bottom-0.5 in-placement-bottom:slide-out-to-top-0.5\",\n )}\n >\n <span className=\"text-xs font-semibold text-white\">{title}</span>\n\n {description && <span className=\"text-xs font-medium text-tooltip-supporting-text\">{description}</span>}\n\n {arrow && (\n <AriaOverlayArrow>\n <svg\n viewBox=\"0 0 100 100\"\n className=\"size-2.5 fill-bg-primary-solid in-placement-left:-rotate-90 in-placement-right:rotate-90 in-placement-top:rotate-0 in-placement-bottom:rotate-180\"\n >\n <path d=\"M0,0 L35.858,35.858 Q50,50 64.142,35.858 L100,0 Z\" />\n </svg>\n </AriaOverlayArrow>\n )}\n </div>\n )}\n </AriaTooltip>\n </AriaTooltipTrigger>\n );\n};\n\ninterface TooltipTriggerProps extends AriaButtonProps {}\n\nexport const TooltipTrigger = ({ children, className, ...buttonProps }: TooltipTriggerProps) => {\n return (\n <AriaButton {...buttonProps} className={(values) => cx(\"h-max w-max outline-hidden\", typeof className === \"function\" ? className(values) : className)}>\n {children}\n </AriaButton>\n );\n};\n","\"use client\";\n\nimport type { ReactNode, Ref } from \"react\";\nimport { QuestionIcon as HelpCircle } from \"@phosphor-icons/react/dist/csr/Question\";\nimport type { LabelProps as AriaLabelProps } from \"react-aria-components\";\nimport { Label as AriaLabel } from \"react-aria-components\";\nimport { Tooltip, TooltipTrigger } from \"@/components/base/tooltip/tooltip\";\nimport { cx } from \"@/utils/cx\";\n\ninterface LabelProps extends AriaLabelProps {\n children: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n tooltip?: string;\n tooltipDescription?: string;\n ref?: Ref<HTMLLabelElement>;\n}\n\nexport const Label = ({ isInvalid, isRequired, tooltip, tooltipDescription, className, ...props }: LabelProps) => {\n return (\n <AriaLabel\n // Used for conditionally hiding/showing the label element via CSS:\n // <Input label=\"Visible only on mobile\" className=\"lg:**:data-label:hidden\" />\n // or\n // <Input label=\"Visible only on mobile\" className=\"lg:label:hidden\" />\n data-label=\"true\"\n {...props}\n className={cx(\"flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary\", className)}\n >\n {props.children}\n\n <span\n className={cx(\n \"hidden text-brand-tertiary\",\n isRequired && \"block\",\n typeof isRequired === \"undefined\" && \"group-required:block\",\n\n isInvalid && \"text-error-primary\",\n typeof isInvalid === \"undefined\" && \"group-invalid:text-error-primary\",\n )}\n >\n *\n </span>\n\n {tooltip && (\n <Tooltip title={tooltip} description={tooltipDescription} placement=\"top\">\n <TooltipTrigger\n // `TooltipTrigger` inherits the disabled state from the parent form field\n // but we don't that. We want the tooltip be enabled even if the parent\n // field is disabled.\n isDisabled={false}\n className=\"cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\"\n >\n <HelpCircle className=\"size-4\" />\n </TooltipTrigger>\n </Tooltip>\n )}\n </AriaLabel>\n );\n};\n\nLabel.displayName = \"Label\";\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\n/** Viewport width at or below which mobile sheet behavior applies (matches Avenue dropdown/select). */\nexport const MOBILE_SHEET_MAX_PX = 1024;\n\n/**\n * Returns true when the viewport is at most {@link MOBILE_SHEET_MAX_PX} wide.\n * Initial value is read synchronously on mount so the first paint matches mobile layout.\n */\nexport function useIsMobile(breakpoint = MOBILE_SHEET_MAX_PX + 1): boolean {\n const [isMobile, setIsMobile] = useState(() => {\n if (typeof window === \"undefined\") return false;\n return window.matchMedia(`(max-width: ${breakpoint - 1}px)`).matches;\n });\n\n useEffect(() => {\n const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);\n const handler = (e: MediaQueryListEvent) => setIsMobile(e.matches);\n mq.addEventListener(\"change\", handler);\n return () => mq.removeEventListener(\"change\", handler);\n }, [breakpoint]);\n\n return isMobile;\n}\n","\"use client\";\n\nimport { useEffect, useLayoutEffect, useState, type CSSProperties } from \"react\";\n\n/** Matches Avenue dropdown/select mobile sheet motion. */\nexport const MOBILE_SHEET_MOTION_MS = 175;\nexport const MOBILE_SHEET_ENTRY_EASING = \"cubic-bezier(0.85, 0, 0.15, 1)\";\nexport const MOBILE_SHEET_EXIT_EASING = \"cubic-bezier(0.85, 0, 1, 0.15)\";\nexport const MOBILE_SHEET_SLIDE_ENTRANCE_OFFSET_PX = 120;\n\nexport interface SelectMobileOptions {\n /** When `false`, keep the floating menu on narrow viewports. Default `true`. */\n sheet?: boolean;\n /** Optional header title on the same row as the close control. */\n title?: string;\n /** Extra classes on the sheet panel (merged after base sheet styles). */\n className?: string;\n /** Extra classes on the scrollable body below the header. */\n contentClassName?: string;\n}\n\nexport function resolveSelectMobileOptions(mobileOptions?: SelectMobileOptions) {\n return {\n sheet: mobileOptions?.sheet ?? true,\n title: mobileOptions?.title,\n sheetClassName: mobileOptions?.className,\n contentClassName: mobileOptions?.contentClassName,\n };\n}\n\nexport function useMobileSheetAnimation(\n open: boolean,\n enabled: boolean,\n slideEntrance = true,\n slideOffsetPx = MOBILE_SHEET_SLIDE_ENTRANCE_OFFSET_PX,\n) {\n const [shouldRender, setShouldRender] = useState(open);\n const [isAnimating, setIsAnimating] = useState(false);\n\n useLayoutEffect(() => {\n if (!enabled) {\n setShouldRender(open);\n return;\n }\n\n if (open) {\n setShouldRender(true);\n }\n }, [open, enabled]);\n\n useEffect(() => {\n if (!enabled || open) return;\n\n const timer = setTimeout(() => setShouldRender(false), MOBILE_SHEET_MOTION_MS);\n return () => clearTimeout(timer);\n }, [open, enabled]);\n\n useLayoutEffect(() => {\n if (!enabled || open || !shouldRender) return;\n setIsAnimating(false);\n }, [enabled, open, shouldRender]);\n\n useEffect(() => {\n if (!enabled || !shouldRender || !open) return;\n\n let raf2 = 0;\n const raf1 = requestAnimationFrame(() => {\n raf2 = requestAnimationFrame(() => setIsAnimating(true));\n });\n\n return () => {\n cancelAnimationFrame(raf1);\n if (raf2) cancelAnimationFrame(raf2);\n };\n }, [shouldRender, open, enabled]);\n\n const motionEasing = open ? MOBILE_SHEET_ENTRY_EASING : MOBILE_SHEET_EXIT_EASING;\n const hiddenTransform = slideEntrance ? `translateY(${slideOffsetPx}px)` : \"translateY(100%)\";\n\n const panelStyle: CSSProperties | undefined = enabled\n ? {\n transform: isAnimating ? \"translateY(0)\" : hiddenTransform,\n opacity: isAnimating ? 1 : 0,\n transitionProperty: \"transform, opacity\",\n transitionDuration: `${MOBILE_SHEET_MOTION_MS}ms`,\n transitionTimingFunction: motionEasing,\n }\n : undefined;\n\n const backdropStyle: CSSProperties | undefined = enabled\n ? {\n opacity: isAnimating ? 1 : 0,\n transitionProperty: \"opacity\",\n transitionDuration: `${MOBILE_SHEET_MOTION_MS}ms`,\n transitionTimingFunction: motionEasing,\n }\n : undefined;\n\n return { shouldRender, isAnimating, panelStyle, backdropStyle };\n}\n","\"use client\";\n\n/** Figma: Select menu popover (11132:11643) — desktop floating menu; mobile bottom sheet (≤1024px). */\n\nimport { useContext, useEffect, useMemo, type ReactNode, type RefAttributes } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { XIcon as X } from \"@phosphor-icons/react/dist/csr/X\";\nimport type { PopoverProps as AriaPopoverProps } from \"react-aria-components\";\nimport { OverlayTriggerStateContext, Popover as AriaPopover } from \"react-aria-components\";\nimport { useIsMobile } from \"@/hooks/use-is-mobile\";\nimport {\n resolveSelectMobileOptions,\n useMobileSheetAnimation,\n type SelectMobileOptions,\n} from \"@/components/base/select/select-mobile-sheet\";\nimport { cx } from \"@/utils/cx\";\n\ninterface PopoverProps extends AriaPopoverProps, RefAttributes<HTMLElement> {\n size: \"sm\" | \"md\" | \"lg\";\n /** Narrow-viewport (≤1024px) bottom-sheet options. */\n mobileOptions?: SelectMobileOptions;\n /**\n * When `true`, the popover shell does not scroll and has no max-height;\n * inner content manages its own regions (e.g. multi-select search + list + footer).\n * @default false\n */\n compoundContent?: boolean;\n}\n\nfunction MobileSheetCloseButton({ onClose }: { onClose: () => void }) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onClose();\n }}\n className=\"flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-full text-fg-primary transition duration-100 ease-linear hover:bg-primary_hover active:scale-[0.96] focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]\"\n >\n <X className=\"size-5\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Close</span>\n </button>\n );\n}\n\nfunction MobileSheetChrome({\n title,\n contentClassName,\n onClose,\n children,\n}: {\n title?: string;\n contentClassName?: string;\n onClose: () => void;\n children: ReactNode;\n}) {\n return (\n <>\n <div className={cx(\"flex w-full shrink-0 items-center py-2 pl-4 pr-2\", title ? \"justify-between gap-3\" : \"justify-end\")}>\n {title ? <p className=\"min-w-0 flex-1 truncate text-base font-semibold text-primary\">{title}</p> : null}\n <MobileSheetCloseButton onClose={onClose} />\n </div>\n <div\n className={cx(\n \"min-h-0 flex-1 overflow-y-auto pb-[calc(5rem+env(safe-area-inset-bottom,0px))]\",\n contentClassName,\n )}\n >\n {children}\n </div>\n </>\n );\n}\n\nexport const Popover = ({ mobileOptions, children, size, className, style, compoundContent = false, ...props }: PopoverProps) => {\n const isMobile = useIsMobile();\n const resolvedMobile = useMemo(() => resolveSelectMobileOptions(mobileOptions), [mobileOptions]);\n const useMobileSheet = isMobile && resolvedMobile.sheet;\n const overlayState = useContext(OverlayTriggerStateContext);\n const open = overlayState?.isOpen ?? false;\n const { shouldRender, panelStyle, backdropStyle } = useMobileSheetAnimation(open, useMobileSheet);\n\n useEffect(() => {\n if (!useMobileSheet || !open) return;\n\n const prev = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = prev;\n };\n }, [useMobileSheet, open]);\n\n const close = () => overlayState?.close();\n const showMobileSheet = useMobileSheet && shouldRender;\n const isMobileSheetExiting = showMobileSheet && !open;\n\n const mobileScrim =\n useMobileSheet && shouldRender && typeof document !== \"undefined\"\n ? createPortal(\n <div\n className=\"fixed inset-0 z-50 bg-overlay/70\"\n style={backdropStyle}\n onClick={close}\n aria-hidden=\"true\"\n />,\n document.body,\n )\n : null;\n\n return (\n <>\n {mobileScrim}\n <AriaPopover\n placement=\"bottom\"\n containerPadding={0}\n offset={4}\n {...props}\n isExiting={isMobileSheetExiting}\n {...(useMobileSheet ? { \"data-select-mobile-sheet\": true } : {})}\n style={useMobileSheet ? { ...panelStyle, ...style } : style}\n className={(state) =>\n cx(\n \"outline-hidden\",\n !useMobileSheet && [\n \"w-(--trigger-width) origin-(--trigger-anchor-point) rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt will-change-transform\",\n compoundContent\n ? \"overflow-hidden outline-hidden\"\n : \"overflow-x-hidden overflow-y-auto py-1 outline-hidden\",\n state.isEntering &&\n \"duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5\",\n state.isExiting &&\n \"duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5\",\n !compoundContent && size === \"sm\" && \"max-h-56!\",\n !compoundContent && size === \"md\" && \"max-h-64!\",\n !compoundContent && size === \"lg\" && \"max-h-80!\",\n ],\n useMobileSheet && [\n \"fixed! inset-x-0! bottom-0! top-auto! left-0! right-0! z-[51] flex w-full! max-w-none! flex-col overflow-hidden rounded-t-2xl rounded-b-none border-x-0 border-t border-secondary bg-primary shadow-xl\",\n \"max-h-[min(90dvh,calc(100dvh-env(safe-area-inset-bottom,0px)))]\",\n resolvedMobile.sheetClassName,\n ],\n typeof className === \"function\" ? className(state) : className,\n )\n }\n >\n {(state) => {\n const content = typeof children === \"function\" ? children(state) : children;\n\n if (useMobileSheet) {\n return (\n <MobileSheetChrome\n title={resolvedMobile.title}\n contentClassName={resolvedMobile.contentClassName}\n onClose={close}\n >\n {content}\n </MobileSheetChrome>\n );\n }\n\n return content;\n }}\n </AriaPopover>\n </>\n );\n};\n","\"use client\";\n\nimport type { FC, ReactNode } from \"react\";\nimport { createContext } from \"react\";\nimport type { SelectMobileOptions } from \"./select-mobile-sheet\";\n\nexport type SelectItemType = {\n /** Unique identifier for the item. */\n id: string | number;\n /** The primary display text. */\n label?: string;\n /** Avatar image URL. */\n avatarUrl?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /** Secondary text displayed alongside the label. */\n supportingText?: string;\n /** Leading icon component or element. */\n icon?: FC | ReactNode;\n};\n\nexport interface CommonProps {\n /** Helper text displayed below the input. */\n hint?: string;\n /** Field label displayed above the input. */\n label?: string;\n /** Tooltip text for the help icon next to the label. */\n tooltip?: string;\n /**\n * The size of the component.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Placeholder text when no value is selected. */\n placeholder?: string;\n /** Whether to hide the required indicator from the label. */\n hideRequiredIndicator?: boolean;\n /**\n * Narrow-viewport (≤1024px) bottom-sheet options for the menu.\n * `sheet` defaults to `true` on viewports ≤1024px wide.\n */\n mobileOptions?: SelectMobileOptions;\n}\n\nexport const sizes = {\n sm: {\n root: \"py-2 pl-3 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]\",\n withIcon: \"\",\n text: \"text-sm\",\n textContainer: \"gap-x-1.5\",\n shortcut: \"pr-2.5\",\n },\n md: { root: \"py-2 px-3 gap-2 *:data-icon:size-5\", withIcon: \"\", text: \"text-md\", textContainer: \"gap-x-1.5\", shortcut: \"pr-2.5\" },\n lg: { root: \"py-2.5 px-3.5 gap-2 *:data-icon:size-5\", withIcon: \"\", text: \"text-md\", textContainer: \"gap-x-1.5\", shortcut: \"pr-3\" },\n};\n\n/** Shared search-field layout for multi-select and combo box mobile sheets. */\nexport const searchSizes = {\n sm: { wrapper: \"py-1\", root: \"px-3 py-2 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]\", text: \"text-sm\" },\n md: { wrapper: \"py-0.5\", root: \"px-3 py-2 gap-2 *:data-icon:size-5\", text: \"text-md\" },\n lg: { wrapper: \"py-0.5\", root: \"px-3.5 py-2.5 gap-2 *:data-icon:size-5\", text: \"text-md\" },\n};\n\nexport const SelectContext = createContext<{ size: \"sm\" | \"md\" | \"lg\" }>({ size: \"md\" });\n\nexport type { SelectMobileOptions } from \"./select-mobile-sheet\";\n","import { useEffect } from \"react\";\nimport type { RefObject } from \"@react-types/shared\";\n\n/**\n * Checks if the ResizeObserver API is supported.\n * @returns True if the ResizeObserver API is supported, false otherwise.\n */\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== \"undefined\";\n}\n\n/**\n * The options for the useResizeObserver hook.\n */\ntype useResizeObserverOptionsType<T> = {\n /**\n * The ref to the element to observe.\n */\n ref: RefObject<T | undefined | null> | undefined;\n /**\n * The box to observe.\n */\n box?: ResizeObserverBoxOptions;\n /**\n * The callback function to call when the size changes.\n */\n onResize: () => void;\n};\n\n/**\n * A hook that observes the size of an element and calls a callback function when the size changes.\n * @param options - The options for the hook.\n */\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>) {\n const { ref, box, onResize } = options;\n\n useEffect(() => {\n const element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener(\"resize\", onResize, false);\n\n return () => {\n window.removeEventListener(\"resize\", onResize, false);\n };\n } else {\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n\n resizeObserverInstance.observe(element, { box });\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n }, [onResize, ref, box]);\n}\n","\"use client\";\n\nimport { type ComponentType, type HTMLAttributes, type ReactNode, type Ref, createContext, useContext, useState } from \"react\";\nimport { EyeIcon as Eye } from \"@phosphor-icons/react/dist/csr/Eye\";\nimport { EyeSlashIcon as EyeOff } from \"@phosphor-icons/react/dist/csr/EyeSlash\";\nimport { QuestionIcon as HelpCircle } from \"@phosphor-icons/react/dist/csr/Question\";\nimport { InfoIcon as InfoCircle } from \"@phosphor-icons/react/dist/csr/Info\";\nimport type { InputProps as AriaInputProps, TextFieldProps as AriaTextFieldProps } from \"react-aria-components\";\nimport { Button as AriaButton, Group as AriaGroup, Input as AriaInput, TextField as AriaTextField } from \"react-aria-components\";\nimport { HintText } from \"@/components/base/input/hint-text\";\nimport { Label } from \"@/components/base/input/label\";\nimport { Tooltip, TooltipTrigger } from \"@/components/base/tooltip/tooltip\";\nimport { cx, sortCx } from \"@/utils/cx\";\n\n/**\n * Figma: Inputs (85:1269)\n *\n * Default: border (1px) border-primary + shadow-xs.\n * Focus: 1px border-brand + inset ring-brand (2px visual, no layout shift from border-2).\n * Error default: border-error_subtle; error focus: border-error + inset ring-error.\n */\nexport const inputFocusRingShadow = \"border-brand ring-1 ring-inset ring-brand\";\nexport const inputErrorFocusRingShadow = \"border-error ring-1 ring-inset ring-error\";\n/** Shell focus overlay — border + inset ring on one ::after above children (no host border-brand; avoids double-ring gap). */\nexport const inputFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-brand after:ring-1 after:ring-inset after:ring-brand after:content-['']\";\nexport const inputErrorFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-error after:ring-1 after:ring-inset after:ring-error after:content-['']\";\nexport const inputErrorFocusRingGroupInvalidShellOverlay =\n \"group-invalid:focus-within:after:pointer-events-none group-invalid:focus-within:after:absolute group-invalid:focus-within:after:-inset-px group-invalid:focus-within:after:z-10 group-invalid:focus-within:after:rounded-lg group-invalid:focus-within:after:border group-invalid:focus-within:after:border-solid group-invalid:focus-within:after:border-error group-invalid:focus-within:after:ring-1 group-invalid:focus-within:after:ring-inset group-invalid:focus-within:after:ring-error group-invalid:focus-within:after:content-['']\";\nexport const inputFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\";\nexport const inputErrorFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-error focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-error\";\n\nexport interface InputBaseProps extends Omit<AriaInputProps, \"size\"> {\n /** Tooltip message on hover. */\n tooltip?: string;\n /** Whether the input is invalid. */\n isInvalid?: boolean;\n /** Whether the input is disabled. */\n isDisabled?: boolean;\n /** Whether the input is required. */\n isRequired?: boolean;\n /**\n * Input size.\n * @default \"sm\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Placeholder text. */\n placeholder?: string;\n /** Class name for the icon. */\n iconClassName?: string;\n /** Class name for the input. */\n inputClassName?: string;\n /** Class name for the input wrapper. */\n wrapperClassName?: string;\n /** Class name for the tooltip. */\n tooltipClassName?: string;\n /** Keyboard shortcut to display. */\n shortcut?: string | boolean;\n ref?: Ref<HTMLInputElement>;\n groupRef?: Ref<HTMLDivElement>;\n /** Icon component to display on the left side of the input. */\n icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;\n}\n\nexport const InputBase = ({\n ref,\n tooltip,\n shortcut,\n groupRef,\n size = \"md\",\n isInvalid,\n isDisabled,\n isRequired,\n icon: Icon,\n placeholder,\n wrapperClassName,\n tooltipClassName,\n inputClassName,\n iconClassName,\n type = \"text\",\n ...inputProps\n}: InputBaseProps) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n // Check if the input has a leading icon or tooltip\n const hasTrailingIcon = tooltip || isInvalid || type === \"password\";\n const hasLeadingIcon = Icon;\n\n // If the input is inside a `TextFieldContext`, use its context to simplify applying styles\n const context = useContext(TextFieldContext);\n\n const inputSize = context?.size || size;\n\n const sizes = sortCx({\n sm: {\n root: cx(\"px-3 py-2 text-sm\", hasLeadingIcon && \"pl-9\", hasTrailingIcon && \"pr-9\"),\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-1.5\",\n },\n md: {\n root: cx(\"px-3 py-2 text-md\", hasLeadingIcon && \"pl-10\", hasTrailingIcon && \"pr-9\"),\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2\",\n },\n lg: {\n root: cx(\"px-3.5 py-2.5 text-md\", hasLeadingIcon && \"pl-10.5\", hasTrailingIcon && \"pr-9.5\"),\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n shortcut: \"pr-2.5\",\n },\n });\n\n return (\n <AriaGroup\n {...{ isDisabled, isInvalid }}\n ref={groupRef}\n className={({ isFocusWithin, isDisabled, isInvalid }) =>\n cx(\n \"group/input relative flex w-full flex-row place-content-center place-items-center rounded-lg border border-solid border-primary bg-primary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear\",\n\n isFocusWithin && !isDisabled && !isInvalid && inputFocusRingShadow,\n\n // Disabled state styles\n isDisabled && \"cursor-not-allowed opacity-50\",\n \"group-disabled:cursor-not-allowed group-disabled:opacity-50\",\n\n // Invalid state styles\n isInvalid && !isFocusWithin && \"border-error_subtle\",\n \"group-invalid:border-error_subtle\",\n \"group-invalid:focus-within:border-error group-invalid:focus-within:ring-1 group-invalid:focus-within:ring-inset group-invalid:focus-within:ring-error\",\n\n // Invalid + focus — darker error stroke (not brand)\n isInvalid && isFocusWithin && inputErrorFocusRingShadow,\n\n context?.wrapperClassName,\n wrapperClassName,\n )\n }\n >\n {/* Leading icon and Payment icon */}\n {Icon && (\n <Icon className={cx(\"pointer-events-none absolute text-fg-quaternary\", sizes[inputSize].iconLeading, context?.iconClassName, iconClassName)} />\n )}\n\n {/* Input field */}\n <AriaInput\n {...(inputProps as AriaInputProps)}\n ref={ref}\n required={isRequired}\n type={type === \"password\" && isPasswordVisible ? \"text\" : type}\n placeholder={placeholder}\n className={cx(\n \"m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed\",\n sizes[inputSize].root,\n context?.inputClassName,\n inputClassName,\n )}\n />\n\n {/* Tooltip and help icon */}\n {tooltip && type !== \"password\" && (\n <Tooltip title={tooltip} placement=\"top\">\n <TooltipTrigger\n className={cx(\n \"absolute cursor-pointer text-fg-quaternary transition duration-100 ease-linear group-invalid/input:hidden hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n sizes[inputSize].iconTrailing,\n context?.tooltipClassName,\n tooltipClassName,\n )}\n >\n <HelpCircle className=\"size-4 stroke-[2.25px]\" />\n </TooltipTrigger>\n </Tooltip>\n )}\n\n {/* Invalid icon */}\n {type !== \"password\" && (\n <InfoCircle\n className={cx(\n \"pointer-events-none absolute hidden size-4 stroke-[2.25px] text-fg-error-secondary group-invalid/input:block\",\n sizes[inputSize].iconTrailing,\n context?.tooltipClassName,\n tooltipClassName,\n )}\n />\n )}\n\n {/* Password visibility toggle */}\n {type === \"password\" && (\n <AriaButton\n aria-label=\"Toggle password visibility\"\n onClick={() => setIsPasswordVisible(!isPasswordVisible)}\n className={cx(\n \"absolute flex cursor-pointer items-center justify-center text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover focus:outline-hidden\",\n sizes[inputSize].iconTrailing,\n )}\n >\n {isPasswordVisible ? <EyeOff className=\"size-4 stroke-[2.25px]\" /> : <Eye className=\"size-4 stroke-[2.25px]\" />}\n </AriaButton>\n )}\n\n {/* Shortcut */}\n {shortcut && (\n <div\n className={cx(\n \"pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n sizes[inputSize].shortcut,\n )}\n >\n <span\n aria-hidden=\"true\"\n className=\"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\"\n >\n {typeof shortcut === \"string\" ? shortcut : \"⌘K\"}\n </span>\n </div>\n )}\n </AriaGroup>\n );\n};\n\nInputBase.displayName = \"InputBase\";\n\ninterface TextFieldContextProps extends Partial<Pick<InputBaseProps, \"size\" | \"wrapperClassName\" | \"inputClassName\" | \"iconClassName\" | \"tooltipClassName\">> {}\n\nconst TextFieldContext = createContext<TextFieldContextProps>({});\n\nexport interface TextFieldProps extends AriaTextFieldProps, TextFieldContextProps {}\n\nexport const TextField = ({ className, size = \"md\", inputClassName, wrapperClassName, iconClassName, tooltipClassName, ...props }: TextFieldProps) => {\n return (\n <TextFieldContext.Provider value={{ inputClassName, wrapperClassName, iconClassName, tooltipClassName, size }}>\n <AriaTextField\n {...props}\n data-input-wrapper\n data-input-size={size}\n className={(state) =>\n cx(\"group flex h-max w-full flex-col items-start justify-start gap-1.5\", typeof className === \"function\" ? className(state) : className)\n }\n />\n </TextFieldContext.Provider>\n );\n};\n\nTextField.displayName = \"TextField\";\n\nexport interface InputProps\n extends\n AriaTextFieldProps,\n Pick<\n InputBaseProps,\n | \"ref\"\n | \"placeholder\"\n | \"icon\"\n | \"shortcut\"\n | \"tooltip\"\n | \"groupRef\"\n | \"size\"\n | \"wrapperClassName\"\n | \"inputClassName\"\n | \"iconClassName\"\n | \"tooltipClassName\"\n > {\n /** Label text for the input */\n label?: string;\n /** Helper text displayed below the input */\n hint?: ReactNode;\n /** Whether to hide required indicator from label */\n hideRequiredIndicator?: boolean;\n}\n\nexport const Input = ({\n size = \"md\",\n placeholder,\n icon: Icon,\n label,\n hint,\n shortcut,\n hideRequiredIndicator,\n className,\n ref,\n groupRef,\n tooltip,\n iconClassName,\n inputClassName,\n wrapperClassName,\n tooltipClassName,\n type = \"text\",\n ...props\n}: InputProps) => {\n return (\n <TextField aria-label={!label ? placeholder : undefined} {...props} size={size} className={className}>\n {({ isRequired, isInvalid }) => (\n <>\n {label && (\n <Label isRequired={hideRequiredIndicator ? !hideRequiredIndicator : isRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n\n <InputBase\n {...{\n ref,\n groupRef,\n size,\n placeholder,\n icon: Icon,\n shortcut,\n iconClassName,\n inputClassName,\n wrapperClassName,\n tooltipClassName,\n tooltip,\n type,\n isInvalid,\n }}\n />\n\n {hint && <HintText isInvalid={isInvalid}>{hint}</HintText>}\n </>\n )}\n </TextField>\n );\n};\n\nInput.displayName = \"Input\";\n","/* We cannot use type `unknown` instead of `any` here because it will break the type assertion `isReactComponent` function is providing. */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from \"react\";\n\ntype ReactComponent = React.FC<any> | React.ComponentClass<any, any>;\n\n/**\n * Checks if a given value is a function component.\n */\nexport const isFunctionComponent = (component: any): component is React.FC<any> => {\n return typeof component === \"function\";\n};\n\n/**\n * Checks if a given value is a class component.\n */\nexport const isClassComponent = (component: any): component is React.ComponentClass<any, any> => {\n return typeof component === \"function\" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);\n};\n\n/**\n * Checks if a given value is a forward ref component.\n */\nexport const isForwardRefComponent = (component: any): component is React.ForwardRefExoticComponent<any> => {\n return typeof component === \"object\" && component !== null && component.$$typeof.toString() === \"Symbol(react.forward_ref)\";\n};\n\n/**\n * Checks if a given value is a valid React component.\n */\nexport const isReactComponent = (component: any): component is ReactComponent => {\n return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);\n};\n","\"use client\";\n\n/** Figma: Select / ComboBox (11132:11643) */\n\nimport type { FC, FocusEventHandler, PointerEventHandler, ReactNode, Ref, RefAttributes, RefObject } from \"react\";\nimport { isValidElement, useCallback, useContext, useMemo, useRef, useState } from \"react\";\nimport { MagnifyingGlassIcon as SearchLg } from \"@phosphor-icons/react/dist/csr/MagnifyingGlass\";\nimport type { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps } from \"react-aria-components\";\nimport {\n Button as AriaButton,\n ComboBox as AriaComboBox,\n Group as AriaGroup,\n Input as AriaInput,\n ListBox as AriaListBox,\n ComboBoxStateContext,\n} from \"react-aria-components\";\nimport { HintText } from \"@/components/base/input/hint-text\";\nimport { Label } from \"@/components/base/input/label\";\nimport { Popover } from \"@/components/base/select/popover\";\nimport { resolveSelectMobileOptions } from \"@/components/base/select/select-mobile-sheet\";\nimport { type CommonProps, searchSizes, SelectContext, type SelectItemType, sizes } from \"@/components/base/select/select-shared\";\nimport { useIsMobile } from \"@/hooks/use-is-mobile\";\nimport { useResizeObserver } from \"@/hooks/use-resize-observer\";\nimport { cx } from \"@/utils/cx\";\nimport { inputErrorFocusRingShadow, inputFocusRingShadow } from \"@/components/base/input/input\";\nimport { isReactComponent } from \"@/utils/is-react-component\";\n\ninterface ComboBoxProps extends Omit<AriaComboBoxProps<SelectItemType>, \"children\" | \"items\">, RefAttributes<HTMLDivElement>, CommonProps {\n shortcut?: boolean;\n items?: SelectItemType[];\n popoverClassName?: string;\n shortcutClassName?: string;\n /** Leading icon component displayed before the input. */\n icon?: FC | ReactNode;\n children: AriaListBoxProps<SelectItemType>[\"children\"];\n}\n\ninterface ComboBoxValueProps extends AriaGroupProps {\n size: \"sm\" | \"md\" | \"lg\";\n shortcut: boolean;\n placeholder?: string;\n shortcutClassName?: string;\n icon?: FC | ReactNode;\n isInvalid?: boolean;\n onFocus?: FocusEventHandler;\n onPointerEnter?: PointerEventHandler;\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ComboBoxMobileTriggerProps {\n size: \"sm\" | \"md\" | \"lg\";\n placeholder?: string;\n icon?: FC | ReactNode;\n isInvalid?: boolean;\n onPointerEnter?: PointerEventHandler;\n ref?: Ref<HTMLButtonElement>;\n}\n\nconst ComboBoxMobileTrigger = ({ size, placeholder, icon: IconProp, isInvalid, onPointerEnter, ref }: ComboBoxMobileTriggerProps) => {\n const state = useContext(ComboBoxStateContext);\n const selectedItem = state?.selectedItem?.value ?? null;\n\n return (\n <AriaButton\n ref={ref}\n onPress={() => state?.open()}\n onPointerEnter={onPointerEnter}\n className={({ isFocusVisible, isDisabled }) =>\n cx(\n \"relative flex w-full cursor-pointer items-center gap-2 rounded-lg border border-solid border-primary bg-primary text-left shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear\",\n isDisabled && \"cursor-not-allowed opacity-50\",\n !isInvalid && (isFocusVisible || state?.isOpen) && inputFocusRingShadow,\n isInvalid && !(isFocusVisible || state?.isOpen) && \"border-error_subtle\",\n isInvalid && (isFocusVisible || state?.isOpen) && inputErrorFocusRingShadow,\n \"*:data-icon:shrink-0 *:data-icon:text-fg-quaternary\",\n sizes[size].root,\n )\n }\n >\n {isReactComponent(IconProp) ? (\n <IconProp data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n ) : isValidElement(IconProp) ? (\n IconProp\n ) : (\n <SearchLg data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n )}\n\n {selectedItem ? (\n <section className={cx(\"flex w-full truncate\", sizes[size].textContainer)}>\n <p className={cx(\"truncate font-medium text-primary\", sizes[size].text)}>{selectedItem.label}</p>\n {selectedItem.supportingText && <p className={cx(\"text-tertiary\", sizes[size].text)}>{selectedItem.supportingText}</p>}\n </section>\n ) : (\n <p className={cx(\"truncate text-placeholder\", sizes[size].text)}>{placeholder}</p>\n )}\n </AriaButton>\n );\n};\n\ninterface ComboBoxSheetSearchProps {\n size: \"sm\" | \"md\" | \"lg\";\n placeholder?: string;\n icon?: FC | ReactNode;\n}\n\nconst ComboBoxSheetSearch = ({ size, placeholder, icon: IconProp }: ComboBoxSheetSearchProps) => (\n <div className={cx(\"shrink-0 border-b border-secondary\", searchSizes[size].wrapper)}>\n <div className={cx(\"flex items-center\", searchSizes[size].root)}>\n {isReactComponent(IconProp) ? (\n <IconProp data-icon aria-hidden=\"true\" className=\"shrink-0 text-fg-quaternary\" />\n ) : isValidElement(IconProp) ? (\n IconProp\n ) : (\n <SearchLg data-icon aria-hidden=\"true\" className=\"shrink-0 text-fg-quaternary\" />\n )}\n <AriaInput\n placeholder={placeholder}\n className={cx(\n \"w-full appearance-none bg-transparent text-primary caret-alpha-black/90 outline-hidden placeholder:text-placeholder\",\n searchSizes[size].text,\n )}\n />\n </div>\n </div>\n);\n\nconst ComboBoxValue = ({ size, shortcut, placeholder, shortcutClassName, icon: IconProp, isInvalid, ref, ...otherProps }: ComboBoxValueProps) => {\n const state = useContext(ComboBoxStateContext);\n\n const value = state?.selectedItem?.value || null;\n const inputValue = state?.inputValue || null;\n\n const first = inputValue?.split(value?.supportingText)?.[0] || \"\";\n const last = inputValue?.split(first)[1];\n\n return (\n <AriaGroup\n ref={ref}\n {...otherProps}\n isInvalid={isInvalid}\n className={({ isDisabled, isInvalid: isGroupInvalid }) =>\n cx(\n \"relative flex w-full items-center gap-2 rounded-lg border border-solid border-primary bg-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear\",\n isDisabled && \"cursor-not-allowed opacity-50\",\n !isGroupInvalid && state?.isOpen && inputFocusRingShadow,\n !isGroupInvalid &&\n \"has-[input:focus-visible]:border-brand has-[input:focus-visible]:ring-1 has-[input:focus-visible]:ring-inset has-[input:focus-visible]:ring-brand\",\n isGroupInvalid && !state?.isOpen && \"border-error_subtle\",\n isGroupInvalid && state?.isOpen && inputErrorFocusRingShadow,\n isGroupInvalid &&\n \"has-[input:focus-visible]:border-error has-[input:focus-visible]:ring-1 has-[input:focus-visible]:ring-inset has-[input:focus-visible]:ring-error\",\n\n // Icon styles\n \"*:data-icon:shrink-0 *:data-icon:text-fg-quaternary\",\n\n sizes[size].root,\n )\n }\n >\n {isReactComponent(IconProp) ? (\n <IconProp data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n ) : isValidElement(IconProp) ? (\n IconProp\n ) : (\n <SearchLg data-icon className=\"pointer-events-none\" aria-hidden=\"true\" />\n )}\n\n <div className=\"relative flex w-full items-center\">\n {inputValue && (\n <span className={cx(\"absolute top-1/2 z-0 inline-flex w-full -translate-y-1/2 truncate\", sizes[size].textContainer)} aria-hidden=\"true\">\n <p className={cx(\"font-medium text-primary\", sizes[size].text)}>{first}</p>\n {last && <p className={cx(\"-ml-0.75 text-tertiary\", sizes[size].text)}>{last}</p>}\n </span>\n )}\n\n <AriaInput\n placeholder={placeholder}\n className={cx(\n \"z-10 w-full appearance-none bg-transparent text-transparent caret-alpha-black/90 placeholder:text-placeholder focus:outline-hidden disabled:cursor-not-allowed\",\n sizes[size].text,\n )}\n />\n </div>\n\n {shortcut && (\n <div\n className={cx(\n \"absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n sizes[size].shortcut,\n shortcutClassName,\n )}\n >\n <span\n className=\"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\"\n aria-hidden=\"true\"\n >\n ⌘K\n </span>\n </div>\n )}\n </AriaGroup>\n );\n};\n\nexport const ComboBox = ({\n placeholder = \"Search\",\n shortcut = true,\n size = \"md\",\n children,\n items,\n shortcutClassName,\n icon,\n hideRequiredIndicator,\n mobileOptions,\n ...otherProps\n}: ComboBoxProps) => {\n const isMobile = useIsMobile();\n const resolvedMobile = useMemo(() => resolveSelectMobileOptions(mobileOptions), [mobileOptions]);\n const useMobileSheet = isMobile && resolvedMobile.sheet;\n const triggerRef = useRef<HTMLButtonElement | HTMLDivElement | null>(null);\n const [popoverWidth, setPopoverWidth] = useState(\"\");\n\n // Resize observer for popover width\n const onResize = useCallback(() => {\n if (!triggerRef.current) return;\n\n const divRect = triggerRef.current.getBoundingClientRect();\n\n setPopoverWidth(divRect.width + \"px\");\n }, []);\n\n useResizeObserver({\n ref: triggerRef,\n box: \"border-box\",\n onResize,\n });\n\n return (\n <SelectContext.Provider value={{ size }}>\n <AriaComboBox menuTrigger={useMobileSheet ? \"manual\" : \"focus\"} {...otherProps}>\n {(state) => (\n <div className=\"flex flex-col gap-1.5\">\n {otherProps.label && (\n <Label isRequired={hideRequiredIndicator ? false : state.isRequired} tooltip={otherProps.tooltip}>\n {otherProps.label}\n </Label>\n )}\n\n {useMobileSheet ? (\n <ComboBoxMobileTrigger\n ref={triggerRef as Ref<HTMLButtonElement>}\n placeholder={placeholder}\n icon={icon}\n size={size}\n isInvalid={state.isInvalid}\n onPointerEnter={onResize}\n />\n ) : (\n <ComboBoxValue\n ref={triggerRef as Ref<HTMLDivElement>}\n placeholder={placeholder}\n shortcut={shortcut}\n shortcutClassName={shortcutClassName}\n icon={icon}\n size={size}\n isInvalid={state.isInvalid}\n // This is a workaround to correctly calculating the trigger width\n // while using ResizeObserver wasn't 100% reliable.\n onFocus={onResize}\n onPointerEnter={onResize}\n />\n )}\n\n <Popover\n size={size}\n triggerRef={triggerRef as RefObject<Element | null>}\n compoundContent={useMobileSheet}\n style={useMobileSheet ? undefined : { width: popoverWidth }}\n className={otherProps.popoverClassName}\n mobileOptions={{ title: otherProps.label, ...mobileOptions }}\n >\n {useMobileSheet ? (\n <div className=\"flex min-h-0 flex-col overflow-hidden outline-hidden\">\n <ComboBoxSheetSearch size={size} placeholder={placeholder} icon={icon} />\n <AriaListBox items={items} className=\"min-h-0 flex-1 overflow-y-auto py-1 outline-hidden\">\n {children}\n </AriaListBox>\n </div>\n ) : (\n <AriaListBox items={items} className=\"size-full outline-hidden\">\n {children}\n </AriaListBox>\n )}\n </Popover>\n\n {otherProps.hint && (\n <HintText isInvalid={state.isInvalid} className={cx(size === \"sm\" && \"text-xs\")}>\n {otherProps.hint}\n </HintText>\n )}\n </div>\n )}\n </AriaComboBox>\n </SelectContext.Provider>\n );\n};\n"]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { createContext, useState,
|
|
1
|
+
import { createContext, useState, useMemo, useContext, useEffect, useLayoutEffect, useRef } from 'react';
|
|
2
2
|
import { CaretUpDownIcon } from '@phosphor-icons/react/dist/csr/CaretUpDown';
|
|
3
|
-
import { MenuTrigger, Button, MenuItem, Popover, Menu } from 'react-aria-components';
|
|
3
|
+
import { MenuTrigger, Button, MenuItem, OverlayTriggerStateContext, Popover, Menu } from 'react-aria-components';
|
|
4
4
|
import { UserIcon } from '@phosphor-icons/react/dist/csr/User';
|
|
5
5
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
6
6
|
import '@phosphor-icons/react/dist/csr/Plus';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
8
9
|
import '@phosphor-icons/react/dist/csr/Check';
|
|
9
10
|
import '@phosphor-icons/react/dist/csr/CaretRight';
|
|
10
11
|
import '@phosphor-icons/react/dist/csr/DotsThreeVertical';
|
|
12
|
+
import { XIcon } from '@phosphor-icons/react/dist/csr/X';
|
|
11
13
|
|
|
12
14
|
var twMerge = extendTailwindMerge({
|
|
13
15
|
extend: {
|
|
@@ -167,6 +169,81 @@ var Avatar = ({
|
|
|
167
169
|
}
|
|
168
170
|
);
|
|
169
171
|
};
|
|
172
|
+
var MOBILE_SHEET_MOTION_MS = 175;
|
|
173
|
+
var MOBILE_SHEET_ENTRY_EASING = "cubic-bezier(0.85, 0, 0.15, 1)";
|
|
174
|
+
var MOBILE_SHEET_EXIT_EASING = "cubic-bezier(0.85, 0, 1, 0.15)";
|
|
175
|
+
var MOBILE_SHEET_SLIDE_ENTRANCE_OFFSET_PX = 120;
|
|
176
|
+
function resolveSelectMobileOptions(mobileOptions) {
|
|
177
|
+
return {
|
|
178
|
+
sheet: mobileOptions?.sheet ?? true,
|
|
179
|
+
title: mobileOptions?.title,
|
|
180
|
+
sheetClassName: mobileOptions?.className,
|
|
181
|
+
contentClassName: mobileOptions?.contentClassName
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function useMobileSheetAnimation(open, enabled, slideEntrance = true, slideOffsetPx = MOBILE_SHEET_SLIDE_ENTRANCE_OFFSET_PX) {
|
|
185
|
+
const [shouldRender, setShouldRender] = useState(open);
|
|
186
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
187
|
+
useLayoutEffect(() => {
|
|
188
|
+
if (!enabled) {
|
|
189
|
+
setShouldRender(open);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (open) {
|
|
193
|
+
setShouldRender(true);
|
|
194
|
+
}
|
|
195
|
+
}, [open, enabled]);
|
|
196
|
+
useEffect(() => {
|
|
197
|
+
if (!enabled || open) return;
|
|
198
|
+
const timer = setTimeout(() => setShouldRender(false), MOBILE_SHEET_MOTION_MS);
|
|
199
|
+
return () => clearTimeout(timer);
|
|
200
|
+
}, [open, enabled]);
|
|
201
|
+
useLayoutEffect(() => {
|
|
202
|
+
if (!enabled || open || !shouldRender) return;
|
|
203
|
+
setIsAnimating(false);
|
|
204
|
+
}, [enabled, open, shouldRender]);
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
if (!enabled || !shouldRender || !open) return;
|
|
207
|
+
let raf2 = 0;
|
|
208
|
+
const raf1 = requestAnimationFrame(() => {
|
|
209
|
+
raf2 = requestAnimationFrame(() => setIsAnimating(true));
|
|
210
|
+
});
|
|
211
|
+
return () => {
|
|
212
|
+
cancelAnimationFrame(raf1);
|
|
213
|
+
if (raf2) cancelAnimationFrame(raf2);
|
|
214
|
+
};
|
|
215
|
+
}, [shouldRender, open, enabled]);
|
|
216
|
+
const motionEasing = open ? MOBILE_SHEET_ENTRY_EASING : MOBILE_SHEET_EXIT_EASING;
|
|
217
|
+
const hiddenTransform = slideEntrance ? `translateY(${slideOffsetPx}px)` : "translateY(100%)";
|
|
218
|
+
const panelStyle = enabled ? {
|
|
219
|
+
transform: isAnimating ? "translateY(0)" : hiddenTransform,
|
|
220
|
+
opacity: isAnimating ? 1 : 0,
|
|
221
|
+
transitionProperty: "transform, opacity",
|
|
222
|
+
transitionDuration: `${MOBILE_SHEET_MOTION_MS}ms`,
|
|
223
|
+
transitionTimingFunction: motionEasing
|
|
224
|
+
} : void 0;
|
|
225
|
+
const backdropStyle = enabled ? {
|
|
226
|
+
opacity: isAnimating ? 1 : 0,
|
|
227
|
+
transitionProperty: "opacity",
|
|
228
|
+
transitionDuration: `${MOBILE_SHEET_MOTION_MS}ms`,
|
|
229
|
+
transitionTimingFunction: motionEasing
|
|
230
|
+
} : void 0;
|
|
231
|
+
return { shouldRender, isAnimating, panelStyle, backdropStyle };
|
|
232
|
+
}
|
|
233
|
+
var MOBILE_SHEET_MAX_PX = 1024;
|
|
234
|
+
function useIsMobile(breakpoint = MOBILE_SHEET_MAX_PX + 1) {
|
|
235
|
+
const [isMobile, setIsMobile] = useState(() => {
|
|
236
|
+
if (typeof window === "undefined") return false;
|
|
237
|
+
return window.matchMedia(`(max-width: ${breakpoint - 1}px)`).matches;
|
|
238
|
+
});
|
|
239
|
+
useEffect(() => {
|
|
240
|
+
const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
241
|
+
const handler = (e) => setIsMobile(e.matches);
|
|
242
|
+
mq.addEventListener("change", handler);
|
|
243
|
+
return () => mq.removeEventListener("change", handler);
|
|
244
|
+
}, [breakpoint]);
|
|
245
|
+
return isMobile;
|
|
246
|
+
}
|
|
170
247
|
var RADIO_DOT_DELAY_MS = 60;
|
|
171
248
|
var RADIO_DOT_POP_MS = 100;
|
|
172
249
|
function RadioAnimatedDot({ className }) {
|
|
@@ -206,6 +283,7 @@ var RadioButtonBase = ({ className, isFocusVisible, isSelected, isDisabled, size
|
|
|
206
283
|
"relative flex shrink-0 cursor-pointer appearance-none items-center justify-center overflow-clip rounded-full border border-solid border-primary bg-primary",
|
|
207
284
|
size === "sm" ? "size-4" : "size-5",
|
|
208
285
|
isSelected && "border-transparent bg-brand-solid",
|
|
286
|
+
!isSelected && !isDisabled && "group-hover:bg-primary_hover",
|
|
209
287
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
210
288
|
isDisabled && !isSelected && "bg-tertiary",
|
|
211
289
|
isFocusVisible && !isDisabled && focusRingShadow2,
|
|
@@ -225,21 +303,105 @@ var DropdownMenu = (props) => {
|
|
|
225
303
|
}
|
|
226
304
|
);
|
|
227
305
|
};
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
|
|
306
|
+
var DropdownSheetDepthContext = createContext(0);
|
|
307
|
+
function DropdownSheetCloseButton({ onClose }) {
|
|
308
|
+
return /* @__PURE__ */ jsxs(
|
|
309
|
+
"button",
|
|
231
310
|
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
311
|
+
type: "button",
|
|
312
|
+
onClick: (e) => {
|
|
313
|
+
e.stopPropagation();
|
|
314
|
+
onClose();
|
|
315
|
+
},
|
|
316
|
+
className: "flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-full text-fg-primary transition duration-100 ease-linear hover:bg-primary_hover active:scale-[0.96] focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsx(XIcon, { className: "size-5", "aria-hidden": "true" }),
|
|
319
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
320
|
+
]
|
|
241
321
|
}
|
|
242
322
|
);
|
|
323
|
+
}
|
|
324
|
+
function DropdownSheetChrome({ title, onClose, children }) {
|
|
325
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
326
|
+
/* @__PURE__ */ jsxs("div", { className: cx("flex w-full shrink-0 items-center py-2 pl-4 pr-2", title ? "justify-between gap-3" : "justify-end"), children: [
|
|
327
|
+
title ? /* @__PURE__ */ jsx("p", { className: "min-w-0 flex-1 truncate text-base font-semibold text-primary", children: title }) : null,
|
|
328
|
+
/* @__PURE__ */ jsx(DropdownSheetCloseButton, { onClose })
|
|
329
|
+
] }),
|
|
330
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto pb-[max(2.5rem,calc(env(safe-area-inset-bottom)+2rem))]", children })
|
|
331
|
+
] });
|
|
332
|
+
}
|
|
333
|
+
var DropdownPopover = ({ mobileOptions, children, className, style, ...props }) => {
|
|
334
|
+
const isMobile = useIsMobile();
|
|
335
|
+
const resolvedMobile = useMemo(() => resolveSelectMobileOptions(mobileOptions), [mobileOptions]);
|
|
336
|
+
const useMobileSheet = isMobile && resolvedMobile.sheet;
|
|
337
|
+
const overlayState = useContext(OverlayTriggerStateContext);
|
|
338
|
+
const open = overlayState?.isOpen ?? false;
|
|
339
|
+
const parentDepth = useContext(DropdownSheetDepthContext);
|
|
340
|
+
const depth = parentDepth + 1;
|
|
341
|
+
const { shouldRender, panelStyle, backdropStyle } = useMobileSheetAnimation(open, useMobileSheet);
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
if (!useMobileSheet || !open) return;
|
|
344
|
+
const prev = document.body.style.overflow;
|
|
345
|
+
document.body.style.overflow = "hidden";
|
|
346
|
+
return () => {
|
|
347
|
+
document.body.style.overflow = prev;
|
|
348
|
+
};
|
|
349
|
+
}, [useMobileSheet, open]);
|
|
350
|
+
if (!useMobileSheet) {
|
|
351
|
+
return /* @__PURE__ */ jsx(
|
|
352
|
+
Popover,
|
|
353
|
+
{
|
|
354
|
+
placement: "bottom right",
|
|
355
|
+
...props,
|
|
356
|
+
style,
|
|
357
|
+
className: (state) => cx(
|
|
358
|
+
"w-62 origin-(--trigger-anchor-point) overflow-auto rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt will-change-transform",
|
|
359
|
+
state.isEntering && "duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5",
|
|
360
|
+
state.isExiting && "duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5",
|
|
361
|
+
typeof className === "function" ? className(state) : className
|
|
362
|
+
),
|
|
363
|
+
children
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
const close = () => overlayState?.close();
|
|
368
|
+
const showMobileSheet = shouldRender;
|
|
369
|
+
const isMobileSheetExiting = showMobileSheet && !open;
|
|
370
|
+
const scrimZIndex = 50 + (depth - 1) * 10;
|
|
371
|
+
const sheetZIndex = scrimZIndex + 1;
|
|
372
|
+
const mobileScrim = shouldRender && typeof document !== "undefined" ? createPortal(
|
|
373
|
+
/* @__PURE__ */ jsx(
|
|
374
|
+
"div",
|
|
375
|
+
{
|
|
376
|
+
className: "fixed inset-0 bg-overlay/70",
|
|
377
|
+
style: { ...backdropStyle, zIndex: scrimZIndex },
|
|
378
|
+
onClick: close,
|
|
379
|
+
"aria-hidden": "true"
|
|
380
|
+
}
|
|
381
|
+
),
|
|
382
|
+
document.body
|
|
383
|
+
) : null;
|
|
384
|
+
return /* @__PURE__ */ jsxs(DropdownSheetDepthContext.Provider, { value: depth, children: [
|
|
385
|
+
mobileScrim,
|
|
386
|
+
/* @__PURE__ */ jsx(
|
|
387
|
+
Popover,
|
|
388
|
+
{
|
|
389
|
+
placement: "bottom",
|
|
390
|
+
containerPadding: 0,
|
|
391
|
+
offset: 0,
|
|
392
|
+
...props,
|
|
393
|
+
isExiting: isMobileSheetExiting,
|
|
394
|
+
"data-dropdown-mobile-sheet": true,
|
|
395
|
+
style: { ...panelStyle, zIndex: sheetZIndex, ...style },
|
|
396
|
+
className: (state) => cx(
|
|
397
|
+
"fixed! inset-x-0! bottom-0! top-auto! right-0! left-0! flex max-h-[min(90dvh,calc(100dvh-env(safe-area-inset-bottom,0px)))] w-full! max-w-none! flex-col overflow-hidden rounded-t-2xl rounded-b-none border-x-0 border-t border-secondary bg-primary shadow-xl outline-hidden",
|
|
398
|
+
resolvedMobile.sheetClassName,
|
|
399
|
+
typeof className === "function" ? className(state) : className
|
|
400
|
+
),
|
|
401
|
+
children: /* @__PURE__ */ jsx(DropdownSheetChrome, { title: resolvedMobile.title, onClose: close, children: typeof children === "function" ? null : children })
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
] });
|
|
243
405
|
};
|
|
244
406
|
var Dropdown = {
|
|
245
407
|
Root: MenuTrigger,
|