@taiga-ui/kit 4.7.0 → 4.8.1-canary.d818d28

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 (70) hide show
  1. package/components/badged-content/badged-content.directive.d.ts +2 -1
  2. package/components/files/file/file.options.d.ts +1 -1
  3. package/components/index.d.ts +1 -0
  4. package/components/like/index.d.ts +2 -0
  5. package/components/like/like.component.d.ts +16 -0
  6. package/components/like/like.options.d.ts +11 -0
  7. package/components/line-clamp/line-clamp.component.d.ts +4 -4
  8. package/directives/copy/copy.directive.d.ts +1 -1
  9. package/directives/copy/copy.options.d.ts +1 -1
  10. package/directives/highlight/highlight.directive.d.ts +5 -0
  11. package/directives/lazy-loading/lazy-loading.directive.d.ts +8 -9
  12. package/directives/password/index.d.ts +1 -0
  13. package/directives/password/password.options.d.ts +1 -1
  14. package/esm2022/components/avatar/avatar.component.mjs +5 -4
  15. package/esm2022/components/badged-content/badged-content.directive.mjs +1 -1
  16. package/esm2022/components/calendar-month/calendar-month.component.mjs +3 -3
  17. package/esm2022/components/calendar-range/calendar-range.component.mjs +4 -2
  18. package/esm2022/components/data-list-wrapper/data-list-group-wrapper.component.mjs +3 -3
  19. package/esm2022/components/data-list-wrapper/data-list-wrapper.component.mjs +3 -3
  20. package/esm2022/components/files/file/file.options.mjs +3 -3
  21. package/esm2022/components/files/input-files/input-files.directive.mjs +3 -3
  22. package/esm2022/components/index.mjs +2 -1
  23. package/esm2022/components/input-phone-international/input-phone-international.component.mjs +3 -3
  24. package/esm2022/components/like/index.mjs +3 -0
  25. package/esm2022/components/like/like.component.mjs +46 -0
  26. package/esm2022/components/like/like.options.mjs +10 -0
  27. package/esm2022/components/like/taiga-ui-kit-components-like.mjs +5 -0
  28. package/esm2022/components/line-clamp/line-clamp.component.mjs +21 -21
  29. package/esm2022/components/routable-dialog/routable-dialog.component.mjs +1 -1
  30. package/esm2022/directives/chevron/chevron.directive.mjs +2 -2
  31. package/esm2022/directives/copy/copy.directive.mjs +3 -3
  32. package/esm2022/directives/highlight/highlight.directive.mjs +6 -2
  33. package/esm2022/directives/lazy-loading/lazy-loading.directive.mjs +27 -28
  34. package/esm2022/directives/password/index.mjs +2 -1
  35. package/esm2022/directives/password/password.directive.mjs +2 -2
  36. package/esm2022/pipes/filter-by-input/filter-by-input.pipe.mjs +2 -2
  37. package/fesm2022/taiga-ui-kit-components-avatar.mjs +4 -3
  38. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +2 -2
  41. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +3 -1
  43. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +4 -4
  45. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-kit-components-files.mjs +6 -5
  47. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +2 -2
  49. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-kit-components-like.mjs +61 -0
  51. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -0
  52. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +23 -22
  53. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-kit-components.mjs +1 -0
  56. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
  58. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-kit-directives-copy.mjs +2 -2
  60. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +6 -2
  62. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +26 -27
  64. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-kit-directives-password.mjs +2 -2
  66. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +1 -1
  68. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  69. package/package.json +523 -517
  70. package/styles/components/like.less +69 -0
@@ -0,0 +1,69 @@
1
+ @import '@taiga-ui/core/styles/taiga-ui-local';
2
+
3
+ /**
4
+ * @name Like
5
+ * @selector [tuiLike]
6
+ *
7
+ * @description
8
+ * A stylized input type="checkbox"
9
+ *
10
+ * @attributes
11
+ * data-size — size (default: 'm') ('s' | 'm')
12
+ *
13
+ * @vars
14
+ * --t-icon-color - custom color for `:checked` state
15
+ * --t-unchecked-icon — default state icon
16
+ * --t-checked-icon — checkmark icon
17
+ *
18
+ * @example
19
+ * <input tuiLike />
20
+ *
21
+ * @see-also
22
+ * Checkbox, Switch, Radio, Appearance
23
+ */
24
+ [tuiLike] {
25
+ --t-size: var(--tui-height-m);
26
+ --t-border-width: 0.75rem;
27
+
28
+ inline-size: var(--t-size);
29
+ block-size: var(--t-size);
30
+ border: var(--t-border-width) transparent solid;
31
+ border-radius: 100%;
32
+ cursor: pointer;
33
+ margin: 0;
34
+ flex-shrink: 0;
35
+
36
+ &::before,
37
+ &::after {
38
+ .fullsize();
39
+ .transition(~'transform, opacity');
40
+
41
+ content: '';
42
+ background: currentColor;
43
+ mask: var(--t-unchecked-icon) no-repeat center/contain;
44
+ }
45
+
46
+ &::after {
47
+ mask-image: var(--t-checked-icon);
48
+ opacity: 0;
49
+ color: var(--t-icon-color, inherit);
50
+ transform: scale(0);
51
+ }
52
+
53
+ &:checked {
54
+ &::before {
55
+ opacity: 0;
56
+ }
57
+
58
+ &::after {
59
+ opacity: 1;
60
+ transform: scale(1);
61
+ transition-timing-function: cubic-bezier(0.2, 0.6, 0.5, 1.8), ease-in-out;
62
+ }
63
+ }
64
+
65
+ &[data-size='s'] {
66
+ --t-size: var(--tui-height-s);
67
+ --t-border-width: 0.5rem;
68
+ }
69
+ }