@taiga-ui/core 2.37.1 → 2.38.0

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 (140) hide show
  1. package/bundles/taiga-ui-core-components-button.umd.js +3 -3
  2. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-button.umd.min.js +1 -1
  4. package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-link.umd.js +1 -1
  6. package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
  7. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  8. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +4 -4
  9. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  10. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +2 -2
  11. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +5 -5
  13. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  14. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
  15. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  16. package/bundles/taiga-ui-core-components.umd.js +4 -12
  17. package/bundles/taiga-ui-core-components.umd.js.map +1 -1
  18. package/bundles/taiga-ui-core-components.umd.min.js +1 -1
  19. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  20. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  22. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  23. package/bundles/{taiga-ui-core-components-wrapper.umd.js → taiga-ui-core-directives-wrapper.umd.js} +56 -40
  24. package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -0
  25. package/bundles/taiga-ui-core-directives-wrapper.umd.min.js +16 -0
  26. package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -0
  27. package/bundles/taiga-ui-core-directives.umd.js +12 -4
  28. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
  30. package/bundles/taiga-ui-core-enums.umd.js +2 -0
  31. package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
  32. package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
  33. package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
  34. package/components/index.d.ts +0 -1
  35. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  36. package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
  37. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  38. package/components/taiga-ui-core-components.metadata.json +1 -1
  39. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  40. package/constants/version.d.ts +1 -1
  41. package/directives/index.d.ts +1 -0
  42. package/directives/taiga-ui-core-directives.metadata.json +1 -1
  43. package/directives/wrapper/index.d.ts +2 -0
  44. package/directives/wrapper/package.json +13 -0
  45. package/{components/wrapper/taiga-ui-core-components-wrapper.d.ts → directives/wrapper/taiga-ui-core-directives-wrapper.d.ts} +0 -0
  46. package/directives/wrapper/taiga-ui-core-directives-wrapper.metadata.json +1 -0
  47. package/{components/wrapper/wrapper.component.d.ts → directives/wrapper/wrapper.directive.d.ts} +7 -6
  48. package/{components → directives}/wrapper/wrapper.module.d.ts +0 -0
  49. package/esm2015/components/button/button.module.js +2 -2
  50. package/esm2015/components/index.js +1 -2
  51. package/esm2015/components/link/link.component.js +1 -1
  52. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
  53. package/esm2015/components/primitive-checkbox/primitive-checkbox.module.js +2 -2
  54. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +1 -1
  55. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +2 -2
  56. package/esm2015/constants/version.js +2 -2
  57. package/esm2015/directives/index.js +2 -1
  58. package/esm2015/{components → directives}/wrapper/index.js +2 -2
  59. package/esm2015/{components/wrapper/taiga-ui-core-components-wrapper.js → directives/wrapper/taiga-ui-core-directives-wrapper.js} +1 -1
  60. package/esm2015/directives/wrapper/wrapper.directive.js +98 -0
  61. package/esm2015/{components → directives}/wrapper/wrapper.module.js +4 -4
  62. package/esm2015/enums/interactive-state.js +3 -1
  63. package/esm5/components/button/button.module.js +2 -2
  64. package/esm5/components/index.js +1 -2
  65. package/esm5/components/link/link.component.js +1 -1
  66. package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
  67. package/esm5/components/primitive-checkbox/primitive-checkbox.module.js +2 -2
  68. package/esm5/components/primitive-textfield/primitive-textfield.component.js +1 -1
  69. package/esm5/components/primitive-textfield/primitive-textfield.module.js +2 -2
  70. package/esm5/constants/version.js +2 -2
  71. package/esm5/directives/index.js +2 -1
  72. package/esm5/{components → directives}/wrapper/index.js +2 -2
  73. package/esm5/{components/wrapper/taiga-ui-core-components-wrapper.js → directives/wrapper/taiga-ui-core-directives-wrapper.js} +1 -1
  74. package/esm5/directives/wrapper/wrapper.directive.js +119 -0
  75. package/esm5/{components → directives}/wrapper/wrapper.module.js +4 -4
  76. package/esm5/enums/interactive-state.js +3 -1
  77. package/fesm2015/taiga-ui-core-components-button.js +1 -1
  78. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  79. package/fesm2015/taiga-ui-core-components-link.js +1 -1
  80. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +2 -2
  81. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  82. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +2 -2
  83. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  84. package/fesm2015/taiga-ui-core-components.js +0 -1
  85. package/fesm2015/taiga-ui-core-components.js.map +1 -1
  86. package/fesm2015/taiga-ui-core-constants.js +1 -1
  87. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  88. package/fesm2015/taiga-ui-core-directives-wrapper.js +113 -0
  89. package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -0
  90. package/fesm2015/taiga-ui-core-directives.js +1 -0
  91. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  92. package/fesm2015/taiga-ui-core-enums.js +2 -0
  93. package/fesm2015/taiga-ui-core-enums.js.map +1 -1
  94. package/fesm5/taiga-ui-core-components-button.js +1 -1
  95. package/fesm5/taiga-ui-core-components-button.js.map +1 -1
  96. package/fesm5/taiga-ui-core-components-link.js +1 -1
  97. package/fesm5/taiga-ui-core-components-primitive-checkbox.js +2 -2
  98. package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  99. package/fesm5/taiga-ui-core-components-primitive-textfield.js +2 -2
  100. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  101. package/fesm5/taiga-ui-core-components.js +0 -1
  102. package/fesm5/taiga-ui-core-components.js.map +1 -1
  103. package/fesm5/taiga-ui-core-constants.js +1 -1
  104. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  105. package/fesm5/taiga-ui-core-directives-wrapper.js +137 -0
  106. package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -0
  107. package/fesm5/taiga-ui-core-directives.js +1 -0
  108. package/fesm5/taiga-ui-core-directives.js.map +1 -1
  109. package/fesm5/taiga-ui-core-enums.js +2 -0
  110. package/fesm5/taiga-ui-core-enums.js.map +1 -1
  111. package/package.json +4 -4
  112. package/styles/mixins/textfield.less +2 -2
  113. package/styles/mixins/textfield.scss +2 -2
  114. package/styles/mixins/wrapper.less +57 -0
  115. package/styles/mixins/wrapper.scss +57 -0
  116. package/styles/taiga-ui-local.less +1 -0
  117. package/styles/taiga-ui-local.scss +1 -0
  118. package/styles/theme/variables.less +1 -1
  119. package/styles/theme/wrapper/accent.less +16 -18
  120. package/styles/theme/wrapper/base.less +35 -0
  121. package/styles/theme/wrapper/icon.less +18 -28
  122. package/styles/theme/wrapper/outline.less +28 -29
  123. package/styles/theme/wrapper/primary.less +20 -18
  124. package/styles/theme/wrapper/secondary.less +35 -35
  125. package/styles/theme/wrapper/table.less +27 -33
  126. package/styles/theme/wrapper/textfield.less +45 -55
  127. package/styles/theme/wrapper/whiteblock.less +27 -16
  128. package/styles/theme/wrapper.less +2 -0
  129. package/bundles/taiga-ui-core-components-wrapper.umd.js.map +0 -1
  130. package/bundles/taiga-ui-core-components-wrapper.umd.min.js +0 -16
  131. package/bundles/taiga-ui-core-components-wrapper.umd.min.js.map +0 -1
  132. package/components/wrapper/index.d.ts +0 -2
  133. package/components/wrapper/package.json +0 -13
  134. package/components/wrapper/taiga-ui-core-components-wrapper.metadata.json +0 -1
  135. package/esm2015/components/wrapper/wrapper.component.js +0 -91
  136. package/esm5/components/wrapper/wrapper.component.js +0 -104
  137. package/fesm2015/taiga-ui-core-components-wrapper.js +0 -106
  138. package/fesm2015/taiga-ui-core-components-wrapper.js.map +0 -1
  139. package/fesm5/taiga-ui-core-components-wrapper.js +0 -122
  140. package/fesm5/taiga-ui-core-components-wrapper.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.37.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAA0B,CAAC,GAAG,EAAE,GAAG;;ICEtD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICN/B,OAAO,GAAG;;ACAvB;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.38.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAA0B,CAAC,GAAG,EAAE,GAAG;;ICEtD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICN/B,OAAO,GAAG;;ACAvB;;;;;;"}
