@taiga-ui/kit 5.21.0 → 5.22.0-canary.7c35aae

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 (118) hide show
  1. package/components/files/input-files/input-files.directive.d.ts +1 -0
  2. package/components/index.d.ts +1 -0
  3. package/components/input-number/number-mask.directive.d.ts +9 -7
  4. package/components/meter/index.d.ts +1 -0
  5. package/components/meter/meter.directive.d.ts +12 -0
  6. package/components/pincode/pincode.component.d.ts +2 -0
  7. package/components/routable-dialog/routable-dialog.component.d.ts +0 -2
  8. package/components/segmented/segmented.directive.d.ts +1 -0
  9. package/components/stepper/step.component.d.ts +1 -2
  10. package/components/tiles/tiles.component.d.ts +1 -0
  11. package/components/toast/toast.component.d.ts +1 -0
  12. package/fesm2022/taiga-ui-kit-components-accordion.mjs +2 -2
  13. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-kit-components-avatar.mjs +9 -9
  15. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-kit-components-badge.mjs +2 -2
  17. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-kit-components-block.mjs +2 -2
  19. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-kit-components-chip.mjs +2 -2
  21. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-kit-components-comment.mjs +3 -3
  23. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-kit-components-compass.mjs +2 -2
  25. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-kit-components-copy.mjs +2 -2
  27. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-kit-components-files.mjs +8 -7
  29. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +2 -2
  31. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-kit-components-input-color.mjs +2 -2
  33. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +3 -3
  35. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-kit-components-input-date.mjs +4 -4
  37. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +2 -2
  39. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-kit-components-input-month.mjs +4 -4
  41. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-kit-components-input-number.mjs +11 -30
  43. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +2 -2
  45. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +3 -3
  47. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +2 -2
  49. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-kit-components-input-time.mjs +3 -3
  51. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-kit-components-like.mjs +2 -2
  53. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-kit-components-message.mjs +2 -2
  55. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-kit-components-meter.mjs +54 -0
  57. package/fesm2022/taiga-ui-kit-components-meter.mjs.map +1 -0
  58. package/fesm2022/taiga-ui-kit-components-pin.mjs +3 -3
  59. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-kit-components-pincode.mjs +8 -5
  61. package/fesm2022/taiga-ui-kit-components-pincode.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-kit-components-preview.mjs +3 -3
  63. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-kit-components-progress.mjs +6 -6
  65. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +2 -2
  67. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -9
  69. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-kit-components-segmented.mjs +6 -5
  71. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-kit-components-shrink-wrap.mjs +2 -2
  73. package/fesm2022/taiga-ui-kit-components-shrink-wrap.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-kit-components-status.mjs +3 -3
  75. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-kit-components-stepper.mjs +3 -5
  77. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-kit-components-switch.mjs +2 -2
  79. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-kit-components-tabs.mjs +5 -4
  81. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-kit-components-textarea.mjs +3 -3
  83. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -4
  85. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-kit-components-toast.mjs +6 -5
  87. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-kit-components.mjs +1 -0
  89. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +3 -3
  91. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
  93. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  94. package/fesm2022/taiga-ui-kit-directives-connected.mjs +3 -3
  95. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  96. package/fesm2022/taiga-ui-kit-directives-fade.mjs +3 -3
  97. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  98. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +3 -3
  99. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +2 -2
  101. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +3 -3
  103. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  104. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +2 -2
  105. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-kit-pipes-format-number.mjs +27 -0
  107. package/fesm2022/taiga-ui-kit-pipes-format-number.mjs.map +1 -0
  108. package/fesm2022/taiga-ui-kit-pipes.mjs +1 -0
  109. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-kit-utils.mjs +35 -3
  111. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  112. package/package.json +61 -53
  113. package/pipes/format-number/format-number.pipe.d.ts +9 -0
  114. package/pipes/format-number/index.d.ts +1 -0
  115. package/pipes/index.d.ts +1 -0
  116. package/utils/format/format-number.d.ts +2 -0
  117. package/utils/format/index.d.ts +1 -0
  118. package/utils/index.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-tooltip.mjs","sources":["../../../projects/kit/directives/tooltip/tooltip.options.ts","../../../projects/kit/directives/tooltip/tooltip.directive.ts","../../../projects/kit/directives/tooltip/taiga-ui-kit-directives-tooltip.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_TOOLTIP_OPTIONS, tuiTooltipOptionsProvider] = tuiCreateOptions({\n icon: '',\n appearance: 'icon',\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n type DoCheck,\n inject,\n input,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiSetSignal, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearanceOptionsProvider,\n tuiAppearanceState,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_HINT_OPTIONS,\n TuiHintDescribe,\n TuiHintDirective,\n TuiHintHover,\n} from '@taiga-ui/core/portals/hint';\nimport {TUI_ICON_START} from '@taiga-ui/core/tokens';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {map} from 'rxjs';\n\nimport {TUI_TOOLTIP_OPTIONS} from './tooltip.options';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './tooltip.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-tooltip-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-icon[tuiTooltip]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_TOOLTIP_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () =>\n inject(TUI_TOOLTIP_OPTIONS).icon || inject(TUI_HINT_OPTIONS).icon,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDescribe,\n inputs: ['tuiHintDescribe: tuiTooltipDescribe'],\n },\n {\n directive: TuiHintDirective,\n inputs: ['tuiHint: tuiTooltip', 'tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n tuiTooltip: '',\n class: 'tui-interactive',\n '[attr.data-size]': 'size()',\n '[attr.tabindex]': 'describe.id() ? null : 0',\n '(click.prevent)': '0',\n '(mousedown.prevent)': '0',\n '(pointerdown)': 'onClick($event)',\n },\n})\nexport class TuiTooltip implements DoCheck {\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly isMobile = inject(WA_IS_MOBILE);\n\n protected readonly describe = inject(TuiHintDescribe);\n protected readonly nothing = tuiWithStyles(Styles);\n\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n toSignal(\n inject(TuiHintHover).pipe(\n map((hover) => (hover && this.tuiTooltip() ? 'hover' : null)),\n tuiWatch(),\n ),\n {initialValue: null},\n ),\n );\n\n public readonly size = input<TuiSizeS>('m');\n public readonly tuiTooltip = input<unknown>();\n\n public ngDoCheck(): void {\n if (this.textfield) {\n tuiSetSignal(this.describe.id, this.textfield.input()?.nativeElement.id);\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (!this.isMobile) {\n return;\n }\n\n event.stopPropagation();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAEa,CAAC,mBAAmB,EAAE,yBAAyB,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AAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,eAAe;4BAC1B,MAAM,EAAE,CAAC,qCAAqC,CAAC;AAClD,yBAAA;AACD,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;AACzE,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,UAAU,EAAE,EAAE;AACd,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,iBAAiB,EAAE,0BAA0B;AAC7C,wBAAA,iBAAiB,EAAE,GAAG;AACtB,wBAAA,qBAAqB,EAAE,GAAG;AAC1B,wBAAA,eAAe,EAAE,iBAAiB;AACrC,qBAAA;AACJ,iBAAA;;;AC5ED;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-directives-tooltip.mjs","sources":["../../../projects/kit/directives/tooltip/tooltip.options.ts","../../../projects/kit/directives/tooltip/tooltip.directive.ts","../../../projects/kit/directives/tooltip/taiga-ui-kit-directives-tooltip.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_TOOLTIP_OPTIONS, tuiTooltipOptionsProvider] = tuiCreateOptions({\n icon: '',\n appearance: 'icon',\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n type DoCheck,\n inject,\n input,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiSetSignal, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearanceOptionsProvider,\n tuiAppearanceState,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_HINT_OPTIONS,\n TuiHintDescribe,\n TuiHintDirective,\n TuiHintHover,\n} from '@taiga-ui/core/portals/hint';\nimport {TUI_ICON_START} from '@taiga-ui/core/tokens';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {map} from 'rxjs';\n\nimport {TUI_TOOLTIP_OPTIONS} from './tooltip.options';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './tooltip.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-tooltip-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-icon[tuiTooltip]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_TOOLTIP_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () =>\n inject(TUI_TOOLTIP_OPTIONS).icon || inject(TUI_HINT_OPTIONS).icon,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDescribe,\n inputs: ['tuiHintDescribe: tuiTooltipDescribe'],\n },\n {\n directive: TuiHintDirective,\n inputs: ['tuiHint: tuiTooltip', 'tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n tuiTooltip: '',\n class: 'tui-interactive',\n '[attr.data-size]': 'size()',\n '[attr.tabindex]': 'describe.id() ? null : 0',\n '(click.prevent)': '0',\n '(mousedown.prevent)': '0',\n '(pointerdown)': 'onClick($event)',\n },\n})\nexport class TuiTooltip implements DoCheck {\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly isMobile = inject(WA_IS_MOBILE);\n\n protected readonly describe = inject(TuiHintDescribe);\n protected readonly nothing = tuiWithStyles(Styles);\n\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n toSignal(\n inject(TuiHintHover).pipe(\n map((hover) => (hover && this.tuiTooltip() ? 'hover' : null)),\n tuiWatch(),\n ),\n {initialValue: null},\n ),\n );\n\n public readonly size = input<TuiSizeS>('m');\n public readonly tuiTooltip = input<unknown>();\n\n public ngDoCheck(): void {\n if (this.textfield) {\n tuiSetSignal(this.describe.id, this.textfield.input()?.nativeElement.id);\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (!this.isMobile) {\n return;\n }\n\n event.stopPropagation();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAEa,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,UAAU,EAAE,MAAM;AACrB,CAAA;;AC4BD,MAWM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,yHAVE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ohCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAUV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAXX,SAAS;+BACI,EAAE,EAAA,aAAA,EAMG,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,CAAA,YAAA,EAAe,WAAW,CAAA,CAAE,EAAA,MAAA,EAAA,CAAA,ohCAAA,CAAA,EAAA;;MAmC7B,UAAU,CAAA;AA/BvB,IAAA,WAAA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AAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAsBQ,UAAU,EAAA,UAAA,EAAA,CAAA;kBA/BtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE;wBACP,4BAA4B,CAAC,mBAAmB,CAAC;AACjD,wBAAA;AACI,4BAAA,OAAO,EAAE,cAAc;AACvB,4BAAA,UAAU,EAAE,MACR,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI;AACxE,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,eAAe;4BAC1B,MAAM,EAAE,CAAC,qCAAqC,CAAC;AAClD,yBAAA;AACD,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;AACzE,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,UAAU,EAAE,EAAE;AACd,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,iBAAiB,EAAE,0BAA0B;AAC7C,wBAAA,iBAAiB,EAAE,GAAG;AACtB,wBAAA,qBAAqB,EAAE,GAAG;AAC1B,wBAAA,eAAe,EAAE,iBAAiB;AACrC,qBAAA;AACJ,iBAAA;;;AC5ED;;AAEG;;;;"}
@@ -0,0 +1,27 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe } from '@angular/core';
3
+ import { TuiFormatNumberPipe as TuiFormatNumberPipe$1 } from '@taiga-ui/core/pipes/format-number';
4
+ import { tuiFormatNumber } from '@taiga-ui/kit/utils';
5
+
6
+ class TuiFormatNumberPipe extends TuiFormatNumberPipe$1 {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.formatter = tuiFormatNumber;
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFormatNumberPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
12
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: TuiFormatNumberPipe, isStandalone: true, name: "tuiFormatNumber", pure: false }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFormatNumberPipe, decorators: [{
15
+ type: Pipe,
16
+ args: [{
17
+ name: 'tuiFormatNumber',
18
+ pure: false,
19
+ }]
20
+ }] });
21
+
22
+ /**
23
+ * Generated bundle index. Do not edit.
24
+ */
25
+
26
+ export { TuiFormatNumberPipe };
27
+ //# sourceMappingURL=taiga-ui-kit-pipes-format-number.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-pipes-format-number.mjs","sources":["../../../projects/kit/pipes/format-number/format-number.pipe.ts","../../../projects/kit/pipes/format-number/taiga-ui-kit-pipes-format-number.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {TuiFormatNumberPipe as TuiFormatNumberPipeLegacy} from '@taiga-ui/core/pipes/format-number';\nimport {tuiFormatNumber} from '@taiga-ui/kit/utils';\n\n@Pipe({\n name: 'tuiFormatNumber',\n pure: false,\n})\nexport class TuiFormatNumberPipe\n extends TuiFormatNumberPipeLegacy\n implements PipeTransform\n{\n public override formatter = tuiFormatNumber;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiFormatNumberPipeLegacy"],"mappings":";;;;;AAQM,MAAO,mBACT,SAAQA,qBAAyB,CAAA;AALrC,IAAA,WAAA,GAAA;;QAQoB,IAAA,CAAA,SAAS,GAAG,eAAe;AAC9C,IAAA;+GALY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,iBAAiB;AACvB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1,6 +1,7 @@
1
1
  export * from '@taiga-ui/kit/pipes/auto-color';
