{"version":3,"file":"select-CXE32pkl.js","sources":["../../../app/javascript/hardcover-ui/theme/components/select.ts"],"sourcesContent":["import { ComponentTheme } from \"hardcover-ui/types/base\";\n\nexport type SelectButtonThemeProps = {\n variant: \"normal\" | \"normalOpen\";\n size: \"sm\" | \"md\" | \"lg\";\n};\n\nconst selectBaseStyles =\n \"rounded-lg hover:bg-gray-100 dark:hover:bg-gray-900 relative w-full cursor-pointer text-left shadow-md border border-gray-300 dark:border-gray-600 flex flex-row items-center space-x-2 justify-between transition-all\";\nconst selectSizeBaseStyles = \"font-semibold leading-tight\";\nexport const selectButtonTheme: ComponentTheme = {\n variant: {\n normal: `${selectBaseStyles} bg-white dark:bg-gray-700`,\n normalOpen: `${selectBaseStyles} rounded-b-none bg-gray-100 dark:bg-gray-900`,\n },\n size: {\n sm: `${selectSizeBaseStyles} text-md sm:text-md sm:text-sm px-2 py-1`,\n md: `${selectSizeBaseStyles} text-md sm:text-lg sm:text-sm p-2`,\n lg: `${selectSizeBaseStyles} text-lg sm:text-xl sm:text-md p-2`,\n },\n};\n\nexport type SelectOptionsThemeProps = {\n variant: \"normal\";\n size: \"md\" | \"auto\";\n};\nconst selectOptionsBaseStyles =\n \"absolute -mt-[1px] rounded-t-none w-full overflow-auto rounded-md bg-gray-100 dark:bg-gray-900 py-1 text-base shadow-lg z-10 border border-gray-300 dark:border-gray-600 divide-y divide-gray-600\";\nexport const selectOptionsTheme: ComponentTheme = {\n variant: {\n normal: `${selectOptionsBaseStyles}`,\n },\n size: {\n auto: \"max-h-screen\",\n md: \"max-h-80 sm:text-sm\",\n },\n};\n\nexport type SelectOptionThemeProps = {\n variant: \"normal\" | \"normalActive\" | \"search\" | \"searchActive\";\n size: \"sm\" | \"md\" | \"lg\";\n};\nconst selectOptionBaseStyles = \"relative cursor-pointer select-none\";\nexport const selectOptionTheme: ComponentTheme = {\n variant: {\n normal: `${selectOptionBaseStyles} text-foreground`,\n normalActive: `${selectOptionBaseStyles} bg-accent text-accent-foreground`,\n search: `${selectOptionBaseStyles} text-gray-600 dark:text-gray-200 border-b border-gray-100 dark:border-gray-700`,\n searchActive: `${selectOptionBaseStyles} bg-gray-200 dark:bg-gray-900 border-b border-gray-100 dark:border-gray-700`,\n },\n size: {\n sm: \"\",\n md: \"py-2 px-4\",\n lg: \"\",\n },\n};\n"],"names":["selectBaseStyles","selectSizeBaseStyles","selectButtonTheme","selectOptionsBaseStyles","selectOptionsTheme","selectOptionBaseStyles","selectOptionTheme"],"mappings":"AAOA,MAAMA,EACJ,yNACIC,EAAuB,8BAChBC,EAA4D,CACvE,QAAS,CACP,OAAQ,GAAGF,CAAgB,6BAC3B,WAAY,GAAGA,CAAgB,8CACjC,EACA,KAAM,CACJ,GAAI,GAAGC,CAAoB,2CAC3B,GAAI,GAAGA,CAAoB,qCAC3B,GAAI,GAAGA,CAAoB,oCAC7B,CACF,EAMME,EACJ,oMACWC,EAA8D,CACzE,QAAS,CACP,OAAQ,GAAGD,CAAuB,EACpC,EACA,KAAM,CACJ,KAAM,eACN,GAAI,qBACN,CACF,EAMME,EAAyB,sCAClBC,EAA4D,CACvE,QAAS,CACP,OAAQ,GAAGD,CAAsB,mBACjC,aAAc,GAAGA,CAAsB,oCACvC,OAAQ,GAAGA,CAAsB,kFACjC,aAAc,GAAGA,CAAsB,6EACzC,EACA,KAAM,CACJ,GAAI,GACJ,GAAI,YACJ,GAAI,EACN,CACF"}