@@ -0,0 +1,137 @@
1
+ import { __decorate, __param } from 'tslib';
2
+ import { Inject, Input, HostBinding, Directive, NgModule } from '@angular/core';
3
+ import { MODE_PROVIDER } from '@taiga-ui/core/providers';
4
+ import { TUI_MODE } from '@taiga-ui/core/tokens';
5
+ import { Observable } from 'rxjs';
6
+
7
+ var TuiWrapperDirective = /** @class */ (function () {
8
+ function TuiWrapperDirective(mode$) {
9
+ this.mode$ = mode$;
10
+ this.disabled = false;
11
+ this.readOnly = false;
12
+ // TODO: Rename to `hover` in 3.0
13
+ this.hovered = null;
14
+ // TODO: Rename to `active` in 3.0
15
+ this.pressed = null;
16
+ this.focused = false;
17
+ this.invalid = false;
18
+ this.appearance = '';
19
+ }
20
+ Object.defineProperty(TuiWrapperDirective.prototype, "computedInvalid", {
21
+ get: function () {
22
+ return !this.disabled && !this.readOnly && this.invalid;
23
+ },
24
+ enumerable: true,
25
+ configurable: true
26
+ });
27
+ Object.defineProperty(TuiWrapperDirective.prototype, "computedFocused", {
28
+ get: function () {
29
+ return this.focused && !this.disabled;
30
+ },
31
+ enumerable: true,
32
+ configurable: true
33
+ });
34
+ Object.defineProperty(TuiWrapperDirective.prototype, "interactiveState", {
35
+ get: function () {
36
+ if (this.disabled) {
37
+ return "disabled" /* Disabled */;
38
+ }
39
+ if (this.readOnly) {
40
+ return "readonly" /* Readonly */;
41
+ }
42
+ if (this.pressed) {
43
+ return "pressed" /* Pressed */;
44
+ }
45
+ if (this.hovered) {
46
+ return "hovered" /* Hovered */;
47
+ }
48
+ return null;
49
+ },
50
+ enumerable: true,
51
+ configurable: true
52
+ });
53
+ Object.defineProperty(TuiWrapperDirective.prototype, "noHover", {
54
+ get: function () {
55
+ return this.readOnly || this.hovered === false;
56
+ },
57
+ enumerable: true,
58
+ configurable: true
59
+ });
60
+ Object.defineProperty(TuiWrapperDirective.prototype, "noActive", {
61
+ get: function () {
62
+ return this.readOnly || this.pressed === false;
63
+ },
64
+ enumerable: true,
65
+ configurable: true
66
+ });
67
+ TuiWrapperDirective.ctorParameters = function () { return [
68
+ { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] }
69
+ ]; };
70
+ __decorate([
71
+ Input()
72
+ ], TuiWrapperDirective.prototype, "disabled", void 0);
73
+ __decorate([
74
+ Input()
75
+ ], TuiWrapperDirective.prototype, "readOnly", void 0);
76
+ __decorate([
77
+ Input()
78
+ ], TuiWrapperDirective.prototype, "hovered", void 0);
79
+ __decorate([
80
+ Input()
81
+ ], TuiWrapperDirective.prototype, "pressed", void 0);
82
+ __decorate([
83
+ Input()
84
+ ], TuiWrapperDirective.prototype, "focused", void 0);
85
+ __decorate([
86
+ Input()
87
+ ], TuiWrapperDirective.prototype, "invalid", void 0);
88
+ __decorate([
89
+ Input(),
90
+ HostBinding('attr.data-appearance')
91
+ ], TuiWrapperDirective.prototype, "appearance", void 0);
92
+ __decorate([
93
+ HostBinding('class._invalid')
94
+ ], TuiWrapperDirective.prototype, "computedInvalid", null);
95
+ __decorate([
96
+ HostBinding('class._focused')
97
+ ], TuiWrapperDirective.prototype, "computedFocused", null);
98
+ __decorate([
99
+ HostBinding('attr.data-state')
100
+ ], TuiWrapperDirective.prototype, "interactiveState", null);
101
+ __decorate([
102
+ HostBinding('class._no-hover')
103
+ ], TuiWrapperDirective.prototype, "noHover", null);
104
+ __decorate([
105
+ HostBinding('class._no-active')
106
+ ], TuiWrapperDirective.prototype, "noActive", null);
107
+ TuiWrapperDirective = __decorate([
108
+ Directive({
109
+ selector: 'tui-wrapper, [tuiWrapper]',
110
+ providers: [MODE_PROVIDER],
111
+ host: {
112
+ '($.data-mode.attr)': 'mode$',
113
+ },
114
+ }),
115
+ __param(0, Inject(TUI_MODE))
116
+ ], TuiWrapperDirective);
117
+ return TuiWrapperDirective;
118
+ }());
119
+
120
+ var TuiWrapperModule = /** @class */ (function () {
121
+ function TuiWrapperModule() {
122
+ }
123
+ TuiWrapperModule = __decorate([
124
+ NgModule({
125
+ declarations: [TuiWrapperDirective],
126
+ exports: [TuiWrapperDirective],
127
+ })
128
+ ], TuiWrapperModule);
129
+ return TuiWrapperModule;
130
+ }());
131
+
132
+ /**
133
+ * Generated bundle index. Do not edit.
134
+ */
135
+
136
+ export { TuiWrapperDirective, TuiWrapperModule };
137
+ //# sourceMappingURL=taiga-ui-core-directives-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-directives-wrapper.js","sources":["ng://@taiga-ui/core/directives/wrapper/wrapper.directive.ts","ng://@taiga-ui/core/directives/wrapper/wrapper.module.ts","ng://@taiga-ui/core/directives/wrapper/taiga-ui-core-directives-wrapper.ts"],"sourcesContent":["import {Directive, HostBinding, Inject, Input} from '@angular/core';\nimport {TuiInteractiveState} from '@taiga-ui/core/enums';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n@Directive({\n selector: 'tui-wrapper, [tuiWrapper]',\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiWrapperDirective {\n @Input()\n disabled = false;\n\n @Input()\n readOnly = false;\n\n // TODO: Rename to `hover` in 3.0\n @Input()\n hovered: boolean | null = null;\n\n // TODO: Rename to `active` in 3.0\n @Input()\n pressed: boolean | null = null;\n\n @Input()\n focused = false;\n\n @Input()\n invalid = false;\n\n @Input()\n @HostBinding('attr.data-appearance')\n appearance = '';\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.disabled && !this.readOnly && this.invalid;\n }\n\n @HostBinding('class._focused')\n get computedFocused(): boolean {\n return this.focused && !this.disabled;\n }\n\n @HostBinding('attr.data-state')\n get interactiveState(): TuiInteractiveState | string | null {\n if (this.disabled) {\n return TuiInteractiveState.Disabled;\n }\n\n if (this.readOnly) {\n return TuiInteractiveState.Readonly;\n }\n\n if (this.pressed) {\n return TuiInteractiveState.Pressed;\n }\n\n if (this.hovered) {\n return TuiInteractiveState.Hovered;\n }\n\n return null;\n }\n\n @HostBinding('class._no-hover')\n get noHover(): boolean {\n return this.readOnly || this.hovered === false;\n }\n\n @HostBinding('class._no-active')\n get noActive(): boolean {\n return this.readOnly || this.pressed === false;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiWrapperDirective} from './wrapper.directive';\n\n@NgModule({\n declarations: [TuiWrapperDirective],\n exports: [TuiWrapperDirective],\n})\nexport class TuiWrapperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAuCI,6BAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QAvB9E,aAAQ,GAAG,KAAK,CAAC;QAGjB,aAAQ,GAAG,KAAK,CAAC;;QAIjB,YAAO,GAAmB,IAAI,CAAC;;QAI/B,YAAO,GAAmB,IAAI,CAAC;QAG/B,YAAO,GAAG,KAAK,CAAC;QAGhB,YAAO,GAAG,KAAK,CAAC;QAIhB,eAAU,GAAG,EAAE,CAAC;KAEkE;IAGlF,sBAAI,gDAAe;aAAnB;YACI,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC;SAC3D;;;OAAA;IAGD,sBAAI,gDAAe;aAAnB;YACI,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;SACzC;;;OAAA;IAGD,sBAAI,iDAAgB;aAApB;YACI,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACf,iCAAoC;aACvC;YAED,IAAI,IAAI,CAAC,QAAQ,EAAE;gB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AY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
@@ -11,6 +11,7 @@ export * from '@taiga-ui/core/directives/pointer-hint';
11
11
  export * from '@taiga-ui/core/directives/scroll-into-view';
