@nulogy/components 8.4.1 → 8.4.3
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/main.js +245 -104
- package/dist/main.module.js +243 -105
- package/dist/src/DropdownMenu/DropdownMenu.d.ts +2 -1
- package/dist/src/Layout/Header.story.d.ts +3 -0
- package/dist/src/Summary/Summary.story.d.ts +0 -9
- package/dist/src/Summary/index.d.ts +2 -0
- package/dist/src/hooks/useMediaQuery/index.d.ts +2 -0
- package/dist/src/hooks/useMediaQuery/useMediaQuery.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/src/hooks/useMediaQuery.d.ts +0 -2
package/dist/main.js
CHANGED
|
@@ -16948,55 +16948,30 @@
|
|
|
16948
16948
|
})));
|
|
16949
16949
|
};
|
|
16950
16950
|
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
return {
|
|
16957
|
-
marginBottom: showArrow ? "4px" : null
|
|
16958
|
-
};
|
|
16959
|
-
|
|
16960
|
-
case "right":
|
|
16961
|
-
return {
|
|
16962
|
-
marginLeft: showArrow ? "8px" : null,
|
|
16963
|
-
marginTop: showArrow ? null : "-8px"
|
|
16964
|
-
};
|
|
16965
|
-
|
|
16966
|
-
case "left":
|
|
16967
|
-
return {
|
|
16968
|
-
marginRight: showArrow ? "8px" : null,
|
|
16969
|
-
marginTop: showArrow ? null : "-8px"
|
|
16970
|
-
};
|
|
16951
|
+
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
16952
|
+
var propType = PropTypes__default['default'].oneOfType([PropTypes__default['default'].number, PropTypes__default['default'].string, PropTypes__default['default'].array, PropTypes__default['default'].object]);
|
|
16953
|
+
var createPropTypes = function createPropTypes(props) {
|
|
16954
|
+
return props.reduce(function (acc, name) {
|
|
16955
|
+
var _extends2;
|
|
16971
16956
|
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16957
|
+
return _extends$1({}, acc, (_extends2 = {}, _extends2[name] = propType, _extends2));
|
|
16958
|
+
}, {});
|
|
16959
|
+
};
|
|
16960
|
+
var propTypes = {
|
|
16961
|
+
space: createPropTypes(space.propNames),
|
|
16962
|
+
color: createPropTypes(color.propNames),
|
|
16963
|
+
layout: createPropTypes(layout.propNames),
|
|
16964
|
+
typography: createPropTypes(typography.propNames),
|
|
16965
|
+
flexbox: createPropTypes(flexbox.propNames),
|
|
16966
|
+
border: createPropTypes(border.propNames),
|
|
16967
|
+
background: createPropTypes(background.propNames),
|
|
16968
|
+
position: createPropTypes(position.propNames),
|
|
16969
|
+
grid: createPropTypes(grid.propNames),
|
|
16970
|
+
shadow: createPropTypes(shadow.propNames),
|
|
16971
|
+
buttonStyle: createPropTypes(buttonStyle.propNames),
|
|
16972
|
+
textStyle: createPropTypes(textStyle.propNames),
|
|
16973
|
+
colorStyle: createPropTypes(colorStyle.propNames)
|
|
16978
16974
|
};
|
|
16979
|
-
|
|
16980
|
-
var DropdownMenuContainer = styled__default['default'](Box).withConfig({
|
|
16981
|
-
displayName: "DropdownMenuContainer",
|
|
16982
|
-
componentId: "sc-12o3dvc-0"
|
|
16983
|
-
})(color, function (_ref) {
|
|
16984
|
-
var dataPlacement = _ref.dataPlacement,
|
|
16985
|
-
_ref$showArrow = _ref.showArrow,
|
|
16986
|
-
showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
|
|
16987
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
16988
|
-
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
16989
|
-
theme = _ref.theme;
|
|
16990
|
-
return Object.assign({
|
|
16991
|
-
borderRadius: theme.radii.medium,
|
|
16992
|
-
backgroundColor: theme.colors[backgroundColor],
|
|
16993
|
-
borderTop: "1px solid " + theme.colors[backgroundColor],
|
|
16994
|
-
borderBottom: "1px solid " + theme.colors[backgroundColor],
|
|
16995
|
-
boxShadow: theme.shadows.medium,
|
|
16996
|
-
padding: "7px 0",
|
|
16997
|
-
zIndex: "100"
|
|
16998
|
-
}, getMenuMargin(dataPlacement, showArrow));
|
|
16999
|
-
});
|
|
17000
16975
|
|
|
17001
16976
|
/**!
|
|
17002
16977
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -17407,7 +17382,7 @@
|
|
|
17407
17382
|
return obj;
|
|
17408
17383
|
};
|
|
17409
17384
|
|
|
17410
|
-
var _extends
|
|
17385
|
+
var _extends = Object.assign || function (target) {
|
|
17411
17386
|
for (var i = 1; i < arguments.length; i++) {
|
|
17412
17387
|
var source = arguments[i];
|
|
17413
17388
|
|
|
@@ -17429,7 +17404,7 @@
|
|
|
17429
17404
|
* @returns {Object} ClientRect like output
|
|
17430
17405
|
*/
|
|
17431
17406
|
function getClientRect(offsets) {
|
|
17432
|
-
return _extends
|
|
17407
|
+
return _extends({}, offsets, {
|
|
17433
17408
|
right: offsets.left + offsets.width,
|
|
17434
17409
|
bottom: offsets.top + offsets.height
|
|
17435
17410
|
});
|
|
@@ -17717,7 +17692,7 @@
|
|
|
17717
17692
|
};
|
|
17718
17693
|
|
|
17719
17694
|
var sortedAreas = Object.keys(rects).map(function (key) {
|
|
17720
|
-
return _extends
|
|
17695
|
+
return _extends({
|
|
17721
17696
|
key: key
|
|
17722
17697
|
}, rects[key], {
|
|
17723
17698
|
area: getArea(rects[key])
|
|
@@ -18359,9 +18334,9 @@
|
|
|
18359
18334
|
};
|
|
18360
18335
|
|
|
18361
18336
|
// Update `data` attributes, styles and arrowStyles
|
|
18362
|
-
data.attributes = _extends
|
|
18363
|
-
data.styles = _extends
|
|
18364
|
-
data.arrowStyles = _extends
|
|
18337
|
+
data.attributes = _extends({}, attributes, data.attributes);
|
|
18338
|
+
data.styles = _extends({}, styles, data.styles);
|
|
18339
|
+
data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
|
|
18365
18340
|
|
|
18366
18341
|
return data;
|
|
18367
18342
|
}
|
|
@@ -18641,7 +18616,7 @@
|
|
|
18641
18616
|
|
|
18642
18617
|
// this object contains `position`, we want to preserve it along with
|
|
18643
18618
|
// any additional property we may add in the future
|
|
18644
|
-
data.offsets.popper = _extends
|
|
18619
|
+
data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
|
|
18645
18620
|
|
|
18646
18621
|
data = runModifiers(data.instance.modifiers, data, 'flip');
|
|
18647
18622
|
}
|
|
@@ -18915,7 +18890,7 @@
|
|
|
18915
18890
|
|
|
18916
18891
|
order.forEach(function (placement) {
|
|
18917
18892
|
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
|
|
18918
|
-
popper = _extends
|
|
18893
|
+
popper = _extends({}, popper, check[side](placement));
|
|
18919
18894
|
});
|
|
18920
18895
|
|
|
18921
18896
|
data.offsets.popper = popper;
|
|
@@ -18950,7 +18925,7 @@
|
|
|
18950
18925
|
end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
|
|
18951
18926
|
};
|
|
18952
18927
|
|
|
18953
|
-
data.offsets.popper = _extends
|
|
18928
|
+
data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
|
|
18954
18929
|
}
|
|
18955
18930
|
|
|
18956
18931
|
return data;
|
|
@@ -19482,7 +19457,7 @@
|
|
|
19482
19457
|
this.update = debounce$1(this.update.bind(this));
|
|
19483
19458
|
|
|
19484
19459
|
// with {} we create a new object with the options inside it
|
|
19485
|
-
this.options = _extends
|
|
19460
|
+
this.options = _extends({}, Popper.Defaults, options);
|
|
19486
19461
|
|
|
19487
19462
|
// init state
|
|
19488
19463
|
this.state = {
|
|
@@ -19497,13 +19472,13 @@
|
|
|
19497
19472
|
|
|
19498
19473
|
// Deep merge modifiers options
|
|
19499
19474
|
this.options.modifiers = {};
|
|
19500
|
-
Object.keys(_extends
|
|
19501
|
-
_this.options.modifiers[name] = _extends
|
|
19475
|
+
Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
|
|
19476
|
+
_this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
|
|
19502
19477
|
});
|
|
19503
19478
|
|
|
19504
19479
|
// Refactoring modifiers' list (Object => Array)
|
|
19505
19480
|
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
|
|
19506
|
-
return _extends
|
|
19481
|
+
return _extends({
|
|
19507
19482
|
name: name
|
|
19508
19483
|
}, _this.options.modifiers[name]);
|
|
19509
19484
|
})
|
|
@@ -20039,7 +20014,7 @@
|
|
|
20039
20014
|
};
|
|
20040
20015
|
|
|
20041
20016
|
var onClickEventHandlers = openOnClick ? {
|
|
20042
|
-
|
|
20017
|
+
onClick: function onClick() {
|
|
20043
20018
|
if (isOpen) {
|
|
20044
20019
|
closePopUp(false);
|
|
20045
20020
|
} else {
|
|
@@ -20150,31 +20125,6 @@
|
|
|
20150
20125
|
closeAriaLabel: undefined
|
|
20151
20126
|
};
|
|
20152
20127
|
|
|
20153
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
20154
|
-
var propType = PropTypes__default['default'].oneOfType([PropTypes__default['default'].number, PropTypes__default['default'].string, PropTypes__default['default'].array, PropTypes__default['default'].object]);
|
|
20155
|
-
var createPropTypes = function createPropTypes(props) {
|
|
20156
|
-
return props.reduce(function (acc, name) {
|
|
20157
|
-
var _extends2;
|
|
20158
|
-
|
|
20159
|
-
return _extends({}, acc, (_extends2 = {}, _extends2[name] = propType, _extends2));
|
|
20160
|
-
}, {});
|
|
20161
|
-
};
|
|
20162
|
-
var propTypes = {
|
|
20163
|
-
space: createPropTypes(space.propNames),
|
|
20164
|
-
color: createPropTypes(color.propNames),
|
|
20165
|
-
layout: createPropTypes(layout.propNames),
|
|
20166
|
-
typography: createPropTypes(typography.propNames),
|
|
20167
|
-
flexbox: createPropTypes(flexbox.propNames),
|
|
20168
|
-
border: createPropTypes(border.propNames),
|
|
20169
|
-
background: createPropTypes(background.propNames),
|
|
20170
|
-
position: createPropTypes(position.propNames),
|
|
20171
|
-
grid: createPropTypes(grid.propNames),
|
|
20172
|
-
shadow: createPropTypes(shadow.propNames),
|
|
20173
|
-
buttonStyle: createPropTypes(buttonStyle.propNames),
|
|
20174
|
-
textStyle: createPropTypes(textStyle.propNames),
|
|
20175
|
-
colorStyle: createPropTypes(colorStyle.propNames)
|
|
20176
|
-
};
|
|
20177
|
-
|
|
20178
20128
|
var getSubset = function getSubset(o, propObj) {
|
|
20179
20129
|
var fields = Object.keys(propObj);
|
|
20180
20130
|
return pick.apply(void 0, [o].concat(fields));
|
|
@@ -20201,6 +20151,56 @@
|
|
|
20201
20151
|
}, {});
|
|
20202
20152
|
};
|
|
20203
20153
|
|
|
20154
|
+
var getMenuMargin = function getMenuMargin(placement, showArrow) {
|
|
20155
|
+
var direction = String(placement).split("-")[0];
|
|
20156
|
+
|
|
20157
|
+
switch (direction) {
|
|
20158
|
+
case "top":
|
|
20159
|
+
return {
|
|
20160
|
+
marginBottom: showArrow ? "4px" : null
|
|
20161
|
+
};
|
|
20162
|
+
|
|
20163
|
+
case "right":
|
|
20164
|
+
return {
|
|
20165
|
+
marginLeft: showArrow ? "8px" : null,
|
|
20166
|
+
marginTop: showArrow ? null : "-8px"
|
|
20167
|
+
};
|
|
20168
|
+
|
|
20169
|
+
case "left":
|
|
20170
|
+
return {
|
|
20171
|
+
marginRight: showArrow ? "8px" : null,
|
|
20172
|
+
marginTop: showArrow ? null : "-8px"
|
|
20173
|
+
};
|
|
20174
|
+
|
|
20175
|
+
case "bottom":
|
|
20176
|
+
default:
|
|
20177
|
+
return {
|
|
20178
|
+
marginTop: showArrow ? "4px" : null
|
|
20179
|
+
};
|
|
20180
|
+
}
|
|
20181
|
+
};
|
|
20182
|
+
|
|
20183
|
+
var DropdownMenuContainer = styled__default['default'](Box).withConfig({
|
|
20184
|
+
displayName: "DropdownMenuContainer",
|
|
20185
|
+
componentId: "sc-12o3dvc-0"
|
|
20186
|
+
})(color, function (_ref) {
|
|
20187
|
+
var dataPlacement = _ref.dataPlacement,
|
|
20188
|
+
_ref$showArrow = _ref.showArrow,
|
|
20189
|
+
showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
|
|
20190
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
20191
|
+
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
20192
|
+
theme = _ref.theme;
|
|
20193
|
+
return Object.assign({
|
|
20194
|
+
borderRadius: theme.radii.medium,
|
|
20195
|
+
backgroundColor: theme.colors[backgroundColor],
|
|
20196
|
+
borderTop: "1px solid " + theme.colors[backgroundColor],
|
|
20197
|
+
borderBottom: "1px solid " + theme.colors[backgroundColor],
|
|
20198
|
+
boxShadow: theme.shadows.medium,
|
|
20199
|
+
padding: "7px 0",
|
|
20200
|
+
zIndex: "100"
|
|
20201
|
+
}, getMenuMargin(dataPlacement, showArrow));
|
|
20202
|
+
});
|
|
20203
|
+
|
|
20204
20204
|
var DEFAULT_POPPER_MODIFIERS = {
|
|
20205
20205
|
preventOverflow: {
|
|
20206
20206
|
enabled: true,
|
|
@@ -42699,6 +42699,162 @@
|
|
|
42699
42699
|
onHidden: function onHidden() {}
|
|
42700
42700
|
};
|
|
42701
42701
|
|
|
42702
|
+
var SummaryContext = /*#__PURE__*/React.createContext(undefined);
|
|
42703
|
+
function useSummaryContext() {
|
|
42704
|
+
var context = React.useContext(SummaryContext);
|
|
42705
|
+
|
|
42706
|
+
if (!context) {
|
|
42707
|
+
throw new Error("Summary compound components cannot be rendered outside the Summary component");
|
|
42708
|
+
}
|
|
42709
|
+
|
|
42710
|
+
return context;
|
|
42711
|
+
}
|
|
42712
|
+
var SummaryContextProvider = function SummaryContextProvider(_ref) {
|
|
42713
|
+
var breakpoint = _ref.breakpoint,
|
|
42714
|
+
children = _ref.children;
|
|
42715
|
+
return /*#__PURE__*/React__default['default'].createElement(SummaryContext.Provider, {
|
|
42716
|
+
value: {
|
|
42717
|
+
breakpoint: breakpoint
|
|
42718
|
+
}
|
|
42719
|
+
}, children);
|
|
42720
|
+
};
|
|
42721
|
+
|
|
42722
|
+
var SummaryWrapper = styled__default['default'](Box).withConfig({
|
|
42723
|
+
displayName: "Summary__SummaryWrapper",
|
|
42724
|
+
componentId: "sc-1hzufqo-0"
|
|
42725
|
+
})(function (_ref) {
|
|
42726
|
+
var _ref2;
|
|
42727
|
+
|
|
42728
|
+
var theme = _ref.theme,
|
|
42729
|
+
breakpoint = _ref.breakpoint;
|
|
42730
|
+
return _ref2 = {
|
|
42731
|
+
display: "flex",
|
|
42732
|
+
background: theme.colors.white,
|
|
42733
|
+
gap: theme.space.x2,
|
|
42734
|
+
paddingTop: theme.space.x1,
|
|
42735
|
+
paddingBottom: theme.space.x1,
|
|
42736
|
+
paddingLeft: theme.space.x2,
|
|
42737
|
+
paddingRight: theme.space.x2,
|
|
42738
|
+
borderRadius: theme.radii.medium,
|
|
42739
|
+
width: "fit-content"
|
|
42740
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42741
|
+
background: "none",
|
|
42742
|
+
flexFlow: "wrap",
|
|
42743
|
+
padding: 0,
|
|
42744
|
+
paddingTop: theme.space.x2,
|
|
42745
|
+
rowGap: 0
|
|
42746
|
+
}, _ref2;
|
|
42747
|
+
});
|
|
42748
|
+
var DEFAULT_BREAKPOINT = Theme.breakpoints.medium;
|
|
42749
|
+
|
|
42750
|
+
var Summary = function Summary(_a) {
|
|
42751
|
+
var _a$breakpoint = _a.breakpoint,
|
|
42752
|
+
breakpoint = _a$breakpoint === void 0 ? DEFAULT_BREAKPOINT : _a$breakpoint,
|
|
42753
|
+
children = _a.children,
|
|
42754
|
+
rest = __rest(_a, ["breakpoint", "children"]);
|
|
42755
|
+
|
|
42756
|
+
var breakpointPx = pixelDigitsFrom$1(breakpoint);
|
|
42757
|
+
return /*#__PURE__*/React__default['default'].createElement(SummaryContextProvider, {
|
|
42758
|
+
breakpoint: breakpointPx
|
|
42759
|
+
}, /*#__PURE__*/React__default['default'].createElement(SummaryWrapper, Object.assign({
|
|
42760
|
+
breakpoint: breakpointPx
|
|
42761
|
+
}, rest), children));
|
|
42762
|
+
};
|
|
42763
|
+
|
|
42764
|
+
function useMediaQuery(query) {
|
|
42765
|
+
var isUnsupported = typeof window === "undefined" || typeof window.matchMedia === "undefined";
|
|
42766
|
+
|
|
42767
|
+
var getMatches = function getMatches(query) {
|
|
42768
|
+
if (isUnsupported) {
|
|
42769
|
+
return false;
|
|
42770
|
+
}
|
|
42771
|
+
|
|
42772
|
+
return window.matchMedia(query).matches;
|
|
42773
|
+
};
|
|
42774
|
+
|
|
42775
|
+
var _useState = React.useState(getMatches(query)),
|
|
42776
|
+
matches = _useState[0],
|
|
42777
|
+
setMatches = _useState[1];
|
|
42778
|
+
|
|
42779
|
+
function handleChange() {
|
|
42780
|
+
setMatches(getMatches(query));
|
|
42781
|
+
}
|
|
42782
|
+
|
|
42783
|
+
React.useEffect(function () {
|
|
42784
|
+
if (isUnsupported) return;
|
|
42785
|
+
var matchMedia = window.matchMedia(query);
|
|
42786
|
+
handleChange();
|
|
42787
|
+
matchMedia.addEventListener("change", handleChange);
|
|
42788
|
+
return function () {
|
|
42789
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
42790
|
+
};
|
|
42791
|
+
}, [query]);
|
|
42792
|
+
return matches;
|
|
42793
|
+
}
|
|
42794
|
+
|
|
42795
|
+
var SummaryItemWrapper = styled__default['default'](Flex).withConfig({
|
|
42796
|
+
displayName: "SummaryItem__SummaryItemWrapper",
|
|
42797
|
+
componentId: "kqzify-0"
|
|
42798
|
+
})(function (_ref) {
|
|
42799
|
+
var _ref2;
|
|
42800
|
+
|
|
42801
|
+
var theme = _ref.theme,
|
|
42802
|
+
breakpoint = _ref.breakpoint;
|
|
42803
|
+
return _ref2 = {
|
|
42804
|
+
gap: theme.space.half,
|
|
42805
|
+
flexDirection: "column"
|
|
42806
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42807
|
+
flexDirection: "row"
|
|
42808
|
+
}, _ref2;
|
|
42809
|
+
});
|
|
42810
|
+
|
|
42811
|
+
var SummaryItem = function SummaryItem(_a) {
|
|
42812
|
+
var value = _a.value,
|
|
42813
|
+
status = _a.status,
|
|
42814
|
+
rest = __rest(_a, ["value", "status"]);
|
|
42815
|
+
|
|
42816
|
+
var _useSummaryContext = useSummaryContext(),
|
|
42817
|
+
breakpoint = _useSummaryContext.breakpoint;
|
|
42818
|
+
|
|
42819
|
+
var matches = useMediaQuery("(max-width: " + breakpoint + "px)");
|
|
42820
|
+
delete rest["children"];
|
|
42821
|
+
return /*#__PURE__*/React__default['default'].createElement(SummaryItemWrapper, Object.assign({
|
|
42822
|
+
breakpoint: breakpoint
|
|
42823
|
+
}, rest), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
42824
|
+
fontWeight: "medium",
|
|
42825
|
+
fontSize: !matches ? "heading4" : undefined
|
|
42826
|
+
}, value), status);
|
|
42827
|
+
};
|
|
42828
|
+
|
|
42829
|
+
var Divider$1 = styled__default['default'](Box).withConfig({
|
|
42830
|
+
displayName: "SummaryDivider__Divider",
|
|
42831
|
+
componentId: "sc-1amkaa8-0"
|
|
42832
|
+
})(function (_ref) {
|
|
42833
|
+
var _ref2;
|
|
42834
|
+
|
|
42835
|
+
var theme = _ref.theme,
|
|
42836
|
+
breakpoint = _ref.breakpoint;
|
|
42837
|
+
return _ref2 = {
|
|
42838
|
+
display: "block",
|
|
42839
|
+
alignSelf: "stretch",
|
|
42840
|
+
width: 1,
|
|
42841
|
+
marginRight: theme.space.x1,
|
|
42842
|
+
marginLeft: theme.space.x1,
|
|
42843
|
+
background: theme.colors.grey
|
|
42844
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42845
|
+
display: "none"
|
|
42846
|
+
}, _ref2;
|
|
42847
|
+
});
|
|
42848
|
+
|
|
42849
|
+
var SummaryDivider = function SummaryDivider(props) {
|
|
42850
|
+
var _useSummaryContext = useSummaryContext(),
|
|
42851
|
+
breakpoint = _useSummaryContext.breakpoint;
|
|
42852
|
+
|
|
42853
|
+
return /*#__PURE__*/React__default['default'].createElement(Divider$1, Object.assign({
|
|
42854
|
+
breakpoint: pixelDigitsFrom$1(breakpoint)
|
|
42855
|
+
}, props));
|
|
42856
|
+
};
|
|
42857
|
+
|
|
42702
42858
|
var StatelessNavBarDropdownMenuClass = /*#__PURE__*/function (_React$Component) {
|
|
42703
42859
|
_inheritsLoose__default['default'](StatelessNavBarDropdownMenuClass, _React$Component);
|
|
42704
42860
|
|
|
@@ -50749,24 +50905,6 @@
|
|
|
50749
50905
|
}, children));
|
|
50750
50906
|
};
|
|
50751
50907
|
|
|
50752
|
-
var useMediaQuery = function useMediaQuery(query) {
|
|
50753
|
-
var _useState = React.useState(window.matchMedia(query).matches),
|
|
50754
|
-
matches = _useState[0],
|
|
50755
|
-
setMatches = _useState[1];
|
|
50756
|
-
|
|
50757
|
-
React.useEffect(function () {
|
|
50758
|
-
var handler = function handler(e) {
|
|
50759
|
-
setMatches(e.matches);
|
|
50760
|
-
};
|
|
50761
|
-
|
|
50762
|
-
window.matchMedia(query).addEventListener("change", handler);
|
|
50763
|
-
return function () {
|
|
50764
|
-
window.removeEventListener("change", handler);
|
|
50765
|
-
};
|
|
50766
|
-
}, []);
|
|
50767
|
-
return matches;
|
|
50768
|
-
};
|
|
50769
|
-
|
|
50770
50908
|
var Header = function Header(_a) {
|
|
50771
50909
|
var _b, _c;
|
|
50772
50910
|
|
|
@@ -51248,6 +51386,9 @@
|
|
|
51248
51386
|
exports.SmallNavBar = SmallNavBar;
|
|
51249
51387
|
exports.SortingTable = SortingTable;
|
|
51250
51388
|
exports.StatusIndicator = StatusIndicator;
|
|
51389
|
+
exports.Summary = Summary;
|
|
51390
|
+
exports.SummaryDivider = SummaryDivider;
|
|
51391
|
+
exports.SummaryItem = SummaryItem;
|
|
51251
51392
|
exports.Switch = Switch;
|
|
51252
51393
|
exports.Switcher = Switcher;
|
|
51253
51394
|
exports.Tab = Tab;
|
package/dist/main.module.js
CHANGED
|
@@ -16922,55 +16922,30 @@ var Branding = function Branding(_a) {
|
|
|
16922
16922
|
})));
|
|
16923
16923
|
};
|
|
16924
16924
|
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
return {
|
|
16931
|
-
marginBottom: showArrow ? "4px" : null
|
|
16932
|
-
};
|
|
16933
|
-
|
|
16934
|
-
case "right":
|
|
16935
|
-
return {
|
|
16936
|
-
marginLeft: showArrow ? "8px" : null,
|
|
16937
|
-
marginTop: showArrow ? null : "-8px"
|
|
16938
|
-
};
|
|
16939
|
-
|
|
16940
|
-
case "left":
|
|
16941
|
-
return {
|
|
16942
|
-
marginRight: showArrow ? "8px" : null,
|
|
16943
|
-
marginTop: showArrow ? null : "-8px"
|
|
16944
|
-
};
|
|
16925
|
+
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
16926
|
+
var propType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array, PropTypes.object]);
|
|
16927
|
+
var createPropTypes = function createPropTypes(props) {
|
|
16928
|
+
return props.reduce(function (acc, name) {
|
|
16929
|
+
var _extends2;
|
|
16945
16930
|
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16931
|
+
return _extends$1({}, acc, (_extends2 = {}, _extends2[name] = propType, _extends2));
|
|
16932
|
+
}, {});
|
|
16933
|
+
};
|
|
16934
|
+
var propTypes = {
|
|
16935
|
+
space: createPropTypes(space.propNames),
|
|
16936
|
+
color: createPropTypes(color.propNames),
|
|
16937
|
+
layout: createPropTypes(layout.propNames),
|
|
16938
|
+
typography: createPropTypes(typography.propNames),
|
|
16939
|
+
flexbox: createPropTypes(flexbox.propNames),
|
|
16940
|
+
border: createPropTypes(border.propNames),
|
|
16941
|
+
background: createPropTypes(background.propNames),
|
|
16942
|
+
position: createPropTypes(position.propNames),
|
|
16943
|
+
grid: createPropTypes(grid.propNames),
|
|
16944
|
+
shadow: createPropTypes(shadow.propNames),
|
|
16945
|
+
buttonStyle: createPropTypes(buttonStyle.propNames),
|
|
16946
|
+
textStyle: createPropTypes(textStyle.propNames),
|
|
16947
|
+
colorStyle: createPropTypes(colorStyle.propNames)
|
|
16952
16948
|
};
|
|
16953
|
-
|
|
16954
|
-
var DropdownMenuContainer = styled(Box).withConfig({
|
|
16955
|
-
displayName: "DropdownMenuContainer",
|
|
16956
|
-
componentId: "sc-12o3dvc-0"
|
|
16957
|
-
})(color, function (_ref) {
|
|
16958
|
-
var dataPlacement = _ref.dataPlacement,
|
|
16959
|
-
_ref$showArrow = _ref.showArrow,
|
|
16960
|
-
showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
|
|
16961
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
16962
|
-
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
16963
|
-
theme = _ref.theme;
|
|
16964
|
-
return Object.assign({
|
|
16965
|
-
borderRadius: theme.radii.medium,
|
|
16966
|
-
backgroundColor: theme.colors[backgroundColor],
|
|
16967
|
-
borderTop: "1px solid " + theme.colors[backgroundColor],
|
|
16968
|
-
borderBottom: "1px solid " + theme.colors[backgroundColor],
|
|
16969
|
-
boxShadow: theme.shadows.medium,
|
|
16970
|
-
padding: "7px 0",
|
|
16971
|
-
zIndex: "100"
|
|
16972
|
-
}, getMenuMargin(dataPlacement, showArrow));
|
|
16973
|
-
});
|
|
16974
16949
|
|
|
16975
16950
|
/**!
|
|
16976
16951
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -17381,7 +17356,7 @@ var defineProperty = function (obj, key, value) {
|
|
|
17381
17356
|
return obj;
|
|
17382
17357
|
};
|
|
17383
17358
|
|
|
17384
|
-
var _extends
|
|
17359
|
+
var _extends = Object.assign || function (target) {
|
|
17385
17360
|
for (var i = 1; i < arguments.length; i++) {
|
|
17386
17361
|
var source = arguments[i];
|
|
17387
17362
|
|
|
@@ -17403,7 +17378,7 @@ var _extends$1 = Object.assign || function (target) {
|
|
|
17403
17378
|
* @returns {Object} ClientRect like output
|
|
17404
17379
|
*/
|
|
17405
17380
|
function getClientRect(offsets) {
|
|
17406
|
-
return _extends
|
|
17381
|
+
return _extends({}, offsets, {
|
|
17407
17382
|
right: offsets.left + offsets.width,
|
|
17408
17383
|
bottom: offsets.top + offsets.height
|
|
17409
17384
|
});
|
|
@@ -17691,7 +17666,7 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
|
|
|
17691
17666
|
};
|
|
17692
17667
|
|
|
17693
17668
|
var sortedAreas = Object.keys(rects).map(function (key) {
|
|
17694
|
-
return _extends
|
|
17669
|
+
return _extends({
|
|
17695
17670
|
key: key
|
|
17696
17671
|
}, rects[key], {
|
|
17697
17672
|
area: getArea(rects[key])
|
|
@@ -18333,9 +18308,9 @@ function computeStyle(data, options) {
|
|
|
18333
18308
|
};
|
|
18334
18309
|
|
|
18335
18310
|
// Update `data` attributes, styles and arrowStyles
|
|
18336
|
-
data.attributes = _extends
|
|
18337
|
-
data.styles = _extends
|
|
18338
|
-
data.arrowStyles = _extends
|
|
18311
|
+
data.attributes = _extends({}, attributes, data.attributes);
|
|
18312
|
+
data.styles = _extends({}, styles, data.styles);
|
|
18313
|
+
data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
|
|
18339
18314
|
|
|
18340
18315
|
return data;
|
|
18341
18316
|
}
|
|
@@ -18615,7 +18590,7 @@ function flip(data, options) {
|
|
|
18615
18590
|
|
|
18616
18591
|
// this object contains `position`, we want to preserve it along with
|
|
18617
18592
|
// any additional property we may add in the future
|
|
18618
|
-
data.offsets.popper = _extends
|
|
18593
|
+
data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
|
|
18619
18594
|
|
|
18620
18595
|
data = runModifiers(data.instance.modifiers, data, 'flip');
|
|
18621
18596
|
}
|
|
@@ -18889,7 +18864,7 @@ function preventOverflow(data, options) {
|
|
|
18889
18864
|
|
|
18890
18865
|
order.forEach(function (placement) {
|
|
18891
18866
|
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
|
|
18892
|
-
popper = _extends
|
|
18867
|
+
popper = _extends({}, popper, check[side](placement));
|
|
18893
18868
|
});
|
|
18894
18869
|
|
|
18895
18870
|
data.offsets.popper = popper;
|
|
@@ -18924,7 +18899,7 @@ function shift(data) {
|
|
|
18924
18899
|
end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
|
|
18925
18900
|
};
|
|
18926
18901
|
|
|
18927
|
-
data.offsets.popper = _extends
|
|
18902
|
+
data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
|
|
18928
18903
|
}
|
|
18929
18904
|
|
|
18930
18905
|
return data;
|
|
@@ -19456,7 +19431,7 @@ var Popper$3 = function () {
|
|
|
19456
19431
|
this.update = debounce$1(this.update.bind(this));
|
|
19457
19432
|
|
|
19458
19433
|
// with {} we create a new object with the options inside it
|
|
19459
|
-
this.options = _extends
|
|
19434
|
+
this.options = _extends({}, Popper.Defaults, options);
|
|
19460
19435
|
|
|
19461
19436
|
// init state
|
|
19462
19437
|
this.state = {
|
|
@@ -19471,13 +19446,13 @@ var Popper$3 = function () {
|
|
|
19471
19446
|
|
|
19472
19447
|
// Deep merge modifiers options
|
|
19473
19448
|
this.options.modifiers = {};
|
|
19474
|
-
Object.keys(_extends
|
|
19475
|
-
_this.options.modifiers[name] = _extends
|
|
19449
|
+
Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
|
|
19450
|
+
_this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
|
|
19476
19451
|
});
|
|
19477
19452
|
|
|
19478
19453
|
// Refactoring modifiers' list (Object => Array)
|
|
19479
19454
|
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
|
|
19480
|
-
return _extends
|
|
19455
|
+
return _extends({
|
|
19481
19456
|
name: name
|
|
19482
19457
|
}, _this.options.modifiers[name]);
|
|
19483
19458
|
})
|
|
@@ -20013,7 +19988,7 @@ var Popper$1 = /*#__PURE__*/React__default.forwardRef(function (_ref, popperRef)
|
|
|
20013
19988
|
};
|
|
20014
19989
|
|
|
20015
19990
|
var onClickEventHandlers = openOnClick ? {
|
|
20016
|
-
|
|
19991
|
+
onClick: function onClick() {
|
|
20017
19992
|
if (isOpen) {
|
|
20018
19993
|
closePopUp(false);
|
|
20019
19994
|
} else {
|
|
@@ -20124,31 +20099,6 @@ Popper$1.defaultProps = {
|
|
|
20124
20099
|
closeAriaLabel: undefined
|
|
20125
20100
|
};
|
|
20126
20101
|
|
|
20127
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
20128
|
-
var propType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array, PropTypes.object]);
|
|
20129
|
-
var createPropTypes = function createPropTypes(props) {
|
|
20130
|
-
return props.reduce(function (acc, name) {
|
|
20131
|
-
var _extends2;
|
|
20132
|
-
|
|
20133
|
-
return _extends({}, acc, (_extends2 = {}, _extends2[name] = propType, _extends2));
|
|
20134
|
-
}, {});
|
|
20135
|
-
};
|
|
20136
|
-
var propTypes = {
|
|
20137
|
-
space: createPropTypes(space.propNames),
|
|
20138
|
-
color: createPropTypes(color.propNames),
|
|
20139
|
-
layout: createPropTypes(layout.propNames),
|
|
20140
|
-
typography: createPropTypes(typography.propNames),
|
|
20141
|
-
flexbox: createPropTypes(flexbox.propNames),
|
|
20142
|
-
border: createPropTypes(border.propNames),
|
|
20143
|
-
background: createPropTypes(background.propNames),
|
|
20144
|
-
position: createPropTypes(position.propNames),
|
|
20145
|
-
grid: createPropTypes(grid.propNames),
|
|
20146
|
-
shadow: createPropTypes(shadow.propNames),
|
|
20147
|
-
buttonStyle: createPropTypes(buttonStyle.propNames),
|
|
20148
|
-
textStyle: createPropTypes(textStyle.propNames),
|
|
20149
|
-
colorStyle: createPropTypes(colorStyle.propNames)
|
|
20150
|
-
};
|
|
20151
|
-
|
|
20152
20102
|
var getSubset = function getSubset(o, propObj) {
|
|
20153
20103
|
var fields = Object.keys(propObj);
|
|
20154
20104
|
return pick.apply(void 0, [o].concat(fields));
|
|
@@ -20175,6 +20125,56 @@ var pick = function pick(o) {
|
|
|
20175
20125
|
}, {});
|
|
20176
20126
|
};
|
|
20177
20127
|
|
|
20128
|
+
var getMenuMargin = function getMenuMargin(placement, showArrow) {
|
|
20129
|
+
var direction = String(placement).split("-")[0];
|
|
20130
|
+
|
|
20131
|
+
switch (direction) {
|
|
20132
|
+
case "top":
|
|
20133
|
+
return {
|
|
20134
|
+
marginBottom: showArrow ? "4px" : null
|
|
20135
|
+
};
|
|
20136
|
+
|
|
20137
|
+
case "right":
|
|
20138
|
+
return {
|
|
20139
|
+
marginLeft: showArrow ? "8px" : null,
|
|
20140
|
+
marginTop: showArrow ? null : "-8px"
|
|
20141
|
+
};
|
|
20142
|
+
|
|
20143
|
+
case "left":
|
|
20144
|
+
return {
|
|
20145
|
+
marginRight: showArrow ? "8px" : null,
|
|
20146
|
+
marginTop: showArrow ? null : "-8px"
|
|
20147
|
+
};
|
|
20148
|
+
|
|
20149
|
+
case "bottom":
|
|
20150
|
+
default:
|
|
20151
|
+
return {
|
|
20152
|
+
marginTop: showArrow ? "4px" : null
|
|
20153
|
+
};
|
|
20154
|
+
}
|
|
20155
|
+
};
|
|
20156
|
+
|
|
20157
|
+
var DropdownMenuContainer = styled(Box).withConfig({
|
|
20158
|
+
displayName: "DropdownMenuContainer",
|
|
20159
|
+
componentId: "sc-12o3dvc-0"
|
|
20160
|
+
})(color, function (_ref) {
|
|
20161
|
+
var dataPlacement = _ref.dataPlacement,
|
|
20162
|
+
_ref$showArrow = _ref.showArrow,
|
|
20163
|
+
showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
|
|
20164
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
20165
|
+
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
20166
|
+
theme = _ref.theme;
|
|
20167
|
+
return Object.assign({
|
|
20168
|
+
borderRadius: theme.radii.medium,
|
|
20169
|
+
backgroundColor: theme.colors[backgroundColor],
|
|
20170
|
+
borderTop: "1px solid " + theme.colors[backgroundColor],
|
|
20171
|
+
borderBottom: "1px solid " + theme.colors[backgroundColor],
|
|
20172
|
+
boxShadow: theme.shadows.medium,
|
|
20173
|
+
padding: "7px 0",
|
|
20174
|
+
zIndex: "100"
|
|
20175
|
+
}, getMenuMargin(dataPlacement, showArrow));
|
|
20176
|
+
});
|
|
20177
|
+
|
|
20178
20178
|
var DEFAULT_POPPER_MODIFIERS = {
|
|
20179
20179
|
preventOverflow: {
|
|
20180
20180
|
enabled: true,
|
|
@@ -42673,6 +42673,162 @@ Toast.defaultProps = {
|
|
|
42673
42673
|
onHidden: function onHidden() {}
|
|
42674
42674
|
};
|
|
42675
42675
|
|
|
42676
|
+
var SummaryContext = /*#__PURE__*/createContext(undefined);
|
|
42677
|
+
function useSummaryContext() {
|
|
42678
|
+
var context = useContext(SummaryContext);
|
|
42679
|
+
|
|
42680
|
+
if (!context) {
|
|
42681
|
+
throw new Error("Summary compound components cannot be rendered outside the Summary component");
|
|
42682
|
+
}
|
|
42683
|
+
|
|
42684
|
+
return context;
|
|
42685
|
+
}
|
|
42686
|
+
var SummaryContextProvider = function SummaryContextProvider(_ref) {
|
|
42687
|
+
var breakpoint = _ref.breakpoint,
|
|
42688
|
+
children = _ref.children;
|
|
42689
|
+
return /*#__PURE__*/React__default.createElement(SummaryContext.Provider, {
|
|
42690
|
+
value: {
|
|
42691
|
+
breakpoint: breakpoint
|
|
42692
|
+
}
|
|
42693
|
+
}, children);
|
|
42694
|
+
};
|
|
42695
|
+
|
|
42696
|
+
var SummaryWrapper = styled(Box).withConfig({
|
|
42697
|
+
displayName: "Summary__SummaryWrapper",
|
|
42698
|
+
componentId: "sc-1hzufqo-0"
|
|
42699
|
+
})(function (_ref) {
|
|
42700
|
+
var _ref2;
|
|
42701
|
+
|
|
42702
|
+
var theme = _ref.theme,
|
|
42703
|
+
breakpoint = _ref.breakpoint;
|
|
42704
|
+
return _ref2 = {
|
|
42705
|
+
display: "flex",
|
|
42706
|
+
background: theme.colors.white,
|
|
42707
|
+
gap: theme.space.x2,
|
|
42708
|
+
paddingTop: theme.space.x1,
|
|
42709
|
+
paddingBottom: theme.space.x1,
|
|
42710
|
+
paddingLeft: theme.space.x2,
|
|
42711
|
+
paddingRight: theme.space.x2,
|
|
42712
|
+
borderRadius: theme.radii.medium,
|
|
42713
|
+
width: "fit-content"
|
|
42714
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42715
|
+
background: "none",
|
|
42716
|
+
flexFlow: "wrap",
|
|
42717
|
+
padding: 0,
|
|
42718
|
+
paddingTop: theme.space.x2,
|
|
42719
|
+
rowGap: 0
|
|
42720
|
+
}, _ref2;
|
|
42721
|
+
});
|
|
42722
|
+
var DEFAULT_BREAKPOINT = Theme.breakpoints.medium;
|
|
42723
|
+
|
|
42724
|
+
var Summary = function Summary(_a) {
|
|
42725
|
+
var _a$breakpoint = _a.breakpoint,
|
|
42726
|
+
breakpoint = _a$breakpoint === void 0 ? DEFAULT_BREAKPOINT : _a$breakpoint,
|
|
42727
|
+
children = _a.children,
|
|
42728
|
+
rest = __rest(_a, ["breakpoint", "children"]);
|
|
42729
|
+
|
|
42730
|
+
var breakpointPx = pixelDigitsFrom$1(breakpoint);
|
|
42731
|
+
return /*#__PURE__*/React__default.createElement(SummaryContextProvider, {
|
|
42732
|
+
breakpoint: breakpointPx
|
|
42733
|
+
}, /*#__PURE__*/React__default.createElement(SummaryWrapper, Object.assign({
|
|
42734
|
+
breakpoint: breakpointPx
|
|
42735
|
+
}, rest), children));
|
|
42736
|
+
};
|
|
42737
|
+
|
|
42738
|
+
function useMediaQuery(query) {
|
|
42739
|
+
var isUnsupported = typeof window === "undefined" || typeof window.matchMedia === "undefined";
|
|
42740
|
+
|
|
42741
|
+
var getMatches = function getMatches(query) {
|
|
42742
|
+
if (isUnsupported) {
|
|
42743
|
+
return false;
|
|
42744
|
+
}
|
|
42745
|
+
|
|
42746
|
+
return window.matchMedia(query).matches;
|
|
42747
|
+
};
|
|
42748
|
+
|
|
42749
|
+
var _useState = useState(getMatches(query)),
|
|
42750
|
+
matches = _useState[0],
|
|
42751
|
+
setMatches = _useState[1];
|
|
42752
|
+
|
|
42753
|
+
function handleChange() {
|
|
42754
|
+
setMatches(getMatches(query));
|
|
42755
|
+
}
|
|
42756
|
+
|
|
42757
|
+
useEffect(function () {
|
|
42758
|
+
if (isUnsupported) return;
|
|
42759
|
+
var matchMedia = window.matchMedia(query);
|
|
42760
|
+
handleChange();
|
|
42761
|
+
matchMedia.addEventListener("change", handleChange);
|
|
42762
|
+
return function () {
|
|
42763
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
42764
|
+
};
|
|
42765
|
+
}, [query]);
|
|
42766
|
+
return matches;
|
|
42767
|
+
}
|
|
42768
|
+
|
|
42769
|
+
var SummaryItemWrapper = styled(Flex).withConfig({
|
|
42770
|
+
displayName: "SummaryItem__SummaryItemWrapper",
|
|
42771
|
+
componentId: "kqzify-0"
|
|
42772
|
+
})(function (_ref) {
|
|
42773
|
+
var _ref2;
|
|
42774
|
+
|
|
42775
|
+
var theme = _ref.theme,
|
|
42776
|
+
breakpoint = _ref.breakpoint;
|
|
42777
|
+
return _ref2 = {
|
|
42778
|
+
gap: theme.space.half,
|
|
42779
|
+
flexDirection: "column"
|
|
42780
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42781
|
+
flexDirection: "row"
|
|
42782
|
+
}, _ref2;
|
|
42783
|
+
});
|
|
42784
|
+
|
|
42785
|
+
var SummaryItem = function SummaryItem(_a) {
|
|
42786
|
+
var value = _a.value,
|
|
42787
|
+
status = _a.status,
|
|
42788
|
+
rest = __rest(_a, ["value", "status"]);
|
|
42789
|
+
|
|
42790
|
+
var _useSummaryContext = useSummaryContext(),
|
|
42791
|
+
breakpoint = _useSummaryContext.breakpoint;
|
|
42792
|
+
|
|
42793
|
+
var matches = useMediaQuery("(max-width: " + breakpoint + "px)");
|
|
42794
|
+
delete rest["children"];
|
|
42795
|
+
return /*#__PURE__*/React__default.createElement(SummaryItemWrapper, Object.assign({
|
|
42796
|
+
breakpoint: breakpoint
|
|
42797
|
+
}, rest), /*#__PURE__*/React__default.createElement(Text, {
|
|
42798
|
+
fontWeight: "medium",
|
|
42799
|
+
fontSize: !matches ? "heading4" : undefined
|
|
42800
|
+
}, value), status);
|
|
42801
|
+
};
|
|
42802
|
+
|
|
42803
|
+
var Divider$1 = styled(Box).withConfig({
|
|
42804
|
+
displayName: "SummaryDivider__Divider",
|
|
42805
|
+
componentId: "sc-1amkaa8-0"
|
|
42806
|
+
})(function (_ref) {
|
|
42807
|
+
var _ref2;
|
|
42808
|
+
|
|
42809
|
+
var theme = _ref.theme,
|
|
42810
|
+
breakpoint = _ref.breakpoint;
|
|
42811
|
+
return _ref2 = {
|
|
42812
|
+
display: "block",
|
|
42813
|
+
alignSelf: "stretch",
|
|
42814
|
+
width: 1,
|
|
42815
|
+
marginRight: theme.space.x1,
|
|
42816
|
+
marginLeft: theme.space.x1,
|
|
42817
|
+
background: theme.colors.grey
|
|
42818
|
+
}, _ref2["@media (max-width: " + breakpoint + "px)"] = {
|
|
42819
|
+
display: "none"
|
|
42820
|
+
}, _ref2;
|
|
42821
|
+
});
|
|
42822
|
+
|
|
42823
|
+
var SummaryDivider = function SummaryDivider(props) {
|
|
42824
|
+
var _useSummaryContext = useSummaryContext(),
|
|
42825
|
+
breakpoint = _useSummaryContext.breakpoint;
|
|
42826
|
+
|
|
42827
|
+
return /*#__PURE__*/React__default.createElement(Divider$1, Object.assign({
|
|
42828
|
+
breakpoint: pixelDigitsFrom$1(breakpoint)
|
|
42829
|
+
}, props));
|
|
42830
|
+
};
|
|
42831
|
+
|
|
42676
42832
|
var StatelessNavBarDropdownMenuClass = /*#__PURE__*/function (_React$Component) {
|
|
42677
42833
|
_inheritsLoose$2(StatelessNavBarDropdownMenuClass, _React$Component);
|
|
42678
42834
|
|
|
@@ -50723,24 +50879,6 @@ var ApplicationFrame = function ApplicationFrame(_a) {
|
|
|
50723
50879
|
}, children));
|
|
50724
50880
|
};
|
|
50725
50881
|
|
|
50726
|
-
var useMediaQuery = function useMediaQuery(query) {
|
|
50727
|
-
var _useState = useState(window.matchMedia(query).matches),
|
|
50728
|
-
matches = _useState[0],
|
|
50729
|
-
setMatches = _useState[1];
|
|
50730
|
-
|
|
50731
|
-
useEffect(function () {
|
|
50732
|
-
var handler = function handler(e) {
|
|
50733
|
-
setMatches(e.matches);
|
|
50734
|
-
};
|
|
50735
|
-
|
|
50736
|
-
window.matchMedia(query).addEventListener("change", handler);
|
|
50737
|
-
return function () {
|
|
50738
|
-
window.removeEventListener("change", handler);
|
|
50739
|
-
};
|
|
50740
|
-
}, []);
|
|
50741
|
-
return matches;
|
|
50742
|
-
};
|
|
50743
|
-
|
|
50744
50882
|
var Header = function Header(_a) {
|
|
50745
50883
|
var _b, _c;
|
|
50746
50884
|
|
|
@@ -51146,4 +51284,4 @@ var SortingTable = function SortingTable(_a) {
|
|
|
51146
51284
|
}, props));
|
|
51147
51285
|
};
|
|
51148
51286
|
|
|
51149
|
-
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBar$1 as NavBar, NavBarBackground, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|
|
51287
|
+
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBar$1 as NavBar, NavBarBackground, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, Summary, SummaryDivider, SummaryItem, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { StyledProps } from "../StyledProps";
|
|
2
3
|
declare type DropdownMenuProps = {
|
|
3
4
|
className?: string;
|
|
4
5
|
id?: string;
|
|
@@ -13,6 +14,6 @@ declare type DropdownMenuProps = {
|
|
|
13
14
|
boundariesElement?: string;
|
|
14
15
|
openAriaLabel?: string;
|
|
15
16
|
closeAriaLabel?: string;
|
|
16
|
-
};
|
|
17
|
+
} & StyledProps;
|
|
17
18
|
declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
18
19
|
export default DropdownMenu;
|
|
@@ -3,14 +3,5 @@ export declare function Default(): JSX.Element;
|
|
|
3
3
|
export declare function WithMainInfoOnly(): JSX.Element;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
parameters: {
|
|
7
|
-
backgrounds: {
|
|
8
|
-
default: string;
|
|
9
|
-
values: {
|
|
10
|
-
name: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
6
|
};
|
|
16
7
|
export default _default;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { Breadcrumbs } from "./Breadcrumbs";
|
|
|
43
43
|
export { ALL_NDS_LOCALES } from "./locales.const";
|
|
44
44
|
export { TruncatedText } from "./TruncatedText";
|
|
45
45
|
export { Toast } from "./Toast";
|
|
46
|
+
export { Summary, SummaryItem, SummaryDivider } from "./Summary/index";
|
|
46
47
|
export { BrandedNavBar, MenuTrigger, EnvironmentBanner, NavBarBackground, BrandLogoContainer, DesktopMenu, SmallNavBar, } from "./BrandedNavBar";
|
|
47
48
|
export type { MenuTriggerProps, EnvironmentBannerProps, NavBarBackgroundProps, BrandLogoContainerProps, DesktopMenuProps, SmallNavBarProps, RenderMenuButtonProps, } from "./BrandedNavBar";
|
|
48
49
|
export { AsyncSelect } from "./AsyncSelect";
|
package/package.json
CHANGED