{"version":3,"sources":["../src/select-list.tsx"],"sourcesContent":["import type { CSSUIProps, HTMLUIProps } from \"@yamada-ui/core\"\nimport type { MotionPropsWithoutChildren } from \"@yamada-ui/motion\"\nimport type { ReactNode } from \"react\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { PopoverContent } from \"@yamada-ui/popover\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useSelectContext } from \"./use-select\"\nimport { useSelectList } from \"./use-select-list\"\n\nexport interface SelectListProps extends HTMLUIProps {\n  footer?: ReactNode\n  header?: ReactNode\n  contentProps?: MotionPropsWithoutChildren\n}\n\nexport const SelectList = forwardRef<SelectListProps, \"div\">(\n  (\n    {\n      className,\n      children,\n      footer,\n      header,\n      maxW,\n      maxWidth = maxW,\n      minW,\n      minWidth = minW,\n      w,\n      width = w,\n      contentProps,\n      ...rest\n    },\n    ref,\n  ) => {\n    const { styles } = useSelectContext()\n    const { getContainerProps, getListProps } = useSelectList()\n\n    width ??= (styles.list?.width ?? styles.list?.w) as CSSUIProps[\"width\"]\n    minWidth ??= (styles.list?.minWidth ??\n      styles.list?.minW) as CSSUIProps[\"minWidth\"]\n    maxWidth ??= (styles.list?.maxWidth ??\n      styles.list?.maxW) as CSSUIProps[\"maxWidth\"]\n\n    return (\n      <PopoverContent\n        as=\"div\"\n        className=\"ui-select__content\"\n        maxWidth={maxWidth}\n        minWidth={minWidth}\n        width={width}\n        __css={styles.content}\n        {...getContainerProps(contentProps)}\n      >\n        {header ? (\n          <ui.header className=\"ui-select__header\" __css={styles.header}>\n            {header}\n          </ui.header>\n        ) : null}\n\n        <ui.div\n          className={cx(\"ui-select__list\", className)}\n          __css={styles.list}\n          {...getListProps(rest, ref)}\n        >\n          {children}\n        </ui.div>\n\n        {footer ? (\n          <ui.footer className=\"ui-select__footer\" __css={styles.footer}>\n            {footer}\n          </ui.footer>\n        ) : null}\n      </PopoverContent>\n    )\n  },\n)\n\nSelectList.displayName = \"SelectList\"\nSelectList.__ui__ = \"Select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