12
12
  export * from '@taiga-ui/core/directives/table-mode';
13
13
  export * from '@taiga-ui/core/directives/textfield-controller';
14
+ export * from '@taiga-ui/core/directives/wrapper';
14
15
 
15
16
  /**
16
17
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives.js","sources":["ng://@taiga-ui/core/directives/taiga-ui-core-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives.js","sources":["ng://@taiga-ui/core/directives/taiga-ui-core-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;"}
@@ -75,7 +75,9 @@ var TuiInteractiveState;
75
75
  (function (TuiInteractiveState) {
76
76
  TuiInteractiveState["Disabled"] = "disabled";
77
77
  TuiInteractiveState["Readonly"] = "readonly";
78
+ // TODO: Rename to `active` in 3.0
78
79
  TuiInteractiveState["Pressed"] = "pressed";
80
+ // TODO: Rename to `hover` in 3.0
79
81
  TuiInteractiveState["Hovered"] = "hovered";
80
82
  })(TuiInteractiveState || (TuiInteractiveState = {}));
81
83
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-enums.js","sources":["ng://@taiga-ui/core/enums/appearance.ts","ng://@taiga-ui/core/enums/base-color.ts","ng://@taiga-ui/core/enums/button-shape.ts","ng://@taiga-ui/core/enums/decimal.ts","ng://@taiga-ui/core/enums/dropdown-animation.ts","ng://@taiga-ui/core/enums/dropdown-width.ts","ng://@taiga-ui/core/enums/hint-mode.ts","ng://@taiga-ui/core/enums/interactive-state.ts","ng://@taiga-ui/core/enums/link-mode.ts","ng://@taiga-ui/core/enums/notification.ts","ng://@taiga-ui/core/enums/orientation.ts","ng://@taiga-ui/core/enums/range-state.ts","ng://@taiga-ui/core/enums/support-color.ts","ng://@taiga-ui/core/enums/taiga-ui-core-enums.ts"],"sourcesContent":["export const enum TuiAppearance {\n Icon = 'icon',\n Primary = 'primary',\n Accent = 'accent',\n Secondary = 'secondary',\n Table = 'table',\n Textfield = 'textfield',\n Flat = 'flat',\n Outline = 'outline',\n Whiteblock = 'whiteblock',\n WhiteblockActive = 'whiteblock-active',\n}\n","/**\n * @deprecated\n */\nexport const enum TuiBaseColor {\n Primary = 'primary',\n Secondary = 'secondary',\n Success = 'success',\n Error = 'error',\n}\n","/**\n * @deprecated use string values\n */\nexport const enum TuiButtonShape {\n Square = 'square',\n Rounded = 'rounded',\n}\n","/**\n * @deprecated use join type {@link TuiDecimalT}\n */\nexport const enum TuiDecimal {\n NotZero = 'not-zero',\n Always = 'always',\n Never = 'never',\n}\n","export const enum TuiDropdownAnimation {\n FadeInBottom = 'fadeInBottom',\n FadeInTop = 'fadeInTop',\n}\n","/**\n * @deprecated use join type {@link TuiDropdownWidthT}\n */\nexport const enum TuiDropdownWidth {\n Fixed = 'fixed',\n Min = 'min',\n Auto = 'auto',\n}\n","/**\n * @deprecated use join type {@link TuiHintModeT}\n */\nexport const enum TuiHintMode {\n Error = 'error',\n OnDark = 'onDark',\n Overflow = 'overflow',\n}\n","/**\n * @internal used in calendar, year picker and wrapper\n */\nexport const enum TuiInteractiveState {\n Disabled = 'disabled',\n Readonly = 'readonly',\n Pressed = 'pressed',\n Hovered = 'hovered',\n}\n","/**\n * @deprecated use string values\n */\nexport const enum TuiLinkMode {\n Positive = 'positive',\n Negative = 'negative',\n}\n","export const enum TuiNotification {\n Info = 'info',\n Warning = 'warning',\n Success = 'success',\n Error = 'error',\n}\n","/**\n * @deprecated use join type {@link TuiOrientationT}\n */\nexport const enum TuiOrientation {\n Vertical = 'vertical',\n Horizontal = 'horizontal',\n}\n","/**\n * @internal used in calendar and year picker\n */\nexport const enum TuiRangeState {\n Start = 'start',\n End = 'end',\n Single = 'single',\n}\n","/**\n * @deprecated\n */\nexport const enum TuiSupportColor {\n Mustard = 'support-01',\n Texas = 'support-02',\n Tan = 'support-03',\n Salmon = 'support-04',\n Sienna = 'support-05',\n Bittersweet = 'support-06',\n Pinkie = 'support-07',\n Charm = 'support-08',\n Amethist = 'support-09',\n Helio = 'support-10',\n Lilac = 'support-11',\n Malibu = 'support-12',\n Havelock = 'support-13',\n Picton = 'support-14',\n Mint = 'support-15',\n Fountain = 'support-16',\n Puertorico = 'support-17',\n Bay = 'support-18',\n Forest = 'support-19',\n York = 'support-20',\n Feijoa = 'support-21',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"IAAkB;AAAlB,WAAkB,aAAa;IAC3B,8BAAa,CAAA;IACb,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;IACvB,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,8BAAa,CAAA;IACb,oCAAmB,CAAA;IACnB,0CAAyB,CAAA;IACzB,uDAAsC,CAAA;AAC1C,CAAC,EAXiB,aAAa,KAAb,aAAa;;ACA/B;;;IAGkB;AAAlB,WAAkB,YAAY;IAC1B,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;AACnB,CAAC,EALiB,YAAY,KAAZ,YAAY;;ACH9B;;;IAGkB;AAAlB,WAAkB,cAAc;IAC5B,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;AACvB,CAAC,EAHiB,cAAc,KAAd,cAAc;;ACHhC;;;IAGkB;AAAlB,WAAkB,UAAU;IACxB,kCAAoB,CAAA;IACpB,+BAAiB,CAAA;IACjB,6BAAe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A;IACrB,wCAAqB,CAAA;IACrB,6CAA0B,CAAA;IAC1B,wCAAqB,CAAA;IACrB,uCAAoB,CAAA;IACpB,0CAAuB,CAAA;IACvB,uCAAoB,CAAA;IACpB,uCAAoB,CAAA;IACpB,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,qCAAkB,CAAA;IAClB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;AACzB,CAAC,EAtBiB,eAAe,KAAf,eAAe;;ACHjC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-enums.js","sources":["ng://@taiga-ui/core/enums/appearance.ts","ng://@taiga-ui/core/enums/base-color.ts","ng://@taiga-ui/core/enums/button-shape.ts","ng://@taiga-ui/core/enums/decimal.ts","ng://@taiga-ui/core/enums/dropdown-animation.ts","ng://@taiga-ui/core/enums/dropdown-width.ts","ng://@taiga-ui/core/enums/hint-mode.ts","ng://@taiga-ui/core/enums/interactive-state.ts","ng://@taiga-ui/core/enums/link-mode.ts","ng://@taiga-ui/core/enums/notification.ts","ng://@taiga-ui/core/enums/orientation.ts","ng://@taiga-ui/core/enums/range-state.ts","ng://@taiga-ui/core/enums/support-color.ts","ng://@taiga-ui/core/enums/taiga-ui-core-enums.ts"],"sourcesContent":["export const enum TuiAppearance {\n Icon = 'icon',\n Primary = 'primary',\n Accent = 'accent',\n Secondary = 'secondary',\n Table = 'table',\n Textfield = 'textfield',\n Flat = 'flat',\n Outline = 'outline',\n Whiteblock = 'whiteblock',\n WhiteblockActive = 'whiteblock-active',\n}\n","/**\n * @deprecated\n */\nexport const enum TuiBaseColor {\n Primary = 'primary',\n Secondary = 'secondary',\n Success = 'success',\n Error = 'error',\n}\n","/**\n * @deprecated use string values\n */\nexport const enum TuiButtonShape {\n Square = 'square',\n Rounded = 'rounded',\n}\n","/**\n * @deprecated use join type {@link TuiDecimalT}\n */\nexport const enum TuiDecimal {\n NotZero = 'not-zero',\n Always = 'always',\n Never = 'never',\n}\n","export const enum TuiDropdownAnimation {\n FadeInBottom = 'fadeInBottom',\n FadeInTop = 'fadeInTop',\n}\n","/**\n * @deprecated use join type {@link TuiDropdownWidthT}\n */\nexport const enum TuiDropdownWidth {\n Fixed = 'fixed',\n Min = 'min',\n Auto = 'auto',\n}\n","/**\n * @deprecated use join type {@link TuiHintModeT}\n */\nexport const enum TuiHintMode {\n Error = 'error',\n OnDark = 'onDark',\n Overflow = 'overflow',\n}\n","/**\n * @internal used in calendar, year picker and wrapper\n */\nexport const enum TuiInteractiveState {\n Disabled = 'disabled',\n Readonly = 'readonly',\n // TODO: Rename to `active` in 3.0\n Pressed = 'pressed',\n // TODO: Rename to `hover` in 3.0\n Hovered = 'hovered',\n}\n","/**\n * @deprecated use string values\n */\nexport const enum TuiLinkMode {\n Positive = 'positive',\n Negative = 'negative',\n}\n","export const enum TuiNotification {\n Info = 'info',\n Warning = 'warning',\n Success = 'success',\n Error = 'error',\n}\n","/**\n * @deprecated use join type {@link TuiOrientationT}\n */\nexport const enum TuiOrientation {\n Vertical = 'vertical',\n Horizontal = 'horizontal',\n}\n","/**\n * @internal used in calendar and year picker\n */\nexport const enum TuiRangeState {\n Start = 'start',\n End = 'end',\n Single = 'single',\n}\n","/**\n * @deprecated\n */\nexport const enum TuiSupportColor {\n Mustard = 'support-01',\n Texas = 'support-02',\n Tan = 'support-03',\n Salmon = 'support-04',\n Sienna = 'support-05',\n Bittersweet = 'support-06',\n Pinkie = 'support-07',\n Charm = 'support-08',\n Amethist = 'support-09',\n Helio = 'support-10',\n Lilac = 'support-11',\n Malibu = 'support-12',\n Havelock = 'support-13',\n Picton = 'support-14',\n Mint = 'support-15',\n Fountain = 'support-16',\n Puertorico = 'support-17',\n Bay = 'support-18',\n Forest = 'support-19',\n York = 'support-20',\n Feijoa = 'support-21',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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iB,mBAAmB,KAAnB,mBAAmB;;ACHrC;;;IAGkB;AAAlB,WAAkB,WAAW;IACzB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;AACzB,CAAC,EAHiB,WAAW,KAAX,WAAW;;ICHX;AAAlB,WAAkB,eAAe;IAC7B,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACnB,CAAC,EALiB,eAAe,KAAf,eAAe;;ACAjC;;;IAGkB;AAAlB,WAAkB,cAAc;IAC5B,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;AAC7B,CAAC,EAHiB,cAAc,KAAd,cAAc;;ACHhC;;;IAGkB;AAAlB,WAAkB,aAAa;IAC3B,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,kCAAiB,CAAA;AACrB,CAAC,EAJiB,aAAa,KAAb,aAAa;;ACH/B;;;IAGkB;AAAlB,WAAkB,eAAe;IAC7B,yCAAsB,CAAA;IACtB,uCAAoB,CAAA;IACpB,qCAAkB,CAAA;IAClB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,6CAA0B,CAAA;IAC1B,wCAAqB,CAAA;IACrB,uCAAoB,CAAA;IACpB,0CAAuB,CAAA;IACvB,uCAAoB,CAAA;IACpB,uCAAoB,CAAA;IACpB,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,qCAAkB,CAAA;IAClB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;AACzB,CAAC,EAtBiB,eAAe,KAAf,eAAe;;ACHjC;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/core",
3
- "version": "2.37.1",
3
+ "version": "2.38.0",
4
4
  "description": "Core library for creating Angular components and applications using Taiga UI",
5
5
  "keywords": [
6
6
  "angular",
@@ -16,12 +16,12 @@
16
16
  "homepage": "https://github.com/tinkoff/taiga-ui",
17
17
  "schematics": "./schematics/collection.json",
18
18
  "dependencies": {
19
- "@taiga-ui/i18n": "^2.37.1",
19
+ "@taiga-ui/i18n": "^2.38.0",
20
20
  "tslib": "^1.10.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@taiga-ui/i18n": ">=2.37.1",
24
- "@taiga-ui/cdk": ">=2.37.1",
23
+ "@taiga-ui/i18n": ">=2.38.0",
24
+ "@taiga-ui/cdk": ">=2.38.0",
25
25
  "@angular/animations": ">=9.0.0",
26
26
  "@angular/common": ">=9.0.0",
27
27
  "@angular/core": ">=9.0.0",
@@ -155,12 +155,12 @@
155
155
  }
156
156
 
157
157
  :host._invalid:not(._focused) &,
158
- :host._invalid:not(._focused)._hovered & {
158
+ :host._invalid:not(._focused):hover & {
159
159
  color: var(--tui-error-fill);
160
160
  }
161
161
 
162
162
  :host[data-mode='onDark']._invalid:not(._focused) &,
163
- :host[data-mode='onDark']._invalid:not(._focused)._hovered & {
163
+ :host[data-mode='onDark']._invalid:not(._focused):hover & {
164
164
  color: var(--tui-error-fill-night);
165
165
  }
166
166
  }
@@ -119,12 +119,12 @@
119
119
  }
120
120
 
121
121
  :host._invalid:not(._focused) &,
122
- :host._invalid:not(._focused)._hovered & {
122
+ :host._invalid:not(._focused):hover & {
123
123
  color: var(--tui-error-fill);
124
124
  }
125
125
 
126
126
  :host[data-mode='onDark']._invalid:not(._focused) &,
127
- :host[data-mode='onDark']._invalid:not(._focused)._hovered & {
127
+ :host[data-mode='onDark']._invalid:not(._focused):hover & {
128
128
  color: var(--tui-error-fill-night);
129
129
  }
130
130
  }
@@ -0,0 +1,57 @@
1
+ .wrapper-hover(@ruleset) {
2
+ &:hover:not(._no-hover),
3
+ &[data-state='hovered'] {
4
+ @ruleset();
5
+ }
6
+ }
7
+
8
+ .wrapper-active(@ruleset) {
9
+ &:active:not(._no-active),
10
+ &[data-state='pressed'],
11
+ &[data-state='pressed']:hover {
12
+ @ruleset();
13
+ }
14
+ }
15
+
16
+ .wrapper-readonly(@ruleset, @native: false) {
17
+ // Specificity artificially increased to match `:hover:not()` level
18
+ & when (@native = true) {
19
+ &:read-only:read-only,
20
+ &[data-state='readonly'][data-state='readonly'] {
21
+ @ruleset();
22
+ }
23
+ }
24
+
25
+ & when (@native = false) {
26
+ &[data-state='readonly'][data-state='readonly'] {
27
+ @ruleset();
28
+ }
29
+ }
30
+ }
31
+
32
+ .wrapper-disabled(@ruleset) {
33
+ // Specificity artificially increased to match `:hover:not()` level
34
+ &:disabled:disabled,
35
+ &[data-state='disabled'][data-state='disabled'] {
36
+ @ruleset();
37
+ }
38
+ }
39
+
40
+ .wrapper-focus(@ruleset) {
41
+ // TODO: Join rules together once all browsers support focus-visible
42
+ // Specificity artificially increased to match `:hover:not()` level
43
+ &:focus-visible:focus-visible {
44
+ @ruleset();
45
+ }
46
+
47
+ &._focused._focused {
48
+ @ruleset();
49
+ }
50
+ }
51
+
52
+ .wrapper-invalid(@ruleset) {
53
+ &:invalid:invalid,
54
+ &._invalid._invalid {
55
+ @ruleset();
56
+ }
57
+ }
@@ -0,0 +1,57 @@
1
+ @mixin wrapper-hover {
2
+ &:hover:not(._no-hover),
3
+ &[data-state='hovered'] {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin wrapper-active {
9
+ &:active:not(._no-active),
10
+ &[data-state='pressed'],
11
+ &[data-state='pressed']:hover {
12
+ @content;
13
+ }
14
+ }
15
+
16
+ @mixin wrapper-readonly($native: false) {
17
+ // Specificity artificially increased to match `:hover:not()` level
18
+ @if $native == true {
19
+ &:read-only:read-only,
20
+ &[data-state='readonly'][data-state='readonly'] {
21
+ @content;
22
+ }
23
+ }
24
+
25
+ @if $native == false {
26
+ &[data-state='readonly'][data-state='readonly'] {
27
+ @content;
28
+ }
29
+ }
30
+ }
31
+
32
+ @mixin wrapper-disabled {
33
+ // Specificity artificially increased to match `:hover:not()` level
34
+ &:disabled:disabled,
35
+ &[data-state='disabled'][data-state='disabled'] {
36
+ @content;
37
+ }
38
+ }
39
+
40
+ @mixin wrapper-focus {
41
+ // TODO: Join rules together once all browsers support focus-visible
42
+ // Specificity artificially increased to match `:hover:not()` level
43
+ &:focus-visible:focus-visible {
44
+ @content;
45
+ }
46
+
47
+ &._focused._focused {
48
+ @content;
49
+ }
50
+ }
51
+
52
+ @mixin wrapper-invalid {
53
+ &:invalid:invalid,
54
+ &._invalid._invalid {
55
+ @content;
56
+ }
57
+ }
@@ -5,4 +5,5 @@
5
5
  @import 'mixins/slider.less';
6
6
  @import 'mixins/text.less';
7
7
  @import 'mixins/textfield.less';
8
+ @import 'mixins/wrapper.less';
8
9
  @import 'variables/media.less';
@@ -5,4 +5,5 @@ $space: 4px;
5
5
  @import 'mixins/slider.scss';
6
6
  @import 'mixins/text.scss';
7
7
  @import 'mixins/textfield.scss';
8
+ @import 'mixins/wrapper.scss';
8
9
  @import 'variables/media.scss';
@@ -48,7 +48,7 @@
48
48
  --tui-base-09: #000; // icons on inverted background
49
49
  --tui-primary: #526ed3; // primary buttons, background
50
50
  --tui-primary-hover: #6c86e2; // primary buttons hover
51
- --tui-primary-active: #314692; // primary buttons hover
51
+ --tui-primary-active: #314692; // primary buttons pressed
52
52
  --tui-primary-text: #fff; // text on primary background
53
53
  --tui-secondary: #ebefff; // inputs and secondary buttons
54
54
  --tui-secondary-hover: #dfe3f3; // inputs and secondary buttons hover
@@ -1,31 +1,29 @@
1
- tui-wrapper[data-appearance='accent'] {
1
+ @import '../../taiga-ui-local.less';
2
+
3
+ /* stylelint-disable order/order */
4
+ tui-wrapper[data-appearance='accent'],
5
+ [tuiWrapper][data-appearance='accent'] {
2
6
  background: var(--tui-accent);
3
7
  color: var(--tui-accent-text);
4
8
 
5
- &[data-state='hovered'] {
9
+ .wrapper-hover({
6
10
  background: var(--tui-accent-hover);
7
- }
11
+ });
8
12
 
9
- &:active,
10
- &[data-state='pressed'] {
13
+ .wrapper-active({
11
14
  background: var(--tui-accent-active);
12
- }
13
-
14
- &[data-state='disabled'] {
15
- opacity: var(--tui-disabled-opacity);
16
- }
15
+ });
17
16
 
18
- &._invalid {
17
+ .wrapper-invalid({
19
18
  color: var(--tui-negative-night);
20
19
  background: var(--tui-error-bg);
21
20
 
22
- &[data-state='hovered'],
23
- &[data-state='pressed'] {
21
+ .wrapper-hover({
24
22
  background: var(--tui-error-bg-hover);
25
- }
23
+ });
26
24
 
27
- &._focused:after {
28
- color: var(--tui-error-fill);
29
- }
30
- }
25
+ .wrapper-focus({
26
+ --tui-focus: var(--tui-error-fill);
27
+ });
28
+ });
31
29
  }
@@ -0,0 +1,35 @@
1
+ @import '../../taiga-ui-local.less';
2
+
3
+ /* stylelint-disable order/order */
4
+ tui-wrapper,
5
+ [tuiWrapper] {
6
+ .transition(~'color, background');
7
+ position: relative;
8
+ display: block;
9
+ height: 100%;
10
+ width: 100%;
11
+ appearance: none;
12
+ border-radius: inherit;
13
+
14
+ &:after {
15
+ .transition(box-shadow);
16
+ .fullsize(absolute, inset);
17
+ content: '';
18
+ border-radius: inherit;
19
+ border: 1px solid currentColor;
20
+ pointer-events: none;
21
+ color: transparent;
22
+ }
23
+
24
+ .wrapper-focus({
25
+ &:after {
26
+ border-width: 2px;
27
+ color: var(--tui-focus);
28
+ }
29
+ });
30
+
31
+ .wrapper-disabled({
32
+ pointer-events: none;
33
+ opacity: var(--tui-disabled-opacity);
34
+ });
35
+ }
@@ -1,42 +1,32 @@
1
- // TODO: Variables names should not rely on textfield
2
- tui-wrapper[data-appearance='icon'] {
1
+ @import '../../taiga-ui-local.less';
2
+
3
+ /* stylelint-disable order/order */
4
+ tui-wrapper[data-appearance='icon'],
5
+ [tuiWrapper][data-appearance='icon'] {
3
6
  background: transparent;
4
7
  color: var(--tui-base-06);
5
8
 
6
- &[data-state='hovered'] {
7
- color: var(--tui-base-07);
8
- }
9
-
10
- &:active,
11
- &[data-state='pressed'] {
12
- color: var(--tui-base-08);
13
- }
14
-
15
- &[data-state='disabled'] {
16
- opacity: var(--tui-disabled-opacity);
17
- }
18
-
19
9
  &[data-mode='onDark'] {
20
10
  color: var(--tui-text-01-night);
21
11
  opacity: var(--tui-disabled-opacity);
22
12
 
23
- &[data-state='hovered'],
24
- &[data-state='pressed'] {
25
- opacity: 1;
26
- }
27
-
28
- &._focused:after {
29
- color: var(--tui-base-01);
30
- }
13
+ .wrapper-focus({
14
+ --tui-focus: var(--tui-base-01);
15
+ });
31
16
  }
32
17
 
33
18
  &[data-mode='onLight'] {
34
19
  color: var(--tui-text-01);
35
20
  opacity: var(--tui-disabled-opacity);
36
-
37
- &[data-state='hovered'],
38
- &[data-state='pressed'] {
39
- opacity: 1;
40
- }
41
21
  }
22
+
23
+ .wrapper-hover({
24
+ color: var(--tui-base-07);
25
+ opacity: 1;
26
+ });
27
+
28
+ .wrapper-active({
29
+ color: var(--tui-base-08);
30
+ opacity: 1;
31
+ });
42
32
  }