@alphakits/ui 2.5.8 → 2.5.11
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/amount-input/component.js +130 -117
- package/dist/amount-input/index.css +1 -1
- package/dist/amount-input/index.module.css.js +14 -12
- package/dist/amount-input/utils/index.d.ts +9 -3
- package/dist/amount-input/utils/index.js +80 -30
- package/dist/header-search/component.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +158 -156
- package/dist/settings-hint/component.d.ts +11 -0
- package/dist/settings-hint/component.js +30 -0
- package/dist/settings-hint/index.css +1 -0
- package/dist/settings-hint/index.d.ts +1 -0
- package/dist/settings-hint/index.js +4 -0
- package/dist/settings-hint/index.module.css.js +19 -0
- package/dist/table/components/table-header/index.d.ts +1 -1
- package/dist/table/components/table-header/index.js +11 -11
- package/dist/table/table.js +1 -1
- package/dist/toast/component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,157 +1,170 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getCurrencySymbol as
|
|
5
|
-
import { Input as
|
|
6
|
-
import { THINSP as
|
|
7
|
-
import { withSuffix as
|
|
1
|
+
import { jsxs as p, jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import j from "classnames";
|
|
3
|
+
import { forwardRef as rt, useRef as O, useState as P, useEffect as it, useCallback as S, useLayoutEffect as st, Fragment as at } from "react";
|
|
4
|
+
import { getCurrencySymbol as ot } from "../utils/get-currency-symbol/util.js";
|
|
5
|
+
import { Input as ct } from "../input/component.js";
|
|
6
|
+
import { THINSP as $, isCurrencyFirst as lt } from "../utils/format-amount/util.js";
|
|
7
|
+
import { withSuffix as ut } from "../with-suffix/component.js";
|
|
8
8
|
import i from "./index.module.css.js";
|
|
9
|
-
import { formatAmountInputValue as
|
|
10
|
-
const
|
|
9
|
+
import { formatAmountInputValue as T, getAmountValueFromStr as mt, isPhantomZeroDisplay as z, stripAmountFormatting as g, normalizeAmountDisplay as ft, shouldShowMinorPart as dt, getFormattedValue as pt, getRawCaretIndex as ht, getCaretPositionForRawIndex as wt, isWholeAmountType as St } from "./utils/index.js";
|
|
10
|
+
const xt = ut(ct), Et = rt(
|
|
11
11
|
({
|
|
12
12
|
value: o = null,
|
|
13
|
-
integerLength:
|
|
14
|
-
suffix:
|
|
15
|
-
placeholder:
|
|
16
|
-
bold:
|
|
17
|
-
type:
|
|
18
|
-
className:
|
|
19
|
-
focusedClassName:
|
|
20
|
-
required:
|
|
21
|
-
dataTestId:
|
|
22
|
-
clear:
|
|
23
|
-
allowNegative:
|
|
24
|
-
onChange:
|
|
25
|
-
onClear:
|
|
26
|
-
onBlur:
|
|
27
|
-
onFocus:
|
|
28
|
-
...
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
() =>
|
|
13
|
+
integerLength: C = 9,
|
|
14
|
+
suffix: c = "RUR",
|
|
15
|
+
placeholder: k = "0",
|
|
16
|
+
bold: V = !0,
|
|
17
|
+
type: s = "default",
|
|
18
|
+
className: v,
|
|
19
|
+
focusedClassName: B,
|
|
20
|
+
required: H,
|
|
21
|
+
dataTestId: U,
|
|
22
|
+
clear: Z = !1,
|
|
23
|
+
allowNegative: E = !1,
|
|
24
|
+
onChange: l,
|
|
25
|
+
onClear: x,
|
|
26
|
+
onBlur: F,
|
|
27
|
+
onFocus: A,
|
|
28
|
+
...u
|
|
29
|
+
}, G) => {
|
|
30
|
+
const R = St(s), y = O(!1), [r, f] = P(
|
|
31
|
+
() => T(o, s, c)
|
|
32
32
|
);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, [o,
|
|
36
|
-
const
|
|
33
|
+
it(() => {
|
|
34
|
+
y.current || f(T(o, s, c));
|
|
35
|
+
}, [o, s, c]);
|
|
36
|
+
const I = S(
|
|
37
37
|
(e, t) => {
|
|
38
|
-
|
|
39
|
-
value:
|
|
38
|
+
l && l(e, {
|
|
39
|
+
value: mt(t, s),
|
|
40
40
|
valueString: t
|
|
41
41
|
});
|
|
42
42
|
},
|
|
43
|
-
[l,
|
|
44
|
-
),
|
|
43
|
+
[l, s]
|
|
44
|
+
), J = (e) => {
|
|
45
45
|
const t = e.target;
|
|
46
|
-
let
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
if (!
|
|
52
|
-
const
|
|
46
|
+
let n = g(t.value);
|
|
47
|
+
const et = g(r);
|
|
48
|
+
z(et) && /^-?0[1-9](?!,)/.test(n) && (n = n.replace(/^(-?)0([1-9])/, "$1$2"));
|
|
49
|
+
const D = n.startsWith("-");
|
|
50
|
+
if (D) {
|
|
51
|
+
if (!E) {
|
|
52
|
+
const a = t.selectionStart - 1;
|
|
53
53
|
window.requestAnimationFrame(() => {
|
|
54
|
-
t.selectionStart =
|
|
54
|
+
t.selectionStart = a, t.selectionEnd = a;
|
|
55
55
|
});
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
n = n.slice(1);
|
|
59
59
|
}
|
|
60
|
-
if (!RegExp(`(^[0-9]{1,${
|
|
61
|
-
|
|
62
|
-
)) {
|
|
63
|
-
const
|
|
60
|
+
if (!(R ? RegExp(`(^[0-9]{1,${C}}$|^\\s*$)`).test(n) : RegExp(`(^[0-9]{1,${C}}(,([0-9]+)?)?$|^\\s*$)`).test(
|
|
61
|
+
n
|
|
62
|
+
))) {
|
|
63
|
+
const a = t.selectionStart - 1;
|
|
64
64
|
window.requestAnimationFrame(() => {
|
|
65
|
-
t.selectionStart =
|
|
65
|
+
t.selectionStart = a, t.selectionEnd = a;
|
|
66
66
|
});
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const Q = f.length - $, C = t.selectionStart + Q;
|
|
81
|
-
window.requestAnimationFrame(() => {
|
|
82
|
-
t.selectionStart = C, t.selectionEnd = C;
|
|
83
|
-
});
|
|
69
|
+
D && E && (n = `-${n}`);
|
|
70
|
+
const N = pt(n, s), nt = ht(t.value, t.selectionStart ?? 0);
|
|
71
|
+
f(N), I(e, N), window.requestAnimationFrame(() => {
|
|
72
|
+
const a = wt(N, nt);
|
|
73
|
+
t.selectionStart = a, t.selectionEnd = a;
|
|
74
|
+
});
|
|
75
|
+
}, h = r.replace(/^-/, ""), K = r.startsWith("-"), d = h.indexOf(","), L = d === -1 ? h : h.slice(0, d), W = d === -1 ? void 0 : h.slice(d + 1), Q = !R && d !== -1, w = ot(c) || c, m = lt(c), b = O(null), [X, q] = P(0);
|
|
76
|
+
st(() => {
|
|
77
|
+
if (!m) {
|
|
78
|
+
q(0);
|
|
79
|
+
return;
|
|
84
80
|
}
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
const e = b.current;
|
|
82
|
+
e && q(e.offsetWidth);
|
|
83
|
+
}, [m, w, V]);
|
|
84
|
+
const Y = S(
|
|
87
85
|
(e) => {
|
|
88
|
-
|
|
86
|
+
y.current = !0;
|
|
87
|
+
const t = e.currentTarget;
|
|
88
|
+
z(g(r)) && (o == null || o === 0) && f(""), !u.readOnly && !u.disabled && window.requestAnimationFrame(() => {
|
|
89
|
+
t.select();
|
|
90
|
+
}), A && A(e);
|
|
89
91
|
},
|
|
90
|
-
[
|
|
91
|
-
),
|
|
92
|
+
[r, A, u.disabled, u.readOnly, o]
|
|
93
|
+
), _ = S(
|
|
92
94
|
(e) => {
|
|
93
|
-
|
|
94
|
-
const t =
|
|
95
|
-
t !==
|
|
95
|
+
y.current = !1;
|
|
96
|
+
const t = ft(r, s);
|
|
97
|
+
t !== r && (f(t), I(e, t)), F && F(e);
|
|
96
98
|
},
|
|
97
|
-
[
|
|
98
|
-
),
|
|
99
|
+
[I, r, F, s]
|
|
100
|
+
), tt = S(
|
|
99
101
|
(e) => {
|
|
100
|
-
|
|
102
|
+
f(""), l && l(
|
|
101
103
|
e,
|
|
102
104
|
{
|
|
103
105
|
value: null,
|
|
104
106
|
valueString: ""
|
|
105
107
|
}
|
|
106
|
-
),
|
|
108
|
+
), x && x(e);
|
|
107
109
|
},
|
|
108
|
-
[
|
|
109
|
-
)
|
|
110
|
-
return /* @__PURE__ */
|
|
110
|
+
[l, x]
|
|
111
|
+
);
|
|
112
|
+
return /* @__PURE__ */ p(
|
|
111
113
|
"div",
|
|
112
114
|
{
|
|
113
|
-
className:
|
|
114
|
-
[i.bold]:
|
|
115
|
-
[i.filled]: !!
|
|
115
|
+
className: j(i.container, {
|
|
116
|
+
[i.bold]: V,
|
|
117
|
+
[i.filled]: !!r
|
|
116
118
|
}),
|
|
117
|
-
children:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
children: [
|
|
120
|
+
m && /* @__PURE__ */ p("span", { ref: b, className: i.prefixMeasure, "aria-hidden": !0, children: [
|
|
121
|
+
w,
|
|
122
|
+
$
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ M(
|
|
125
|
+
xt,
|
|
126
|
+
{
|
|
127
|
+
...u,
|
|
128
|
+
autoComplete: "off",
|
|
129
|
+
style: {
|
|
130
|
+
...u.style,
|
|
131
|
+
...m ? { textIndent: X } : null
|
|
132
|
+
},
|
|
133
|
+
suffix: /* @__PURE__ */ p(at, { children: [
|
|
134
|
+
m && /* @__PURE__ */ p("span", { className: i.currency, children: [
|
|
135
|
+
w,
|
|
136
|
+
$
|
|
137
|
+
] }),
|
|
138
|
+
K && "-",
|
|
139
|
+
L,
|
|
140
|
+
Q && /* @__PURE__ */ M("span", { className: i.minorPart, children: dt(W) ? `,${W}` : "," }),
|
|
141
|
+
!m && /* @__PURE__ */ p("span", { className: i.currency, children: [
|
|
142
|
+
$,
|
|
143
|
+
w
|
|
144
|
+
] })
|
|
125
145
|
] }),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
onFocus: U,
|
|
145
|
-
onBlur: Z,
|
|
146
|
-
onClear: G,
|
|
147
|
-
dataTestId: B,
|
|
148
|
-
ref: M
|
|
149
|
-
}
|
|
150
|
-
)
|
|
146
|
+
suffixContainerClassName: i.suffixContainer,
|
|
147
|
+
clear: Z,
|
|
148
|
+
required: H,
|
|
149
|
+
placeholder: k,
|
|
150
|
+
value: r,
|
|
151
|
+
className: j(i.component, v),
|
|
152
|
+
focusedClassName: B,
|
|
153
|
+
inputClassName: i.input,
|
|
154
|
+
inputMode: R ? "numeric" : "decimal",
|
|
155
|
+
onChange: J,
|
|
156
|
+
onFocus: Y,
|
|
157
|
+
onBlur: _,
|
|
158
|
+
onClear: tt,
|
|
159
|
+
dataTestId: U,
|
|
160
|
+
ref: G
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
151
164
|
}
|
|
152
165
|
);
|
|
153
166
|
}
|
|
154
167
|
);
|
|
155
168
|
export {
|
|
156
|
-
|
|
169
|
+
Et as AmountInput
|
|
157
170
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--text-primary-color: var(--color-text-primary);--text-secondary-color: var(--color-text-secondary);--text-tertiary-color: var(--color-text-tertiary);--border-radius: 4px;--focus-color: var(--color-border-link);--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, sans-serif;--disabled-cursor: not-allowed;--arrow-transform: rotate(180deg)}:root{--amount-input-minor-part-and-currency-color: var(--color-text-secondary)}.container_AHkd{position:relative}.minorPart_Yv3O,.currency_ROce{color:var(--amount-input-minor-part-and-currency-color)}.suffixContainer_J46v>*:first-child{display:none}.filled_GrmG .input_Ims0,.input_Ims0:focus{-webkit-text-fill-color:transparent;caret-color:currentColor;font-size:16px!important}.bold_tpPh .input_Ims0,.bold_tpPh .suffix{font-weight:700}
|
|
1
|
+
:root{--text-primary-color: var(--color-text-primary);--text-secondary-color: var(--color-text-secondary);--text-tertiary-color: var(--color-text-tertiary);--border-radius: 4px;--focus-color: var(--color-border-link);--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, sans-serif;--disabled-cursor: not-allowed;--arrow-transform: rotate(180deg)}:root{--amount-input-minor-part-and-currency-color: var(--color-text-secondary)}.container_AHkd{position:relative}.minorPart_Yv3O,.currency_ROce{color:var(--amount-input-minor-part-and-currency-color)}.suffixContainer_J46v>*:first-child{display:none}.prefixMeasure_o-kM{font-size:16px!important;line-height:20px;font-weight:400;font-family:var(--font-family);position:absolute;visibility:hidden;pointer-events:none;white-space:pre;font-size:16px}.bold_tpPh .prefixMeasure_o-kM{font-weight:700}.filled_GrmG .input_Ims0,.input_Ims0:focus{-webkit-text-fill-color:transparent;caret-color:currentColor;font-size:16px!important}.bold_tpPh .input_Ims0,.bold_tpPh .suffix{font-weight:700}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as __css from './index.css';
|
|
2
2
|
export const __cssModule = __css;
|
|
3
|
-
const n = "container_AHkd",
|
|
3
|
+
const n = "container_AHkd", r = "minorPart_Yv3O", e = "currency_ROce", t = "suffixContainer_J46v", o = "prefixMeasure_o-kM", i = "bold_tpPh", c = "filled_GrmG", s = "input_Ims0", a = {
|
|
4
4
|
container: n,
|
|
5
|
-
minorPart:
|
|
6
|
-
currency:
|
|
7
|
-
suffixContainer:
|
|
5
|
+
minorPart: r,
|
|
6
|
+
currency: e,
|
|
7
|
+
suffixContainer: t,
|
|
8
|
+
prefixMeasure: o,
|
|
9
|
+
bold: i,
|
|
8
10
|
filled: c,
|
|
9
|
-
input:
|
|
10
|
-
bold: e
|
|
11
|
+
input: s
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
i as bold,
|
|
14
15
|
n as container,
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
e as currency,
|
|
17
|
+
a as default,
|
|
17
18
|
c as filled,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
s as input,
|
|
20
|
+
r as minorPart,
|
|
21
|
+
o as prefixMeasure,
|
|
22
|
+
t as suffixContainer
|
|
21
23
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { CurrencyCodes } from '../../utils/data/currency-codes';
|
|
2
2
|
import { AmountValueType } from '../../utils/format-amount/util';
|
|
3
|
+
export declare function isWholeAmountType(amountType: AmountValueType): boolean;
|
|
4
|
+
export declare function stripAmountFormatting(str: string): string;
|
|
5
|
+
export declare function getRawCaretIndex(value: string, caret: number): number;
|
|
6
|
+
export declare function getCaretPositionForRawIndex(formatted: string, rawIndex: number): number;
|
|
7
|
+
export declare function hideZeroMinorPart(formatted: string): string;
|
|
8
|
+
export declare function shouldShowMinorPart(minorPart: string | undefined): boolean;
|
|
3
9
|
export declare function formatAmountInputValue(value: number | null | undefined, amountType: AmountValueType, currency: CurrencyCodes): string;
|
|
4
|
-
export declare function getFormattedValue(enteredValue: string,
|
|
5
|
-
export declare function getAmountValueFromStr(str: string,
|
|
6
|
-
export declare function normalizeAmountDisplay(str: string,
|
|
10
|
+
export declare function getFormattedValue(enteredValue: string, amountType: AmountValueType): string;
|
|
11
|
+
export declare function getAmountValueFromStr(str: string, amountType: AmountValueType): number | null;
|
|
12
|
+
export declare function normalizeAmountDisplay(str: string, amountType: AmountValueType): string;
|
|
7
13
|
export declare function isPhantomZeroDisplay(str: string): boolean;
|
|
@@ -1,48 +1,98 @@
|
|
|
1
|
-
import { formatAmount as
|
|
2
|
-
|
|
1
|
+
import { formatAmount as d, THINSP as p } from "../../utils/format-amount/util.js";
|
|
2
|
+
import { splitAmount as h } from "../../utils/split-amount/util.js";
|
|
3
|
+
const m = /* @__PURE__ */ new Set([" ", p]), N = 3, A = 4;
|
|
4
|
+
function c(t) {
|
|
5
|
+
return t === "default";
|
|
6
|
+
}
|
|
7
|
+
function l(t) {
|
|
8
|
+
return t.split("").filter((r) => !m.has(r)).join("").replace(".", ",");
|
|
9
|
+
}
|
|
10
|
+
function $(t) {
|
|
11
|
+
const r = l(t).replace(/\D/g, "");
|
|
12
|
+
if (!r)
|
|
13
|
+
return "0";
|
|
14
|
+
const e = r.replace(/^0+(?=\d)/, "") || r;
|
|
15
|
+
return h(e, N, p, A);
|
|
16
|
+
}
|
|
17
|
+
function R(t, r) {
|
|
18
|
+
return l(t.slice(0, r)).length;
|
|
19
|
+
}
|
|
20
|
+
function _(t, r) {
|
|
21
|
+
if (r <= 0)
|
|
22
|
+
return t.startsWith("-") ? 1 : 0;
|
|
23
|
+
let e = 0;
|
|
24
|
+
for (let n = 0; n < t.length; n++) {
|
|
25
|
+
const o = t[n];
|
|
26
|
+
if (!m.has(o) && (e += 1, e >= r))
|
|
27
|
+
return n + 1;
|
|
28
|
+
}
|
|
29
|
+
return t.length;
|
|
30
|
+
}
|
|
31
|
+
function g(t) {
|
|
32
|
+
return t.endsWith(",00") ? t.slice(0, -3) : t;
|
|
33
|
+
}
|
|
34
|
+
function D(t) {
|
|
35
|
+
return t !== void 0 && t !== "" && t !== "00";
|
|
36
|
+
}
|
|
37
|
+
function F(t, r, e) {
|
|
3
38
|
if (t == null)
|
|
4
39
|
return "";
|
|
5
|
-
const n =
|
|
6
|
-
return a({
|
|
40
|
+
const n = c(r) ? t : t / 100, o = d({
|
|
7
41
|
value: n,
|
|
8
42
|
currency: e,
|
|
9
43
|
type: "default"
|
|
10
44
|
}).formatted;
|
|
45
|
+
return c(r) ? o : g(o);
|
|
11
46
|
}
|
|
12
|
-
function
|
|
47
|
+
function M(t, r) {
|
|
13
48
|
if (!t) return t;
|
|
14
|
-
const e = t
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
const e = l(t), n = e.startsWith("-"), o = n ? e.slice(1) : e, [f, u] = o.split(","), i = $(f);
|
|
50
|
+
if (c(r))
|
|
51
|
+
return n ? `-${i}` : i;
|
|
52
|
+
if (!u && e.includes(","))
|
|
53
|
+
return n ? `-${i},` : `${i},`;
|
|
54
|
+
if (u) {
|
|
55
|
+
const s = u.slice(0, 2);
|
|
56
|
+
return s === "00" && u.length >= 2 ? n ? `-${i}` : i : n ? `-${i},${s}` : `${i},${s}`;
|
|
57
|
+
}
|
|
58
|
+
return n ? `-${i}` : i;
|
|
20
59
|
}
|
|
21
|
-
function
|
|
60
|
+
function I(t, r) {
|
|
22
61
|
if (!t) return null;
|
|
23
|
-
const e = t.startsWith("-"),
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
62
|
+
const e = l(t), n = e.startsWith("-"), o = e.replace(/^-/, "");
|
|
63
|
+
if (c(r)) {
|
|
64
|
+
const s = o.replace(/\D/g, "");
|
|
65
|
+
if (!s) return null;
|
|
66
|
+
const a = Number(s);
|
|
67
|
+
return Number.isNaN(a) ? null : n ? -a : a;
|
|
68
|
+
}
|
|
69
|
+
const f = o.replace(",", "."), u = Number(f);
|
|
70
|
+
if (Number.isNaN(u)) return null;
|
|
71
|
+
const i = Math.round(u * 100);
|
|
72
|
+
return n ? -i : i;
|
|
27
73
|
}
|
|
28
|
-
function
|
|
74
|
+
function P(t, r) {
|
|
29
75
|
if (!t || t === "-" || t === "-," || !t.replace(/[^0-9]/g, ""))
|
|
30
76
|
return "";
|
|
31
|
-
let n =
|
|
32
|
-
if (
|
|
77
|
+
let n = M(t, r);
|
|
78
|
+
if (c(r) || !n.includes(","))
|
|
33
79
|
return n;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const [, r = ""] = n.split(",");
|
|
37
|
-
return r ? r.length === 1 ? `${n}0` : n : `${n}00`;
|
|
80
|
+
const [, o = ""] = n.split(",");
|
|
81
|
+
return o ? (o.length === 1 && (n = `${n}0`), g(n)) : n.replace(/,$/, "");
|
|
38
82
|
}
|
|
39
|
-
function
|
|
40
|
-
return t
|
|
83
|
+
function T(t) {
|
|
84
|
+
return l(t) === "0";
|
|
41
85
|
}
|
|
42
86
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
87
|
+
F as formatAmountInputValue,
|
|
88
|
+
I as getAmountValueFromStr,
|
|
89
|
+
_ as getCaretPositionForRawIndex,
|
|
90
|
+
M as getFormattedValue,
|
|
91
|
+
R as getRawCaretIndex,
|
|
92
|
+
g as hideZeroMinorPart,
|
|
93
|
+
T as isPhantomZeroDisplay,
|
|
94
|
+
c as isWholeAmountType,
|
|
95
|
+
P as normalizeAmountDisplay,
|
|
96
|
+
D as shouldShowMinorPart,
|
|
97
|
+
l as stripAmountFormatting
|
|
48
98
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from './radio-group';
|
|
|
68
68
|
export * from './radio-groups';
|
|
69
69
|
export * from './section-wrapper';
|
|
70
70
|
export * from './select';
|
|
71
|
+
export * from './settings-hint';
|
|
71
72
|
export * from './sidepanel';
|
|
72
73
|
export * from './sidepanel-header';
|
|
73
74
|
export * from './skeleton';
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import { BottomSheet as d } from "./bottom-sheet/component.js";
|
|
|
8
8
|
import { Box as c, Radiuses as T, Spaces as O } from "./box/component.js";
|
|
9
9
|
import { Button as I } from "./button/component.js";
|
|
10
10
|
import { ButtonArrow as C } from "./button-arrow/component.js";
|
|
11
|
-
import { Calendar as
|
|
12
|
-
import { useCalendar as
|
|
11
|
+
import { Calendar as g } from "./calendar/component.js";
|
|
12
|
+
import { useCalendar as E } from "./calendar/use-calendar.js";
|
|
13
13
|
import { usePeriod as P } from "./calendar/use-period.js";
|
|
14
14
|
import { DAYS_IN_WEEK as F, MONTHS_IN_YEAR as R, SUNDAY_INDEX as y, dateInLimits as B, limitDate as L, monthName as b, russianWeekDay as w } from "./calendar/utils.js";
|
|
15
15
|
import { CalendarInput as N } from "./calendar-input/component.js";
|
|
16
|
-
import { DATE_FORMAT as
|
|
16
|
+
import { DATE_FORMAT as H, DATE_MASK as v, IS_BROWSER as G, NATIVE_DATE_FORMAT as U, SUPPORTS_INPUT_TYPE_DATE as q, isCompleteDateInput as z, isInputDateSupported as K, parseDateString as V } from "./calendar-input/utils.js";
|
|
17
17
|
import { Card as J } from "./card/component.js";
|
|
18
18
|
import { Cell as Q } from "./cell/component.js";
|
|
19
19
|
import { Checkbox as $ } from "./checkbox/component.js";
|
|
@@ -27,15 +27,15 @@ import { FormattedDate as co } from "./date/component.js";
|
|
|
27
27
|
import { DateSwitcher as Oo } from "./date-switcher/component.js";
|
|
28
28
|
import { DecoratedItem as Io } from "./decorated-item/component.js";
|
|
29
29
|
import { Divider as Co } from "./divider/component.js";
|
|
30
|
-
import { Dot as
|
|
31
|
-
import { EmptyPage as
|
|
30
|
+
import { Dot as go } from "./dot/component.js";
|
|
31
|
+
import { EmptyPage as Eo } from "./empty-page/component.js";
|
|
32
32
|
import { FilterTag as Po } from "./filter-tag/component.js";
|
|
33
33
|
import { Flex as Fo } from "./flex/component.js";
|
|
34
34
|
import { FlexColumns as yo } from "./flex-columns/component.js";
|
|
35
35
|
import { Footer as Lo } from "./footer/component.js";
|
|
36
36
|
import { FiltersForm as wo } from "./form/templates/filters-form/index.js";
|
|
37
37
|
import { FormControl as No } from "./form-control/component.js";
|
|
38
|
-
import { ErrorMessage as
|
|
38
|
+
import { ErrorMessage as Ho, FastField as vo, Field as Go, FieldArray as Uo, Form as qo, Formik as zo, connect as Ko, useField as Vo, useFormik as jo, useFormikContext as Jo, withFormik as Xo } from "formik";
|
|
39
39
|
import { Col as Zo, Grid as $o, Row as or } from "./grid/component.js";
|
|
40
40
|
import { HeaderSearch as er } from "./header-search/component.js";
|
|
41
41
|
import { useCrudFormRequests as pr } from "./hooks/use-crud-form-requests/index.js";
|
|
@@ -48,16 +48,16 @@ import { Image as cr } from "./image/component.js";
|
|
|
48
48
|
import { textSizes as Or } from "./image/types.js";
|
|
49
49
|
import { ImageGallery as Ir } from "./image-gallery/component.js";
|
|
50
50
|
import { ImageUploader as Cr } from "./image-uploader/component.js";
|
|
51
|
-
import { InfoBlockHeader as
|
|
52
|
-
import { InfoBlockItem as
|
|
51
|
+
import { InfoBlockHeader as gr } from "./info-block-header/component.js";
|
|
52
|
+
import { InfoBlockItem as Er } from "./info-block-item/component.js";
|
|
53
53
|
import { InfoBlockWrapper as Pr } from "./info-block-wrapper/component.js";
|
|
54
54
|
import { Input as Fr } from "./input/component.js";
|
|
55
55
|
import { InputAutocomplete as yr } from "./input-autocomplete/component.js";
|
|
56
56
|
import { InputGhost as Lr } from "./input-ghost/component.js";
|
|
57
57
|
import { Link as wr } from "./link/component.js";
|
|
58
58
|
import { ListAllert as Nr } from "./list-allert/component.js";
|
|
59
|
-
import { Loader as
|
|
60
|
-
import { MaskedInput as
|
|
59
|
+
import { Loader as Hr } from "./loader/component.js";
|
|
60
|
+
import { MaskedInput as Gr, PLACEHOLDER_CHAR as Ur } from "./masked-input/component.js";
|
|
61
61
|
import { Menu as zr } from "./menu/component.js";
|
|
62
62
|
import { Message as Vr } from "./message/component.js";
|
|
63
63
|
import { ModalContext as Jr, ModalProvider as Xr } from "./modal/context.js";
|
|
@@ -74,60 +74,61 @@ import { Popover as ce } from "./popover/component.js";
|
|
|
74
74
|
import { Portal as Oe } from "./portal/component.js";
|
|
75
75
|
import { ProgressBar as Ie } from "./progress-bar/component.js";
|
|
76
76
|
import { ProgressIndex as Ce } from "./progress-index/component.js";
|
|
77
|
-
import { Radio as
|
|
78
|
-
import { RadioGroup as
|
|
77
|
+
import { Radio as ge } from "./radio/component.js";
|
|
78
|
+
import { RadioGroup as Ee } from "./radio-group/component.js";
|
|
79
79
|
import { RadioGroups as Pe } from "./radio-groups/component.js";
|
|
80
80
|
import { SectionWrapper as Fe } from "./section-wrapper/component.js";
|
|
81
81
|
import { Select as ye } from "./select/component.js";
|
|
82
82
|
import { Arrow as Le } from "./select/components/arrow/component.js";
|
|
83
83
|
import { BaseSelect as we } from "./select/components/base-select/component.js";
|
|
84
84
|
import { SelectField as Ne } from "./select/components/field/component.js";
|
|
85
|
-
import { Optgroup as
|
|
86
|
-
import { Option as
|
|
85
|
+
import { Optgroup as He } from "./select/components/optgroup/component.js";
|
|
86
|
+
import { Option as Ge } from "./select/components/option/component.js";
|
|
87
87
|
import { OptionsList as qe } from "./select/components/options-list/component.js";
|
|
88
88
|
import { VirtualOptionsList as Ke } from "./select/components/virtual-options-list/component.js";
|
|
89
89
|
import { useLazyLoading as je } from "./select/presets/use-lazy-loading/index.js";
|
|
90
90
|
import { useSelectWithLoading as Xe } from "./select/presets/use-select-with-loading/hook.js";
|
|
91
91
|
import { convertToOptions as Ze, isGroup as $e, isOptionShape as ot, joinOptions as rt, lastIndexOf as et, processOptions as tt, useVisibleOptions as pt } from "./select/utils.js";
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
92
|
+
import { SettingsHint as ft } from "./settings-hint/component.js";
|
|
93
|
+
import { Sidepanel as xt } from "./sidepanel/component.js";
|
|
94
|
+
import { SidepanelHeader as it } from "./sidepanel-header/component.js";
|
|
95
|
+
import { Skeleton as ut } from "./skeleton/component.js";
|
|
96
|
+
import { Space as dt } from "./space/component.js";
|
|
97
|
+
import { Spinner as ct } from "./spinner/component.js";
|
|
98
|
+
import { Stack as Ot } from "./stack/component.js";
|
|
99
|
+
import { StackingContext as It, stackingOrder as At } from "./stack/context.js";
|
|
100
|
+
import { Status as Dt } from "./status/component.js";
|
|
101
|
+
import { SteppedProgressBar as kt, useSteps as Et } from "./stepped-progress-bar/index.js";
|
|
102
|
+
import { Sticker as Pt } from "./sticker/component.js";
|
|
103
|
+
import { SuffixInput as Ft } from "./suffix-input/component.js";
|
|
104
|
+
import { SuperListHeader as yt } from "./super-list-header/component.js";
|
|
105
|
+
import { SuperListItem as Lt } from "./super-list-item/component.js";
|
|
106
|
+
import { Switch as wt } from "./switch/component.js";
|
|
107
|
+
import { Table as Nt } from "./table/component.js";
|
|
108
|
+
import { TableCell as Ht } from "./table/components/cell/component.js";
|
|
109
|
+
import { TableStatus as Gt } from "./table-status/component.js";
|
|
110
|
+
import { Tag as qt } from "./tag/component.js";
|
|
111
|
+
import { TagsList as Kt } from "./tags-list/component.js";
|
|
112
|
+
import { Textarea as jt } from "./textarea/component.js";
|
|
113
|
+
import { LOACAL_STORAGE_THEME_KEY as Xt, STYLE_TAG_ID as Qt, THEME as Zt, THEME_DATA_ATTR as $t, ThemeProvider as op, useTheme as rp } from "./theme-provider/component.js";
|
|
114
|
+
import { defaultThemes as tp } from "./theme-provider/default-themes.js";
|
|
115
|
+
import { Toast as mp } from "./toast/component.js";
|
|
116
|
+
import { ToastNotifier as ap } from "./toast-notifier/component.js";
|
|
117
|
+
import { ToastPlate as sp } from "./toast-plate/component.js";
|
|
118
|
+
import { Tooltip as np } from "./tooltip/component.js";
|
|
119
|
+
import { Typography as lp } from "./typography/component.js";
|
|
120
|
+
import { add as Sp, addDays as cp, addMonths as Tp, addYears as Op, eachDayOfInterval as hp, eachMonthOfInterval as Ip, eachYearOfInterval as Ap, endOfDay as Cp, endOfISOWeek as Dp, endOfWeek as gp, endOfYear as kp, format as Ep, isAfter as Mp, isBefore as Pp, isEqual as _p, isLastDayOfMonth as Fp, isSameDay as Rp, isSameMonth as yp, isSameYear as Bp, isThisMonth as Lp, isThisYear as bp, isToday as wp, isWithinInterval as Wp, lastDayOfMonth as Np, max as Yp, min as Hp, parse as vp, parseISO as Gp, startOfDay as Up, startOfISOWeek as qp, startOfMonth as zp, startOfWeek as Kp, startOfYear as Vp, subDays as jp, subMonths as Jp, subWeeks as Xp, subYears as Qp, weekDaysShort as Zp } from "./utils/date/index.js";
|
|
121
|
+
import { debounce as om } from "./utils/debounce.js";
|
|
122
|
+
import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as em, THINSP as tm, formatAmount as pm, isCurrencyFirst as mm } from "./utils/format-amount/util.js";
|
|
123
|
+
import { formatDate as am, locales as xm } from "./utils/format-date/index.js";
|
|
124
|
+
import { safeStringify as im } from "./utils/safe-stringify.js";
|
|
125
|
+
import { showCompactSuccess as um, showError as lm, showSuccess as dm } from "./utils/show-toast/index.js";
|
|
126
|
+
import { splitAmount as cm } from "./utils/split-amount/util.js";
|
|
127
|
+
import { capitalize as Om } from "./utils/string.js";
|
|
128
|
+
import { WelcomeContainer as Im } from "./welcome-layout/component.js";
|
|
129
|
+
import { withSuffix as Cm } from "./with-suffix/component.js";
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
em as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
|
|
131
132
|
e as Amount,
|
|
132
133
|
p as AmountInput,
|
|
133
134
|
Le as Arrow,
|
|
@@ -140,7 +141,7 @@ export {
|
|
|
140
141
|
c as Box,
|
|
141
142
|
I as Button,
|
|
142
143
|
C as ButtonArrow,
|
|
143
|
-
|
|
144
|
+
g as Calendar,
|
|
144
145
|
N as CalendarInput,
|
|
145
146
|
J as Card,
|
|
146
147
|
Q as Cell,
|
|
@@ -152,17 +153,17 @@ export {
|
|
|
152
153
|
ao as Collapse,
|
|
153
154
|
so as ConfirmPopup,
|
|
154
155
|
lo as CopyButton,
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
H as DATE_FORMAT,
|
|
157
|
+
v as DATE_MASK,
|
|
157
158
|
F as DAYS_IN_WEEK,
|
|
158
159
|
Oo as DateSwitcher,
|
|
159
160
|
Io as DecoratedItem,
|
|
160
161
|
Co as Divider,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
go as Dot,
|
|
163
|
+
Eo as EmptyPage,
|
|
164
|
+
Ho as ErrorMessage,
|
|
165
|
+
vo as FastField,
|
|
166
|
+
Go as Field,
|
|
166
167
|
Uo as FieldArray,
|
|
167
168
|
Po as FilterTag,
|
|
168
169
|
wo as FiltersForm,
|
|
@@ -175,24 +176,24 @@ export {
|
|
|
175
176
|
zo as Formik,
|
|
176
177
|
$o as Grid,
|
|
177
178
|
er as HeaderSearch,
|
|
178
|
-
|
|
179
|
+
G as IS_BROWSER,
|
|
179
180
|
dr as IconButton,
|
|
180
181
|
cr as Image,
|
|
181
182
|
Ir as ImageGallery,
|
|
182
183
|
Cr as ImageUploader,
|
|
183
|
-
|
|
184
|
-
|
|
184
|
+
gr as InfoBlockHeader,
|
|
185
|
+
Er as InfoBlockItem,
|
|
185
186
|
Pr as InfoBlockWrapper,
|
|
186
187
|
Fr as Input,
|
|
187
188
|
yr as InputAutocomplete,
|
|
188
189
|
Lr as InputGhost,
|
|
189
|
-
|
|
190
|
+
Xt as LOACAL_STORAGE_THEME_KEY,
|
|
190
191
|
ue as LabeledButton,
|
|
191
192
|
wr as Link,
|
|
192
193
|
Nr as ListAllert,
|
|
193
|
-
|
|
194
|
+
Hr as Loader,
|
|
194
195
|
R as MONTHS_IN_YEAR,
|
|
195
|
-
|
|
196
|
+
Gr as MaskedInput,
|
|
196
197
|
zr as Menu,
|
|
197
198
|
Vr as Message,
|
|
198
199
|
Jr as ModalContext,
|
|
@@ -200,8 +201,8 @@ export {
|
|
|
200
201
|
Zr as Mq,
|
|
201
202
|
U as NATIVE_DATE_FORMAT,
|
|
202
203
|
ee as Notification,
|
|
203
|
-
|
|
204
|
-
|
|
204
|
+
He as Optgroup,
|
|
205
|
+
Ge as Option,
|
|
205
206
|
qe as OptionsList,
|
|
206
207
|
Ur as PLACEHOLDER_CHAR,
|
|
207
208
|
pe as Padding,
|
|
@@ -213,117 +214,118 @@ export {
|
|
|
213
214
|
Oe as Portal,
|
|
214
215
|
Ie as ProgressBar,
|
|
215
216
|
Ce as ProgressIndex,
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
ge as Radio,
|
|
218
|
+
Ee as RadioGroup,
|
|
218
219
|
Pe as RadioGroups,
|
|
219
220
|
T as Radiuses,
|
|
220
221
|
or as Row,
|
|
221
|
-
|
|
222
|
+
Qt as STYLE_TAG_ID,
|
|
222
223
|
y as SUNDAY_INDEX,
|
|
223
224
|
q as SUPPORTS_INPUT_TYPE_DATE,
|
|
224
225
|
Fe as SectionWrapper,
|
|
225
226
|
ye as Select,
|
|
226
227
|
Ne as SelectField,
|
|
227
|
-
ft as
|
|
228
|
-
xt as
|
|
229
|
-
it as
|
|
230
|
-
ut as
|
|
228
|
+
ft as SettingsHint,
|
|
229
|
+
xt as Sidepanel,
|
|
230
|
+
it as SidepanelHeader,
|
|
231
|
+
ut as Skeleton,
|
|
232
|
+
dt as Space,
|
|
231
233
|
O as Spaces,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
234
|
+
ct as Spinner,
|
|
235
|
+
Ot as Stack,
|
|
236
|
+
It as StackingContext,
|
|
237
|
+
Dt as Status,
|
|
238
|
+
kt as SteppedProgressBar,
|
|
239
|
+
Pt as Sticker,
|
|
240
|
+
Ft as SuffixInput,
|
|
241
|
+
yt as SuperListHeader,
|
|
242
|
+
Lt as SuperListItem,
|
|
243
|
+
wt as Switch,
|
|
244
|
+
Zt as THEME,
|
|
245
|
+
$t as THEME_DATA_ATTR,
|
|
246
|
+
tm as THINSP,
|
|
247
|
+
Nt as Table,
|
|
248
|
+
Ht as TableCell,
|
|
249
|
+
Gt as TableStatus,
|
|
250
|
+
qt as Tag,
|
|
251
|
+
Kt as TagsList,
|
|
252
|
+
jt as Textarea,
|
|
253
|
+
op as ThemeProvider,
|
|
254
|
+
mp as Toast,
|
|
255
|
+
ap as ToastNotifier,
|
|
256
|
+
sp as ToastPlate,
|
|
257
|
+
np as Tooltip,
|
|
258
|
+
lp as Typography,
|
|
257
259
|
Ke as VirtualOptionsList,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
Im as WelcomeContainer,
|
|
261
|
+
Sp as add,
|
|
262
|
+
cp as addDays,
|
|
263
|
+
Tp as addMonths,
|
|
264
|
+
Op as addYears,
|
|
265
|
+
Om as capitalize,
|
|
264
266
|
Ko as connect,
|
|
265
267
|
Ze as convertToOptions,
|
|
266
268
|
B as dateInLimits,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
269
|
+
om as debounce,
|
|
270
|
+
tp as defaultThemes,
|
|
271
|
+
hp as eachDayOfInterval,
|
|
272
|
+
Ip as eachMonthOfInterval,
|
|
273
|
+
Ap as eachYearOfInterval,
|
|
274
|
+
Cp as endOfDay,
|
|
275
|
+
Dp as endOfISOWeek,
|
|
276
|
+
gp as endOfWeek,
|
|
277
|
+
kp as endOfYear,
|
|
278
|
+
Ep as format,
|
|
279
|
+
pm as formatAmount,
|
|
280
|
+
am as formatDate,
|
|
281
|
+
Mp as isAfter,
|
|
282
|
+
Pp as isBefore,
|
|
281
283
|
z as isCompleteDateInput,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
+
mm as isCurrencyFirst,
|
|
285
|
+
_p as isEqual,
|
|
284
286
|
$e as isGroup,
|
|
285
287
|
K as isInputDateSupported,
|
|
286
|
-
|
|
288
|
+
Fp as isLastDayOfMonth,
|
|
287
289
|
ot as isOptionShape,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
Rp as isSameDay,
|
|
291
|
+
yp as isSameMonth,
|
|
292
|
+
Bp as isSameYear,
|
|
293
|
+
Lp as isThisMonth,
|
|
294
|
+
bp as isThisYear,
|
|
295
|
+
wp as isToday,
|
|
296
|
+
Wp as isWithinInterval,
|
|
295
297
|
rt as joinOptions,
|
|
296
|
-
|
|
298
|
+
Np as lastDayOfMonth,
|
|
297
299
|
et as lastIndexOf,
|
|
298
300
|
L as limitDate,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
xm as locales,
|
|
302
|
+
Yp as max,
|
|
303
|
+
Hp as min,
|
|
302
304
|
b as monthName,
|
|
303
|
-
|
|
305
|
+
vp as parse,
|
|
304
306
|
V as parseDateString,
|
|
305
|
-
|
|
307
|
+
Gp as parseISO,
|
|
306
308
|
tt as processOptions,
|
|
307
309
|
w as russianWeekDay,
|
|
308
|
-
|
|
310
|
+
im as safeStringify,
|
|
309
311
|
io as showAlert,
|
|
310
|
-
|
|
312
|
+
um as showCompactSuccess,
|
|
311
313
|
no as showConfirm,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
314
|
+
lm as showError,
|
|
315
|
+
dm as showSuccess,
|
|
316
|
+
cm as splitAmount,
|
|
317
|
+
At as stackingOrder,
|
|
318
|
+
Up as startOfDay,
|
|
319
|
+
qp as startOfISOWeek,
|
|
320
|
+
zp as startOfMonth,
|
|
321
|
+
Kp as startOfWeek,
|
|
322
|
+
Vp as startOfYear,
|
|
323
|
+
jp as subDays,
|
|
324
|
+
Jp as subMonths,
|
|
325
|
+
Xp as subWeeks,
|
|
326
|
+
Qp as subYears,
|
|
325
327
|
Or as textSizes,
|
|
326
|
-
|
|
328
|
+
E as useCalendar,
|
|
327
329
|
xr as useClickOutside,
|
|
328
330
|
pr as useCrudFormRequests,
|
|
329
331
|
Vo as useField,
|
|
@@ -336,10 +338,10 @@ export {
|
|
|
336
338
|
P as usePeriod,
|
|
337
339
|
ur as usePrevious,
|
|
338
340
|
Xe as useSelectWithLoading,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
+
Et as useSteps,
|
|
342
|
+
rp as useTheme,
|
|
341
343
|
pt as useVisibleOptions,
|
|
342
|
-
|
|
344
|
+
Zp as weekDaysShort,
|
|
343
345
|
Xo as withFormik,
|
|
344
|
-
|
|
346
|
+
Cm as withSuffix
|
|
345
347
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SettingsHintProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
text: string | React.ReactNode;
|
|
5
|
+
image?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
reversed?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
dataTestId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SettingsHint: React.FC<SettingsHintProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import d from "classnames";
|
|
3
|
+
import { Typography as t } from "../typography/component.js";
|
|
4
|
+
import a from "./index.module.css.js";
|
|
5
|
+
const p = "https://escapenavigator-images.s3.eu-central-1.amazonaws.com/inside/art/explanation.webp", x = ({
|
|
6
|
+
title: i,
|
|
7
|
+
text: o,
|
|
8
|
+
image: m = p,
|
|
9
|
+
children: r,
|
|
10
|
+
reversed: c = !1,
|
|
11
|
+
className: n,
|
|
12
|
+
dataTestId: l
|
|
13
|
+
}) => /* @__PURE__ */ s(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: d(a.component, { [a.reversed]: c }, n),
|
|
17
|
+
"data-test-id": l,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ e("div", { className: a.imageWrapper, children: /* @__PURE__ */ e("img", { alt: i || "hint", className: a.image, src: m }) }),
|
|
20
|
+
/* @__PURE__ */ s("div", { className: a.content, children: [
|
|
21
|
+
i && /* @__PURE__ */ e(t.Title, { view: "xsmall", weight: "bold", color: "primary", tag: "div", children: i }),
|
|
22
|
+
/* @__PURE__ */ e(t.Text, { view: "primary-medium", color: "secondary", weight: "regular", tag: "div", children: o }),
|
|
23
|
+
r && /* @__PURE__ */ e("div", { className: a.actions, children: r })
|
|
24
|
+
] })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
x as SettingsHint
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.component_it8r{display:flex;align-items:center;gap:var(--gap-xl, 24px);width:100%;padding:var(--gap-s, 12px) var(--gap-xl, 24px);box-sizing:border-box;border-radius:var(--radius-l, 16px);background:linear-gradient(135deg,color-mix(in srgb,var(--color-bg-accent) 8%,var(--color-bg-primary)),var(--color-bg-primary));border:1px solid color-mix(in srgb,var(--color-bg-accent) 16%,transparent)}.reversed_fnLe{flex-direction:row-reverse}.imageWrapper_0IGy{flex-shrink:0;display:flex;align-items:center;justify-content:center}.image_t2Cz{width:160px;height:160px;-o-object-fit:contain;object-fit:contain}.content_mfC2{display:flex;flex-direction:column;gap:var(--gap-xs, 8px)}.actions_QFJu{margin-top:var(--gap-xs, 8px)}@media(max-width:600px){.component_it8r,.reversed_fnLe{flex-direction:column;text-align:center;gap:var(--gap-m, 16px);padding:var(--gap-s, 12px) var(--gap-m, 16px)}.image_t2Cz{width:120px;height:120px}.actions_QFJu{align-self:center}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as __css from './index.css';
|
|
2
|
+
export const __cssModule = __css;
|
|
3
|
+
const e = "component_it8r", t = "reversed_fnLe", n = "imageWrapper_0IGy", o = "image_t2Cz", c = "content_mfC2", s = "actions_QFJu", a = {
|
|
4
|
+
component: e,
|
|
5
|
+
reversed: t,
|
|
6
|
+
imageWrapper: n,
|
|
7
|
+
image: o,
|
|
8
|
+
content: c,
|
|
9
|
+
actions: s
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
s as actions,
|
|
13
|
+
e as component,
|
|
14
|
+
c as content,
|
|
15
|
+
a as default,
|
|
16
|
+
o as image,
|
|
17
|
+
n as imageWrapper,
|
|
18
|
+
t as reversed
|
|
19
|
+
};
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Query } from '../../types';
|
|
3
3
|
type Props = {
|
|
4
4
|
tags: React.ReactElement[];
|
|
5
|
-
searchPlaceholder
|
|
5
|
+
searchPlaceholder?: string;
|
|
6
6
|
searchText?: string;
|
|
7
7
|
addParam: (val: Query) => void;
|
|
8
8
|
onCreateClick?: () => void;
|
|
@@ -4,14 +4,14 @@ import $ from "@alphakits/icons/dist/PlusS";
|
|
|
4
4
|
import A from "classnames";
|
|
5
5
|
import { useState as h, useEffect as b, useRef as B, useCallback as v } from "react";
|
|
6
6
|
import { useDebounce as E } from "rooks";
|
|
7
|
-
import { Button as
|
|
7
|
+
import { Button as C } from "../../../button/component.js";
|
|
8
8
|
import { Flex as F } from "../../../flex/component.js";
|
|
9
9
|
import { HeaderSearch as H } from "../../../header-search/component.js";
|
|
10
10
|
import { translate as I } from "../../languages/index.js";
|
|
11
11
|
import r from "./index.module.css.js";
|
|
12
12
|
const U = ({
|
|
13
13
|
tags: a,
|
|
14
|
-
searchPlaceholder:
|
|
14
|
+
searchPlaceholder: g,
|
|
15
15
|
searchText: o,
|
|
16
16
|
hideSearch: x,
|
|
17
17
|
compact: S = !1,
|
|
@@ -19,9 +19,9 @@ const U = ({
|
|
|
19
19
|
leftHeaderAddons: c,
|
|
20
20
|
addParam: i,
|
|
21
21
|
onCreateClick: m,
|
|
22
|
-
onFiltersClick:
|
|
23
|
-
createButtonLabel:
|
|
24
|
-
showFiltersButton:
|
|
22
|
+
onFiltersClick: N,
|
|
23
|
+
createButtonLabel: j,
|
|
24
|
+
showFiltersButton: y,
|
|
25
25
|
filtersButtonLabel: D,
|
|
26
26
|
language: k
|
|
27
27
|
}) => {
|
|
@@ -52,7 +52,7 @@ const U = ({
|
|
|
52
52
|
value: w,
|
|
53
53
|
onChange: l,
|
|
54
54
|
onClear: z,
|
|
55
|
-
placeholder:
|
|
55
|
+
placeholder: g
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
c && c
|
|
@@ -60,21 +60,21 @@ const U = ({
|
|
|
60
60
|
/* @__PURE__ */ n("div", { className: r.buttons, children: [
|
|
61
61
|
V,
|
|
62
62
|
!!m && /* @__PURE__ */ t(
|
|
63
|
-
|
|
63
|
+
C,
|
|
64
64
|
{
|
|
65
65
|
dataTestId: "createbtn",
|
|
66
66
|
onClick: m,
|
|
67
67
|
view: "primary",
|
|
68
68
|
leftAddons: /* @__PURE__ */ t($, {}),
|
|
69
69
|
size: "xs",
|
|
70
|
-
children:
|
|
70
|
+
children: j || I(k)("create")
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
y && /* @__PURE__ */ t(
|
|
74
|
+
C,
|
|
75
75
|
{
|
|
76
76
|
leftAddons: /* @__PURE__ */ t(R, {}),
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: N,
|
|
78
78
|
view: "outlined",
|
|
79
79
|
size: "xs",
|
|
80
80
|
children: D
|
package/dist/table/table.js
CHANGED
|
@@ -13,7 +13,7 @@ import e from "./index.module.css.js";
|
|
|
13
13
|
import { TableError as st } from "./components/error/index.js";
|
|
14
14
|
function Lt({
|
|
15
15
|
columns: o,
|
|
16
|
-
searchPlaceholder: N
|
|
16
|
+
searchPlaceholder: N,
|
|
17
17
|
records: j,
|
|
18
18
|
hideSearch: P,
|
|
19
19
|
rightHeaderAddons: g,
|
|
@@ -18,7 +18,7 @@ export declare const Toast: import('react').ForwardRefExoticComponent<import('re
|
|
|
18
18
|
hasCloser?: boolean | undefined;
|
|
19
19
|
block?: boolean | undefined;
|
|
20
20
|
onClose?: ((event?: import('react').MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void) | undefined;
|
|
21
|
-
} & Pick<PopoverProps, "open" | "getPortalContainer" | "
|
|
21
|
+
} & Pick<PopoverProps, "open" | "getPortalContainer" | "position" | "transition" | "offset" | "preventFlip"> & {
|
|
22
22
|
anchorElement?: HTMLElement | undefined;
|
|
23
23
|
autoCloseDelay?: number | undefined;
|
|
24
24
|
onClose: () => void;
|