@nulogy/components 8.1.7 → 8.1.9
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 +42 -18
- package/dist/main.module.js +42 -18
- package/dist/src/Checkbox/Checkbox.story.d.ts +4 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -22316,7 +22316,6 @@
|
|
|
22316
22316
|
borderRadius: theme.radii.small,
|
|
22317
22317
|
border: "solid 1px",
|
|
22318
22318
|
position: "relative",
|
|
22319
|
-
alignSelf: "center",
|
|
22320
22319
|
// checkmark
|
|
22321
22320
|
"&:before": Object.assign({
|
|
22322
22321
|
content: "''",
|
|
@@ -22328,7 +22327,7 @@
|
|
|
22328
22327
|
border: "solid " + theme.colors.white
|
|
22329
22328
|
}, indeterminate ? indeterminateStyles : checkedStyles)
|
|
22330
22329
|
};
|
|
22331
|
-
});
|
|
22330
|
+
}, addStyledProps);
|
|
22332
22331
|
var CheckboxInput = styled__default['default'].input.withConfig({
|
|
22333
22332
|
displayName: "Checkbox__CheckboxInput",
|
|
22334
22333
|
componentId: "sc-14jj5ns-1"
|
|
@@ -22375,7 +22374,8 @@
|
|
|
22375
22374
|
disabled: disabled,
|
|
22376
22375
|
checked: checked,
|
|
22377
22376
|
indeterminate: indeterminate,
|
|
22378
|
-
"data-testid": "visual-checkbox"
|
|
22377
|
+
"data-testid": "visual-checkbox",
|
|
22378
|
+
marginTop: labelText ? "half" : "0px"
|
|
22379
22379
|
}), labelText && /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
22380
22380
|
disabled: disabled,
|
|
22381
22381
|
ml: "x1"
|
|
@@ -23679,8 +23679,17 @@
|
|
|
23679
23679
|
* http://api.jqueryui.com/category/ui-core/
|
|
23680
23680
|
*/
|
|
23681
23681
|
|
|
23682
|
+
var DISPLAY_NONE = "none";
|
|
23683
|
+
var DISPLAY_CONTENTS = "contents";
|
|
23684
|
+
|
|
23682
23685
|
var tabbableNode = /input|select|textarea|button|object|iframe/;
|
|
23683
23686
|
|
|
23687
|
+
function isNotOverflowing(element, style) {
|
|
23688
|
+
return style.getPropertyValue("overflow") !== "visible" ||
|
|
23689
|
+
// if 'overflow: visible' set, check if there is actually any overflow
|
|
23690
|
+
element.scrollWidth <= 0 && element.scrollHeight <= 0;
|
|
23691
|
+
}
|
|
23692
|
+
|
|
23684
23693
|
function hidesContents(element) {
|
|
23685
23694
|
var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
|
|
23686
23695
|
|
|
@@ -23690,9 +23699,8 @@
|
|
|
23690
23699
|
try {
|
|
23691
23700
|
// Otherwise we need to check some styles
|
|
23692
23701
|
var style = window.getComputedStyle(element);
|
|
23693
|
-
|
|
23694
|
-
|
|
23695
|
-
element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue("display") == "none";
|
|
23702
|
+
var displayValue = style.getPropertyValue("display");
|
|
23703
|
+
return zeroSize ? displayValue !== DISPLAY_CONTENTS && isNotOverflowing(element, style) : displayValue === DISPLAY_NONE;
|
|
23696
23704
|
} catch (exception) {
|
|
23697
23705
|
// eslint-disable-next-line no-console
|
|
23698
23706
|
console.warn("Failed to inspect element style");
|
|
@@ -24532,8 +24540,17 @@
|
|
|
24532
24540
|
content: "ReactModal__Content"
|
|
24533
24541
|
};
|
|
24534
24542
|
|
|
24535
|
-
|
|
24536
|
-
|
|
24543
|
+
/**
|
|
24544
|
+
* We need to support the deprecated `KeyboardEvent.keyCode` in addition to
|
|
24545
|
+
* `KeyboardEvent.code` for apps that still support IE11. Can be removed when
|
|
24546
|
+
* `react-modal` only supports React >18 (which dropped IE support).
|
|
24547
|
+
*/
|
|
24548
|
+
var isTabKey = function isTabKey(event) {
|
|
24549
|
+
return event.code === "Tab" || event.keyCode === 9;
|
|
24550
|
+
};
|
|
24551
|
+
var isEscKey = function isEscKey(event) {
|
|
24552
|
+
return event.code === "Escape" || event.keyCode === 27;
|
|
24553
|
+
};
|
|
24537
24554
|
|
|
24538
24555
|
var ariaHiddenInstances = 0;
|
|
24539
24556
|
|
|
@@ -24560,13 +24577,16 @@
|
|
|
24560
24577
|
appElement = _this$props.appElement,
|
|
24561
24578
|
ariaHideApp = _this$props.ariaHideApp,
|
|
24562
24579
|
htmlOpenClassName = _this$props.htmlOpenClassName,
|
|
24563
|
-
bodyOpenClassName = _this$props.bodyOpenClassName
|
|
24580
|
+
bodyOpenClassName = _this$props.bodyOpenClassName,
|
|
24581
|
+
parentSelector = _this$props.parentSelector;
|
|
24564
24582
|
|
|
24565
|
-
// Remove classes.
|
|
24566
24583
|
|
|
24567
|
-
|
|
24584
|
+
var parentDocument = parentSelector && parentSelector().ownerDocument || document;
|
|
24585
|
+
|
|
24586
|
+
// Remove classes.
|
|
24587
|
+
bodyOpenClassName && classList$1.remove(parentDocument.body, bodyOpenClassName);
|
|
24568
24588
|
|
|
24569
|
-
htmlOpenClassName && classList$1.remove(
|
|
24589
|
+
htmlOpenClassName && classList$1.remove(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
|
|
24570
24590
|
|
|
24571
24591
|
// Reset aria-hidden attribute if all modals have been removed
|
|
24572
24592
|
if (ariaHideApp && ariaHiddenInstances > 0) {
|
|
@@ -24648,11 +24668,11 @@
|
|
|
24648
24668
|
};
|
|
24649
24669
|
|
|
24650
24670
|
_this.handleKeyDown = function (event) {
|
|
24651
|
-
if (event
|
|
24671
|
+
if (isTabKey(event)) {
|
|
24652
24672
|
(0, _scopeTab2.default)(_this.content, event);
|
|
24653
24673
|
}
|
|
24654
24674
|
|
|
24655
|
-
if (_this.props.shouldCloseOnEsc && event
|
|
24675
|
+
if (_this.props.shouldCloseOnEsc && isEscKey(event)) {
|
|
24656
24676
|
event.stopPropagation();
|
|
24657
24677
|
_this.requestClose(event);
|
|
24658
24678
|
}
|
|
@@ -24788,13 +24808,16 @@
|
|
|
24788
24808
|
appElement = _props.appElement,
|
|
24789
24809
|
ariaHideApp = _props.ariaHideApp,
|
|
24790
24810
|
htmlOpenClassName = _props.htmlOpenClassName,
|
|
24791
|
-
bodyOpenClassName = _props.bodyOpenClassName
|
|
24811
|
+
bodyOpenClassName = _props.bodyOpenClassName,
|
|
24812
|
+
parentSelector = _props.parentSelector;
|
|
24792
24813
|
|
|
24793
|
-
// Add classes.
|
|
24794
24814
|
|
|
24795
|
-
|
|
24815
|
+
var parentDocument = parentSelector && parentSelector().ownerDocument || document;
|
|
24816
|
+
|
|
24817
|
+
// Add classes.
|
|
24818
|
+
bodyOpenClassName && classList$1.add(parentDocument.body, bodyOpenClassName);
|
|
24796
24819
|
|
|
24797
|
-
htmlOpenClassName && classList$1.add(
|
|
24820
|
+
htmlOpenClassName && classList$1.add(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
|
|
24798
24821
|
|
|
24799
24822
|
if (ariaHideApp) {
|
|
24800
24823
|
ariaHiddenInstances += 1;
|
|
@@ -24874,6 +24897,7 @@
|
|
|
24874
24897
|
}),
|
|
24875
24898
|
className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
|
|
24876
24899
|
overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
|
|
24900
|
+
parentSelector: _propTypes2.default.func,
|
|
24877
24901
|
bodyOpenClassName: _propTypes2.default.string,
|
|
24878
24902
|
htmlOpenClassName: _propTypes2.default.string,
|
|
24879
24903
|
ariaHideApp: _propTypes2.default.bool,
|
package/dist/main.module.js
CHANGED
|
@@ -22290,7 +22290,6 @@ var VisualCheckbox = styled.div.withConfig({
|
|
|
22290
22290
|
borderRadius: theme.radii.small,
|
|
22291
22291
|
border: "solid 1px",
|
|
22292
22292
|
position: "relative",
|
|
22293
|
-
alignSelf: "center",
|
|
22294
22293
|
// checkmark
|
|
22295
22294
|
"&:before": Object.assign({
|
|
22296
22295
|
content: "''",
|
|
@@ -22302,7 +22301,7 @@ var VisualCheckbox = styled.div.withConfig({
|
|
|
22302
22301
|
border: "solid " + theme.colors.white
|
|
22303
22302
|
}, indeterminate ? indeterminateStyles : checkedStyles)
|
|
22304
22303
|
};
|
|
22305
|
-
});
|
|
22304
|
+
}, addStyledProps);
|
|
22306
22305
|
var CheckboxInput = styled.input.withConfig({
|
|
22307
22306
|
displayName: "Checkbox__CheckboxInput",
|
|
22308
22307
|
componentId: "sc-14jj5ns-1"
|
|
@@ -22349,7 +22348,8 @@ var Checkbox = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
22349
22348
|
disabled: disabled,
|
|
22350
22349
|
checked: checked,
|
|
22351
22350
|
indeterminate: indeterminate,
|
|
22352
|
-
"data-testid": "visual-checkbox"
|
|
22351
|
+
"data-testid": "visual-checkbox",
|
|
22352
|
+
marginTop: labelText ? "half" : "0px"
|
|
22353
22353
|
}), labelText && /*#__PURE__*/React__default.createElement(Text, {
|
|
22354
22354
|
disabled: disabled,
|
|
22355
22355
|
ml: "x1"
|
|
@@ -23653,8 +23653,17 @@ exports.default = findTabbableDescendants;
|
|
|
23653
23653
|
* http://api.jqueryui.com/category/ui-core/
|
|
23654
23654
|
*/
|
|
23655
23655
|
|
|
23656
|
+
var DISPLAY_NONE = "none";
|
|
23657
|
+
var DISPLAY_CONTENTS = "contents";
|
|
23658
|
+
|
|
23656
23659
|
var tabbableNode = /input|select|textarea|button|object|iframe/;
|
|
23657
23660
|
|
|
23661
|
+
function isNotOverflowing(element, style) {
|
|
23662
|
+
return style.getPropertyValue("overflow") !== "visible" ||
|
|
23663
|
+
// if 'overflow: visible' set, check if there is actually any overflow
|
|
23664
|
+
element.scrollWidth <= 0 && element.scrollHeight <= 0;
|
|
23665
|
+
}
|
|
23666
|
+
|
|
23658
23667
|
function hidesContents(element) {
|
|
23659
23668
|
var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
|
|
23660
23669
|
|
|
@@ -23664,9 +23673,8 @@ function hidesContents(element) {
|
|
|
23664
23673
|
try {
|
|
23665
23674
|
// Otherwise we need to check some styles
|
|
23666
23675
|
var style = window.getComputedStyle(element);
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue("display") == "none";
|
|
23676
|
+
var displayValue = style.getPropertyValue("display");
|
|
23677
|
+
return zeroSize ? displayValue !== DISPLAY_CONTENTS && isNotOverflowing(element, style) : displayValue === DISPLAY_NONE;
|
|
23670
23678
|
} catch (exception) {
|
|
23671
23679
|
// eslint-disable-next-line no-console
|
|
23672
23680
|
console.warn("Failed to inspect element style");
|
|
@@ -24506,8 +24514,17 @@ var CLASS_NAMES = {
|
|
|
24506
24514
|
content: "ReactModal__Content"
|
|
24507
24515
|
};
|
|
24508
24516
|
|
|
24509
|
-
|
|
24510
|
-
|
|
24517
|
+
/**
|
|
24518
|
+
* We need to support the deprecated `KeyboardEvent.keyCode` in addition to
|
|
24519
|
+
* `KeyboardEvent.code` for apps that still support IE11. Can be removed when
|
|
24520
|
+
* `react-modal` only supports React >18 (which dropped IE support).
|
|
24521
|
+
*/
|
|
24522
|
+
var isTabKey = function isTabKey(event) {
|
|
24523
|
+
return event.code === "Tab" || event.keyCode === 9;
|
|
24524
|
+
};
|
|
24525
|
+
var isEscKey = function isEscKey(event) {
|
|
24526
|
+
return event.code === "Escape" || event.keyCode === 27;
|
|
24527
|
+
};
|
|
24511
24528
|
|
|
24512
24529
|
var ariaHiddenInstances = 0;
|
|
24513
24530
|
|
|
@@ -24534,13 +24551,16 @@ var ModalPortal = function (_Component) {
|
|
|
24534
24551
|
appElement = _this$props.appElement,
|
|
24535
24552
|
ariaHideApp = _this$props.ariaHideApp,
|
|
24536
24553
|
htmlOpenClassName = _this$props.htmlOpenClassName,
|
|
24537
|
-
bodyOpenClassName = _this$props.bodyOpenClassName
|
|
24554
|
+
bodyOpenClassName = _this$props.bodyOpenClassName,
|
|
24555
|
+
parentSelector = _this$props.parentSelector;
|
|
24538
24556
|
|
|
24539
|
-
// Remove classes.
|
|
24540
24557
|
|
|
24541
|
-
|
|
24558
|
+
var parentDocument = parentSelector && parentSelector().ownerDocument || document;
|
|
24559
|
+
|
|
24560
|
+
// Remove classes.
|
|
24561
|
+
bodyOpenClassName && classList$1.remove(parentDocument.body, bodyOpenClassName);
|
|
24542
24562
|
|
|
24543
|
-
htmlOpenClassName && classList$1.remove(
|
|
24563
|
+
htmlOpenClassName && classList$1.remove(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
|
|
24544
24564
|
|
|
24545
24565
|
// Reset aria-hidden attribute if all modals have been removed
|
|
24546
24566
|
if (ariaHideApp && ariaHiddenInstances > 0) {
|
|
@@ -24622,11 +24642,11 @@ var ModalPortal = function (_Component) {
|
|
|
24622
24642
|
};
|
|
24623
24643
|
|
|
24624
24644
|
_this.handleKeyDown = function (event) {
|
|
24625
|
-
if (event
|
|
24645
|
+
if (isTabKey(event)) {
|
|
24626
24646
|
(0, _scopeTab2.default)(_this.content, event);
|
|
24627
24647
|
}
|
|
24628
24648
|
|
|
24629
|
-
if (_this.props.shouldCloseOnEsc && event
|
|
24649
|
+
if (_this.props.shouldCloseOnEsc && isEscKey(event)) {
|
|
24630
24650
|
event.stopPropagation();
|
|
24631
24651
|
_this.requestClose(event);
|
|
24632
24652
|
}
|
|
@@ -24762,13 +24782,16 @@ var ModalPortal = function (_Component) {
|
|
|
24762
24782
|
appElement = _props.appElement,
|
|
24763
24783
|
ariaHideApp = _props.ariaHideApp,
|
|
24764
24784
|
htmlOpenClassName = _props.htmlOpenClassName,
|
|
24765
|
-
bodyOpenClassName = _props.bodyOpenClassName
|
|
24785
|
+
bodyOpenClassName = _props.bodyOpenClassName,
|
|
24786
|
+
parentSelector = _props.parentSelector;
|
|
24766
24787
|
|
|
24767
|
-
// Add classes.
|
|
24768
24788
|
|
|
24769
|
-
|
|
24789
|
+
var parentDocument = parentSelector && parentSelector().ownerDocument || document;
|
|
24790
|
+
|
|
24791
|
+
// Add classes.
|
|
24792
|
+
bodyOpenClassName && classList$1.add(parentDocument.body, bodyOpenClassName);
|
|
24770
24793
|
|
|
24771
|
-
htmlOpenClassName && classList$1.add(
|
|
24794
|
+
htmlOpenClassName && classList$1.add(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
|
|
24772
24795
|
|
|
24773
24796
|
if (ariaHideApp) {
|
|
24774
24797
|
ariaHiddenInstances += 1;
|
|
@@ -24848,6 +24871,7 @@ ModalPortal.propTypes = {
|
|
|
24848
24871
|
}),
|
|
24849
24872
|
className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
|
|
24850
24873
|
overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
|
|
24874
|
+
parentSelector: _propTypes2.default.func,
|
|
24851
24875
|
bodyOpenClassName: _propTypes2.default.string,
|
|
24852
24876
|
htmlOpenClassName: _propTypes2.default.string,
|
|
24853
24877
|
ariaHideApp: _propTypes2.default.bool,
|
|
@@ -4,6 +4,10 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const _Checkbox: () => JSX.Element;
|
|
7
|
+
export declare const Multiline: {
|
|
8
|
+
(): JSX.Element;
|
|
9
|
+
decorators: ((story: any) => JSX.Element)[];
|
|
10
|
+
};
|
|
7
11
|
export declare const SetToDefaultChecked: {
|
|
8
12
|
(): JSX.Element;
|
|
9
13
|
story: {
|