@ldmjs/ui 2.1.14 → 2.1.16

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.
Files changed (55) hide show
  1. package/dist/components/ld-avatar.js +1 -1
  2. package/dist/components/ld-badge.js +1 -1
  3. package/dist/components/ld-breadcrumbs.js +1 -1
  4. package/dist/components/ld-button.js +1 -1
  5. package/dist/components/ld-calendar.js +1 -1
  6. package/dist/components/ld-checkbox.js +1 -1
  7. package/dist/components/ld-chip.js +1 -1
  8. package/dist/components/ld-combobox.js +1 -1
  9. package/dist/components/ld-data-iterator.js +1 -1
  10. package/dist/components/ld-datepicker.js +1 -1
  11. package/dist/components/ld-daterange.js +1 -1
  12. package/dist/components/ld-dialog.js +1 -1
  13. package/dist/components/ld-edit-list-box.js +1 -1
  14. package/dist/components/ld-edit-masked-text.js +1 -1
  15. package/dist/components/ld-edit-text.js +1 -1
  16. package/dist/components/ld-expansion-panel.js +1 -1
  17. package/dist/components/ld-expansion-panels.js +1 -1
  18. package/dist/components/ld-icon.js +1 -1
  19. package/dist/components/ld-loader.js +1 -1
  20. package/dist/components/ld-page-toolbar.js +1 -1
  21. package/dist/components/ld-pager.js +1 -1
  22. package/dist/components/ld-progress.js +1 -1
  23. package/dist/components/ld-radiobutton.js +1 -1
  24. package/dist/components/ld-radiogroup.js +1 -1
  25. package/dist/components/ld-select-list-box.js +1 -1
  26. package/dist/components/ld-select.js +1 -1
  27. package/dist/components/ld-slider.js +1 -1
  28. package/dist/components/ld-splitter.js +1 -1
  29. package/dist/components/ld-step.js +1 -1
  30. package/dist/components/ld-switch.js +1 -1
  31. package/dist/components/ld-tab.js +1 -1
  32. package/dist/components/ld-tabs.js +1 -1
  33. package/dist/components/ld-text-markup.js +1 -1
  34. package/dist/components/ld-text-viewer.js +1 -1
  35. package/dist/components/ld-textarea.js +1 -1
  36. package/dist/components/ld-timepicker.js +1 -1
  37. package/dist/components/ld-toggle-buttons.js +1 -1
  38. package/dist/components/ld-uploader.js +1 -1
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.js +1 -1
  41. package/dist/lib/runtime-template.js +1 -1
  42. package/dist/lib/toastification.js +1 -1
  43. package/dist/scss/_avatar.scss +7 -6
  44. package/dist/scss/_checkbox.scss +49 -57
  45. package/dist/scss/_chip.scss +2 -2
  46. package/dist/scss/_dialogs.scss +13 -8
  47. package/dist/scss/_inputs.scss +2 -0
  48. package/dist/scss/_iterator.scss +43 -40
  49. package/dist/scss/_progress.scss +62 -4
  50. package/dist/scss/_shadows.scss +1 -1
  51. package/dist/scss/_textviewer.scss +0 -1
  52. package/dist/scss/_toolbar.scss +1 -1
  53. package/dist/types/dialogs.d.ts +11 -1
  54. package/dist/utils/validators.js +1 -1
  55. package/package.json +1 -1
@@ -1,9 +1,27 @@
1
+ @use "sass:list";
2
+
1
3
  :root {
2
4
  --checkbox-s: 16px;
3
5
  --checkbox-m: 20px;
4
6
  --checkbox-l: 24px;
5
7
  }
6
8
 
