@bonprix-ds/react-checkbox 1.0.6 → 1.0.8

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 CHANGED
@@ -1,16 +1,2 @@
1
- import { CheckboxBaseProps } from '@bonprix-ds/internal-components';
2
- import { default as default_2 } from 'react';
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,25 +1,26 @@
1
1
  "use client";
2
- import { CheckboxBase as e, InputHelperTextSection as t } from "@bonprix-ds/internal-components";
3
- import { useId as n } from "react";
2
+ import { useId as e } from "react";
3
+ import { CheckboxBase as t, InputHelperTextSection as n } from "@bonprix-ds/internal-components";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  //#region src/Checkbox.tsx
6
6
  var a = (a) => {
7
- let o = n(), s = n(), { helperText: c = "", error: l = !1, errorText: u = "", ...d } = a;
7
+ let o = e(), s = e(), { helperText: c = "", error: l = !1, errorText: u = "", ...d } = a;
8
8
  return /* @__PURE__ */ i("div", {
9
9
  "data-bpds": "checkbox",
10
- children: [/* @__PURE__ */ r(e, {
10
+ children: [/* @__PURE__ */ r(t, {
11
11
  ...d,
12
12
  error: l,
13
13
  helperText: c,
14
14
  errorText: u,
15
15
  errorTextId: s,
16
16
  helperTextId: o
17
- }), /* @__PURE__ */ r(t, {
17
+ }), /* @__PURE__ */ r(n, {
18
18
  helperText: c,
19
19
  error: l,
20
20
  errorText: u,
21
21
  helperTextId: o,
22
- errorTextId: s
22
+ errorTextId: s,
23
+ disabled: a.disabled
23
24
  })]
24
25
  });
25
26
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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 />\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;EACd,CAAA,CACE;;AAET"}
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"}
@@ -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;
package/package.json CHANGED
@@ -1,14 +1,25 @@
1
1
  {
2
2
  "name": "@bonprix-ds/react-checkbox",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Checkbox component, implemented in React, for the Bonprix Design System.",
5
- "type": "module",
6
- "publishConfig": {
7
- "access": "public",
8
- "provenance": true
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
- "module": "./dist/index.js",
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,34 +27,24 @@
16
27
  "default": "./dist/index.js"
17
28
  }
18
29
  },
19
- "types": "./dist/index.d.ts",
20
- "files": [
21
- "dist"
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.1.5",
33
- "@bonprix-ds/utils": "0.2.1"
34
- },
35
- "peerDependencies": {
36
- "react": "^19.0.0",
37
- "react-dom": "^19.0.0",
38
- "tailwind-variants": "0.3.1"
35
+ "@bonprix-ds/internal-components": "0.2.1",
36
+ "@bonprix-ds/utils": "0.2.2"
39
37
  },
40
38
  "devDependencies": {
41
- "vite": "8.2.2",
42
- "@types/react": "19.2.18",
43
- "@vitejs/plugin-react": "6.1.0",
39
+ "@types/react": "19.3.0",
40
+ "@vitejs/plugin-react": "6.1.1",
44
41
  "rollup-preserve-directives": "1.1.3",
45
- "unplugin-dts": "1.0.3",
46
- "@microsoft/api-extractor": "7.59.0"
42
+ "vite": "8.3.0"
43
+ },
44
+ "peerDependencies": {
45
+ "react": "^19.3.0",
46
+ "react-dom": "^19.3.0",
47
+ "tailwind-variants": "0.3.1"
47
48
  },
48
49
  "scripts": {
49
50
  "build": "vite build"