@indico-data/design-system 2.14.0 → 2.15.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/lib/index.css +47 -0
- package/lib/index.d.ts +64 -66
- package/lib/index.esm.css +47 -0
- package/lib/index.esm.js +9 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/src/components/card/Card.d.ts +10 -0
- package/lib/src/components/card/Card.stories.d.ts +6 -0
- package/lib/src/components/card/__tests__/Card.test.d.ts +1 -0
- package/lib/src/components/card/index.d.ts +1 -0
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +1 -7
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +4 -10
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.d.ts +1 -6
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +12 -17
- package/package.json +1 -1
- package/src/components/card/Card.mdx +14 -0
- package/src/components/card/Card.stories.tsx +97 -0
- package/src/components/card/Card.tsx +33 -0
- package/src/components/card/__tests__/Card.test.tsx +26 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/card/styles/Card.scss +44 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/legacy/components/basic-section/SectionHeader/SectionHeader.tsx +1 -6
- package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +1 -5
- package/src/styles/index.scss +1 -0
- package/src/styles/variables/_dropshadows.scss +5 -0
- package/src/styles/variables/index.scss +1 -0
package/lib/index.js
CHANGED
|
@@ -18747,6 +18747,12 @@ const Skeleton = (_a) => {
|
|
|
18747
18747
|
return jsxRuntime.jsx("div", Object.assign({ className: combinedClassName, style: dynamicStyle }, rest));
|
|
18748
18748
|
};
|
|
18749
18749
|
|
|
18750
|
+
const Card = (_a) => {
|
|
18751
|
+
var { className = '', children, title, subtitle, hasBoxShadow = false } = _a, rest = __rest$1(_a, ["className", "children", "title", "subtitle", "hasBoxShadow"]);
|
|
18752
|
+
const cardClasses = y$1('card', { 'card--box-shadow': hasBoxShadow }, className);
|
|
18753
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: cardClasses }, rest, { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: "card__header", children: [title && jsxRuntime.jsx("h2", { children: title }), subtitle && jsxRuntime.jsx("p", { children: subtitle })] })), jsxRuntime.jsx("div", { className: "card__content", children: children })] })));
|
|
18754
|
+
};
|
|
18755
|
+
|
|
18750
18756
|
const StyledAccordion = styled__default.default.details `
|
|
18751
18757
|
summary {
|
|
18752
18758
|
display: inherit;
|
|
@@ -18839,13 +18845,9 @@ const StyledSectionHeader = styled__default.default.header `
|
|
|
18839
18845
|
`;
|
|
18840
18846
|
|
|
18841
18847
|
const SectionHeader = (props) => {
|
|
18842
|
-
const { className, style, children, id } = props, restOfProps = __rest$1(props, ["className", "style", "children", "id"]);
|
|
18848
|
+
const { className = '', style = {}, children, id } = props, restOfProps = __rest$1(props, ["className", "style", "children", "id"]);
|
|
18843
18849
|
return (jsxRuntime.jsx(StyledSectionHeader, Object.assign({ className: y$1('SectionHeader', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
|
|
18844
18850
|
};
|
|
18845
|
-
SectionHeader.defaultProps = {
|
|
18846
|
-
className: '',
|
|
18847
|
-
style: {},
|
|
18848
|
-
};
|
|
18849
18851
|
|
|
18850
18852
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
18851
18853
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -23237,7 +23239,7 @@ const StyledSearchField = styled__default.default.div `
|
|
|
23237
23239
|
`;
|
|
23238
23240
|
|
|
23239
23241
|
const SearchInput = (props) => {
|
|
23240
|
-
const { id, inputBorder, showSearchIcon, showClearInputIcon, className, inputProps, onChange, onClear, onKeyUp, placeholder, value, } = props;
|
|
23242
|
+
const { id, inputBorder, showSearchIcon, showClearInputIcon, className = '', inputProps, onChange, onClear, onKeyUp, placeholder, value, } = props;
|
|
23241
23243
|
const getId = id ? id : v4();
|
|
23242
23244
|
return (jsxRuntime.jsxs(StyledSearchField, { className: y$1(className, {
|
|
23243
23245
|
inputBorder,
|
|
@@ -23245,9 +23247,6 @@ const SearchInput = (props) => {
|
|
|
23245
23247
|
showClearInputIcon,
|
|
23246
23248
|
}), "data-cy": props['data-cy'], children: [showSearchIcon && (jsxRuntime.jsx("label", { htmlFor: getId, children: jsxRuntime.jsx(Icon, { name: "fa-search", ariaLabel: "search" }) })), jsxRuntime.jsx("input", Object.assign({ "data-testid": props['data-testid'], type: "search", id: getId, placeholder: placeholder, value: value, onChange: onChange, onKeyUp: onKeyUp }, inputProps)), showClearInputIcon && (jsxRuntime.jsx(Icon, { name: "x-close", ariaLabel: "clear input", className: "clear-input", onClick: onClear }))] }));
|
|
23247
23249
|
};
|
|
23248
|
-
SearchInput.defaultProps = {
|
|
23249
|
-
className: '',
|
|
23250
|
-
};
|
|
23251
23250
|
|
|
23252
23251
|
const StyledTextInput = styled__default.default.div `
|
|
23253
23252
|
position: relative;
|
|
@@ -41577,6 +41576,7 @@ exports.BarSpinner = BarSpinner;
|
|
|
41577
41576
|
exports.BorderSelect = BorderSelect;
|
|
41578
41577
|
exports.Button = Button$2;
|
|
41579
41578
|
exports.COLORS = allColors;
|
|
41579
|
+
exports.Card = Card;
|
|
41580
41580
|
exports.Checkbox = Checkbox;
|
|
41581
41581
|
exports.CirclePulse = CirclePulse;
|
|
41582
41582
|
exports.CircleSpinner = CircleSpinner;
|