{"version":3,"file":"prop-bundles.cjs","names":[],"sources":["../../src/shared/prop-bundles.ts"],"sourcesContent":["import { prop } from '@vielzeug/ore';\n\nimport type { ComponentSize, ElevationLevel, RoundedSize, ThemeColor } from './types';\n\n/** Prop bundle for components that support a theme colour. */\nexport const themableBundle = {\n  color: prop.string<ThemeColor>(),\n};\n\n/** Prop bundle for components with discrete size variants. */\nexport const sizableBundle = {\n  size: prop.string<ComponentSize>(),\n};\n\n/** Prop bundle for interactive components that can be disabled. */\nexport const disablableBundle = {\n  disabled: prop.bool(false),\n};\n\n/** Prop bundle for components with a loading / busy state. */\nexport const loadableBundle = {\n  loading: prop.bool(false),\n};\n\n/** Prop bundle for components with configurable border-radius. */\nexport const roundableBundle = {\n  rounded: prop.string<RoundedSize>(),\n};\n\n/** Prop bundle for components with an elevation / box-shadow. */\nexport const elevatableBundle = {\n  elevation: prop.number<ElevationLevel>(),\n};\n\n/**\n * Convenience bundle combining the five most common interactive-component props:\n * `color`, `size`, `disabled`, `loading`, and `rounded`.\n *\n * Use this single spread instead of five separate bundle spreads when a\n * component needs all of them.\n *\n * @example\n * ```ts\n * props: { ...commonProps, href: prop.string() }\n * ```\n */\nexport const commonProps = {\n  ...themableBundle,\n  ...sizableBundle,\n  ...disablableBundle,\n  ...loadableBundle,\n  ...roundableBundle,\n};\n"],"mappings":"+BAKA,IAAa,EAAiB,CAC5B,MAAO,EAAA,KAAK,OAAmB,CACjC,EAGa,EAAgB,CAC3B,KAAM,EAAA,KAAK,OAAsB,CACnC,EAGa,EAAmB,CAC9B,SAAU,EAAA,KAAK,KAAK,EAAK,CAC3B,EAGa,EAAiB,CAC5B,QAAS,EAAA,KAAK,KAAK,EAAK,CAC1B,EAGa,EAAkB,CAC7B,QAAS,EAAA,KAAK,OAAoB,CACpC,EAIa,EAAA,KAAK,OAAuB,EAezC,IAAa,EAAc,CACzB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACL"}