@hebium-ui/react 0.1.0-alpha.0 → 0.1.0-alpha.2

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.
@@ -10,6 +10,12 @@ interface ParagraphOwnProps {
10
10
  * @default "text"
11
11
  */
12
12
  color?: ParagraphVariants["color"] | undefined;
13
+ /**
14
+ * The block margin applied to the paragraph.
15
+ *
16
+ * @default "block"
17
+ */
18
+ margin?: ParagraphVariants["margin"] | undefined;
13
19
  }
14
20
  export type ParagraphProps<E extends ElementType = "p"> = HuiPolymorphicProps<E, ParagraphOwnProps, ParagraphSlots>;
15
21
  export declare function Paragraph<E extends ElementType = "p">(rawProps: ParagraphProps<E>): ReactElement;
@@ -3,9 +3,12 @@ import { paragraphRecipe } from "@hebium-ui/core";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/paragraph/paragraph.tsx
5
5
  function Paragraph(rawProps) {
6
- const { as, color, className, style, children, ...restProps } = useHuiProps("Paragraph", rawProps);
6
+ const { as, color, margin, className, style, children, ...restProps } = useHuiProps("Paragraph", rawProps);
7
7
  const Component = as ?? "p";
8
- const recipe = paragraphRecipe({ color });
8
+ const recipe = paragraphRecipe({
9
+ color,
10
+ margin
11
+ });
9
12
  const cls = useHuiClassNames("Paragraph", recipe, { root: className });
10
13
  const sls = useHuiStyles("Paragraph", { root: style });
11
14
  return /* @__PURE__ */ jsx(Component, {
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph.js","names":[],"sources":["../../../src/components/paragraph/paragraph.tsx"],"sourcesContent":["import { paragraphRecipe, type ParagraphSlots, type ParagraphVariants } from \"@hebium-ui/core\";\nimport { type ElementType, type ReactElement } from \"react\";\nimport { useHuiClassNames, useHuiProps, useHuiStyles } from \"~/provider\";\nimport { type HuiPolymorphicProps } from \"~/types\";\n\ninterface ParagraphOwnProps {\n /**\n * The semantic color of the paragraph.\n *\n * @default \"text\"\n */\n color?: ParagraphVariants[\"color\"] | undefined;\n}\n\nexport type ParagraphProps<E extends ElementType = \"p\"> = HuiPolymorphicProps<\n E,\n ParagraphOwnProps,\n ParagraphSlots\n>;\n\nexport function Paragraph<E extends ElementType = \"p\">(rawProps: ParagraphProps<E>): ReactElement {\n const {\n as,\n color,\n className,\n style,\n children,\n ...restProps\n } = useHuiProps(\"Paragraph\", rawProps);\n\n const Component = as ?? \"p\";\n const recipe = paragraphRecipe({\n color,\n });\n const cls = useHuiClassNames(\"Paragraph\", recipe, { root: className });\n const sls = useHuiStyles(\"Paragraph\", { root: style });\n\n return (\n <Component\n className={cls.root}\n style={sls.root}\n {...restProps}\n >\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;AAoBA,SAAgB,UAAuC,UAA2C;CAChG,MAAM,EACJ,IACA,OACA,WACA,OACA,UACA,GAAG,cACD,YAAY,aAAa,QAAQ;CAErC,MAAM,YAAY,MAAM;CACxB,MAAM,SAAS,gBAAgB,EAC7B,MACF,CAAC;CACD,MAAM,MAAM,iBAAiB,aAAa,QAAQ,EAAE,MAAM,UAAU,CAAC;CACrE,MAAM,MAAM,aAAa,aAAa,EAAE,MAAM,MAAM,CAAC;CAErD,OACE,oBAAC,WAAD;EACE,WAAW,IAAI;EACf,OAAO,IAAI;EACX,GAAI;EAEH;CACQ,CAAA;AAEf"}
1
+ {"version":3,"file":"paragraph.js","names":[],"sources":["../../../src/components/paragraph/paragraph.tsx"],"sourcesContent":["import { paragraphRecipe, type ParagraphSlots, type ParagraphVariants } from \"@hebium-ui/core\";\nimport { type ElementType, type ReactElement } from \"react\";\nimport { useHuiClassNames, useHuiProps, useHuiStyles } from \"~/provider\";\nimport { type HuiPolymorphicProps } from \"~/types\";\n\ninterface ParagraphOwnProps {\n /**\n * The semantic color of the paragraph.\n *\n * @default \"text\"\n */\n color?: ParagraphVariants[\"color\"] | undefined;\n /**\n * The block margin applied to the paragraph.\n *\n * @default \"block\"\n */\n margin?: ParagraphVariants[\"margin\"] | undefined;\n}\n\nexport type ParagraphProps<E extends ElementType = \"p\"> = HuiPolymorphicProps<\n E,\n ParagraphOwnProps,\n ParagraphSlots\n>;\n\nexport function Paragraph<E extends ElementType = \"p\">(rawProps: ParagraphProps<E>): ReactElement {\n const {\n as,\n color,\n margin,\n className,\n style,\n children,\n ...restProps\n } = useHuiProps(\"Paragraph\", rawProps);\n\n const Component = as ?? \"p\";\n const recipe = paragraphRecipe({\n color,\n margin,\n });\n const cls = useHuiClassNames(\"Paragraph\", recipe, { root: className });\n const sls = useHuiStyles(\"Paragraph\", { root: style });\n\n return (\n <Component\n className={cls.root}\n style={sls.root}\n {...restProps}\n >\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;AA0BA,SAAgB,UAAuC,UAA2C;CAChG,MAAM,EACJ,IACA,OACA,QACA,WACA,OACA,UACA,GAAG,cACD,YAAY,aAAa,QAAQ;CAErC,MAAM,YAAY,MAAM;CACxB,MAAM,SAAS,gBAAgB;EAC7B;EACA;CACF,CAAC;CACD,MAAM,MAAM,iBAAiB,aAAa,QAAQ,EAAE,MAAM,UAAU,CAAC;CACrE,MAAM,MAAM,aAAa,aAAa,EAAE,MAAM,MAAM,CAAC;CAErD,OACE,oBAAC,WAAD;EACE,WAAW,IAAI;EACf,OAAO,IAAI;EACX,GAAI;EAEH;CACQ,CAAA;AAEf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebium-ui/react",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "React bindings for the Hebium UI core components.",
5
5
  "type": "module",
6
6
  "files": [
@@ -28,20 +28,20 @@
28
28
  "devDependencies": {
29
29
  "@types/react": "19.3.0",
30
30
  "@types/react-dom": "19.3.0",
31
- "@vitest/browser-playwright": "5.0.4",
31
+ "@vitest/browser-playwright": "5.0.5",
32
32
  "axe-core": "4.14.0",
33
- "oxlint": "1.87.0",
34
- "playwright": "1.64.0",
35
- "react": "19.3.0",
36
- "react-dom": "19.3.0",
33
+ "oxlint": "1.88.0",
34
+ "playwright": "1.64.1",
35
+ "react": "19.3.1",
36
+ "react-dom": "19.3.1",
37
37
  "tsdown": "0.23.1",
38
38
  "typescript": "6.0.3",
39
39
  "vite": "8.3.4",
40
- "vitest": "5.0.4",
40
+ "vitest": "5.0.5",
41
41
  "vitest-browser-react": "2.3.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@hebium-ui/core": "0.1.0-alpha.0",
44
+ "@hebium-ui/core": "0.1.0-alpha.2",
45
45
  "react": "^19.2.0",
46
46
  "react-dom": "^19.2.0"
47
47
  },