9
+ $colors: (
10
+ "primary": (
11
+ // default color
12
+ var(--primary),
13
+ // hover color
14
+ var(--primary-d-1),
15
+ // active color
16
+ var(--primary-d-2)
17
+ ),
18
+ "error": (
19
+ var(--error),
20
+ var(--error-d-1),
21
+ var(--error-d-2),
22
+ ),
23
+ );
24
+
7
25
  body {
8
26
  .ld-checkbox {
9
27
  position: relative;
@@ -146,74 +164,48 @@ body {
146
164
  border-color: $color;
147
165
  }
148
166
 
149
- // ---------- primary
150
-
151
- &.text-primary {
152
- input[type='checkbox']:checked + .ld-checkbox-icon {
153
- @include checkboxiconcolor(var(--primary));
154
- &:hover {
155
- @include checkboxiconcolor(var(--primary-d-1));
156
- }
157
- }
158
-
159
- input[type='checkbox']:checked:focus + .ld-checkbox-icon {
160
- @include checkboxiconcolor(var(--focus));
161
- }
162
-
163
- input[type='checkbox']:checked:active + .ld-checkbox-icon {
164
- @include checkboxiconcolor(var(--primary-d-2));
165
- }
166
-
167
- &.ld-checkbox--hovered {
167
+ @each $color, $values in $colors {
168
+ $d: list.nth($values, 1);
169
+ $h: list.nth($values, 2);
170
+ $a: list.nth($values, 3);
171
+ &.text-#{$color} {
168
172
  input[type='checkbox']:checked + .ld-checkbox-icon {
169
- @include checkboxiconcolor(var(--primary-d-1));
173
+ @include checkboxiconcolor($d);
170
174
  }
171
- }
172
175
 
173
- &.ld-checkbox--focused {
174
- label {
175
- &:after {
176
- border: 2px solid var(--focus);
176
+ &:not(.ld-checkbox--readonly) {
177
+ input[type='checkbox']:checked + .ld-checkbox-icon {
178
+ &:hover {
179
+ @include checkboxiconcolor($h);
180
+ }
177
181
  }
178
- }
179
- }
180
- }
181
182
 
182
- // ---------- error
183
+ input[type='checkbox']:checked:focus + .ld-checkbox-icon {
184
+ @include checkboxiconcolor(var(--focus));
185
+ }
183
186
 
184
- &.text-error {
185
- input[type='checkbox']:checked + .ld-checkbox-icon {
186
- @include checkboxiconcolor(var(--error));
187
- &:hover {
188
- @include checkboxiconcolor(var(--error-d-1));
187
+ input[type='checkbox']:checked:active + .ld-checkbox-icon {
188
+ @include checkboxiconcolor($a);
189
+ }
189
190
  }
190
- }
191
-
192
- input[type='checkbox']:checked:focus + .ld-checkbox-icon {
193
- @include checkboxiconcolor(var(--focus));
194
- }
195
-
196
- input[type='checkbox']:checked:active + .ld-checkbox-icon {
197
- @include checkboxiconcolor(var(--error-d-2));
198
- }
199
191
 
200
- &.ld-checkbox--hovered {
201
- input[type='checkbox']:checked + .ld-checkbox-icon {
202
- @include checkboxiconcolor(var(--error-d-1));
192
+ &.ld-checkbox--hovered {
193
+ input[type='checkbox']:checked + .ld-checkbox-icon {
194
+ @include checkboxiconcolor($h);
195
+ }
203
196
  }
204
- }
205
197
 
206
- &.ld-checkbox--focused {
207
- label {
208
- &:after {
209
- border: 2px solid var(--focus);
198
+ &.ld-checkbox--focused {
199
+ label {
200
+ &:after {
201
+ border: 2px solid var(--focus);
202
+ }
210
203
  }
211
204
  }
212
205
  }
213
206
  }
214
207
 
215
- &.ld-checkbox--disabled,
216
- &.ld-checkbox--readonly {
208
+ &.ld-checkbox--disabled {
217
209
  input[type='checkbox'] + .ld-checkbox-icon {
218
210
  @include checkboxiconcolor(var(--grey-l-5));
219
211
  svg {
@@ -230,15 +222,15 @@ body {
230
222
  }
231
223
  }
232
224
 
233
- &.ld-checkbox--disabled {
225
+ &.ld-checkbox--readonly {
234
226
  .ld-label-content {
235
- color: var(--grey-l-2);
227
+ color: var(--grey-d-3);
236
228
  }
237
229
  }
238
230
 
239
- &.ld-checkbox--readonly {
231
+ &.ld-checkbox--disabled {
240
232
  .ld-label-content {
241
- color: var(--grey-d-3);
233
+ color: var(--grey-l-2);
242
234
  }
243
235
  }
244
236
  }
@@ -253,11 +253,11 @@ body {
253
253
  // hover bg color
254
254
  var(--grey-l-6),
255
255
  // hover border color
256
- var(--grey-l-5),
256
+ var(--grey-d-1),
257
257
  // active bg color
258
258
  var(--grey-l-4),
259
259
  // active border color
260
- var(--grey-l-4),
260
+ var(--grey-d-2),
261
261
  );
262
262
 
263
263
  // -- tonal
@@ -51,11 +51,6 @@ body {
51
51
  }
52
52
  }
53
53
 
54
- &.ld-dialog--hidden {
55
- visibility: hidden !important;
56
- opacity: 0 !important;
57
- }
58
-
59
54
  .ld-dialog-content.v-overlay__content {
60
55
  max-width: unset;
61
56
  max-height: unset;
@@ -134,9 +129,19 @@ body {
134
129
  }
135
130
  }
136
131
  &.ld-dialog-content--hidden {
137
- visibility: hidden !important;
138
- opacity: 0 !important;
132
+ position: absolute;
133
+ clip: rect(0 0 0 0);
134
+ width: 1px;
135
+ height: 1px;
136
+ margin: -1px;
139
137
  }
140
138
  }
141
139
  }
142
- }
140
+
141
+ .minimized-dialogs {
142
+ position: absolute;
143
+ right: 25px;
144
+ bottom: 17px;
145
+ z-index: 999;
146
+ }
147
+ }
@@ -768,6 +768,8 @@ body {
768
768
  margin-inline-start: unset;
769
769
  padding-left: 8px;
770
770
  padding-right: 12px;
771
+ border-top-right-radius: var(--border-radius);
772
+ border-bottom-right-radius: var(--border-radius);
771
773
  background-color: var(--white);
772
774
 
773
775
  &:after {
@@ -4,54 +4,57 @@
4
4
  position: relative;
5
5
  height: 100%;
6
6
 
7
- .iterator-list {
7
+
8
+
9
+ & > .iterator-list {
8
10
  height: 100%;
9
11
  overflow-y: auto;
10
12
  overflow-anchor: auto;
11
13
  contain: content;
12
- }
13
14
 
14
- .scroller {
15
- position: relative;
16
- transform: translateZ(0);
17
- &.mobile {
18
- scroll-snap-type: y mandatory;
19
- }
20
- }
15
+ & > .scroller {
16
+ position: relative;
17
+ transform: translateZ(0);
18
+ &.mobile {
19
+ scroll-snap-type: y mandatory;
20
+ }
21
21
 
22
- .item {
23
- position: absolute;
24
- width: 100%;
25
- &.mobile {
26
- scroll-snap-align: start;
27
- }
22
+ & > .item {
23
+ position: absolute;
24
+ width: 100%;
25
+ height: max-content;
26
+ &.mobile {
27
+ scroll-snap-align: start;
28
+ }
28
29
 
29
- &.blink {
30
- animation: blinker 0.5s linear;
31
- }
30
+ &.blink {
31
+ animation: blinker 0.5s linear;
32
+ }
32
33
 
33
- @keyframes blinker {
34
- 5% {
35
- left: -5%;
36
- }
37
- 15% {
38
- left: -15%;
39
- }
40
- 25% {
41
- opacity: 75%;
42
- left: -25%;
43
- }
44
- 50% {
45
- opacity: 50%;
46
- left: -50%;
47
- }
48
- 75% {
49
- opacity: 25%;
50
- left: -75%;
51
- }
52
- 100% {
53
- opacity: 0;
54
- left: -100%;
34
+ @keyframes blinker {
35
+ 5% {
36
+ left: -5%;
37
+ }
38
+ 15% {
39
+ left: -15%;
40
+ }
41
+ 25% {
42
+ opacity: 75%;
43
+ left: -25%;
44
+ }
45
+ 50% {
46
+ opacity: 50%;
47
+ left: -50%;
48
+ }
49
+ 75% {
50
+ opacity: 25%;
51
+ left: -75%;
52
+ }
53
+ 100% {
54
+ opacity: 0;
55
+ left: -100%;
56
+ }
57
+ }
55
58
  }
56
59
  }
57
60
  }
@@ -1,3 +1,5 @@
1
+ @use "sass:list";
2
+
1
3
  body {
2
4
  .ld-progress {
3
5
 
@@ -22,11 +24,17 @@ body {
22
24
  &.ld-progress--no-label {
23
25
  display: flex;
24
26
  align-items: center;
27
+ gap: 16px;
28
+
29
+ &.ld-progress--reversed {
30
+ flex-direction: row-reverse;
31
+ }
25
32
  }
26
33
 
27
34
  .ld-progress-label {
28
35
  display: flex;
29
36
  align-items: center;
37
+ gap: 16px;
30
38
  height: 20px;
31
39
  margin-bottom: 8px;
32
40
  }
@@ -36,12 +44,21 @@ body {
36
44
  flex: 1 1 auto;
37
45
  }
38
46
 
47
+ &.ld-progress--reversed {
48
+ .ld-progress-label {
49
+ flex-direction: row-reverse;
50
+ }
51
+ .ld-progress-text {
52
+ display: flex;
53
+ justify-content: flex-end;
54
+ }
55
+ }
56
+
39
57
  .ld-progress-counter {
40
58
  font-size: var(--text-body-s);
41
59
  color: var(--grey-d-1);
42
60
  white-space: nowrap;
43
61
  font-weight: 500;
44
- margin-left: 16px;
45
62
  flex-shrink: 0;
46
63
  }
47
64
 
@@ -49,7 +66,6 @@ body {
49
66
  flex: 1 1 auto;
50
67
  height: 4px;
51
68
  background-color: var(--grey-l-5);
52
- border-radius: 6px;
53
69
 
54
70
  &:after {
55
71
  content: '';
@@ -57,7 +73,49 @@ body {
57
73
  height: 100%;
58
74
  width: calc(var(--n) * 1%);
59
75
  background-color: var(--primary);
60
- border-radius: 6px;
76
+ }
77
+ }
78
+
79
+ $sizearray: (
80
+ 'x-small': (
81
+ // height
82
+ 4px,
83
+ // border radius
84
+ 6px
85
+ ),
86
+ 'small': (
87
+ 8px,
88
+ var(--border-radius),
89
+ ),
90
+ 'default': (
91
+ 12px,
92
+ var(--border-radius),
93
+ ),
94
+ 'large': (
95
+ 16px,
96
+ var(--border-radius),
97
+ ),
98
+ 'x-large': (
99
+ 20px,
100
+ 12px,
101
+ ),
102
+ 'extra-large': (
103
+ 24px,
104
+ 12px,
105
+ ),
106
+ );
107
+
108
+ @each $size, $values in $sizearray {
109
+ $h: list.nth($values, 1);
110
+ $r: list.nth($values, 2);
111
+ &.ld-progress--#{$size} {
112
+ .ld-progress-bar {
113
+ height: $h;
114
+ border-radius: $r;
115
+ &:after {
116
+ border-radius: $r;
117
+ }
118
+ }
61
119
  }
62
120
  }
63
121
  }
@@ -279,4 +337,4 @@ body {
279
337
  }
280
338
  }
281
339
  }
282
- }
340
+ }
@@ -1,5 +1,5 @@
1
1
  $shadow-xs: 0px 1px 4px 0px hsla(218, 87%, 6%, 0.05);
2
- $shadow-s: 0px 1px 4px 0px hsla(218, 87%, 6%, 0.1);
2
+ $shadow-s: 0px 1px 4px 0px hsla(218, 87%, 6%, 0.16);
3
3
  $shadow-sm: 0px 4px 8px -2px hsla(218, 87%, 6%, 0.1);
4
4
  $shadow-m: 0px 12px 16px -4px hsla(218, 87%, 6%, 0.07);
5
5
  $shadow-l: 0px 20px 24px -4px hsla(218, 87%, 6%, 0.07);
@@ -25,7 +25,6 @@ body {
25
25
  max-height: calc(var(--input-s) * 4);
26
26
 
27
27
  &.scrollable {
28
- padding-top: 7px;
29
28
  overflow-y: auto;
30
29
  }
31
30
 
@@ -42,7 +42,7 @@ body {
42
42
  &-title {
43
43
  display: grid;
44
44
  grid-template-rows: 100%;
45
- padding: 0 8px;
45
+ padding: 0 0 0 8px;
46
46
  }
47
47
 
48
48
  &-inner {
@@ -1,3 +1,5 @@
1
+ import { ModalType } from '@/ld-dialog/dialog.manager';
2
+
1
3
  export interface IDialogProps {
2
4
  title: string;
3
5
  content?: string;
@@ -62,7 +64,6 @@ export interface IModalInfo {
62
64
  * ограничивая пользователя в действиях, пока окно не будет закрыто
63
65
  */
64
66
  noModal?: boolean;
65
- darkTitle?: boolean;
66
67
  content?: string;
67
68
  loading?: boolean;
68
69
  component?: string;
@@ -106,6 +107,15 @@ export interface IModalInfo {
106
107
  isChanged?: () => boolean;
107
108
  }
108
109
 
110
+ enum ModalType {
111
+ Alert,
112
+ Prompt,
113
+ Info,
114
+ Confirm,
115
+ Select,
116
+ CreateEdit,
117
+ }
118
+
109
119
  export interface IModalWindow extends IModalInfo {
110
120
  id: number;
111
121
  type: ModalType;
@@ -1 +1 @@
1
- (function webpackUniversalModuleDefinition(e,l){"object"===typeof exports&&"object"===typeof module?module.exports=l(require("@vuelidate/validators")):"function"===typeof define&&define.amd?define(["@vuelidate/validators"],l):"object"===typeof exports?exports["ldmui"]=l(require("@vuelidate/validators")):e["ldmui"]=l(e["@vuelidate/validators"])})(self,e=>(()=>{"use strict";var l={9347(e,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.validators=l.phoneRule=l.urlRule=l.numericRule=l.minValueRule=l.maxValueRule=l.macAddressRule=l.ipAddressRule=l.integerRule=l.emailRule=l.decimalRule=l.betweenRule=l.alphaNumRule=l.alphaRule=l.maxLengthRule=l.requiredRule=void 0;const n=u(887),requiredRule=(e,l)=>u=>{if(null==u||"string"===typeof u&&""===u)return e?`Поле ${e} обязательно`:l||"Это поле обязательно";const t=n.required.$validator(u,null,null);return!("boolean"!==typeof t||!t)||(e?`Поле ${e} обязательно`:l||"Это поле обязательно")};l.requiredRule=requiredRule;const maxLengthRule=e=>l=>{const u=(0,n.maxLength)(e).$validator(l,null,null);return!("boolean"!==typeof u||!u)||`Значение должно быть меньше ${e} символов`};l.maxLengthRule=maxLengthRule;const alphaRule=()=>e=>{const l=n.alpha.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы"};l.alphaRule=alphaRule;const alphaNumRule=()=>e=>{const l=n.alphaNum.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы и цифры"};l.alphaNumRule=alphaNumRule;const betweenRule=(e,l)=>u=>{const t=(0,n.between)(e,l).$validator(u,null,null);return!("boolean"!==typeof t||!t)||`Значение должно быть в диапазоне от ${e} до ${l}`};l.betweenRule=betweenRule;const decimalRule=()=>e=>{const l=n.decimal.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым или дробным числом"};l.decimalRule=decimalRule;const emailRule=()=>e=>{const l=n.email.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неверный формат адреса эл.почты"};l.emailRule=emailRule;const integerRule=()=>e=>{const l=n.integer.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым числом"};l.integerRule=integerRule;const ipAddressRule=()=>e=>{const l=n.ipAddress.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат IP-адреса"};l.ipAddressRule=ipAddressRule;const macAddressRule=()=>e=>{const l=(0,n.macAddress)(":").$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат mac-адреса"};l.macAddressRule=macAddressRule;const maxValueRule=e=>l=>{const u=(0,n.maxValue)(e).$validator(l,null,null);return!("boolean"!==typeof u||!u)||`Значение должно быть меньше ${e}`};l.maxValueRule=maxValueRule;const minValueRule=e=>l=>{const u=(0,n.minValue)(e).$validator(l,null,null);return!("boolean"!==typeof u||!u)||`Значение должно быть больше ${e}`};l.minValueRule=minValueRule;const numericRule=()=>e=>{const l=n.numeric.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только цифры"};l.numericRule=numericRule;const urlRule=()=>e=>{const l=n.url.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат URI"};l.urlRule=urlRule;const phoneRule=()=>e=>{const l=/^[\d()+-]+$/;return l.test(e)||"Неправильный формат телефона"};l.phoneRule=phoneRule,l.validators={requiredRule:l.requiredRule,maxLengthRule:l.maxLengthRule,alphaRule:l.alphaRule,alphaNumRule:l.alphaNumRule,betweenRule:l.betweenRule,decimalRule:l.decimalRule,emailRule:l.emailRule,integerRule:l.integerRule,ipAddressRule:l.ipAddressRule,macAddressRule:l.macAddressRule,maxValueRule:l.maxValueRule,minValueRule:l.minValueRule,numericRule:l.numericRule,urlRule:l.urlRule,phoneRule:l.phoneRule},l["default"]={}},887(l){l.exports=e}},u={};function __webpack_require__(e){var n=u[e];if(void 0!==n)return n.exports;var t=u[e]={exports:{}};return l[e](t,t.exports,__webpack_require__),t.exports}var n=__webpack_require__(9347);return n})());
1
+ (function webpackUniversalModuleDefinition(e,l){"object"===typeof exports&&"object"===typeof module?module.exports=l(require("@vuelidate/validators")):"function"===typeof define&&define.amd?define(["@vuelidate/validators"],l):"object"===typeof exports?exports["ldmui"]=l(require("@vuelidate/validators")):e["ldmui"]=l(e["@vuelidate/validators"])})(self,e=>(()=>{"use strict";var l={887(l){l.exports=e}},r={};function __webpack_require__(e){var u=r[e];if(void 0!==u)return u.exports;var t=r[e]={exports:{}};return l[e](t,t.exports,__webpack_require__),t.exports}(()=>{__webpack_require__.n=e=>{var l=e&&e.__esModule?()=>e["default"]:()=>e;return __webpack_require__.d(l,{a:l}),l}})(),(()=>{__webpack_require__.d=(e,l)=>{for(var r in l)__webpack_require__.o(l,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:l[r]})}})(),(()=>{__webpack_require__.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var u={};__webpack_require__.r(u),__webpack_require__.d(u,{alphaNumRule:()=>alphaNumRule,alphaRule:()=>alphaRule,betweenRule:()=>betweenRule,decimalRule:()=>decimalRule,default:()=>a,emailRule:()=>emailRule,integerRule:()=>integerRule,ipAddressRule:()=>ipAddressRule,macAddressRule:()=>macAddressRule,maxLengthRule:()=>maxLengthRule,maxValueRule:()=>maxValueRule,minValueRule:()=>minValueRule,numericRule:()=>numericRule,phoneRule:()=>phoneRule,requiredRule:()=>requiredRule,urlRule:()=>urlRule,validators:()=>o});var t=__webpack_require__(887);const requiredRule=(e,l)=>r=>{if(null==r||"string"===typeof r&&""===r)return e?`Поле ${e} обязательно`:l||"Это поле обязательно";const u=t.required.$validator(r,null,null);return!("boolean"!==typeof u||!u)||(e?`Поле ${e} обязательно`:l||"Это поле обязательно")},maxLengthRule=e=>l=>{const r=(0,t.maxLength)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть меньше ${e} символов`},alphaRule=()=>e=>{const l=t.alpha.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы"},alphaNumRule=()=>e=>{const l=t.alphaNum.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы и цифры"},betweenRule=(e,l)=>r=>{const u=(0,t.between)(e,l).$validator(r,null,null);return!("boolean"!==typeof u||!u)||`Значение должно быть в диапазоне от ${e} до ${l}`},decimalRule=()=>e=>{const l=t.decimal.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым или дробным числом"},emailRule=()=>e=>{const l=t.email.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неверный формат адреса эл.почты"},integerRule=()=>e=>{const l=t.integer.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым числом"},ipAddressRule=()=>e=>{const l=t.ipAddress.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат IP-адреса"},macAddressRule=()=>e=>{const l=(0,t.macAddress)(":").$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат mac-адреса"},maxValueRule=e=>l=>{const r=(0,t.maxValue)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть меньше ${e}`},minValueRule=e=>l=>{const r=(0,t.minValue)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть больше ${e}`},numericRule=()=>e=>{const l=t.numeric.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только цифры"},urlRule=()=>e=>{const l=t.url.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат URI"},phoneRule=()=>e=>{const l=/^[\d()+-]+$/;return l.test(e)||"Неправильный формат телефона"},o={requiredRule,maxLengthRule,alphaRule,alphaNumRule,betweenRule,decimalRule,emailRule,integerRule,ipAddressRule,macAddressRule,maxValueRule,minValueRule,numericRule,urlRule,phoneRule},a={};return u})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {