@nayhoo/ui 0.16.0 → 0.17.0

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.
@@ -0,0 +1,28 @@
1
+ import {
2
+ containerRecipe
3
+ } from "./chunk-PUW3KNR3.mjs";
4
+ import {
5
+ extractVariantsFromProps
6
+ } from "./chunk-UPZYS6TE.mjs";
7
+ import {
8
+ mergeClasses
9
+ } from "./chunk-7EGQM3ZL.mjs";
10
+
11
+ // src/components/container.tsx
12
+ import { Slot } from "@radix-ui/react-slot";
13
+ import { jsx } from "react/jsx-runtime";
14
+ var defaultElement = "div";
15
+ var Container = ({ asChild, ...props }) => {
16
+ const [variants, rest] = extractVariantsFromProps(
17
+ props,
18
+ ...containerRecipe.variants()
19
+ );
20
+ const container = containerRecipe(variants);
21
+ const Comp = asChild ? Slot : defaultElement;
22
+ return /* @__PURE__ */ jsx(Comp, { ...rest, className: mergeClasses(container, rest.className), children: rest.children });
23
+ };
24
+
25
+ export {
26
+ Container
27
+ };
28
+ //# sourceMappingURL=chunk-IKDQWTMS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/container.tsx"],"sourcesContent":["import {\n ContainerVariants,\n containerRecipe,\n} from \"@/theme/recipes/container.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { extractVariantsFromProps } from \"@/utils/extract-variants\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\nexport type ContainerProps = ComponentProps<\n typeof defaultElement,\n ContainerVariants\n>;\n\nexport const Container = ({ asChild, ...props }: ContainerProps) => {\n const [variants, rest] = extractVariantsFromProps(\n props,\n ...containerRecipe.variants(),\n );\n const container = containerRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...rest} className={mergeClasses(container, rest.className)}>\n {rest.children}\n </Comp>\n );\n};\n"],"mappings":";;;;;;;;;;;AAOA,SAAS,YAAY;AAkBjB;AAhBJ,IAAM,iBAAiB;AAOhB,IAAM,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,MAAsB;AAClE,QAAM,CAAC,UAAU,IAAI,IAAI;AAAA,IACvB;AAAA,IACA,GAAG,gBAAgB,SAAS;AAAA,EAC9B;AACA,QAAM,YAAY,gBAAgB,QAAQ;AAC1C,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE,oBAAC,QAAM,GAAG,MAAM,WAAW,aAAa,WAAW,KAAK,SAAS,GAC9D,eAAK,UACR;AAEJ;","names":[]}
@@ -22,4 +22,4 @@ export {
22
22
  darkTheme,
23
23
  lightTheme
24
24
  };
25
- //# sourceMappingURL=chunk-JMSIWH37.mjs.map
25
+ //# sourceMappingURL=chunk-O62XWWJU.mjs.map