@cptkokao/biletix-ui-kit 1.1.3 → 1.1.4-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fonts.esm.css +1 -0
- package/dist/fonts.esm.js +3 -0
- package/dist/fonts.esm.js.map +1 -0
- package/dist/index.d.ts +13 -6
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +65 -40
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -112,7 +112,7 @@ var cn = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
|
112
112
|
|
|
113
113
|
var styles$7 = {"large":"styles-module_large__H3pFl","big":"styles-module_big__7pz1J","medium":"styles-module_medium__t6INL","small":"styles-module_small__uRhwP","primary":"styles-module_primary__2julr","secondary":"styles-module_secondary__gROHS","wrapper":"styles-module_wrapper__u8Nqe","error":"styles-module_error__IAdJu","inputWrapper":"styles-module_inputWrapper__cT5Sf","input":"styles-module_input__Ld3tZ","disabled":"styles-module_disabled__rsyOU","innerLabel":"styles-module_innerLabel__ZHN4s","wrapperLabel":"styles-module_wrapperLabel__bIz6S","label":"styles-module_label__-rV9d","main":"styles-module_main__HRguF","info":"styles-module_info__TsNHQ","errorText":"styles-module_errorText__2T1me","fadeIn":"styles-module_fadeIn__YucVP","inputPhone":"styles-module_inputPhone__2r-IM"};
|
|
114
114
|
|
|
115
|
-
const InputPhone = ({ size = "
|
|
115
|
+
const InputPhone = ({ size = "big", variants = "primary", disabled, tooltip, label, icon, error, innerLabel, placeholder, wrapperClassName, dropdownClassName, labelClassName, className, style, onValidate, onBlur, ...props }) => {
|
|
116
116
|
const isError = Boolean(error);
|
|
117
117
|
const validate = (value, data) => {
|
|
118
118
|
setTimeout(() => {
|
|
@@ -127,7 +127,7 @@ const InputPhone = ({ size = "medium", variants = "primary", disabled, tooltip,
|
|
|
127
127
|
}
|
|
128
128
|
}, 0);
|
|
129
129
|
};
|
|
130
|
-
return (jsxs("div", { style: style, className: cn(styles$7.wrapper, styles$7[size], styles$7[variants], { [styles$7.error]: isError }, { [styles$7.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$7.wrapperLabel, children: [jsx("span", { className: styles$7.label, children: label }), tooltip
|
|
130
|
+
return (jsxs("div", { style: style, className: cn(styles$7.wrapper, styles$7[size], styles$7[variants], { [styles$7.error]: isError }, { [styles$7.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$7.wrapperLabel, children: [jsx("span", { className: styles$7.label, children: label }), tooltip] })), jsxs("label", { className: cn(styles$7.inputWrapper, labelClassName), children: [icon, jsxs("div", { className: styles$7.main, children: [innerLabel && (jsx("span", { className: styles$7.innerLabel, children: innerLabel })), jsx(PhoneInput, { country: "ru", containerClass: styles$7.inputPhone, inputProps: {
|
|
131
131
|
className: cn(styles$7.input, className),
|
|
132
132
|
disabled,
|
|
133
133
|
placeholder: placeholder,
|
|
@@ -137,30 +137,30 @@ const InputPhone = ({ size = "medium", variants = "primary", disabled, tooltip,
|
|
|
137
137
|
}, ...props })] })] }), isError && (jsx("div", { className: styles$7.info, children: jsx("span", { className: styles$7.errorText, children: error }) }))] }));
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
var s$a = {"large":"styles-module_large__U-pse","big":"styles-module_big__YmU1e","medium":"styles-module_medium__UPwU3","small":"styles-module_small__3V02-","pink":"styles-module_pink__buQ-1","blue":"styles-module_blue__VqTWP","blue-dark":"styles-module_blue-dark__-HQiq","pink-strong":"styles-module_pink-strong__1Er7k","green":"styles-module_green__kJCWD","orange":"styles-module_orange__YY5wt","negative":"styles-module_negative__btzCe","outline":"styles-module_outline__uJQmO","wrapper":"styles-module_wrapper__BuUK1","placeholder":"styles-module_placeholder__Q056N"};
|
|
140
|
+
var s$a = {"large":"styles-module_large__U-pse","big":"styles-module_big__YmU1e","medium":"styles-module_medium__UPwU3","small":"styles-module_small__3V02-","pink":"styles-module_pink__buQ-1","blue":"styles-module_blue__VqTWP","blue-dark":"styles-module_blue-dark__-HQiq","pink-strong":"styles-module_pink-strong__1Er7k","green":"styles-module_green__kJCWD","orange":"styles-module_orange__YY5wt","negative":"styles-module_negative__btzCe","outline":"styles-module_outline__uJQmO","wrapper":"styles-module_wrapper__BuUK1","square":"styles-module_square__JAzsH","placeholder":"styles-module_placeholder__Q056N"};
|
|
141
141
|
|
|
142
|
-
const Badge = ({ color = "blue", size = "small", children, className, ...props }) => {
|
|
143
|
-
return (jsx("span", { className: cn(s$a.wrapper, s$a[color], s$a[size], className), ...props, children: children }));
|
|
142
|
+
const Badge = ({ color = "blue", size = "small", mode = "circle", children, className, ...props }) => {
|
|
143
|
+
return (jsx("span", { className: cn(s$a.wrapper, s$a[color], s$a[size], s$a[mode], className), ...props, children: children }));
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
var styles$6 = {"fill":"styles-module_fill__pflr0","content":"styles-module_content__625YX","button":"styles-module_button__Sh-fr","error":"styles-module_error__R0GCe","loading":"styles-module_loading__jL3RT","primary":"styles-module_primary__TRNPt","secondary":"styles-module_secondary__QKgly","outline":"styles-module_outline__-o6rL","clean":"styles-module_clean__qj08M","
|
|
146
|
+
var styles$6 = {"fill":"styles-module_fill__pflr0","content":"styles-module_content__625YX","button":"styles-module_button__Sh-fr","error":"styles-module_error__R0GCe","loading":"styles-module_loading__jL3RT","iconLoading":"styles-module_iconLoading__eNo4M","primary":"styles-module_primary__TRNPt","secondary":"styles-module_secondary__QKgly","outline":"styles-module_outline__-o6rL","clean":"styles-module_clean__qj08M","grey":"styles-module_grey__kAVD1","small":"styles-module_small__2DhLR","medium":"styles-module_medium__XYUXp","big":"styles-module_big__pPMzh","extra-big":"styles-module_extra-big__KOoAv","large":"styles-module_large__S6Yb5"};
|
|
147
147
|
|
|
148
148
|
const IconSvg = (props) => {
|
|
149
149
|
const { className, Svg, ...otherProps } = props;
|
|
150
150
|
return jsx(Svg, { className: className, ...otherProps });
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
var _path$
|
|
154
|
-
function _extends$
|
|
153
|
+
var _path$3;
|
|
154
|
+
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
155
155
|
var SvgButtonLoader = function SvgButtonLoader(props) {
|
|
156
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
156
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
157
157
|
xmlns: "http://www.w3.org/2000/svg",
|
|
158
158
|
xmlSpace: "preserve",
|
|
159
159
|
width: 40,
|
|
160
160
|
height: 40,
|
|
161
161
|
viewBox: "0 0 50 50"
|
|
162
|
-
}, props), _path$
|
|
163
|
-
fill: "
|
|
162
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
163
|
+
fill: "currentColor",
|
|
164
164
|
d: "M25.251 6.461c-10.318 0-18.683 8.365-18.683 18.683h4.068c0-8.071 6.543-14.615 14.615-14.615z"
|
|
165
165
|
}, /*#__PURE__*/React.createElement("animateTransform", {
|
|
166
166
|
attributeName: "transform",
|
|
@@ -177,15 +177,14 @@ const Button = ({ variants = "primary", size = "medium", mode = "content", class
|
|
|
177
177
|
return (jsxs("button", { type: type, className: cn(styles$6.button, styles$6[mode], styles$6[size], { [styles$6.error]: isError }, { [styles$6.loading]: loading }, styles$6[variants], className), ...props, children: [children, loading && jsx(IconSvg, { className: styles$6.iconLoading, Svg: SvgButtonLoader })] }));
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
var _path$
|
|
181
|
-
function _extends$
|
|
180
|
+
var _path$2;
|
|
181
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
182
182
|
var SvgChecked = function SvgChecked(props) {
|
|
183
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
183
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
184
184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
185
|
-
fill: "none",
|
|
186
|
-
viewBox: "0 0 20 15"
|
|
187
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
188
185
|
fill: "currentColor",
|
|
186
|
+
viewBox: "0 0 20 15"
|
|
187
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
189
188
|
fillRule: "evenodd",
|
|
190
189
|
d: "M19.637.86c.484.479.484 1.256 0 1.735L7.95 14.14a1.25 1.25 0 0 1-1.756 0L.363 8.366a1.217 1.217 0 0 1 .001-1.735 1.25 1.25 0 0 1 1.755.001l4.955 4.905L17.882.859a1.25 1.25 0 0 1 1.755 0",
|
|
191
190
|
clipRule: "evenodd"
|
|
@@ -203,7 +202,7 @@ const Checkbox = ({ variants = "primary", size = "medium", label, wrapperClassNa
|
|
|
203
202
|
|
|
204
203
|
var s$8 = {"groupContainer":"styles-module_groupContainer__SV4Rd","column":"styles-module_column__PDswu","row":"styles-module_row__DUJsL","groupLabel":"styles-module_groupLabel__MkcDm","errorText":"styles-module_errorText__R-7Nf","fadeIn":"styles-module_fadeIn__2aMav"};
|
|
205
204
|
|
|
206
|
-
const CheckboxGroup = ({ options, value, onChange, direction = "column", variants = "primary", size
|
|
205
|
+
const CheckboxGroup = ({ name, options, value, onChange, direction = "column", variants = "primary", size, label, error, className, }) => {
|
|
207
206
|
const handleChange = (optionValue) => {
|
|
208
207
|
const currentIndex = value.indexOf(optionValue);
|
|
209
208
|
const newValue = [...value];
|
|
@@ -215,7 +214,7 @@ const CheckboxGroup = ({ options, value, onChange, direction = "column", variant
|
|
|
215
214
|
}
|
|
216
215
|
onChange(newValue);
|
|
217
216
|
};
|
|
218
|
-
return (jsxs("div", { className: cn(s$8.wrapper, className), children: [label && jsx("div", { className: s$8.groupLabel, children: label }), jsx("div", { className: cn(s$8.groupContainer, s$8[direction]), children: options.map((option) => (jsx(Checkbox, { label: option.label, variants: variants, size: size, checked: value.includes(option.value), disabled: option.disabled, onChange: () => handleChange(option.value) }, option.value))) }), error && jsx("span", { className: s$8.errorText, children: error })] }));
|
|
217
|
+
return (jsxs("div", { className: cn(s$8.wrapper, className), children: [label && jsx("div", { className: s$8.groupLabel, children: label }), jsx("div", { className: cn(s$8.groupContainer, s$8[direction]), children: options.map((option) => (jsx(Checkbox, { name: name, label: option.label, variants: variants, size: size, checked: value.includes(option.value), disabled: option.disabled, onChange: () => handleChange(option.value) }, option.value))) }), error && jsx("span", { className: s$8.errorText, children: error })] }));
|
|
219
218
|
};
|
|
220
219
|
|
|
221
220
|
var s$7 = {"overlay":"styles-module_overlay__TlEXp","content":"styles-module_content__lbaYQ","offAutoResponse":"styles-module_offAutoResponse__yfLDj","header":"styles-module_header__kDAb-","title":"styles-module_title__1--Ss","empty":"styles-module_empty__WNgjM","close":"styles-module_close__9tjJt","shadow":"styles-module_shadow__2UZ5C","description":"styles-module_description__-iPkH"};
|
|
@@ -236,19 +235,19 @@ const Dialog = forwardRef(({ autoResponse = true, title, triggerSlot, closeSlot,
|
|
|
236
235
|
|
|
237
236
|
var styles$5 = {"large":"styles-module_large__ZDNNN","big":"styles-module_big__CtmSH","medium":"styles-module_medium__OGjLF","small":"styles-module_small__WcpZK","primary":"styles-module_primary__OVXIt","secondary":"styles-module_secondary__u34zy","wrapper":"styles-module_wrapper__JTZMt","error":"styles-module_error__UCrFp","inputWrapper":"styles-module_inputWrapper__6vUdk","input":"styles-module_input__KRJnF","disabled":"styles-module_disabled__NjJFs","innerLabel":"styles-module_innerLabel__dFfCy","wrapperLabel":"styles-module_wrapperLabel__Wf9Yq","label":"styles-module_label__-uPCz","main":"styles-module_main__hCKgf","info":"styles-module_info__vyky8","errorText":"styles-module_errorText__JTsOi","fadeIn":"styles-module_fadeIn__sXaJE"};
|
|
238
237
|
|
|
239
|
-
const Input = ({ size = "
|
|
238
|
+
const Input = ({ size = "big", variants = "primary", disabled, placeholder, tooltip, label, innerLabel, icon, error, wrapperClassName, labelClassName, className, style, mask, ...props }) => {
|
|
240
239
|
const isError = Boolean(error);
|
|
241
|
-
return (jsxs("div", { style: style, className: cn(styles$5.wrapper, styles$5[size], styles$5[variants], { [styles$5.error]: isError }, { [styles$5.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$5.wrapperLabel, children: [jsx("span", { className: styles$5.label, children: label }), tooltip
|
|
240
|
+
return (jsxs("div", { style: style, className: cn(styles$5.wrapper, styles$5[size], styles$5[variants], { [styles$5.error]: isError }, { [styles$5.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$5.wrapperLabel, children: [jsx("span", { className: styles$5.label, children: label }), tooltip] })), jsxs("label", { className: cn(styles$5.inputWrapper, labelClassName), children: [icon, jsxs("div", { className: styles$5.main, children: [innerLabel && (jsx("span", { className: styles$5.innerLabel, children: innerLabel })), mask ? (jsx(IMaskInput, { ...props, mask: mask, className: cn(styles$5.input, className), placeholder: placeholder, disabled: disabled })) : (jsx("input", { ...props, className: cn(styles$5.input, className), placeholder: placeholder, disabled: disabled }))] })] }), isError && (jsx("div", { className: styles$5.info, children: jsx("span", { className: styles$5.errorText, children: error }) }))] }));
|
|
242
241
|
};
|
|
243
242
|
|
|
244
|
-
var _path;
|
|
245
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
243
|
+
var _path$1;
|
|
244
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
246
245
|
var SvgAirplaneBold = function SvgAirplaneBold(props) {
|
|
247
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
246
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
248
247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
249
248
|
fill: "none",
|
|
250
249
|
viewBox: "0 0 24 24"
|
|
251
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
250
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
252
251
|
fill: "currentColor",
|
|
253
252
|
d: "m13.369 20.048 2.01-4.67.44-1.04c.08-.16.29-.3.47-.3h3.06c.96 0 2.1-.71 2.54-1.57.15-.3.15-.66 0-.96-.44-.85-1.59-1.56-2.55-1.56h-3.06c-.18 0-.39-.14-.47-.3l-2.45-5.7c-.26-.63-1.05-1.14-1.73-1.14h-1.32c-.85 0-1.27.64-.93 1.43l2.16 5.01c.17.39-.04.71-.47.71h-2.91c-.23 0-.56-.13-.72-.29l-2.33-2.32c-.24-.24-.71-.35-1.05-.24l-1.36.45c-.59.18-.87.85-.59 1.4l2 2.38c.31.36.31.95 0 1.31l-2 2.38c-.27.55 0 1.22.59 1.42l1.36.45c.33.11.81 0 1.05-.24l2.33-2.32c.16-.17.49-.3.72-.3h2.91c.43 0 .63.31.47.71l-2.16 5.01c-.34.79.08 1.43.93 1.43h1.32c.68 0 1.47-.51 1.74-1.14"
|
|
254
253
|
})));
|
|
@@ -6765,9 +6764,9 @@ const ContentComponent = ({ type = "single", options, selected = [], itemClassNa
|
|
|
6765
6764
|
}, children: itemSlot ? itemSlot(option) : option.value }, option.value))) }));
|
|
6766
6765
|
};
|
|
6767
6766
|
|
|
6768
|
-
var s$3 = {"large":"styles-module_large__V8bAH","big":"styles-module_big__v28A9","medium":"styles-module_medium__t7frd","small":"styles-module_small__qNgww","
|
|
6767
|
+
var s$3 = {"large":"styles-module_large__V8bAH","big":"styles-module_big__v28A9","medium":"styles-module_medium__t7frd","small":"styles-module_small__qNgww","container":"styles-module_container__CfDy4","wrapperLabel":"styles-module_wrapperLabel__ltsGs","label":"styles-module_label__eUUOm","triggerWrapper":"styles-module_triggerWrapper__zDxUQ","mainTrigger":"styles-module_mainTrigger__c8yqD","icon":"styles-module_icon__H-ce-","valueSlot":"styles-module_valueSlot__IY0Rl","disabled":"styles-module_disabled__A1ppA","innerLabel":"styles-module_innerLabel__bJDLX","error":"styles-module_error__w1Lsu","info":"styles-module_info__ZzD01","errorText":"styles-module_errorText__7kPjp","fadeIn":"styles-module_fadeIn__6-wKP","spinner":"styles-module_spinner__fJqkq","content":"styles-module_content__cfsyv","fadeInLeft":"styles-module_fadeInLeft__OStLc","fadeOutLeft":"styles-module_fadeOutLeft__xEzkz","fadeInRight":"styles-module_fadeInRight__UF0-F","fadeOutRight":"styles-module_fadeOutRight__bXPi2","fadeInBottom":"styles-module_fadeInBottom__Cf7KT","fadeOutBottom":"styles-module_fadeOutBottom__zoJUH","fadeInTop":"styles-module_fadeInTop__4laKa","fadeOutTop":"styles-module_fadeOutTop__WMgsY"};
|
|
6769
6768
|
|
|
6770
|
-
const Select = ({ triggerSlot, align = "start", avoidCollisions = true, modal = false, closeOnScroll = false, contentClassName, type = "single", onSelect, selected = [], onOpenChange, error, size = "
|
|
6769
|
+
const Select = ({ triggerSlot, align = "start", avoidCollisions = true, modal = false, closeOnScroll = false, contentClassName, type = "single", onSelect, selected = [], onOpenChange, error, size = "big", variants = "primary", label, innerLabel = "innerLabel", tooltip, disabled, wrapperClassName, ...rest }) => {
|
|
6771
6770
|
const [open, setOpen] = useState(false);
|
|
6772
6771
|
const isError = Boolean(error);
|
|
6773
6772
|
const handleOpenChange = useCallback((isOpen) => {
|
|
@@ -6802,7 +6801,7 @@ const Select = ({ triggerSlot, align = "start", avoidCollisions = true, modal =
|
|
|
6802
6801
|
onOpenChange?.(false);
|
|
6803
6802
|
}
|
|
6804
6803
|
};
|
|
6805
|
-
return (jsxs("div", { className: cn(s$3.container, s$3[size], s$3[variants], { [s$3.error]: isError, [s$3.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: s$3.wrapperLabel, children: [jsx("span", { className: s$3.label, children: label }), tooltip
|
|
6804
|
+
return (jsxs("div", { className: cn(s$3.container, s$3[size], s$3[variants], { [s$3.error]: isError, [s$3.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: s$3.wrapperLabel, children: [jsx("span", { className: s$3.label, children: label }), tooltip] })), jsxs(Root2, { modal: modal, open: open, onOpenChange: handleOpenChange, children: [jsx(Trigger, { asChild: true, disabled: disabled, children: jsx("div", { className: s$3.triggerWrapper, children: jsxs("div", { className: s$3.mainTrigger, children: [innerLabel && jsx("span", { className: s$3.innerLabel, children: innerLabel }), jsx("div", { className: s$3.valueSlot, children: triggerSlot }), jsx("div", { className: s$3.icon, children: open ? jsx(ChevronUp, {}) : jsx(ChevronDown, {}) })] }) }) }), jsx(Portal2, { children: jsx(Content2, { align: align, avoidCollisions: avoidCollisions, sideOffset: 4, className: cn(s$3.content, contentClassName), children: jsx(ContentComponent, { ...rest, type: type, selected: selected, onSelect: handleSelect }) }) })] }), isError && (jsx("div", { className: s$3.info, children: jsx("span", { className: s$3.errorText, children: error }) }))] }));
|
|
6806
6805
|
};
|
|
6807
6806
|
|
|
6808
6807
|
const Spinner = ({ className, ...props }) => {
|
|
@@ -6829,16 +6828,16 @@ var styles$4 = {"large":"styles-module_large__oVXBS","big":"styles-module_big__g
|
|
|
6829
6828
|
|
|
6830
6829
|
const Textarea = ({ size = "medium", variants = "primary", disabled, placeholder, tooltip, label, innerLabel, icon, error, hint, wrapperClassName, labelClassName, className, style, ...props }) => {
|
|
6831
6830
|
const isError = Boolean(error);
|
|
6832
|
-
return (jsxs("div", { style: style, className: cn(styles$4.wrapper, styles$4[size], styles$4[variants], { [styles$4.error]: isError }, { [styles$4.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$4.wrapperLabel, children: [
|
|
6831
|
+
return (jsxs("div", { style: style, className: cn(styles$4.wrapper, styles$4[size], styles$4[variants], { [styles$4.error]: isError }, { [styles$4.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$4.wrapperLabel, children: [jsx("span", { className: styles$4.label, children: label }), tooltip] })), jsxs("label", { className: cn(styles$4.inputWrapper, styles$4.textareaWrapper, labelClassName), children: [icon, jsxs("div", { className: styles$4.main, children: [innerLabel && (jsx("span", { className: styles$4.innerLabel, children: innerLabel })), jsx("textarea", { ...props, className: cn(styles$4.input, styles$4.textarea, className), placeholder: placeholder, disabled: disabled })] })] }), (isError || hint) && (jsx("div", { className: styles$4.info, children: isError ? (jsx("span", { className: styles$4.errorText, children: error })) : (hint && jsx("span", { className: styles$4.hintText, children: hint })) }))] }));
|
|
6833
6832
|
};
|
|
6834
6833
|
|
|
6835
6834
|
var styles$3 = {"large":"styles-module_large__r2RVu","big":"styles-module_big__XlE6T","medium":"styles-module_medium__U5m2p","small":"styles-module_small__GJ-S9","primary":"styles-module_primary__xUXLt","secondary":"styles-module_secondary__k9-wR","container":"styles-module_container__NRNZs","error":"styles-module_error__pQozd","main":"styles-module_main__ycD3X","item":"styles-module_item__ZnkRi","disabled":"styles-module_disabled__EciS-","wrapperLabel":"styles-module_wrapperLabel__QxUAh","label":"styles-module_label__2plZO","wrapper":"styles-module_wrapper__w34ig","info":"styles-module_info__FA7eE","errorText":"styles-module_errorText__zMlXo","fadeIn":"styles-module_fadeIn__9kWvO"};
|
|
6836
6835
|
|
|
6837
6836
|
const ToggleItem = ({ item, className, }) => (jsx(Item$2, { value: item.value ?? "", disabled: item.disabled, className: cn(styles$3.item, className, item.className), children: item.children }));
|
|
6838
6837
|
|
|
6839
|
-
const Toggle = ({ size = "
|
|
6838
|
+
const Toggle = ({ size = "big", variants = "primary", label, tooltip, items, error, wrapperClassName, itemClassName, disabled, ...props }) => {
|
|
6840
6839
|
const isError = Boolean(error);
|
|
6841
|
-
return (jsxs("div", { className: cn(styles$3.container, styles$3[size], styles$3[variants], { [styles$3.error]: isError, [styles$3.disabled]: disabled }, wrapperClassName), children: [jsxs("div", { className: styles$3.wrapperLabel, children: [
|
|
6840
|
+
return (jsxs("div", { className: cn(styles$3.container, styles$3[size], styles$3[variants], { [styles$3.error]: isError, [styles$3.disabled]: disabled }, wrapperClassName), children: [(label || tooltip) && (jsxs("div", { className: styles$3.wrapperLabel, children: [jsx("span", { className: styles$3.label, children: label }), tooltip] })), jsx(Root$7, { className: styles$3.wrapper, disabled: disabled, ...props, children: jsx("div", { className: styles$3.main, children: items.map((item) => (jsx(ToggleItem, { item: item, className: itemClassName }, item.value))) }) }), isError && (jsx("div", { className: styles$3.info, children: jsx("span", { className: styles$3.errorText, children: error }) }))] }));
|
|
6842
6841
|
};
|
|
6843
6842
|
|
|
6844
6843
|
var styles$2 = {"content":"styles-module_content__l9ues","wrapper":"styles-module_wrapper__s-xzi","title":"styles-module_title__ksDH8","trigger":"styles-module_trigger__wJ2S1","arrow":"styles-module_arrow__uDzUu"};
|
|
@@ -6847,10 +6846,10 @@ const Tooltip = ({ text, title, contentProps, wrapperClassName, triggerSlot, ...
|
|
|
6847
6846
|
return (jsx(Provider, { children: jsxs(Root$8, { delayDuration: 0, ...props, children: [jsx(Trigger$4, { className: styles$2.trigger, asChild: true, children: triggerSlot }), jsx(Portal$4, { children: jsxs(Content$4, { sideOffset: 4, ...contentProps, className: cn(styles$2.content, contentProps?.className), children: [jsxs("div", { className: cn(styles$2.wrapper, wrapperClassName), children: [title && jsx("span", { className: styles$2.title, children: title }), text] }), jsx(Arrow$2, { className: styles$2.arrow })] }) })] }) }));
|
|
6848
6847
|
};
|
|
6849
6848
|
|
|
6850
|
-
var styles$1 = {"primary":"styles-module_primary__fn5p8","secondary":"styles-module_secondary__a7Bsn","wrapper":"styles-module_wrapper__DYUx8","disabled":"styles-module_disabled__UrSjN","customRadio":"styles-module_customRadio__WqC3X","realRadio":"styles-module_realRadio__KlCHa","checked":"styles-module_checked__lr1th"
|
|
6849
|
+
var styles$1 = {"big":"styles-module_big__1C7dr","labelText":"styles-module_labelText__WL0Os","medium":"styles-module_medium__VjDJe","small":"styles-module_small__RJDol","primary":"styles-module_primary__fn5p8","secondary":"styles-module_secondary__a7Bsn","wrapper":"styles-module_wrapper__DYUx8","disabled":"styles-module_disabled__UrSjN","customRadio":"styles-module_customRadio__WqC3X","realRadio":"styles-module_realRadio__KlCHa","checked":"styles-module_checked__lr1th"};
|
|
6851
6850
|
|
|
6852
|
-
const Radio = ({ variants = "primary", label, hideCircle = false, disabled, className, wrapperClassName, checked, ...props }) => {
|
|
6853
|
-
return (jsxs("label", { className: cn(styles$1.wrapper, styles$1[variants], {
|
|
6851
|
+
const Radio = ({ variants = "primary", size = "medium", label, hideCircle = false, disabled, className, wrapperClassName, checked, ...props }) => {
|
|
6852
|
+
return (jsxs("label", { className: cn(styles$1.wrapper, styles$1[variants], styles$1[size], {
|
|
6854
6853
|
[styles$1.disabled]: disabled,
|
|
6855
6854
|
[styles$1.checked]: checked,
|
|
6856
6855
|
}, wrapperClassName), children: [jsx("input", { ...props, type: "radio", checked: checked, disabled: disabled, className: styles$1.realRadio }), !hideCircle && jsx("span", { className: cn(styles$1.customRadio, className) }), label && jsx("span", { className: styles$1.labelText, children: label })] }));
|
|
@@ -21289,8 +21288,34 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
21289
21288
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
21290
21289
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
21291
21290
|
|
|
21291
|
+
var _path, _path2, _path3;
|
|
21292
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21293
|
+
var SvgCalendar = function SvgCalendar(props) {
|
|
21294
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21295
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21296
|
+
width: 20,
|
|
21297
|
+
height: 22,
|
|
21298
|
+
fill: "none"
|
|
21299
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
21300
|
+
fill: "#898989",
|
|
21301
|
+
fillRule: "evenodd",
|
|
21302
|
+
d: "M6 0a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1M14 0a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0V1a1 1 0 0 1 1-1M.5 8.09a1 1 0 0 1 1-1h17a1 1 0 1 1 0 2h-17a1 1 0 0 1-1-1",
|
|
21303
|
+
clipRule: "evenodd"
|
|
21304
|
+
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
21305
|
+
fill: "#898989",
|
|
21306
|
+
fillRule: "evenodd",
|
|
21307
|
+
d: "M2.92 4.555C2.337 5.184 2 6.153 2 7.5V16c0 1.347.337 2.316.92 2.945C3.491 19.559 4.44 20 6 20h8c1.56 0 2.509-.44 3.08-1.055.583-.629.92-1.598.92-2.945V7.5c0-1.347-.337-2.316-.92-2.945C16.509 3.941 15.56 3.5 14 3.5H6c-1.56 0-2.509.44-3.08 1.055m-1.465-1.36C2.509 2.059 4.059 1.5 6 1.5h8c1.94 0 3.491.56 4.545 1.695C19.587 4.316 20 5.847 20 7.5V16c0 1.653-.413 3.184-1.455 4.305C17.491 21.441 15.941 22 14 22H6c-1.94 0-3.491-.56-4.545-1.695C.413 19.185 0 17.653 0 16V7.5c0-1.653.413-3.184 1.455-4.305",
|
|
21308
|
+
clipRule: "evenodd"
|
|
21309
|
+
})), _path3 || (_path3 = /*#__PURE__*/React.createElement("path", {
|
|
21310
|
+
fill: "#898989",
|
|
21311
|
+
fillRule: "evenodd",
|
|
21312
|
+
d: "M8.995 12.7a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2h-.01a1 1 0 0 1-1-1M5.294 12.7a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2h-.01a1 1 0 0 1-1-1M5.294 15.7a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2h-.01a1 1 0 0 1-1-1",
|
|
21313
|
+
clipRule: "evenodd"
|
|
21314
|
+
})));
|
|
21315
|
+
};
|
|
21316
|
+
|
|
21292
21317
|
registerLocale("ru", ru);
|
|
21293
|
-
const FlexibleDatePicker = ({ isRange, value, onChange, label, error, disabled, placeholder, }) => {
|
|
21318
|
+
const FlexibleDatePicker = ({ isRange, value, onChange, label, innerLabel, error, disabled, placeholder, name, ref, }) => {
|
|
21294
21319
|
const today = new Date();
|
|
21295
21320
|
const commonProps = {
|
|
21296
21321
|
minDate: today,
|
|
@@ -21298,17 +21323,17 @@ const FlexibleDatePicker = ({ isRange, value, onChange, label, error, disabled,
|
|
|
21298
21323
|
locale: "ru",
|
|
21299
21324
|
dateFormat: "dd.MM.yyyy",
|
|
21300
21325
|
disabled: disabled,
|
|
21301
|
-
customInput: (jsx(Input, { label: label, error: error, placeholder: placeholder || (isRange ? "ДД.ММ.ГГГГ - ДД.ММ.ГГГГ" : "ДД.ММ.ГГГГ") })),
|
|
21326
|
+
customInput: (jsx(Input, { label: label, innerLabel: innerLabel, error: error, icon: jsx(SvgCalendar, {}), placeholder: placeholder || (isRange ? "ДД.ММ.ГГГГ - ДД.ММ.ГГГГ" : "ДД.ММ.ГГГГ") })),
|
|
21302
21327
|
};
|
|
21303
21328
|
if (isRange) {
|
|
21304
|
-
return (jsx("div", { className: `datepicker-container ${error ? "has-error" : ""}`, children: jsx(DatePicker, { ...commonProps, selectsRange: true, startDate: value[0], endDate: value[1], onChange: (dates) => onChange(dates) }) }));
|
|
21329
|
+
return (jsx("div", { className: `datepicker-container ${error ? "has-error" : ""}`, children: jsx(DatePicker, { ...commonProps, name: name, selectsRange: true, startDate: value[0], endDate: value[1], onChange: (dates) => onChange(dates) }) }));
|
|
21305
21330
|
}
|
|
21306
|
-
return (jsx("div", { className: `datepicker-container ${error ? "has-error" : ""}`, children: jsx(DatePicker, { ...commonProps, selectsRange: false, selected: value, onChange: (date) => onChange(date) }) }));
|
|
21331
|
+
return (jsx("div", { className: `datepicker-container ${error ? "has-error" : ""}`, children: jsx(DatePicker, { ref: ref, ...commonProps, name: name, selectsRange: false, selected: value, onChange: (date) => onChange(date) }) }));
|
|
21307
21332
|
};
|
|
21308
21333
|
|
|
21309
21334
|
var styles = {"dropdown":"styles-module_dropdown__r2ZRv","spinner":"styles-module_spinner__jWICO","spinnerIcon":"styles-module_spinnerIcon__tlrI0","searchContainer":"styles-module_searchContainer__fpcJw","itemCities":"styles-module_itemCities__rZ791","cityName":"styles-module_cityName__eANiN","parentName":"styles-module_parentName__8vj8A","airportCode":"styles-module_airportCode__d7a62","itemAirports":"styles-module_itemAirports__2jtCy","itemAirportsWrap":"styles-module_itemAirportsWrap__hYo-2","airportNameDetail":"styles-module_airportNameDetail__KxksW","airportContext":"styles-module_airportContext__BWXC1","airportCodeSmall":"styles-module_airportCodeSmall__51L1S"};
|
|
21310
21335
|
|
|
21311
|
-
const CitySearch = ({ value, onChange, error, label, }) => {
|
|
21336
|
+
const CitySearch = ({ value, onChange, error, label, ref, }) => {
|
|
21312
21337
|
const [results, setResults] = useState([]);
|
|
21313
21338
|
const [isOpen, setIsOpen] = useState(false);
|
|
21314
21339
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -21358,7 +21383,7 @@ const CitySearch = ({ value, onChange, error, label, }) => {
|
|
|
21358
21383
|
return (jsxs(React__default.Fragment, { children: [jsxs("li", { id: `${el.city} ${el.airport_code}`, onClick: onSuggestionClick, onKeyDown: onSuggestionKeyDown, className: styles.itemCities, role: "option", "aria-selected": "false", tabIndex: 0, children: [jsxs("div", { className: styles.cityInfo, children: [jsx("span", { className: styles.cityName, children: el.name }), jsx("span", { className: styles.parentName, children: locationInfo })] }), jsx("span", { className: styles.airportCode, children: el.airport_code })] }), el.airports &&
|
|
21359
21384
|
Object.entries(el.airports).map(([code, airports]) => (jsxs("li", { id: `${airports} ${code}`, onClick: onSuggestionClick, onKeyDown: onSuggestionKeyDown, className: styles.itemAirports, role: "option", "aria-selected": "false", tabIndex: 0, children: [jsxs("div", { className: styles.itemAirportsWrap, children: [jsx("span", { className: styles.airportNameDetail, children: airports.toLowerCase() }), jsxs("div", { className: styles.airportContext, children: [jsx("span", { className: styles.cityNameSmall, children: el.name }), jsx("span", { className: styles.parentNameSmall, children: locationInfo })] })] }), jsx("span", { className: styles.airportCodeSmall, children: code })] }, code)))] }, el.airport_code));
|
|
21360
21385
|
};
|
|
21361
|
-
return (jsxs("div", { className: styles.searchContainer, onBlur: () => setTimeout(() => setIsOpen(false), 200), children: [jsx(Input, { label: label, value: value, onChange: onChangeSearch, onFocus: onChangeSearch, placeholder: "\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C \u0433\u043E\u0440\u043E\u0434...", autoComplete: "off", error: error, icon: isLoading ? (jsx("span", { className: styles.spinner, children: jsx("span", { className: styles.spinnerIcon }) })) : undefined }), isOpen && results.length > 0 && (jsx("ul", { className: styles.dropdown, role: "listbox", children: results.map((city) => renderCities(city)) }))] }));
|
|
21386
|
+
return (jsxs("div", { ref: ref, className: styles.searchContainer, onBlur: () => setTimeout(() => setIsOpen(false), 200), children: [jsx(Input, { label: label, value: value, onChange: onChangeSearch, onFocus: onChangeSearch, placeholder: "\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C \u0433\u043E\u0440\u043E\u0434...", autoComplete: "off", error: error, icon: isLoading ? (jsx("span", { className: styles.spinner, children: jsx("span", { className: styles.spinnerIcon }) })) : undefined }), isOpen && results.length > 0 && (jsx("ul", { className: styles.dropdown, role: "listbox", children: results.map((city) => renderCities(city)) }))] }));
|
|
21362
21387
|
};
|
|
21363
21388
|
|
|
21364
21389
|
export { Accordion, Badge, Button, Checkbox, CheckboxGroup, CitySearch, Dialog, FlexibleDatePicker, Input, InputPhone, Loader, RadioGroup, Select, Spinner, Switch, Tabs, Tag, Textarea, Toggle, Tooltip };
|