@taiga-ui/core 3.36.2 → 3.37.0-dev.main.89945b8
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/bundles/taiga-ui-core-components-alert.umd.js +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +21 -21
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +10 -6
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +9 -0
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +8 -4
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +7 -5
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/components/notification/notification.component.d.ts +9 -8
- package/components/notification/notification.module.d.ts +2 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +1 -0
- package/constants/cache-basting-payload.d.ts +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/notification-status-icons.d.ts +7 -0
- package/esm2015/components/alert/alert.component.js +2 -2
- package/esm2015/components/button/button.component.js +1 -1
- package/esm2015/components/notification/notification.component.js +17 -16
- package/esm2015/components/notification/notification.module.js +5 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +9 -6
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/components/scroll-controls/scroll-controls.component.js +2 -2
- package/esm2015/constants/index.js +2 -1
- package/esm2015/constants/notification-status-icons.js +8 -0
- package/esm2015/directives/dropdown/dropdown.component.js +1 -1
- package/esm2015/directives/hint/hint.component.js +1 -1
- package/esm2015/interfaces/alert-options.js +1 -1
- package/esm2015/tokens/notification-options.js +3 -1
- package/esm2015/utils/miscellaneous/get-border.js +7 -6
- package/fesm2015/taiga-ui-core-components-alert.js +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +21 -19
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +10 -7
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +9 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +2 -1
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +6 -5
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/interfaces/alert-options.d.ts +2 -2
- package/package.json +4 -4
- package/styles/mixins/textfield.less +46 -34
- package/styles/mixins/textfield.scss +85 -36
- package/tokens/notification-options.d.ts +6 -0
- package/utils/miscellaneous/get-border.d.ts +2 -1
|
@@ -2,19 +2,20 @@ import { TUI_CACHE_BUSTING_PAYLOAD, DEFAULT_ICONS_PATH, tuiEditingKeys } from '@
|
|
|
2
2
|
|
|
3
3
|
const ITEM_SIZE = 1.5;
|
|
4
4
|
const CONTENT_SIZE = 2.5;
|
|
5
|
-
function tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false) {
|
|
5
|
+
function tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false, size = `m`) {
|
|
6
|
+
const offset = size === `s` ? 0 : 0.25;
|
|
6
7
|
let border = 0;
|
|
7
8
|
if (hasIcon) {
|
|
8
|
-
border += ITEM_SIZE;
|
|
9
|
+
border += ITEM_SIZE + offset;
|
|
9
10
|
}
|
|
10
11
|
if (hasCleaner) {
|
|
11
|
-
border += ITEM_SIZE;
|
|
12
|
+
border += ITEM_SIZE + offset;
|
|
12
13
|
}
|
|
13
14
|
if (hasTooltip) {
|
|
14
|
-
border += ITEM_SIZE;
|
|
15
|
+
border += ITEM_SIZE + offset;
|
|
15
16
|
}
|
|
16
17
|
if (hasContent) {
|
|
17
|
-
border += CONTENT_SIZE;
|
|
18
|
+
border += CONTENT_SIZE + offset;
|
|
18
19
|
}
|
|
19
20
|
return border;
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-miscellaneous.js","sources":["../../../projects/core/utils/miscellaneous/get-border.ts","../../../projects/core/utils/miscellaneous/icons-path-factory.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-presumed-html-string.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/size-bigger.ts","../../../projects/core/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-miscellaneous.js","sources":["../../../projects/core/utils/miscellaneous/get-border.ts","../../../projects/core/utils/miscellaneous/icons-path-factory.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-presumed-html-string.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/size-bigger.ts","../../../projects/core/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.ts"],"sourcesContent":["import {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner: boolean = false,\n hasTooltip: boolean = false,\n hasContent: boolean = 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 {TuiStringHandler} from '@taiga-ui/cdk';\nimport {DEFAULT_ICONS_PATH, TUI_CACHE_BUSTING_PAYLOAD} from '@taiga-ui/core/constants';\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","import {tuiEditingKeys} from '@taiga-ui/core/constants';\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nexport function tuiIsEditingKey(key: string): boolean {\n return key.length === 1 || tuiEditingKeys.includes(key);\n}\n","export function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith(`<`) && trimmed.endsWith(`>`);\n}\n","export function tuiOverrideOptions<T>(\n override: Partial<T>,\n fallback: T,\n): (directive: T | null, options: T | null) => T {\n return (directive, options) => {\n const result = directive || {...(options || fallback)};\n\n Object.keys(override).forEach(key => {\n // Update directive props with new defaults before inputs are processed\n (result as any)[key] = override[key as keyof T];\n });\n\n return result;\n };\n}\n","import {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core/types';\n\nconst SIZES: Record<TuiSizeXXL | TuiSizeXXS, number> = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6,\n};\n\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nexport function tuiSizeBigger(\n size: TuiSizeXXL | TuiSizeXXS,\n biggerThanSize: TuiSizeXXL | TuiSizeXXS = `s`,\n): boolean {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TuiHandler } from '@taiga-ui/cdk';
|
|
2
2
|
import { TuiNotification } from '@taiga-ui/core/enums';
|
|
3
3
|
import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
|
|
4
4
|
export declare type TuiAlertAutoClose = TuiHandler<TuiNotification, boolean | number> | boolean | number;
|
|
5
5
|
export interface TuiAlertOptions<I> {
|
|
6
|
-
readonly label: PolymorpheusContent<
|
|
6
|
+
readonly label: PolymorpheusContent<TuiAlertOptions<I>>;
|
|
7
7
|
readonly status: TuiNotification;
|
|
8
8
|
readonly hasIcon: boolean;
|
|
9
9
|
readonly autoClose: TuiAlertAutoClose;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.37.0-dev.main.89945b8",
|
|
4
4
|
"description": "Core library for creating Angular components and applications using Taiga UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"repository": "https://github.com/tinkoff/taiga-ui",
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@taiga-ui/i18n": "^3.
|
|
18
|
+
"@taiga-ui/i18n": "^3.37.0",
|
|
19
19
|
"tslib": ">=2.0.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@angular/router": ">=12.0.0",
|
|
28
28
|
"@ng-web-apis/common": ">=3.0.0",
|
|
29
29
|
"@ng-web-apis/mutation-observer": ">=3.0.0",
|
|
30
|
-
"@taiga-ui/cdk": ">=3.
|
|
31
|
-
"@taiga-ui/i18n": ">=3.
|
|
30
|
+
"@taiga-ui/cdk": ">=3.37.0",
|
|
31
|
+
"@taiga-ui/i18n": ">=3.37.0",
|
|
32
32
|
"@tinkoff/ng-event-plugins": ">=3.1.0",
|
|
33
33
|
"@tinkoff/ng-polymorpheus": ">=4.0.0",
|
|
34
34
|
"rxjs": ">=6.0.0"
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
@line-height-l: 1.25rem;
|
|
2
|
-
|
|
3
1
|
.textfield-host() {
|
|
4
2
|
.text-basic();
|
|
5
3
|
position: relative;
|
|
6
4
|
display: block;
|
|
7
|
-
border-radius: var(--tui-radius-m);
|
|
8
5
|
text-align: left;
|
|
6
|
+
border-radius: var(--tui-radius-m);
|
|
9
7
|
height: var(--tui-height);
|
|
10
8
|
min-height: var(--tui-height);
|
|
11
9
|
max-height: var(--tui-height);
|
|
@@ -21,7 +19,7 @@
|
|
|
21
19
|
&[data-size='l'] {
|
|
22
20
|
--tui-height: var(--tui-height-l);
|
|
23
21
|
font: var(--tui-font-text-m);
|
|
24
|
-
line-height:
|
|
22
|
+
line-height: 1.25rem;
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -29,7 +27,6 @@
|
|
|
29
27
|
display: flex;
|
|
30
28
|
height: 100%;
|
|
31
29
|
width: 100%;
|
|
32
|
-
padding: 0 var(--tui-padding-m);
|
|
33
30
|
box-sizing: border-box;
|
|
34
31
|
align-items: center;
|
|
35
32
|
overflow: hidden;
|
|
@@ -38,17 +35,12 @@
|
|
|
38
35
|
padding: 0 var(--tui-padding-s);
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
:host[data-size='
|
|
42
|
-
padding: 0 var(--tui-padding-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:after {
|
|
46
|
-
content: '';
|
|
47
|
-
margin-right: -0.25rem;
|
|
38
|
+
:host[data-size='m'] & {
|
|
39
|
+
padding: 0 var(--tui-padding-m);
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
:host[data-size='
|
|
51
|
-
|
|
42
|
+
:host[data-size='l'] & {
|
|
43
|
+
padding: 0 var(--tui-padding-l);
|
|
52
44
|
}
|
|
53
45
|
}
|
|
54
46
|
|
|
@@ -56,9 +48,7 @@
|
|
|
56
48
|
.text-basic();
|
|
57
49
|
.clearinput();
|
|
58
50
|
.fullsize();
|
|
59
|
-
padding: 0 var(--tui-padding-m);
|
|
60
51
|
border: solid transparent;
|
|
61
|
-
border-width: 0 var(--border-end, 0) 0 var(--border-start, 0);
|
|
62
52
|
border-inline-start-width: var(--border-start, 0);
|
|
63
53
|
border-inline-end-width: var(--border-end, 0);
|
|
64
54
|
text-indent: var(--text-indent);
|
|
@@ -114,6 +104,12 @@
|
|
|
114
104
|
padding: 0 var(--tui-padding-s);
|
|
115
105
|
}
|
|
116
106
|
|
|
107
|
+
:host[data-size='m'] &,
|
|
108
|
+
:host-context(tui-primitive-textfield[data-size='m']):not(tui-primitive-textfield),
|
|
109
|
+
:host-context(tui-text-area[data-size='m']):not(tui-text-area) {
|
|
110
|
+
padding: 0 var(--tui-padding-m);
|
|
111
|
+
}
|
|
112
|
+
|
|
117
113
|
:host[data-size='l'] &,
|
|
118
114
|
:host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),
|
|
119
115
|
:host-context(tui-text-area[data-size='l']):not(tui-text-area) {
|
|
@@ -129,7 +125,7 @@
|
|
|
129
125
|
|
|
130
126
|
:host[data-size='l']:not(._label-outside) &,
|
|
131
127
|
:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield) {
|
|
132
|
-
padding-top:
|
|
128
|
+
padding-top: 1.25rem;
|
|
133
129
|
|
|
134
130
|
// Workaround for raising placeholder in temporary autofill
|
|
135
131
|
&:-webkit-autofill + .t-content .t-placeholder {
|
|
@@ -160,15 +156,10 @@
|
|
|
160
156
|
.textfield-wrapper() {
|
|
161
157
|
flex: 1;
|
|
162
158
|
min-width: 0;
|
|
163
|
-
padding-right: 0.25rem;
|
|
164
159
|
padding-inline-end: 0.25rem;
|
|
165
|
-
padding-inline-start: 0;
|
|
166
|
-
|
|
167
|
-
& + * {
|
|
168
|
-
margin: 0;
|
|
169
|
-
}
|
|
170
160
|
}
|
|
171
161
|
|
|
162
|
+
// TODO: Rename to label in 4.0
|
|
172
163
|
.textfield-placeholder() {
|
|
173
164
|
.transition(~'transform, font-size, color, letter-spacing');
|
|
174
165
|
.text-overflow();
|
|
@@ -253,17 +244,33 @@
|
|
|
253
244
|
display: flex;
|
|
254
245
|
width: 1.5rem;
|
|
255
246
|
height: 1.5rem;
|
|
256
|
-
margin: 0 0 0 0.25rem;
|
|
257
|
-
margin-inline-start: 0.25rem;
|
|
258
|
-
margin-inline-end: 0;
|
|
259
247
|
align-items: center;
|
|
260
248
|
justify-content: center;
|
|
261
249
|
box-sizing: border-box;
|
|
262
250
|
cursor: pointer;
|
|
251
|
+
pointer-events: none;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.input-icons() {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
|
|
258
|
+
:host[data-size='m'] & {
|
|
259
|
+
margin-inline-end: -0.125rem;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host[data-size='s'] & {
|
|
263
|
+
margin-inline-end: -0.375rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
:host:not([data-size='s']) & > :not(:first-child) {
|
|
267
|
+
margin-inline-start: 0.25rem;
|
|
268
|
+
}
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
.icon-button() {
|
|
266
272
|
.input-icon();
|
|
273
|
+
pointer-events: auto;
|
|
267
274
|
|
|
268
275
|
:host._readonly &,
|
|
269
276
|
:host._disabled & {
|
|
@@ -296,21 +303,26 @@
|
|
|
296
303
|
.icon-button();
|
|
297
304
|
}
|
|
298
305
|
|
|
299
|
-
// @bad TODO: Refactor this and interactive icons together
|
|
300
306
|
.t-icon {
|
|
301
307
|
.input-icon();
|
|
302
|
-
pointer-events: none;
|
|
303
308
|
|
|
304
309
|
&_left {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
310
|
+
:host[data-size='s'] & {
|
|
311
|
+
margin-inline-start: -0.375rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
:host[data-size='m'] & {
|
|
315
|
+
margin-inline-start: -0.125rem;
|
|
316
|
+
margin-inline-end: 0.375rem;
|
|
317
|
+
}
|
|
308
318
|
|
|
309
319
|
:host[data-size='l'] & {
|
|
310
|
-
margin: 0
|
|
311
|
-
margin-inline-start: -0.25rem;
|
|
312
|
-
margin-inline-end: 0.5rem;
|
|
320
|
+
margin-inline-end: 0.75rem;
|
|
313
321
|
}
|
|
314
322
|
}
|
|
315
323
|
}
|
|
324
|
+
|
|
325
|
+
.t-icons {
|
|
326
|
+
.input-icons();
|
|
327
|
+
}
|
|
316
328
|
}
|
|
@@ -4,8 +4,8 @@ $line-height-l: 1.25rem;
|
|
|
4
4
|
@include text-basic();
|
|
5
5
|
position: relative;
|
|
6
6
|
display: block;
|
|
7
|
-
border-radius: var(--tui-radius-m);
|
|
8
7
|
text-align: left;
|
|
8
|
+
border-radius: var(--tui-radius-m);
|
|
9
9
|
height: var(--tui-height);
|
|
10
10
|
min-height: var(--tui-height);
|
|
11
11
|
max-height: var(--tui-height);
|
|
@@ -20,9 +20,8 @@ $line-height-l: 1.25rem;
|
|
|
20
20
|
|
|
21
21
|
&[data-size='l'] {
|
|
22
22
|
--tui-height: var(--tui-height-l);
|
|
23
|
-
|
|
24
23
|
font: var(--tui-font-text-m);
|
|
25
|
-
line-height:
|
|
24
|
+
line-height: 1.25rem;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
|
|
@@ -30,7 +29,6 @@ $line-height-l: 1.25rem;
|
|
|
30
29
|
display: flex;
|
|
31
30
|
height: 100%;
|
|
32
31
|
width: 100%;
|
|
33
|
-
padding: 0 var(--tui-padding-m);
|
|
34
32
|
box-sizing: border-box;
|
|
35
33
|
align-items: center;
|
|
36
34
|
overflow: hidden;
|
|
@@ -39,17 +37,12 @@ $line-height-l: 1.25rem;
|
|
|
39
37
|
padding: 0 var(--tui-padding-s);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
:host[data-size='
|
|
43
|
-
padding: 0 var(--tui-padding-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&:after {
|
|
47
|
-
content: '';
|
|
48
|
-
margin-right: -0.25rem;
|
|
40
|
+
:host[data-size='m'] & {
|
|
41
|
+
padding: 0 var(--tui-padding-m);
|
|
49
42
|
}
|
|
50
43
|
|
|
51
|
-
:host[data-size='
|
|
52
|
-
|
|
44
|
+
:host[data-size='l'] & {
|
|
45
|
+
padding: 0 var(--tui-padding-l);
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
48
|
|
|
@@ -57,9 +50,7 @@ $line-height-l: 1.25rem;
|
|
|
57
50
|
@include text-basic();
|
|
58
51
|
@include clearinput();
|
|
59
52
|
@include fullsize();
|
|
60
|
-
padding: 0 var(--tui-padding-m);
|
|
61
53
|
border: solid transparent;
|
|
62
|
-
border-width: 0 var(--border-end, 0) 0 var(--border-start, 0);
|
|
63
54
|
border-inline-start-width: var(--border-start, 0);
|
|
64
55
|
border-inline-end-width: var(--border-end, 0);
|
|
65
56
|
text-indent: var(--text-indent);
|
|
@@ -69,11 +60,44 @@ $line-height-l: 1.25rem;
|
|
|
69
60
|
overflow: hidden;
|
|
70
61
|
text-transform: inherit;
|
|
71
62
|
resize: none;
|
|
72
|
-
|
|
63
|
+
|
|
64
|
+
/* stylelint-disable */
|
|
65
|
+
/* Safari autofill icons */
|
|
66
|
+
//noinspection CssInvalidPseudoSelector
|
|
67
|
+
&:-webkit-autofill,
|
|
68
|
+
&:-webkit-autofill::first-line {
|
|
69
|
+
font-size: inherit;
|
|
70
|
+
line-height: inherit;
|
|
71
|
+
}
|
|
72
|
+
/* stylelint-enable */
|
|
73
|
+
|
|
74
|
+
//noinspection ALL
|
|
75
|
+
&::-webkit-caps-lock-indicator,
|
|
76
|
+
&::-webkit-contacts-auto-fill-button,
|
|
77
|
+
&::-webkit-credit-card-auto-fill-button,
|
|
78
|
+
&::-webkit-credentials-auto-fill-button,
|
|
79
|
+
&::-webkit-strong-password-auto-fill-button {
|
|
80
|
+
@include webkit-auto-fill-button-hidden();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&::placeholder {
|
|
84
|
+
color: var(--tui-text-03);
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host._focused:not(._readonly) &::placeholder,
|
|
89
|
+
:host-context(tui-primitive-textfield._focused:not(._readonly)) &::placeholder,
|
|
90
|
+
:host-context(tui-text-area._focused:not(._readonly)) &::placeholder {
|
|
91
|
+
opacity: 1;
|
|
92
|
+
}
|
|
73
93
|
|
|
74
94
|
[tuiWrapper][data-mode='onDark'] &,
|
|
75
95
|
:host-context([tuiWrapper][data-mode='onDark']) {
|
|
76
96
|
@include autofill(dark);
|
|
97
|
+
|
|
98
|
+
&::placeholder {
|
|
99
|
+
color: var(--tui-text-03-night);
|
|
100
|
+
}
|
|
77
101
|
}
|
|
78
102
|
|
|
79
103
|
:host[data-size='s'] &,
|
|
@@ -82,6 +106,12 @@ $line-height-l: 1.25rem;
|
|
|
82
106
|
padding: 0 var(--tui-padding-s);
|
|
83
107
|
}
|
|
84
108
|
|
|
109
|
+
:host[data-size='m'] &,
|
|
110
|
+
:host-context(tui-primitive-textfield[data-size='m']):not(tui-primitive-textfield),
|
|
111
|
+
:host-context(tui-text-area[data-size='m']):not(tui-text-area) {
|
|
112
|
+
padding: 0 var(--tui-padding-m);
|
|
113
|
+
}
|
|
114
|
+
|
|
85
115
|
:host[data-size='l'] &,
|
|
86
116
|
:host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),
|
|
87
117
|
:host-context(tui-text-area[data-size='l']):not(tui-text-area) {
|
|
@@ -91,13 +121,13 @@ $line-height-l: 1.25rem;
|
|
|
91
121
|
:host._disabled &,
|
|
92
122
|
:host-context(tui-primitive-textfield._disabled),
|
|
93
123
|
:host-context(tui-text-area._disabled) {
|
|
94
|
-
//
|
|
124
|
+
// @bad TODO: research why you can reach disabled textfield with mask inside a label without that
|
|
95
125
|
pointer-events: none;
|
|
96
126
|
}
|
|
97
127
|
|
|
98
128
|
:host[data-size='l']:not(._label-outside) &,
|
|
99
129
|
:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield) {
|
|
100
|
-
padding-top:
|
|
130
|
+
padding-top: 1.25rem;
|
|
101
131
|
|
|
102
132
|
// Workaround for raising placeholder in temporary autofill
|
|
103
133
|
&:-webkit-autofill + .t-content .t-placeholder {
|
|
@@ -128,22 +158,17 @@ $line-height-l: 1.25rem;
|
|
|
128
158
|
@mixin textfield-wrapper() {
|
|
129
159
|
flex: 1;
|
|
130
160
|
min-width: 0;
|
|
131
|
-
padding-right: 0.25rem;
|
|
132
161
|
padding-inline-end: 0.25rem;
|
|
133
|
-
padding-inline-start: 0;
|
|
134
|
-
|
|
135
|
-
& + * {
|
|
136
|
-
margin: 0;
|
|
137
|
-
}
|
|
138
162
|
}
|
|
139
163
|
|
|
164
|
+
// TODO: Rename to label in 4.0
|
|
140
165
|
@mixin textfield-placeholder() {
|
|
141
166
|
@include transition('transform, font-size, color, letter-spacing');
|
|
142
|
-
@include text-basic();
|
|
143
167
|
@include text-overflow();
|
|
144
168
|
display: block;
|
|
145
169
|
width: 100%;
|
|
146
170
|
user-select: none;
|
|
171
|
+
font: var(--tui-font-text-s);
|
|
147
172
|
color: var(--tui-text-02);
|
|
148
173
|
pointer-events: none;
|
|
149
174
|
will-change: transform;
|
|
@@ -177,7 +202,8 @@ $line-height-l: 1.25rem;
|
|
|
177
202
|
}
|
|
178
203
|
|
|
179
204
|
:host[data-size='l'] & {
|
|
180
|
-
font
|
|
205
|
+
font: var(--tui-font-text-m);
|
|
206
|
+
line-height: 1.25rem;
|
|
181
207
|
|
|
182
208
|
&_raised {
|
|
183
209
|
font-size: 0.8156rem;
|
|
@@ -220,17 +246,33 @@ $line-height-l: 1.25rem;
|
|
|
220
246
|
display: flex;
|
|
221
247
|
width: 1.5rem;
|
|
222
248
|
height: 1.5rem;
|
|
223
|
-
margin: 0 0 0 0.25rem;
|
|
224
|
-
margin-inline-start: 0.25rem;
|
|
225
|
-
margin-inline-end: 0;
|
|
226
249
|
align-items: center;
|
|
227
250
|
justify-content: center;
|
|
228
251
|
box-sizing: border-box;
|
|
229
252
|
cursor: pointer;
|
|
253
|
+
pointer-events: none;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@mixin input-icons() {
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
|
|
260
|
+
:host[data-size='m'] & {
|
|
261
|
+
margin-inline-end: -0.125rem;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:host[data-size='s'] & {
|
|
265
|
+
margin-inline-end: -0.375rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:host:not([data-size='s']) & > :not(:first-child) {
|
|
269
|
+
margin-inline-start: 0.25rem;
|
|
270
|
+
}
|
|
230
271
|
}
|
|
231
272
|
|
|
232
273
|
@mixin icon-button() {
|
|
233
274
|
@include input-icon();
|
|
275
|
+
pointer-events: auto;
|
|
234
276
|
|
|
235
277
|
:host._readonly &,
|
|
236
278
|
:host._disabled & {
|
|
@@ -263,19 +305,26 @@ $line-height-l: 1.25rem;
|
|
|
263
305
|
@include icon-button();
|
|
264
306
|
}
|
|
265
307
|
|
|
266
|
-
// $bad TODO: Refactor this and interactive icons together
|
|
267
308
|
.t-icon {
|
|
268
309
|
@include input-icon();
|
|
269
310
|
|
|
270
311
|
&_left {
|
|
271
|
-
margin: 0 2 * $space 0 -$space;
|
|
272
|
-
margin-inline-start: -$space;
|
|
273
|
-
margin-inline-end: 2 * $space;
|
|
274
|
-
|
|
275
312
|
:host[data-size='s'] & {
|
|
276
|
-
margin-
|
|
277
|
-
|
|
313
|
+
margin-inline-start: -0.375rem;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
:host[data-size='m'] & {
|
|
317
|
+
margin-inline-start: -0.125rem;
|
|
318
|
+
margin-inline-end: 0.375rem;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:host[data-size='l'] & {
|
|
322
|
+
margin-inline-end: 0.75rem;
|
|
278
323
|
}
|
|
279
324
|
}
|
|
280
325
|
}
|
|
326
|
+
|
|
327
|
+
.t-icons {
|
|
328
|
+
@include input-icons();
|
|
329
|
+
}
|
|
281
330
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Provider } from '@angular/core';
|
|
2
|
+
import { TuiContextWithImplicit } from '@taiga-ui/cdk';
|
|
3
|
+
import { TuiNotification } from '@taiga-ui/core/enums';
|
|
2
4
|
import { TuiAlertOptions } from '@taiga-ui/core/interfaces';
|
|
5
|
+
import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
|
|
3
6
|
export interface TuiNotificationDefaultOptions extends Omit<TuiAlertOptions<unknown>, 'data'> {
|
|
7
|
+
/** @deprecated Use {@link TuiNotificationDefaultOptions.icon} instead */
|
|
8
|
+
readonly hasIcon: boolean;
|
|
4
9
|
readonly defaultAutoCloseTime: number;
|
|
10
|
+
readonly icon: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;
|
|
5
11
|
}
|
|
6
12
|
/** Default values for the notification options. */
|
|
7
13
|
export declare const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { TuiSizeL, TuiSizeS } from '@taiga-ui/core/types';
|
|
2
|
+
export declare function tuiGetBorder(hasIcon: boolean, hasCleaner?: boolean, hasTooltip?: boolean, hasContent?: boolean, size?: TuiSizeL | TuiSizeS): number;
|