@kavagy/react 0.1.1

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/THIRD_PARTY_NOTICES.md +30 -0
  3. package/dist/avatar/avatar.d.ts +189 -0
  4. package/dist/avatar/avatar.d.ts.map +1 -0
  5. package/dist/avatar/avatar.js +185 -0
  6. package/dist/avatar/avatar.js.map +1 -0
  7. package/dist/avatar/index.d.ts +2 -0
  8. package/dist/avatar/index.js +2 -0
  9. package/dist/badges/badges.d.ts +149 -0
  10. package/dist/badges/badges.d.ts.map +1 -0
  11. package/dist/badges/badges.js +269 -0
  12. package/dist/badges/badges.js.map +1 -0
  13. package/dist/badges/index.d.ts +2 -0
  14. package/dist/badges/index.js +2 -0
  15. package/dist/button/button.d.ts +208 -0
  16. package/dist/button/button.d.ts.map +1 -0
  17. package/dist/button/button.js +158 -0
  18. package/dist/button/button.js.map +1 -0
  19. package/dist/button/index.d.ts +2 -0
  20. package/dist/button/index.js +2 -0
  21. package/dist/button-utility/button-utility.d.ts +59 -0
  22. package/dist/button-utility/button-utility.d.ts.map +1 -0
  23. package/dist/button-utility/button-utility.js +78 -0
  24. package/dist/button-utility/button-utility.js.map +1 -0
  25. package/dist/button-utility/index.d.ts +2 -0
  26. package/dist/button-utility/index.js +2 -0
  27. package/dist/checkbox/checkbox.d.ts +23 -0
  28. package/dist/checkbox/checkbox.d.ts.map +1 -0
  29. package/dist/checkbox/checkbox.js +81 -0
  30. package/dist/checkbox/checkbox.js.map +1 -0
  31. package/dist/checkbox/index.d.ts +2 -0
  32. package/dist/checkbox/index.js +2 -0
  33. package/dist/dropdown/dropdown.d.ts +33 -0
  34. package/dist/dropdown/dropdown.d.ts.map +1 -0
  35. package/dist/dropdown/dropdown.js +128 -0
  36. package/dist/dropdown/dropdown.js.map +1 -0
  37. package/dist/dropdown/index.d.ts +2 -0
  38. package/dist/dropdown/index.js +2 -0
  39. package/dist/featured-icon/featured-icon.d.ts +141 -0
  40. package/dist/featured-icon/featured-icon.d.ts.map +1 -0
  41. package/dist/featured-icon/featured-icon.js +292 -0
  42. package/dist/featured-icon/featured-icon.js.map +1 -0
  43. package/dist/featured-icon/index.d.ts +2 -0
  44. package/dist/featured-icon/index.js +2 -0
  45. package/dist/input/index.d.ts +2 -0
  46. package/dist/input/index.js +2 -0
  47. package/dist/input/input.d.ts +42 -0
  48. package/dist/input/input.d.ts.map +1 -0
  49. package/dist/input/input.js +136 -0
  50. package/dist/input/input.js.map +1 -0
  51. package/dist/modal/index.d.ts +2 -0
  52. package/dist/modal/index.js +2 -0
  53. package/dist/modal/modal.d.ts +8 -0
  54. package/dist/modal/modal.d.ts.map +1 -0
  55. package/dist/modal/modal.js +35 -0
  56. package/dist/modal/modal.js.map +1 -0
  57. package/dist/radio-buttons/index.d.ts +2 -0
  58. package/dist/radio-buttons/index.js +2 -0
  59. package/dist/radio-buttons/radio-buttons.d.ts +30 -0
  60. package/dist/radio-buttons/radio-buttons.d.ts.map +1 -0
  61. package/dist/radio-buttons/radio-buttons.js +71 -0
  62. package/dist/radio-buttons/radio-buttons.js.map +1 -0
  63. package/dist/select/index.d.ts +2 -0
  64. package/dist/select/index.js +2 -0
  65. package/dist/select/select.d.ts +40 -0
  66. package/dist/select/select.d.ts.map +1 -0
  67. package/dist/select/select.js +198 -0
  68. package/dist/select/select.js.map +1 -0
  69. package/dist/styles.css +2843 -0
  70. package/dist/table/index.d.ts +2 -0
  71. package/dist/table/index.js +2 -0
  72. package/dist/table/table.d.ts +61 -0
  73. package/dist/table/table.d.ts.map +1 -0
  74. package/dist/table/table.js +208 -0
  75. package/dist/table/table.js.map +1 -0
  76. package/dist/tabs/index.d.ts +2 -0
  77. package/dist/tabs/index.js +2 -0
  78. package/dist/tabs/tabs.d.ts +62 -0
  79. package/dist/tabs/tabs.d.ts.map +1 -0
  80. package/dist/tabs/tabs.js +120 -0
  81. package/dist/tabs/tabs.js.map +1 -0
  82. package/dist/textarea/index.d.ts +2 -0
  83. package/dist/textarea/index.js +2 -0
  84. package/dist/textarea/textarea.d.ts +26 -0
  85. package/dist/textarea/textarea.d.ts.map +1 -0
  86. package/dist/textarea/textarea.js +74 -0
  87. package/dist/textarea/textarea.js.map +1 -0
  88. package/dist/toggle/index.d.ts +2 -0
  89. package/dist/toggle/index.js +2 -0
  90. package/dist/toggle/toggle.d.ts +151 -0
  91. package/dist/toggle/toggle.d.ts.map +1 -0
  92. package/dist/toggle/toggle.js +145 -0
  93. package/dist/toggle/toggle.js.map +1 -0
  94. package/dist/tooltip/index.d.ts +2 -0
  95. package/dist/tooltip/index.js +2 -0
  96. package/dist/tooltip/tooltip.d.ts +59 -0
  97. package/dist/tooltip/tooltip.d.ts.map +1 -0
  98. package/dist/tooltip/tooltip.js +86 -0
  99. package/dist/tooltip/tooltip.js.map +1 -0
  100. package/dist/utils/cx.d.ts +21 -0
  101. package/dist/utils/cx.d.ts.map +1 -0
  102. package/dist/utils/cx.js +75 -0
  103. package/dist/utils/cx.js.map +1 -0
  104. package/dist/utils/is-react-component.d.ts +9 -0
  105. package/dist/utils/is-react-component.d.ts.map +1 -0
  106. package/dist/utils/is-react-component.js +17 -0
  107. package/dist/utils/is-react-component.js.map +1 -0
  108. package/dist/utils/tv.d.ts +6 -0
  109. package/dist/utils/tv.d.ts.map +1 -0
  110. package/dist/utils/tv.js +11 -0
  111. package/dist/utils/tv.js.map +1 -0
  112. package/package.json +146 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","names":["AriaLabel","AriaText","AriaGroup","AriaInput","AriaButton","AriaTextField","Tooltip","TooltipTrigger"],"sources":["../../src/input/input.tsx"],"sourcesContent":["'use client';\n\n/* @kavagy-source: untitledui/base/input/input.tsx, base/input/label.tsx, base/input/hint-text.tsx */\n\nimport { Eye, EyeOff, HelpCircle, InfoCircle } from '@kavagy/icons';\nimport type { ComponentType, HTMLAttributes, ReactNode, Ref } from 'react';\nimport { createContext, forwardRef, useContext, useState } from 'react';\nimport type {\n InputProps as AriaInputProps,\n LabelProps as AriaLabelProps,\n TextFieldProps as AriaTextFieldProps,\n TextProps as AriaTextProps,\n} from 'react-aria-components';\nimport {\n Button as AriaButton,\n Group as AriaGroup,\n Input as AriaInput,\n Label as AriaLabel,\n Text as AriaText,\n TextField as AriaTextField,\n} from 'react-aria-components';\nimport type { TooltipProps } from '../tooltip';\nimport { Tooltip, TooltipTrigger } from '../tooltip';\nimport { cx } from '../utils/cx';\n\nexport interface LabelProps extends AriaLabelProps {\n children: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n}\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(function Label(\n { isInvalid, isRequired, className, children, ...props },\n ref,\n) {\n return (\n <AriaLabel\n data-label=\"true\"\n ref={ref}\n {...props}\n className={cx(\n 'flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary',\n className,\n )}\n >\n {children}\n <span\n className={cx(\n 'hidden text-brand-tertiary',\n isRequired && 'block',\n typeof isRequired === 'undefined' && 'group-required:block',\n isInvalid && 'text-error-primary',\n typeof isInvalid === 'undefined' && 'group-invalid:text-error-primary',\n )}\n >\n *\n </span>\n </AriaLabel>\n );\n});\n\nLabel.displayName = 'Label';\n\nexport interface HintTextProps extends AriaTextProps {\n isInvalid?: boolean;\n size?: 'sm' | 'md';\n children: ReactNode;\n}\n\nexport const HintText = forwardRef<HTMLElement, HintTextProps>(function HintText(\n { isInvalid, className, size = 'md', ...props },\n ref,\n) {\n return (\n <AriaText\n ref={ref}\n {...props}\n slot={isInvalid ? 'errorMessage' : 'description'}\n className={cx(\n 'text-sm text-tertiary',\n size === 'sm' && 'text-xs',\n 'in-data-[input-size=sm]:text-xs',\n isInvalid && 'text-error-primary',\n 'group-invalid:text-error-primary',\n className,\n )}\n />\n );\n});\n\nHintText.displayName = 'HintText';\n\nexport interface InputBaseProps extends Omit<AriaInputProps, 'size'> {\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n placeholder?: string;\n iconClassName?: string;\n inputClassName?: string;\n wrapperClassName?: string;\n groupRef?: Ref<HTMLDivElement>;\n icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;\n}\n\ninterface TextFieldContextProps\n extends Partial<\n Pick<InputBaseProps, 'size' | 'wrapperClassName' | 'inputClassName' | 'iconClassName'>\n > {}\n\nconst TextFieldContext = createContext<TextFieldContextProps>({});\n\nconst inputSizes = {\n sm: {\n root: (hasLeading: boolean, hasTrailing: boolean) =>\n cx('px-3 py-2 text-sm', hasLeading && 'pl-9', hasTrailing && 'pr-9'),\n iconLeading: 'left-3 size-4 stroke-[2.25px]',\n iconTrailing: 'right-3',\n },\n md: {\n root: (hasLeading: boolean, hasTrailing: boolean) =>\n cx('px-3 py-2 text-md', hasLeading && 'pl-10', hasTrailing && 'pr-9'),\n iconLeading: 'left-3 size-5',\n iconTrailing: 'right-3',\n },\n lg: {\n root: (hasLeading: boolean, hasTrailing: boolean) =>\n cx('px-3.5 py-2.5 text-md', hasLeading && 'pl-10.5', hasTrailing && 'pr-9.5'),\n iconLeading: 'left-3.5 size-5',\n iconTrailing: 'right-3.5',\n },\n};\n\nexport const InputBase = forwardRef<HTMLInputElement, InputBaseProps>(function InputBase(\n {\n groupRef,\n size = 'md',\n isInvalid,\n isDisabled,\n isRequired,\n icon: Icon,\n placeholder,\n wrapperClassName,\n inputClassName,\n iconClassName,\n type = 'text',\n ...inputProps\n },\n ref,\n) {\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n const hasTrailingIcon = Boolean(isInvalid) || type === 'password';\n const hasLeadingIcon = Boolean(Icon);\n\n const context = useContext(TextFieldContext);\n const inputSize = context.size ?? size;\n const sizeConfig = inputSizes[inputSize];\n\n return (\n <AriaGroup\n {...{ isDisabled, isInvalid }}\n ref={groupRef}\n className={({ isFocusWithin, isDisabled: disabled, isInvalid: invalid }) =>\n cx(\n 'group/input relative flex w-full flex-row place-content-center place-items-center rounded-lg bg-primary shadow-xs ring-1 ring-primary transition-shadow duration-100 ease-linear ring-inset',\n isFocusWithin && !disabled && 'ring-2 ring-focus-ring',\n disabled && 'cursor-not-allowed opacity-50',\n 'group-disabled:cursor-not-allowed group-disabled:opacity-50',\n invalid && 'ring-error_subtle',\n 'group-invalid:ring-error_subtle',\n invalid && isFocusWithin && 'ring-2 ring-error',\n isFocusWithin && 'group-invalid:ring-2 group-invalid:ring-error',\n context.wrapperClassName,\n wrapperClassName,\n )\n }\n >\n {Icon && (\n <Icon\n className={cx(\n 'pointer-events-none absolute text-fg-quaternary',\n sizeConfig.iconLeading,\n context.iconClassName,\n iconClassName,\n )}\n />\n )}\n\n <AriaInput\n {...inputProps}\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 sizeConfig.root(hasLeadingIcon, hasTrailingIcon),\n context.inputClassName,\n inputClassName,\n )}\n />\n\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 sizeConfig.iconTrailing,\n )}\n />\n )}\n\n {type === 'password' && (\n <AriaButton\n aria-label=\"Toggle password visibility\"\n onPress={() => setIsPasswordVisible((visible) => !visible)}\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 sizeConfig.iconTrailing,\n )}\n >\n {isPasswordVisible ? (\n <EyeOff className=\"size-4 stroke-[2.25px]\" />\n ) : (\n <Eye className=\"size-4 stroke-[2.25px]\" />\n )}\n </AriaButton>\n )}\n </AriaGroup>\n );\n});\n\nInputBase.displayName = 'InputBase';\n\nexport interface InputProps\n extends AriaTextFieldProps,\n Pick<\n InputBaseProps,\n | 'placeholder'\n | 'icon'\n | 'groupRef'\n | 'size'\n | 'wrapperClassName'\n | 'inputClassName'\n | 'iconClassName'\n > {\n label?: string;\n hint?: ReactNode;\n hideRequiredIndicator?: boolean;\n /** Tooltip content displayed next to the label. */\n tooltip?: ReactNode;\n /** Placement of the tooltip. @default 'top' */\n tooltipPlacement?: TooltipProps['placement'];\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n size = 'md',\n placeholder,\n icon: Icon,\n label,\n hint,\n hideRequiredIndicator,\n tooltip,\n tooltipPlacement,\n className,\n groupRef,\n iconClassName,\n inputClassName,\n wrapperClassName,\n type = 'text',\n ...props\n },\n ref,\n) {\n return (\n <AriaTextField\n aria-label={!label ? placeholder : undefined}\n {...props}\n data-input-wrapper\n data-input-size={size}\n className={(state) =>\n cx(\n 'group flex h-max w-full flex-col items-start justify-start gap-1.5',\n typeof className === 'function' ? className(state) : className,\n )\n }\n >\n {({ isRequired, isInvalid }) => (\n <>\n {(label || tooltip) && (\n <div className=\"flex w-full items-center justify-between gap-1\">\n {label && (\n <Label\n isRequired={hideRequiredIndicator ? !hideRequiredIndicator : isRequired}\n isInvalid={isInvalid}\n >\n {label}\n </Label>\n )}\n\n {tooltip && (\n <Tooltip title={tooltip} placement={tooltipPlacement ?? 'top'}>\n <TooltipTrigger className=\"text-fg-quaternary hover:text-fg-quaternary_hover\">\n <HelpCircle aria-hidden=\"true\" className=\"size-4\" />\n <span className=\"sr-only\">More information</span>\n </TooltipTrigger>\n </Tooltip>\n )}\n </div>\n )}\n\n <InputBase\n ref={ref}\n groupRef={groupRef}\n size={size}\n placeholder={placeholder}\n icon={Icon}\n iconClassName={iconClassName}\n inputClassName={inputClassName}\n wrapperClassName={wrapperClassName}\n isInvalid={isInvalid}\n isRequired={isRequired}\n type={type}\n />\n\n {hint && <HintText isInvalid={isInvalid}>{hint}</HintText>}\n </>\n )}\n </AriaTextField>\n );\n});\n\nInput.displayName = 'Input';\n"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AAY,UACV,GACE,sEACA,OAAO,cAAc,aAAa,UAAU,KAAK,IAAI,SACvD;EAGA,WAAA,EAAE,YAAY,gBACd,qBAAA,UAAA,EAAA,UAAA;IACI,SAAS,YACT,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,SACC,oBAAC,OAAD;KACE,YAAY,wBAAwB,CAAC,wBAAwB;KAClD;KAEV,UAAA;IACI,CAAA,GAGR,WACC,oBAACC,WAAD;KAAS,OAAO;KAAS,WAAW,oBAAoB;KACtD,UAAA,qBAACC,kBAAD;MAAgB,WAAU;MAA1B,UAAA,CACE,oBAAC,YAAD;OAAY,eAAY;OAAO,WAAU;MAAU,CAAA,GACnD,oBAAC,QAAD;OAAM,WAAU;OAAU,UAAA;MAAsB,CAAA,CAClC;;IACT,CAAA,CAER;;GAGP,oBAAC,WAAD;IACO;IACK;IACJ;IACO;IACb,MAAM;IACS;IACC;IACE;IACP;IACC;IACN;GACP,CAAA;GAEA,QAAQ,oBAAC,UAAD;IAAqB;IAAY,UAAA;GAAe,CAAA;EACzD,EAAA,CAAA;CAES,CAAA;AAEnB,CAAC;AAED,MAAM,cAAc"}
@@ -0,0 +1,2 @@
1
+ import { Dialog, DialogTrigger, Modal, ModalOverlay } from "./modal.js";
2
+ export { Dialog, DialogTrigger, Modal, ModalOverlay };
@@ -0,0 +1,2 @@
1
+ import { Dialog, DialogTrigger, Modal, ModalOverlay } from "./modal.js";
2
+ export { Dialog, DialogTrigger, Modal, ModalOverlay };
@@ -0,0 +1,8 @@
1
+ import { DialogProps, DialogTrigger as DialogTrigger$1, ModalOverlayProps } from "react-aria-components";
2
+ //#region src/modal/modal.d.ts
3
+ export declare const DialogTrigger: typeof DialogTrigger$1;
4
+ export declare const ModalOverlay: import("react").ForwardRefExoticComponent<ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ export declare const Modal: import("react").ForwardRefExoticComponent<ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ //#endregion
8
+ //# sourceMappingURL=modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.d.ts","names":[],"sources":["../../src/modal/modal.tsx"],"mappings":";;qBAgBa,sBAAa;qBAEb,8BAAY,0BAAA,oCAAA,cAAA;qBAqBZ,uBAAK,0BAAA,oCAAA,cAAA;qBAmBL,wBAAM,0BAAA,8BAAA,cAAA"}
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { cx } from "../utils/cx.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Dialog as Dialog$1, DialogTrigger as DialogTrigger$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1 } from "react-aria-components";
6
+ //#region src/modal/modal.tsx
7
+ const DialogTrigger = DialogTrigger$1;
8
+ const ModalOverlay = forwardRef(function ModalOverlay(props, ref) {
9
+ return /* @__PURE__ */ jsx(ModalOverlay$1, {
10
+ ...props,
11
+ ref,
12
+ className: (state) => cx("fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8", "pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]", state.isEntering && "duration-300 ease-out animate-in fade-in", state.isExiting && "duration-200 ease-in animate-out fade-out", typeof props.className === "function" ? props.className(state) : props.className)
13
+ });
14
+ });
15
+ ModalOverlay.displayName = "ModalOverlay";
16
+ const Modal = forwardRef(function Modal(props, ref) {
17
+ return /* @__PURE__ */ jsx(Modal$1, {
18
+ ...props,
19
+ ref,
20
+ className: (state) => cx("rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl", "max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]", state.isEntering && "duration-300 ease-out animate-in zoom-in-95", state.isExiting && "duration-200 ease-in animate-out zoom-out-95", typeof props.className === "function" ? props.className(state) : props.className)
21
+ });
22
+ });
23
+ Modal.displayName = "Modal";
24
+ const Dialog = forwardRef(function Dialog(props, ref) {
25
+ return /* @__PURE__ */ jsx(Dialog$1, {
26
+ ...props,
27
+ ref,
28
+ className: cx("relative max-h-[inherit] w-full overflow-y-auto outline-hidden", props.className)
29
+ });
30
+ });
31
+ Dialog.displayName = "Dialog";
32
+ //#endregion
33
+ export { Dialog, DialogTrigger, Modal, ModalOverlay };
34
+
35
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","names":["AriaDialogTrigger","AriaModalOverlay","AriaModal","AriaDialog"],"sources":["../../src/modal/modal.tsx"],"sourcesContent":["'use client';\n/* @kavagy-source: untitledui/application/modals/modal.tsx */\n\nimport { forwardRef } from 'react';\nimport type {\n DialogProps as AriaDialogProps,\n ModalOverlayProps as AriaModalOverlayProps,\n} from 'react-aria-components';\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n Modal as AriaModal,\n ModalOverlay as AriaModalOverlay,\n} from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport const DialogTrigger = AriaDialogTrigger;\n\nexport const ModalOverlay = forwardRef<HTMLDivElement, AriaModalOverlayProps>(\n function ModalOverlay(props, ref) {\n return (\n <AriaModalOverlay\n {...props}\n ref={ref}\n className={(state) =>\n cx(\n 'fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8',\n 'pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]',\n state.isEntering && 'duration-300 ease-out animate-in fade-in',\n state.isExiting && 'duration-200 ease-in animate-out fade-out',\n typeof props.className === 'function' ? props.className(state) : props.className,\n )\n }\n />\n );\n },\n);\nModalOverlay.displayName = 'ModalOverlay';\n\nexport const Modal = forwardRef<HTMLDivElement, AriaModalOverlayProps>(function Modal(props, ref) {\n return (\n <AriaModal\n {...props}\n ref={ref}\n className={(state) =>\n cx(\n 'rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl',\n 'max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]',\n state.isEntering && 'duration-300 ease-out animate-in zoom-in-95',\n state.isExiting && 'duration-200 ease-in animate-out zoom-out-95',\n typeof props.className === 'function' ? props.className(state) : props.className,\n )\n }\n />\n );\n});\nModal.displayName = 'Modal';\n\nexport const Dialog = forwardRef<HTMLDivElement, AriaDialogProps>(function Dialog(props, ref) {\n return (\n <AriaDialog\n {...props}\n ref={ref}\n className={cx(\n 'relative max-h-[inherit] w-full overflow-y-auto outline-hidden',\n props.className,\n )}\n />\n );\n});\nDialog.displayName = 'Dialog';\n"],"mappings":";;;;;;AAgBA,MAAa,gBAAgBA;AAE7B,MAAa,eAAe,WAC1B,SAAS,aAAa,OAAO,KAAK;CAChC,OACE,oBAACC,gBAAD;EACE,GAAI;EACC;EACL,YAAY,UACV,GACE,qKACA,iIACA,MAAM,cAAc,4CACpB,MAAM,aAAa,6CACnB,OAAO,MAAM,cAAc,aAAa,MAAM,UAAU,KAAK,IAAI,MAAM,SACzE;CAEH,CAAA;AAEL,CACF;AACA,aAAa,cAAc;AAE3B,MAAa,QAAQ,WAAkD,SAAS,MAAM,OAAO,KAAK;CAChG,OACE,oBAACC,SAAD;EACE,GAAI;EACC;EACL,YAAY,UACV,GACE,qGACA,+EACA,MAAM,cAAc,+CACpB,MAAM,aAAa,gDACnB,OAAO,MAAM,cAAc,aAAa,MAAM,UAAU,KAAK,IAAI,MAAM,SACzE;CAEH,CAAA;AAEL,CAAC;AACD,MAAM,cAAc;AAEpB,MAAa,SAAS,WAA4C,SAAS,OAAO,OAAO,KAAK;CAC5F,OACE,oBAACC,UAAD;EACE,GAAI;EACC;EACL,WAAW,GACT,kEACA,MAAM,SACR;CACD,CAAA;AAEL,CAAC;AACD,OAAO,cAAc"}
@@ -0,0 +1,2 @@
1
+ import { RadioButton, RadioButtonBase, RadioButtonBaseProps, RadioButtonProps, RadioGroup, RadioGroupContextType, RadioGroupProps } from "./radio-buttons.js";
2
+ export { RadioButton, RadioButtonBase, type RadioButtonBaseProps, type RadioButtonProps, RadioGroup, type RadioGroupContextType, type RadioGroupProps };
@@ -0,0 +1,2 @@
1
+ import { RadioButton, RadioButtonBase, RadioGroup } from "./radio-buttons.js";
2
+ export { RadioButton, RadioButtonBase, RadioGroup };
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from "react";
2
+ import { RadioGroupProps as RadioGroupProps$1, RadioProps } from "react-aria-components";
3
+ //#region src/radio-buttons/radio-buttons.d.ts
4
+ export interface RadioGroupContextType {
5
+ size?: 'sm' | 'md';
6
+ }
7
+ export interface RadioButtonBaseProps {
8
+ size?: 'sm' | 'md';
9
+ className?: string;
10
+ isFocusVisible?: boolean;
11
+ isSelected?: boolean;
12
+ isDisabled?: boolean;
13
+ }
14
+ export declare const RadioButtonBase: {
15
+ ({ className, isFocusVisible, isSelected, isDisabled, size }: RadioButtonBaseProps): import("react").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export interface RadioButtonProps extends RadioProps {
19
+ size?: 'sm' | 'md';
20
+ label?: ReactNode;
21
+ hint?: ReactNode;
22
+ }
23
+ export declare const RadioButton: import("react").ForwardRefExoticComponent<RadioButtonProps & import("react").RefAttributes<HTMLLabelElement>>;
24
+ export interface RadioGroupProps extends RadioGroupContextType, RadioGroupProps$1 {
25
+ children: ReactNode;
26
+ className?: string;
27
+ }
28
+ export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
29
+ //#endregion
30
+ //# sourceMappingURL=radio-buttons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-buttons.d.ts","names":[],"sources":["../../src/radio-buttons/radio-buttons.tsx"],"mappings":";;;iBAaiB;EACf;;iBAKe;EACf;EACA;EACA;EACA;EACA;;qBAGW;KAMV,WAAA,gBAAA,YAAA,YAAA,QAAA,uCAAoB,IAAA;;;iBA+BN,yBAAyB;EACxC;EACA,QAAQ;EACR,OAAO;;qBAGI,6BAAW,0BAAA,mCAAA,cAAA;iBAwDP,wBAAwB,uBAAuB;EAC9D,UAAU;EACV;;qBAGW,4BAAU,0BAAA,kCAAA,cAAA"}
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { cx } from "../utils/cx.js";
3
+ import { createContext, forwardRef, useContext } from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { Radio, RadioGroup as RadioGroup$1 } from "react-aria-components";
6
+ //#region src/radio-buttons/radio-buttons.tsx
7
+ const RadioGroupContext = createContext(null);
8
+ const RadioButtonBase = ({ className, isFocusVisible, isSelected, isDisabled, size = "sm" }) => {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ className: cx("flex size-4 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-full bg-primary ring-1 ring-primary ring-inset", size === "md" && "size-5", isSelected && "bg-brand-solid ring-brand-solid", isDisabled && "cursor-not-allowed opacity-50", isDisabled && !isSelected && "bg-tertiary", isFocusVisible && "outline-2 outline-offset-2 outline-focus-ring", className),
11
+ children: /* @__PURE__ */ jsx("div", { className: cx("size-1.5 rounded-full bg-fg-white opacity-0 transition-inherit-all", size === "md" && "size-2", isSelected && "opacity-100") })
12
+ });
13
+ };
14
+ RadioButtonBase.displayName = "RadioButtonBase";
15
+ const radioSizes = {
16
+ sm: {
17
+ root: "gap-2",
18
+ textWrapper: "",
19
+ label: "text-sm font-medium",
20
+ hint: "text-sm"
21
+ },
22
+ md: {
23
+ root: "gap-3",
24
+ textWrapper: "gap-0.5",
25
+ label: "text-md font-medium",
26
+ hint: "text-md"
27
+ }
28
+ };
29
+ const RadioButton = forwardRef(function RadioButton({ label, hint, className, size, ...ariaRadioProps }, ref) {
30
+ const context = useContext(RadioGroupContext);
31
+ const resolvedSize = size ?? context?.size ?? "sm";
32
+ return /* @__PURE__ */ jsx(Radio, {
33
+ ...ariaRadioProps,
34
+ ref,
35
+ className: (state) => cx("flex items-start", state.isDisabled && "cursor-not-allowed", radioSizes[resolvedSize].root, typeof className === "function" ? className(state) : className),
36
+ children: ({ isSelected, isDisabled, isFocusVisible }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(RadioButtonBase, {
37
+ size: resolvedSize,
38
+ isSelected,
39
+ isDisabled,
40
+ isFocusVisible,
41
+ className: label || hint ? "mt-0.5" : ""
42
+ }), (label || hint) && /* @__PURE__ */ jsxs("div", {
43
+ className: cx("inline-flex flex-col", radioSizes[resolvedSize].textWrapper),
44
+ children: [label && /* @__PURE__ */ jsx("p", {
45
+ className: cx("text-secondary select-none", radioSizes[resolvedSize].label),
46
+ children: label
47
+ }), hint && /* @__PURE__ */ jsx("span", {
48
+ className: cx("text-tertiary", radioSizes[resolvedSize].hint),
49
+ onClick: (event) => event.stopPropagation(),
50
+ children: hint
51
+ })]
52
+ })] })
53
+ });
54
+ });
55
+ RadioButton.displayName = "RadioButton";
56
+ const RadioGroup = forwardRef(function RadioGroup({ children, className, size = "sm", ...props }, ref) {
57
+ return /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
58
+ value: { size },
59
+ children: /* @__PURE__ */ jsx(RadioGroup$1, {
60
+ ...props,
61
+ ref,
62
+ className: cx("flex flex-col gap-4", className),
63
+ children
64
+ })
65
+ });
66
+ });
67
+ RadioGroup.displayName = "RadioGroup";
68
+ //#endregion
69
+ export { RadioButton, RadioButtonBase, RadioGroup };
70
+
71
+ //# sourceMappingURL=radio-buttons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-buttons.js","names":["AriaRadio","AriaRadioGroup"],"sources":["../../src/radio-buttons/radio-buttons.tsx"],"sourcesContent":["'use client';\n\n/* @kavagy-source: untitledui/base/radio-buttons/radio-buttons.tsx */\n\nimport type { ReactNode } from 'react';\nimport { createContext, forwardRef, useContext } from 'react';\nimport type {\n RadioGroupProps as AriaRadioGroupProps,\n RadioProps as AriaRadioProps,\n} from 'react-aria-components';\nimport { Radio as AriaRadio, RadioGroup as AriaRadioGroup } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface RadioGroupContextType {\n size?: 'sm' | 'md';\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextType | null>(null);\n\nexport interface RadioButtonBaseProps {\n size?: 'sm' | 'md';\n className?: string;\n isFocusVisible?: boolean;\n isSelected?: boolean;\n isDisabled?: boolean;\n}\n\nexport const RadioButtonBase = ({\n className,\n isFocusVisible,\n isSelected,\n isDisabled,\n size = 'sm',\n}: RadioButtonBaseProps) => {\n return (\n <div\n className={cx(\n 'flex size-4 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-full bg-primary ring-1 ring-primary ring-inset',\n size === 'md' && 'size-5',\n isSelected && 'bg-brand-solid ring-brand-solid',\n isDisabled && 'cursor-not-allowed opacity-50',\n isDisabled && !isSelected && 'bg-tertiary',\n isFocusVisible && 'outline-2 outline-offset-2 outline-focus-ring',\n className,\n )}\n >\n <div\n className={cx(\n 'size-1.5 rounded-full bg-fg-white opacity-0 transition-inherit-all',\n size === 'md' && 'size-2',\n isSelected && 'opacity-100',\n )}\n />\n </div>\n );\n};\n\nRadioButtonBase.displayName = 'RadioButtonBase';\n\nconst radioSizes = {\n sm: { root: 'gap-2', textWrapper: '', label: 'text-sm font-medium', hint: 'text-sm' },\n md: { root: 'gap-3', textWrapper: 'gap-0.5', label: 'text-md font-medium', hint: 'text-md' },\n};\n\nexport interface RadioButtonProps extends AriaRadioProps {\n size?: 'sm' | 'md';\n label?: ReactNode;\n hint?: ReactNode;\n}\n\nexport const RadioButton = forwardRef<HTMLLabelElement, RadioButtonProps>(function RadioButton(\n { label, hint, className, size, ...ariaRadioProps },\n ref,\n) {\n const context = useContext(RadioGroupContext);\n const resolvedSize = size ?? context?.size ?? 'sm';\n\n return (\n <AriaRadio\n {...ariaRadioProps}\n ref={ref}\n className={(state) =>\n cx(\n 'flex items-start',\n state.isDisabled && 'cursor-not-allowed',\n radioSizes[resolvedSize].root,\n typeof className === 'function' ? className(state) : className,\n )\n }\n >\n {({ isSelected, isDisabled, isFocusVisible }) => (\n <>\n <RadioButtonBase\n size={resolvedSize}\n isSelected={isSelected}\n isDisabled={isDisabled}\n isFocusVisible={isFocusVisible}\n className={label || hint ? 'mt-0.5' : ''}\n />\n {(label || hint) && (\n <div className={cx('inline-flex flex-col', radioSizes[resolvedSize].textWrapper)}>\n {label && (\n <p className={cx('text-secondary select-none', radioSizes[resolvedSize].label)}>\n {label}\n </p>\n )}\n {hint && (\n // biome-ignore lint/a11y/noStaticElementInteractions: stops the click bubbling to the label so selecting the hint text doesn't toggle the radio.\n // biome-ignore lint/a11y/useKeyWithClickEvents: not a keyboard-operable control, purely stops propagation.\n <span\n className={cx('text-tertiary', radioSizes[resolvedSize].hint)}\n onClick={(event) => event.stopPropagation()}\n >\n {hint}\n </span>\n )}\n </div>\n )}\n </>\n )}\n </AriaRadio>\n );\n});\n\nRadioButton.displayName = 'RadioButton';\n\nexport interface RadioGroupProps extends RadioGroupContextType, AriaRadioGroupProps {\n children: ReactNode;\n className?: string;\n}\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(function RadioGroup(\n { children, className, size = 'sm', ...props },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ size }}>\n <AriaRadioGroup {...props} ref={ref} className={cx('flex flex-col gap-4', className)}>\n {children}\n </AriaRadioGroup>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"mappings":";;;;;;AAiBA,MAAM,oBAAoB,cAA4C,IAAI;AAU1E,MAAa,mBAAmB,EAC9B,WACA,gBACA,YACA,YACA,OAAO,WACmB;CAC1B,OACE,oBAAC,OAAD;E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,CAAC;AAED,YAAY,cAAc;AAO1B,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,UAAU,WAAW,OAAO,MAAM,GAAG,SACvC,KACA;CACA,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO,EAAE,KAAK;EACxC,UAAA,oBAACC,cAAD;GAAgB,GAAI;GAAY;GAAK,WAAW,GAAG,uBAAuB,SAAS;GAChF;EACa,CAAA;CACU,CAAA;AAEhC,CAAC;AAED,WAAW,cAAc"}
@@ -0,0 +1,2 @@
1
+ import { CommonProps, Select, SelectItem, SelectItemProps, SelectItemType, SelectProps } from "./select.js";
2
+ export { type CommonProps, Select, SelectItem, type SelectItemProps, type SelectItemType, type SelectProps };
@@ -0,0 +1,2 @@
1
+ import { Select, SelectItem } from "./select.js";
2
+ export { Select, SelectItem };
@@ -0,0 +1,40 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { ListBoxItemProps, SelectProps as SelectProps$1 } from "react-aria-components";
3
+ //#region src/select/select.d.ts
4
+ export type SelectItemType = {
5
+ id: string | number;
6
+ label?: string;
7
+ isDisabled?: boolean;
8
+ supportingText?: string;
9
+ icon?: FC | ReactNode;
10
+ avatarUrl?: string;
11
+ };
12
+ export interface CommonProps {
13
+ hint?: string;
14
+ label?: string;
15
+ size?: 'sm' | 'md' | 'lg';
16
+ placeholder?: string;
17
+ hideRequiredIndicator?: boolean;
18
+ }
19
+ export interface SelectItemProps extends Omit<ListBoxItemProps<SelectItemType>, 'id'>, SelectItemType {
20
+ selectionIndicator?: 'checkmark' | 'checkbox' | 'none';
21
+ selectionIndicatorAlign?: 'left' | 'right';
22
+ }
23
+ export declare const SelectItem: {
24
+ ({ label, id, value, supportingText, isDisabled, icon: Icon, avatarUrl, className, children, selectionIndicator, selectionIndicatorAlign, ...props }: SelectItemProps): import("react").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export interface SelectProps extends Omit<SelectProps$1<SelectItemType>, 'children' | 'items'>, CommonProps {
28
+ items?: SelectItemType[];
29
+ popoverClassName?: string;
30
+ icon?: FC | ReactNode;
31
+ children: ReactNode | ((item: SelectItemType) => ReactNode);
32
+ }
33
+ export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLDivElement>> & {
34
+ Item: {
35
+ ({ label, id, value, supportingText, isDisabled, icon: Icon, avatarUrl, className, children, selectionIndicator, selectionIndicatorAlign, ...props }: SelectItemProps): import("react").JSX.Element;
36
+ displayName: string;
37
+ };
38
+ };
39
+ //#endregion
40
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","names":[],"sources":["../../src/select/select.tsx"],"mappings":";;;YA2BY;EACV;EACA;EACA;EACA;EACA,OAAO,KAAK;EACZ;;iBAGe;EACf;EACA;EACA;EACA;EACA;;iBAoEe,wBACP,KAAK,iBAAqB,wBAChC;EACF;EACA;;qBAGW;KAaV,OAAA,IAAA,OAAA,gBAAA,YAAA,MAAA,MAAA,WAAA,WAAA,UAAA,oBAAA,4BAAA,SAAA,kCAAe,IAAA;;;iBAyGD,oBACP,KAAK,cAAgB,wCAC3B;EACF,QAAQ;EACR;EACA,OAAO,KAAK;EACZ,UAAU,cAAc,MAAM,mBAAmB;;qBAkItC,wBAAM,0BAAA,8BAAA,cAAA;;OAjPhB,OAAA,IAAA,OAAA,gBAAA,YAAA,MAAA,MAAA,WAAA,WAAA,UAAA,oBAAA,4BAAA,SAAA,kCAAe,IAAA"}
@@ -0,0 +1,198 @@
1
+ "use client";
2
+ import { cx } from "../utils/cx.js";
3
+ import { Avatar } from "../avatar/avatar.js";
4
+ import "../avatar/index.js";
5
+ import { isReactComponent } from "../utils/is-react-component.js";
6
+ import { CheckboxBase } from "../checkbox/checkbox.js";
7
+ import "../checkbox/index.js";
8
+ import { HintText, Label as Label$1 } from "../input/input.js";
9
+ import "../input/index.js";
10
+ import { Check, ChevronDown } from "@kavagy/icons";
11
+ import { createContext, forwardRef, isValidElement, useContext } from "react";
12
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
+ import { Button, ListBox, ListBoxItem, Popover, Select as Select$1, SelectValue, Text } from "react-aria-components";
14
+ //#region src/select/select.tsx
15
+ const selectSizes = {
16
+ sm: {
17
+ root: "py-2 pl-3 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]",
18
+ text: "text-sm",
19
+ textContainer: "gap-x-1.5"
20
+ },
21
+ md: {
22
+ root: "py-2 px-3 gap-2 *:data-icon:size-5",
23
+ text: "text-md",
24
+ textContainer: "gap-x-1.5"
25
+ },
26
+ lg: {
27
+ root: "py-2.5 px-3.5 gap-2 *:data-icon:size-5",
28
+ text: "text-md",
29
+ textContainer: "gap-x-1.5"
30
+ }
31
+ };
32
+ const itemSizes = {
33
+ sm: {
34
+ root: "p-2 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]",
35
+ text: "text-sm",
36
+ textContainer: "gap-x-1.5",
37
+ check: "size-4 stroke-[2.25px]"
38
+ },
39
+ md: {
40
+ root: "p-2 pr-2.5 gap-2 *:data-icon:size-5",
41
+ text: "text-md",
42
+ textContainer: "gap-x-2",
43
+ check: "size-5"
44
+ },
45
+ lg: {
46
+ root: "p-2.5 pl-2 gap-2 *:data-icon:size-5",
47
+ text: "text-md",
48
+ textContainer: "gap-x-2",
49
+ check: "size-5"
50
+ }
51
+ };
52
+ const SelectContext = createContext({ size: "md" });
53
+ const SelectPopover = ({ size, ...props }) => {
54
+ return /* @__PURE__ */ jsx(Popover, {
55
+ placement: "bottom",
56
+ containerPadding: 0,
57
+ offset: 4,
58
+ ...props,
59
+ className: (state) => cx("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", 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", 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", size === "sm" && "max-h-56!", size === "md" && "max-h-64!", size === "lg" && "max-h-80!", typeof props.className === "function" ? props.className(state) : props.className)
60
+ });
61
+ };
62
+ const SelectItem = ({ label, id, value, supportingText, isDisabled, icon: Icon, avatarUrl, className, children, selectionIndicator = "checkmark", selectionIndicatorAlign = "right", ...props }) => {
63
+ const { size } = useContext(SelectContext);
64
+ const labelOrChildren = label || (typeof children === "string" ? children : "");
65
+ const textValue = supportingText ? `${labelOrChildren} ${supportingText}` : labelOrChildren;
66
+ const isLeft = selectionIndicatorAlign === "left";
67
+ return /* @__PURE__ */ jsx(ListBoxItem, {
68
+ id,
69
+ value: value ?? {
70
+ id,
71
+ label: labelOrChildren,
72
+ supportingText,
73
+ isDisabled,
74
+ icon: Icon,
75
+ avatarUrl
76
+ },
77
+ textValue,
78
+ isDisabled,
79
+ ...props,
80
+ className: (state) => cx("w-full py-px outline-hidden", size === "sm" ? "px-1" : "px-1.5", typeof className === "function" ? className(state) : className),
81
+ children: (state) => /* @__PURE__ */ jsxs("div", {
82
+ className: cx("flex cursor-pointer items-center rounded-md outline-hidden select-none", (state.isFocused || state.isHovered || state.isSelected && selectionIndicator !== "checkbox") && "bg-primary_hover", state.isDisabled && "cursor-not-allowed opacity-50", state.isFocusVisible && "ring-2 ring-focus-ring ring-inset", "*:data-icon:shrink-0 *:data-icon:text-fg-quaternary", itemSizes[size].root),
83
+ children: [
84
+ isLeft && selectionIndicator === "checkbox" && /* @__PURE__ */ jsx(CheckboxBase, {
85
+ size: size === "lg" ? "md" : "sm",
86
+ isSelected: state.isSelected,
87
+ isDisabled: state.isDisabled
88
+ }),
89
+ avatarUrl ? /* @__PURE__ */ jsx(Avatar, {
90
+ src: avatarUrl,
91
+ alt: "",
92
+ size: "xs",
93
+ className: cx("shrink-0", size === "lg" && "size-5")
94
+ }) : isReactComponent(Icon) ? /* @__PURE__ */ jsx(Icon, {
95
+ "data-icon": true,
96
+ "aria-hidden": "true"
97
+ }) : isValidElement(Icon) ? Icon : null,
98
+ /* @__PURE__ */ jsxs("div", {
99
+ className: cx("flex w-full min-w-0 flex-1 flex-wrap", itemSizes[size].textContainer),
100
+ children: [/* @__PURE__ */ jsx(Text, {
101
+ slot: "label",
102
+ className: cx("truncate font-medium whitespace-nowrap text-primary", itemSizes[size].text),
103
+ children: label || (typeof children === "function" ? children(state) : children)
104
+ }), supportingText && /* @__PURE__ */ jsx(Text, {
105
+ slot: "description",
106
+ className: cx("whitespace-nowrap text-tertiary", itemSizes[size].text),
107
+ children: supportingText
108
+ })]
109
+ }),
110
+ state.isSelected && selectionIndicator === "checkmark" && /* @__PURE__ */ jsx(Check, {
111
+ "aria-hidden": "true",
112
+ className: cx("ml-auto text-fg-brand-primary", itemSizes[size].check)
113
+ }),
114
+ !isLeft && selectionIndicator === "checkbox" && /* @__PURE__ */ jsx(CheckboxBase, {
115
+ size: size === "lg" ? "md" : "sm",
116
+ isSelected: state.isSelected,
117
+ isDisabled: state.isDisabled,
118
+ className: "ml-auto"
119
+ })
120
+ ]
121
+ })
122
+ });
123
+ };
124
+ SelectItem.displayName = "SelectItem";
125
+ const SelectBase = forwardRef(function Select({ placeholder = "Select", icon, size = "md", children, items, label, hint, hideRequiredIndicator, className, popoverClassName, ...rest }, ref) {
126
+ return /* @__PURE__ */ jsx(SelectContext.Provider, {
127
+ value: { size },
128
+ children: /* @__PURE__ */ jsx(Select$1, {
129
+ ...rest,
130
+ ref,
131
+ className: (state) => cx("flex flex-col gap-1.5", typeof className === "function" ? className(state) : className),
132
+ children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [
133
+ label && /* @__PURE__ */ jsx(Label$1, {
134
+ isRequired: hideRequiredIndicator ? false : state.isRequired,
135
+ children: label
136
+ }),
137
+ /* @__PURE__ */ jsx(Button, {
138
+ className: cx("relative flex w-full cursor-pointer items-center rounded-lg bg-primary shadow-xs ring-1 ring-primary outline-hidden transition duration-100 ease-linear ring-inset", (state.isFocused || state.isOpen) && "ring-2 ring-focus-ring", state.isDisabled && "cursor-not-allowed opacity-50"),
139
+ children: /* @__PURE__ */ jsx(SelectValue, {
140
+ className: (valueState) => cx("flex h-max w-full items-center justify-start truncate text-left align-middle", selectSizes[size].root, (valueState.selectedItems[0]?.icon || icon) && "", "*:data-icon:shrink-0 *:data-icon:text-fg-quaternary"),
141
+ children: (valueState) => {
142
+ const selectedItem = valueState.selectedItems[0];
143
+ const Icon = selectedItem?.icon || icon;
144
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
145
+ selectedItem?.avatarUrl ? /* @__PURE__ */ jsx(Avatar, {
146
+ src: selectedItem.avatarUrl,
147
+ alt: "",
148
+ size: "xs",
149
+ className: cx("shrink-0", size === "lg" && "size-5")
150
+ }) : isReactComponent(Icon) ? /* @__PURE__ */ jsx(Icon, {
151
+ "data-icon": true,
152
+ "aria-hidden": "true"
153
+ }) : isValidElement(Icon) ? Icon : null,
154
+ selectedItem ? /* @__PURE__ */ jsxs("section", {
155
+ className: cx("flex w-full truncate", selectSizes[size].textContainer),
156
+ children: [/* @__PURE__ */ jsx("p", {
157
+ className: cx("truncate font-medium text-primary", selectSizes[size].text),
158
+ children: selectedItem.label
159
+ }), selectedItem.supportingText && /* @__PURE__ */ jsx("p", {
160
+ className: cx("text-tertiary", selectSizes[size].text),
161
+ children: selectedItem.supportingText
162
+ })]
163
+ }) : /* @__PURE__ */ jsx("p", {
164
+ className: cx("text-placeholder", selectSizes[size].text),
165
+ children: placeholder
166
+ }),
167
+ /* @__PURE__ */ jsx(ChevronDown, {
168
+ "aria-hidden": "true",
169
+ className: cx("ml-auto shrink-0 text-fg-quaternary", size === "lg" ? "size-5" : "size-4 stroke-[2.25px]")
170
+ })
171
+ ] });
172
+ }
173
+ })
174
+ }),
175
+ /* @__PURE__ */ jsx(SelectPopover, {
176
+ size,
177
+ className: popoverClassName,
178
+ children: /* @__PURE__ */ jsx(ListBox, {
179
+ items,
180
+ className: "size-full outline-hidden",
181
+ children
182
+ })
183
+ }),
184
+ hint && /* @__PURE__ */ jsx(HintText, {
185
+ isInvalid: state.isInvalid,
186
+ className: cx(size === "sm" && "text-xs"),
187
+ children: hint
188
+ })
189
+ ] })
190
+ })
191
+ });
192
+ });
193
+ SelectBase.displayName = "Select";
194
+ const Select = Object.assign(SelectBase, { Item: SelectItem });
195
+ //#endregion
196
+ export { Select, SelectItem };
197
+
198
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","names":["AriaPopover","AriaListBoxItem","AriaText","AriaSelect","Label","AriaButton","AriaSelectValue","AriaListBox"],"sources":["../../src/select/select.tsx"],"sourcesContent":["'use client';\n\n/* @kavagy-source: untitledui/base/select/select.tsx, base/select/select-shared.tsx, base/select/select-item.tsx, base/select/popover.tsx */\n\nimport { Check, ChevronDown } from '@kavagy/icons';\nimport type { FC, ReactNode } from 'react';\nimport { createContext, forwardRef, isValidElement, useContext } from 'react';\nimport type {\n ListBoxItemProps as AriaListBoxItemProps,\n PopoverProps as AriaPopoverProps,\n SelectProps as AriaSelectProps,\n} from 'react-aria-components';\nimport {\n Button as AriaButton,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n Popover as AriaPopover,\n Select as AriaSelect,\n SelectValue as AriaSelectValue,\n Text as AriaText,\n} from 'react-aria-components';\nimport { Avatar } from '../avatar';\nimport { CheckboxBase } from '../checkbox';\nimport { HintText, Label } from '../input';\nimport { cx } from '../utils/cx';\nimport { isReactComponent } from '../utils/is-react-component';\n\nexport type SelectItemType = {\n id: string | number;\n label?: string;\n isDisabled?: boolean;\n supportingText?: string;\n icon?: FC | ReactNode;\n avatarUrl?: string;\n};\n\nexport interface CommonProps {\n hint?: string;\n label?: string;\n size?: 'sm' | 'md' | 'lg';\n placeholder?: string;\n hideRequiredIndicator?: boolean;\n}\n\nconst selectSizes = {\n sm: {\n root: 'py-2 pl-3 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]',\n text: 'text-sm',\n textContainer: 'gap-x-1.5',\n },\n md: { root: 'py-2 px-3 gap-2 *:data-icon:size-5', text: 'text-md', textContainer: 'gap-x-1.5' },\n lg: {\n root: 'py-2.5 px-3.5 gap-2 *:data-icon:size-5',\n text: 'text-md',\n textContainer: 'gap-x-1.5',\n },\n};\n\nconst itemSizes = {\n sm: {\n root: 'p-2 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]',\n text: 'text-sm',\n textContainer: 'gap-x-1.5',\n check: 'size-4 stroke-[2.25px]',\n },\n md: {\n root: 'p-2 pr-2.5 gap-2 *:data-icon:size-5',\n text: 'text-md',\n textContainer: 'gap-x-2',\n check: 'size-5',\n },\n lg: {\n root: 'p-2.5 pl-2 gap-2 *:data-icon:size-5',\n text: 'text-md',\n textContainer: 'gap-x-2',\n check: 'size-5',\n },\n};\n\nconst SelectContext = createContext<{ size: 'sm' | 'md' | 'lg' }>({ size: 'md' });\n\ninterface SelectPopoverProps extends AriaPopoverProps {\n size: 'sm' | 'md' | 'lg';\n}\n\nconst SelectPopover = ({ size, ...props }: SelectPopoverProps) => {\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 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 size === 'sm' && 'max-h-56!',\n size === 'md' && 'max-h-64!',\n size === 'lg' && 'max-h-80!',\n typeof props.className === 'function' ? props.className(state) : props.className,\n )\n }\n />\n );\n};\n\nexport interface SelectItemProps\n extends Omit<AriaListBoxItemProps<SelectItemType>, 'id'>,\n SelectItemType {\n selectionIndicator?: 'checkmark' | 'checkbox' | 'none';\n selectionIndicatorAlign?: 'left' | 'right';\n}\n\nexport const SelectItem = ({\n label,\n id,\n value,\n supportingText,\n isDisabled,\n icon: Icon,\n avatarUrl,\n className,\n children,\n selectionIndicator = 'checkmark',\n selectionIndicatorAlign = 'right',\n ...props\n}: SelectItemProps) => {\n const { size } = useContext(SelectContext);\n\n const labelOrChildren = label || (typeof children === 'string' ? children : '');\n const textValue = supportingText ? `${labelOrChildren} ${supportingText}` : labelOrChildren;\n const isLeft = selectionIndicatorAlign === 'left';\n\n return (\n <AriaListBoxItem\n id={id}\n value={\n value ?? { id, label: labelOrChildren, supportingText, isDisabled, icon: Icon, avatarUrl }\n }\n textValue={textValue}\n isDisabled={isDisabled}\n {...props}\n className={(state) =>\n cx(\n 'w-full py-px outline-hidden',\n size === 'sm' ? 'px-1' : 'px-1.5',\n typeof className === 'function' ? className(state) : className,\n )\n }\n >\n {(state) => (\n <div\n className={cx(\n 'flex cursor-pointer items-center rounded-md outline-hidden select-none',\n (state.isFocused ||\n state.isHovered ||\n (state.isSelected && selectionIndicator !== 'checkbox')) &&\n 'bg-primary_hover',\n state.isDisabled && 'cursor-not-allowed opacity-50',\n state.isFocusVisible && 'ring-2 ring-focus-ring ring-inset',\n '*:data-icon:shrink-0 *:data-icon:text-fg-quaternary',\n itemSizes[size].root,\n )}\n >\n {isLeft && selectionIndicator === 'checkbox' && (\n <CheckboxBase\n size={size === 'lg' ? 'md' : 'sm'}\n isSelected={state.isSelected}\n isDisabled={state.isDisabled}\n />\n )}\n\n {avatarUrl ? (\n <Avatar\n src={avatarUrl}\n alt=\"\"\n size=\"xs\"\n className={cx('shrink-0', size === 'lg' && 'size-5')}\n />\n ) : isReactComponent(Icon) ? (\n <Icon data-icon aria-hidden=\"true\" />\n ) : isValidElement(Icon) ? (\n Icon\n ) : null}\n\n <div\n className={cx('flex w-full min-w-0 flex-1 flex-wrap', itemSizes[size].textContainer)}\n >\n <AriaText\n slot=\"label\"\n className={cx(\n 'truncate font-medium whitespace-nowrap text-primary',\n itemSizes[size].text,\n )}\n >\n {label || (typeof children === 'function' ? children(state) : children)}\n </AriaText>\n\n {supportingText && (\n <AriaText\n slot=\"description\"\n className={cx('whitespace-nowrap text-tertiary', itemSizes[size].text)}\n >\n {supportingText}\n </AriaText>\n )}\n </div>\n\n {state.isSelected && selectionIndicator === 'checkmark' && (\n <Check\n aria-hidden=\"true\"\n className={cx('ml-auto text-fg-brand-primary', itemSizes[size].check)}\n />\n )}\n\n {!isLeft && selectionIndicator === 'checkbox' && (\n <CheckboxBase\n size={size === 'lg' ? 'md' : 'sm'}\n isSelected={state.isSelected}\n isDisabled={state.isDisabled}\n className=\"ml-auto\"\n />\n )}\n </div>\n )}\n </AriaListBoxItem>\n );\n};\n\nSelectItem.displayName = 'SelectItem';\n\nexport interface SelectProps\n extends Omit<AriaSelectProps<SelectItemType>, 'children' | 'items'>,\n CommonProps {\n items?: SelectItemType[];\n popoverClassName?: string;\n icon?: FC | ReactNode;\n children: ReactNode | ((item: SelectItemType) => ReactNode);\n}\n\nconst SelectBase = forwardRef<HTMLDivElement, SelectProps>(function Select(\n {\n placeholder = 'Select',\n icon,\n size = 'md',\n children,\n items,\n label,\n hint,\n hideRequiredIndicator,\n className,\n popoverClassName,\n ...rest\n },\n ref,\n) {\n return (\n <SelectContext.Provider value={{ size }}>\n <AriaSelect\n {...rest}\n ref={ref}\n className={(state) =>\n cx(\n 'flex flex-col gap-1.5',\n typeof className === 'function' ? className(state) : className,\n )\n }\n >\n {(state) => (\n <>\n {label && (\n <Label isRequired={hideRequiredIndicator ? false : state.isRequired}>{label}</Label>\n )}\n\n <AriaButton\n className={cx(\n 'relative flex w-full cursor-pointer items-center rounded-lg bg-primary shadow-xs ring-1 ring-primary outline-hidden transition duration-100 ease-linear ring-inset',\n (state.isFocused || state.isOpen) && 'ring-2 ring-focus-ring',\n state.isDisabled && 'cursor-not-allowed opacity-50',\n )}\n >\n <AriaSelectValue<SelectItemType>\n className={(valueState) =>\n cx(\n 'flex h-max w-full items-center justify-start truncate text-left align-middle',\n selectSizes[size].root,\n (valueState.selectedItems[0]?.icon || icon) && '',\n '*:data-icon:shrink-0 *:data-icon:text-fg-quaternary',\n )\n }\n >\n {(valueState) => {\n const selectedItem = valueState.selectedItems[0];\n const Icon = selectedItem?.icon || icon;\n\n return (\n <>\n {selectedItem?.avatarUrl ? (\n <Avatar\n src={selectedItem.avatarUrl}\n alt=\"\"\n size=\"xs\"\n className={cx('shrink-0', size === 'lg' && 'size-5')}\n />\n ) : isReactComponent(Icon) ? (\n <Icon data-icon aria-hidden=\"true\" />\n ) : isValidElement(Icon) ? (\n Icon\n ) : null}\n\n {selectedItem ? (\n <section\n className={cx('flex w-full truncate', selectSizes[size].textContainer)}\n >\n <p\n className={cx(\n 'truncate font-medium text-primary',\n selectSizes[size].text,\n )}\n >\n {selectedItem.label}\n </p>\n {selectedItem.supportingText && (\n <p className={cx('text-tertiary', selectSizes[size].text)}>\n {selectedItem.supportingText}\n </p>\n )}\n </section>\n ) : (\n <p className={cx('text-placeholder', selectSizes[size].text)}>\n {placeholder}\n </p>\n )}\n\n <ChevronDown\n aria-hidden=\"true\"\n className={cx(\n 'ml-auto shrink-0 text-fg-quaternary',\n size === 'lg' ? 'size-5' : 'size-4 stroke-[2.25px]',\n )}\n />\n </>\n );\n }}\n </AriaSelectValue>\n </AriaButton>\n\n <SelectPopover size={size} className={popoverClassName}>\n <AriaListBox items={items} className=\"size-full outline-hidden\">\n {children}\n </AriaListBox>\n </SelectPopover>\n\n {hint && (\n <HintText isInvalid={state.isInvalid} className={cx(size === 'sm' && 'text-xs')}>\n {hint}\n </HintText>\n )}\n </>\n )}\n </AriaSelect>\n </SelectContext.Provider>\n );\n});\n\nSelectBase.displayName = 'Select';\n\nexport const Select = Object.assign(SelectB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