@equinor/eds-core-react 0.14.0 → 0.14.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/core-react.cjs.js +288 -544
- package/dist/core-react.esm.js +289 -545
- package/dist/core-react.umd.js +288 -544
- package/dist/types/components/Accordion/Accordion.tokens.d.ts +1 -0
- package/dist/types/components/Pagination/Pagination.d.ts +2 -2
- package/dist/types/components/Switch/Switch.styles.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useHideBodyScroll.d.ts +1 -0
- package/package.json +7 -10
package/dist/core-react.cjs.js
CHANGED
|
@@ -396,7 +396,7 @@ object-assign
|
|
|
396
396
|
*/
|
|
397
397
|
/* eslint-disable no-unused-vars */
|
|
398
398
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
399
|
-
var hasOwnProperty
|
|
399
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
400
400
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
401
401
|
|
|
402
402
|
function toObject(val) {
|
|
@@ -460,7 +460,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
460
460
|
from = Object(arguments[s]);
|
|
461
461
|
|
|
462
462
|
for (var key in from) {
|
|
463
|
-
if (hasOwnProperty
|
|
463
|
+
if (hasOwnProperty.call(from, key)) {
|
|
464
464
|
to[key] = from[key];
|
|
465
465
|
}
|
|
466
466
|
}
|
|
@@ -2727,9 +2727,9 @@ var buttonTypography = tokens$6.typography.navigation.button,
|
|
|
2727
2727
|
buttonBorderRadius$2 = _tokens$shape$button.borderRadius,
|
|
2728
2728
|
compactButtonHeight = _tokens$shape$2._modes.compact.button.minHeight,
|
|
2729
2729
|
outline = tokens$6.interactions.focused,
|
|
2730
|
-
_tokens$clickbounds$
|
|
2731
|
-
clicboundHeight$1 = _tokens$clickbounds$
|
|
2732
|
-
compactClickboundHeight$1 = _tokens$clickbounds$
|
|
2730
|
+
_tokens$clickbounds$3 = tokens$6.clickbounds,
|
|
2731
|
+
clicboundHeight$1 = _tokens$clickbounds$3.default__base,
|
|
2732
|
+
compactClickboundHeight$1 = _tokens$clickbounds$3.compact__standard;
|
|
2733
2733
|
var button = {
|
|
2734
2734
|
background: 'transparent',
|
|
2735
2735
|
height: buttonHeight,
|
|
@@ -3236,9 +3236,9 @@ var _tokens$colors$intera$g = tokens$6.colors.interactive,
|
|
|
3236
3236
|
dangerColor = _tokens$colors$intera$g.danger__resting.rgba,
|
|
3237
3237
|
dangerHoverColor = _tokens$colors$intera$g.danger__hover.rgba,
|
|
3238
3238
|
dangerHoverAltColor = _tokens$colors$intera$g.danger__highlight.rgba,
|
|
3239
|
-
_tokens$clickbounds = tokens$6.clickbounds,
|
|
3240
|
-
clicboundHeight = _tokens$clickbounds.default__base,
|
|
3241
|
-
compactClickboundHeight = _tokens$clickbounds.compact__standard,
|
|
3239
|
+
_tokens$clickbounds$2 = tokens$6.clickbounds,
|
|
3240
|
+
clicboundHeight = _tokens$clickbounds$2.default__base,
|
|
3241
|
+
compactClickboundHeight = _tokens$clickbounds$2.compact__standard,
|
|
3242
3242
|
shape$2 = tokens$6.shape;
|
|
3243
3243
|
var primary$6 = mergeDeepRight(button, {
|
|
3244
3244
|
height: shape$2.icon_button.minHeight,
|
|
@@ -5894,6 +5894,15 @@ var useToken = function useToken(options, token) {
|
|
|
5894
5894
|
}, [options, token]);
|
|
5895
5895
|
};
|
|
5896
5896
|
|
|
5897
|
+
var useHideBodyScroll = function useHideBodyScroll(overflowState) {
|
|
5898
|
+
React.useEffect(function () {
|
|
5899
|
+
document.body.style.overflow = 'hidden';
|
|
5900
|
+
return function () {
|
|
5901
|
+
document.body.style.overflow = overflowState;
|
|
5902
|
+
};
|
|
5903
|
+
}, []);
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5897
5906
|
var FullWidthCenterContent = styled__default['default'].span.withConfig({
|
|
5898
5907
|
displayName: "InnerFullWidth__FullWidthCenterContent",
|
|
5899
5908
|
componentId: "sc-qeawkb-0"
|
|
@@ -6007,7 +6016,7 @@ var ButtonBase = styled__default['default'].button.withConfig({
|
|
|
6007
6016
|
var focus = states.focus,
|
|
6008
6017
|
hover = states.hover,
|
|
6009
6018
|
disabled = states.disabled;
|
|
6010
|
-
return styled.css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}&:hover{background:", ";color:", ";", "}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", "
|
|
6019
|
+
return styled.css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, spacingsTemplate(theme.spacings), bordersTemplate(theme.border), typographyTemplate(theme.typography), (_a = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _a === void 0 ? void 0 : _a.top, (_b = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _b === void 0 ? void 0 : _b.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_c = hover.typography) === null || _c === void 0 ? void 0 : _c.color, bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), outlineTemplate(focus.outline), disabled.background, bordersTemplate(disabled.border), typographyTemplate(disabled.typography), disabled.background);
|
|
6011
6020
|
});
|
|
6012
6021
|
var Button = /*#__PURE__*/React.forwardRef(function Button(_a, ref) {
|
|
6013
6022
|
var _a$color = _a.color,
|
|
@@ -6029,7 +6038,7 @@ var Button = /*#__PURE__*/React.forwardRef(function Button(_a, ref) {
|
|
|
6029
6038
|
|
|
6030
6039
|
var token = useToken({
|
|
6031
6040
|
density: density
|
|
6032
|
-
}, getToken$1(variant, color))
|
|
6041
|
+
}, getToken$1(variant, color));
|
|
6033
6042
|
var as = href && !disabled ? 'a' : other.as ? other.as : 'button';
|
|
6034
6043
|
var type = href || other.as ? undefined : 'button';
|
|
6035
6044
|
tabIndex = disabled ? -1 : tabIndex;
|
|
@@ -6366,7 +6375,7 @@ var TableDataCell = /*#__PURE__*/React.forwardRef(function TableDataCell(_a, ref
|
|
|
6366
6375
|
|
|
6367
6376
|
var token = useToken({
|
|
6368
6377
|
density: density
|
|
6369
|
-
}, applyVariant(variant, tableCell))
|
|
6378
|
+
}, applyVariant(variant, tableCell));
|
|
6370
6379
|
return jsxRuntime.exports.jsx(styled.ThemeProvider, Object.assign({
|
|
6371
6380
|
theme: token
|
|
6372
6381
|
}, {
|
|
@@ -6497,7 +6506,7 @@ var TableHeaderCell = /*#__PURE__*/React.forwardRef(function TableHeaderCell(_a,
|
|
|
6497
6506
|
|
|
6498
6507
|
var token = useToken({
|
|
6499
6508
|
density: density
|
|
6500
|
-
}, token$5)
|
|
6509
|
+
}, token$5);
|
|
6501
6510
|
return jsxRuntime.exports.jsx(styled.ThemeProvider, Object.assign({
|
|
6502
6511
|
theme: token
|
|
6503
6512
|
}, {
|
|
@@ -6601,8 +6610,10 @@ var StyledRow = styled__default['default'].tr.withConfig({
|
|
|
6601
6610
|
|
|
6602
6611
|
return {
|
|
6603
6612
|
background: active ? (_a = token$3.states.active) === null || _a === void 0 ? void 0 : _a.background : null,
|
|
6604
|
-
':hover': {
|
|
6605
|
-
|
|
6613
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
6614
|
+
':hover': {
|
|
6615
|
+
background: (_b = token$3.states.hover) === null || _b === void 0 ? void 0 : _b.background
|
|
6616
|
+
}
|
|
6606
6617
|
}
|
|
6607
6618
|
};
|
|
6608
6619
|
});
|
|
@@ -6970,7 +6981,7 @@ var Input$5 = /*#__PURE__*/React.forwardRef(function Input(_a, ref) {
|
|
|
6970
6981
|
|
|
6971
6982
|
var token = useToken({
|
|
6972
6983
|
density: density
|
|
6973
|
-
}, inputVariant)
|
|
6984
|
+
}, inputVariant);
|
|
6974
6985
|
var inputProps = Object.assign({
|
|
6975
6986
|
ref: ref,
|
|
6976
6987
|
type: type,
|
|
@@ -7643,7 +7654,7 @@ var TextField = /*#__PURE__*/React.forwardRef(function TextField(_a, ref) {
|
|
|
7643
7654
|
|
|
7644
7655
|
var token = useToken({
|
|
7645
7656
|
density: density
|
|
7646
|
-
}, textfield$1)
|
|
7657
|
+
}, textfield$1);
|
|
7647
7658
|
return jsxRuntime.exports.jsx(styled.ThemeProvider, Object.assign({
|
|
7648
7659
|
theme: token
|
|
7649
7660
|
}, {
|
|
@@ -7819,348 +7830,16 @@ var List$1 = List$2;
|
|
|
7819
7830
|
List$1.Item = ListItem$4;
|
|
7820
7831
|
List$1.Item.displayName = 'List.Item';
|
|
7821
7832
|
|
|
7822
|
-
/** Detect free variable `global` from Node.js. */
|
|
7823
|
-
|
|
7824
|
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
7825
|
-
|
|
7826
|
-
var _freeGlobal = freeGlobal$1;
|
|
7827
|
-
|
|
7828
|
-
var freeGlobal = _freeGlobal;
|
|
7829
|
-
|
|
7830
|
-
/** Detect free variable `self`. */
|
|
7831
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
7832
|
-
|
|
7833
|
-
/** Used as a reference to the global object. */
|
|
7834
|
-
var root$1 = freeGlobal || freeSelf || Function('return this')();
|
|
7835
|
-
|
|
7836
|
-
var _root = root$1;
|
|
7837
|
-
|
|
7838
|
-
var root = _root;
|
|
7839
|
-
|
|
7840
|
-
/** Built-in value references. */
|
|
7841
|
-
var Symbol$4 = root.Symbol;
|
|
7842
|
-
|
|
7843
|
-
var _Symbol = Symbol$4;
|
|
7844
|
-
|
|
7845
|
-
/**
|
|
7846
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
7847
|
-
* shorthands.
|
|
7848
|
-
*
|
|
7849
|
-
* @private
|
|
7850
|
-
* @param {Array} [array] The array to iterate over.
|
|
7851
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
7852
|
-
* @returns {Array} Returns the new mapped array.
|
|
7853
|
-
*/
|
|
7854
|
-
|
|
7855
|
-
function arrayMap$1(array, iteratee) {
|
|
7856
|
-
var index = -1,
|
|
7857
|
-
length = array == null ? 0 : array.length,
|
|
7858
|
-
result = Array(length);
|
|
7859
|
-
|
|
7860
|
-
while (++index < length) {
|
|
7861
|
-
result[index] = iteratee(array[index], index, array);
|
|
7862
|
-
}
|
|
7863
|
-
return result;
|
|
7864
|
-
}
|
|
7865
|
-
|
|
7866
|
-
var _arrayMap = arrayMap$1;
|
|
7867
|
-
|
|
7868
|
-
/**
|
|
7869
|
-
* Checks if `value` is classified as an `Array` object.
|
|
7870
|
-
*
|
|
7871
|
-
* @static
|
|
7872
|
-
* @memberOf _
|
|
7873
|
-
* @since 0.1.0
|
|
7874
|
-
* @category Lang
|
|
7875
|
-
* @param {*} value The value to check.
|
|
7876
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
7877
|
-
* @example
|
|
7878
|
-
*
|
|
7879
|
-
* _.isArray([1, 2, 3]);
|
|
7880
|
-
* // => true
|
|
7881
|
-
*
|
|
7882
|
-
* _.isArray(document.body.children);
|
|
7883
|
-
* // => false
|
|
7884
|
-
*
|
|
7885
|
-
* _.isArray('abc');
|
|
7886
|
-
* // => false
|
|
7887
|
-
*
|
|
7888
|
-
* _.isArray(_.noop);
|
|
7889
|
-
* // => false
|
|
7890
|
-
*/
|
|
7891
|
-
|
|
7892
|
-
var isArray$1 = Array.isArray;
|
|
7893
|
-
|
|
7894
|
-
var isArray_1 = isArray$1;
|
|
7895
|
-
|
|
7896
|
-
var Symbol$3 = _Symbol;
|
|
7897
|
-
|
|
7898
|
-
/** Used for built-in method references. */
|
|
7899
|
-
var objectProto$1 = Object.prototype;
|
|
7900
|
-
|
|
7901
|
-
/** Used to check objects for own properties. */
|
|
7902
|
-
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
7903
|
-
|
|
7904
|
-
/**
|
|
7905
|
-
* Used to resolve the
|
|
7906
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
7907
|
-
* of values.
|
|
7908
|
-
*/
|
|
7909
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
7910
|
-
|
|
7911
|
-
/** Built-in value references. */
|
|
7912
|
-
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : undefined;
|
|
7913
|
-
|
|
7914
|
-
/**
|
|
7915
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
7916
|
-
*
|
|
7917
|
-
* @private
|
|
7918
|
-
* @param {*} value The value to query.
|
|
7919
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
7920
|
-
*/
|
|
7921
|
-
function getRawTag$1(value) {
|
|
7922
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag$1),
|
|
7923
|
-
tag = value[symToStringTag$1];
|
|
7924
|
-
|
|
7925
|
-
try {
|
|
7926
|
-
value[symToStringTag$1] = undefined;
|
|
7927
|
-
var unmasked = true;
|
|
7928
|
-
} catch (e) {}
|
|
7929
|
-
|
|
7930
|
-
var result = nativeObjectToString$1.call(value);
|
|
7931
|
-
if (unmasked) {
|
|
7932
|
-
if (isOwn) {
|
|
7933
|
-
value[symToStringTag$1] = tag;
|
|
7934
|
-
} else {
|
|
7935
|
-
delete value[symToStringTag$1];
|
|
7936
|
-
}
|
|
7937
|
-
}
|
|
7938
|
-
return result;
|
|
7939
|
-
}
|
|
7940
|
-
|
|
7941
|
-
var _getRawTag = getRawTag$1;
|
|
7942
|
-
|
|
7943
|
-
/** Used for built-in method references. */
|
|
7944
|
-
|
|
7945
|
-
var objectProto = Object.prototype;
|
|
7946
|
-
|
|
7947
|
-
/**
|
|
7948
|
-
* Used to resolve the
|
|
7949
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
7950
|
-
* of values.
|
|
7951
|
-
*/
|
|
7952
|
-
var nativeObjectToString = objectProto.toString;
|
|
7953
|
-
|
|
7954
|
-
/**
|
|
7955
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
7956
|
-
*
|
|
7957
|
-
* @private
|
|
7958
|
-
* @param {*} value The value to convert.
|
|
7959
|
-
* @returns {string} Returns the converted string.
|
|
7960
|
-
*/
|
|
7961
|
-
function objectToString$1(value) {
|
|
7962
|
-
return nativeObjectToString.call(value);
|
|
7963
|
-
}
|
|
7964
|
-
|
|
7965
|
-
var _objectToString = objectToString$1;
|
|
7966
|
-
|
|
7967
|
-
var Symbol$2 = _Symbol,
|
|
7968
|
-
getRawTag = _getRawTag,
|
|
7969
|
-
objectToString = _objectToString;
|
|
7970
|
-
|
|
7971
|
-
/** `Object#toString` result references. */
|
|
7972
|
-
var nullTag = '[object Null]',
|
|
7973
|
-
undefinedTag = '[object Undefined]';
|
|
7974
|
-
|
|
7975
|
-
/** Built-in value references. */
|
|
7976
|
-
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
7977
|
-
|
|
7978
|
-
/**
|
|
7979
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
7980
|
-
*
|
|
7981
|
-
* @private
|
|
7982
|
-
* @param {*} value The value to query.
|
|
7983
|
-
* @returns {string} Returns the `toStringTag`.
|
|
7984
|
-
*/
|
|
7985
|
-
function baseGetTag$1(value) {
|
|
7986
|
-
if (value == null) {
|
|
7987
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
7988
|
-
}
|
|
7989
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
7990
|
-
? getRawTag(value)
|
|
7991
|
-
: objectToString(value);
|
|
7992
|
-
}
|
|
7993
|
-
|
|
7994
|
-
var _baseGetTag = baseGetTag$1;
|
|
7995
|
-
|
|
7996
|
-
/**
|
|
7997
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
7998
|
-
* and has a `typeof` result of "object".
|
|
7999
|
-
*
|
|
8000
|
-
* @static
|
|
8001
|
-
* @memberOf _
|
|
8002
|
-
* @since 4.0.0
|
|
8003
|
-
* @category Lang
|
|
8004
|
-
* @param {*} value The value to check.
|
|
8005
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
8006
|
-
* @example
|
|
8007
|
-
*
|
|
8008
|
-
* _.isObjectLike({});
|
|
8009
|
-
* // => true
|
|
8010
|
-
*
|
|
8011
|
-
* _.isObjectLike([1, 2, 3]);
|
|
8012
|
-
* // => true
|
|
8013
|
-
*
|
|
8014
|
-
* _.isObjectLike(_.noop);
|
|
8015
|
-
* // => false
|
|
8016
|
-
*
|
|
8017
|
-
* _.isObjectLike(null);
|
|
8018
|
-
* // => false
|
|
8019
|
-
*/
|
|
8020
|
-
|
|
8021
|
-
function isObjectLike$1(value) {
|
|
8022
|
-
return value != null && typeof value == 'object';
|
|
8023
|
-
}
|
|
8024
|
-
|
|
8025
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
8026
|
-
|
|
8027
|
-
var baseGetTag = _baseGetTag,
|
|
8028
|
-
isObjectLike = isObjectLike_1;
|
|
8029
|
-
|
|
8030
|
-
/** `Object#toString` result references. */
|
|
8031
|
-
var symbolTag = '[object Symbol]';
|
|
8032
|
-
|
|
8033
|
-
/**
|
|
8034
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
8035
|
-
*
|
|
8036
|
-
* @static
|
|
8037
|
-
* @memberOf _
|
|
8038
|
-
* @since 4.0.0
|
|
8039
|
-
* @category Lang
|
|
8040
|
-
* @param {*} value The value to check.
|
|
8041
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
8042
|
-
* @example
|
|
8043
|
-
*
|
|
8044
|
-
* _.isSymbol(Symbol.iterator);
|
|
8045
|
-
* // => true
|
|
8046
|
-
*
|
|
8047
|
-
* _.isSymbol('abc');
|
|
8048
|
-
* // => false
|
|
8049
|
-
*/
|
|
8050
|
-
function isSymbol$1(value) {
|
|
8051
|
-
return typeof value == 'symbol' ||
|
|
8052
|
-
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
8053
|
-
}
|
|
8054
|
-
|
|
8055
|
-
var isSymbol_1 = isSymbol$1;
|
|
8056
|
-
|
|
8057
|
-
var Symbol$1 = _Symbol,
|
|
8058
|
-
arrayMap = _arrayMap,
|
|
8059
|
-
isArray = isArray_1,
|
|
8060
|
-
isSymbol = isSymbol_1;
|
|
8061
|
-
|
|
8062
|
-
/** Used as references for various `Number` constants. */
|
|
8063
|
-
var INFINITY = 1 / 0;
|
|
8064
|
-
|
|
8065
|
-
/** Used to convert symbols to primitives and strings. */
|
|
8066
|
-
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
|
|
8067
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
8068
|
-
|
|
8069
|
-
/**
|
|
8070
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
8071
|
-
* values to empty strings.
|
|
8072
|
-
*
|
|
8073
|
-
* @private
|
|
8074
|
-
* @param {*} value The value to process.
|
|
8075
|
-
* @returns {string} Returns the string.
|
|
8076
|
-
*/
|
|
8077
|
-
function baseToString$1(value) {
|
|
8078
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
8079
|
-
if (typeof value == 'string') {
|
|
8080
|
-
return value;
|
|
8081
|
-
}
|
|
8082
|
-
if (isArray(value)) {
|
|
8083
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
8084
|
-
return arrayMap(value, baseToString$1) + '';
|
|
8085
|
-
}
|
|
8086
|
-
if (isSymbol(value)) {
|
|
8087
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
8088
|
-
}
|
|
8089
|
-
var result = (value + '');
|
|
8090
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
8091
|
-
}
|
|
8092
|
-
|
|
8093
|
-
var _baseToString = baseToString$1;
|
|
8094
|
-
|
|
8095
|
-
var baseToString = _baseToString;
|
|
8096
|
-
|
|
8097
|
-
/**
|
|
8098
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
8099
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
8100
|
-
*
|
|
8101
|
-
* @static
|
|
8102
|
-
* @memberOf _
|
|
8103
|
-
* @since 4.0.0
|
|
8104
|
-
* @category Lang
|
|
8105
|
-
* @param {*} value The value to convert.
|
|
8106
|
-
* @returns {string} Returns the converted string.
|
|
8107
|
-
* @example
|
|
8108
|
-
*
|
|
8109
|
-
* _.toString(null);
|
|
8110
|
-
* // => ''
|
|
8111
|
-
*
|
|
8112
|
-
* _.toString(-0);
|
|
8113
|
-
* // => '-0'
|
|
8114
|
-
*
|
|
8115
|
-
* _.toString([1, 2, 3]);
|
|
8116
|
-
* // => '1,2,3'
|
|
8117
|
-
*/
|
|
8118
|
-
function toString$1(value) {
|
|
8119
|
-
return value == null ? '' : baseToString(value);
|
|
8120
|
-
}
|
|
8121
|
-
|
|
8122
|
-
var toString_1 = toString$1;
|
|
8123
|
-
|
|
8124
|
-
var toString = toString_1;
|
|
8125
|
-
|
|
8126
|
-
/** Used to generate unique IDs. */
|
|
8127
|
-
var idCounter$1 = 0;
|
|
8128
|
-
|
|
8129
|
-
/**
|
|
8130
|
-
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
|
8131
|
-
*
|
|
8132
|
-
* @static
|
|
8133
|
-
* @since 0.1.0
|
|
8134
|
-
* @memberOf _
|
|
8135
|
-
* @category Util
|
|
8136
|
-
* @param {string} [prefix=''] The value to prefix the ID with.
|
|
8137
|
-
* @returns {string} Returns the unique ID.
|
|
8138
|
-
* @example
|
|
8139
|
-
*
|
|
8140
|
-
* _.uniqueId('contact_');
|
|
8141
|
-
* // => 'contact_104'
|
|
8142
|
-
*
|
|
8143
|
-
* _.uniqueId();
|
|
8144
|
-
* // => '105'
|
|
8145
|
-
*/
|
|
8146
|
-
function uniqueId(prefix) {
|
|
8147
|
-
var id = ++idCounter$1;
|
|
8148
|
-
return toString(prefix) + id;
|
|
8149
|
-
}
|
|
8150
|
-
|
|
8151
|
-
var uniqueId_1 = uniqueId;
|
|
8152
|
-
|
|
8153
7833
|
var Accordion$1 = /*#__PURE__*/React.forwardRef(function Accordion(_a, ref) {
|
|
8154
7834
|
var _a$headerLevel = _a.headerLevel,
|
|
8155
7835
|
headerLevel = _a$headerLevel === void 0 ? 'h2' : _a$headerLevel,
|
|
8156
7836
|
_a$chevronPosition = _a.chevronPosition,
|
|
8157
7837
|
chevronPosition = _a$chevronPosition === void 0 ? 'left' : _a$chevronPosition,
|
|
8158
7838
|
children = _a.children,
|
|
8159
|
-
|
|
7839
|
+
id = _a.id,
|
|
7840
|
+
props = __rest(_a, ["headerLevel", "chevronPosition", "children", "id"]);
|
|
8160
7841
|
|
|
8161
|
-
var accordionId =
|
|
8162
|
-
return uniqueId_1('accordion-');
|
|
8163
|
-
}, []);
|
|
7842
|
+
var accordionId = useId(id, 'accordion');
|
|
8164
7843
|
var AccordionItems = React.Children.map(children, function (child, index) {
|
|
8165
7844
|
if (!child) return null;
|
|
8166
7845
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -8342,6 +8021,7 @@ var typography$c = tokens$6.typography.ui.accordion_header,
|
|
|
8342
8021
|
disabledIconColor$1 = _tokens$colors$intera$b.disabled__fill.rgba,
|
|
8343
8022
|
disabledColor$2 = _tokens$colors$intera$b.disabled__text.rgba,
|
|
8344
8023
|
focusOutlineColor$6 = _tokens$colors$intera$b.focus.rgba,
|
|
8024
|
+
defaultIconColor = _tokens$colors$d.text.static_icons__default.rgba,
|
|
8345
8025
|
mediumSpacing = tokens$6.spacings.comfortable.medium;
|
|
8346
8026
|
var accordion = {
|
|
8347
8027
|
border: {
|
|
@@ -8399,6 +8079,11 @@ var accordion = {
|
|
|
8399
8079
|
right: mediumSpacing,
|
|
8400
8080
|
top: mediumSpacing
|
|
8401
8081
|
}
|
|
8082
|
+
},
|
|
8083
|
+
icon: {
|
|
8084
|
+
typography: {
|
|
8085
|
+
color: defaultIconColor
|
|
8086
|
+
}
|
|
8402
8087
|
}
|
|
8403
8088
|
}
|
|
8404
8089
|
};
|
|
@@ -8429,7 +8114,8 @@ var AccordionHeaderTitle = /*#__PURE__*/React.forwardRef(function AccordionHeade
|
|
|
8429
8114
|
|
|
8430
8115
|
var _tokens$entities$6 = accordion.entities,
|
|
8431
8116
|
header$2 = _tokens$entities$6.header,
|
|
8432
|
-
chevronToken = _tokens$entities$6.chevron
|
|
8117
|
+
chevronToken = _tokens$entities$6.chevron,
|
|
8118
|
+
iconToken = _tokens$entities$6.icon;
|
|
8433
8119
|
var StyledAccordionHeader = styled__default['default'].div.attrs(function (_ref) {
|
|
8434
8120
|
var panelId = _ref.panelId,
|
|
8435
8121
|
isExpanded = _ref.isExpanded,
|
|
@@ -8445,7 +8131,7 @@ var StyledAccordionHeader = styled__default['default'].div.attrs(function (_ref)
|
|
|
8445
8131
|
}).withConfig({
|
|
8446
8132
|
displayName: "AccordionHeader__StyledAccordionHeader",
|
|
8447
8133
|
componentId: "sc-cu2e95-0"
|
|
8448
|
-
})(["", " ", " ", " &[data-focus-visible-added]:focus{", "}border-top:", ";background:", ";height:", ";margin:0;display:flex;align-items:center;box-sizing:border-box;", ""], typographyTemplate(header$2.typography), bordersTemplate(accordion.border), spacingsTemplate(header$2.spacings), outlineTemplate(header$2.states.focus.outline), function (_ref2) {
|
|
8134
|
+
})(["", " ", " ", " &[data-focus-visible-added]:focus{", "}border-top:", ";background:", ";height:", ";margin:0;display:flex;align-items:center;box-sizing:border-box;", " > svg{color:", ";}"], typographyTemplate(header$2.typography), bordersTemplate(accordion.border), spacingsTemplate(header$2.spacings), outlineTemplate(header$2.states.focus.outline), function (_ref2) {
|
|
8449
8135
|
var parentIndex = _ref2.parentIndex;
|
|
8450
8136
|
return parentIndex === 0 ? null : 'none';
|
|
8451
8137
|
}, header$2.background, header$2.height, function (_ref3) {
|
|
@@ -8456,11 +8142,13 @@ var StyledAccordionHeader = styled__default['default'].div.attrs(function (_ref)
|
|
|
8456
8142
|
}) : styled.css({
|
|
8457
8143
|
color: header$2.typography.color,
|
|
8458
8144
|
cursor: 'pointer',
|
|
8459
|
-
':hover': {
|
|
8460
|
-
|
|
8145
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
8146
|
+
':hover': {
|
|
8147
|
+
background: header$2.states.hover.background
|
|
8148
|
+
}
|
|
8461
8149
|
}
|
|
8462
8150
|
});
|
|
8463
|
-
});
|
|
8151
|
+
}, iconToken.typography.color);
|
|
8464
8152
|
var StyledIcon$1 = styled__default['default'](Icon$1).withConfig({
|
|
8465
8153
|
displayName: "AccordionHeader__StyledIcon",
|
|
8466
8154
|
componentId: "sc-cu2e95-1"
|
|
@@ -8612,11 +8300,10 @@ var Tabs$1 = /*#__PURE__*/React.forwardRef(function Tabs(_a, ref) {
|
|
|
8612
8300
|
onFocus = _a.onFocus,
|
|
8613
8301
|
_a$variant = _a.variant,
|
|
8614
8302
|
variant = _a$variant === void 0 ? 'minWidth' : _a$variant,
|
|
8615
|
-
|
|
8303
|
+
id = _a.id,
|
|
8304
|
+
props = __rest(_a, ["activeTab", "onChange", "onBlur", "onFocus", "variant", "id"]);
|
|
8616
8305
|
|
|
8617
|
-
var tabsId =
|
|
8618
|
-
return uniqueId_1('tabs-');
|
|
8619
|
-
}, []);
|
|
8306
|
+
var tabsId = useId(id, 'tabs');
|
|
8620
8307
|
|
|
8621
8308
|
var _useState = React.useState(false),
|
|
8622
8309
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -8869,7 +8556,7 @@ var StyledTab = styled__default['default'].button.attrs(function (_ref) {
|
|
|
8869
8556
|
}).withConfig({
|
|
8870
8557
|
displayName: "Tab__StyledTab",
|
|
8871
8558
|
componentId: "sc-scjkct-0"
|
|
8872
|
-
})(["appearance:none;box-sizing:border-box;font-family:inherit;border:none;outline:none;font-size:1rem;height:", ";", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}&[data-hover],&:hover{color:", ";", "}", " ", ""], tab.height, spacingsTemplate(tab.spacings), function (_ref2) {
|
|
8559
|
+
})(["appearance:none;box-sizing:border-box;font-family:inherit;border:none;outline:none;font-size:1rem;height:", ";", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}@media (hover:hover) and (pointer:fine){&[data-hover],&:hover{color:", ";", "}}", " ", ""], tab.height, spacingsTemplate(tab.spacings), function (_ref2) {
|
|
8873
8560
|
var active = _ref2.active;
|
|
8874
8561
|
return active ? tab.states.active.typography.color : tab.typography.color;
|
|
8875
8562
|
}, tab.background, outlineTemplate(tab.states.focus.outline), function (_ref3) {
|
|
@@ -9396,8 +9083,8 @@ Dialog.CustomContent.displayName = 'Dialog.CustomContent';
|
|
|
9396
9083
|
|
|
9397
9084
|
var background$a = tokens$6.colors.ui.background__scrim.rgba;
|
|
9398
9085
|
var scrim = {
|
|
9399
|
-
width: '
|
|
9400
|
-
height: '
|
|
9086
|
+
width: '100%',
|
|
9087
|
+
height: '100%',
|
|
9401
9088
|
background: background$a
|
|
9402
9089
|
};
|
|
9403
9090
|
|
|
@@ -9423,6 +9110,8 @@ var Scrim = /*#__PURE__*/React.forwardRef(function Scrim(_a, ref) {
|
|
|
9423
9110
|
isDismissable: isDismissable,
|
|
9424
9111
|
ref: ref
|
|
9425
9112
|
});
|
|
9113
|
+
var overflowState = document.body.style.overflow;
|
|
9114
|
+
useHideBodyScroll(overflowState);
|
|
9426
9115
|
useGlobalKeyPress('Escape', function (e) {
|
|
9427
9116
|
if (isDismissable && onClose) {
|
|
9428
9117
|
onClose(e, false);
|
|
@@ -9571,7 +9260,7 @@ var TableOfContents$1 = /*#__PURE__*/React.forwardRef(function TableOfContents(_
|
|
|
9571
9260
|
var StyledLinkItem = styled__default['default'].li.withConfig({
|
|
9572
9261
|
displayName: "LinkItem__StyledLinkItem",
|
|
9573
9262
|
componentId: "sc-1tfuad4-0"
|
|
9574
|
-
})(["list-style:none;margin:0;padding:0;a{text-decoration:none;", " ", " height:", ";width:", ";display:block;position:relative;svg{fill:", ";margin-right:", ";vertical-align:text-bottom;}span{max-width:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:text-bottom;display:inline-block;}&:focus{", ";}&:hover{", " background:", ";", " svg{fill:", ";}}&:active{outline:none;}}"], typographyTemplate(tableOfContents.entities.links.typography), spacingsTemplate(tableOfContents.entities.links.spacings), tableOfContents.entities.links.typography.lineHeight, tableOfContents.entities.links.width, tableOfContents.entities.icon.background, tableOfContents.entities.icon.spacings.right, tableOfContents.entities.span.maxWidth, outlineTemplate(tableOfContents.states.focus.outline), typographyTemplate(tableOfContents.states.hover.typography), tableOfContents.states.hover.background, bordersTemplate(tableOfContents.states.hover.border), tableOfContents.states.hover.entities.icon.background);
|
|
9263
|
+
})(["list-style:none;margin:0;padding:0;a{text-decoration:none;", " ", " height:", ";width:", ";display:block;position:relative;svg{fill:", ";margin-right:", ";vertical-align:text-bottom;}span{max-width:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:text-bottom;display:inline-block;}&:focus{", ";}@media (hover:hover) and (pointer:fine){&:hover{", " background:", ";", " svg{fill:", ";}}}&:active{outline:none;}}"], typographyTemplate(tableOfContents.entities.links.typography), spacingsTemplate(tableOfContents.entities.links.spacings), tableOfContents.entities.links.typography.lineHeight, tableOfContents.entities.links.width, tableOfContents.entities.icon.background, tableOfContents.entities.icon.spacings.right, tableOfContents.entities.span.maxWidth, outlineTemplate(tableOfContents.states.focus.outline), typographyTemplate(tableOfContents.states.hover.typography), tableOfContents.states.hover.background, bordersTemplate(tableOfContents.states.hover.border), tableOfContents.states.hover.entities.icon.background);
|
|
9575
9264
|
var LinkItem = /*#__PURE__*/React.forwardRef(function LinkItem(_a, ref) {
|
|
9576
9265
|
var children = _a.children,
|
|
9577
9266
|
props = __rest(_a, ["children"]);
|
|
@@ -9817,9 +9506,9 @@ var StyledChips = styled__default['default'].div.attrs(function (_ref) {
|
|
|
9817
9506
|
}).withConfig({
|
|
9818
9507
|
displayName: "Chip__StyledChips",
|
|
9819
9508
|
componentId: "sc-wzsllq-0"
|
|
9820
|
-
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;z-index:10;svg{fill:", ";}&:hover{color:", ";svg{fill:", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background$6, height$1, typography$9.color, states$3.hover.typography.color, states$3.hover.typography.color, outlineTemplate(states$3.focus.outline), bordersTemplate(border$2), spacingsTemplate(spacings$2), typographyTemplate(typography$9), function (_ref2) {
|
|
9509
|
+
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;z-index:10;svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";svg{fill:", ";}}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background$6, height$1, typography$9.color, states$3.hover.typography.color, states$3.hover.typography.color, outlineTemplate(states$3.focus.outline), bordersTemplate(border$2), spacingsTemplate(spacings$2), typographyTemplate(typography$9), function (_ref2) {
|
|
9821
9510
|
var clickable = _ref2.clickable;
|
|
9822
|
-
return clickable && styled.css(["&:hover{cursor:pointer;}"]);
|
|
9511
|
+
return clickable && styled.css(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;}}"]);
|
|
9823
9512
|
}, function (_ref3) {
|
|
9824
9513
|
var variant = _ref3.variant;
|
|
9825
9514
|
|
|
@@ -9828,14 +9517,14 @@ var StyledChips = styled__default['default'].div.attrs(function (_ref) {
|
|
|
9828
9517
|
return styled.css(["background:", ";"], states$3.active.background);
|
|
9829
9518
|
|
|
9830
9519
|
case 'error':
|
|
9831
|
-
return styled.css(["background:", ";color:", ";svg{fill:", ";}", "
|
|
9520
|
+
return styled.css(["background:", ";color:", ";svg{fill:", ";}", ";@media (hover:hover) and (pointer:fine){&:hover{border-color:", ";color:", ";svg{fill:", ";}}}"], error.background, error.typography.color, error.entities.icon.typography.color, bordersTemplate(error.border), error.states.hover.typography.color, error.states.hover.typography.color, error.states.hover.typography.color);
|
|
9832
9521
|
|
|
9833
9522
|
default:
|
|
9834
9523
|
return '';
|
|
9835
9524
|
}
|
|
9836
9525
|
}, function (_ref4) {
|
|
9837
9526
|
var disabled = _ref4.disabled;
|
|
9838
|
-
return disabled && styled.css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}"], background$6, states$3.disabled.typography.color, states$3.disabled.typography.color, states$3.disabled.typography.color, states$3.disabled.typography.color);
|
|
9527
|
+
return disabled && styled.css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}}"], background$6, states$3.disabled.typography.color, states$3.disabled.typography.color, states$3.disabled.typography.color, states$3.disabled.typography.color);
|
|
9839
9528
|
}, function (_ref5) {
|
|
9840
9529
|
var deletable = _ref5.deletable;
|
|
9841
9530
|
return deletable && styled.css(["padding-right:4px;"]);
|
|
@@ -10056,7 +9745,7 @@ var Container$2 = styled__default['default'].span.withConfig({
|
|
|
10056
9745
|
return isFocused && styled.css(["", ""], bordersTemplate(states$2.focus.border));
|
|
10057
9746
|
}, placeholder.typography.color, function (_ref2) {
|
|
10058
9747
|
var disabled = _ref2.disabled;
|
|
10059
|
-
return disabled ? styled.css(["cursor:not-allowed;"]) : styled.css(["&:hover{", " cursor:text;}"], bordersTemplate(states$2.focus.border));
|
|
9748
|
+
return disabled ? styled.css(["cursor:not-allowed;"]) : styled.css(["@media (hover:hover) and (pointer:fine){&:hover{", " cursor:text;}}"], bordersTemplate(states$2.focus.border));
|
|
10060
9749
|
}, clickbound.offset, clickbound.height);
|
|
10061
9750
|
var Input$4 = styled__default['default'].input.withConfig({
|
|
10062
9751
|
displayName: "Search__Input",
|
|
@@ -10070,7 +9759,7 @@ var InsideButton = styled__default['default'].div.withConfig({
|
|
|
10070
9759
|
componentId: "sc-v8l23u-2"
|
|
10071
9760
|
})(["", " display:flex;align-items:center;visibility:hidden;z-index:1;padding:4px;height:16px;width:16px;position:relative;&::after{z-index:-1;position:absolute;top:-", ";left:0;width:100%;height:", ";content:'';}&::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}", ""], bordersTemplate(icon$1.border), icon$1.clickbound.offset.top, icon$1.clickbound.height, function (_ref4) {
|
|
10072
9761
|
var isActive = _ref4.isActive;
|
|
10073
|
-
return isActive && styled.css(["visibility:visible
|
|
9762
|
+
return isActive && styled.css(["visibility:visible;@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;background:", ";}}"], icon$1.states.hover.background);
|
|
10074
9763
|
});
|
|
10075
9764
|
var Search = /*#__PURE__*/React.forwardRef(function Search(_a, ref) {
|
|
10076
9765
|
var _onChange = _a.onChange,
|
|
@@ -10376,8 +10065,8 @@ var handle$1 = slider.entities.handle,
|
|
|
10376
10065
|
_disabled = slider.states.disabled;
|
|
10377
10066
|
var track$1 = styled.css(["width:100%;height:100%;cursor:pointer;background:none;"]);
|
|
10378
10067
|
var thumb = styled.css(["", " height:", ";width:", ";background:", ";cursor:pointer;position:relative;z-index:1;"], bordersTemplate(handle$1.border), handle$1.height, handle$1.width, handle$1.background);
|
|
10379
|
-
var thumbHover = styled.css(["box-shadow:0px 0px 0px 6px ", ";border-color:", ";"], handle$1.states.hover.background, handle$1.states.hover.border.color);
|
|
10380
|
-
var thumbHoverAndDisabled = styled.css(["cursor:not-allowed;box-shadow:none;"]);
|
|
10068
|
+
var thumbHover = styled.css(["@media (hover:hover) and (pointer:fine){box-shadow:0px 0px 0px 6px ", ";border-color:", ";}"], handle$1.states.hover.background, handle$1.states.hover.border.color);
|
|
10069
|
+
var thumbHoverAndDisabled = styled.css(["@media (hover:hover) and (pointer:fine){cursor:not-allowed;box-shadow:none;}"]);
|
|
10381
10070
|
var thumbDisabled = styled.css(["background-color:", ";border-color:", ";"], _disabled.background, _disabled.border.color);
|
|
10382
10071
|
var StyledSliderInput = styled__default['default'].input.attrs(function () {
|
|
10383
10072
|
return {
|
|
@@ -10433,7 +10122,7 @@ var wrapperGrid = styled.css(["display:grid;grid-template-rows:max-content 24px;
|
|
|
10433
10122
|
var RangeWrapper = styled__default['default'].div.withConfig({
|
|
10434
10123
|
displayName: "Slider__RangeWrapper",
|
|
10435
10124
|
componentId: "sc-n1grrg-0"
|
|
10436
|
-
})(["--a:", ";--b:", ";--min:", ";--max:", ";--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::before,&::after{", " background:", ";}&::before{margin-left:calc( calc(", " / 2) + (var(--a) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--b) - var(--a)) / var(--dif) * var(--realWidth));}&::after{margin-left:calc( calc(", " / 2) + (var(--b) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--a) - var(--b)) / var(--dif) * var(--realWidth));}&:hover:not([disabled]){", " &::before,&::after{background:", ";}}"], function (_ref) {
|
|
10125
|
+
})(["--a:", ";--b:", ";--min:", ";--max:", ";--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::before,&::after{", " background:", ";}&::before{margin-left:calc( calc(", " / 2) + (var(--a) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--b) - var(--a)) / var(--dif) * var(--realWidth));}&::after{margin-left:calc( calc(", " / 2) + (var(--b) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--a) - var(--b)) / var(--dif) * var(--realWidth));}@media (hover:hover) and (pointer:fine){&:hover:not([disabled]){", " &::before,&::after{background:", ";}}}"], function (_ref) {
|
|
10437
10126
|
var valA = _ref.valA;
|
|
10438
10127
|
return valA;
|
|
10439
10128
|
}, function (_ref2) {
|
|
@@ -10449,10 +10138,10 @@ var RangeWrapper = styled__default['default'].div.withConfig({
|
|
|
10449
10138
|
var disabled = _ref5.disabled;
|
|
10450
10139
|
return disabled ? track.entities.indicator.states.disabled.background : track.entities.indicator.background;
|
|
10451
10140
|
}, handle.width, handle.width, fakeTrackBgHover, track.entities.indicator.states.hover.background);
|
|
10452
|
-
var Wrapper
|
|
10141
|
+
var Wrapper = styled__default['default'].div.withConfig({
|
|
10453
10142
|
displayName: "Slider__Wrapper",
|
|
10454
10143
|
componentId: "sc-n1grrg-1"
|
|
10455
|
-
})(["--min:", ";--max:", ";--dif:calc(var(--max) - var(--min));--value:", ";--realWidth:calc(100% - 12px);", " ", " &::after{", " background:", "}&::after{margin-right:calc( (var(--max) - var(--value)) / var(--dif) * var(--realWidth) );margin-left:3px;}&:hover:not([disabled]){", " &::after{background:", ";}}"], function (_ref6) {
|
|
10144
|
+
})(["--min:", ";--max:", ";--dif:calc(var(--max) - var(--min));--value:", ";--realWidth:calc(100% - 12px);", " ", " &::after{", " background:", "}&::after{margin-right:calc( (var(--max) - var(--value)) / var(--dif) * var(--realWidth) );margin-left:3px;}@media (hover:hover) and (pointer:fine){&:hover:not([disabled]){", " &::after{background:", ";}}}"], function (_ref6) {
|
|
10456
10145
|
var min = _ref6.min;
|
|
10457
10146
|
return min;
|
|
10458
10147
|
}, function (_ref7) {
|
|
@@ -10509,7 +10198,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(_a, ref) {
|
|
|
10509
10198
|
|
|
10510
10199
|
var onValueChange = function onValueChange(event, valueArrIdx) {
|
|
10511
10200
|
var target = event.target;
|
|
10512
|
-
var changedValue =
|
|
10201
|
+
var changedValue = parseFloat(target.value);
|
|
10513
10202
|
|
|
10514
10203
|
if (isRangeSlider) {
|
|
10515
10204
|
var newValue = sliderValue.slice();
|
|
@@ -10562,8 +10251,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(_a, ref) {
|
|
|
10562
10251
|
var maxValue = maxRange.current.value;
|
|
10563
10252
|
var diff = max - min;
|
|
10564
10253
|
var normX = x / inputWidth * diff + min;
|
|
10565
|
-
var maxX = Math.abs(normX -
|
|
10566
|
-
var minX = Math.abs(normX -
|
|
10254
|
+
var maxX = Math.abs(normX - parseFloat(maxValue));
|
|
10255
|
+
var minX = Math.abs(normX - parseFloat(minValue));
|
|
10567
10256
|
|
|
10568
10257
|
if (minX > maxX) {
|
|
10569
10258
|
minRange.current.style.zIndex = '10';
|
|
@@ -10648,7 +10337,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(_a, ref) {
|
|
|
10648
10337
|
}), void 0), minMaxValues && jsxRuntime.exports.jsx(MinMax, {
|
|
10649
10338
|
children: getFormattedText(max)
|
|
10650
10339
|
}, void 0)]
|
|
10651
|
-
}), void 0) : jsxRuntime.exports.jsxs(Wrapper
|
|
10340
|
+
}), void 0) : jsxRuntime.exports.jsxs(Wrapper, Object.assign({}, rest, {
|
|
10652
10341
|
ref: ref,
|
|
10653
10342
|
max: max,
|
|
10654
10343
|
min: min,
|
|
@@ -11719,7 +11408,7 @@ var Separator = styled__default['default'](Typography).withConfig({
|
|
|
11719
11408
|
var Collapsed = styled__default['default'](Typography).withConfig({
|
|
11720
11409
|
displayName: "Breadcrumbs__Collapsed",
|
|
11721
11410
|
componentId: "sc-12awlbz-3"
|
|
11722
|
-
})(["&:hover{text-decoration:underline;color:", ";}color:", ";text-decoration:none;"], states$1.hover.typography.color, typography$5.color);
|
|
11411
|
+
})(["@media (hover:hover) and (pointer:fine){&:hover{text-decoration:underline;color:", ";}}color:", ";text-decoration:none;"], states$1.hover.typography.color, typography$5.color);
|
|
11723
11412
|
var Breadcrumbs$1 = /*#__PURE__*/React.forwardRef(function Breadcrumbs(_a, ref) {
|
|
11724
11413
|
var children = _a.children,
|
|
11725
11414
|
collapse = _a.collapse,
|
|
@@ -11803,7 +11492,7 @@ var states = breadcrumbs.states,
|
|
|
11803
11492
|
var StyledTypography = styled__default['default'](Typography).withConfig({
|
|
11804
11493
|
displayName: "Breadcrumb__StyledTypography",
|
|
11805
11494
|
componentId: "sc-10nvwte-0"
|
|
11806
|
-
})(["&:hover{text-decoration:underline;color:", ";cursor:pointer;}white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;text-decoration:none;color:", ";", ""], states.hover.typography.color, typography$4.color, function (_ref) {
|
|
11495
|
+
})(["@media (hover:hover) and (pointer:fine){&:hover{text-decoration:underline;color:", ";cursor:pointer;}}white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;text-decoration:none;color:", ";", ""], states.hover.typography.color, typography$4.color, function (_ref) {
|
|
11807
11496
|
var maxWidth = _ref.maxWidth;
|
|
11808
11497
|
return styled.css({
|
|
11809
11498
|
maxWidth: maxWidth
|
|
@@ -11816,6 +11505,7 @@ var Breadcrumb = /*#__PURE__*/React.forwardRef(function Breadcrumb(_a, ref) {
|
|
|
11816
11505
|
other = __rest(_a, ["children", "maxWidth", "href"]);
|
|
11817
11506
|
|
|
11818
11507
|
var props = Object.assign(Object.assign({}, other), {
|
|
11508
|
+
href: href,
|
|
11819
11509
|
ref: ref,
|
|
11820
11510
|
maxWidth: maxWidth
|
|
11821
11511
|
});
|
|
@@ -12013,7 +11703,7 @@ var ListItem$2 = styled__default['default'].li.attrs(function (_ref) {
|
|
|
12013
11703
|
return active && styled.css(["background:", ";*{color:", ";}"], activeToken.background, activeToken.typography.color);
|
|
12014
11704
|
}, function (_ref4) {
|
|
12015
11705
|
var disabled = _ref4.disabled;
|
|
12016
|
-
return disabled ? styled.css(["*{color:", ";}svg{fill:", ";}&:focus{outline:none;}&:hover{cursor:not-allowed;}"], disabledToken.typography.color, icon.states.disabled.typography.color) : styled.css(["&:hover{z-index:1;cursor:pointer;background:", ";}&:focus{", "}"], hover.background, outlineTemplate(focus.outline));
|
|
11706
|
+
return disabled ? styled.css(["*{color:", ";}svg{fill:", ";}&:focus{outline:none;}@media (hover:hover) and (pointer:fine){&:hover{cursor:not-allowed;}}"], disabledToken.typography.color, icon.states.disabled.typography.color) : styled.css(["@media (hover:hover) and (pointer:fine){&:hover{z-index:1;cursor:pointer;background:", ";}}&:focus{", "}"], hover.background, outlineTemplate(focus.outline));
|
|
12017
11707
|
});
|
|
12018
11708
|
var Content = styled__default['default'].div.withConfig({
|
|
12019
11709
|
displayName: "MenuItem__Content",
|
|
@@ -12097,18 +11787,16 @@ var MenuSection = /*#__PURE__*/React__namespace.memo(function MenuSection(props)
|
|
|
12097
11787
|
}, void 0);
|
|
12098
11788
|
});
|
|
12099
11789
|
|
|
12100
|
-
var isFragment = function isFragment(object) {
|
|
12101
|
-
if (object.type) {
|
|
12102
|
-
return object.type === React.Fragment;
|
|
12103
|
-
}
|
|
12104
|
-
|
|
12105
|
-
return object === React.Fragment;
|
|
12106
|
-
};
|
|
12107
|
-
|
|
12108
11790
|
var List = styled__default['default'].ul.withConfig({
|
|
12109
11791
|
displayName: "MenuList__List",
|
|
12110
11792
|
componentId: "sc-104rzof-0"
|
|
12111
11793
|
})(["position:relative;list-style:none;margin:0;", " li:first-child{z-index:3;}"], spacingsTemplate(menu.spacings));
|
|
11794
|
+
|
|
11795
|
+
function isIndexable(item) {
|
|
11796
|
+
if ( /*#__PURE__*/React.isValidElement(item) && !item.props.disabled && item.type === MenuItem) return true;
|
|
11797
|
+
return false;
|
|
11798
|
+
}
|
|
11799
|
+
|
|
12112
11800
|
var MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_a, ref) {
|
|
12113
11801
|
var children = _a.children,
|
|
12114
11802
|
focus = _a.focus,
|
|
@@ -12118,19 +11806,30 @@ var MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_a, ref) {
|
|
|
12118
11806
|
focusedIndex = _useMenu.focusedIndex,
|
|
12119
11807
|
setFocusedIndex = _useMenu.setFocusedIndex;
|
|
12120
11808
|
|
|
12121
|
-
var
|
|
12122
|
-
var
|
|
12123
|
-
return
|
|
12124
|
-
|
|
11809
|
+
var index = -1;
|
|
11810
|
+
var focusableIndexs = React.useMemo(function () {
|
|
11811
|
+
return [];
|
|
11812
|
+
}, []);
|
|
11813
|
+
var updatedChildren = React.useMemo(function () {
|
|
11814
|
+
return React.Children.map(children, function (child) {
|
|
11815
|
+
if (child.type === MenuSection) {
|
|
11816
|
+
var updatedGrandChildren = React.Children.map(child.props.children, function (grandChild) {
|
|
11817
|
+
index++;
|
|
11818
|
+
if (isIndexable(grandChild)) focusableIndexs.push(index);
|
|
11819
|
+
return /*#__PURE__*/React.cloneElement(grandChild, {
|
|
11820
|
+
index: index
|
|
11821
|
+
});
|
|
11822
|
+
});
|
|
11823
|
+
return /*#__PURE__*/React.cloneElement(child, null, updatedGrandChildren);
|
|
11824
|
+
} else {
|
|
11825
|
+
index++;
|
|
11826
|
+
if (isIndexable(child)) focusableIndexs.push(index);
|
|
11827
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
11828
|
+
index: index
|
|
11829
|
+
});
|
|
11830
|
+
}
|
|
12125
11831
|
});
|
|
12126
|
-
});
|
|
12127
|
-
var focusableIndexs = (updatedChildren || []).filter(function (x) {
|
|
12128
|
-
return !x.props.disabled;
|
|
12129
|
-
}).filter(function (x) {
|
|
12130
|
-
return /*#__PURE__*/React.isValidElement(x) && (x.type === MenuSection || x.type === MenuItem);
|
|
12131
|
-
}).map(function (x) {
|
|
12132
|
-
return x.props.index;
|
|
12133
|
-
});
|
|
11832
|
+
}, [children, focusableIndexs, index]);
|
|
12134
11833
|
var firstFocusIndex = focusableIndexs[0];
|
|
12135
11834
|
var lastFocusIndex = focusableIndexs[focusableIndexs.length - 1];
|
|
12136
11835
|
React.useEffect(function () {
|
|
@@ -12157,10 +11856,12 @@ var MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_a, ref) {
|
|
|
12157
11856
|
event.stopPropagation();
|
|
12158
11857
|
|
|
12159
11858
|
if (key === 'ArrowDown') {
|
|
11859
|
+
event.preventDefault();
|
|
12160
11860
|
handleMenuItemChange('down', firstFocusIndex);
|
|
12161
11861
|
}
|
|
12162
11862
|
|
|
12163
11863
|
if (key === 'ArrowUp') {
|
|
11864
|
+
event.preventDefault();
|
|
12164
11865
|
handleMenuItemChange('up', lastFocusIndex);
|
|
12165
11866
|
}
|
|
12166
11867
|
};
|
|
@@ -12223,7 +11924,9 @@ var Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(_a, ref) {
|
|
|
12223
11924
|
open = _a.open,
|
|
12224
11925
|
_a$placement = _a.placement,
|
|
12225
11926
|
placement = _a$placement === void 0 ? 'auto' : _a$placement,
|
|
12226
|
-
|
|
11927
|
+
style = _a.style,
|
|
11928
|
+
className = _a.className,
|
|
11929
|
+
rest = __rest(_a, ["anchorEl", "open", "placement", "style", "className"]);
|
|
12227
11930
|
|
|
12228
11931
|
var _useState = React.useState(null),
|
|
12229
11932
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12237,7 +11940,7 @@ var Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(_a, ref) {
|
|
|
12237
11940
|
|
|
12238
11941
|
var token = useToken({
|
|
12239
11942
|
density: density
|
|
12240
|
-
}, menu)
|
|
11943
|
+
}, menu);
|
|
12241
11944
|
|
|
12242
11945
|
var _usePopper = usePopper(anchorEl, containerEl, null, placement, 4),
|
|
12243
11946
|
styles = _usePopper.styles,
|
|
@@ -12245,7 +11948,8 @@ var Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(_a, ref) {
|
|
|
12245
11948
|
|
|
12246
11949
|
var props = Object.assign({
|
|
12247
11950
|
open: open,
|
|
12248
|
-
style: styles.popper
|
|
11951
|
+
style: Object.assign(Object.assign({}, styles.popper), style),
|
|
11952
|
+
className: className
|
|
12249
11953
|
}, attributes.popper);
|
|
12250
11954
|
var menuProps = Object.assign(Object.assign({}, rest), {
|
|
12251
11955
|
anchorEl: anchorEl,
|
|
@@ -12442,7 +12146,15 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(_a, ref) {
|
|
|
12442
12146
|
}
|
|
12443
12147
|
};
|
|
12444
12148
|
|
|
12149
|
+
var isMounted = useIsMounted();
|
|
12445
12150
|
var items = PaginationControl(pages, activePage);
|
|
12151
|
+
React.useLayoutEffect(function () {
|
|
12152
|
+
if (isMounted) {
|
|
12153
|
+
setActivePage(1);
|
|
12154
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null, 1);
|
|
12155
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12156
|
+
|
|
12157
|
+
}, [itemsPerPage]);
|
|
12446
12158
|
var props = Object.assign({
|
|
12447
12159
|
ref: ref,
|
|
12448
12160
|
withItemIndicator: withItemIndicator
|
|
@@ -12599,7 +12311,7 @@ var NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(_a, ref)
|
|
|
12599
12311
|
|
|
12600
12312
|
var token = useToken({
|
|
12601
12313
|
density: density
|
|
12602
|
-
}, nativeselect)
|
|
12314
|
+
}, nativeselect);
|
|
12603
12315
|
var containerProps = {
|
|
12604
12316
|
ref: ref,
|
|
12605
12317
|
className: className
|
|
@@ -17641,7 +17353,7 @@ var SingleSelect = /*#__PURE__*/React.forwardRef(function SingleSelect(_a, ref)
|
|
|
17641
17353
|
|
|
17642
17354
|
var token = useToken({
|
|
17643
17355
|
density: density
|
|
17644
|
-
}, select)
|
|
17356
|
+
}, select);
|
|
17645
17357
|
React.useEffect(function () {
|
|
17646
17358
|
setInputItems(items);
|
|
17647
17359
|
}, [items]);
|
|
@@ -17760,7 +17472,10 @@ var _tokens$colors$intera$2 = tokens$6.colors.interactive,
|
|
|
17760
17472
|
labelTypography$2 = tokens$6.typography.navigation.menu_title,
|
|
17761
17473
|
_tokens$spacings$comf$1 = tokens$6.spacings.comfortable,
|
|
17762
17474
|
medium_small$2 = _tokens$spacings$comf$1.medium_small,
|
|
17763
|
-
x_small$1 = _tokens$spacings$comf$1.x_small
|
|
17475
|
+
x_small$1 = _tokens$spacings$comf$1.x_small,
|
|
17476
|
+
_tokens$clickbounds$1 = tokens$6.clickbounds,
|
|
17477
|
+
clicboundSize$1 = _tokens$clickbounds$1.default__base,
|
|
17478
|
+
compactClickboundSize$1 = _tokens$clickbounds$1.compact__standard;
|
|
17764
17479
|
var checkbox = {
|
|
17765
17480
|
background: primaryColor$1,
|
|
17766
17481
|
typography: labelTypography$2,
|
|
@@ -17770,6 +17485,9 @@ var checkbox = {
|
|
|
17770
17485
|
left: medium_small$2,
|
|
17771
17486
|
right: medium_small$2
|
|
17772
17487
|
},
|
|
17488
|
+
clickbound: {
|
|
17489
|
+
height: clicboundSize$1
|
|
17490
|
+
},
|
|
17773
17491
|
states: {
|
|
17774
17492
|
hover: {
|
|
17775
17493
|
background: primaryHoverAlt$2
|
|
@@ -17787,13 +17505,6 @@ var checkbox = {
|
|
|
17787
17505
|
}
|
|
17788
17506
|
}
|
|
17789
17507
|
},
|
|
17790
|
-
entities: {
|
|
17791
|
-
label: {
|
|
17792
|
-
spacings: {
|
|
17793
|
-
left: medium_small$2
|
|
17794
|
-
}
|
|
17795
|
-
}
|
|
17796
|
-
},
|
|
17797
17508
|
modes: {
|
|
17798
17509
|
compact: {
|
|
17799
17510
|
spacings: {
|
|
@@ -17802,6 +17513,9 @@ var checkbox = {
|
|
|
17802
17513
|
left: x_small$1,
|
|
17803
17514
|
right: x_small$1
|
|
17804
17515
|
},
|
|
17516
|
+
clickbound: {
|
|
17517
|
+
height: compactClickboundSize$1
|
|
17518
|
+
},
|
|
17805
17519
|
states: {
|
|
17806
17520
|
focus: {
|
|
17807
17521
|
outline: {
|
|
@@ -17837,14 +17551,21 @@ var Input$3 = styled__default['default'].input.attrs(function (_ref2) {
|
|
|
17837
17551
|
}).withConfig({
|
|
17838
17552
|
displayName: "Input",
|
|
17839
17553
|
componentId: "sc-rqj7qf-1"
|
|
17840
|
-
})(["
|
|
17841
|
-
var theme = _ref3.theme
|
|
17554
|
+
})(["--scale:", ";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{", "}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"], function (_ref3) {
|
|
17555
|
+
var theme = _ref3.theme,
|
|
17556
|
+
iconSize = _ref3.iconSize;
|
|
17557
|
+
return parseFloat(theme.clickbound.height) / iconSize;
|
|
17558
|
+
}, function (_ref4) {
|
|
17559
|
+
var disabled = _ref4.disabled;
|
|
17560
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
17561
|
+
}, function (_ref5) {
|
|
17562
|
+
var theme = _ref5.theme;
|
|
17842
17563
|
return outlineTemplate(theme.states.focus.outline);
|
|
17843
17564
|
});
|
|
17844
|
-
var Svg$1 = styled__default['default'].svg.attrs(function (
|
|
17845
|
-
var height =
|
|
17846
|
-
width =
|
|
17847
|
-
fill =
|
|
17565
|
+
var Svg$1 = styled__default['default'].svg.attrs(function (_ref6) {
|
|
17566
|
+
var height = _ref6.height,
|
|
17567
|
+
width = _ref6.width,
|
|
17568
|
+
fill = _ref6.fill;
|
|
17848
17569
|
return {
|
|
17849
17570
|
name: null,
|
|
17850
17571
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
@@ -17855,15 +17576,15 @@ var Svg$1 = styled__default['default'].svg.attrs(function (_ref4) {
|
|
|
17855
17576
|
}).withConfig({
|
|
17856
17577
|
displayName: "Input__Svg",
|
|
17857
17578
|
componentId: "sc-rqj7qf-2"
|
|
17858
|
-
})([""]);
|
|
17579
|
+
})(["grid-area:input;pointer-events:none;"]);
|
|
17859
17580
|
var InputWrapper$1 = styled__default['default'].span.withConfig({
|
|
17860
17581
|
displayName: "Input__InputWrapper",
|
|
17861
17582
|
componentId: "sc-rqj7qf-3"
|
|
17862
|
-
})(["display:inline-
|
|
17863
|
-
var theme =
|
|
17583
|
+
})(["display:inline-grid;grid:[input] 1fr / [input] 1fr;border-radius:50%;", " @media (hover:hover) and (pointer:fine){&:hover{background-color:", ";}}"], function (_ref7) {
|
|
17584
|
+
var theme = _ref7.theme;
|
|
17864
17585
|
return spacingsTemplate(theme.spacings);
|
|
17865
|
-
}, function (
|
|
17866
|
-
var disabled =
|
|
17586
|
+
}, function (_ref8) {
|
|
17587
|
+
var disabled = _ref8.disabled;
|
|
17867
17588
|
return disabled ? 'transparent' : checkbox.states.hover.background;
|
|
17868
17589
|
});
|
|
17869
17590
|
var CheckboxInput = /*#__PURE__*/React.forwardRef(function CheckboxInput(_a, ref) {
|
|
@@ -17877,7 +17598,7 @@ var CheckboxInput = /*#__PURE__*/React.forwardRef(function CheckboxInput(_a, ref
|
|
|
17877
17598
|
|
|
17878
17599
|
var token = useToken({
|
|
17879
17600
|
density: density
|
|
17880
|
-
}, checkbox)
|
|
17601
|
+
}, checkbox);
|
|
17881
17602
|
var iconSize = 24;
|
|
17882
17603
|
var fill = disabled ? checkbox.states.disabled.background : checkbox.background;
|
|
17883
17604
|
var inputWrapperProps = {
|
|
@@ -17891,7 +17612,9 @@ var CheckboxInput = /*#__PURE__*/React.forwardRef(function CheckboxInput(_a, ref
|
|
|
17891
17612
|
theme: token
|
|
17892
17613
|
}, {
|
|
17893
17614
|
children: jsxRuntime.exports.jsxs(InputWrapper$1, Object.assign({}, inputWrapperProps, {
|
|
17894
|
-
children: [jsxRuntime.exports.jsx(Input$3, Object.assign({
|
|
17615
|
+
children: [jsxRuntime.exports.jsx(Input$3, Object.assign({
|
|
17616
|
+
iconSize: iconSize
|
|
17617
|
+
}, inputProps), void 0), indeterminate ? jsxRuntime.exports.jsx(Svg$1, Object.assign({
|
|
17895
17618
|
width: iconSize,
|
|
17896
17619
|
height: iconSize,
|
|
17897
17620
|
viewBox: "0 0 ".concat(iconSize, " ").concat(iconSize),
|
|
@@ -17956,7 +17679,7 @@ var MultiSelect = /*#__PURE__*/React.forwardRef(function MultiSelect(_a, ref) {
|
|
|
17956
17679
|
|
|
17957
17680
|
var token = useToken({
|
|
17958
17681
|
density: density
|
|
17959
|
-
}, multiSelect)
|
|
17682
|
+
}, multiSelect);
|
|
17960
17683
|
var multipleSelectionProps = {
|
|
17961
17684
|
initialSelectedItems: initialSelectedItems,
|
|
17962
17685
|
onSelectedItemsChange: function onSelectedItemsChange(changes) {
|
|
@@ -18121,8 +17844,8 @@ var MultiSelect = /*#__PURE__*/React.forwardRef(function MultiSelect(_a, ref) {
|
|
|
18121
17844
|
}), void 0);
|
|
18122
17845
|
});
|
|
18123
17846
|
|
|
18124
|
-
var
|
|
18125
|
-
displayName: "
|
|
17847
|
+
var StyledLabel$2 = styled__default['default'].label.withConfig({
|
|
17848
|
+
displayName: "Checkbox__StyledLabel",
|
|
18126
17849
|
componentId: "sc-yg6l8h-0"
|
|
18127
17850
|
})(["display:inline-flex;align-items:center;cursor:", ";"], function (_ref) {
|
|
18128
17851
|
var disabled = _ref.disabled;
|
|
@@ -18131,7 +17854,7 @@ var StyledCheckbox = styled__default['default'].label.withConfig({
|
|
|
18131
17854
|
var LabelText$1 = styled__default['default'].span.withConfig({
|
|
18132
17855
|
displayName: "Checkbox__LabelText",
|
|
18133
17856
|
componentId: "sc-yg6l8h-1"
|
|
18134
|
-
})(["", ";"
|
|
17857
|
+
})(["", ";"], typographyTemplate(checkbox.typography));
|
|
18135
17858
|
var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_a, ref) {
|
|
18136
17859
|
var label = _a.label,
|
|
18137
17860
|
_a$disabled = _a.disabled,
|
|
@@ -18140,7 +17863,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_a, ref) {
|
|
|
18140
17863
|
className = _a.className,
|
|
18141
17864
|
rest = __rest(_a, ["label", "disabled", "indeterminate", "className"]);
|
|
18142
17865
|
|
|
18143
|
-
return jsxRuntime.exports.jsxs(
|
|
17866
|
+
return label ? jsxRuntime.exports.jsxs(StyledLabel$2, Object.assign({
|
|
18144
17867
|
disabled: disabled,
|
|
18145
17868
|
className: className
|
|
18146
17869
|
}, {
|
|
@@ -18148,9 +17871,13 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_a, ref) {
|
|
|
18148
17871
|
disabled: disabled,
|
|
18149
17872
|
ref: ref,
|
|
18150
17873
|
indeterminate: indeterminate
|
|
18151
|
-
}), void 0),
|
|
17874
|
+
}), void 0), jsxRuntime.exports.jsx(LabelText$1, {
|
|
18152
17875
|
children: label
|
|
18153
17876
|
}, void 0)]
|
|
17877
|
+
}), void 0) : jsxRuntime.exports.jsx(CheckboxInput, Object.assign({}, rest, {
|
|
17878
|
+
disabled: disabled,
|
|
17879
|
+
ref: ref,
|
|
17880
|
+
indeterminate: indeterminate
|
|
18154
17881
|
}), void 0);
|
|
18155
17882
|
});
|
|
18156
17883
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -18163,7 +17890,10 @@ var _tokens$colors$intera$1 = tokens$6.colors.interactive,
|
|
|
18163
17890
|
labelTypography$1 = tokens$6.typography.navigation.menu_title,
|
|
18164
17891
|
_tokens$spacings$comf = tokens$6.spacings.comfortable,
|
|
18165
17892
|
medium_small$1 = _tokens$spacings$comf.medium_small,
|
|
18166
|
-
x_small = _tokens$spacings$comf.x_small
|
|
17893
|
+
x_small = _tokens$spacings$comf.x_small,
|
|
17894
|
+
_tokens$clickbounds = tokens$6.clickbounds,
|
|
17895
|
+
clicboundSize = _tokens$clickbounds.default__base,
|
|
17896
|
+
compactClickboundSize = _tokens$clickbounds.compact__standard;
|
|
18167
17897
|
var comfortable$1 = {
|
|
18168
17898
|
background: primaryColor,
|
|
18169
17899
|
typography: labelTypography$1,
|
|
@@ -18173,6 +17903,9 @@ var comfortable$1 = {
|
|
|
18173
17903
|
left: medium_small$1,
|
|
18174
17904
|
right: medium_small$1
|
|
18175
17905
|
},
|
|
17906
|
+
clickbound: {
|
|
17907
|
+
height: clicboundSize
|
|
17908
|
+
},
|
|
18176
17909
|
states: {
|
|
18177
17910
|
hover: {
|
|
18178
17911
|
background: primaryHoverAlt$1
|
|
@@ -18190,13 +17923,6 @@ var comfortable$1 = {
|
|
|
18190
17923
|
}
|
|
18191
17924
|
}
|
|
18192
17925
|
},
|
|
18193
|
-
entities: {
|
|
18194
|
-
label: {
|
|
18195
|
-
spacings: {
|
|
18196
|
-
left: medium_small$1
|
|
18197
|
-
}
|
|
18198
|
-
}
|
|
18199
|
-
},
|
|
18200
17926
|
modes: {
|
|
18201
17927
|
compact: {
|
|
18202
17928
|
spacings: {
|
|
@@ -18205,6 +17931,9 @@ var comfortable$1 = {
|
|
|
18205
17931
|
left: x_small,
|
|
18206
17932
|
right: x_small
|
|
18207
17933
|
},
|
|
17934
|
+
clickbound: {
|
|
17935
|
+
height: compactClickboundSize
|
|
17936
|
+
},
|
|
18208
17937
|
states: {
|
|
18209
17938
|
focus: {
|
|
18210
17939
|
outline: {
|
|
@@ -18229,19 +17958,26 @@ var Input$2 = styled__default['default'].input.attrs(function (_ref) {
|
|
|
18229
17958
|
}).withConfig({
|
|
18230
17959
|
displayName: "Radio__Input",
|
|
18231
17960
|
componentId: "sc-we59oz-0"
|
|
18232
|
-
})(["
|
|
18233
|
-
var theme = _ref2.theme
|
|
17961
|
+
})(["--scale:", ";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{", "}&:not(:checked) ~ svg path[name='selected']{display:none;}&:not(:checked) ~ svg path[name='unselected']{display:inline;}&:checked ~ svg path[name='unselected']{display:none;}&:checked ~ svg path[name='selected']{display:inline;}"], function (_ref2) {
|
|
17962
|
+
var theme = _ref2.theme,
|
|
17963
|
+
iconSize = _ref2.iconSize;
|
|
17964
|
+
return parseFloat(theme.clickbound.height) / iconSize;
|
|
17965
|
+
}, function (_ref3) {
|
|
17966
|
+
var disabled = _ref3.disabled;
|
|
17967
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
17968
|
+
}, function (_ref4) {
|
|
17969
|
+
var theme = _ref4.theme;
|
|
18234
17970
|
return outlineTemplate(theme.states.focus.outline);
|
|
18235
17971
|
});
|
|
18236
|
-
var
|
|
18237
|
-
displayName: "
|
|
17972
|
+
var StyledLabel$1 = styled__default['default'].label.withConfig({
|
|
17973
|
+
displayName: "Radio__StyledLabel",
|
|
18238
17974
|
componentId: "sc-we59oz-1"
|
|
18239
|
-
})(["display:inline-flex;align-items:center;cursor:", ";"], function (
|
|
18240
|
-
var disabled =
|
|
17975
|
+
})(["display:inline-flex;align-items:center;cursor:", ";"], function (_ref5) {
|
|
17976
|
+
var disabled = _ref5.disabled;
|
|
18241
17977
|
return disabled ? 'not-allowed' : 'pointer';
|
|
18242
17978
|
});
|
|
18243
|
-
var StyledPath = styled__default['default'].path.attrs(function (
|
|
18244
|
-
var icon =
|
|
17979
|
+
var StyledPath = styled__default['default'].path.attrs(function (_ref6) {
|
|
17980
|
+
var icon = _ref6.icon;
|
|
18245
17981
|
return {
|
|
18246
17982
|
fillRule: 'evenodd',
|
|
18247
17983
|
clipRule: 'evenodd',
|
|
@@ -18251,10 +17987,10 @@ var StyledPath = styled__default['default'].path.attrs(function (_ref4) {
|
|
|
18251
17987
|
displayName: "Radio__StyledPath",
|
|
18252
17988
|
componentId: "sc-we59oz-2"
|
|
18253
17989
|
})([""]);
|
|
18254
|
-
var Svg = styled__default['default'].svg.attrs(function (
|
|
18255
|
-
var height =
|
|
18256
|
-
width =
|
|
18257
|
-
fill =
|
|
17990
|
+
var Svg = styled__default['default'].svg.attrs(function (_ref7) {
|
|
17991
|
+
var height = _ref7.height,
|
|
17992
|
+
width = _ref7.width,
|
|
17993
|
+
fill = _ref7.fill;
|
|
18258
17994
|
return {
|
|
18259
17995
|
name: null,
|
|
18260
17996
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
@@ -18265,19 +18001,22 @@ var Svg = styled__default['default'].svg.attrs(function (_ref5) {
|
|
|
18265
18001
|
}).withConfig({
|
|
18266
18002
|
displayName: "Radio__Svg",
|
|
18267
18003
|
componentId: "sc-we59oz-3"
|
|
18268
|
-
})([""]);
|
|
18004
|
+
})(["grid-area:input;pointer-events:none;"]);
|
|
18269
18005
|
var LabelText = styled__default['default'].span.withConfig({
|
|
18270
18006
|
displayName: "Radio__LabelText",
|
|
18271
18007
|
componentId: "sc-we59oz-4"
|
|
18272
|
-
})(["", "
|
|
18008
|
+
})(["", ""], typographyTemplate(comfortable$1.typography));
|
|
18273
18009
|
var InputWrapper = styled__default['default'].span.withConfig({
|
|
18274
18010
|
displayName: "Radio__InputWrapper",
|
|
18275
18011
|
componentId: "sc-we59oz-5"
|
|
18276
|
-
})(["", " display:inline-
|
|
18277
|
-
var theme =
|
|
18012
|
+
})(["", " display:inline-grid;grid:[input] 1fr / [input] 1fr;border-radius:50%;cursor:", ";@media (hover:hover) and (pointer:fine){&:hover{background-color:", ";}}"], function (_ref8) {
|
|
18013
|
+
var theme = _ref8.theme;
|
|
18278
18014
|
return spacingsTemplate(theme.spacings);
|
|
18279
|
-
}, function (
|
|
18280
|
-
var disabled =
|
|
18015
|
+
}, function (_ref9) {
|
|
18016
|
+
var disabled = _ref9.disabled;
|
|
18017
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
18018
|
+
}, function (_ref10) {
|
|
18019
|
+
var disabled = _ref10.disabled;
|
|
18281
18020
|
return disabled ? 'transparent' : comfortable$1.states.hover.background;
|
|
18282
18021
|
});
|
|
18283
18022
|
var Radio = /*#__PURE__*/React.forwardRef(function Radio(_a, ref) {
|
|
@@ -18292,13 +18031,30 @@ var Radio = /*#__PURE__*/React.forwardRef(function Radio(_a, ref) {
|
|
|
18292
18031
|
|
|
18293
18032
|
var token = useToken({
|
|
18294
18033
|
density: density
|
|
18295
|
-
}, comfortable$1)
|
|
18034
|
+
}, comfortable$1);
|
|
18296
18035
|
var iconSize = 24;
|
|
18297
18036
|
var fill = disabled ? comfortable$1.states.disabled.background : comfortable$1.background;
|
|
18037
|
+
var renderSVG = React.useMemo(function () {
|
|
18038
|
+
return jsxRuntime.exports.jsxs(Svg, Object.assign({
|
|
18039
|
+
width: iconSize,
|
|
18040
|
+
height: iconSize,
|
|
18041
|
+
viewBox: "0 0 ".concat(iconSize, " ").concat(iconSize),
|
|
18042
|
+
fill: fill,
|
|
18043
|
+
"aria-hidden": true
|
|
18044
|
+
}, {
|
|
18045
|
+
children: [jsxRuntime.exports.jsx(StyledPath, {
|
|
18046
|
+
icon: radio_button_selected,
|
|
18047
|
+
name: "selected"
|
|
18048
|
+
}, void 0), jsxRuntime.exports.jsx(StyledPath, {
|
|
18049
|
+
icon: radio_button_unselected,
|
|
18050
|
+
name: "unselected"
|
|
18051
|
+
}, void 0)]
|
|
18052
|
+
}), void 0);
|
|
18053
|
+
}, [fill]);
|
|
18298
18054
|
return jsxRuntime.exports.jsx(styled.ThemeProvider, Object.assign({
|
|
18299
18055
|
theme: token
|
|
18300
18056
|
}, {
|
|
18301
|
-
children: jsxRuntime.exports.jsxs(
|
|
18057
|
+
children: label ? jsxRuntime.exports.jsxs(StyledLabel$1, Object.assign({
|
|
18302
18058
|
disabled: disabled,
|
|
18303
18059
|
className: className
|
|
18304
18060
|
}, {
|
|
@@ -18307,25 +18063,20 @@ var Radio = /*#__PURE__*/React.forwardRef(function Radio(_a, ref) {
|
|
|
18307
18063
|
}, {
|
|
18308
18064
|
children: [jsxRuntime.exports.jsx(Input$2, Object.assign({}, rest, {
|
|
18309
18065
|
ref: ref,
|
|
18310
|
-
disabled: disabled
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18314
|
-
viewBox: "0 0 ".concat(iconSize, " ").concat(iconSize),
|
|
18315
|
-
fill: fill,
|
|
18316
|
-
"aria-hidden": true
|
|
18317
|
-
}, {
|
|
18318
|
-
children: [jsxRuntime.exports.jsx(StyledPath, {
|
|
18319
|
-
icon: radio_button_selected,
|
|
18320
|
-
name: "selected"
|
|
18321
|
-
}, void 0), jsxRuntime.exports.jsx(StyledPath, {
|
|
18322
|
-
icon: radio_button_unselected,
|
|
18323
|
-
name: "unselected"
|
|
18324
|
-
}, void 0)]
|
|
18325
|
-
}), void 0)]
|
|
18326
|
-
}), void 0), label && jsxRuntime.exports.jsx(LabelText, {
|
|
18066
|
+
disabled: disabled,
|
|
18067
|
+
iconSize: iconSize
|
|
18068
|
+
}), void 0), renderSVG]
|
|
18069
|
+
}), void 0), jsxRuntime.exports.jsx(LabelText, {
|
|
18327
18070
|
children: label
|
|
18328
18071
|
}, void 0)]
|
|
18072
|
+
}), void 0) : jsxRuntime.exports.jsxs(InputWrapper, Object.assign({
|
|
18073
|
+
disabled: disabled
|
|
18074
|
+
}, {
|
|
18075
|
+
children: [jsxRuntime.exports.jsx(Input$2, Object.assign({}, rest, {
|
|
18076
|
+
ref: ref,
|
|
18077
|
+
disabled: disabled,
|
|
18078
|
+
iconSize: iconSize
|
|
18079
|
+
}), void 0), renderSVG]
|
|
18329
18080
|
}), void 0)
|
|
18330
18081
|
}), void 0);
|
|
18331
18082
|
});
|
|
@@ -18342,7 +18093,7 @@ var BaseInputWrapper = styled__default['default'].span.withConfig({
|
|
|
18342
18093
|
|
|
18343
18094
|
var _a, _b;
|
|
18344
18095
|
|
|
18345
|
-
return styled.css(["width:", ";height:", ";border-radius:50%;position:relative;&::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}"], width, height, (_a = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _a === void 0 ? void 0 : _a.top, (_b = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _b === void 0 ? void 0 : _b.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height);
|
|
18096
|
+
return styled.css(["width:", ";height:", ";border-radius:50%;position:relative;grid-area:input;pointer-events:none;&::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}"], width, height, (_a = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _a === void 0 ? void 0 : _a.top, (_b = clickbound === null || clickbound === void 0 ? void 0 : clickbound.offset) === null || _b === void 0 ? void 0 : _b.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height);
|
|
18346
18097
|
});
|
|
18347
18098
|
var BaseInput = styled__default['default'].input.attrs(function (_ref2) {
|
|
18348
18099
|
var _ref2$type = _ref2.type,
|
|
@@ -18354,102 +18105,89 @@ var BaseInput = styled__default['default'].input.attrs(function (_ref2) {
|
|
|
18354
18105
|
displayName: "Switchstyles__BaseInput",
|
|
18355
18106
|
componentId: "sc-x39lde-1"
|
|
18356
18107
|
})(function (_ref3) {
|
|
18357
|
-
var
|
|
18358
|
-
|
|
18108
|
+
var disabled = _ref3.disabled,
|
|
18109
|
+
theme = _ref3.theme;
|
|
18110
|
+
return styled.css(["appearance:none;width:100%;height:100%;grid-area:input;margin:0;cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + span{", "}"], disabled ? 'not-allowed' : 'pointer', outlineTemplate(theme.states.focus.outline));
|
|
18359
18111
|
});
|
|
18112
|
+
var GridWrapper = styled__default['default'].span.withConfig({
|
|
18113
|
+
displayName: "Switchstyles__GridWrapper",
|
|
18114
|
+
componentId: "sc-x39lde-2"
|
|
18115
|
+
})(["display:inline-grid;vertical-align:middle;grid:[input] 1fr / [input] 1fr;"]);
|
|
18360
18116
|
|
|
18361
|
-
var
|
|
18362
|
-
displayName: "
|
|
18117
|
+
var Input$1 = styled__default['default'](BaseInput).withConfig({
|
|
18118
|
+
displayName: "SwitchSmall__Input",
|
|
18363
18119
|
componentId: "sc-1a99mis-0"
|
|
18364
18120
|
})(function (_ref) {
|
|
18365
|
-
var
|
|
18366
|
-
theme = _ref.theme
|
|
18367
|
-
|
|
18121
|
+
var disabled = _ref.disabled,
|
|
18122
|
+
_ref$theme = _ref.theme,
|
|
18123
|
+
states = _ref$theme.states,
|
|
18124
|
+
_ref$theme$entities = _ref$theme.entities,
|
|
18125
|
+
handle = _ref$theme$entities.handle,
|
|
18126
|
+
track = _ref$theme$entities.track;
|
|
18127
|
+
return styled.css(["&[data-focus-visible-added]:focus + span{outline-offset:", ";}&:checked + span > span{background-color:", ";}&:checked + span > span:last-child{transform:translate(180%,-50%);background-color:", ";}@media (hover:hover) and (pointer:fine){&:hover + span{background-color:", ";}}"], states.focus.outline.offset, disabled ? states.disabled.background : track.states.active.background, handle.background, disabled ? 'transparent' : states.hover.background);
|
|
18368
18128
|
});
|
|
18369
|
-
var
|
|
18370
|
-
displayName: "
|
|
18129
|
+
var Track$1 = styled__default['default'].span.withConfig({
|
|
18130
|
+
displayName: "SwitchSmall__Track",
|
|
18371
18131
|
componentId: "sc-1a99mis-1"
|
|
18372
18132
|
})(function (_ref2) {
|
|
18373
|
-
var
|
|
18133
|
+
var isDisabled = _ref2.isDisabled,
|
|
18374
18134
|
_ref2$theme = _ref2.theme,
|
|
18375
18135
|
states = _ref2$theme.states,
|
|
18376
|
-
|
|
18377
|
-
handle = _ref2$theme$entities.handle,
|
|
18378
|
-
track = _ref2$theme$entities.track;
|
|
18379
|
-
return styled.css(["&[data-focus-visible-added]:focus + span{outline-offset:", ";}&:checked + span > span{background-color:", ";}&:checked + span > span:last-child{transform:translate(180%,-50%);background-color:", ";}"], states.focus.outline.offset, disabled ? states.disabled.background : track.states.active.background, handle.background);
|
|
18380
|
-
});
|
|
18381
|
-
var Track$1 = styled__default['default'].span.withConfig({
|
|
18382
|
-
displayName: "SwitchSmall__Track",
|
|
18383
|
-
componentId: "sc-1a99mis-2"
|
|
18384
|
-
})(function (_ref3) {
|
|
18385
|
-
var isDisabled = _ref3.isDisabled,
|
|
18386
|
-
_ref3$theme = _ref3.theme,
|
|
18387
|
-
states = _ref3$theme.states,
|
|
18388
|
-
track = _ref3$theme.entities.track;
|
|
18136
|
+
track = _ref2$theme.entities.track;
|
|
18389
18137
|
return styled.css(["width:", ";height:", ";border-radius:10px;border:none;background-color:", ";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);"], track.width, track.height, isDisabled ? states.disabled.background : track.states.disabled.background);
|
|
18390
18138
|
});
|
|
18391
18139
|
var Handle$1 = styled__default['default'].span.withConfig({
|
|
18392
18140
|
displayName: "SwitchSmall__Handle",
|
|
18393
|
-
componentId: "sc-1a99mis-
|
|
18394
|
-
})(function (
|
|
18395
|
-
var handle =
|
|
18141
|
+
componentId: "sc-1a99mis-2"
|
|
18142
|
+
})(function (_ref3) {
|
|
18143
|
+
var handle = _ref3.theme.entities.handle;
|
|
18396
18144
|
return styled.css(["background-color:", ";width:", ";height:", ";border-radius:50%;display:inline-block;position:absolute;top:50%;transform:translate(11%,-50%);left:7px;transition:transform 0.36s cubic-bezier(0.78,0.14,0.15,0.86);"], handle.background, handle.width, handle.height);
|
|
18397
18145
|
});
|
|
18398
18146
|
var SwitchSmall = /*#__PURE__*/React.forwardRef(function SwitchSmall(_a, ref) {
|
|
18399
18147
|
var disabled = _a.disabled,
|
|
18400
18148
|
rest = __rest(_a, ["disabled"]);
|
|
18401
18149
|
|
|
18402
|
-
return jsxRuntime.exports.jsxs(
|
|
18150
|
+
return jsxRuntime.exports.jsxs(GridWrapper, {
|
|
18403
18151
|
children: [jsxRuntime.exports.jsx(Input$1, Object.assign({}, rest, {
|
|
18404
18152
|
ref: ref,
|
|
18405
18153
|
disabled: disabled
|
|
18406
|
-
}), void 0), jsxRuntime.exports.jsxs(
|
|
18407
|
-
isDisabled: disabled
|
|
18408
|
-
}, {
|
|
18154
|
+
}), void 0), jsxRuntime.exports.jsxs(BaseInputWrapper, {
|
|
18409
18155
|
children: [jsxRuntime.exports.jsx(Track$1, {
|
|
18410
18156
|
isDisabled: disabled
|
|
18411
18157
|
}, void 0), jsxRuntime.exports.jsx(Handle$1, {}, void 0)]
|
|
18412
|
-
}
|
|
18158
|
+
}, void 0)]
|
|
18413
18159
|
}, void 0);
|
|
18414
18160
|
});
|
|
18415
18161
|
SwitchSmall.displayName = 'SwitchSmall';
|
|
18416
18162
|
|
|
18417
|
-
var
|
|
18418
|
-
displayName: "
|
|
18163
|
+
var Input = styled__default['default'](BaseInput).withConfig({
|
|
18164
|
+
displayName: "SwitchDefault__Input",
|
|
18419
18165
|
componentId: "sc-16ym5pn-0"
|
|
18420
18166
|
})(function (_ref) {
|
|
18421
|
-
var
|
|
18167
|
+
var disabled = _ref.disabled,
|
|
18422
18168
|
theme = _ref.theme;
|
|
18423
|
-
return styled.css(["
|
|
18424
|
-
});
|
|
18425
|
-
var Input = styled__default['default'](BaseInput).withConfig({
|
|
18426
|
-
displayName: "SwitchDefault__Input",
|
|
18427
|
-
componentId: "sc-16ym5pn-1"
|
|
18428
|
-
})(function (_ref2) {
|
|
18429
|
-
var disabled = _ref2.disabled,
|
|
18430
|
-
theme = _ref2.theme;
|
|
18431
|
-
return styled.css(["&:checked + span > span{background-color:", ";}&:checked + span > span:last-child{transform:translate(105%,-50%);background-color:", ";}"], disabled ? theme.states.disabled.background : theme.entities.track.states.active.background, disabled ? theme.states.disabled.background : theme.entities.handle.states.active.background);
|
|
18169
|
+
return styled.css(["&:checked + span > span{background-color:", ";}&:checked + span > span:last-child{transform:translate(105%,-50%);background-color:", ";}&:hover + span{background-color:", ";}&:hover + span > span:last-child{background-color:", ";}"], disabled ? theme.states.disabled.background : theme.entities.track.states.active.background, disabled ? theme.states.disabled.background : theme.entities.handle.states.active.background, disabled ? 'transparent' : theme.states.hover.background, disabled ? theme.states.disabled.background : theme.states.hover.entities.handle.background);
|
|
18432
18170
|
});
|
|
18433
18171
|
var Track = styled__default['default'].span.withConfig({
|
|
18434
18172
|
displayName: "SwitchDefault__Track",
|
|
18435
|
-
componentId: "sc-16ym5pn-
|
|
18436
|
-
})(function (
|
|
18437
|
-
var isDisabled =
|
|
18438
|
-
|
|
18439
|
-
states =
|
|
18440
|
-
track =
|
|
18173
|
+
componentId: "sc-16ym5pn-1"
|
|
18174
|
+
})(function (_ref2) {
|
|
18175
|
+
var isDisabled = _ref2.isDisabled,
|
|
18176
|
+
_ref2$theme = _ref2.theme,
|
|
18177
|
+
states = _ref2$theme.states,
|
|
18178
|
+
track = _ref2$theme.entities.track;
|
|
18441
18179
|
return styled.css(["", " border:none;width:", ";height:", ";background-color:", ";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);transition:background 0.36s;", ""], bordersTemplate(track.border), track.width, track.height, track.background, isDisabled && {
|
|
18442
18180
|
backgroundColor: states.disabled.background
|
|
18443
18181
|
});
|
|
18444
18182
|
});
|
|
18445
18183
|
var Handle = styled__default['default'].span.withConfig({
|
|
18446
18184
|
displayName: "SwitchDefault__Handle",
|
|
18447
|
-
componentId: "sc-16ym5pn-
|
|
18448
|
-
})(function (
|
|
18449
|
-
var isDisabled =
|
|
18450
|
-
|
|
18451
|
-
states =
|
|
18452
|
-
handle =
|
|
18185
|
+
componentId: "sc-16ym5pn-2"
|
|
18186
|
+
})(function (_ref3) {
|
|
18187
|
+
var isDisabled = _ref3.isDisabled,
|
|
18188
|
+
_ref3$theme = _ref3.theme,
|
|
18189
|
+
states = _ref3$theme.states,
|
|
18190
|
+
handle = _ref3$theme.entities.handle;
|
|
18453
18191
|
return styled.css(["background-color:", ";", " box-shadow:", ";width:", ";height:", ";border-radius:50%;display:inline-block;position:absolute;top:50%;transform:translate(0,-50%);left:4px;transition:transform 0.36s cubic-bezier(0.78,0.14,0.15,0.86);"], handle.background, isDisabled && {
|
|
18454
18192
|
backgroundColor: states.disabled.background
|
|
18455
18193
|
}, handle.boxShadow, handle.width, handle.height);
|
|
@@ -18458,19 +18196,17 @@ var SwitchDefault = /*#__PURE__*/React.forwardRef(function SwitchDefault(_a, ref
|
|
|
18458
18196
|
var disabled = _a.disabled,
|
|
18459
18197
|
rest = __rest(_a, ["disabled"]);
|
|
18460
18198
|
|
|
18461
|
-
return jsxRuntime.exports.jsxs(
|
|
18199
|
+
return jsxRuntime.exports.jsxs(GridWrapper, {
|
|
18462
18200
|
children: [jsxRuntime.exports.jsx(Input, Object.assign({}, rest, {
|
|
18463
18201
|
ref: ref,
|
|
18464
18202
|
disabled: disabled
|
|
18465
|
-
}), void 0), jsxRuntime.exports.jsxs(
|
|
18466
|
-
isDisabled: disabled
|
|
18467
|
-
}, {
|
|
18203
|
+
}), void 0), jsxRuntime.exports.jsxs(BaseInputWrapper, {
|
|
18468
18204
|
children: [jsxRuntime.exports.jsx(Track, {
|
|
18469
18205
|
isDisabled: disabled
|
|
18470
18206
|
}, void 0), jsxRuntime.exports.jsx(Handle, {
|
|
18471
18207
|
isDisabled: disabled
|
|
18472
18208
|
}, void 0)]
|
|
18473
|
-
}
|
|
18209
|
+
}, void 0)]
|
|
18474
18210
|
}, void 0);
|
|
18475
18211
|
});
|
|
18476
18212
|
SwitchDefault.displayName = 'SwitchDefault';
|
|
@@ -18599,8 +18335,8 @@ var comfortable = {
|
|
|
18599
18335
|
}
|
|
18600
18336
|
};
|
|
18601
18337
|
|
|
18602
|
-
var
|
|
18603
|
-
displayName: "
|
|
18338
|
+
var StyledLabel = styled__default['default'].label.withConfig({
|
|
18339
|
+
displayName: "Switch__StyledLabel",
|
|
18604
18340
|
componentId: "sc-sdaahx-0"
|
|
18605
18341
|
})(["cursor:", ";border:none;background-color:transparent;vertical-align:middle;display:inline-flex;align-items:center;position:relative;"], function (_ref) {
|
|
18606
18342
|
var isDisabled = _ref.isDisabled;
|
|
@@ -18628,11 +18364,11 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(_a, ref) {
|
|
|
18628
18364
|
var overrideDensity = size === 'small' ? 'compact' : density;
|
|
18629
18365
|
var token = useToken({
|
|
18630
18366
|
density: overrideDensity
|
|
18631
|
-
}, comfortable)
|
|
18367
|
+
}, comfortable);
|
|
18632
18368
|
return jsxRuntime.exports.jsx(styled.ThemeProvider, Object.assign({
|
|
18633
18369
|
theme: token
|
|
18634
18370
|
}, {
|
|
18635
|
-
children: jsxRuntime.exports.jsxs(
|
|
18371
|
+
children: label ? jsxRuntime.exports.jsxs(StyledLabel, Object.assign({
|
|
18636
18372
|
isDisabled: disabled,
|
|
18637
18373
|
className: className
|
|
18638
18374
|
}, {
|
|
@@ -18647,6 +18383,14 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(_a, ref) {
|
|
|
18647
18383
|
}), void 0), label && jsxRuntime.exports.jsx(Label, {
|
|
18648
18384
|
children: label
|
|
18649
18385
|
}, void 0)]
|
|
18386
|
+
}), void 0) : size === 'small' ? jsxRuntime.exports.jsx(SwitchSmall, Object.assign({
|
|
18387
|
+
disabled: disabled
|
|
18388
|
+
}, rest, {
|
|
18389
|
+
ref: ref
|
|
18390
|
+
}), void 0) : jsxRuntime.exports.jsx(SwitchDefault, Object.assign({
|
|
18391
|
+
disabled: disabled
|
|
18392
|
+
}, rest, {
|
|
18393
|
+
ref: ref
|
|
18650
18394
|
}), void 0)
|
|
18651
18395
|
}), void 0);
|
|
18652
18396
|
});
|