@oliasoft-open-source/react-ui-library 4.20.9-beta-1 → 4.20.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/global.css +97 -96
- package/dist/index.d.ts +3 -2
- package/dist/index.js +137 -313
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -3994,30 +3994,30 @@ const AccordionWithDefaultToggle = ({
|
|
|
3994
3994
|
/* @__PURE__ */ jsx("div", { className: cx$2(styles$P.bordered, padding2 ? styles$P.padding : ""), children: content2 })
|
|
3995
3995
|
] });
|
|
3996
3996
|
};
|
|
3997
|
-
const inputInTable$b = "
|
|
3998
|
-
const inputHover$b = "
|
|
3999
|
-
const inputFocus$b = "
|
|
4000
|
-
const inputError$b = "
|
|
4001
|
-
const inputWarning$b = "
|
|
4002
|
-
const inputDisabled$b = "
|
|
4003
|
-
const hideScrollbars$b = "
|
|
4004
|
-
const button$3 = "
|
|
4005
|
-
const active$8 = "
|
|
4006
|
-
const green$1 = "
|
|
4007
|
-
const red$1 = "
|
|
4008
|
-
const orange$1 = "
|
|
4009
|
-
const icon$5 = "
|
|
4010
|
-
const iconOnly = "
|
|
4011
|
-
const basic = "
|
|
4012
|
-
const muted$2 = "
|
|
4013
|
-
const disabled$9 = "
|
|
4014
|
-
const small$c = "
|
|
4015
|
-
const pill = "
|
|
4016
|
-
const round = "
|
|
4017
|
-
const inverted$1 = "
|
|
4018
|
-
const groupOrderFirst$4 = "
|
|
4019
|
-
const groupOrderMiddle$4 = "
|
|
4020
|
-
const groupOrderLast$4 = "
|
|
3997
|
+
const inputInTable$b = "_inputInTable_1m45a_1";
|
|
3998
|
+
const inputHover$b = "_inputHover_1m45a_13";
|
|
3999
|
+
const inputFocus$b = "_inputFocus_1m45a_18";
|
|
4000
|
+
const inputError$b = "_inputError_1m45a_25";
|
|
4001
|
+
const inputWarning$b = "_inputWarning_1m45a_26";
|
|
4002
|
+
const inputDisabled$b = "_inputDisabled_1m45a_61";
|
|
4003
|
+
const hideScrollbars$b = "_hideScrollbars_1m45a_67";
|
|
4004
|
+
const button$3 = "_button_1m45a_100";
|
|
4005
|
+
const active$8 = "_active_1m45a_135";
|
|
4006
|
+
const green$1 = "_green_1m45a_135";
|
|
4007
|
+
const red$1 = "_red_1m45a_135";
|
|
4008
|
+
const orange$1 = "_orange_1m45a_135";
|
|
4009
|
+
const icon$5 = "_icon_1m45a_147";
|
|
4010
|
+
const iconOnly = "_iconOnly_1m45a_153";
|
|
4011
|
+
const basic = "_basic_1m45a_163";
|
|
4012
|
+
const muted$2 = "_muted_1m45a_169";
|
|
4013
|
+
const disabled$9 = "_disabled_1m45a_188";
|
|
4014
|
+
const small$c = "_small_1m45a_198";
|
|
4015
|
+
const pill = "_pill_1m45a_203";
|
|
4016
|
+
const round = "_round_1m45a_204";
|
|
4017
|
+
const inverted$1 = "_inverted_1m45a_310";
|
|
4018
|
+
const groupOrderFirst$4 = "_groupOrderFirst_1m45a_340";
|
|
4019
|
+
const groupOrderMiddle$4 = "_groupOrderMiddle_1m45a_341";
|
|
4020
|
+
const groupOrderLast$4 = "_groupOrderLast_1m45a_342";
|
|
4021
4021
|
const buttonStyles = {
|
|
4022
4022
|
inputInTable: inputInTable$b,
|
|
4023
4023
|
inputHover: inputHover$b,
|
|
@@ -4674,7 +4674,6 @@ const TriggerTooltip = ({
|
|
|
4674
4674
|
};
|
|
4675
4675
|
const Trigger$1 = React__default.forwardRef(
|
|
4676
4676
|
({
|
|
4677
|
-
active: active2,
|
|
4678
4677
|
isDisabled,
|
|
4679
4678
|
badgeTitle,
|
|
4680
4679
|
badgeDot,
|
|
@@ -4713,7 +4712,7 @@ const Trigger$1 = React__default.forwardRef(
|
|
|
4713
4712
|
loading,
|
|
4714
4713
|
error: error2,
|
|
4715
4714
|
warning: warning2,
|
|
4716
|
-
active: isOpen2
|
|
4715
|
+
active: isOpen2,
|
|
4717
4716
|
tabIndex
|
|
4718
4717
|
}
|
|
4719
4718
|
) : trigger2 === TriggerType.TEXT ? /* @__PURE__ */ jsx(
|
|
@@ -4881,8 +4880,7 @@ const DropDownMenu = ({
|
|
|
4881
4880
|
error: error2,
|
|
4882
4881
|
warning: warning2,
|
|
4883
4882
|
selected: selected2,
|
|
4884
|
-
tabIndex
|
|
4885
|
-
active: active2
|
|
4883
|
+
tabIndex
|
|
4886
4884
|
}) => {
|
|
4887
4885
|
const disabledContext = useContext(DisabledContext);
|
|
4888
4886
|
const {
|
|
@@ -4948,7 +4946,6 @@ const DropDownMenu = ({
|
|
|
4948
4946
|
component: component2,
|
|
4949
4947
|
groupOrder,
|
|
4950
4948
|
isOpen: isOpen2,
|
|
4951
|
-
active: active2,
|
|
4952
4949
|
tooltip: tooltip2,
|
|
4953
4950
|
error: error2,
|
|
4954
4951
|
warning: warning2,
|
|
@@ -9095,6 +9092,8 @@ const Input$1 = forwardRef(
|
|
|
9095
9092
|
},
|
|
9096
9093
|
onPaste = () => {
|
|
9097
9094
|
},
|
|
9095
|
+
onKeyDown = () => {
|
|
9096
|
+
},
|
|
9098
9097
|
selectOnFocus = true,
|
|
9099
9098
|
name: name2 = void 0,
|
|
9100
9099
|
type = "text",
|
|
@@ -9149,6 +9148,7 @@ const Input$1 = forwardRef(
|
|
|
9149
9148
|
value: value ?? "",
|
|
9150
9149
|
onChange,
|
|
9151
9150
|
onKeyPress,
|
|
9151
|
+
onKeyDown,
|
|
9152
9152
|
onFocus: handleFocus,
|
|
9153
9153
|
onBlur,
|
|
9154
9154
|
onPaste,
|
|
@@ -9810,9 +9810,9 @@ function isKeyboardEvent(event) {
|
|
|
9810
9810
|
return false;
|
|
9811
9811
|
}
|
|
9812
9812
|
const {
|
|
9813
|
-
KeyboardEvent
|
|
9813
|
+
KeyboardEvent
|
|
9814
9814
|
} = getWindow(event.target);
|
|
9815
|
-
return
|
|
9815
|
+
return KeyboardEvent && event instanceof KeyboardEvent;
|
|
9816
9816
|
}
|
|
9817
9817
|
function isTouchEvent$2(event) {
|
|
9818
9818
|
if (!event) {
|
|
@@ -15498,182 +15498,6 @@ const NativeSelect = ({
|
|
|
15498
15498
|
}
|
|
15499
15499
|
);
|
|
15500
15500
|
};
|
|
15501
|
-
var reactKeyboardEventHandler = { exports: {} };
|
|
15502
|
-
(function(module, exports) {
|
|
15503
|
-
!function(e2, t) {
|
|
15504
|
-
module.exports = t(React__default, PropTypes__default);
|
|
15505
|
-
}(window, function(e2, t) {
|
|
15506
|
-
return function(e3) {
|
|
15507
|
-
var t2 = {};
|
|
15508
|
-
function n2(r2) {
|
|
15509
|
-
if (t2[r2]) return t2[r2].exports;
|
|
15510
|
-
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
15511
|
-
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
15512
|
-
}
|
|
15513
|
-
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
15514
|
-
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
15515
|
-
}, n2.r = function(e4) {
|
|
15516
|
-
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
15517
|
-
}, n2.t = function(e4, t3) {
|
|
15518
|
-
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
15519
|
-
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
15520
|
-
var r2 = /* @__PURE__ */ Object.create(null);
|
|
15521
|
-
if (n2.r(r2), Object.defineProperty(r2, "default", { enumerable: true, value: e4 }), 2 & t3 && "string" != typeof e4) for (var o in e4) n2.d(r2, o, (function(t4) {
|
|
15522
|
-
return e4[t4];
|
|
15523
|
-
}).bind(null, o));
|
|
15524
|
-
return r2;
|
|
15525
|
-
}, n2.n = function(e4) {
|
|
15526
|
-
var t3 = e4 && e4.__esModule ? function() {
|
|
15527
|
-
return e4.default;
|
|
15528
|
-
} : function() {
|
|
15529
|
-
return e4;
|
|
15530
|
-
};
|
|
15531
|
-
return n2.d(t3, "a", t3), t3;
|
|
15532
|
-
}, n2.o = function(e4, t3) {
|
|
15533
|
-
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
15534
|
-
}, n2.p = "", n2(n2.s = 0);
|
|
15535
|
-
}([function(e3, t2, n2) {
|
|
15536
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
15537
|
-
var r2 = n2(1);
|
|
15538
|
-
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
15539
|
-
return function(e4) {
|
|
15540
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
15541
|
-
}(r2).default;
|
|
15542
|
-
} }), e3.exports = t2.default;
|
|
15543
|
-
}, function(e3, t2, n2) {
|
|
15544
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
15545
|
-
var r2 = Object.assign || function(e4) {
|
|
15546
|
-
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
15547
|
-
var n3 = arguments[t3];
|
|
15548
|
-
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
15549
|
-
}
|
|
15550
|
-
return e4;
|
|
15551
|
-
}, o = /* @__PURE__ */ function() {
|
|
15552
|
-
function e4(e5, t3) {
|
|
15553
|
-
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
15554
|
-
var r3 = t3[n3];
|
|
15555
|
-
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
15556
|
-
}
|
|
15557
|
-
}
|
|
15558
|
-
return function(t3, n3, r3) {
|
|
15559
|
-
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
15560
|
-
};
|
|
15561
|
-
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
15562
|
-
function l(e4) {
|
|
15563
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
15564
|
-
}
|
|
15565
|
-
var s = [], c2 = function(e4) {
|
|
15566
|
-
function t3(e5) {
|
|
15567
|
-
!function(e6, t4) {
|
|
15568
|
-
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
15569
|
-
}(this, t3);
|
|
15570
|
-
var n3 = function(e6, t4) {
|
|
15571
|
-
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15572
|
-
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
15573
|
-
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
15574
|
-
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
15575
|
-
}
|
|
15576
|
-
return function(e5, t4) {
|
|
15577
|
-
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
15578
|
-
e5.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e5, enumerable: false, writable: true, configurable: true } }), t4 && (Object.setPrototypeOf ? Object.setPrototypeOf(e5, t4) : e5.__proto__ = t4);
|
|
15579
|
-
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
15580
|
-
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
15581
|
-
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
15582
|
-
t4 && !n3 && this.registerExclusiveHandler();
|
|
15583
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
15584
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
15585
|
-
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
15586
|
-
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
15587
|
-
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
15588
|
-
} }, { key: "registerExclusiveHandler", value: function() {
|
|
15589
|
-
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
15590
|
-
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
15591
|
-
var e5 = this;
|
|
15592
|
-
s.includes(this) && (s = s.filter(function(t4) {
|
|
15593
|
-
return t4 !== e5;
|
|
15594
|
-
}));
|
|
15595
|
-
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
15596
|
-
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
15597
|
-
if (n3) return false;
|
|
15598
|
-
if (!(i2 === e5.type)) return false;
|
|
15599
|
-
if (s.length > 0 && s[0] !== this) return false;
|
|
15600
|
-
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
15601
|
-
if (!(u2 ? d2 : c3)) return false;
|
|
15602
|
-
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
15603
|
-
return !!f2 && (o2(f2, e5), true);
|
|
15604
|
-
} }, { key: "render", value: function() {
|
|
15605
|
-
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
15606
|
-
try {
|
|
15607
|
-
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
15608
|
-
delete o2[s2.value];
|
|
15609
|
-
}
|
|
15610
|
-
} catch (e6) {
|
|
15611
|
-
a3 = true, l2 = e6;
|
|
15612
|
-
} finally {
|
|
15613
|
-
try {
|
|
15614
|
-
!u2 && c3.return && c3.return();
|
|
15615
|
-
} finally {
|
|
15616
|
-
if (a3) throw l2;
|
|
15617
|
-
}
|
|
15618
|
-
}
|
|
15619
|
-
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
15620
|
-
e5.childrenContainer = t4;
|
|
15621
|
-
} }, o2), n3) : null;
|
|
15622
|
-
} }]), t3;
|
|
15623
|
-
}();
|
|
15624
|
-
t2.default = c2, c2.propTypes = { handleKeys: u.default.array, handleEventType: u.default.oneOf(["keydown", "keyup", "keypress"]), handleFocusableElements: u.default.bool, onKeyEvent: u.default.func, isDisabled: u.default.bool, isExclusive: u.default.bool, children: u.default.any }, c2.defaultProps = { handleKeys: [], handleFocusableElements: false, handleEventType: "keydown", onKeyEvent: function() {
|
|
15625
|
-
return null;
|
|
15626
|
-
} }, e3.exports = t2.default;
|
|
15627
|
-
}, function(t2, n2) {
|
|
15628
|
-
t2.exports = e2;
|
|
15629
|
-
}, function(e3, n2) {
|
|
15630
|
-
e3.exports = t;
|
|
15631
|
-
}, function(e3, t2, n2) {
|
|
15632
|
-
function r2(e4, t3, n3) {
|
|
15633
|
-
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
15634
|
-
}
|
|
15635
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
15636
|
-
var n3 = t3.map(function(e5) {
|
|
15637
|
-
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
15638
|
-
return n4 || [e5];
|
|
15639
|
-
}).reduce(function(e5, t4) {
|
|
15640
|
-
return e5.concat(t4);
|
|
15641
|
-
}, []).find(function(t4) {
|
|
15642
|
-
return p(e4, t4);
|
|
15643
|
-
});
|
|
15644
|
-
!n3 && t3.includes("all") && (n3 = "other");
|
|
15645
|
-
return n3;
|
|
15646
|
-
};
|
|
15647
|
-
var o = { backspace: [8], del: [46], delete: [46], ins: [45], insert: [45], tab: [9], enter: [13], return: [13], esc: [27], space: [32], pageup: [33], pagedown: [34], end: [35], home: [36], left: [37], up: [38], right: [39], down: [40], shift: [16], ctrl: [17], alt: [18], cap: [20], num: [144], clear: [12], meta: [91], ";": [186, 59], "=": [187, 61], ",": [188, 44], "-": [189, 45, 173, 109], minus: [189, 45, 173, 109], ".": [190, 110], "/": [191, 111], "`": [192], "[": [219], "\\": [220], "]": [221], "*": [106], "+": [107], plus: [107], "'": [222], quote: [222] }, i = Object.keys(o).reduce(function(e4, t3) {
|
|
15648
|
-
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
15649
|
-
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
15650
|
-
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
15651
|
-
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
15652
|
-
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
15653
|
-
}, {}), l = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(e4, t3, n3) {
|
|
15654
|
-
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
15655
|
-
}, {}), s = { control: "ctrl", ctrl: "ctrl", shift: "shift", meta: "meta", cmd: "meta", command: "meta", option: "alt", alt: "alt" }, c2 = t2.AllKeys = Object.assign({}, o, i, u, a2, l), d2 = Object.assign({}, u, a2), f2 = { all: Object.keys(c2), alphanumeric: Object.keys(d2), numeric: Object.keys(u), alphabetic: Object.keys(a2), function: Object.keys(l) };
|
|
15656
|
-
function p(e4, t3) {
|
|
15657
|
-
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
15658
|
-
return e4[t4 + "Key"];
|
|
15659
|
-
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
15660
|
-
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
15661
|
-
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
15662
|
-
if (d3.length > 0 && o2.length > 0) {
|
|
15663
|
-
var f3 = d3.map(function(e5) {
|
|
15664
|
-
return s[e5];
|
|
15665
|
-
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
15666
|
-
return o2[t4] === e5;
|
|
15667
|
-
});
|
|
15668
|
-
return l2.indexOf(n3) >= 0 && p2;
|
|
15669
|
-
}
|
|
15670
|
-
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
15671
|
-
}
|
|
15672
|
-
}]);
|
|
15673
|
-
});
|
|
15674
|
-
})(reactKeyboardEventHandler);
|
|
15675
|
-
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
15676
|
-
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
15677
15501
|
const useFocus = () => {
|
|
15678
15502
|
const ref = useRef(null);
|
|
15679
15503
|
const setFocus = () => {
|
|
@@ -16949,13 +16773,13 @@ var ActionTypes$1 = /* @__PURE__ */ ((ActionTypes2) => {
|
|
|
16949
16773
|
return ActionTypes2;
|
|
16950
16774
|
})(ActionTypes$1 || {});
|
|
16951
16775
|
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
16952
|
-
EventKey2["RIGHT"] = "
|
|
16953
|
-
EventKey2["LEFT"] = "
|
|
16954
|
-
EventKey2["UP"] = "
|
|
16955
|
-
EventKey2["DOWN"] = "
|
|
16956
|
-
EventKey2["ENTER"] = "
|
|
16957
|
-
EventKey2["ESC"] = "
|
|
16958
|
-
EventKey2["TAB"] = "
|
|
16776
|
+
EventKey2["RIGHT"] = "ArrowRight";
|
|
16777
|
+
EventKey2["LEFT"] = "ArrowLeft";
|
|
16778
|
+
EventKey2["UP"] = "ArrowUp";
|
|
16779
|
+
EventKey2["DOWN"] = "ArrowDown";
|
|
16780
|
+
EventKey2["ENTER"] = "Enter";
|
|
16781
|
+
EventKey2["ESC"] = "Escape";
|
|
16782
|
+
EventKey2["TAB"] = "Tab";
|
|
16959
16783
|
return EventKey2;
|
|
16960
16784
|
})(EventKey || {});
|
|
16961
16785
|
const useCustomSelectLogic = ({
|
|
@@ -17143,20 +16967,23 @@ const useCustomSelectLogic = ({
|
|
|
17143
16967
|
const onKeyEvent = (key2, evt) => {
|
|
17144
16968
|
switch (key2) {
|
|
17145
16969
|
case EventKey.UP: {
|
|
17146
|
-
focusNextLayerOption(
|
|
16970
|
+
focusNextLayerOption("up");
|
|
17147
16971
|
break;
|
|
17148
16972
|
}
|
|
17149
16973
|
case EventKey.DOWN: {
|
|
17150
16974
|
if (state.isLayerOpen) {
|
|
17151
|
-
focusNextLayerOption(
|
|
16975
|
+
focusNextLayerOption("down");
|
|
17152
16976
|
} else {
|
|
17153
16977
|
clickTrigger();
|
|
17154
16978
|
}
|
|
17155
16979
|
break;
|
|
17156
16980
|
}
|
|
17157
|
-
case EventKey.LEFT:
|
|
16981
|
+
case EventKey.LEFT: {
|
|
16982
|
+
focusTriggerInputs("left");
|
|
16983
|
+
break;
|
|
16984
|
+
}
|
|
17158
16985
|
case EventKey.RIGHT: {
|
|
17159
|
-
focusTriggerInputs(
|
|
16986
|
+
focusTriggerInputs("right");
|
|
17160
16987
|
break;
|
|
17161
16988
|
}
|
|
17162
16989
|
case EventKey.ENTER: {
|
|
@@ -17267,71 +17094,69 @@ const CustomSelect = (props) => {
|
|
|
17267
17094
|
createAble,
|
|
17268
17095
|
listRef
|
|
17269
17096
|
});
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
handleKeys: Object.values(EventKey),
|
|
17274
|
-
onKeyEvent,
|
|
17275
|
-
children: [
|
|
17276
|
-
/* @__PURE__ */ jsx(
|
|
17277
|
-
Trigger,
|
|
17278
|
-
{
|
|
17279
|
-
selectedOptions,
|
|
17280
|
-
searchValue: state.searchValue,
|
|
17281
|
-
isOpen: state.isLayerOpen,
|
|
17282
|
-
focusedSelectedOptionIndex: state.triggerFocus.currentOption,
|
|
17283
|
-
clearAllIsFocused,
|
|
17284
|
-
searchable,
|
|
17285
|
-
triggerRef: mergeRefs(triggerRef, triggerProps.ref),
|
|
17286
|
-
error: error2,
|
|
17287
|
-
warning: warning2,
|
|
17288
|
-
tooltip: tooltip2,
|
|
17289
|
-
small: small2,
|
|
17290
|
-
isInTable: isInTable2,
|
|
17291
|
-
disabled: disabled2 || disabledContext,
|
|
17292
|
-
clearable,
|
|
17293
|
-
tabIndex,
|
|
17294
|
-
onClickTrigger,
|
|
17295
|
-
onChangeSearch,
|
|
17296
|
-
onClickDeselect: onClickDeselectOption,
|
|
17297
|
-
onClickClear: onClickClearAll,
|
|
17298
|
-
onFocus,
|
|
17299
|
-
onBlur,
|
|
17300
|
-
groupOrder,
|
|
17301
|
-
maxTooltipWidth,
|
|
17302
|
-
placeholder: placeholder2,
|
|
17303
|
-
right: right2,
|
|
17304
|
-
testId
|
|
17305
|
-
}
|
|
17306
|
-
),
|
|
17307
|
-
state.isLayerOpen && renderLayer(
|
|
17308
|
-
/* @__PURE__ */ jsx("div", { ...layerProps, className: styles$o.layerContainer, children: /* @__PURE__ */ jsx(
|
|
17309
|
-
Layer,
|
|
17310
|
-
{
|
|
17311
|
-
listRef,
|
|
17312
|
-
isMulti: isMulti2,
|
|
17313
|
-
sections: state.visibleOptions,
|
|
17314
|
-
selectedOptions,
|
|
17315
|
-
onSelectOption: (evt, option2) => {
|
|
17316
|
-
const close2 = !isMulti2 ? closeLayer : void 0;
|
|
17317
|
-
onSelectOption(evt, option2, close2);
|
|
17318
|
-
},
|
|
17319
|
-
closeLayer: () => {
|
|
17320
|
-
if (closeOnOptionActionClick) {
|
|
17321
|
-
closeLayer();
|
|
17322
|
-
}
|
|
17323
|
-
},
|
|
17324
|
-
width: getLayerWidth(triggerBounds),
|
|
17325
|
-
small: small2,
|
|
17326
|
-
focusedOptionIndex: state.layerFocus.current,
|
|
17327
|
-
firstSelectedOptionIndex: firstSelectedOptionIndex ?? 0,
|
|
17328
|
-
testId: testId && `${testId}-layer`
|
|
17329
|
-
}
|
|
17330
|
-
) })
|
|
17331
|
-
)
|
|
17332
|
-
]
|
|
17097
|
+
const onKeyDown = (evt) => {
|
|
17098
|
+
if (Object.values(EventKey).includes(evt.key)) {
|
|
17099
|
+
onKeyEvent(evt.key, evt);
|
|
17333
17100
|
}
|
|
17334
|
-
|
|
17101
|
+
};
|
|
17102
|
+
return /* @__PURE__ */ jsxs("div", { style: { width: getTriggerWidth() }, onKeyDown, children: [
|
|
17103
|
+
/* @__PURE__ */ jsx(
|
|
17104
|
+
Trigger,
|
|
17105
|
+
{
|
|
17106
|
+
selectedOptions,
|
|
17107
|
+
searchValue: state.searchValue,
|
|
17108
|
+
isOpen: state.isLayerOpen,
|
|
17109
|
+
focusedSelectedOptionIndex: state.triggerFocus.currentOption,
|
|
17110
|
+
clearAllIsFocused,
|
|
17111
|
+
searchable,
|
|
17112
|
+
triggerRef: mergeRefs(triggerRef, triggerProps.ref),
|
|
17113
|
+
error: error2,
|
|
17114
|
+
warning: warning2,
|
|
17115
|
+
tooltip: tooltip2,
|
|
17116
|
+
small: small2,
|
|
17117
|
+
isInTable: isInTable2,
|
|
17118
|
+
disabled: disabled2 || disabledContext,
|
|
17119
|
+
clearable,
|
|
17120
|
+
tabIndex,
|
|
17121
|
+
onClickTrigger,
|
|
17122
|
+
onChangeSearch,
|
|
17123
|
+
onClickDeselect: onClickDeselectOption,
|
|
17124
|
+
onClickClear: onClickClearAll,
|
|
17125
|
+
onFocus,
|
|
17126
|
+
onBlur,
|
|
17127
|
+
groupOrder,
|
|
17128
|
+
maxTooltipWidth,
|
|
17129
|
+
placeholder: placeholder2,
|
|
17130
|
+
right: right2,
|
|
17131
|
+
testId
|
|
17132
|
+
}
|
|
17133
|
+
),
|
|
17134
|
+
state.isLayerOpen && renderLayer(
|
|
17135
|
+
/* @__PURE__ */ jsx("div", { ...layerProps, className: styles$o.layerContainer, children: /* @__PURE__ */ jsx(
|
|
17136
|
+
Layer,
|
|
17137
|
+
{
|
|
17138
|
+
listRef,
|
|
17139
|
+
isMulti: isMulti2,
|
|
17140
|
+
sections: state.visibleOptions,
|
|
17141
|
+
selectedOptions,
|
|
17142
|
+
onSelectOption: (evt, option2) => {
|
|
17143
|
+
const close2 = !isMulti2 ? closeLayer : void 0;
|
|
17144
|
+
onSelectOption(evt, option2, close2);
|
|
17145
|
+
},
|
|
17146
|
+
closeLayer: () => {
|
|
17147
|
+
if (closeOnOptionActionClick) {
|
|
17148
|
+
closeLayer();
|
|
17149
|
+
}
|
|
17150
|
+
},
|
|
17151
|
+
width: getLayerWidth(triggerBounds),
|
|
17152
|
+
small: small2,
|
|
17153
|
+
focusedOptionIndex: state.layerFocus.current,
|
|
17154
|
+
firstSelectedOptionIndex: firstSelectedOptionIndex ?? 0,
|
|
17155
|
+
testId: testId && `${testId}-layer`
|
|
17156
|
+
}
|
|
17157
|
+
) })
|
|
17158
|
+
)
|
|
17159
|
+
] });
|
|
17335
17160
|
};
|
|
17336
17161
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
17337
17162
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
@@ -51554,7 +51379,7 @@ const NumberInput = ({
|
|
|
51554
51379
|
}, [focus2, valid, error2]);
|
|
51555
51380
|
const onChangeValue = (evt) => {
|
|
51556
51381
|
var _a2, _b;
|
|
51557
|
-
const value2 =
|
|
51382
|
+
const value2 = "key" in evt ? displayValue : (_a2 = evt == null ? void 0 : evt.target) == null ? void 0 : _a2.value;
|
|
51558
51383
|
const inputValue = cleanNumStr(
|
|
51559
51384
|
value2.replaceAll(" ", "").replaceAll("|", "")
|
|
51560
51385
|
);
|
|
@@ -51593,38 +51418,37 @@ const NumberInput = ({
|
|
|
51593
51418
|
const defaultDisplayRound = (value2) => isInTable2 ? roundToFixed(value2, 2) : roundByMagnitude(value2, 4);
|
|
51594
51419
|
const shouldDisplayRound = enableDisplayRounding && !focus2 && valid;
|
|
51595
51420
|
const valueWithDisplayRounding = shouldDisplayRound ? roundDisplayValue ? safeToString(roundDisplayValue(displayValue)) : defaultDisplayRound(value) : displayValue;
|
|
51421
|
+
const onKeyDown = (evt) => {
|
|
51422
|
+
if (evt.key === EventKey.ENTER) {
|
|
51423
|
+
onChangeValue(evt);
|
|
51424
|
+
}
|
|
51425
|
+
};
|
|
51596
51426
|
return /* @__PURE__ */ jsx(
|
|
51597
|
-
|
|
51427
|
+
Input$1,
|
|
51598
51428
|
{
|
|
51599
|
-
|
|
51600
|
-
|
|
51601
|
-
|
|
51602
|
-
|
|
51603
|
-
|
|
51604
|
-
|
|
51605
|
-
|
|
51606
|
-
|
|
51607
|
-
|
|
51608
|
-
|
|
51609
|
-
|
|
51610
|
-
|
|
51611
|
-
|
|
51612
|
-
|
|
51613
|
-
|
|
51614
|
-
|
|
51615
|
-
|
|
51616
|
-
|
|
51617
|
-
|
|
51618
|
-
|
|
51619
|
-
|
|
51620
|
-
|
|
51621
|
-
|
|
51622
|
-
tooltip: tooltip2,
|
|
51623
|
-
ref: inputRef
|
|
51624
|
-
},
|
|
51625
|
-
stringName
|
|
51626
|
-
)
|
|
51627
|
-
}
|
|
51429
|
+
type: "text",
|
|
51430
|
+
name: stringName,
|
|
51431
|
+
testId,
|
|
51432
|
+
disabled: disabled2,
|
|
51433
|
+
placeholder: placeholder2,
|
|
51434
|
+
value: valueWithDisplayRounding,
|
|
51435
|
+
onChange: onChangeValue,
|
|
51436
|
+
onFocus: onInputFocus,
|
|
51437
|
+
onBlur: onInputBlur,
|
|
51438
|
+
onKeyDown,
|
|
51439
|
+
error: firstError || error2,
|
|
51440
|
+
warning: warning2,
|
|
51441
|
+
right: !left2,
|
|
51442
|
+
small: small2,
|
|
51443
|
+
width: width2,
|
|
51444
|
+
isInTable: isInTable2,
|
|
51445
|
+
groupOrder,
|
|
51446
|
+
selectOnFocus,
|
|
51447
|
+
tabIndex,
|
|
51448
|
+
tooltip: tooltip2,
|
|
51449
|
+
ref: inputRef
|
|
51450
|
+
},
|
|
51451
|
+
stringName
|
|
51628
51452
|
);
|
|
51629
51453
|
};
|
|
51630
51454
|
const NumberInputCell = ({
|