@taiga-ui/kit 4.7.0-canary.5ce088a → 4.7.0-canary.949e554

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 (39) hide show
  1. package/components/files/file/file.options.d.ts +1 -1
  2. package/components/index.d.ts +1 -0
  3. package/components/like/index.d.ts +2 -0
  4. package/components/like/like.component.d.ts +16 -0
  5. package/components/like/like.options.d.ts +11 -0
  6. package/components/line-clamp/line-clamp.component.d.ts +4 -4
  7. package/directives/copy/copy.options.d.ts +1 -1
  8. package/directives/lazy-loading/lazy-loading.directive.d.ts +3 -4
  9. package/directives/password/password.options.d.ts +1 -1
  10. package/esm2022/components/avatar/avatar.component.mjs +5 -4
  11. package/esm2022/components/calendar-month/calendar-month.component.mjs +3 -3
  12. package/esm2022/components/files/file/file.options.mjs +3 -3
  13. package/esm2022/components/files/input-files/input-files.directive.mjs +3 -3
  14. package/esm2022/components/index.mjs +2 -1
  15. package/esm2022/components/input-phone-international/input-phone-international.component.mjs +3 -3
  16. package/esm2022/components/like/index.mjs +3 -0
  17. package/esm2022/components/like/like.component.mjs +46 -0
  18. package/esm2022/components/like/like.options.mjs +10 -0
  19. package/esm2022/components/like/taiga-ui-kit-components-like.mjs +5 -0
  20. package/esm2022/components/line-clamp/line-clamp.component.mjs +21 -21
  21. package/esm2022/directives/lazy-loading/lazy-loading.directive.mjs +13 -10
  22. package/fesm2022/taiga-ui-kit-components-avatar.mjs +4 -3
  23. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +2 -2
  25. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-kit-components-files.mjs +6 -5
  27. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +2 -2
  29. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-kit-components-like.mjs +61 -0
  31. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -0
  32. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +23 -22
  33. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-kit-components.mjs +1 -0
  35. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +12 -9
  37. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  38. package/package.json +10 -4
  39. 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
+ }