@bonprix-ds/react-checkbox 1.0.7 → 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.d.ts +2 -16
- package/dist/index.js +2 -30
- package/dist/src/Checkbox.d.ts +12 -0
- package/dist/src/Checkbox.js +30 -0
- package/dist/src/Checkbox.js.map +1 -0
- package/package.json +29 -29
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const Checkbox: (props: CheckboxProps) => default_2.JSX.Element;
|
|
5
|
-
export default Checkbox;
|
|
6
|
-
|
|
7
|
-
export declare type CheckboxProps = {
|
|
8
|
-
/** The helper text to be displayed below the checkbox. Should provide an additional description about the input to help fill out the form. */
|
|
9
|
-
helperText?: string;
|
|
10
|
-
/** If set to `true`, the checkbox will be marked as erroneous. */
|
|
11
|
-
error?: boolean;
|
|
12
|
-
/** Provides an error message as additional description to an erroneous checkbox. Will only be shown if `error` is true. */
|
|
13
|
-
errorText?: string;
|
|
14
|
-
} & CheckboxBaseProps;
|
|
15
|
-
|
|
16
|
-
export { }
|
|
1
|
+
export { default } from "./src/Checkbox";
|
|
2
|
+
export type { Props as CheckboxProps } from "./src/Checkbox";
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { useId as n } from "react";
|
|
4
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
//#region src/Checkbox.tsx
|
|
6
|
-
var a = (a) => {
|
|
7
|
-
let o = n(), s = n(), { helperText: c = "", error: l = !1, errorText: u = "", ...d } = a;
|
|
8
|
-
return /* @__PURE__ */ i("div", {
|
|
9
|
-
"data-bpds": "checkbox",
|
|
10
|
-
children: [/* @__PURE__ */ r(e, {
|
|
11
|
-
...d,
|
|
12
|
-
error: l,
|
|
13
|
-
helperText: c,
|
|
14
|
-
errorText: u,
|
|
15
|
-
errorTextId: s,
|
|
16
|
-
helperTextId: o
|
|
17
|
-
}), /* @__PURE__ */ r(t, {
|
|
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,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckboxBaseProps } from "@bonprix-ds/internal-components";
|
|
3
|
+
export type Props = {
|
|
4
|
+
/** The helper text to be displayed below the checkbox. Should provide an additional description about the input to help fill out the form. */
|
|
5
|
+
helperText?: string;
|
|
6
|
+
/** If set to `true`, the checkbox will be marked as erroneous. */
|
|
7
|
+
error?: boolean;
|
|
8
|
+
/** Provides an error message as additional description to an erroneous checkbox. Will only be shown if `error` is true. */
|
|
9
|
+
errorText?: string;
|
|
10
|
+
} & CheckboxBaseProps;
|
|
11
|
+
declare const Checkbox: (props: Props) => React.JSX.Element;
|
|
12
|
+
export default Checkbox;
|
|
@@ -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,14 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonprix-ds/react-checkbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Checkbox component, implemented in React, for the Bonprix Design System.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"author": "",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/bonprix/design-system.git",
|
|
11
|
+
"directory": "packages/react/checkbox"
|
|
9
12
|
},
|
|
10
|
-
"
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"!dist/tsconfig.tsbuildinfo",
|
|
16
|
+
"!dist/vite.config.d.ts",
|
|
17
|
+
"!dist/**/*.test.d.ts"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
11
20
|
"sideEffects": false,
|
|
21
|
+
"module": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
12
23
|
"exports": {
|
|
13
24
|
".": {
|
|
14
25
|
"import": "./dist/index.js",
|
|
@@ -16,35 +27,24 @@
|
|
|
16
27
|
"default": "./dist/index.js"
|
|
17
28
|
}
|
|
18
29
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
],
|
|
23
|
-
"keywords": [],
|
|
24
|
-
"author": "",
|
|
25
|
-
"license": "UNLICENSED",
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/bonprix/design-system.git",
|
|
29
|
-
"directory": "packages/react/checkbox"
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"provenance": true
|
|
30
33
|
},
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"@bonprix-ds/internal-components": "0.2.
|
|
33
|
-
"@bonprix-ds/utils": "0.
|
|
35
|
+
"@bonprix-ds/internal-components": "0.2.2",
|
|
36
|
+
"@bonprix-ds/utils": "0.3.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "19.3.0",
|
|
40
|
+
"vite": "8.3.2",
|
|
41
|
+
"@bonprix-ds/vite-config": "0.0.0"
|
|
34
42
|
},
|
|
35
43
|
"peerDependencies": {
|
|
36
|
-
"react": "^19
|
|
37
|
-
"react-dom": "^19
|
|
44
|
+
"react": "^19",
|
|
45
|
+
"react-dom": "^19",
|
|
38
46
|
"tailwind-variants": "0.3.1"
|
|
39
47
|
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"vite": "8.2.2",
|
|
42
|
-
"@types/react": "19.2.18",
|
|
43
|
-
"@vitejs/plugin-react": "6.1.1",
|
|
44
|
-
"rollup-preserve-directives": "1.1.3",
|
|
45
|
-
"unplugin-dts": "1.1.0",
|
|
46
|
-
"@microsoft/api-extractor": "7.59.1"
|
|
47
|
-
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "vite build"
|
|
50
50
|
}
|
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 { CheckboxBase, CheckboxBaseProps, InputHelperTextSection } from \"@bonprix-ds/internal-components\";\nimport React, { useId } from \"react\";\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":";;;;;AAcA,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"}
|