@spaced-out/ui-design-system 0.3.51-beta.0 → 0.4.1
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/.cspell/custom-words.txt +2 -0
- package/.github/workflows/publish_to_npm.yml +1 -1
- package/CHANGELOG.md +9 -0
- package/lib/components/Accordion/Accordion.js +70 -0
- package/lib/components/Accordion/Accordion.js.flow +116 -0
- package/lib/components/Accordion/Accordion.module.css +71 -0
- package/lib/components/Accordion/AccordionGroup.js +56 -0
- package/lib/components/Accordion/AccordionGroup.js.flow +75 -0
- package/lib/components/Accordion/AccordionGroup.module.css +29 -0
- package/lib/components/Accordion/index.js +27 -0
- package/lib/components/Accordion/index.js.flow +4 -0
- package/lib/components/index.js +11 -0
- package/lib/components/index.js.flow +1 -0
- package/package.json +2 -2
package/.cspell/custom-words.txt
CHANGED
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
- name: Check Permissions
|
|
23
23
|
id: check-permissions
|
|
24
24
|
env:
|
|
25
|
-
ALLOWED_USERS: superrover, Anant-Raj, diwakersurya, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid, sharad-kushwah, Swatantramishra1, bhatiarush27, darsh-mecwan-sense, keshavsensehq
|
|
25
|
+
ALLOWED_USERS: superrover, Anant-Raj, diwakersurya, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid, sharad-kushwah, Swatantramishra1, bhatiarush27, darsh-mecwan-sense, keshavsensehq, SahilShrivastava1
|
|
26
26
|
if: ${{ !contains(env.ALLOWED_USERS, github.actor) }}
|
|
27
27
|
run: |
|
|
28
28
|
echo "You don't have correct permissions to do this release"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.4.1](https://github.com/spaced-out/ui-design-system/compare/v0.4.0...v0.4.1) (2025-07-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **GDS-518:** accordian component ([#359](https://github.com/spaced-out/ui-design-system/issues/359)) ([c48b2c9](https://github.com/spaced-out/ui-design-system/commit/c48b2c985538e56cc359bbabc1fee25605220c0c))
|
|
11
|
+
|
|
12
|
+
## [0.4.0](https://github.com/spaced-out/ui-design-system/compare/v0.3.51-beta.0...v0.4.0) (2025-07-14)
|
|
13
|
+
|
|
5
14
|
### [0.3.51-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.3.50...v0.3.51-beta.0) (2025-07-09)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Accordion = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
+
var _Button = require("../Button");
|
|
10
|
+
var _Toggle = require("../Toggle");
|
|
11
|
+
var _AccordionModule = _interopRequireDefault(require("./Accordion.module.css"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const Accordion = exports.Accordion = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
15
|
+
let {
|
|
16
|
+
id,
|
|
17
|
+
header,
|
|
18
|
+
onChange,
|
|
19
|
+
onToggle,
|
|
20
|
+
disabled = false,
|
|
21
|
+
classNames,
|
|
22
|
+
isOpen = false,
|
|
23
|
+
showToggle = false,
|
|
24
|
+
children
|
|
25
|
+
} = _ref;
|
|
26
|
+
const [accordionIsOpen, setAccordionIsOpen] = React.useState(isOpen);
|
|
27
|
+
const [checked, setChecked] = React.useState(false);
|
|
28
|
+
const handleToggle = () => {
|
|
29
|
+
setChecked(!checked);
|
|
30
|
+
onToggle?.(id, !checked);
|
|
31
|
+
};
|
|
32
|
+
const handleAccordionClick = () => {
|
|
33
|
+
if (!disabled) {
|
|
34
|
+
onChange?.(id, !accordionIsOpen);
|
|
35
|
+
setAccordionIsOpen(prev => !prev);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
setAccordionIsOpen(isOpen);
|
|
40
|
+
}, [isOpen]);
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
ref: ref,
|
|
43
|
+
"data-testid": "Accordion",
|
|
44
|
+
className: (0, _classify.default)(_AccordionModule.default.wrapper, classNames?.wrapper)
|
|
45
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: (0, _classify.default)(_AccordionModule.default.headerWrapper, classNames?.headerWrapper),
|
|
47
|
+
onClick: handleAccordionClick
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: (0, _classify.default)(_AccordionModule.default.header, classNames?.header)
|
|
50
|
+
}, showToggle && /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
onClick: e => {
|
|
52
|
+
e.stopPropagation(); // prevent toggle click from triggering accordion toggle
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/React.createElement(_Toggle.Toggle, {
|
|
55
|
+
checked: checked,
|
|
56
|
+
onChange: handleToggle,
|
|
57
|
+
ariaLabel: 'toggle'
|
|
58
|
+
})), header), /*#__PURE__*/React.createElement(_Button.Button, {
|
|
59
|
+
iconLeftName: accordionIsOpen ? 'chevron-up' : 'chevron-down',
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
size: "small",
|
|
62
|
+
type: "ghost",
|
|
63
|
+
className: _AccordionModule.default.icon,
|
|
64
|
+
ariaLabel: 'Collapse button'
|
|
65
|
+
// we are not defining onClick here as we are using onClick of the parent here.
|
|
66
|
+
})), accordionIsOpen && /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: (0, _classify.default)(_AccordionModule.default.content, classNames?.content)
|
|
68
|
+
}, children));
|
|
69
|
+
});
|
|
70
|
+
Accordion.displayName = 'Accordion';
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import classify from '../../utils/classify';
|
|
6
|
+
import {Button} from '../Button';
|
|
7
|
+
import {Toggle} from '../Toggle';
|
|
8
|
+
|
|
9
|
+
import css from './Accordion.module.css';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export type AccordionClassNames = $ReadOnly<{
|
|
13
|
+
wrapper?: string,
|
|
14
|
+
headerWrapper?: string,
|
|
15
|
+
header?: string,
|
|
16
|
+
content?: string,
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export type AccordionPropsType = {
|
|
20
|
+
id: string,
|
|
21
|
+
header: React.Node,
|
|
22
|
+
children: React.Node,
|
|
23
|
+
classNames?: AccordionClassNames,
|
|
24
|
+
isOpen?: boolean,
|
|
25
|
+
disabled?: boolean,
|
|
26
|
+
showToggle?: boolean,
|
|
27
|
+
onChange?: ?(id?: string, isOpen: boolean) => mixed,
|
|
28
|
+
onToggle?: ?(id?: string, checked?: boolean) => mixed,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const Accordion: React$AbstractComponent<
|
|
32
|
+
AccordionPropsType,
|
|
33
|
+
HTMLDivElement,
|
|
34
|
+
> = React.forwardRef<AccordionPropsType, HTMLDivElement>(
|
|
35
|
+
(
|
|
36
|
+
{
|
|
37
|
+
id,
|
|
38
|
+
header,
|
|
39
|
+
onChange,
|
|
40
|
+
onToggle,
|
|
41
|
+
disabled = false,
|
|
42
|
+
classNames,
|
|
43
|
+
isOpen = false,
|
|
44
|
+
showToggle = false,
|
|
45
|
+
children,
|
|
46
|
+
}: AccordionPropsType,
|
|
47
|
+
ref,
|
|
48
|
+
) => {
|
|
49
|
+
const [accordionIsOpen, setAccordionIsOpen] = React.useState(isOpen);
|
|
50
|
+
|
|
51
|
+
const [checked, setChecked] = React.useState<boolean>(false);
|
|
52
|
+
|
|
53
|
+
const handleToggle = () => {
|
|
54
|
+
setChecked(!checked);
|
|
55
|
+
onToggle?.(id, !checked);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const handleAccordionClick = () => {
|
|
59
|
+
if (!disabled) {
|
|
60
|
+
onChange?.(id, !accordionIsOpen);
|
|
61
|
+
setAccordionIsOpen((prev) => !prev);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
setAccordionIsOpen(isOpen);
|
|
67
|
+
}, [isOpen]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<div
|
|
71
|
+
ref={ref}
|
|
72
|
+
data-testid="Accordion"
|
|
73
|
+
className={classify(css.wrapper, classNames?.wrapper)}
|
|
74
|
+
>
|
|
75
|
+
<div
|
|
76
|
+
className={classify(css.headerWrapper, classNames?.headerWrapper)}
|
|
77
|
+
onClick={handleAccordionClick}
|
|
78
|
+
>
|
|
79
|
+
<div className={classify(css.header, classNames?.header)}>
|
|
80
|
+
{showToggle && (
|
|
81
|
+
<div
|
|
82
|
+
onClick={(e) => {
|
|
83
|
+
e.stopPropagation(); // prevent toggle click from triggering accordion toggle
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<Toggle
|
|
87
|
+
checked={checked}
|
|
88
|
+
onChange={handleToggle}
|
|
89
|
+
ariaLabel={'toggle'}
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
93
|
+
{header}
|
|
94
|
+
</div>
|
|
95
|
+
<Button
|
|
96
|
+
iconLeftName={accordionIsOpen ? 'chevron-up' : 'chevron-down'}
|
|
97
|
+
disabled={disabled}
|
|
98
|
+
size="small"
|
|
99
|
+
type="ghost"
|
|
100
|
+
className={css.icon}
|
|
101
|
+
ariaLabel={'Collapse button'}
|
|
102
|
+
// we are not defining onClick here as we are using onClick of the parent here.
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
{accordionIsOpen && (
|
|
107
|
+
<div className={classify(css.content, classNames?.content)}>
|
|
108
|
+
{children}
|
|
109
|
+
</div>
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
Accordion.displayName = 'Accordion';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@value (
|
|
2
|
+
colorBorderPrimary,
|
|
3
|
+
colorBackgroundTertiary,
|
|
4
|
+
colorTextSecondary
|
|
5
|
+
) from '../../styles/variables/_color.css';
|
|
6
|
+
@value (
|
|
7
|
+
sizeFluid,
|
|
8
|
+
size58
|
|
9
|
+
) from '../../styles/variables/_size.css';
|
|
10
|
+
@value (
|
|
11
|
+
spaceNone,
|
|
12
|
+
spaceSmall,
|
|
13
|
+
spaceMedium,
|
|
14
|
+
spaceXSmall,
|
|
15
|
+
spaceXXSmall
|
|
16
|
+
) from '../../styles/variables/_space.css';
|
|
17
|
+
@value (
|
|
18
|
+
elevationCard
|
|
19
|
+
) from '../../styles/variables/_elevation.css';
|
|
20
|
+
@value (
|
|
21
|
+
borderWidthNone,
|
|
22
|
+
borderWidthPrimary,
|
|
23
|
+
borderRadiusSmall,
|
|
24
|
+
borderRadiusMedium,
|
|
25
|
+
borderRadiusNone,
|
|
26
|
+
borderWidthTertiary
|
|
27
|
+
) from '../../styles/variables/_border.css';
|
|
28
|
+
|
|
29
|
+
.wrapper {
|
|
30
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-flow: column;
|
|
33
|
+
width: sizeFluid;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.headerWrapper {
|
|
37
|
+
composes: subTitleSmall from '../../styles/typography.module.css';
|
|
38
|
+
display: flex;
|
|
39
|
+
min-height: size58;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
align-items: center;
|
|
42
|
+
width: sizeFluid;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
gap: spaceXSmall;
|
|
45
|
+
padding-left: spaceMedium;
|
|
46
|
+
padding-right: spaceMedium;
|
|
47
|
+
padding-top: spaceSmall;
|
|
48
|
+
padding-bottom: spaceSmall;
|
|
49
|
+
background-color: colorBackgroundTertiary;
|
|
50
|
+
z-index: elevationCard;
|
|
51
|
+
color: colorTextSecondary;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.icon {
|
|
55
|
+
padding-right: spaceMedium;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.header {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: spaceXSmall;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.content {
|
|
65
|
+
composes: borderTopPrimary from '../../styles/border.module.css';
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-flow: column;
|
|
68
|
+
background-color: colorBackgroundTertiary;
|
|
69
|
+
padding: spaceSmall;
|
|
70
|
+
gap: spaceXXSmall;
|
|
71
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AccordionGroup = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
+
var _AccordionGroupModule = _interopRequireDefault(require("./AccordionGroup.module.css"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
const AccordionGroup = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
onAccordionClick,
|
|
16
|
+
onToggle,
|
|
17
|
+
enabledToggleIds = [],
|
|
18
|
+
initialOpenId = '',
|
|
19
|
+
classNames
|
|
20
|
+
} = _ref;
|
|
21
|
+
const [openId, setOpenedId] = React.useState(initialOpenId);
|
|
22
|
+
const [checks, setChecks] = React.useState(enabledToggleIds);
|
|
23
|
+
const handleAccordionChange = (id, isOpen) => {
|
|
24
|
+
setOpenedId(isOpen ? id : '');
|
|
25
|
+
onAccordionClick?.(id, isOpen);
|
|
26
|
+
};
|
|
27
|
+
const handleToggle = (id, checked) => {
|
|
28
|
+
setChecks(prev => checked ? [...prev, id] : prev.filter(x => x !== id));
|
|
29
|
+
setOpenedId(prev => checked ? id : prev === id ? '' : prev);
|
|
30
|
+
onToggle?.(id, checked);
|
|
31
|
+
};
|
|
32
|
+
const enhancedChildren = React.Children.map(children, child => {
|
|
33
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const childId = child.props.id;
|
|
37
|
+
const isDisabled = !checks.includes(childId);
|
|
38
|
+
const isOpen = openId === childId;
|
|
39
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
40
|
+
classNames: {
|
|
41
|
+
headerWrapper: _AccordionGroupModule.default.accordionHeaderWrapper,
|
|
42
|
+
wrapper: _AccordionGroupModule.default.accordionWrapper
|
|
43
|
+
},
|
|
44
|
+
onChange: handleAccordionChange,
|
|
45
|
+
onToggle: handleToggle,
|
|
46
|
+
showToggle: true,
|
|
47
|
+
disabled: isDisabled,
|
|
48
|
+
isOpen
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: (0, _classify.default)(_AccordionGroupModule.default.wrapper, classNames?.wrapper)
|
|
53
|
+
}, enhancedChildren);
|
|
54
|
+
};
|
|
55
|
+
exports.AccordionGroup = AccordionGroup;
|
|
56
|
+
AccordionGroup.displayName = 'AccordionGroup';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import classify from '../../utils/classify';
|
|
6
|
+
|
|
7
|
+
import css from './AccordionGroup.module.css';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export type AccordionGroupClassNames = $ReadOnly<{
|
|
11
|
+
wrapper?: string,
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
export type AccordionGroupPropsType = {
|
|
15
|
+
children: React.Node,
|
|
16
|
+
onAccordionClick?: (id: string, isOpen: boolean) => mixed,
|
|
17
|
+
onToggle?: (id: string, checked?: boolean) => mixed,
|
|
18
|
+
enabledToggleIds?: Array<string>,
|
|
19
|
+
initialOpenId?: string,
|
|
20
|
+
classNames?: AccordionGroupClassNames,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const AccordionGroup = ({
|
|
24
|
+
children,
|
|
25
|
+
onAccordionClick,
|
|
26
|
+
onToggle,
|
|
27
|
+
enabledToggleIds = [],
|
|
28
|
+
initialOpenId = '',
|
|
29
|
+
classNames,
|
|
30
|
+
}: AccordionGroupPropsType): React.Node => {
|
|
31
|
+
const [openId, setOpenedId] = React.useState(initialOpenId);
|
|
32
|
+
const [checks, setChecks] = React.useState(enabledToggleIds);
|
|
33
|
+
const handleAccordionChange = (id, isOpen) => {
|
|
34
|
+
setOpenedId(isOpen ? id : '');
|
|
35
|
+
onAccordionClick?.(id, isOpen);
|
|
36
|
+
};
|
|
37
|
+
const handleToggle = (id, checked) => {
|
|
38
|
+
setChecks((prev) =>
|
|
39
|
+
checked ? [...prev, id] : prev.filter((x) => x !== id),
|
|
40
|
+
);
|
|
41
|
+
setOpenedId((prev) => (checked ? id : prev === id ? '' : prev));
|
|
42
|
+
onToggle?.(id, checked);
|
|
43
|
+
};
|
|
44
|
+
const enhancedChildren = React.Children.map(children, (child) => {
|
|
45
|
+
if (!React.isValidElement(child)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const childId = child.props.id;
|
|
50
|
+
|
|
51
|
+
const isDisabled = !checks.includes(childId);
|
|
52
|
+
|
|
53
|
+
const isOpen = openId === childId;
|
|
54
|
+
|
|
55
|
+
return React.cloneElement(child, {
|
|
56
|
+
classNames: {
|
|
57
|
+
headerWrapper: css.accordionHeaderWrapper,
|
|
58
|
+
wrapper: css.accordionWrapper,
|
|
59
|
+
},
|
|
60
|
+
onChange: handleAccordionChange,
|
|
61
|
+
onToggle: handleToggle,
|
|
62
|
+
showToggle: true,
|
|
63
|
+
disabled: isDisabled,
|
|
64
|
+
isOpen,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div className={classify(css.wrapper, classNames?.wrapper)}>
|
|
70
|
+
{enhancedChildren}
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
AccordionGroup.displayName = 'AccordionGroup';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@value (
|
|
2
|
+
sizeFluid
|
|
3
|
+
) from '../../styles/variables/_size.css';
|
|
4
|
+
|
|
5
|
+
@value (
|
|
6
|
+
borderWidthNone,
|
|
7
|
+
borderWidthPrimary
|
|
8
|
+
) from '../../styles/variables/_border.css';
|
|
9
|
+
@value (
|
|
10
|
+
colorBorderPrimary
|
|
11
|
+
) from '../../styles/variables/_color.css';
|
|
12
|
+
|
|
13
|
+
.wrapper {
|
|
14
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-flow: column;
|
|
17
|
+
width: sizeFluid;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.accordionWrapper {
|
|
22
|
+
border-top: borderWidthNone;
|
|
23
|
+
border-left: borderWidthNone;
|
|
24
|
+
border-right: borderWidthNone;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.accordionWrapper:last-child {
|
|
28
|
+
border-bottom: borderWidthNone;
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Accordion = require("./Accordion");
|
|
7
|
+
Object.keys(_Accordion).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Accordion[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Accordion[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _AccordionGroup = require("./AccordionGroup");
|
|
18
|
+
Object.keys(_AccordionGroup).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _AccordionGroup[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _AccordionGroup[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
package/lib/components/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _Accordion = require("./Accordion");
|
|
7
|
+
Object.keys(_Accordion).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Accordion[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Accordion[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _Avatar = require("./Avatar");
|
|
7
18
|
Object.keys(_Avatar).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spaced-out/ui-design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Sense UI components library",
|
|
6
6
|
"author": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"babel-preset-react-app": "^10.0.0",
|
|
79
79
|
"chalk": "^5.0.1",
|
|
80
80
|
"chromatic": "^6.11.4",
|
|
81
|
-
"cspell": "^
|
|
81
|
+
"cspell": "^9.1.2",
|
|
82
82
|
"eslint": "^8.22.0",
|
|
83
83
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
84
84
|
"eslint-plugin-import": "^2.26.0",
|