2
2
  export * from '@taiga-ui/kit/pipes/emails';
3
3
  export * from '@taiga-ui/kit/pipes/flag';
4
+ export * from '@taiga-ui/kit/pipes/format-number';
4
5
  export * from '@taiga-ui/kit/pipes/hide-selected';
5
6
  export * from '@taiga-ui/kit/pipes/initials';
6
7
  export * from '@taiga-ui/kit/pipes/sort-countries';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-pipes.mjs","sources":["../../../projects/kit/pipes/taiga-ui-kit-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-kit-pipes.mjs","sources":["../../../projects/kit/pipes/taiga-ui-kit-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;AAEG"}
@@ -1,5 +1,9 @@
1
1
  import { HOURS_IN_DAY, TuiTime } from '@taiga-ui/cdk/date-time';
2
- import { inject, computed } from '@angular/core';
2
+ import { maskitoStringifyNumber } from '@maskito/kit';
3
+ import { tuiIsSafeToRound, tuiRoundWith } from '@taiga-ui/cdk/utils/math';
4
+ import { TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
5
+ import { tuiGetFractionPartPadded } from '@taiga-ui/core/utils/format';
6
+ import { inject, INJECTOR, computed } from '@angular/core';
3
7
  import { toSignal } from '@angular/core/rxjs-interop';
4
8
  import { NgControl } from '@angular/forms';
5
9
  import { tuiControlValue } from '@taiga-ui/cdk/observables';
@@ -18,10 +22,38 @@ function tuiCreateTimePeriods(minHour = 0, maxHour = HOURS_IN_DAY, minutes = [0,
18
22
  return timeArray;
19
23
  }
20
24
 
25
+ function tuiFormatNumber(value, { rounding = TUI_DEFAULT_NUMBER_FORMAT.rounding, decimalMode, precision, maximumFractionDigits = precision ?? Infinity, ...settings } = {}) {
26
+ const rounded = typeof value === 'number' &&
27
+ Number.isFinite(maximumFractionDigits) &&
28
+ tuiIsSafeToRound(value, maximumFractionDigits)
29
+ ? tuiRoundWith({
30
+ value,
31
+ precision: maximumFractionDigits,
32
+ method: rounding,
33
+ })
34
+ : value;
35
+ const fractionPart = tuiGetFractionPartPadded(rounded, maximumFractionDigits);
36
+ const withTrailingZeroes = decimalMode === 'always' || (Number(fractionPart) > 0 && decimalMode === 'pad');
37
+ const minimumFractionDigits = settings.minimumFractionDigits ??
38
+ (Number.isFinite(maximumFractionDigits) && withTrailingZeroes
39
+ ? maximumFractionDigits
40
+ : fractionPart.length);
41
+ return maskitoStringifyNumber(rounded, {
42
+ ...TUI_DEFAULT_NUMBER_FORMAT,
43
+ ...settings,
44
+ minimumFractionDigits,
45
+ maximumFractionDigits: withTrailingZeroes
46
+ ? maximumFractionDigits
47
+ : Math.max(minimumFractionDigits, fractionPart.replace(/0*$/, '').length),
48
+ });
49
+ }
50
+
21
51
  function tuiInjectValue() {
22
52
  const textfield = inject(TuiTextfieldComponent, { optional: true });
23
53
  const control = textfield?.control() || inject(NgControl, { optional: true });
24
- const fallback = toSignal(tuiControlValue(control), { requireSync: true });
54
+ const fallback = toSignal(tuiControlValue(control, inject(INJECTOR)), {
55
+ requireSync: true,
56
+ });
25
57
  return computed(() => {
26
58
  const cva = textfield?.child();
27
59
  return cva
@@ -38,5 +70,5 @@ function tuiMaskito(options) {
38
70
  * Generated bundle index. Do not edit.
39
71
  */
40
72
 
41
- export { tuiCreateTimePeriods, tuiInjectValue, tuiMaskito };
73
+ export { tuiCreateTimePeriods, tuiFormatNumber, tuiInjectValue, tuiMaskito };
42
74
  //# sourceMappingURL=taiga-ui-kit-utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-utils.mjs","sources":["../../../projects/kit/utils/create-time-periods.ts","../../../projects/kit/utils/inject-value.ts","../../../projects/kit/utils/maskito.binding.ts","../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk/date-time';\n\nexport function tuiCreateTimePeriods(\n minHour = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n minutes.forEach((minute) => {\n const time = new TuiTime(i, minute);\n\n timeArray.push(time);\n });\n }\n\n return timeArray;\n}\n","import {computed, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\n\nexport function tuiInjectValue<T>(): Signal<T> {\n const textfield = inject(TuiTextfieldComponent, {optional: true});\n const control = textfield?.control() || inject(NgControl, {optional: true});\n const fallback = toSignal<T>(tuiControlValue(control), {requireSync: true});\n\n return computed(() => {\n const cva = textfield?.child();\n\n return cva\n ? (cva.value() as T) // preferred for updateOn: 'blur' | 'submit'\n : fallback();\n });\n}\n","import {type Signal, type WritableSignal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\n\ntype M = MaskitoOptions;\n\nexport function tuiMaskito(options: M | WritableSignal<M>): WritableSignal<M>;\nexport function tuiMaskito(options: Signal<M>): Signal<M>;\nexport function tuiMaskito(options: M | Signal<M>): Signal<M> {\n return tuiDirectiveBinding(MaskitoDirective, 'options', options);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,SAAU,oBAAoB,CAChC,OAAO,GAAG,CAAC,EACX,OAAA,GAAkB,YAAY,EAC9B,OAAA,GAA6B,CAAC,CAAC,EAAE,EAAE,CAAC,EAAA;IAEpC,MAAM,SAAS,GAAc,EAAE;AAE/B,IAAA,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;AACpC,QAAA,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAI;YACvB,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC;AAEnC,YAAA,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;AACxB,QAAA,CAAC,CAAC;IACN;AAEA,IAAA,OAAO,SAAS;AACpB;;SCZgB,cAAc,GAAA;AAC1B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AACjE,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC3E,IAAA,MAAM,QAAQ,GAAG,QAAQ,CAAI,eAAe,CAAC,OAAO,CAAC,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;IAE3E,OAAO,QAAQ,CAAC,MAAK;AACjB,QAAA,MAAM,GAAG,GAAG,SAAS,EAAE,KAAK,EAAE;AAE9B,QAAA,OAAO;AACH,cAAG,GAAG,CAAC,KAAK,EAAQ;cAClB,QAAQ,EAAE;AACpB,IAAA,CAAC,CAAC;AACN;;ACTM,SAAU,UAAU,CAAC,OAAsB,EAAA;IAC7C,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC;AACpE;;ACXA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-utils.mjs","sources":["../../../projects/kit/utils/create-time-periods.ts","../../../projects/kit/utils/format/format-number.ts","../../../projects/kit/utils/inject-value.ts","../../../projects/kit/utils/maskito.binding.ts","../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk/date-time';\n\nexport function tuiCreateTimePeriods(\n minHour = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n minutes.forEach((minute) => {\n const time = new TuiTime(i, minute);\n\n timeArray.push(time);\n });\n }\n\n return timeArray;\n}\n","import {maskitoStringifyNumber} from '@maskito/kit';\nimport {tuiIsSafeToRound, tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\nimport {tuiGetFractionPartPadded} from '@taiga-ui/core/utils/format';\n\nexport function tuiFormatNumber(\n value: bigint | number | null,\n {\n rounding = TUI_DEFAULT_NUMBER_FORMAT.rounding,\n decimalMode,\n precision,\n maximumFractionDigits = precision ?? Infinity,\n ...settings\n }: Partial<TuiNumberFormatSettings> = {},\n): string {\n const rounded =\n typeof value === 'number' &&\n Number.isFinite(maximumFractionDigits) &&\n tuiIsSafeToRound(value, maximumFractionDigits)\n ? tuiRoundWith({\n value,\n precision: maximumFractionDigits,\n method: rounding,\n })\n : value;\n\n const fractionPart = tuiGetFractionPartPadded(rounded, maximumFractionDigits);\n\n const withTrailingZeroes =\n decimalMode === 'always' || (Number(fractionPart) > 0 && decimalMode === 'pad');\n\n const minimumFractionDigits =\n settings.minimumFractionDigits ??\n (Number.isFinite(maximumFractionDigits) && withTrailingZeroes\n ? maximumFractionDigits\n : fractionPart.length);\n\n return maskitoStringifyNumber(rounded, {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n ...settings,\n minimumFractionDigits,\n maximumFractionDigits: withTrailingZeroes\n ? maximumFractionDigits\n : Math.max(minimumFractionDigits, fractionPart.replace(/0*$/, '').length),\n });\n}\n","import {computed, inject, INJECTOR, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\n\nexport function tuiInjectValue<T>(): Signal<T> {\n const textfield = inject(TuiTextfieldComponent, {optional: true});\n const control = textfield?.control() || inject(NgControl, {optional: true});\n const fallback = toSignal<T>(tuiControlValue(control, inject(INJECTOR)), {\n requireSync: true,\n });\n\n return computed(() => {\n const cva = textfield?.child();\n\n return cva\n ? (cva.value() as T) // preferred for updateOn: 'blur' | 'submit'\n : fallback();\n });\n}\n","import {type Signal, type WritableSignal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\n\ntype M = MaskitoOptions;\n\nexport function tuiMaskito(options: M | WritableSignal<M>): WritableSignal<M>;\nexport function tuiMaskito(options: Signal<M>): Signal<M>;\nexport function tuiMaskito(options: M | Signal<M>): Signal<M> {\n return tuiDirectiveBinding(MaskitoDirective, 'options', options);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEM,SAAU,oBAAoB,CAChC,OAAO,GAAG,CAAC,EACX,OAAA,GAAkB,YAAY,EAC9B,OAAA,GAA6B,CAAC,CAAC,EAAE,EAAE,CAAC,EAAA;IAEp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QAAQ;QACX,qBAAqB;AACrB,QAAA,qBAAqB,EAAE;AACnB,cAAE;AACF,cAAE,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;AAChF,KAAA,CAAC;AACN;;SC1CgB,cAAc,GAAA;AAC1B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AACjE,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC3E,IAAA,MAAM,QAAQ,GAAG,QAAQ,CAAI,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE;AACrE,QAAA,WAAW,EAAE,IAAI;AACpB,KAAA,CAAC;IAEF,OAAO,QAAQ,CAAC,MAAK;AACjB,QAAA,MAAM,GAAG,GAAG,SAAS,EAAE,KAAK,EAAE;AAE9B,QAAA,OAAO;AACH,cAAG,GAAG,CAAC,KAAK,EAAQ;cAClB,QAAQ,EAAE;AACpB,IAAA,CAAC,CAAC;AACN;;ACXM,SAAU,UAAU,CAAC,OAAsB,EAAA;IAC7C,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC;AACpE;;ACXA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/kit",
3
- "version": "5.21.0",
3
+ "version": "5.22.0-canary.7c35aae",
4
4
  "description": "Taiga UI Angular main components kit",
5
5
  "keywords": [
6
6
  "angular",
@@ -43,11 +43,11 @@
43
43
  "@ng-web-apis/mutation-observer": "^5.3.0",
44
44
  "@ng-web-apis/platform": "^5.3.0",
45
45
  "@ng-web-apis/resize-observer": "^5.3.0",
46
- "@taiga-ui/cdk": "5.21.0",
47
- "@taiga-ui/core": "5.21.0",
48
- "@taiga-ui/i18n": "5.21.0",
46
+ "@taiga-ui/cdk": "5.22.0",
47
+ "@taiga-ui/core": "5.22.0",
48
+ "@taiga-ui/i18n": "5.22.0",
49
49
  "@taiga-ui/polymorpheus": "^5.0.1",
50
- "@taiga-ui/styles": "5.21.0",
50
+ "@taiga-ui/styles": "5.22.0",
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "module": "fesm2022/taiga-ui-kit.mjs",
@@ -64,14 +64,14 @@
64
64
  "types": "./components/index.d.ts",
65
65
  "default": "./fesm2022/taiga-ui-kit-components.mjs"
66
66
  },
67
- "./directives": {
68
- "types": "./directives/index.d.ts",
69
- "default": "./fesm2022/taiga-ui-kit-directives.mjs"
70
- },
71
67
  "./pipes": {
72
68
  "types": "./pipes/index.d.ts",
73
69
  "default": "./fesm2022/taiga-ui-kit-pipes.mjs"
74
70
  },
71
+ "./directives": {
72
+ "types": "./directives/index.d.ts",
73
+ "default": "./fesm2022/taiga-ui-kit-directives.mjs"
74
+ },
75
75
  "./tokens": {
76
76
  "types": "./tokens/index.d.ts",
77
77
  "default": "./fesm2022/taiga-ui-kit-tokens.mjs"
@@ -256,6 +256,10 @@
256
256
  "types": "./components/message/index.d.ts",
257
257
  "default": "./fesm2022/taiga-ui-kit-components-message.mjs"
258
258
  },
259
+ "./components/meter": {
260
+ "types": "./components/meter/index.d.ts",
261
+ "default": "./fesm2022/taiga-ui-kit-components-meter.mjs"
262
+ },
259
263
  "./components/multi-select": {
260
264
  "types": "./components/multi-select/index.d.ts",
261
265
  "default": "./fesm2022/taiga-ui-kit-components-multi-select.mjs"
@@ -264,14 +268,14 @@
264
268
  "types": "./components/notification-middle/index.d.ts",
265
269
  "default": "./fesm2022/taiga-ui-kit-components-notification-middle.mjs"
266
270
  },
267
- "./components/pagination": {
268
- "types": "./components/pagination/index.d.ts",
269
- "default": "./fesm2022/taiga-ui-kit-components-pagination.mjs"
270
- },
271
271
  "./components/pager": {
272
272
  "types": "./components/pager/index.d.ts",
273
273
  "default": "./fesm2022/taiga-ui-kit-components-pager.mjs"
274
274
  },
275
+ "./components/pagination": {
276
+ "types": "./components/pagination/index.d.ts",
277
+ "default": "./fesm2022/taiga-ui-kit-components-pagination.mjs"
278
+ },
275
279
  "./components/pin": {
276
280
  "types": "./components/pin/index.d.ts",
277
281
  "default": "./fesm2022/taiga-ui-kit-components-pin.mjs"
@@ -280,14 +284,14 @@
280
284
  "types": "./components/pincode/index.d.ts",
281
285
  "default": "./fesm2022/taiga-ui-kit-components-pincode.mjs"
282
286
  },
283
- "./components/progress": {
284
- "types": "./components/progress/index.d.ts",
285
- "default": "./fesm2022/taiga-ui-kit-components-progress.mjs"
286
- },
287
287
  "./components/preview": {
288
288
  "types": "./components/preview/index.d.ts",
289
289
  "default": "./fesm2022/taiga-ui-kit-components-preview.mjs"
290
290
  },
291
+ "./components/progress": {
292
+ "types": "./components/progress/index.d.ts",
293
+ "default": "./fesm2022/taiga-ui-kit-components-progress.mjs"
294
+ },
291
295
  "./components/pulse": {
292
296
  "types": "./components/pulse/index.d.ts",
293
297
  "default": "./fesm2022/taiga-ui-kit-components-pulse.mjs"
@@ -360,6 +364,42 @@
360
364
  "types": "./components/tree/index.d.ts",
361
365
  "default": "./fesm2022/taiga-ui-kit-components-tree.mjs"
362
366
  },
367
+ "./pipes/auto-color": {
368
+ "types": "./pipes/auto-color/index.d.ts",
369
+ "default": "./fesm2022/taiga-ui-kit-pipes-auto-color.mjs"
370
+ },
371
+ "./pipes/emails": {
372
+ "types": "./pipes/emails/index.d.ts",
373
+ "default": "./fesm2022/taiga-ui-kit-pipes-emails.mjs"
374
+ },
375
+ "./pipes/flag": {
376
+ "types": "./pipes/flag/index.d.ts",
377
+ "default": "./fesm2022/taiga-ui-kit-pipes-flag.mjs"
378
+ },
379
+ "./pipes/format-number": {
380
+ "types": "./pipes/format-number/index.d.ts",
381
+ "default": "./fesm2022/taiga-ui-kit-pipes-format-number.mjs"
382
+ },
383
+ "./pipes/hide-selected": {
384
+ "types": "./pipes/hide-selected/index.d.ts",
385
+ "default": "./fesm2022/taiga-ui-kit-pipes-hide-selected.mjs"
386
+ },
387
+ "./pipes/initials": {
388
+ "types": "./pipes/initials/index.d.ts",
389
+ "default": "./fesm2022/taiga-ui-kit-pipes-initials.mjs"
390
+ },
391
+ "./pipes/sort-countries": {
392
+ "types": "./pipes/sort-countries/index.d.ts",
393
+ "default": "./fesm2022/taiga-ui-kit-pipes-sort-countries.mjs"
394
+ },
395
+ "./pipes/stringify": {
396
+ "types": "./pipes/stringify/index.d.ts",
397
+ "default": "./fesm2022/taiga-ui-kit-pipes-stringify.mjs"
398
+ },
399
+ "./pipes/stringify-content": {
400
+ "types": "./pipes/stringify-content/index.d.ts",
401
+ "default": "./fesm2022/taiga-ui-kit-pipes-stringify-content.mjs"
402
+ },
363
403
  "./directives/appearance-proxy": {
364
404
  "types": "./directives/appearance-proxy/index.d.ts",
365
405
  "default": "./fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs"
@@ -368,6 +408,10 @@
368
408
  "types": "./directives/button-group/index.d.ts",
369
409
  "default": "./fesm2022/taiga-ui-kit-directives-button-group.mjs"
370
410
  },
411
+ "./directives/button-select": {
412
+ "types": "./directives/button-select/index.d.ts",
413
+ "default": "./fesm2022/taiga-ui-kit-directives-button-select.mjs"
414
+ },
371
415
  "./directives/chevron": {
372
416
  "types": "./directives/chevron/index.d.ts",
373
417
  "default": "./fesm2022/taiga-ui-kit-directives-chevron.mjs"
@@ -376,10 +420,6 @@
376
420
  "types": "./directives/connected/index.d.ts",
377
421
  "default": "./fesm2022/taiga-ui-kit-directives-connected.mjs"
378
422
  },
379
- "./directives/button-select": {
380
- "types": "./directives/button-select/index.d.ts",
381
- "default": "./fesm2022/taiga-ui-kit-directives-button-select.mjs"
382
- },
383
423
  "./directives/data-list-dropdown-manager": {
384
424
  "types": "./directives/data-list-dropdown-manager/index.d.ts",
385
425
  "default": "./fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs"
@@ -427,38 +467,6 @@
427
467
  "./directives/unmask-handler": {
428
468
  "types": "./directives/unmask-handler/index.d.ts",
429
469
  "default": "./fesm2022/taiga-ui-kit-directives-unmask-handler.mjs"
430
- },
431
- "./pipes/auto-color": {
432
- "types": "./pipes/auto-color/index.d.ts",
433
- "default": "./fesm2022/taiga-ui-kit-pipes-auto-color.mjs"
434
- },
435
- "./pipes/emails": {
436
- "types": "./pipes/emails/index.d.ts",
437
- "default": "./fesm2022/taiga-ui-kit-pipes-emails.mjs"
438
- },
439
- "./pipes/flag": {
440
- "types": "./pipes/flag/index.d.ts",
441
- "default": "./fesm2022/taiga-ui-kit-pipes-flag.mjs"
442
- },
443
- "./pipes/hide-selected": {
444
- "types": "./pipes/hide-selected/index.d.ts",
445
- "default": "./fesm2022/taiga-ui-kit-pipes-hide-selected.mjs"
446
- },
447
- "./pipes/initials": {
448
- "types": "./pipes/initials/index.d.ts",
449
- "default": "./fesm2022/taiga-ui-kit-pipes-initials.mjs"
450
- },
451
- "./pipes/sort-countries": {
452
- "types": "./pipes/sort-countries/index.d.ts",
453
- "default": "./fesm2022/taiga-ui-kit-pipes-sort-countries.mjs"
454
- },
455
- "./pipes/stringify": {
456
- "types": "./pipes/stringify/index.d.ts",
457
- "default": "./fesm2022/taiga-ui-kit-pipes-stringify.mjs"
458
- },
459
- "./pipes/stringify-content": {
460
- "types": "./pipes/stringify-content/index.d.ts",
461
- "default": "./fesm2022/taiga-ui-kit-pipes-stringify-content.mjs"
462
470
  }
463
471
  },
464
472
  "sideEffects": false,
@@ -0,0 +1,9 @@
1
+ import { type PipeTransform } from '@angular/core';
2
+ import { TuiFormatNumberPipe as TuiFormatNumberPipeLegacy } from '@taiga-ui/core/pipes/format-number';
3
+ import { tuiFormatNumber } from '@taiga-ui/kit/utils';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TuiFormatNumberPipe extends TuiFormatNumberPipeLegacy implements PipeTransform {
6
+ formatter: typeof tuiFormatNumber;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiFormatNumberPipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<TuiFormatNumberPipe, "tuiFormatNumber", true>;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './format-number.pipe';
package/pipes/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from '@taiga-ui/kit/pipes/auto-color';
2
2
  export * from '@taiga-ui/kit/pipes/emails';
3
3
  export * from '@taiga-ui/kit/pipes/flag';
4
+ export * from '@taiga-ui/kit/pipes/format-number';
4
5
  export * from '@taiga-ui/kit/pipes/hide-selected';
5
6
  export * from '@taiga-ui/kit/pipes/initials';
6
7
  export * from '@taiga-ui/kit/pipes/sort-countries';
@@ -0,0 +1,2 @@
1
+ import { type TuiNumberFormatSettings } from '@taiga-ui/core/tokens';
2
+ export declare function tuiFormatNumber(value: bigint | number | null, { rounding, decimalMode, precision, maximumFractionDigits, ...settings }?: Partial<TuiNumberFormatSettings>): string;
@@ -0,0 +1 @@
1
+ export * from './format-number';
package/utils/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './create-time-periods';
2
+ export * from './format';
2
3
  export * from './inject-value';
3
4
  export * from './maskito.binding';