@bonprix-ds/react-checkbox 1.0.8 → 1.0.9

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.
package/dist/index.js CHANGED
@@ -1,30 +1,2 @@
1
- "use client";
2
- import { useId as e } from "react";
3
- import { CheckboxBase as t, InputHelperTextSection as n } from "@bonprix-ds/internal-components";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/Checkbox.tsx
6
- var a = (a) => {
7
- let o = e(), s = e(), { helperText: c = "", error: l = !1, errorText: u = "", ...d } = a;
8
- return /* @__PURE__ */ i("div", {
9
- "data-bpds": "checkbox",
10
- children: [/* @__PURE__ */ r(t, {
11
- ...d,
12
- error: l,
13
- helperText: c,
14
- errorText: u,
15
- errorTextId: s,
16
- helperTextId: o
17
- }), /* @__PURE__ */ r(n, {
18
- helperText: c,
19
- error: l,
20
- errorText: u,
21
- helperTextId: o,
22
- errorTextId: s,
23
- disabled: a.disabled
24
- })]
25
- });
26
- };
27
- //#endregion
28
- export { a as default };
29
-
30
- //# sourceMappingURL=index.js.map
1
+ import e from "./src/Checkbox.js";
2
+ export { e as default };
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { useId as e } from "react";
3
+ import { CheckboxBase as t, InputHelperTextSection as n } from "@bonprix-ds/internal-components";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/Checkbox.tsx
6
+ var a = (a) => {
7
+ let o = e(), s = e(), { helperText: c = "", error: l = !1, errorText: u = "", ...d } = a;
8
+ return /* @__PURE__ */ i("div", {
9
+ "data-bpds": "checkbox",
10
+ children: [/* @__PURE__ */ r(t, {
11
+ ...d,
12
+ error: l,
13
+ helperText: c,
14
+ errorText: u,
15
+ errorTextId: s,
16
+ helperTextId: o
17
+ }), /* @__PURE__ */ r(n, {
18
+ helperText: c,
19
+ error: l,
20
+ errorText: u,
21
+ helperTextId: o,
22
+ errorTextId: s,
23
+ disabled: a.disabled
24
+ })]
25
+ });
26
+ };
27
+ //#endregion
28
+ export { a as default };
29
+
30
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","names":["Checkbox","helperTextId","useId","errorTextId","checkboxProps","props","CheckboxBase","InputHelperTextSection"],"sources":["../../src/Checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useId } from \"react\";\n\nimport { CheckboxBase, CheckboxBaseProps, InputHelperTextSection } from \"@bonprix-ds/internal-components\";\n\nexport type Props = {\n /** The helper text to be displayed below the checkbox. Should provide an additional description about the input to help fill out the form. */\n helperText?: string;\n /** If set to `true`, the checkbox will be marked as erroneous. */\n error?: boolean;\n /** Provides an error message as additional description to an erroneous checkbox. Will only be shown if `error` is true. */\n errorText?: string;\n} & CheckboxBaseProps;\n\nconst Checkbox = (props: Props) => {\n const helperTextId = useId();\n const errorTextId = useId();\n const { helperText = \"\", error = false, errorText = \"\", ...checkboxProps } = props;\n return (\n <div data-bpds=\"checkbox\">\n <CheckboxBase\n {...checkboxProps}\n error={error}\n helperText={helperText}\n errorText={errorText}\n errorTextId={errorTextId}\n helperTextId={helperTextId}\n />\n <InputHelperTextSection\n helperText={helperText}\n error={error}\n errorText={errorText}\n helperTextId={helperTextId}\n errorTextId={errorTextId}\n disabled={props.disabled}\n />\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";;;;;AAeA,IAAMA,KAAY,MAAiB;CACjC,IAAMC,IAAeC,EAAM,GACrBC,IAAcD,EAAM,GACpB,EAAE,gBAAa,IAAI,WAAQ,IAAO,eAAY,IAAI,GAAGE,MAAkBC;CAC7E,OACE,kBAAC,OAAD;EAAK,aAAU;EAAf,UAAA,CACE,kBAACC,GAAD;GACE,GAAIF;GACG;GACK;GACD;GACE;GACC;EACf,CAAA,GACD,kBAACG,GAAD;GACc;GACL;GACI;GACG;GACD;GACb,UAAUF,EAAM;EACjB,CAAA,CACE;;AAET"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonprix-ds/react-checkbox",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Checkbox component, implemented in React, for the Bonprix Design System.",
5
5
  "keywords": [],
6
6
  "license": "UNLICENSED",
@@ -32,18 +32,17 @@
32
32
  "provenance": true
33
33
  },
34
34
  "dependencies": {
35
- "@bonprix-ds/internal-components": "0.2.1",
36
- "@bonprix-ds/utils": "0.2.2"
35
+ "@bonprix-ds/internal-components": "0.2.2",
36
+ "@bonprix-ds/utils": "0.3.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/react": "19.3.0",
40
- "@vitejs/plugin-react": "6.1.1",
41
- "rollup-preserve-directives": "1.1.3",
42
- "vite": "8.3.0"
40
+ "vite": "8.3.2",
41
+ "@bonprix-ds/vite-config": "0.0.0"
43
42
  },
44
43
  "peerDependencies": {
45
- "react": "^19.3.0",
46
- "react-dom": "^19.3.0",
44
+ "react": "^19",
45
+ "react-dom": "^19",
47
46
  "tailwind-variants": "0.3.1"
48
47
  },
49
48
  "scripts": {
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/Checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useId } from \"react\";\n\nimport { CheckboxBase, CheckboxBaseProps, InputHelperTextSection } from \"@bonprix-ds/internal-components\";\n\nexport type Props = {\n /** The helper text to be displayed below the checkbox. Should provide an additional description about the input to help fill out the form. */\n helperText?: string;\n /** If set to `true`, the checkbox will be marked as erroneous. */\n error?: boolean;\n /** Provides an error message as additional description to an erroneous checkbox. Will only be shown if `error` is true. */\n errorText?: string;\n} & CheckboxBaseProps;\n\nconst Checkbox = (props: Props) => {\n const helperTextId = useId();\n const errorTextId = useId();\n const { helperText = \"\", error = false, errorText = \"\", ...checkboxProps } = props;\n return (\n <div data-bpds=\"checkbox\">\n <CheckboxBase\n {...checkboxProps}\n error={error}\n helperText={helperText}\n errorText={errorText}\n errorTextId={errorTextId}\n helperTextId={helperTextId}\n />\n <InputHelperTextSection\n helperText={helperText}\n error={error}\n errorText={errorText}\n helperTextId={helperTextId}\n errorTextId={errorTextId}\n disabled={props.disabled}\n />\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";;;;;AAeA,IAAM,KAAY,MAAiB;CACjC,IAAM,IAAe,EAAM,GACrB,IAAc,EAAM,GACpB,EAAE,gBAAa,IAAI,WAAQ,IAAO,eAAY,IAAI,GAAG,MAAkB;CAC7E,OACE,kBAAC,OAAD;EAAK,aAAU;EAAf,UAAA,CACE,kBAAC,GAAD;GACE,GAAI;GACG;GACK;GACD;GACE;GACC;EACf,CAAA,GACD,kBAAC,GAAD;GACc;GACL;GACI;GACG;GACD;GACb,UAAU,EAAM;EACjB,CAAA,CACE;;AAET"}