@moda/om 18.0.0 → 18.1.0
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/CHANGELOG.md +7 -0
- package/dist/index.cjs.js +206 -97
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +206 -97
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/Select/SelectOptions.d.ts +1 -1
- package/dist/src/components/Text/Text.d.ts +2 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/Checkbox/Checkbox.tsx +5 -3
- package/src/components/Select/Select.tsx +3 -3
- package/src/components/Select/SelectOptions.tsx +4 -4
- package/src/components/SlidingPane/SlidingPane.scss +2 -0
- package/src/components/SlidingPane/SlidingPane.tsx +1 -1
- package/src/components/Text/Text.tsx +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [18.1.0](https://github.com/ModaOperandi/om/compare/v18.0.0...v18.1.0) (2022-12-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* accessibility improvements ([#3148](https://github.com/ModaOperandi/om/issues/3148)) ([7aecb1d](https://github.com/ModaOperandi/om/commit/7aecb1ddd9f6923b28bb5c99427ad884acb78fd2))
|
|
12
|
+
|
|
6
13
|
# [18.0.0](https://github.com/ModaOperandi/om/compare/v17.14.2...v18.0.0) (2022-12-01)
|
|
7
14
|
|
|
8
15
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -516,7 +516,11 @@ breakpoints.breakpoints = {
|
|
|
516
516
|
|
|
517
517
|
var helpers = {};
|
|
518
518
|
|
|
519
|
-
var
|
|
519
|
+
var colorStringExports = {};
|
|
520
|
+
var colorString = {
|
|
521
|
+
get exports(){ return colorStringExports; },
|
|
522
|
+
set exports(v){ colorStringExports = v; },
|
|
523
|
+
};
|
|
520
524
|
|
|
521
525
|
var colorName = {
|
|
522
526
|
"aliceblue": [240, 248, 255],
|
|
@@ -669,7 +673,11 @@ var colorName = {
|
|
|
669
673
|
"yellowgreen": [154, 205, 50]
|
|
670
674
|
};
|
|
671
675
|
|
|
672
|
-
var
|
|
676
|
+
var simpleSwizzleExports = {};
|
|
677
|
+
var simpleSwizzle = {
|
|
678
|
+
get exports(){ return simpleSwizzleExports; },
|
|
679
|
+
set exports(v){ simpleSwizzleExports = v; },
|
|
680
|
+
};
|
|
673
681
|
|
|
674
682
|
var isArrayish$1 = function isArrayish(obj) {
|
|
675
683
|
if (!obj || typeof obj === 'string') {
|
|
@@ -702,7 +710,7 @@ swizzle$1.wrap = function (fn) {
|
|
|
702
710
|
|
|
703
711
|
/* MIT license */
|
|
704
712
|
var colorNames = colorName;
|
|
705
|
-
var swizzle =
|
|
713
|
+
var swizzle = simpleSwizzleExports;
|
|
706
714
|
var hasOwnProperty = Object.hasOwnProperty;
|
|
707
715
|
var reverseNames = Object.create(null);
|
|
708
716
|
|
|
@@ -918,7 +926,7 @@ function hexDouble(num) {
|
|
|
918
926
|
value: true
|
|
919
927
|
});
|
|
920
928
|
exports.spacing = exports.colorInHex = exports.color = exports.remToUnitlessPx = exports.text = void 0;
|
|
921
|
-
var colorString
|
|
929
|
+
var colorString = colorStringExports;
|
|
922
930
|
var colors_1 = colors;
|
|
923
931
|
var space_1 = space;
|
|
924
932
|
var typography_1 = typography;
|
|
@@ -942,11 +950,11 @@ function hexDouble(num) {
|
|
|
942
950
|
var color = colors_1.colors.all[name];
|
|
943
951
|
return alpha != null ?
|
|
944
952
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
945
|
-
colorString
|
|
953
|
+
colorString.to.rgb(__spreadArray(__spreadArray([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
|
|
946
954
|
};
|
|
947
955
|
exports.color = color;
|
|
948
956
|
var colorInHex = function colorInHex(name, alpha) {
|
|
949
|
-
return colorString
|
|
957
|
+
return colorString.to.hex(colorString.get.rgb((0, exports.color)(name, alpha)));
|
|
950
958
|
};
|
|
951
959
|
exports.colorInHex = colorInHex;
|
|
952
960
|
var spacing = function spacing(topY, rightX, bottom, left) {
|
|
@@ -1185,7 +1193,11 @@ var isRenderProps = function isRenderProps(children) {
|
|
|
1185
1193
|
return typeof children === 'function';
|
|
1186
1194
|
};
|
|
1187
1195
|
|
|
1188
|
-
var
|
|
1196
|
+
var classnamesExports = {};
|
|
1197
|
+
var classnames = {
|
|
1198
|
+
get exports(){ return classnamesExports; },
|
|
1199
|
+
set exports(v){ classnamesExports = v; },
|
|
1200
|
+
};
|
|
1189
1201
|
|
|
1190
1202
|
(function (module) {
|
|
1191
1203
|
/* global define */
|
|
@@ -1230,7 +1242,7 @@ var classnames = {exports: {}};
|
|
|
1230
1242
|
}
|
|
1231
1243
|
})();
|
|
1232
1244
|
})(classnames);
|
|
1233
|
-
var classNames =
|
|
1245
|
+
var classNames = classnamesExports;
|
|
1234
1246
|
|
|
1235
1247
|
var _excluded$F = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1236
1248
|
var Stack = function Stack(_ref) {
|
|
@@ -1669,9 +1681,17 @@ function _extends() {
|
|
|
1669
1681
|
return _extends.apply(this, arguments);
|
|
1670
1682
|
}
|
|
1671
1683
|
|
|
1672
|
-
var
|
|
1684
|
+
var propTypesExports = {};
|
|
1685
|
+
var propTypes = {
|
|
1686
|
+
get exports(){ return propTypesExports; },
|
|
1687
|
+
set exports(v){ propTypesExports = v; },
|
|
1688
|
+
};
|
|
1673
1689
|
|
|
1674
|
-
var
|
|
1690
|
+
var reactIsExports = {};
|
|
1691
|
+
var reactIs = {
|
|
1692
|
+
get exports(){ return reactIsExports; },
|
|
1693
|
+
set exports(v){ reactIsExports = v; },
|
|
1694
|
+
};
|
|
1675
1695
|
|
|
1676
1696
|
var reactIs_production_min = {};
|
|
1677
1697
|
|
|
@@ -1955,7 +1975,7 @@ function requireReactIs_development() {
|
|
|
1955
1975
|
|
|
1956
1976
|
var hasRequiredReactIs;
|
|
1957
1977
|
function requireReactIs() {
|
|
1958
|
-
if (hasRequiredReactIs) return
|
|
1978
|
+
if (hasRequiredReactIs) return reactIsExports;
|
|
1959
1979
|
hasRequiredReactIs = 1;
|
|
1960
1980
|
(function (module) {
|
|
1961
1981
|
|
|
@@ -1965,7 +1985,7 @@ function requireReactIs() {
|
|
|
1965
1985
|
module.exports = requireReactIs_development();
|
|
1966
1986
|
}
|
|
1967
1987
|
})(reactIs);
|
|
1968
|
-
return
|
|
1988
|
+
return reactIsExports;
|
|
1969
1989
|
}
|
|
1970
1990
|
|
|
1971
1991
|
/*
|
|
@@ -2822,7 +2842,7 @@ var hiddenGuard = {
|
|
|
2822
2842
|
left: '1px'
|
|
2823
2843
|
};
|
|
2824
2844
|
process.env.NODE_ENV !== "production" ? {
|
|
2825
|
-
children:
|
|
2845
|
+
children: propTypesExports.node
|
|
2826
2846
|
} : {};
|
|
2827
2847
|
|
|
2828
2848
|
var mediumFocus = createMedium({}, function (_ref) {
|
|
@@ -2987,25 +3007,25 @@ var FocusLock = /*#__PURE__*/React__namespace.forwardRef(function FocusLockUI(pr
|
|
|
2987
3007
|
}));
|
|
2988
3008
|
});
|
|
2989
3009
|
FocusLock.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
2990
|
-
children:
|
|
2991
|
-
disabled:
|
|
2992
|
-
returnFocus:
|
|
2993
|
-
focusOptions:
|
|
2994
|
-
noFocusGuards:
|
|
2995
|
-
hasPositiveIndices:
|
|
2996
|
-
allowTextSelection:
|
|
2997
|
-
autoFocus:
|
|
2998
|
-
persistentFocus:
|
|
2999
|
-
crossFrame:
|
|
3000
|
-
group:
|
|
3001
|
-
className:
|
|
3002
|
-
whiteList:
|
|
3003
|
-
shards:
|
|
3004
|
-
as:
|
|
3005
|
-
lockProps:
|
|
3006
|
-
onActivation:
|
|
3007
|
-
onDeactivation:
|
|
3008
|
-
sideCar:
|
|
3010
|
+
children: propTypesExports.node,
|
|
3011
|
+
disabled: propTypesExports.bool,
|
|
3012
|
+
returnFocus: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.object, propTypesExports.func]),
|
|
3013
|
+
focusOptions: propTypesExports.object,
|
|
3014
|
+
noFocusGuards: propTypesExports.bool,
|
|
3015
|
+
hasPositiveIndices: propTypesExports.bool,
|
|
3016
|
+
allowTextSelection: propTypesExports.bool,
|
|
3017
|
+
autoFocus: propTypesExports.bool,
|
|
3018
|
+
persistentFocus: propTypesExports.bool,
|
|
3019
|
+
crossFrame: propTypesExports.bool,
|
|
3020
|
+
group: propTypesExports.string,
|
|
3021
|
+
className: propTypesExports.string,
|
|
3022
|
+
whiteList: propTypesExports.func,
|
|
3023
|
+
shards: propTypesExports.arrayOf(propTypesExports.any),
|
|
3024
|
+
as: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.func, propTypesExports.object]),
|
|
3025
|
+
lockProps: propTypesExports.object,
|
|
3026
|
+
onActivation: propTypesExports.func,
|
|
3027
|
+
onDeactivation: propTypesExports.func,
|
|
3028
|
+
sideCar: propTypesExports.any.isRequired
|
|
3009
3029
|
} : {};
|
|
3010
3030
|
FocusLock.defaultProps = {
|
|
3011
3031
|
children: undefined,
|
|
@@ -3978,7 +3998,7 @@ var FocusWatcher = function FocusWatcher() {
|
|
|
3978
3998
|
return null;
|
|
3979
3999
|
};
|
|
3980
4000
|
process.env.NODE_ENV !== "production" ? {
|
|
3981
|
-
children:
|
|
4001
|
+
children: propTypesExports.node.isRequired
|
|
3982
4002
|
} : {};
|
|
3983
4003
|
var onWindowBlur = function onWindowBlur() {
|
|
3984
4004
|
focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction
|
|
@@ -6647,7 +6667,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
6647
6667
|
};
|
|
6648
6668
|
Circle12.displayName = 'Circle12';
|
|
6649
6669
|
|
|
6650
|
-
var _excluded$u = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon", "dataTestId"];
|
|
6670
|
+
var _excluded$u = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon", "dataTestId", "id"];
|
|
6651
6671
|
var CHECKED_ITEM_PROPS = {
|
|
6652
6672
|
className: 'Checkbox__check-mark',
|
|
6653
6673
|
height: '85%',
|
|
@@ -6665,6 +6685,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
6665
6685
|
_ref$checkIcon = _ref.checkIcon,
|
|
6666
6686
|
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
6667
6687
|
dataTestId = _ref.dataTestId,
|
|
6688
|
+
id = _ref.id,
|
|
6668
6689
|
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
6669
6690
|
var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
6670
6691
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -6678,18 +6699,19 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
6678
6699
|
onChange && onChange(event);
|
|
6679
6700
|
}, [onChange, checked]);
|
|
6680
6701
|
return /*#__PURE__*/React.createElement("label", {
|
|
6681
|
-
|
|
6702
|
+
htmlFor: id,
|
|
6682
6703
|
tabIndex: 0,
|
|
6683
6704
|
className: classNames('Checkbox', className, {
|
|
6684
6705
|
'Checkbox--disabled': disabled
|
|
6685
6706
|
}),
|
|
6686
|
-
"data-test-id": "".concat(dataTestId, "--label")
|
|
6707
|
+
"data-test-id": dataTestId && "".concat(dataTestId, "--label")
|
|
6687
6708
|
}, /*#__PURE__*/React.createElement("span", {
|
|
6688
6709
|
tabIndex: -1,
|
|
6689
6710
|
className: classNames('Checkbox__indicator', {
|
|
6690
6711
|
'Checkbox__indicator--disabled': disabled
|
|
6691
6712
|
})
|
|
6692
6713
|
}, isChecked && /*#__PURE__*/React.createElement(React.Fragment, null, checkIcon === 'checkmark' && /*#__PURE__*/React.createElement(Checkmark16, CHECKED_ITEM_PROPS), checkIcon === 'circle' && /*#__PURE__*/React.createElement(Circle12, CHECKED_ITEM_PROPS))), /*#__PURE__*/React.createElement("input", _extends$1({
|
|
6714
|
+
id: id,
|
|
6693
6715
|
tabIndex: -1,
|
|
6694
6716
|
className: "Checkbox__input",
|
|
6695
6717
|
type: "checkbox",
|
|
@@ -6697,7 +6719,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
6697
6719
|
value: value,
|
|
6698
6720
|
onChange: handleChange,
|
|
6699
6721
|
disabled: disabled,
|
|
6700
|
-
"data-test-id": "".concat(dataTestId, "--input")
|
|
6722
|
+
"data-test-id": dataTestId && "".concat(dataTestId, "--input")
|
|
6701
6723
|
}, rest)), children && /*#__PURE__*/React.createElement("span", {
|
|
6702
6724
|
className: "Checkbox__label"
|
|
6703
6725
|
}, children));
|
|
@@ -6827,7 +6849,11 @@ var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
|
6827
6849
|
}, rest), children);
|
|
6828
6850
|
};
|
|
6829
6851
|
|
|
6830
|
-
var
|
|
6852
|
+
var reactInputMaskExports = {};
|
|
6853
|
+
var reactInputMask = {
|
|
6854
|
+
get exports(){ return reactInputMaskExports; },
|
|
6855
|
+
set exports(v){ reactInputMaskExports = v; },
|
|
6856
|
+
};
|
|
6831
6857
|
|
|
6832
6858
|
var reactInputMask_production_min;
|
|
6833
6859
|
var hasRequiredReactInputMask_production_min;
|
|
@@ -8413,7 +8439,7 @@ function requireReactInputMask_development() {
|
|
|
8413
8439
|
module.exports = requireReactInputMask_development();
|
|
8414
8440
|
}
|
|
8415
8441
|
})(reactInputMask);
|
|
8416
|
-
var InputMask = /*@__PURE__*/getDefaultExportFromCjs(
|
|
8442
|
+
var InputMask = /*@__PURE__*/getDefaultExportFromCjs(reactInputMaskExports);
|
|
8417
8443
|
|
|
8418
8444
|
var cardTypes$1 = {
|
|
8419
8445
|
visa: {
|
|
@@ -9171,9 +9197,11 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
9171
9197
|
}, deps);
|
|
9172
9198
|
};
|
|
9173
9199
|
|
|
9174
|
-
var _excluded$p = ["className", "treatment", "color", "family", "children", "style"];
|
|
9200
|
+
var _excluded$p = ["as", "className", "treatment", "color", "family", "children", "style"];
|
|
9175
9201
|
var Text = function Text(_ref) {
|
|
9176
|
-
var
|
|
9202
|
+
var _ref$as = _ref.as,
|
|
9203
|
+
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
9204
|
+
className = _ref.className,
|
|
9177
9205
|
_ref$treatment = _ref.treatment,
|
|
9178
9206
|
treatment = _ref$treatment === void 0 ? 'body1' : _ref$treatment,
|
|
9179
9207
|
_ref$color = _ref.color,
|
|
@@ -9182,7 +9210,7 @@ var Text = function Text(_ref) {
|
|
|
9182
9210
|
children = _ref.children,
|
|
9183
9211
|
style = _ref.style,
|
|
9184
9212
|
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
9185
|
-
return /*#__PURE__*/React.createElement(
|
|
9213
|
+
return /*#__PURE__*/React.createElement(Component, _extends$1({
|
|
9186
9214
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
9187
9215
|
style: _objectSpread2({
|
|
9188
9216
|
color: dist$4.colors.all[color]
|
|
@@ -9361,57 +9389,138 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
9361
9389
|
}, /*#__PURE__*/React.createElement(Exit20, null)));
|
|
9362
9390
|
};
|
|
9363
9391
|
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
});
|
|
9384
|
-
} else {
|
|
9385
|
-
el.scrollTop = top;
|
|
9386
|
-
el.scrollLeft = left;
|
|
9392
|
+
var e = function e(_e) {
|
|
9393
|
+
return "object" == _typeof(_e) && null != _e && 1 === _e.nodeType;
|
|
9394
|
+
},
|
|
9395
|
+
t$1 = function t(e, _t) {
|
|
9396
|
+
return (!_t || "hidden" !== e) && "visible" !== e && "clip" !== e;
|
|
9397
|
+
},
|
|
9398
|
+
n = function n(e, _n) {
|
|
9399
|
+
if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
|
|
9400
|
+
var _l = getComputedStyle(e, null);
|
|
9401
|
+
return t$1(_l.overflowY, _n) || t$1(_l.overflowX, _n) || function (e) {
|
|
9402
|
+
var t = function (e) {
|
|
9403
|
+
if (!e.ownerDocument || !e.ownerDocument.defaultView) return null;
|
|
9404
|
+
try {
|
|
9405
|
+
return e.ownerDocument.defaultView.frameElement;
|
|
9406
|
+
} catch (e) {
|
|
9407
|
+
return null;
|
|
9408
|
+
}
|
|
9409
|
+
}(e);
|
|
9410
|
+
return !!t && (t.clientHeight < e.scrollHeight || t.clientWidth < e.scrollWidth);
|
|
9411
|
+
}(e);
|
|
9387
9412
|
}
|
|
9388
|
-
|
|
9389
|
-
}
|
|
9390
|
-
function
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9413
|
+
return !1;
|
|
9414
|
+
},
|
|
9415
|
+
l = function l(e, t, n, _l2, i, o, r, d) {
|
|
9416
|
+
return o < e && r > t || o > e && r < t ? 0 : o <= e && d <= n || r >= t && d >= n ? o - e - _l2 : r > t && d < n || o < e && d > n ? r - t + i : 0;
|
|
9417
|
+
},
|
|
9418
|
+
i = function i(e) {
|
|
9419
|
+
var t = e.parentElement;
|
|
9420
|
+
return null == t ? e.getRootNode().host || null : t;
|
|
9421
|
+
};
|
|
9422
|
+
var o$1 = function o(t, _o2) {
|
|
9423
|
+
var r, d, h, f, u, s;
|
|
9424
|
+
if ("undefined" == typeof document) return [];
|
|
9425
|
+
var a = _o2.scrollMode,
|
|
9426
|
+
c = _o2.block,
|
|
9427
|
+
g = _o2.inline,
|
|
9428
|
+
m = _o2.boundary,
|
|
9429
|
+
p = _o2.skipOverflowHiddenElements,
|
|
9430
|
+
w = "function" == typeof m ? m : function (e) {
|
|
9431
|
+
return e !== m;
|
|
9395
9432
|
};
|
|
9433
|
+
if (!e(t)) throw new TypeError("Invalid target");
|
|
9434
|
+
var W = document.scrollingElement || document.documentElement,
|
|
9435
|
+
H = [],
|
|
9436
|
+
b = t;
|
|
9437
|
+
for (; e(b) && w(b);) {
|
|
9438
|
+
if (b = i(b), b === W) {
|
|
9439
|
+
H.push(b);
|
|
9440
|
+
break;
|
|
9441
|
+
}
|
|
9442
|
+
null != b && b === document.body && n(b) && !n(document.documentElement) || null != b && n(b, p) && H.push(b);
|
|
9443
|
+
}
|
|
9444
|
+
var v = null != (d = null == (r = window.visualViewport) ? void 0 : r.width) ? d : innerWidth,
|
|
9445
|
+
y = null != (f = null == (h = window.visualViewport) ? void 0 : h.height) ? f : innerHeight,
|
|
9446
|
+
E = null != (u = window.scrollX) ? u : pageXOffset,
|
|
9447
|
+
M = null != (s = window.scrollY) ? s : pageYOffset,
|
|
9448
|
+
_t$getBoundingClientR = t.getBoundingClientRect(),
|
|
9449
|
+
x = _t$getBoundingClientR.height,
|
|
9450
|
+
I = _t$getBoundingClientR.width,
|
|
9451
|
+
C = _t$getBoundingClientR.top,
|
|
9452
|
+
R = _t$getBoundingClientR.right,
|
|
9453
|
+
T = _t$getBoundingClientR.bottom,
|
|
9454
|
+
V = _t$getBoundingClientR.left,
|
|
9455
|
+
k = "start" === c || "nearest" === c ? C : "end" === c ? T : C + x / 2,
|
|
9456
|
+
B = "center" === g ? V + I / 2 : "end" === g ? R : V,
|
|
9457
|
+
D = [];
|
|
9458
|
+
for (var _e2 = 0; _e2 < H.length; _e2++) {
|
|
9459
|
+
var _t2 = H[_e2],
|
|
9460
|
+
_t2$getBoundingClient = _t2.getBoundingClientRect(),
|
|
9461
|
+
_n2 = _t2$getBoundingClient.height,
|
|
9462
|
+
_i = _t2$getBoundingClient.width,
|
|
9463
|
+
_o = _t2$getBoundingClient.top,
|
|
9464
|
+
_r = _t2$getBoundingClient.right,
|
|
9465
|
+
_d = _t2$getBoundingClient.bottom,
|
|
9466
|
+
_h = _t2$getBoundingClient.left;
|
|
9467
|
+
if ("if-needed" === a && C >= 0 && V >= 0 && T <= y && R <= v && C >= _o && T <= _d && V >= _h && R <= _r) return D;
|
|
9468
|
+
var _f = getComputedStyle(_t2),
|
|
9469
|
+
_u = parseInt(_f.borderLeftWidth, 10),
|
|
9470
|
+
_s = parseInt(_f.borderTopWidth, 10),
|
|
9471
|
+
_m = parseInt(_f.borderRightWidth, 10),
|
|
9472
|
+
_p = parseInt(_f.borderBottomWidth, 10),
|
|
9473
|
+
_w = 0,
|
|
9474
|
+
_b = 0,
|
|
9475
|
+
O = "offsetWidth" in _t2 ? _t2.offsetWidth - _t2.clientWidth - _u - _m : 0,
|
|
9476
|
+
X = "offsetHeight" in _t2 ? _t2.offsetHeight - _t2.clientHeight - _s - _p : 0,
|
|
9477
|
+
Y = "offsetWidth" in _t2 ? 0 === _t2.offsetWidth ? 0 : _i / _t2.offsetWidth : 0,
|
|
9478
|
+
L = "offsetHeight" in _t2 ? 0 === _t2.offsetHeight ? 0 : _n2 / _t2.offsetHeight : 0;
|
|
9479
|
+
if (W === _t2) _w = "start" === c ? k : "end" === c ? k - y : "nearest" === c ? l(M, M + y, y, _s, _p, M + k, M + k + x, x) : k - y / 2, _b = "start" === g ? B : "center" === g ? B - v / 2 : "end" === g ? B - v : l(E, E + v, v, _u, _m, E + B, E + B + I, I), _w = Math.max(0, _w + M), _b = Math.max(0, _b + E);else {
|
|
9480
|
+
_w = "start" === c ? k - _o - _s : "end" === c ? k - _d + _p + X : "nearest" === c ? l(_o, _d, _n2, _s, _p + X, k, k + x, x) : k - (_o + _n2 / 2) + X / 2, _b = "start" === g ? B - _h - _u : "center" === g ? B - (_h + _i / 2) + O / 2 : "end" === g ? B - _r + _m + O : l(_h, _r, _i, _u, _m + O, B, B + I, I);
|
|
9481
|
+
var _e3 = _t2.scrollLeft,
|
|
9482
|
+
_f2 = _t2.scrollTop;
|
|
9483
|
+
_w = Math.max(0, Math.min(_f2 + _w / L, _t2.scrollHeight - _n2 / L + X)), _b = Math.max(0, Math.min(_e3 + _b / Y, _t2.scrollWidth - _i / Y + O)), k += _f2 - _w, B += _e3 - _b;
|
|
9484
|
+
}
|
|
9485
|
+
D.push({
|
|
9486
|
+
el: _t2,
|
|
9487
|
+
top: _w,
|
|
9488
|
+
left: _b
|
|
9489
|
+
});
|
|
9396
9490
|
}
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9491
|
+
return D;
|
|
9492
|
+
};
|
|
9493
|
+
|
|
9494
|
+
var t = function t(e) {
|
|
9495
|
+
return !1 === e ? {
|
|
9496
|
+
block: "end",
|
|
9497
|
+
inline: "nearest"
|
|
9498
|
+
} : function (e) {
|
|
9499
|
+
return e === Object(e) && 0 !== Object.keys(e).length;
|
|
9500
|
+
}(e) ? e : {
|
|
9501
|
+
block: "start",
|
|
9502
|
+
inline: "nearest"
|
|
9403
9503
|
};
|
|
9404
|
-
}
|
|
9405
|
-
function
|
|
9406
|
-
var
|
|
9407
|
-
if (
|
|
9408
|
-
return
|
|
9409
|
-
}
|
|
9410
|
-
if (!
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9504
|
+
};
|
|
9505
|
+
function o(o, l) {
|
|
9506
|
+
var n = o.isConnected || o.ownerDocument.documentElement.contains(o);
|
|
9507
|
+
if (function (e) {
|
|
9508
|
+
return "object" == _typeof(e) && "function" == typeof e.behavior;
|
|
9509
|
+
}(l)) return l.behavior(n ? o$1(o, l) : []);
|
|
9510
|
+
if (!n) return;
|
|
9511
|
+
var r = t(l),
|
|
9512
|
+
c = o$1(o, r),
|
|
9513
|
+
i = ("scrollBehavior" in document.body.style);
|
|
9514
|
+
c.forEach(function (e) {
|
|
9515
|
+
var t = e.el,
|
|
9516
|
+
o = e.top,
|
|
9517
|
+
l = e.left;
|
|
9518
|
+
t.scroll && i ? t.scroll({
|
|
9519
|
+
top: o,
|
|
9520
|
+
left: l,
|
|
9521
|
+
behavior: r.behavior
|
|
9522
|
+
}) : (t.scrollTop = o, t.scrollLeft = l);
|
|
9523
|
+
});
|
|
9415
9524
|
}
|
|
9416
9525
|
|
|
9417
9526
|
var SelectOption = function SelectOption(_ref) {
|
|
@@ -9428,7 +9537,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9428
9537
|
}, [onClick, option]);
|
|
9429
9538
|
React.useEffect(function () {
|
|
9430
9539
|
if (active && ref.current) {
|
|
9431
|
-
|
|
9540
|
+
o(ref.current, {
|
|
9432
9541
|
scrollMode: 'if-needed',
|
|
9433
9542
|
block: 'nearest'
|
|
9434
9543
|
});
|
|
@@ -9507,11 +9616,11 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9507
9616
|
tabIndex: -1,
|
|
9508
9617
|
role: "listbox",
|
|
9509
9618
|
ref: ref,
|
|
9510
|
-
"aria-labelledby": "Select__label--".concat(idRef),
|
|
9511
|
-
"aria-activedescendant": "SelectOption--".concat(activeOption === null || activeOption === void 0 ? void 0 : activeOption.value
|
|
9619
|
+
"aria-labelledby": "Select__label".concat(idRef ? "--".concat(idRef) : ''),
|
|
9620
|
+
"aria-activedescendant": "SelectOption--".concat(activeOption === null || activeOption === void 0 ? void 0 : activeOption.value).concat(idRef ? "-".concat(idRef) : '')
|
|
9512
9621
|
}, rest), options.map(function (option) {
|
|
9513
9622
|
return /*#__PURE__*/React.createElement(SelectOption, {
|
|
9514
|
-
id: "SelectOption--".concat(option.value
|
|
9623
|
+
id: "SelectOption--".concat(option.value).concat(idRef ? "-".concat(idRef) : ''),
|
|
9515
9624
|
key: option.value,
|
|
9516
9625
|
option: option,
|
|
9517
9626
|
dataTestId: dataTestId,
|
|
@@ -9641,8 +9750,7 @@ var Select = function Select(_ref) {
|
|
|
9641
9750
|
_ref$dropDirection = _ref.dropDirection,
|
|
9642
9751
|
dropDirection = _ref$dropDirection === void 0 ? 'down' : _ref$dropDirection,
|
|
9643
9752
|
error = _ref.error,
|
|
9644
|
-
|
|
9645
|
-
idRef = _ref$idRef === void 0 ? '' : _ref$idRef,
|
|
9753
|
+
idRef = _ref.idRef,
|
|
9646
9754
|
_ref$label = _ref.label,
|
|
9647
9755
|
label = _ref$label === void 0 ? '' : _ref$label,
|
|
9648
9756
|
name = _ref.name,
|
|
@@ -9704,7 +9812,7 @@ var Select = function Select(_ref) {
|
|
|
9704
9812
|
});
|
|
9705
9813
|
}, [options, state.focused]);
|
|
9706
9814
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends$1({
|
|
9707
|
-
id: idRef
|
|
9815
|
+
id: idRef && "Select--".concat(idRef),
|
|
9708
9816
|
className: classNames('Select', {
|
|
9709
9817
|
'Select--disabled': disabled,
|
|
9710
9818
|
'Select--error': error
|
|
@@ -9716,7 +9824,7 @@ var Select = function Select(_ref) {
|
|
|
9716
9824
|
type: "hidden",
|
|
9717
9825
|
value: state.value
|
|
9718
9826
|
}), /*#__PURE__*/React.createElement(Clickable, {
|
|
9719
|
-
id: "Select__value--".concat(idRef),
|
|
9827
|
+
id: idRef && "Select__value--".concat(idRef),
|
|
9720
9828
|
className: "Select__value",
|
|
9721
9829
|
disabled: disabled,
|
|
9722
9830
|
onClick: handleToggle,
|
|
@@ -11159,6 +11267,7 @@ var SlidingPane = function SlidingPane(_ref) {
|
|
|
11159
11267
|
family: "serif"
|
|
11160
11268
|
}, title), /*#__PURE__*/React.createElement(Clickable, {
|
|
11161
11269
|
className: "SlidingPane__close",
|
|
11270
|
+
"aria-label": "Close",
|
|
11162
11271
|
onClick: onClose
|
|
11163
11272
|
}, /*#__PURE__*/React.createElement(Exit16, null))), /*#__PURE__*/React.createElement("div", {
|
|
11164
11273
|
className: "SlidingPane__content"
|