@synerise/ds-checkbox 1.2.19 → 1.2.21
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/Checkbox.d.ts +3 -5
- package/dist/Checkbox.js +13 -10
- package/dist/Checkbox.styles.d.ts +4 -4
- package/dist/Checkbox.styles.js +16 -38
- package/dist/Checkbox.types.d.ts +2 -2
- package/dist/Checkbox.types.js +1 -1
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/components/CheckboxBase.d.ts +2 -2
- package/dist/components/CheckboxBase.js +22 -23
- package/dist/components/CheckboxTristate.d.ts +2 -2
- package/dist/components/CheckboxTristate.js +30 -34
- package/dist/components/index.js +6 -2
- package/dist/index.js +10 -3
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/checkedValue.js +6 -3
- package/dist/utils/index.js +8 -3
- package/dist/utils/isTristateCheckbox.d.ts +1 -1
- package/dist/utils/isTristateCheckbox.js +6 -3
- package/dist/utils/nextCheckedValues.js +5 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.21](https://github.com/synerise/synerise-design/compare/@synerise/ds-checkbox@1.2.20...@synerise/ds-checkbox@1.2.21) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-checkbox
|
|
9
|
+
|
|
10
|
+
## [1.2.20](https://github.com/synerise/synerise-design/compare/@synerise/ds-checkbox@1.2.19...@synerise/ds-checkbox@1.2.20) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-checkbox
|
|
13
|
+
|
|
6
14
|
## [1.2.19](https://github.com/synerise/synerise-design/compare/@synerise/ds-checkbox@1.2.18...@synerise/ds-checkbox@1.2.19) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-checkbox
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Based on [Ant Design Checkbox](https://ant.design/components/checkbox/)
|
|
|
16
16
|
| autoFocus | Get focus when component mounted | boolean | `false` |
|
|
17
17
|
| checked | Specifies whether the checkbox is selected. | boolean | `false` |
|
|
18
18
|
| defaultChecked | Specifies the initial state: whether or not the checkbox is selected. | boolean | `false` |
|
|
19
|
-
| description | Checkbox description |
|
|
19
|
+
| description | Checkbox description | ReactNode | - |
|
|
20
20
|
| disabled | Disable checkbox | boolean | `false` |
|
|
21
21
|
| errorText | Error message, if provided sets error state on checkbox | string | - |
|
|
22
22
|
| hasError | Determines if checkbox is in error state | boolean | `false` |
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
import { type CheckboxProps } from './Checkbox.types';
|
|
4
|
-
import './style/index.less';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxProps } from './Checkbox.types';
|
|
5
3
|
export declare const Checkbox: {
|
|
6
4
|
(props: CheckboxProps): React.JSX.Element;
|
|
7
|
-
Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import(
|
|
5
|
+
Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import('antd/lib/checkbox').CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>>;
|
|
8
6
|
};
|
|
9
7
|
export default Checkbox;
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AntdCheckbox } from "./Checkbox.styles.js";
|
|
3
|
+
import { CheckboxBase } from "./components/CheckboxBase.js";
|
|
4
|
+
import { CheckboxTristate } from "./components/CheckboxTristate.js";
|
|
5
|
+
import { isTristateCheckbox } from "./utils/isTristateCheckbox.js";
|
|
5
6
|
import "./style/index.css";
|
|
6
|
-
|
|
7
|
-
export var Checkbox = function Checkbox(props) {
|
|
7
|
+
const Checkbox = (props) => {
|
|
8
8
|
if (isTristateCheckbox(props)) {
|
|
9
|
-
return
|
|
9
|
+
return /* @__PURE__ */ jsx(CheckboxTristate, { ...props });
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return /* @__PURE__ */ jsx(CheckboxBase, { ...props });
|
|
12
|
+
};
|
|
13
|
+
Checkbox.Group = AntdCheckbox.Group;
|
|
14
|
+
export {
|
|
15
|
+
Checkbox,
|
|
16
|
+
Checkbox as default
|
|
12
17
|
};
|
|
13
|
-
Checkbox.Group = S.AntdCheckbox.Group;
|
|
14
|
-
export default Checkbox;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import BaseAntCheckbox,
|
|
1
|
+
import { default as BaseAntCheckbox, CheckboxProps } from 'antd/lib/checkbox';
|
|
2
2
|
/**
|
|
3
3
|
* error TS4023: Exported variable 'AntdCheckbox' has or is using name 'CompoundedComponent' from external module "/Users/biedronne/Documents/Work/DS2/synerise-design/node_modules/antd/lib/checkbox/index" but cannot be named.
|
|
4
4
|
*/
|
|
5
5
|
type CompoundedComponent = React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>> & {
|
|
6
6
|
Group: typeof BaseAntCheckbox.Group;
|
|
7
7
|
};
|
|
8
|
-
export declare const AntdCheckbox: import(
|
|
8
|
+
export declare const AntdCheckbox: import('styled-components').StyledComponent<CompoundedComponent, any, {
|
|
9
9
|
$solo: boolean;
|
|
10
10
|
}, never>;
|
|
11
|
-
export declare const AdditionalData: import(
|
|
12
|
-
export declare const CheckboxWrapper: import(
|
|
11
|
+
export declare const AdditionalData: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const CheckboxWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
13
13
|
withoutPadding: boolean;
|
|
14
14
|
}, never>;
|
|
15
15
|
export {};
|
package/dist/Checkbox.styles.js
CHANGED
|
@@ -1,47 +1,25 @@
|
|
|
1
|
-
import BaseAntCheckbox from
|
|
2
|
-
import styled, { css } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import BaseAntCheckbox from "antd/lib/checkbox";
|
|
2
|
+
import styled, { css } from "styled-components";
|
|
3
|
+
const checkSvgWithCustomColor = (color) => {
|
|
4
|
+
const colorValueForSvg = color.replace(/#/, "%23");
|
|
5
|
+
const iconWithColor = `data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 18 18' >/><path fill='none' d='M0 0h24v24H0z' /><path style='fill: ${colorValueForSvg};' stroke-width='1' stroke='${colorValueForSvg}' d='M10.61 15.744a.75.75 0 01-.535-.224l-3.11-3.162a.75.75 0 011.07-1.052l2.575 2.618 5.355-5.444a.75.75 0 111.07 1.052l-5.89 5.988a.75.75 0 01-.535.224z'/></svg>`;
|
|
6
6
|
return iconWithColor;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* error TS4023: Exported variable 'AntdCheckbox' has or is using name 'CompoundedComponent' from external module "/Users/biedronne/Documents/Work/DS2/synerise-design/node_modules/antd/lib/checkbox/index" but cannot be named.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export var AntdCheckbox = styled(BaseAntCheckbox).withConfig({
|
|
8
|
+
const soloCss = /* @__PURE__ */ css(["padding:4px;"]);
|
|
9
|
+
const AntdCheckbox = /* @__PURE__ */ styled(BaseAntCheckbox).withConfig({
|
|
15
10
|
displayName: "Checkboxstyles__AntdCheckbox",
|
|
16
11
|
componentId: "sc-10i9aa0-0"
|
|
17
|
-
})(["&&{display:flex;align-items:center;line-height:1;", ";.ant-checkbox{top:0;}}.ant-checkbox-input:focus + .ant-checkbox-inner{border:1px solid ", ";box-shadow:inset 0 0 0 1px ", ";}&& > .ant-checkbox-disabled.ant-checkbox-checked > span.ant-checkbox-inner{background-image:", ";}&& > .ant-checkbox-checked > span.ant-checkbox-inner{background-image:", ";::after{display:none;}:focus{border:none;}}&&{> .ant-checkbox-indeterminate,.ant-checkbox-indeterminate.ant-checkbox-checked{> span.ant-checkbox-inner{background-color:", ";border:1px solid ", ";background-image:none;::after{background:#fff;height:2px;display:table;left:50%;}}}:hover{> .ant-checkbox-indeterminate,.ant-checkbox-indeterminate.ant-checkbox-checked{> span.ant-checkbox-inner{background-color:", ";}}}}&&:hover > .ant-checkbox:not(.ant-checkbox-checked):not( .ant-checkbox-indeterminate ):not(.ant-checkbox-disabled) > span.ant-checkbox-inner{border-width:1px;border-style:solid;border-color:", " !important;outline:none;background-image:", ";}"],
|
|
18
|
-
|
|
19
|
-
}, function (props) {
|
|
20
|
-
return props.theme.palette['blue-600'];
|
|
21
|
-
}, function (props) {
|
|
22
|
-
return props.theme.palette['blue-600'];
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return "url(\"" + checkSvgWithCustomColor(props.theme.palette['grey-400']) + "\")";
|
|
25
|
-
}, function (props) {
|
|
26
|
-
return "url(\"" + checkSvgWithCustomColor(props.theme.palette.white) + "\")";
|
|
27
|
-
}, function (props) {
|
|
28
|
-
return props.theme.palette['blue-600'];
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return props.theme.palette['blue-600'];
|
|
31
|
-
}, function (props) {
|
|
32
|
-
return props.theme.palette['blue-500'];
|
|
33
|
-
}, function (props) {
|
|
34
|
-
return props.theme.palette['blue-600'];
|
|
35
|
-
}, function (props) {
|
|
36
|
-
return "url(\"" + checkSvgWithCustomColor(props.theme.palette['blue-600']) + "\")";
|
|
37
|
-
});
|
|
38
|
-
export var AdditionalData = styled.div.withConfig({
|
|
12
|
+
})(["&&{display:flex;align-items:center;line-height:1;", ";.ant-checkbox{top:0;}}.ant-checkbox-input:focus + .ant-checkbox-inner{border:1px solid ", ";box-shadow:inset 0 0 0 1px ", ";}&& > .ant-checkbox-disabled.ant-checkbox-checked > span.ant-checkbox-inner{background-image:", ";}&& > .ant-checkbox-checked > span.ant-checkbox-inner{background-image:", ";::after{display:none;}:focus{border:none;}}&&{> .ant-checkbox-indeterminate,.ant-checkbox-indeterminate.ant-checkbox-checked{> span.ant-checkbox-inner{background-color:", ";border:1px solid ", ";background-image:none;::after{background:#fff;height:2px;display:table;left:50%;}}}:hover{> .ant-checkbox-indeterminate,.ant-checkbox-indeterminate.ant-checkbox-checked{> span.ant-checkbox-inner{background-color:", ";}}}}&&:hover > .ant-checkbox:not(.ant-checkbox-checked):not( .ant-checkbox-indeterminate ):not(.ant-checkbox-disabled) > span.ant-checkbox-inner{border-width:1px;border-style:solid;border-color:", " !important;outline:none;background-image:", ";}"], (props) => props.$solo && soloCss, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => `url("${checkSvgWithCustomColor(props.theme.palette["grey-400"])}")`, (props) => `url("${checkSvgWithCustomColor(props.theme.palette.white)}")`, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-500"], (props) => props.theme.palette["blue-600"], (props) => `url("${checkSvgWithCustomColor(props.theme.palette["blue-600"])}")`);
|
|
13
|
+
const AdditionalData = /* @__PURE__ */ styled.div.withConfig({
|
|
39
14
|
displayName: "Checkboxstyles__AdditionalData",
|
|
40
15
|
componentId: "sc-10i9aa0-1"
|
|
41
16
|
})(["margin:2px 12px 0px 28px;"]);
|
|
42
|
-
|
|
17
|
+
const CheckboxWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
43
18
|
displayName: "Checkboxstyles__CheckboxWrapper",
|
|
44
19
|
componentId: "sc-10i9aa0-2"
|
|
45
|
-
})(["display:flex;padding:", ";flex-direction:column;"],
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
})(["display:flex;padding:", ";flex-direction:column;"], (props) => props.withoutPadding ? "0" : "4px 12px 8px 8px");
|
|
21
|
+
export {
|
|
22
|
+
AdditionalData,
|
|
23
|
+
AntdCheckbox,
|
|
24
|
+
CheckboxWrapper
|
|
25
|
+
};
|
package/dist/Checkbox.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AbstractCheckboxProps, CheckboxProps as AntCheckboxProps } from 'antd/lib/checkbox/Checkbox';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
export type BaseCheckboxProps = {
|
|
4
4
|
description?: ReactNode;
|
|
5
5
|
errorText?: string;
|
package/dist/Checkbox.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxBaseProps } from '../Checkbox.types';
|
|
3
3
|
export declare const CheckboxBase: ({ description, errorText, children, withoutPadding, hasError, ...antdCheckboxProps }: CheckboxBaseProps) => React.JSX.Element;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorText, Description } from "@synerise/ds-typography";
|
|
3
|
+
import { CheckboxWrapper, AntdCheckbox, AdditionalData } from "../Checkbox.styles.js";
|
|
4
|
+
const CheckboxBase = ({
|
|
5
|
+
description,
|
|
6
|
+
errorText,
|
|
7
|
+
children,
|
|
8
|
+
withoutPadding,
|
|
9
|
+
hasError,
|
|
10
|
+
...antdCheckboxProps
|
|
11
|
+
}) => {
|
|
12
|
+
return /* @__PURE__ */ jsxs(CheckboxWrapper, { className: "ds-checkbox", withoutPadding: Boolean(withoutPadding), children: [
|
|
13
|
+
/* @__PURE__ */ jsx(AntdCheckbox, { ...antdCheckboxProps, className: hasError || errorText ? "error" : void 0, $solo: !children && !errorText && !description, children }),
|
|
14
|
+
(errorText || description) && /* @__PURE__ */ jsxs(AdditionalData, { children: [
|
|
15
|
+
errorText && /* @__PURE__ */ jsx(ErrorText, { children: errorText }),
|
|
16
|
+
description && /* @__PURE__ */ jsx(Description, { disabled: antdCheckboxProps.disabled, children: description })
|
|
17
|
+
] })
|
|
18
|
+
] });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
CheckboxBase
|
|
22
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxTristateProps } from '../Checkbox.types';
|
|
3
3
|
export declare const CheckboxTristate: (props: CheckboxTristateProps) => React.JSX.Element;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
defaultChecked
|
|
10
|
-
onChange
|
|
11
|
-
tristate
|
|
12
|
-
restProps
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
indeterminate = _useState2[0],
|
|
20
|
-
setIndeterminate = _useState2[1];
|
|
21
|
-
useEffect(function () {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { checkedValue } from "../utils/checkedValue.js";
|
|
4
|
+
import { nextCheckedValues } from "../utils/nextCheckedValues.js";
|
|
5
|
+
import { CheckboxBase } from "./CheckboxBase.js";
|
|
6
|
+
const CheckboxTristate = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
checked,
|
|
9
|
+
defaultChecked,
|
|
10
|
+
onChange,
|
|
11
|
+
tristate,
|
|
12
|
+
...restProps
|
|
13
|
+
} = props;
|
|
14
|
+
const initialChecked = "checked" in props ? checked : defaultChecked;
|
|
15
|
+
const isControlled = "checked" in props;
|
|
16
|
+
const [currentChecked, setChecked] = useState(initialChecked);
|
|
17
|
+
const [indeterminate, setIndeterminate] = useState(initialChecked === void 0);
|
|
18
|
+
useEffect(() => {
|
|
22
19
|
if (isControlled && (checked !== currentChecked || checked === false && currentChecked === false)) {
|
|
23
|
-
if (checked ===
|
|
20
|
+
if (checked === void 0) {
|
|
24
21
|
setIndeterminate(true);
|
|
25
22
|
setChecked(false);
|
|
26
23
|
} else {
|
|
@@ -29,21 +26,20 @@ export var CheckboxTristate = function CheckboxTristate(props) {
|
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
}, [isControlled, checked, currentChecked]);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
const handleOnChange = (event) => {
|
|
30
|
+
const [newChecked, newIndeterminate] = nextCheckedValues(currentChecked, indeterminate);
|
|
31
|
+
const tristateEvent = {
|
|
32
|
+
...event
|
|
33
|
+
};
|
|
37
34
|
tristateEvent.target.checked = checkedValue(newChecked, newIndeterminate);
|
|
38
35
|
if (!isControlled) {
|
|
39
36
|
setChecked(newChecked);
|
|
40
37
|
setIndeterminate(newIndeterminate);
|
|
41
38
|
}
|
|
42
|
-
typeof onChange ===
|
|
39
|
+
typeof onChange === "function" && onChange(tristateEvent);
|
|
43
40
|
};
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
41
|
+
return /* @__PURE__ */ jsx(CheckboxBase, { checked: currentChecked, indeterminate, onChange: handleOnChange, ...restProps });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
CheckboxTristate
|
|
45
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CheckboxBase } from "./CheckboxBase.js";
|
|
2
|
+
import { CheckboxTristate } from "./CheckboxTristate.js";
|
|
3
|
+
export {
|
|
4
|
+
CheckboxBase,
|
|
5
|
+
CheckboxTristate
|
|
6
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Checkbox } from "./Checkbox.js";
|
|
2
|
+
import { checkedValue } from "./utils/checkedValue.js";
|
|
3
|
+
import { isTristateCheckbox } from "./utils/isTristateCheckbox.js";
|
|
4
|
+
import { nextCheckedValues } from "./utils/nextCheckedValues.js";
|
|
5
|
+
export {
|
|
6
|
+
checkedValue,
|
|
7
|
+
Checkbox as default,
|
|
8
|
+
isTristateCheckbox,
|
|
9
|
+
nextCheckedValues
|
|
10
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { checkedValue } from "./checkedValue.js";
|
|
2
|
+
import { isTristateCheckbox } from "./isTristateCheckbox.js";
|
|
3
|
+
import { nextCheckedValues } from "./nextCheckedValues.js";
|
|
4
|
+
export {
|
|
5
|
+
checkedValue,
|
|
6
|
+
isTristateCheckbox,
|
|
7
|
+
nextCheckedValues
|
|
8
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CheckboxProps, CheckboxTristateProps } from '../Checkbox.types';
|
|
2
2
|
export declare const isTristateCheckbox: (props: CheckboxProps | CheckboxTristateProps) => props is CheckboxTristateProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function nextCheckedValues(checked, indeterminate) {
|
|
2
2
|
if (checked === false) {
|
|
3
3
|
return [true, false];
|
|
4
4
|
}
|
|
@@ -6,4 +6,7 @@ export function nextCheckedValues(checked, indeterminate) {
|
|
|
6
6
|
return [true, true];
|
|
7
7
|
}
|
|
8
8
|
return [false, false];
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
nextCheckedValues
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-checkbox",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.21",
|
|
4
4
|
"description": "Checkbox UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
26
|
-
"test": "vitest",
|
|
27
|
-
"test:watch": "
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
28
|
"types": "tsc --noEmit",
|
|
29
29
|
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
30
|
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"*.less"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-typography": "^1.1.
|
|
37
|
+
"@synerise/ds-typography": "^1.1.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"vitest": "4"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react": ">=16.9.0 <= 18.3.1",
|
|
46
46
|
"styled-components": "^5.3.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
49
49
|
}
|