@taiga-ui/core 4.52.0-canary.a4e325d → 4.52.0-canary.e444d19
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/icon/icon.component.d.ts +6 -11
- package/directives/icons/icons.directive.d.ts +3 -3
- package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-classes.mjs +3 -3
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-alert.mjs +16 -16
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +16 -19
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +24 -25
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +19 -20
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +5 -6
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +9 -9
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +22 -39
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +5 -6
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +5 -6
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +26 -26
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +50 -52
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +9 -9
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +57 -57
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +6 -6
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +51 -51
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +9 -9
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +9 -9
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-surface.mjs +6 -6
- package/fesm2022/taiga-ui-core-directives-surface.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs +6 -6
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-services.mjs +15 -15
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +18 -27
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/components/icon.less +32 -26
- package/styles/components/icons.less +10 -8
- package/styles/components/link.less +0 -3
- package/styles/mixins/mixins.less +1 -1
- package/styles/mixins/mixins.scss +1 -1
- package/tokens/icon-resolver.d.ts +1 -1
package/package.json
CHANGED
|
@@ -9,18 +9,20 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @vars
|
|
11
11
|
* --t-icon — depending on the data-icon, it can serve as either a mask (`svg`),
|
|
12
|
-
a background (`
|
|
12
|
+
a background (`img`), or content (`font`) for the icon.
|
|
13
13
|
* --t-icon-bg — mask for the background
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
-
* <tui-icon
|
|
16
|
+
* <tui-icon tuiIcons style="--t-icon: url('icon.svg')"></tui-icon>
|
|
17
17
|
*
|
|
18
18
|
* @see-also
|
|
19
19
|
* Icons
|
|
20
20
|
*/
|
|
21
21
|
tui-icon {
|
|
22
|
+
--tui-icon-size: 1em;
|
|
23
|
+
|
|
22
24
|
position: relative;
|
|
23
|
-
display: inline-
|
|
25
|
+
display: inline-flex;
|
|
24
26
|
inline-size: 1em;
|
|
25
27
|
block-size: 1em;
|
|
26
28
|
font-size: 1.5rem;
|
|
@@ -28,8 +30,7 @@ tui-icon {
|
|
|
28
30
|
border: 0 solid transparent;
|
|
29
31
|
vertical-align: middle;
|
|
30
32
|
box-sizing: border-box;
|
|
31
|
-
mask: var(--t-icon-bg) no-repeat center / calc(
|
|
32
|
-
~'min(1em, 100%)' padding-box;
|
|
33
|
+
mask: var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, 0.125rem)) 100%;
|
|
33
34
|
|
|
34
35
|
@media @tui-mouse {
|
|
35
36
|
&[data-appearance='icon']:hover {
|
|
@@ -37,30 +38,35 @@ tui-icon {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
&[data-icon-end] {
|
|
42
|
+
&::before {
|
|
43
|
+
mask-image:
|
|
44
|
+
var(--t-icon-start),
|
|
45
|
+
radial-gradient(circle at bottom 0.1em right 0.1em, transparent calc(0.4em - 0.5px), #000 0.4em);
|
|
46
|
+
mask-composite: intersect;
|
|
47
|
+
}
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
background: currentColor;
|
|
51
|
-
}
|
|
49
|
+
&[data-icon-start='img'],
|
|
50
|
+
&[data-icon-start='font'] {
|
|
51
|
+
&::before {
|
|
52
|
+
mask: radial-gradient(circle at bottom 0.1em right 0.1em, transparent calc(0.4em - 0.5px), #000 0.4em);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
&::after {
|
|
57
|
+
.fullsize();
|
|
58
|
+
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
&[data-icon
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
&[data-icon-start] {
|
|
62
|
+
&::before {
|
|
63
|
+
.fullsize();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&::after {
|
|
67
|
+
transform: translate(36%, 36%);
|
|
68
|
+
|
|
69
|
+
--tui-icon-size: 0.5715em;
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @vars
|
|
9
9
|
* --t-icon-start — depending on the data-icon-start, it can serve as either a mask (`svg`),
|
|
10
|
-
a background (`
|
|
10
|
+
a background (`img`), or content (`font`) for the ::before element
|
|
11
11
|
* --t-icon-end — depending on the data-icon-end, it can serve as either a mask (`svg`),
|
|
12
|
-
a background (`
|
|
12
|
+
a background (`img`), or content (`font`) for the ::after element
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
|
-
* <button tuiIcons
|
|
15
|
+
* <button tuiIcons style="--t-icon-start: url('icon.svg')"></button>
|
|
16
16
|
*
|
|
17
17
|
* @see-also
|
|
18
18
|
* Button, Icon, Link
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
inline-size: 1em;
|
|
28
28
|
block-size: 1em;
|
|
29
29
|
line-height: 1em;
|
|
30
|
-
font-size: 1.5rem;
|
|
30
|
+
font-size: var(--tui-icon-size, 1.5rem);
|
|
31
31
|
flex-shrink: 0;
|
|
32
32
|
box-sizing: content-box;
|
|
33
33
|
background: currentColor;
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
|
|
36
36
|
&::before {
|
|
37
37
|
display: var(--t-icon-start, none);
|
|
38
|
-
mask:
|
|
39
|
-
~'min(1em, 100%)'
|
|
38
|
+
mask:
|
|
39
|
+
var(--t-icon-start) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
|
|
40
|
+
~'min(1em, 100%)',
|
|
41
|
+
100% padding-box;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
&::after {
|
|
@@ -45,12 +47,12 @@
|
|
|
45
47
|
~'min(1em, 100%)' padding-box;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
&[data-icon-start='
|
|
50
|
+
&[data-icon-start='img']::before {
|
|
49
51
|
mask: none;
|
|
50
52
|
background: var(--t-icon-start) no-repeat center/contain padding-box;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
&[data-icon-end='
|
|
55
|
+
&[data-icon-end='img']::after {
|
|
54
56
|
mask: none;
|
|
55
57
|
background: var(--t-icon-end) no-repeat center/contain padding-box;
|
|
56
58
|
}
|
|
@@ -5,6 +5,6 @@ export declare const TUI_ICON_RESOLVER: InjectionToken<TuiStringHandler<string>>
|
|
|
5
5
|
* @deprecated use {@link TUI_ICON_RESOLVER}
|
|
6
6
|
*/
|
|
7
7
|
export declare const TUI_ICON_START_RESOLVER: InjectionToken<TuiStringHandler<string>>;
|
|
8
|
-
export declare function tuiGetIconMode(icon?: string | null):
|
|
8
|
+
export declare function tuiGetIconMode(icon?: string | null): string | undefined;
|
|
9
9
|
export declare function tuiInjectIconResolver(): TuiStringHandler<string>;
|
|
10
10
|
export declare function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider;
|