@taiga-ui/legacy 4.52.0-canary.ec0802b → 4.52.0-canary.efbd0d4
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/components/dialog/dialog.component.d.ts +2 -1
- package/components/dialog/dialog.service.d.ts +1 -1
- package/components/index.d.ts +0 -11
- package/components/mobile-dialog/mobile-dialog.service.d.ts +1 -1
- package/components/pdf-viewer/pdf-viewer.service.d.ts +1 -1
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs +17 -17
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +8 -8
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +11 -11
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components.mjs +0 -11
- package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy.mjs +0 -4
- package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
- package/index.d.ts +0 -4
- package/package.json +15 -93
- package/classes/abstract-native-select.d.ts +0 -22
- package/classes/abstract-textfield-host.d.ts +0 -19
- package/classes/control.d.ts +0 -60
- package/classes/controller.d.ts +0 -9
- package/classes/index.d.ts +0 -9
- package/classes/interactive.d.ts +0 -34
- package/classes/multiple-control.d.ts +0 -11
- package/classes/named-day.d.ts +0 -11
- package/classes/nullable-control.d.ts +0 -10
- package/classes/stringifiable-item.d.ts +0 -11
- package/components/arrow/arrow.component.d.ts +0 -17
- package/components/arrow/arrow.options.d.ts +0 -17
- package/components/arrow/arrow.providers.d.ts +0 -18
- package/components/arrow/index.d.ts +0 -3
- package/components/input/index.d.ts +0 -3
- package/components/input/input.component.d.ts +0 -32
- package/components/input/input.directive.d.ts +0 -12
- package/components/input/input.module.d.ts +0 -16
- package/components/input-date-range/index.d.ts +0 -3
- package/components/input-date-range/input-date-range.component.d.ts +0 -66
- package/components/input-date-range/input-date-range.directive.d.ts +0 -16
- package/components/input-date-range/input-date-range.module.d.ts +0 -21
- package/components/input-date-time/index.d.ts +0 -3
- package/components/input-date-time/input-date-time.component.d.ts +0 -87
- package/components/input-date-time/input-date-time.directive.d.ts +0 -17
- package/components/input-date-time/input-date-time.module.d.ts +0 -23
- package/components/input-date-time/native-date-time/native-date-time.directive.d.ts +0 -13
- package/components/input-month-range/index.d.ts +0 -3
- package/components/input-month-range/input-month-range.component.d.ts +0 -38
- package/components/input-month-range/input-month-range.directive.d.ts +0 -23
- package/components/input-month-range/input-month-range.module.d.ts +0 -18
- package/components/input-number/index.d.ts +0 -4
- package/components/input-number/input-number.component.d.ts +0 -62
- package/components/input-number/input-number.directive.d.ts +0 -16
- package/components/input-number/input-number.module.d.ts +0 -18
- package/components/input-number/input-number.options.d.ts +0 -23
- package/components/input-range/index.d.ts +0 -2
- package/components/input-range/input-range.component.d.ts +0 -56
- package/components/input-range/input-range.module.d.ts +0 -19
- package/components/primitive-textfield/index.d.ts +0 -7
- package/components/primitive-textfield/primitive-textfield-options.d.ts +0 -21
- package/components/primitive-textfield/primitive-textfield-types.d.ts +0 -11
- package/components/primitive-textfield/primitive-textfield.component.d.ts +0 -73
- package/components/primitive-textfield/primitive-textfield.directive.d.ts +0 -14
- package/components/primitive-textfield/primitive-textfield.module.d.ts +0 -21
- package/components/primitive-textfield/textfield/textfield.component.d.ts +0 -13
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +0 -22
- package/components/select/index.d.ts +0 -6
- package/components/select/native-select/native-select-group.component.d.ts +0 -17
- package/components/select/native-select/native-select.component.d.ts +0 -16
- package/components/select/select.component.d.ts +0 -45
- package/components/select/select.directive.d.ts +0 -16
- package/components/select/select.module.d.ts +0 -24
- package/components/select/select.options.d.ts +0 -19
- package/components/select-option/index.d.ts +0 -2
- package/components/select-option/select-option.component.d.ts +0 -27
- package/components/select-option/select-option.module.d.ts +0 -10
- package/components/tooltip/index.d.ts +0 -2
- package/components/tooltip/tooltip.component.d.ts +0 -12
- package/components/tooltip/tooltip.module.d.ts +0 -13
- package/directives/index.d.ts +0 -5
- package/directives/legacy-dropdown-open-monitor/index.d.ts +0 -1
- package/directives/legacy-dropdown-open-monitor/legacy-dropdown-open-monitor.d.ts +0 -11
- package/directives/textfield-controller/index.d.ts +0 -14
- package/directives/textfield-controller/textfield-appearance.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-cleaner.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-controller.module.d.ts +0 -17
- package/directives/textfield-controller/textfield-controller.provider.d.ts +0 -4
- package/directives/textfield-controller/textfield-custom-content.directive.d.ts +0 -10
- package/directives/textfield-controller/textfield-filler.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-icon-left.directive.d.ts +0 -12
- package/directives/textfield-controller/textfield-icon.directive.d.ts +0 -12
- package/directives/textfield-controller/textfield-label-outside.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-postfix.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-prefix.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-size.directive.d.ts +0 -10
- package/directives/textfield-controller/textfield.controller.d.ts +0 -41
- package/directives/textfield-controller/textfield.options.d.ts +0 -17
- package/directives/unfinished-validator/index.d.ts +0 -2
- package/directives/unfinished-validator/unfinished-validator.directive.d.ts +0 -10
- package/directives/unfinished-validator/unfinished.validator.d.ts +0 -4
- package/directives/value-accessor/index.d.ts +0 -3
- package/directives/value-accessor/value-accessor.directive.d.ts +0 -5
- package/directives/value-accessor/value-accessor.module.d.ts +0 -7
- package/directives/value-accessor/value-accessor.provider.d.ts +0 -2
- package/directives/wrapper/README.md +0 -19
- package/directives/wrapper/index.d.ts +0 -2
- package/directives/wrapper/wrapper.directive.d.ts +0 -22
- package/directives/wrapper/wrapper.module.d.ts +0 -10
- package/fesm2022/taiga-ui-legacy-classes.mjs +0 -413
- package/fesm2022/taiga-ui-legacy-classes.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs +0 -72
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +0 -346
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +0 -459
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +0 -221
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs +0 -375
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs +0 -261
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input.mjs +0 -156
- package/fesm2022/taiga-ui-legacy-components-input.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +0 -454
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs +0 -88
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-select.mjs +0 -345
- package/fesm2022/taiga-ui-legacy-components-select.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-tooltip.mjs +0 -53
- package/fesm2022/taiga-ui-legacy-components-tooltip.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -49
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +0 -397
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +0 -48
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs +0 -44
- package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs +0 -99
- package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-directives.mjs +0 -10
- package/fesm2022/taiga-ui-legacy-directives.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-tokens.mjs +0 -384
- package/fesm2022/taiga-ui-legacy-tokens.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-utils.mjs +0 -262
- package/fesm2022/taiga-ui-legacy-utils.mjs.map +0 -1
- package/styles/mixins/mixins.less +0 -239
- package/styles/mixins/mixins.scss +0 -224
- package/styles/mixins/textfield.less +0 -324
- package/styles/mixins/textfield.scss +0 -308
- package/styles/taiga-ui-local.less +0 -3
- package/styles/taiga-ui-local.scss +0 -3
- package/tokens/countries-masks.d.ts +0 -9
- package/tokens/focusable-item-accessor.d.ts +0 -25
- package/tokens/fonts-ready.d.ts +0 -6
- package/tokens/icons.d.ts +0 -6
- package/tokens/index.d.ts +0 -14
- package/tokens/is-apple.d.ts +0 -6
- package/tokens/is-chromium.d.ts +0 -6
- package/tokens/is-firefox.d.ts +0 -6
- package/tokens/is-stackblitz.d.ts +0 -5
- package/tokens/month-formatter.d.ts +0 -10
- package/tokens/sanitizer.d.ts +0 -6
- package/tokens/textfield-appearance.d.ts +0 -7
- package/tokens/textfield-host.d.ts +0 -23
- package/tokens/touch-supported.d.ts +0 -5
- package/tokens/value-accessor.d.ts +0 -7
- package/utils/capitalize-first-letter.d.ts +0 -4
- package/utils/date-mode-maskito-adapter.d.ts +0 -6
- package/utils/format-phone.d.ts +0 -30
- package/utils/get-border.d.ts +0 -5
- package/utils/get-max-allowed-phone-length.d.ts +0 -24
- package/utils/get-safe-area-size.d.ts +0 -7
- package/utils/icons-path-factory.d.ts +0 -13
- package/utils/index.d.ts +0 -13
- package/utils/is-presumed-html-string.d.ts +0 -4
- package/utils/iso-to-country-code.d.ts +0 -13
- package/utils/not-kz-region.d.ts +0 -20
- package/utils/process-icon.d.ts +0 -4
- package/utils/specific-dropdown-controllers.d.ts +0 -4
- package/utils/status.d.ts +0 -4
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import { CHAR_PLUS, TUI_VERSION } from '@taiga-ui/cdk/constants';
|
|
2
|
-
import { tuiDropdownOptionsProvider } from '@taiga-ui/core/directives/dropdown';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated: drop in v5.0
|
|
6
|
-
*/
|
|
7
|
-
function tuiCapitalizeFirstLetter(value) {
|
|
8
|
-
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated: drop in v5.0
|
|
13
|
-
*/
|
|
14
|
-
const TUI_DATE_MODE_MASKITO_ADAPTER = {
|
|
15
|
-
DMY: 'dd/mm/yyyy',
|
|
16
|
-
MDY: 'mm/dd/yyyy',
|
|
17
|
-
YMD: 'yyyy/mm/dd',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated: drop in v5.0
|
|
22
|
-
* Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead!
|
|
23
|
-
* @example
|
|
24
|
-
* import {maskitoTransform} from '@maskito/core';
|
|
25
|
-
*
|
|
26
|
-
* const mask = {
|
|
27
|
-
* mask: ['+', '1', ' ', /\d/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
|
|
28
|
-
* };
|
|
29
|
-
* maskitoTransform('12125552368', mask); // +1 (212) 555-2368
|
|
30
|
-
* ___
|
|
31
|
-
* @example
|
|
32
|
-
* import {maskitoTransform} from '@maskito/core';
|
|
33
|
-
* import {maskitoPhoneOptionsGenerator} from '@maskito/phone';
|
|
34
|
-
* import metadata from 'libphonenumber-js/min/metadata';
|
|
35
|
-
*
|
|
36
|
-
* const options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});
|
|
37
|
-
*
|
|
38
|
-
* maskitoTransform('12125552368', mask); // +1 (212) 555-2368
|
|
39
|
-
* ___
|
|
40
|
-
* @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>
|
|
41
|
-
* Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,
|
|
42
|
-
* adding parentheses and hyphens.
|
|
43
|
-
*
|
|
44
|
-
* @param value the input string
|
|
45
|
-
* @param countryCode a country code
|
|
46
|
-
* @param phoneMask a phone number mask
|
|
47
|
-
* @return the formatted phone string of the form +7 XXX XXX-XX-XX
|
|
48
|
-
*/
|
|
49
|
-
function tuiFormatPhone(value, countryCode, phoneMask) {
|
|
50
|
-
if (!value) {
|
|
51
|
-
return '';
|
|
52
|
-
}
|
|
53
|
-
let result = countryCode;
|
|
54
|
-
countryCode = countryCode.replaceAll(/[()]/g, '');
|
|
55
|
-
if (!value.startsWith(countryCode)) {
|
|
56
|
-
value = countryCode + value.replace(CHAR_PLUS, '');
|
|
57
|
-
}
|
|
58
|
-
const splitPhoneMask = phoneMask.split('');
|
|
59
|
-
const splitValue = value.slice(countryCode.length).split('');
|
|
60
|
-
result += ' ';
|
|
61
|
-
if (splitValue.length === 0) {
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
for (const mask of splitPhoneMask) {
|
|
65
|
-
if (splitValue.length === 0) {
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
if (mask === '#') {
|
|
69
|
-
result += splitValue[0] || '';
|
|
70
|
-
splitValue.splice(0, 1);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
result += mask;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const ITEM_SIZE = 1.5;
|
|
80
|
-
const CONTENT_SIZE = 2.5;
|
|
81
|
-
/**
|
|
82
|
-
* @deprecated: drop in v5.0
|
|
83
|
-
*/
|
|
84
|
-
function tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false, size = 'm') {
|
|
85
|
-
const offset = size === 's' ? 0 : 0.25;
|
|
86
|
-
let border = 0;
|
|
87
|
-
if (hasIcon) {
|
|
88
|
-
border += ITEM_SIZE + offset;
|
|
89
|
-
}
|
|
90
|
-
if (hasCleaner) {
|
|
91
|
-
border += ITEM_SIZE + offset;
|
|
92
|
-
}
|
|
93
|
-
if (hasTooltip) {
|
|
94
|
-
border += ITEM_SIZE + offset;
|
|
95
|
-
}
|
|
96
|
-
if (hasContent) {
|
|
97
|
-
border += CONTENT_SIZE + offset;
|
|
98
|
-
}
|
|
99
|
-
return border;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated: drop in v5.0
|
|
104
|
-
* use `validatePhoneNumberLength` from `libphonenumber-js` instead
|
|
105
|
-
* ```
|
|
106
|
-
* npm i libphonenumber-js
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* ```ts
|
|
110
|
-
* import {validatePhoneNumberLength} from 'libphonenumber-js';
|
|
111
|
-
* import metadata from 'libphonenumber-js/max/metadata';
|
|
112
|
-
*
|
|
113
|
-
* const validationError = validatePhoneNumberLength(
|
|
114
|
-
* '+7 777 777-7777',
|
|
115
|
-
* 'KZ'
|
|
116
|
-
* ) // undefined | 'INVALID_COUNTRY' | 'NOT_A_NUMBER' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_LENGTH';
|
|
117
|
-
*
|
|
118
|
-
* validatePhoneNumberLength('+7777777', 'KZ'); // 'TOO_SHORT'
|
|
119
|
-
* validatePhoneNumberLength('+7 777 777-7777', 'KZ'); // undefined
|
|
120
|
-
* validatePhoneNumberLength('+77777777777', 'KZ'); // undefined
|
|
121
|
-
* validatePhoneNumberLength('+777777777777777777', 'KZ'); // 'TOO_LONG'
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
function tuiGetMaxAllowedPhoneLength(countries, isoCode) {
|
|
125
|
-
return countries[isoCode].replaceAll(/[()\- ]/g, '').length;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated: drop in v5.0
|
|
130
|
-
* Calculates size of safe area on mobile devices (status bars)
|
|
131
|
-
*
|
|
132
|
-
* ATTENTION: Only use in browser environment
|
|
133
|
-
*/
|
|
134
|
-
function tuiGetSafeAreaSize() {
|
|
135
|
-
if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {
|
|
136
|
-
return 0;
|
|
137
|
-
}
|
|
138
|
-
const div = document.createElement('div');
|
|
139
|
-
div.style.paddingTop = 'env(safe-area-inset-top)';
|
|
140
|
-
document.body.appendChild(div);
|
|
141
|
-
const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;
|
|
142
|
-
document.body.removeChild(div);
|
|
143
|
-
return safeAreaSize;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated: drop in v5.0
|
|
148
|
-
*/
|
|
149
|
-
const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}`;
|
|
150
|
-
/**
|
|
151
|
-
* @deprecated: drop in v5.0
|
|
152
|
-
*/
|
|
153
|
-
const DEFAULT_ICONS_PATH = (name) => name.includes('.svg#') ? name : `#${name}`;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated: drop in v5.0
|
|
156
|
-
*/
|
|
157
|
-
function tuiIconsPathFactory(staticPath) {
|
|
158
|
-
const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;
|
|
159
|
-
return (name) => {
|
|
160
|
-
if (name.startsWith('tuiIcon')) {
|
|
161
|
-
return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;
|
|
162
|
-
}
|
|
163
|
-
return DEFAULT_ICONS_PATH(name);
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* @deprecated: drop in v5.0
|
|
169
|
-
*/
|
|
170
|
-
function tuiIsPresumedHTMLString(candidate) {
|
|
171
|
-
const trimmed = candidate.trim();
|
|
172
|
-
return trimmed.startsWith('<') && trimmed.endsWith('>');
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const MASK_AFTER_CODE_REGEXP = /\(#+\)|[#\- ]/g;
|
|
176
|
-
/**
|
|
177
|
-
* @deprecated: drop in v5.0
|
|
178
|
-
* Use `getCountryCallingCode` from `libphonenumber-js/core` instead
|
|
179
|
-
* ```ts
|
|
180
|
-
* import {getCountryCallingCode} from 'libphonenumber-js/core';
|
|
181
|
-
* import metadata from 'libphonenumber-js/max/metadata';
|
|
182
|
-
*
|
|
183
|
-
* getCountryCallingCode('US', metadata) // 1
|
|
184
|
-
* getCountryCallingCode('GB', metadata) // 44
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
function tuiIsoToCountryCode(countriesMasks, isoCode) {
|
|
188
|
-
return countriesMasks[isoCode].replaceAll(MASK_AFTER_CODE_REGEXP, '');
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* @deprecated: drop in v5.0
|
|
193
|
-
* use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
|
|
194
|
-
* ```
|
|
195
|
-
* npm i @maskito/phone
|
|
196
|
-
* ```
|
|
197
|
-
*
|
|
198
|
-
* ```ts
|
|
199
|
-
* import {maskitoGetCountryFromNumber} from '@maskito/phone';
|
|
200
|
-
* import metadata from 'libphonenumber-js/max/metadata';
|
|
201
|
-
*
|
|
202
|
-
* const countryIsoCode = maskitoGetCountryFromNumber(
|
|
203
|
-
* '+7 777 777-7777',
|
|
204
|
-
* metadata
|
|
205
|
-
* );
|
|
206
|
-
*
|
|
207
|
-
* countryIsoCode !== 'KZ'
|
|
208
|
-
* ```
|
|
209
|
-
*/
|
|
210
|
-
function tuiNotKzRegion(value) {
|
|
211
|
-
const region = Number(value.slice(1, 4));
|
|
212
|
-
return region < 600 || region > 799;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const WIDTH_SEARCH = 'width="';
|
|
216
|
-
const HEIGHT_SEARCH = 'height="';
|
|
217
|
-
const START = '<svg';
|
|
218
|
-
/**
|
|
219
|
-
* @deprecated: drop in v5.0
|
|
220
|
-
*/
|
|
221
|
-
function tuiProcessIcon(source, name) {
|
|
222
|
-
if (source.includes(`id="${name}"`)) {
|
|
223
|
-
return source;
|
|
224
|
-
}
|
|
225
|
-
const src = source.slice(Math.max(0, source.indexOf(START)));
|
|
226
|
-
const attributes = src.slice(0, Math.max(0, src.indexOf('>')));
|
|
227
|
-
if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {
|
|
228
|
-
return `${src.replace(START, `<svg xmlns="http://www.w3.org/2000/svg"><g id="${name}" xmlns="http://www.w3.org/2000/svg"><svg`)}</g></svg>`;
|
|
229
|
-
}
|
|
230
|
-
const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);
|
|
231
|
-
const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);
|
|
232
|
-
const widthOffset = indexOfWidth + WIDTH_SEARCH.length;
|
|
233
|
-
const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;
|
|
234
|
-
const widthString = attributes.slice(widthOffset, attributes.indexOf('"', widthOffset));
|
|
235
|
-
const heightString = attributes.slice(heightOffset, attributes.indexOf('"', heightOffset));
|
|
236
|
-
if (!heightString ||
|
|
237
|
-
!widthString ||
|
|
238
|
-
widthString.includes('%') ||
|
|
239
|
-
heightString.includes('%') ||
|
|
240
|
-
widthString.includes('em') ||
|
|
241
|
-
heightString.includes('em')) {
|
|
242
|
-
return src.replace(START, `<svg id="${name}"`);
|
|
243
|
-
}
|
|
244
|
-
const width = parseInt(widthString, 10);
|
|
245
|
-
const height = parseInt(heightString, 10);
|
|
246
|
-
return `<g id="${name}" xmlns="http://www.w3.org/2000/svg"><svg x="50%" y="50%" width="${width / 16}em" height="${height / 16}em" overflow="visible" viewBox="0 0 ${width} ${height}"><svg x="${-width / 2}" y="${-height / 2}">${src}</svg></svg></g>`;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @deprecated: drop in v5.0
|
|
251
|
-
*/
|
|
252
|
-
const FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({
|
|
253
|
-
limitWidth: 'fixed',
|
|
254
|
-
align: 'right',
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Generated bundle index. Do not edit.
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
export { DEFAULT_ICONS_PATH, FIXED_DROPDOWN_CONTROLLER_PROVIDER, TUI_CACHE_BUSTING_PAYLOAD, TUI_DATE_MODE_MASKITO_ADAPTER, tuiCapitalizeFirstLetter, tuiFormatPhone, tuiGetBorder, tuiGetMaxAllowedPhoneLength, tuiGetSafeAreaSize, tuiIconsPathFactory, tuiIsPresumedHTMLString, tuiIsoToCountryCode, tuiNotKzRegion, tuiProcessIcon };
|
|
262
|
-
//# sourceMappingURL=taiga-ui-legacy-utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-utils.mjs","sources":["../../../projects/legacy/utils/capitalize-first-letter.ts","../../../projects/legacy/utils/date-mode-maskito-adapter.ts","../../../projects/legacy/utils/format-phone.ts","../../../projects/legacy/utils/get-border.ts","../../../projects/legacy/utils/get-max-allowed-phone-length.ts","../../../projects/legacy/utils/get-safe-area-size.ts","../../../projects/legacy/utils/icons-path-factory.ts","../../../projects/legacy/utils/is-presumed-html-string.ts","../../../projects/legacy/utils/iso-to-country-code.ts","../../../projects/legacy/utils/not-kz-region.ts","../../../projects/legacy/utils/process-icon.ts","../../../projects/legacy/utils/specific-dropdown-controllers.ts","../../../projects/legacy/utils/taiga-ui-legacy-utils.ts"],"sourcesContent":["/**\n * @deprecated: drop in v5.0\n */\nexport function tuiCapitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","import {type MaskitoDateMode} from '@maskito/kit';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_DATE_MODE_MASKITO_ADAPTER: Record<TuiDateMode, MaskitoDateMode> = {\n DMY: 'dd/mm/yyyy',\n MDY: 'mm/dd/yyyy',\n YMD: 'yyyy/mm/dd',\n};\n","import {CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\n/**\n * @deprecated: drop in v5.0\n * Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead!\n * @example\n * import {maskitoTransform} from '@maskito/core';\n *\n * const mask = {\n * mask: ['+', '1', ' ', /\\d/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/],\n * };\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @example\n * import {maskitoTransform} from '@maskito/core';\n * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * const options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});\n *\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\nexport function tuiFormatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return '';\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replaceAll(/[()]/g, '');\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, '');\n }\n\n const splitPhoneMask = phoneMask.split('');\n const splitValue = value.slice(countryCode.length).split('');\n\n result += ' ';\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (const mask of splitPhoneMask) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (mask === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += mask;\n }\n }\n\n return result;\n}\n","import {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\n/**\n * @deprecated: drop in v5.0\n */\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner = false,\n hasTooltip = false,\n hasContent = false,\n size: TuiSizeL | TuiSizeS = 'm',\n): number {\n const offset = size === 's' ? 0 : 0.25;\n let border = 0;\n\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n\n return border;\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\n/**\n * @deprecated: drop in v5.0\n * use `validatePhoneNumberLength` from `libphonenumber-js` instead\n * ```\n * npm i libphonenumber-js\n * ```\n *\n * ```ts\n * import {validatePhoneNumberLength} from 'libphonenumber-js';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const validationError = validatePhoneNumberLength(\n * '+7 777 777-7777',\n * 'KZ'\n * ) // undefined | 'INVALID_COUNTRY' | 'NOT_A_NUMBER' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_LENGTH';\n *\n * validatePhoneNumberLength('+7777777', 'KZ'); // 'TOO_SHORT'\n * validatePhoneNumberLength('+7 777 777-7777', 'KZ'); // undefined\n * validatePhoneNumberLength('+77777777777', 'KZ'); // undefined\n * validatePhoneNumberLength('+777777777777777777', 'KZ'); // 'TOO_LONG'\n * ```\n */\nexport function tuiGetMaxAllowedPhoneLength(\n countries: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): number {\n return countries[isoCode].replaceAll(/[()\\- ]/g, '').length;\n}\n","/**\n * @deprecated: drop in v5.0\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function tuiGetSafeAreaSize(): number {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n\n const div = document.createElement('div');\n\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","import {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}` as const;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = (name) =>\n name.includes('.svg#') ? name : `#${name}`;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIconsPathFactory(staticPath: string): TuiStringHandler<string> {\n const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;\n\n return (name) => {\n if (name.startsWith('tuiIcon')) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n\n return DEFAULT_ICONS_PATH(name);\n };\n}\n","/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith('<') && trimmed.endsWith('>');\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\nconst MASK_AFTER_CODE_REGEXP = /\\(#+\\)|[#\\- ]/g;\n\n/**\n * @deprecated: drop in v5.0\n * Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\nexport function tuiIsoToCountryCode(\n countriesMasks: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): string {\n return countriesMasks[isoCode].replaceAll(MASK_AFTER_CODE_REGEXP, '');\n}\n","/**\n * @deprecated: drop in v5.0\n * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const countryIsoCode = maskitoGetCountryFromNumber(\n * '+7 777 777-7777',\n * metadata\n * );\n *\n * countryIsoCode !== 'KZ'\n * ```\n */\nexport function tuiNotKzRegion(value: string): boolean {\n const region = Number(value.slice(1, 4));\n\n return region < 600 || region > 799;\n}\n","const WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '<svg';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiProcessIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf('>')));\n\n if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf('\"', widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf('\"', heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes('%') ||\n heightString.includes('%') ||\n widthString.includes('em') ||\n heightString.includes('em')\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n","import {tuiDropdownOptionsProvider} from '@taiga-ui/core/directives/dropdown';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({\n limitWidth: 'fixed',\n align: 'right',\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG;AACG,SAAU,wBAAwB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;AAC9D;;ACFA;;AAEG;AACU,MAAA,6BAA6B,GAAyC;AAC/E,IAAA,GAAG,EAAE,YAAY;AACjB,IAAA,GAAG,EAAE,YAAY;AACjB,IAAA,GAAG,EAAE,YAAY;;;ACPrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACa,cAAc,CAC1B,KAAa,EACb,WAAmB,EACnB,SAAiB,EAAA;IAEjB,IAAI,CAAC,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,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC1B,QAAA,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B;QACE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAY,SAAA,EAAA,IAAI,CAAG,CAAA,CAAA,CAAC;;IAGlD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC;IAEzC,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,kEAAA,EACjB,KAAK,GAAG,EACZ,CAAA,YAAA,EACI,MAAM,GAAG,EACb,CAAA,oCAAA,EAAuC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAA,UAAA,EAAa,CAAC,KAAK,GAAG,CAAC,CACzE,KAAA,EAAA,CAAC,MAAM,GAAG,CACd,CAAA,EAAA,EAAK,GAAG,CAAA,gBAAA,CAAkB;AAC9B;;ACtDA;;AAEG;AACI,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AACzE,IAAA,UAAU,EAAE,OAAO;AACnB,IAAA,KAAK,EAAE,OAAO;AACjB,CAAA;;ACRD;;AAEG;;;;"}
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
.clearfix() {
|
|
2
|
-
&::after {
|
|
3
|
-
content: '';
|
|
4
|
-
display: table;
|
|
5
|
-
clear: both;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.autofill(@mode:default) {
|
|
10
|
-
&:-webkit-autofill,
|
|
11
|
-
&:-webkit-autofill:hover,
|
|
12
|
-
&:-webkit-autofill:focus {
|
|
13
|
-
-webkit-text-fill-color: var(--tui-text-primary) !important;
|
|
14
|
-
border-color: var(--tui-service-autofill-background);
|
|
15
|
-
box-shadow: 0 0 0 100rem var(--tui-service-autofill-background) inset !important; // to overlay native background
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.clearinput(@mode: default) {
|
|
20
|
-
.autofill(@mode);
|
|
21
|
-
|
|
22
|
-
padding: 0;
|
|
23
|
-
margin: 0;
|
|
24
|
-
border-width: 0;
|
|
25
|
-
border-radius: inherit;
|
|
26
|
-
background: none;
|
|
27
|
-
font-size: inherit;
|
|
28
|
-
line-height: inherit;
|
|
29
|
-
font-weight: inherit;
|
|
30
|
-
color: inherit;
|
|
31
|
-
caret-color: currentColor;
|
|
32
|
-
outline: none;
|
|
33
|
-
appearance: none;
|
|
34
|
-
word-break: keep-all;
|
|
35
|
-
-webkit-text-fill-color: currentColor; // for Safari
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.visually-hidden() {
|
|
39
|
-
position: absolute;
|
|
40
|
-
block-size: 1px;
|
|
41
|
-
inline-size: 1px;
|
|
42
|
-
margin: -1px;
|
|
43
|
-
border: 0;
|
|
44
|
-
padding: 0;
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
clip: rect(0, 0, 0, 0);
|
|
47
|
-
clip-path: inset(0);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.webkit-auto-fill-button-hidden() {
|
|
51
|
-
// hide: -webkit-caps-lock-indicator
|
|
52
|
-
content: none !important;
|
|
53
|
-
|
|
54
|
-
// hide: -webkit-strong-password-auto-fill-button
|
|
55
|
-
// because safari forcing set display as block
|
|
56
|
-
position: absolute;
|
|
57
|
-
left: -62.4375rem;
|
|
58
|
-
top: -62.4375rem;
|
|
59
|
-
z-index: -999;
|
|
60
|
-
|
|
61
|
-
// hide: -webkit-contacts-auto-fill-button
|
|
62
|
-
display: none !important;
|
|
63
|
-
background: transparent !important;
|
|
64
|
-
pointer-events: none !important;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// customize native scroll
|
|
68
|
-
.customize-scroll() {
|
|
69
|
-
// exclude non-supporting browsers
|
|
70
|
-
@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
|
|
71
|
-
&::-webkit-scrollbar,
|
|
72
|
-
&::-webkit-scrollbar-thumb {
|
|
73
|
-
inline-size: 1rem;
|
|
74
|
-
block-size: 1rem;
|
|
75
|
-
border-radius: 6.25rem;
|
|
76
|
-
background-clip: padding-box;
|
|
77
|
-
border: 0.375rem solid transparent;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&::-webkit-scrollbar {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&::-webkit-scrollbar-thumb {
|
|
85
|
-
background-color: var(--tui-background-neutral-1-hover);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
89
|
-
background-color: var(--tui-background-neutral-1-pressed);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&::-webkit-scrollbar-thumb:active {
|
|
93
|
-
background-color: var(--tui-text-tertiary);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.inset-border(@direction: bottom, @mode: none) {
|
|
99
|
-
& when (@direction = bottom) {
|
|
100
|
-
box-shadow: inset 0 -1px var(--tui-border-normal);
|
|
101
|
-
|
|
102
|
-
& when (@mode = light) {
|
|
103
|
-
box-shadow: inset 0 -1px rgba(255, 255, 255, 0.24);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
& when (@mode = dark) {
|
|
107
|
-
box-shadow: inset 0 -1px rgba(51, 51, 51, 0.24);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
& when (@direction = top) {
|
|
112
|
-
box-shadow: inset 0 1px var(--tui-border-normal);
|
|
113
|
-
|
|
114
|
-
& when (@mode = light) {
|
|
115
|
-
box-shadow: inset 0 1px rgba(255, 255, 255, 0.24);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
& when (@mode = dark) {
|
|
119
|
-
box-shadow: inset 0 1px rgba(51, 51, 51, 0.24);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
& when (@direction = left) {
|
|
124
|
-
box-shadow: inset 1px 0 var(--tui-border-normal);
|
|
125
|
-
|
|
126
|
-
& when (@mode = light) {
|
|
127
|
-
box-shadow: inset 1px 0 rgba(255, 255, 255, 0.24);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
& when (@mode = dark) {
|
|
131
|
-
box-shadow: inset 1px 0 rgba(51, 51, 51, 0.24);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
& when (@direction = right) {
|
|
136
|
-
box-shadow: inset -1px 0 var(--tui-border-normal);
|
|
137
|
-
|
|
138
|
-
& when (@mode = light) {
|
|
139
|
-
box-shadow: inset -1px 0 rgba(255, 255, 255, 0.24);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
& when (@mode = dark) {
|
|
143
|
-
box-shadow: inset -1px 0 rgba(51, 51, 51, 0.24);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// dashed border
|
|
149
|
-
.dashed-border(@color: currentColor, @alignment: bottom, @space: 4) {
|
|
150
|
-
@size: unit(@space, px);
|
|
151
|
-
@percentage: (100% / @space * 2);
|
|
152
|
-
|
|
153
|
-
background-image: linear-gradient(to right, @color 0%, @color @percentage, transparent @percentage);
|
|
154
|
-
background-position: 0 @alignment;
|
|
155
|
-
background-size: @size 1px;
|
|
156
|
-
background-repeat: repeat-x;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// typical opacity properties for icons
|
|
160
|
-
.opacity-icon() {
|
|
161
|
-
opacity: 0.8;
|
|
162
|
-
|
|
163
|
-
&:hover {
|
|
164
|
-
opacity: 1;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.hoverable-with-shadow() {
|
|
169
|
-
.transition();
|
|
170
|
-
|
|
171
|
-
box-shadow: var(--tui-shadow-small);
|
|
172
|
-
cursor: pointer;
|
|
173
|
-
transition-property: transform, box-shadow;
|
|
174
|
-
will-change: transform, box-shadow;
|
|
175
|
-
|
|
176
|
-
&:hover {
|
|
177
|
-
box-shadow: var(--tui-shadow-small-hover);
|
|
178
|
-
transform: translateY(-0.25rem);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.text-overflow-with-fade(@color: var(--tui-background-base), @transparentColor: transparent, @width: 1.875rem) {
|
|
183
|
-
position: relative;
|
|
184
|
-
overflow: hidden;
|
|
185
|
-
|
|
186
|
-
&::after {
|
|
187
|
-
content: '';
|
|
188
|
-
position: absolute;
|
|
189
|
-
top: 0;
|
|
190
|
-
right: 0;
|
|
191
|
-
inline-size: @width;
|
|
192
|
-
block-size: 100%;
|
|
193
|
-
background-image: linear-gradient(to right, @transparentColor 0%, @color 80%, @color 100%);
|
|
194
|
-
pointer-events: none;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
//spaces
|
|
199
|
-
.tui-space(@direction, @size) {
|
|
200
|
-
& when (@direction = all) {
|
|
201
|
-
margin: 0.25rem * @size;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
& when (@direction = top) {
|
|
205
|
-
margin-block-start: 0.25rem * @size;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
& when (@direction = bottom) {
|
|
209
|
-
margin-block-end: 0.25rem * @size;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
& when (@direction = vertical) {
|
|
213
|
-
margin-block-start: 0.25rem * @size;
|
|
214
|
-
margin-block-end: 0.25rem * @size;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
& when (@direction = left) {
|
|
218
|
-
margin-inline-start: 0.25rem * @size;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
& when (@direction = right) {
|
|
222
|
-
margin-inline-end: 0.25rem * @size;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
& when (@direction = horizontal) {
|
|
226
|
-
margin-inline-end: 0.25rem * @size;
|
|
227
|
-
margin-inline-start: 0.25rem * @size;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.contrast-background(@background) {
|
|
232
|
-
background: @background;
|
|
233
|
-
color: contrast(@background, #333, #fff);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.blurred-background(@color: #fff) {
|
|
237
|
-
background: fade(@color, 70%);
|
|
238
|
-
backdrop-filter: blur(0.4375rem);
|
|
239
|
-
}
|