@itcase/ui 1.0.13 → 1.0.15
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.
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var PropTypes = require('prop-types');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var index = require('./Icon.js');
|
|
7
|
+
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
8
|
+
require('react-inlinesvg');
|
|
9
|
+
require('../constants/componentProps/fill.js');
|
|
10
|
+
require('../constants/componentProps/iconSize.js');
|
|
11
|
+
require('../constants/componentProps/shape.js');
|
|
12
|
+
require('../constants/componentProps/strokeColor.js');
|
|
13
|
+
require('./Link.js');
|
|
14
|
+
require('../useStyles-e4accb53.js');
|
|
15
|
+
require('lodash/camelCase');
|
|
16
|
+
require('lodash/maxBy');
|
|
17
|
+
require('lodash/upperFirst');
|
|
18
|
+
require('../hooks/styleAttributes.js');
|
|
19
|
+
require('../context/UIContext.js');
|
|
20
|
+
require('../hooks/useMediaQueries.js');
|
|
21
|
+
require('react-responsive');
|
|
22
|
+
require('../constants/componentProps/size.js');
|
|
23
|
+
require('../constants/componentProps/textColor.js');
|
|
24
|
+
require('../constants/componentProps/textGradient.js');
|
|
25
|
+
require('../constants/componentProps/textStyle.js');
|
|
26
|
+
require('../constants/componentProps/textWeight.js');
|
|
27
|
+
require('../constants/componentProps/type.js');
|
|
28
|
+
require('../constants/componentProps/underline.js');
|
|
29
|
+
require('lodash/castArray');
|
|
30
|
+
|
|
31
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
32
|
+
|
|
33
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
34
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
35
|
+
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
36
|
+
|
|
37
|
+
var inputPasswordConfig = {
|
|
38
|
+
state: {},
|
|
39
|
+
setState: function setState(newComponent) {
|
|
40
|
+
inputPasswordConfig.state = newComponent;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function InputPassword(props) {
|
|
44
|
+
var _inputPasswordConfig$, _inputPasswordConfig$2, _inputPasswordConfig$3;
|
|
45
|
+
var state = props.state,
|
|
46
|
+
id = props.id,
|
|
47
|
+
iconFill = props.iconFill,
|
|
48
|
+
iconRevealableHide = props.iconRevealableHide,
|
|
49
|
+
iconRevealableShow = props.iconRevealableShow,
|
|
50
|
+
iconFillHover = props.iconFillHover,
|
|
51
|
+
iconShape = props.iconShape,
|
|
52
|
+
iconSize = props.iconSize,
|
|
53
|
+
isRevealable = props.isRevealable,
|
|
54
|
+
className = props.className,
|
|
55
|
+
placeholder = props.placeholder,
|
|
56
|
+
disabled = props.disabled,
|
|
57
|
+
value = props.value,
|
|
58
|
+
onBlur = props.onBlur,
|
|
59
|
+
onChange = props.onChange,
|
|
60
|
+
onFocus = props.onFocus,
|
|
61
|
+
onKeyDown = props.onKeyDown;
|
|
62
|
+
var fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
63
|
+
prefix: 'fill_',
|
|
64
|
+
propsKey: 'fill'
|
|
65
|
+
});
|
|
66
|
+
var sizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
67
|
+
prefix: 'input-password__input_size_',
|
|
68
|
+
propsKey: 'size'
|
|
69
|
+
});
|
|
70
|
+
var shapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
71
|
+
prefix: 'input-password__input_shape_',
|
|
72
|
+
propsKey: 'shape'
|
|
73
|
+
});
|
|
74
|
+
var textSizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
75
|
+
prefix: 'text_size_',
|
|
76
|
+
propsKey: 'textSize'
|
|
77
|
+
});
|
|
78
|
+
var textColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
79
|
+
prefix: 'text-color_',
|
|
80
|
+
propsKey: 'textColor'
|
|
81
|
+
});
|
|
82
|
+
var caretClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
83
|
+
prefix: 'caret-color_',
|
|
84
|
+
propsKey: 'caret'
|
|
85
|
+
});
|
|
86
|
+
var placeholderClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
87
|
+
prefix: 'placeholder-text-color_',
|
|
88
|
+
propsKey: 'placeholderTextColor'
|
|
89
|
+
});
|
|
90
|
+
var weightClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
91
|
+
prefix: 'text-weight_',
|
|
92
|
+
propsKey: 'textWeight'
|
|
93
|
+
});
|
|
94
|
+
var borderWidthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
95
|
+
prefix: 'border-width_',
|
|
96
|
+
propsKey: 'borderWidth'
|
|
97
|
+
});
|
|
98
|
+
var borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
99
|
+
prefix: 'border-color_',
|
|
100
|
+
propsKey: 'borderColor'
|
|
101
|
+
});
|
|
102
|
+
var widthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
103
|
+
prefix: 'width_',
|
|
104
|
+
propsKey: 'width'
|
|
105
|
+
});
|
|
106
|
+
var _useState = React.useState(false),
|
|
107
|
+
isRevealed = _useState[0],
|
|
108
|
+
setIsRevealed = _useState[1];
|
|
109
|
+
var inputType = React.useMemo(function () {
|
|
110
|
+
return isRevealed ? 'text' : 'password';
|
|
111
|
+
}, [isRevealed]);
|
|
112
|
+
var revealeHandler = React.useCallback(function (e) {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
setIsRevealed(function (prev) {
|
|
115
|
+
return !prev;
|
|
116
|
+
});
|
|
117
|
+
}, [setIsRevealed]);
|
|
118
|
+
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
119
|
+
className: "input-password"
|
|
120
|
+
}, /*#__PURE__*/React__default.default.createElement("input", {
|
|
121
|
+
className: clsx__default.default(className, 'input-password__input', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, fillClass, placeholderClass, shapeClass, textSizeClass, textColorClass, weightClass, widthClass, borderWidthClass, borderColorClass, sizeClass, ((_inputPasswordConfig$ = inputPasswordConfig.state[state]) == null ? void 0 : _inputPasswordConfig$.fillClass) && ("fill_" + inputPasswordConfig.state[state].fillClass).replace(/([A-Z])/g, '-$1').toLowerCase(), ((_inputPasswordConfig$2 = inputPasswordConfig.state[state]) == null ? void 0 : _inputPasswordConfig$2.borderColor) && ("border-color_" + inputPasswordConfig.state[state].borderColor).replace(/([A-Z])/g, '-$1').toLowerCase(), ((_inputPasswordConfig$3 = inputPasswordConfig.state[state]) == null ? void 0 : _inputPasswordConfig$3.shape) && "shape_" + inputPasswordConfig.state[state].shape),
|
|
122
|
+
type: inputType,
|
|
123
|
+
id: id,
|
|
124
|
+
disabled: disabled,
|
|
125
|
+
placeholder: placeholder,
|
|
126
|
+
value: value,
|
|
127
|
+
onBlur: onBlur,
|
|
128
|
+
onChange: onChange,
|
|
129
|
+
onFocus: onFocus,
|
|
130
|
+
onKeyDown: onKeyDown
|
|
131
|
+
}), isRevealable && /*#__PURE__*/React__default.default.createElement(index.Icon, {
|
|
132
|
+
className: "input-password__icon",
|
|
133
|
+
iconFill: iconFill,
|
|
134
|
+
iconFillHover: iconFillHover,
|
|
135
|
+
SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
136
|
+
imageSrc: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
137
|
+
shape: iconShape,
|
|
138
|
+
size: iconSize,
|
|
139
|
+
onClick: revealeHandler
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
InputPassword.propTypes = {
|
|
143
|
+
id: PropTypes__default.default.string,
|
|
144
|
+
className: PropTypes__default.default.string,
|
|
145
|
+
placeholder: PropTypes__default.default.string,
|
|
146
|
+
value: PropTypes__default.default.string,
|
|
147
|
+
checked: PropTypes__default.default.bool,
|
|
148
|
+
disabled: PropTypes__default.default.bool,
|
|
149
|
+
onBlur: PropTypes__default.default.func,
|
|
150
|
+
onChange: PropTypes__default.default.func,
|
|
151
|
+
onKeyDown: PropTypes__default.default.func,
|
|
152
|
+
type: PropTypes__default.default.string
|
|
153
|
+
};
|
|
154
|
+
InputPassword.defaultProps = {
|
|
155
|
+
size: 'm',
|
|
156
|
+
type: 'text'
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
exports.InputPassword = InputPassword;
|
|
160
|
+
exports.inputPasswordConfig = inputPasswordConfig;
|
|
@@ -2986,6 +2986,14 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
2986
2986
|
}));
|
|
2987
2987
|
}
|
|
2988
2988
|
|
|
2989
|
+
const min = Math.min;
|
|
2990
|
+
const max = Math.max;
|
|
2991
|
+
const round = Math.round;
|
|
2992
|
+
const floor = Math.floor;
|
|
2993
|
+
const createCoords = v => ({
|
|
2994
|
+
x: v,
|
|
2995
|
+
y: v
|
|
2996
|
+
});
|
|
2989
2997
|
function rectToClientRect(rect) {
|
|
2990
2998
|
return {
|
|
2991
2999
|
...rect,
|
|
@@ -2996,18 +3004,6 @@ function rectToClientRect(rect) {
|
|
|
2996
3004
|
};
|
|
2997
3005
|
}
|
|
2998
3006
|
|
|
2999
|
-
function getWindow(node) {
|
|
3000
|
-
var _node$ownerDocument;
|
|
3001
|
-
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
|
-
function getComputedStyle$1(element) {
|
|
3005
|
-
return getWindow(element).getComputedStyle(element);
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
function isNode(value) {
|
|
3009
|
-
return value instanceof getWindow(value).Node;
|
|
3010
|
-
}
|
|
3011
3007
|
function getNodeName(node) {
|
|
3012
3008
|
if (isNode(node)) {
|
|
3013
3009
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -3017,16 +3013,29 @@ function getNodeName(node) {
|
|
|
3017
3013
|
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
3018
3014
|
return '#document';
|
|
3019
3015
|
}
|
|
3020
|
-
|
|
3016
|
+
function getWindow(node) {
|
|
3017
|
+
var _node$ownerDocument;
|
|
3018
|
+
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
3019
|
+
}
|
|
3020
|
+
function getDocumentElement(node) {
|
|
3021
|
+
var _ref;
|
|
3022
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
3023
|
+
}
|
|
3024
|
+
function isNode(value) {
|
|
3025
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
3026
|
+
}
|
|
3027
|
+
function isElement(value) {
|
|
3028
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
3029
|
+
}
|
|
3021
3030
|
function isHTMLElement(value) {
|
|
3022
3031
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
3023
3032
|
}
|
|
3024
|
-
function isShadowRoot(
|
|
3033
|
+
function isShadowRoot(value) {
|
|
3025
3034
|
// Browsers without `ShadowRoot` support.
|
|
3026
3035
|
if (typeof ShadowRoot === 'undefined') {
|
|
3027
3036
|
return false;
|
|
3028
3037
|
}
|
|
3029
|
-
return
|
|
3038
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
3030
3039
|
}
|
|
3031
3040
|
function isOverflowElement(element) {
|
|
3032
3041
|
const {
|
|
@@ -3037,22 +3046,54 @@ function isOverflowElement(element) {
|
|
|
3037
3046
|
} = getComputedStyle$1(element);
|
|
3038
3047
|
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
3039
3048
|
}
|
|
3040
|
-
function
|
|
3049
|
+
function isWebKit() {
|
|
3041
3050
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
3042
3051
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
3043
3052
|
}
|
|
3044
3053
|
function isLastTraversableNode(node) {
|
|
3045
3054
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
3046
3055
|
}
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
+
function getComputedStyle$1(element) {
|
|
3057
|
+
return getWindow(element).getComputedStyle(element);
|
|
3058
|
+
}
|
|
3059
|
+
function getParentNode(node) {
|
|
3060
|
+
if (getNodeName(node) === 'html') {
|
|
3061
|
+
return node;
|
|
3062
|
+
}
|
|
3063
|
+
const result =
|
|
3064
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
3065
|
+
node.assignedSlot ||
|
|
3066
|
+
// DOM Element detected.
|
|
3067
|
+
node.parentNode ||
|
|
3068
|
+
// ShadowRoot detected.
|
|
3069
|
+
isShadowRoot(node) && node.host ||
|
|
3070
|
+
// Fallback.
|
|
3071
|
+
getDocumentElement(node);
|
|
3072
|
+
return isShadowRoot(result) ? result.host : result;
|
|
3073
|
+
}
|
|
3074
|
+
function getNearestOverflowAncestor(node) {
|
|
3075
|
+
const parentNode = getParentNode(node);
|
|
3076
|
+
if (isLastTraversableNode(parentNode)) {
|
|
3077
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
3078
|
+
}
|
|
3079
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
3080
|
+
return parentNode;
|
|
3081
|
+
}
|
|
3082
|
+
return getNearestOverflowAncestor(parentNode);
|
|
3083
|
+
}
|
|
3084
|
+
function getOverflowAncestors(node, list) {
|
|
3085
|
+
var _node$ownerDocument2;
|
|
3086
|
+
if (list === void 0) {
|
|
3087
|
+
list = [];
|
|
3088
|
+
}
|
|
3089
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
3090
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
3091
|
+
const win = getWindow(scrollableAncestor);
|
|
3092
|
+
if (isBody) {
|
|
3093
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
3094
|
+
}
|
|
3095
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
3096
|
+
}
|
|
3056
3097
|
|
|
3057
3098
|
function getCssDimensions(element) {
|
|
3058
3099
|
const css = getComputedStyle$1(element);
|
|
@@ -3075,10 +3116,6 @@ function getCssDimensions(element) {
|
|
|
3075
3116
|
};
|
|
3076
3117
|
}
|
|
3077
3118
|
|
|
3078
|
-
function isElement(value) {
|
|
3079
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
3080
|
-
}
|
|
3081
|
-
|
|
3082
3119
|
function unwrapElement(element) {
|
|
3083
3120
|
return !isElement(element) ? element.contextElement : element;
|
|
3084
3121
|
}
|
|
@@ -3114,7 +3151,7 @@ function getScale(element) {
|
|
|
3114
3151
|
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
3115
3152
|
function getVisualOffsets(element) {
|
|
3116
3153
|
const win = getWindow(element);
|
|
3117
|
-
if (!
|
|
3154
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
3118
3155
|
return noOffsets;
|
|
3119
3156
|
}
|
|
3120
3157
|
return {
|
|
@@ -3163,7 +3200,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
3163
3200
|
while (currentIFrame && offsetParent && offsetWin !== win) {
|
|
3164
3201
|
const iframeScale = getScale(currentIFrame);
|
|
3165
3202
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
3166
|
-
const css = getComputedStyle(currentIFrame);
|
|
3203
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
3167
3204
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
3168
3205
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
3169
3206
|
x *= iframeScale.x;
|
|
@@ -3183,52 +3220,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
3183
3220
|
});
|
|
3184
3221
|
}
|
|
3185
3222
|
|
|
3186
|
-
function getDocumentElement(node) {
|
|
3187
|
-
var _ref;
|
|
3188
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
3189
|
-
}
|
|
3190
|
-
|
|
3191
|
-
function getParentNode(node) {
|
|
3192
|
-
if (getNodeName(node) === 'html') {
|
|
3193
|
-
return node;
|
|
3194
|
-
}
|
|
3195
|
-
const result =
|
|
3196
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
3197
|
-
node.assignedSlot ||
|
|
3198
|
-
// DOM Element detected.
|
|
3199
|
-
node.parentNode ||
|
|
3200
|
-
// ShadowRoot detected.
|
|
3201
|
-
isShadowRoot(node) && node.host ||
|
|
3202
|
-
// Fallback.
|
|
3203
|
-
getDocumentElement(node);
|
|
3204
|
-
return isShadowRoot(result) ? result.host : result;
|
|
3205
|
-
}
|
|
3206
|
-
|
|
3207
|
-
function getNearestOverflowAncestor(node) {
|
|
3208
|
-
const parentNode = getParentNode(node);
|
|
3209
|
-
if (isLastTraversableNode(parentNode)) {
|
|
3210
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
3211
|
-
}
|
|
3212
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
3213
|
-
return parentNode;
|
|
3214
|
-
}
|
|
3215
|
-
return getNearestOverflowAncestor(parentNode);
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
function getOverflowAncestors(node, list) {
|
|
3219
|
-
var _node$ownerDocument;
|
|
3220
|
-
if (list === void 0) {
|
|
3221
|
-
list = [];
|
|
3222
|
-
}
|
|
3223
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
3224
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
3225
|
-
const win = getWindow(scrollableAncestor);
|
|
3226
|
-
if (isBody) {
|
|
3227
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
3228
|
-
}
|
|
3229
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
3230
|
-
}
|
|
3231
|
-
|
|
3232
3223
|
// https://samthor.au/2021/observing-dom/
|
|
3233
3224
|
function observeMove(element, onMove) {
|
|
3234
3225
|
let io = null;
|
|
@@ -627,13 +627,13 @@ function Observer(_ref) {
|
|
|
627
627
|
const init = () => {
|
|
628
628
|
if (!swiper.params.observer) return;
|
|
629
629
|
if (swiper.params.observeParents) {
|
|
630
|
-
const containerParents = elementParents(swiper.
|
|
630
|
+
const containerParents = elementParents(swiper.hostEl);
|
|
631
631
|
for (let i = 0; i < containerParents.length; i += 1) {
|
|
632
632
|
attach(containerParents[i]);
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
// Observe container
|
|
636
|
-
attach(swiper.
|
|
636
|
+
attach(swiper.hostEl, {
|
|
637
637
|
childList: swiper.params.observeSlideChildren
|
|
638
638
|
});
|
|
639
639
|
|
|
@@ -2233,11 +2233,13 @@ function loopFix(_temp) {
|
|
|
2233
2233
|
swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);
|
|
2234
2234
|
if (setTranslate) {
|
|
2235
2235
|
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
2236
|
+
swiper.touchEventsData.currentTranslate = swiper.translate;
|
|
2236
2237
|
}
|
|
2237
2238
|
}
|
|
2238
2239
|
} else {
|
|
2239
2240
|
if (setTranslate) {
|
|
2240
2241
|
swiper.slideToLoop(slideRealIndex, 0, false, true);
|
|
2242
|
+
swiper.touchEventsData.currentTranslate = swiper.translate;
|
|
2241
2243
|
}
|
|
2242
2244
|
}
|
|
2243
2245
|
} else if (appendSlidesIndexes.length > 0 && isNext) {
|
|
@@ -2251,6 +2253,7 @@ function loopFix(_temp) {
|
|
|
2251
2253
|
swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
|
|
2252
2254
|
if (setTranslate) {
|
|
2253
2255
|
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
2256
|
+
swiper.touchEventsData.currentTranslate = swiper.translate;
|
|
2254
2257
|
}
|
|
2255
2258
|
}
|
|
2256
2259
|
} else {
|
|
@@ -3815,7 +3818,7 @@ let Swiper$2 = class Swiper {
|
|
|
3815
3818
|
return false;
|
|
3816
3819
|
}
|
|
3817
3820
|
el.swiper = swiper;
|
|
3818
|
-
if (el.parentNode && el.parentNode.host) {
|
|
3821
|
+
if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === 'SWIPER-CONTAINER') {
|
|
3819
3822
|
swiper.isElement = true;
|
|
3820
3823
|
}
|
|
3821
3824
|
const getWrapperSelector = () => {
|
|
@@ -3841,7 +3844,7 @@ let Swiper$2 = class Swiper {
|
|
|
3841
3844
|
Object.assign(swiper, {
|
|
3842
3845
|
el,
|
|
3843
3846
|
wrapperEl,
|
|
3844
|
-
slidesEl: swiper.isElement ? el.parentNode.host : wrapperEl,
|
|
3847
|
+
slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,
|
|
3845
3848
|
hostEl: swiper.isElement ? el.parentNode.host : el,
|
|
3846
3849
|
mounted: true,
|
|
3847
3850
|
// RTL
|
|
@@ -4236,8 +4239,7 @@ function getParams(obj, splitEvents) {
|
|
|
4236
4239
|
};
|
|
4237
4240
|
const events = {};
|
|
4238
4241
|
const passedParams = {};
|
|
4239
|
-
extend(params,
|
|
4240
|
-
extend(params, Swiper$2.extendedDefaults);
|
|
4242
|
+
extend(params, defaults);
|
|
4241
4243
|
params._emitClasses = true;
|
|
4242
4244
|
params.init = false;
|
|
4243
4245
|
const rest = {};
|
|
@@ -4352,7 +4354,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4352
4354
|
};
|
|
4353
4355
|
|
|
4354
4356
|
/**
|
|
4355
|
-
* Swiper React 10.0
|
|
4357
|
+
* Swiper React 10.1.0
|
|
4356
4358
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4357
4359
|
* https://swiperjs.com
|
|
4358
4360
|
*
|
|
@@ -4360,7 +4362,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4360
4362
|
*
|
|
4361
4363
|
* Released under the MIT License
|
|
4362
4364
|
*
|
|
4363
|
-
* Released on:
|
|
4365
|
+
* Released on: August 1, 2023
|
|
4364
4366
|
*/
|
|
4365
4367
|
|
|
4366
4368
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.input-password {
|
|
2
|
+
position: relative;
|
|
3
|
+
&__icon {
|
|
4
|
+
position: absolute;
|
|
5
|
+
right: 8px;
|
|
6
|
+
top: 50%;
|
|
7
|
+
transform: translate(0, -50%);
|
|
8
|
+
}
|
|
9
|
+
&__input {
|
|
10
|
+
border: none;
|
|
11
|
+
appearance: none;
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
min-width: unset;
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
outline: 0;
|
|
17
|
+
position: relative;
|
|
18
|
+
caret-color: var(--input-password-caret-color);
|
|
19
|
+
&:focus {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
&:hover {
|
|
23
|
+
border: solid 1px var(--input-password-state-hover-border);
|
|
24
|
+
background: var(--input-password-state-hover-background);
|
|
25
|
+
}
|
|
26
|
+
&&_state {
|
|
27
|
+
&_success {
|
|
28
|
+
border: solid 1px var(--input-password-state-success-border);
|
|
29
|
+
background: var(--input-password-state-success-background);
|
|
30
|
+
}
|
|
31
|
+
&_error {
|
|
32
|
+
border: solid 1px var(--input-password-state-error-border);
|
|
33
|
+
background: var(--input-password-state-error-background);
|
|
34
|
+
}
|
|
35
|
+
&_focus {
|
|
36
|
+
border: solid 1px var(--input-password-state-focus-border);
|
|
37
|
+
background: var(--input-password-state-focus-background);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.input-password {
|
|
43
|
+
&__input {
|
|
44
|
+
&_shape {
|
|
45
|
+
&_rounded {
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
&_underline {
|
|
50
|
+
position: relative;
|
|
51
|
+
border-left: none !important;
|
|
52
|
+
border-right: none !important;
|
|
53
|
+
border-top: none !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.input-password {
|
|
59
|
+
&__input {
|
|
60
|
+
&&_size {
|
|
61
|
+
@each $size in xs, s, m, l, xl, xxl, normal, tiny, compact, large {
|
|
62
|
+
&_$(size) {
|
|
63
|
+
padding: var(--input-password-size-$(size)-padding);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swiper 10.0
|
|
2
|
+
* Swiper 10.1.0
|
|
3
3
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4
4
|
* https://swiperjs.com
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: August 1, 2023
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/* FONT_START */
|
|
@@ -686,6 +686,8 @@ button.swiper-pagination-bullet {
|
|
|
686
686
|
display: none;
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
+
/* Zoom container styles start */
|
|
690
|
+
|
|
689
691
|
.swiper-zoom-container {
|
|
690
692
|
width: 100%;
|
|
691
693
|
height: 100%;
|
|
@@ -703,6 +705,8 @@ button.swiper-pagination-bullet {
|
|
|
703
705
|
object-fit: contain;
|
|
704
706
|
}
|
|
705
707
|
|
|
708
|
+
/* Zoom container styles end */
|
|
709
|
+
|
|
706
710
|
.swiper-slide-zoomed {
|
|
707
711
|
cursor: move;
|
|
708
712
|
touch-action: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"registry": "https://registry.npmjs.org/"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@itcase/common": "^1.1.
|
|
43
|
+
"@itcase/common": "^1.1.3",
|
|
44
44
|
"clsx": "^2.0.0",
|
|
45
45
|
"html5-boilerplate": "^8.0.0",
|
|
46
46
|
"js-cookie": "^3.0.5",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-responsive": "^9.0.2",
|
|
57
57
|
"react-scrollbars-custom": "^4.1.1",
|
|
58
58
|
"react-select": "^5.7.4",
|
|
59
|
-
"swiper": "^10.0
|
|
59
|
+
"swiper": "^10.1.0",
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"babel-loader": "^9.1.3",
|
|
78
78
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
79
79
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
80
|
-
"eslint": "8.
|
|
80
|
+
"eslint": "8.46.0",
|
|
81
81
|
"eslint-config-prettier": "^8.9.0",
|
|
82
82
|
"eslint-config-standard": "^17.1.0",
|
|
83
83
|
"eslint-plugin-babel": "^5.3.1",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"eslint-plugin-node": "^11.1.0",
|
|
87
87
|
"eslint-plugin-prettier": "^5.0.0",
|
|
88
88
|
"eslint-plugin-promise": "^6.1.1",
|
|
89
|
-
"eslint-plugin-react": "^7.33.
|
|
89
|
+
"eslint-plugin-react": "^7.33.1",
|
|
90
90
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
91
91
|
"eslint-plugin-standard": "^5.0.0",
|
|
92
92
|
"husky": "^8.0.3",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"postcss-sort-media-queries": "^5.2.0",
|
|
117
117
|
"prettier": "^3.0.0",
|
|
118
118
|
"react-datepicker": "^4.16.0",
|
|
119
|
-
"rollup": "^3.
|
|
119
|
+
"rollup": "^3.27.0",
|
|
120
120
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
121
121
|
"semantic-release": "^21.0.7",
|
|
122
122
|
"stylelint": "^15.10.2",
|