flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
1 lines • 2.37 kB
Source Map (JSON)
{"version":3,"file":"HRSquare.cjs","sources":["../../../src/components/HR/HRSquare.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { forwardRef } from \"react\";\nimport { get } from \"../../helpers/get\";\nimport { resolveProps } from \"../../helpers/resolve-props\";\nimport { useResolveTheme } from \"../../helpers/resolve-theme\";\nimport { twMerge } from \"../../helpers/tailwind-merge\";\nimport { useThemeProvider } from \"../../theme/provider\";\nimport type { ThemingProps } from \"../../types\";\nimport { hrTheme } from \"./theme\";\n\nexport interface HRSquareTheme {\n base: string;\n}\n\nexport interface HRSquareProps extends Omit<ComponentProps<\"hr\">, \"ref\">, ThemingProps<HRSquareTheme> {}\n\nexport const HRSquare = forwardRef<HTMLHRElement, HRSquareProps>((props, ref) => {\n const provider = useThemeProvider();\n const theme = useResolveTheme(\n [hrTheme.square, provider.theme?.hr?.square, props.theme],\n [get(provider.clearTheme, \"hr.square\"), props.clearTheme],\n [get(provider.applyTheme, \"hr.square\"), props.applyTheme],\n );\n\n const { className, ...restProps } = resolveProps(props, provider.props?.hrSquare);\n\n return (\n <hr\n ref={ref}\n className={twMerge(theme.base, className)}\n data-testid=\"flowbite-hr-square\"\n role=\"separator\"\n {...restProps}\n />\n );\n});\n\nHRSquare.displayName = \"HRSquare\";\n"],"names":["forwardRef","provider","useThemeProvider","theme","useResolveTheme","hrTheme","get","resolveProps","jsx","twMerge"],"mappings":";;;;;;;;;;;AAUY,MAAC,QAAQ,GAAGA,gBAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AACnD,EAAE,MAAMC,UAAQ,GAAGC,yBAAgB,EAAE;AACrC,EAAE,MAAMC,OAAK,GAAGC,4BAAe;AAC/B,IAAI,CAACC,aAAO,CAAC,MAAM,EAAEJ,UAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC;AAC7D,IAAI,CAACK,OAAG,CAACL,UAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;AAC7D,IAAI,CAACK,OAAG,CAACL,UAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,UAAU;AAC5D,GAAG;AACH,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAGM,yBAAY,CAAC,KAAK,EAAEN,UAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;AACnF,EAAE,uBAAuBO,cAAG;AAC5B,IAAI,IAAI;AACR,IAAI;AACJ,MAAM,GAAG;AACT,MAAM,SAAS,EAAEC,qBAAO,CAACN,OAAK,CAAC,IAAI,EAAE,SAAS,CAAC;AAC/C,MAAM,aAAa,EAAE,oBAAoB;AACzC,MAAM,IAAI,EAAE,WAAW;AACvB,MAAM,GAAG;AACT;AACA,GAAG;AACH,CAAC;AACD,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}