@mrshmllw/smores-react 9.16.0 → 9.18.0
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.
@@ -4,10 +4,12 @@ type Item = {
|
|
4
4
|
id: number;
|
5
5
|
label: string;
|
6
6
|
checked: boolean;
|
7
|
+
value?: string | number;
|
7
8
|
};
|
8
9
|
type CheckBoxGroupProps = {
|
9
10
|
list: Item[];
|
10
11
|
onToggle: (id: number) => void;
|
12
|
+
isColumn?: boolean;
|
11
13
|
} & MarginProps;
|
12
14
|
export declare const CheckBoxGroup: FC<CheckBoxGroupProps>;
|
13
15
|
export {};
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import { Box } from '../Box';
|
4
4
|
import { CheckBox } from '../CheckBox';
|
5
|
-
export const CheckBoxGroup = ({ list, onToggle, ...marginProps }) => (React.createElement(Container,
|
5
|
+
export const CheckBoxGroup = ({ list, onToggle, isColumn = true, ...marginProps }) => (React.createElement(Container, { isColumn: isColumn }, list.map((item) => (React.createElement(CheckBox, { key: item.id, id: String(item.id), checked: item.checked, toggle: () => onToggle(item.id), ...marginProps }, item.label)))));
|
6
6
|
const Container = styled(Box) `
|
7
7
|
display: flex;
|
8
|
-
flex-direction: column;
|
8
|
+
flex-direction: ${(p) => (p.isColumn ? 'column' : 'row')};
|
9
9
|
gap: 16px;
|
10
10
|
`;
|
11
11
|
//# sourceMappingURL=CheckBoxGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CheckBoxGroup.js","sourceRoot":"","sources":["../../src/CheckBoxGroup/CheckBoxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
1
|
+
{"version":3,"file":"CheckBoxGroup.js","sourceRoot":"","sources":["../../src/CheckBoxGroup/CheckBoxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAgBtC,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EACpD,IAAI,EACJ,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,GAAG,WAAW,EACf,EAAE,EAAE,CAAC,CACJ,oBAAC,SAAS,IAAC,QAAQ,EAAE,QAAQ,IAC1B,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAClB,oBAAC,QAAQ,IACP,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,KAC3B,WAAW,IAEd,IAAI,CAAC,KAAK,CACF,CACZ,CAAC,CACQ,CACb,CAAA;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAuB;;oBAEhC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;;CAEzD,CAAA"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
1
|
+
import { FC, JSX, ReactNode } from 'react';
|
2
2
|
import { MarginProps } from '../utils/space';
|
3
3
|
export type LabelledTextProps = {
|
4
4
|
children: ReactNode;
|
5
|
-
label: string;
|
5
|
+
label: string | JSX.Element;
|
6
6
|
labelMargin?: 2 | 4 | 8 | number;
|
7
7
|
} & MarginProps;
|
8
8
|
export declare const LabelledText: FC<LabelledTextProps>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LabelledText.js","sourceRoot":"","sources":["../../src/LabelledText/LabelledText.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"LabelledText.js","sourceRoot":"","sources":["../../src/LabelledText/LabelledText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAGtC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAQ9B,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAClD,KAAK,EACL,QAAQ,EACR,WAAW,GAAG,CAAC,EACf,GAAG,WAAW,EACf,EAAE,EAAE,CAAC,CACJ,oBAAC,SAAS,OAAK,WAAW,kBAAgB,WAAW,GAAG,IAAI;IAC1D,oBAAC,IAAI,IAAC,GAAG,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,IAC1C,KAAK,CACD;IACN,QAAQ,CACC,CACb,CAAA;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAA0B;;;;;qBAKlC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY;;CAEtD,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mrshmllw/smores-react",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.18.0",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"description": "Collection of React components used by Marshmallow Technology",
|
6
6
|
"keywords": [
|
@@ -35,56 +35,56 @@
|
|
35
35
|
"devDependencies": {
|
36
36
|
"@babel/core": "^7.25.2",
|
37
37
|
"@babel/eslint-parser": "^7.25.1",
|
38
|
-
"@babel/plugin-transform-class-properties": "^7.
|
39
|
-
"@babel/preset-env": "^7.25.
|
38
|
+
"@babel/plugin-transform-class-properties": "^7.25.4",
|
39
|
+
"@babel/preset-env": "^7.25.4",
|
40
40
|
"@babel/preset-react": "^7.18.6",
|
41
41
|
"@babel/preset-typescript": "^7.18.6",
|
42
|
-
"@commitlint/cli": "^19.
|
42
|
+
"@commitlint/cli": "^19.4.0",
|
43
43
|
"@commitlint/types": "^19.0.3",
|
44
44
|
"@semantic-release/changelog": "^6.0.3",
|
45
45
|
"@semantic-release/git": "^10.0.1",
|
46
|
-
"@semantic-release/github": "^10.1.
|
46
|
+
"@semantic-release/github": "^10.1.7",
|
47
47
|
"@semantic-release/npm": "^12.0.0",
|
48
|
-
"@snyk/protect": "^1.1292.
|
49
|
-
"@storybook/addon-a11y": "^8.2.
|
48
|
+
"@snyk/protect": "^1.1292.4",
|
49
|
+
"@storybook/addon-a11y": "^8.2.9",
|
50
50
|
"@storybook/addon-coverage": "^1.0.3",
|
51
|
-
"@storybook/addon-essentials": "^8.2.
|
52
|
-
"@storybook/addon-interactions": "^8.2.
|
53
|
-
"@storybook/addon-links": "^8.2.
|
54
|
-
"@storybook/react": "^8.2.
|
55
|
-
"@storybook/react-vite": "^8.2.
|
51
|
+
"@storybook/addon-essentials": "^8.2.9",
|
52
|
+
"@storybook/addon-interactions": "^8.2.9",
|
53
|
+
"@storybook/addon-links": "^8.2.9",
|
54
|
+
"@storybook/react": "^8.2.9",
|
55
|
+
"@storybook/react-vite": "^8.2.9",
|
56
56
|
"@storybook/test": "^8.2.1",
|
57
57
|
"@storybook/test-runner": "^0.19.1",
|
58
58
|
"@testing-library/react": "^16.0.0",
|
59
59
|
"@types/body-scroll-lock": "^3.1.0",
|
60
60
|
"@types/dompurify": "^3.0.5",
|
61
|
-
"@types/node": "^
|
61
|
+
"@types/node": "^22.5.1",
|
62
62
|
"@types/react": "^18.0.24",
|
63
63
|
"@types/react-dom": "^18.0.8",
|
64
64
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
65
65
|
"@typescript-eslint/parser": "^7.18.0",
|
66
|
-
"axe-playwright": "^2.0.
|
66
|
+
"axe-playwright": "^2.0.2",
|
67
67
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
68
68
|
"eslint": "^8.57.0",
|
69
69
|
"eslint-config-prettier": "^9.0.0",
|
70
70
|
"eslint-plugin-react": "^7.35.0",
|
71
71
|
"eslint-plugin-react-hooks": "^4.1.2",
|
72
|
-
"husky": "^9.1.
|
72
|
+
"husky": "^9.1.5",
|
73
73
|
"jsdom": "^24.1.1",
|
74
|
-
"lint-staged": "^15.
|
74
|
+
"lint-staged": "^15.2.9",
|
75
75
|
"prettier": "^3.3.3",
|
76
76
|
"react": "^18.2.0",
|
77
77
|
"react-dom": "^18.2.0",
|
78
78
|
"rimraf": "^6.0.1",
|
79
|
-
"semantic-release": "^24.
|
79
|
+
"semantic-release": "^24.1.0",
|
80
80
|
"storybook": "^8.0.4",
|
81
81
|
"styled-components": "^6.1.12",
|
82
82
|
"typescript": "^5.5.4",
|
83
|
-
"vite": "^5.
|
83
|
+
"vite": "^5.4.2",
|
84
84
|
"vitest": "^2.0.5"
|
85
85
|
},
|
86
86
|
"dependencies": {
|
87
|
-
"@lexical/react": "^0.17.
|
87
|
+
"@lexical/react": "^0.17.1",
|
88
88
|
"body-scroll-lock": "^4.0.0-beta.0",
|
89
89
|
"date-fns": "^3.6.0",
|
90
90
|
"dompurify": "^3.1.6",
|