@taiga-ui/core 4.52.0-canary.216e347 → 4.52.0-canary.217a686
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/classes/accessors.d.ts +2 -2
- package/classes/driver.d.ts +1 -1
- package/components/button/button.directive.d.ts +2 -3
- package/components/button/button.options.d.ts +1 -1
- package/components/calendar/calendar-sheet.component.d.ts +2 -7
- package/components/calendar/calendar-sheet.options.d.ts +1 -3
- package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
- package/components/calendar/calendar-spin.component.d.ts +1 -0
- package/components/calendar/calendar-year.component.d.ts +1 -1
- package/components/calendar/calendar.options.d.ts +9 -0
- package/components/calendar/index.d.ts +3 -0
- package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
- package/components/cell/cell.directive.d.ts +9 -0
- package/components/cell/cell.options.d.ts +6 -0
- package/components/cell/index.d.ts +2 -0
- package/components/data-list/data-list.component.d.ts +8 -12
- package/components/data-list/data-list.d.ts +3 -4
- package/components/data-list/data-list.tokens.d.ts +1 -23
- package/components/data-list/index.d.ts +3 -4
- package/components/data-list/opt-group.directive.d.ts +2 -2
- package/components/data-list/option-content.directive.d.ts +14 -0
- package/components/data-list/option-with-value.directive.d.ts +9 -0
- package/components/data-list/option.directive.d.ts +19 -0
- package/components/error/error.component.d.ts +6 -8
- package/components/error/error.d.ts +4 -0
- package/components/error/error.directive.d.ts +19 -0
- package/components/error/error.pipe.d.ts +10 -0
- package/components/error/index.d.ts +3 -0
- package/components/expand/expand.component.d.ts +9 -28
- package/components/expand/index.d.ts +0 -2
- package/components/icon/icon.component.d.ts +6 -11
- package/components/index.d.ts +3 -3
- package/components/input/index.d.ts +2 -0
- package/components/input/input.d.ts +5 -0
- package/components/input/input.directive.d.ts +29 -0
- package/components/label/label.directive.d.ts +1 -1
- package/components/link/index.d.ts +0 -1
- package/components/link/link.directive.d.ts +8 -6
- package/components/loader/loader.component.d.ts +7 -7
- package/components/loader/loader.options.d.ts +1 -3
- package/components/notification/index.d.ts +3 -0
- package/components/notification/notification.component.d.ts +14 -0
- package/components/notification/notification.d.ts +3 -0
- package/components/notification/notification.directive.d.ts +7 -12
- package/components/notification/notification.options.d.ts +10 -7
- package/components/notification/notification.service.d.ts +17 -0
- package/components/root/root.component.d.ts +4 -6
- package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
- package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
- package/components/scrollbar/scrollbar.component.d.ts +1 -5
- package/components/scrollbar/scrollbar.directive.d.ts +2 -2
- package/components/scrollbar/scrollbar.options.d.ts +1 -1
- package/components/spin-button/spin-button.component.d.ts +9 -10
- package/components/textfield/index.d.ts +1 -4
- package/components/textfield/textfield-content.directive.d.ts +3 -2
- package/components/textfield/textfield-icon.d.ts +3 -3
- package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +9 -15
- package/components/textfield/textfield.component.d.ts +23 -36
- package/components/textfield/textfield.d.ts +2 -4
- package/components/textfield/textfield.options.d.ts +8 -11
- package/{directives → components}/title/title.directive.d.ts +2 -3
- package/directives/appearance/appearance.directive.d.ts +5 -13
- package/directives/appearance/appearance.options.d.ts +1 -1
- package/directives/date-format/date-format.directive.d.ts +3 -7
- package/directives/group/group.directive.d.ts +7 -7
- package/directives/group/group.options.d.ts +1 -3
- package/directives/icons/icons.bindings.d.ts +5 -0
- package/directives/icons/icons.directive.d.ts +8 -16
- package/directives/icons/index.d.ts +1 -0
- package/directives/index.d.ts +0 -5
- package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
- package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
- package/directives/number-format/number-format.directive.d.ts +3 -7
- package/fesm2022/taiga-ui-core-classes.mjs +9 -11
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +13 -21
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +143 -42
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-data-list.mjs +112 -283
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +110 -26
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +34 -132
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +22 -40
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-input.mjs +103 -0
- package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-label.mjs +13 -18
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +16 -36
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +17 -36
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +107 -66
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +22 -57
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +71 -85
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +18 -31
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +134 -430
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs +37 -0
- package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +32 -69
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +26 -20
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +25 -40
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +35 -45
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +18 -42
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +32 -20
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +0 -5
- package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -15
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes.mjs +0 -8
- package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
- package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
- package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
- package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +197 -365
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-hint.mjs +609 -0
- package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
- package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-popup.mjs +56 -0
- package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals.mjs +11 -0
- package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-services.mjs +16 -80
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +72 -89
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +65 -19
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/fesm2022/taiga-ui-core.mjs +1 -1
- package/index.d.ts +1 -1
- package/package.json +50 -176
- package/pipes/format-number/format-number.pipe.d.ts +6 -4
- package/pipes/index.d.ts +0 -8
- package/portals/alert/alert.directive.d.ts +11 -0
- package/portals/alert/alert.service.d.ts +12 -0
- package/portals/alert/index.d.ts +2 -0
- package/portals/dialog/dialog.component.d.ts +14 -0
- package/portals/dialog/dialog.directive.d.ts +8 -0
- package/{components → portals}/dialog/dialog.factory.d.ts +1 -1
- package/portals/dialog/dialog.options.d.ts +25 -0
- package/{components/dialog/dialog-close.service.d.ts → portals/dialog/dialog.providers.d.ts} +2 -0
- package/portals/dialog/dialog.service.d.ts +10 -0
- package/portals/dialog/index.d.ts +6 -0
- package/portals/dropdown/dropdown-content.directive.d.ts +9 -0
- package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
- package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
- package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
- package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
- package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -4
- package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
- package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
- package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
- package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
- package/{directives → portals}/dropdown/dropdown.d.ts +2 -3
- package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
- package/{directives → portals}/dropdown/index.d.ts +1 -4
- package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
- package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
- package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-options.directive.d.ts +3 -3
- package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-position.directive.d.ts +6 -7
- package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
- package/portals/hint/hint.component.d.ts +29 -0
- package/portals/hint/hint.directive.d.ts +24 -0
- package/{directives → portals}/hint/index.d.ts +0 -2
- package/portals/index.d.ts +6 -0
- package/portals/modal/index.d.ts +2 -0
- package/portals/modal/modal.component.d.ts +17 -0
- package/portals/modal/modal.service.d.ts +13 -0
- package/portals/popup/popup.directive.d.ts +12 -0
- package/{directives → portals}/popup/popup.service.d.ts +1 -1
- package/{directives → portals}/popup/popups.component.d.ts +2 -2
- package/services/index.d.ts +0 -3
- package/styles/components/appearance.less +11 -0
- package/styles/components/button.less +10 -22
- package/styles/components/icon.less +42 -21
- package/styles/components/icons.less +18 -13
- package/styles/components/label.less +3 -12
- package/styles/components/link.less +10 -27
- package/styles/components/notification.less +21 -22
- package/styles/components/textfield.less +129 -211
- package/styles/components/title.less +8 -8
- package/styles/mixins/appearance.less +10 -26
- package/styles/mixins/appearance.scss +8 -24
- package/styles/mixins/date-picker.less +1 -1
- package/styles/mixins/mixins.less +1 -7
- package/styles/mixins/mixins.scss +1 -7
- package/styles/mixins/picker.less +1 -1
- package/styles/mixins/picker.scss +1 -1
- package/styles/mixins/slider.less +25 -26
- package/styles/mixins/slider.scss +23 -22
- package/styles/taiga-ui-local.less +0 -1
- package/styles/taiga-ui-local.scss +0 -1
- package/styles/taiga-ui-theme.less +0 -1
- package/styles/theme/appearance/outline.less +10 -20
- package/styles/theme/appearance/primary.less +2 -4
- package/styles/theme/appearance/secondary.less +6 -14
- package/styles/theme/appearance/status.less +0 -4
- package/styles/theme/appearance/table.less +36 -35
- package/styles/theme/appearance/textfield.less +30 -28
- package/styles/theme/appearance.less +0 -1
- package/styles/theme/variables.less +16 -19
- package/tokens/breakpoint.d.ts +4 -0
- package/tokens/common-icons.d.ts +3 -3
- package/tokens/date-format.d.ts +2 -3
- package/tokens/i18n.d.ts +7 -7
- package/tokens/icon-resolver.d.ts +1 -5
- package/tokens/icons.d.ts +0 -4
- package/tokens/index.d.ts +2 -4
- package/tokens/number-format.d.ts +2 -3
- package/tokens/validation-errors.d.ts +4 -0
- package/types/index.d.ts +0 -3
- package/types/point.d.ts +1 -1
- package/types/size.d.ts +0 -11
- package/utils/format/index.d.ts +0 -1
- package/utils/miscellaneous/font-scaling.d.ts +2 -1
- package/utils/miscellaneous/get-duration.d.ts +2 -0
- package/utils/miscellaneous/index.d.ts +2 -1
- package/utils/miscellaneous/provide-taiga.d.ts +13 -0
- package/animations/animations.d.ts +0 -109
- package/animations/index.d.ts +0 -1
- package/components/alert/alert.component.d.ts +0 -15
- package/components/alert/alert.directive.d.ts +0 -7
- package/components/alert/alert.interfaces.d.ts +0 -12
- package/components/alert/alert.service.d.ts +0 -7
- package/components/alert/alert.tokens.d.ts +0 -12
- package/components/alert/alerts.component.d.ts +0 -12
- package/components/alert/index.d.ts +0 -6
- package/components/data-list/data-list.directive.d.ts +0 -7
- package/components/data-list/option/option-content.d.ts +0 -16
- package/components/data-list/option/option-legacy.component.d.ts +0 -24
- package/components/data-list/option/option.directive.d.ts +0 -27
- package/components/dialog/dialog.component.d.ts +0 -20
- package/components/dialog/dialog.directive.d.ts +0 -7
- package/components/dialog/dialog.interfaces.d.ts +0 -34
- package/components/dialog/dialog.service.d.ts +0 -7
- package/components/dialog/dialog.tokens.d.ts +0 -15
- package/components/dialog/dialogs.component.d.ts +0 -8
- package/components/dialog/index.d.ts +0 -8
- package/components/expand/expand-content.directive.d.ts +0 -8
- package/components/expand/expand.d.ts +0 -6
- package/components/fullscreen/fullscreen.component.d.ts +0 -14
- package/components/fullscreen/index.d.ts +0 -1
- package/components/link/link.options.d.ts +0 -12
- package/components/textfield/select.directive.d.ts +0 -19
- package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
- package/components/textfield/textfield.directive.d.ts +0 -38
- package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
- package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
- package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
- package/directives/dropdown/dropdown.service.d.ts +0 -6
- package/directives/dropdown/dropdowns.component.d.ts +0 -9
- package/directives/hint/hint.component.d.ts +0 -30
- package/directives/hint/hint.directive.d.ts +0 -26
- package/directives/hint/hint.service.d.ts +0 -13
- package/directives/hint/hints.component.d.ts +0 -12
- package/directives/popup/popup.directive.d.ts +0 -11
- package/directives/surface/index.d.ts +0 -1
- package/directives/surface/surface.directive.d.ts +0 -8
- package/esm2022/animations/animations.mjs +0 -363
- package/esm2022/animations/index.mjs +0 -2
- package/esm2022/animations/taiga-ui-core-animations.mjs +0 -5
- package/esm2022/classes/accessors.mjs +0 -31
- package/esm2022/classes/driver.mjs +0 -36
- package/esm2022/classes/index.mjs +0 -4
- package/esm2022/classes/taiga-ui-core-classes.mjs +0 -5
- package/esm2022/classes/vehicle.mjs +0 -7
- package/esm2022/components/alert/alert.component.mjs +0 -43
- package/esm2022/components/alert/alert.directive.mjs +0 -21
- package/esm2022/components/alert/alert.interfaces.mjs +0 -2
- package/esm2022/components/alert/alert.service.mjs +0 -18
- package/esm2022/components/alert/alert.tokens.mjs +0 -51
- package/esm2022/components/alert/alerts.component.mjs +0 -33
- package/esm2022/components/alert/index.mjs +0 -6
- package/esm2022/components/alert/taiga-ui-core-components-alert.mjs +0 -5
- package/esm2022/components/button/button.directive.mjs +0 -43
- package/esm2022/components/button/button.options.mjs +0 -7
- package/esm2022/components/button/index.mjs +0 -3
- package/esm2022/components/button/taiga-ui-core-components-button.mjs +0 -5
- package/esm2022/components/calendar/calendar-sheet.component.mjs +0 -168
- package/esm2022/components/calendar/calendar-sheet.options.mjs +0 -12
- package/esm2022/components/calendar/calendar-spin.component.mjs +0 -53
- package/esm2022/components/calendar/calendar-year.component.mjs +0 -128
- package/esm2022/components/calendar/calendar.component.mjs +0 -147
- package/esm2022/components/calendar/index.mjs +0 -6
- package/esm2022/components/calendar/taiga-ui-core-components-calendar.mjs +0 -5
- package/esm2022/components/data-list/data-list.component.mjs +0 -139
- package/esm2022/components/data-list/data-list.directive.mjs +0 -19
- package/esm2022/components/data-list/data-list.mjs +0 -14
- package/esm2022/components/data-list/data-list.tokens.mjs +0 -18
- package/esm2022/components/data-list/index.mjs +0 -9
- package/esm2022/components/data-list/opt-group.directive.mjs +0 -21
- package/esm2022/components/data-list/option/option-content.mjs +0 -36
- package/esm2022/components/data-list/option/option-legacy.component.mjs +0 -90
- package/esm2022/components/data-list/option/option.directive.mjs +0 -109
- package/esm2022/components/data-list/taiga-ui-core-components-data-list.mjs +0 -5
- package/esm2022/components/dialog/dialog-close.service.mjs +0 -41
- package/esm2022/components/dialog/dialog.component.mjs +0 -63
- package/esm2022/components/dialog/dialog.directive.mjs +0 -21
- package/esm2022/components/dialog/dialog.factory.mjs +0 -15
- package/esm2022/components/dialog/dialog.interfaces.mjs +0 -2
- package/esm2022/components/dialog/dialog.service.mjs +0 -18
- package/esm2022/components/dialog/dialog.tokens.mjs +0 -33
- package/esm2022/components/dialog/dialogs.component.mjs +0 -29
- package/esm2022/components/dialog/index.mjs +0 -8
- package/esm2022/components/dialog/taiga-ui-core-components-dialog.mjs +0 -5
- package/esm2022/components/error/error.component.mjs +0 -34
- package/esm2022/components/error/index.mjs +0 -2
- package/esm2022/components/error/taiga-ui-core-components-error.mjs +0 -5
- package/esm2022/components/expand/expand-content.directive.mjs +0 -18
- package/esm2022/components/expand/expand.component.mjs +0 -124
- package/esm2022/components/expand/expand.mjs +0 -7
- package/esm2022/components/expand/index.mjs +0 -4
- package/esm2022/components/expand/taiga-ui-core-components-expand.mjs +0 -5
- package/esm2022/components/fullscreen/fullscreen.component.mjs +0 -67
- package/esm2022/components/fullscreen/index.mjs +0 -2
- package/esm2022/components/fullscreen/taiga-ui-core-components-fullscreen.mjs +0 -5
- package/esm2022/components/icon/icon.component.mjs +0 -44
- package/esm2022/components/icon/icon.pipe.mjs +0 -19
- package/esm2022/components/icon/index.mjs +0 -3
- package/esm2022/components/icon/taiga-ui-core-components-icon.mjs +0 -5
- package/esm2022/components/index.mjs +0 -18
- package/esm2022/components/label/index.mjs +0 -2
- package/esm2022/components/label/label.directive.mjs +0 -41
- package/esm2022/components/label/taiga-ui-core-components-label.mjs +0 -5
- package/esm2022/components/link/index.mjs +0 -3
- package/esm2022/components/link/link.directive.mjs +0 -47
- package/esm2022/components/link/link.options.mjs +0 -13
- package/esm2022/components/link/taiga-ui-core-components-link.mjs +0 -5
- package/esm2022/components/loader/index.mjs +0 -3
- package/esm2022/components/loader/loader.component.mjs +0 -46
- package/esm2022/components/loader/loader.options.mjs +0 -18
- package/esm2022/components/loader/taiga-ui-core-components-loader.mjs +0 -5
- package/esm2022/components/notification/index.mjs +0 -3
- package/esm2022/components/notification/notification.directive.mjs +0 -81
- package/esm2022/components/notification/notification.options.mjs +0 -23
- package/esm2022/components/notification/taiga-ui-core-components-notification.mjs +0 -5
- package/esm2022/components/root/index.mjs +0 -2
- package/esm2022/components/root/root.component.mjs +0 -85
- package/esm2022/components/root/taiga-ui-core-components-root.mjs +0 -5
- package/esm2022/components/scrollbar/index.mjs +0 -9
- package/esm2022/components/scrollbar/scroll-controls.component.mjs +0 -32
- package/esm2022/components/scrollbar/scroll-into-view.directive.mjs +0 -43
- package/esm2022/components/scrollbar/scroll-ref.directive.mjs +0 -19
- package/esm2022/components/scrollbar/scrollable.directive.mjs +0 -26
- package/esm2022/components/scrollbar/scrollbar.component.mjs +0 -72
- package/esm2022/components/scrollbar/scrollbar.directive.mjs +0 -93
- package/esm2022/components/scrollbar/scrollbar.options.mjs +0 -6
- package/esm2022/components/scrollbar/scrollbar.service.mjs +0 -46
- package/esm2022/components/scrollbar/taiga-ui-core-components-scrollbar.mjs +0 -5
- package/esm2022/components/spin-button/index.mjs +0 -2
- package/esm2022/components/spin-button/spin-button.component.mjs +0 -51
- package/esm2022/components/spin-button/taiga-ui-core-components-spin-button.mjs +0 -5
- package/esm2022/components/taiga-ui-core-components.mjs +0 -5
- package/esm2022/components/textfield/index.mjs +0 -16
- package/esm2022/components/textfield/select-like.directive.mjs +0 -42
- package/esm2022/components/textfield/select.directive.mjs +0 -64
- package/esm2022/components/textfield/taiga-ui-core-components-textfield.mjs +0 -5
- package/esm2022/components/textfield/textfield-accessor.mjs +0 -7
- package/esm2022/components/textfield/textfield-auxiliary.mjs +0 -7
- package/esm2022/components/textfield/textfield-content.directive.mjs +0 -22
- package/esm2022/components/textfield/textfield-dropdown.directive.mjs +0 -43
- package/esm2022/components/textfield/textfield-icon.mjs +0 -10
- package/esm2022/components/textfield/textfield-multi/textfield-item.component.mjs +0 -34
- package/esm2022/components/textfield/textfield-multi/textfield-multi.component.mjs +0 -137
- package/esm2022/components/textfield/textfield.component.mjs +0 -180
- package/esm2022/components/textfield/textfield.directive.mjs +0 -134
- package/esm2022/components/textfield/textfield.mjs +0 -19
- package/esm2022/components/textfield/textfield.options.mjs +0 -63
- package/esm2022/components/textfield/with-native-picker.directive.mjs +0 -24
- package/esm2022/directives/appearance/appearance.bindings.mjs +0 -15
- package/esm2022/directives/appearance/appearance.directive.mjs +0 -79
- package/esm2022/directives/appearance/appearance.options.mjs +0 -12
- package/esm2022/directives/appearance/index.mjs +0 -5
- package/esm2022/directives/appearance/taiga-ui-core-directives-appearance.mjs +0 -5
- package/esm2022/directives/appearance/with-appearance.mjs +0 -27
- package/esm2022/directives/date-format/date-format.directive.mjs +0 -31
- package/esm2022/directives/date-format/index.mjs +0 -2
- package/esm2022/directives/date-format/taiga-ui-core-directives-date-format.mjs +0 -5
- package/esm2022/directives/dropdown/dropdown-context.directive.mjs +0 -76
- package/esm2022/directives/dropdown/dropdown-hover.directive.mjs +0 -70
- package/esm2022/directives/dropdown/dropdown-hover.options.mjs +0 -17
- package/esm2022/directives/dropdown/dropdown-limit-width.mjs +0 -37
- package/esm2022/directives/dropdown/dropdown-manual.directive.mjs +0 -27
- package/esm2022/directives/dropdown/dropdown-open-legacy.directive.mjs +0 -33
- package/esm2022/directives/dropdown/dropdown-open.directive.mjs +0 -169
- package/esm2022/directives/dropdown/dropdown-options.directive.mjs +0 -73
- package/esm2022/directives/dropdown/dropdown-portal.directive.mjs +0 -34
- package/esm2022/directives/dropdown/dropdown-position-sided.directive.mjs +0 -69
- package/esm2022/directives/dropdown/dropdown-position.directive.mjs +0 -88
- package/esm2022/directives/dropdown/dropdown-selection.directive.mjs +0 -159
- package/esm2022/directives/dropdown/dropdown.bindings.mjs +0 -19
- package/esm2022/directives/dropdown/dropdown.component.mjs +0 -92
- package/esm2022/directives/dropdown/dropdown.directive.mjs +0 -110
- package/esm2022/directives/dropdown/dropdown.driver.mjs +0 -32
- package/esm2022/directives/dropdown/dropdown.mjs +0 -29
- package/esm2022/directives/dropdown/dropdown.providers.mjs +0 -10
- package/esm2022/directives/dropdown/dropdown.service.mjs +0 -15
- package/esm2022/directives/dropdown/dropdowns.component.mjs +0 -24
- package/esm2022/directives/dropdown/index.mjs +0 -22
- package/esm2022/directives/dropdown/taiga-ui-core-directives-dropdown.mjs +0 -5
- package/esm2022/directives/dropdown/with-dropdown-open.directive.mjs +0 -23
- package/esm2022/directives/group/group.directive.mjs +0 -53
- package/esm2022/directives/group/group.options.mjs +0 -15
- package/esm2022/directives/group/index.mjs +0 -3
- package/esm2022/directives/group/taiga-ui-core-directives-group.mjs +0 -5
- package/esm2022/directives/hint/hint-describe.directive.mjs +0 -50
- package/esm2022/directives/hint/hint-driver.directive.mjs +0 -19
- package/esm2022/directives/hint/hint-host.directive.mjs +0 -27
- package/esm2022/directives/hint/hint-hover.directive.mjs +0 -59
- package/esm2022/directives/hint/hint-manual.directive.mjs +0 -33
- package/esm2022/directives/hint/hint-options.directive.mjs +0 -86
- package/esm2022/directives/hint/hint-overflow.directive.mjs +0 -38
- package/esm2022/directives/hint/hint-pointer.directive.mjs +0 -33
- package/esm2022/directives/hint/hint-position.directive.mjs +0 -112
- package/esm2022/directives/hint/hint-unstyled.component.mjs +0 -39
- package/esm2022/directives/hint/hint.component.mjs +0 -127
- package/esm2022/directives/hint/hint.directive.mjs +0 -99
- package/esm2022/directives/hint/hint.mjs +0 -27
- package/esm2022/directives/hint/hint.providers.mjs +0 -9
- package/esm2022/directives/hint/hint.service.mjs +0 -29
- package/esm2022/directives/hint/hints.component.mjs +0 -34
- package/esm2022/directives/hint/index.mjs +0 -17
- package/esm2022/directives/hint/taiga-ui-core-directives-hint.mjs +0 -5
- package/esm2022/directives/icons/icons.directive.mjs +0 -66
- package/esm2022/directives/icons/index.mjs +0 -3
- package/esm2022/directives/icons/taiga-ui-core-directives-icons.mjs +0 -5
- package/esm2022/directives/icons/with-icons.mjs +0 -22
- package/esm2022/directives/index.mjs +0 -12
- package/esm2022/directives/items-handlers/index.mjs +0 -4
- package/esm2022/directives/items-handlers/items-handlers.directive.mjs +0 -63
- package/esm2022/directives/items-handlers/items-handlers.tokens.mjs +0 -27
- package/esm2022/directives/items-handlers/items-handlers.validator.mjs +0 -32
- package/esm2022/directives/items-handlers/taiga-ui-core-directives-items-handlers.mjs +0 -5
- package/esm2022/directives/number-format/index.mjs +0 -2
- package/esm2022/directives/number-format/number-format.directive.mjs +0 -31
- package/esm2022/directives/number-format/taiga-ui-core-directives-number-format.mjs +0 -5
- package/esm2022/directives/popup/index.mjs +0 -4
- package/esm2022/directives/popup/popup.directive.mjs +0 -31
- package/esm2022/directives/popup/popup.service.mjs +0 -15
- package/esm2022/directives/popup/popups.component.mjs +0 -20
- package/esm2022/directives/popup/taiga-ui-core-directives-popup.mjs +0 -5
- package/esm2022/directives/surface/index.mjs +0 -2
- package/esm2022/directives/surface/surface.directive.mjs +0 -44
- package/esm2022/directives/surface/taiga-ui-core-directives-surface.mjs +0 -5
- package/esm2022/directives/taiga-ui-core-directives.mjs +0 -5
- package/esm2022/directives/title/index.mjs +0 -2
- package/esm2022/directives/title/taiga-ui-core-directives-title.mjs +0 -5
- package/esm2022/directives/title/title.directive.mjs +0 -37
- package/esm2022/index.mjs +0 -9
- package/esm2022/pipes/auto-color/auto-color.pipe.mjs +0 -19
- package/esm2022/pipes/auto-color/index.mjs +0 -2
- package/esm2022/pipes/auto-color/taiga-ui-core-pipes-auto-color.mjs +0 -5
- package/esm2022/pipes/calendar-sheet/calendar-sheet.pipe.mjs +0 -54
- package/esm2022/pipes/calendar-sheet/index.mjs +0 -2
- package/esm2022/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.mjs +0 -5
- package/esm2022/pipes/calendar-sheet/utils.mjs +0 -36
- package/esm2022/pipes/fallback-src/fallback-src.pipe.mjs +0 -23
- package/esm2022/pipes/fallback-src/index.mjs +0 -2
- package/esm2022/pipes/fallback-src/taiga-ui-core-pipes-fallback-src.mjs +0 -5
- package/esm2022/pipes/flag/flag.pipe.mjs +0 -26
- package/esm2022/pipes/flag/index.mjs +0 -2
- package/esm2022/pipes/flag/taiga-ui-core-pipes-flag.mjs +0 -5
- package/esm2022/pipes/format-date/format-date.pipe.mjs +0 -22
- package/esm2022/pipes/format-date/index.mjs +0 -2
- package/esm2022/pipes/format-date/taiga-ui-core-pipes-format-date.mjs +0 -5
- package/esm2022/pipes/format-number/format-number.pipe.mjs +0 -36
- package/esm2022/pipes/format-number/index.mjs +0 -2
- package/esm2022/pipes/format-number/taiga-ui-core-pipes-format-number.mjs +0 -5
- package/esm2022/pipes/index.mjs +0 -10
- package/esm2022/pipes/initials/index.mjs +0 -2
- package/esm2022/pipes/initials/initials.pipe.mjs +0 -23
- package/esm2022/pipes/initials/taiga-ui-core-pipes-initials.mjs +0 -5
- package/esm2022/pipes/month/index.mjs +0 -2
- package/esm2022/pipes/month/month.pipe.mjs +0 -23
- package/esm2022/pipes/month/taiga-ui-core-pipes-month.mjs +0 -5
- package/esm2022/pipes/order-week-days/index.mjs +0 -2
- package/esm2022/pipes/order-week-days/order-week-days.pipe.mjs +0 -30
- package/esm2022/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.mjs +0 -5
- package/esm2022/pipes/taiga-ui-core-pipes.mjs +0 -5
- package/esm2022/services/breakpoint.service.mjs +0 -31
- package/esm2022/services/dark-theme.service.mjs +0 -24
- package/esm2022/services/format-date.service.mjs +0 -24
- package/esm2022/services/index.mjs +0 -6
- package/esm2022/services/position.service.mjs +0 -26
- package/esm2022/services/taiga-ui-core-services.mjs +0 -5
- package/esm2022/services/visual-viewport.service.mjs +0 -29
- package/esm2022/taiga-ui-core.mjs +0 -5
- package/esm2022/tokens/animations-speed.mjs +0 -9
- package/esm2022/tokens/assets-path.mjs +0 -11
- package/esm2022/tokens/auxiliary.mjs +0 -9
- package/esm2022/tokens/common-icons.mjs +0 -18
- package/esm2022/tokens/dark-mode.mjs +0 -41
- package/esm2022/tokens/date-format.mjs +0 -20
- package/esm2022/tokens/day-type-handler.mjs +0 -8
- package/esm2022/tokens/first-day-of-week.mjs +0 -9
- package/esm2022/tokens/i18n.mjs +0 -45
- package/esm2022/tokens/icon-resolver.mjs +0 -44
- package/esm2022/tokens/icon.mjs +0 -8
- package/esm2022/tokens/icons.mjs +0 -21
- package/esm2022/tokens/index.mjs +0 -21
- package/esm2022/tokens/media.mjs +0 -12
- package/esm2022/tokens/number-format.mjs +0 -24
- package/esm2022/tokens/reduced-motion.mjs +0 -7
- package/esm2022/tokens/scroll-ref.mjs +0 -6
- package/esm2022/tokens/selection-stream.mjs +0 -14
- package/esm2022/tokens/spin-icons.mjs +0 -8
- package/esm2022/tokens/taiga-ui-core-tokens.mjs +0 -5
- package/esm2022/tokens/theme.mjs +0 -5
- package/esm2022/tokens/viewport.mjs +0 -35
- package/esm2022/types/direction.mjs +0 -2
- package/esm2022/types/index.mjs +0 -2
- package/esm2022/types/interactive-state.mjs +0 -2
- package/esm2022/types/orientation.mjs +0 -2
- package/esm2022/types/point.mjs +0 -2
- package/esm2022/types/portal-item.mjs +0 -2
- package/esm2022/types/range-state.mjs +0 -2
- package/esm2022/types/size.mjs +0 -13
- package/esm2022/types/taiga-ui-core-types.mjs +0 -5
- package/esm2022/types/value-content-context.mjs +0 -2
- package/esm2022/utils/dom/check-fixed-position.mjs +0 -9
- package/esm2022/utils/dom/get-viewport.mjs +0 -24
- package/esm2022/utils/dom/get-word-range.mjs +0 -51
- package/esm2022/utils/dom/index.mjs +0 -4
- package/esm2022/utils/dom/taiga-ui-core-utils-dom.mjs +0 -5
- package/esm2022/utils/format/format-number.mjs +0 -47
- package/esm2022/utils/format/get-fractional-part-padded.mjs +0 -16
- package/esm2022/utils/format/index.mjs +0 -5
- package/esm2022/utils/format/number-to-string-without-exp.mjs +0 -18
- package/esm2022/utils/format/string-hash-to-hsl.mjs +0 -21
- package/esm2022/utils/format/taiga-ui-core-utils-format.mjs +0 -5
- package/esm2022/utils/index.mjs +0 -4
- package/esm2022/utils/miscellaneous/font-scaling.mjs +0 -11
- package/esm2022/utils/miscellaneous/index.mjs +0 -7
- package/esm2022/utils/miscellaneous/is-editing-key.mjs +0 -18
- package/esm2022/utils/miscellaneous/is-obscured.mjs +0 -8
- package/esm2022/utils/miscellaneous/override-options.mjs +0 -11
- package/esm2022/utils/miscellaneous/size-bigger.mjs +0 -19
- package/esm2022/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.mjs +0 -5
- package/esm2022/utils/miscellaneous/to-animation-options.mjs +0 -16
- package/esm2022/utils/taiga-ui-core-utils.mjs +0 -5
- package/fesm2022/taiga-ui-core-animations.mjs +0 -370
- package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -196
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -73
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +0 -710
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +0 -63
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
- package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs +0 -43
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
- package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
- package/pipes/auto-color/index.d.ts +0 -1
- package/pipes/calendar-sheet/index.d.ts +0 -1
- package/pipes/calendar-sheet/utils.d.ts +0 -20
- package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
- package/pipes/fallback-src/index.d.ts +0 -1
- package/pipes/flag/flag.pipe.d.ts +0 -14
- package/pipes/flag/index.d.ts +0 -1
- package/pipes/format-date/format-date.pipe.d.ts +0 -9
- package/pipes/format-date/index.d.ts +0 -1
- package/pipes/initials/index.d.ts +0 -1
- package/pipes/initials/initials.pipe.d.ts +0 -7
- package/pipes/month/index.d.ts +0 -1
- package/pipes/month/month.pipe.d.ts +0 -10
- package/pipes/order-week-days/index.d.ts +0 -1
- package/services/breakpoint.service.d.ts +0 -16
- package/services/dark-theme.service.d.ts +0 -10
- package/services/format-date.service.d.ts +0 -8
- package/styles/mixins/wrapper.less +0 -64
- package/styles/mixins/wrapper.scss +0 -61
- package/styles/theme/appearance/opposite.less +0 -17
- package/styles/theme/wrapper.less +0 -211
- package/tokens/day-type-handler.d.ts +0 -7
- package/tokens/first-day-of-week.d.ts +0 -5
- package/tokens/scroll-ref.d.ts +0 -2
- package/tokens/spin-icons.d.ts +0 -6
- package/types/portal-item.d.ts +0 -9
- package/types/range-state.d.ts +0 -4
- package/types/value-content-context.d.ts +0 -4
- package/utils/format/string-hash-to-hsl.d.ts +0 -6
- package/utils/miscellaneous/to-animation-options.d.ts +0 -4
- /package/{directives → components}/title/index.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
- /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint.d.ts +0 -0
- /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
- /package/{directives → portals}/popup/index.d.ts +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { InjectionToken, inject, signal,
|
|
1
|
+
import { InjectionToken, inject, signal, untracked, effect, computed } from '@angular/core';
|
|
2
2
|
import { DOCUMENT } from '@angular/common';
|
|
3
|
-
import { tuiProvide,
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
+
import { tuiProvide, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
4
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { tuiZoneOptimized, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
6
|
+
import { TUI_WINDOW_SIZE } from '@taiga-ui/cdk/tokens';
|
|
7
|
+
import { map, distinctUntilChanged, fromEvent, filter, merge, switchMap, takeUntil, share } from 'rxjs';
|
|
5
8
|
import { WA_LOCAL_STORAGE, WA_WINDOW } from '@ng-web-apis/common';
|
|
6
|
-
import { fromEvent, filter, of, map, merge, switchMap, takeUntil, share } from 'rxjs';
|
|
7
|
-
import { TuiDayOfWeek } from '@taiga-ui/cdk/date-time';
|
|
8
9
|
import { tuiExtractI18n } from '@taiga-ui/i18n/utils';
|
|
9
10
|
import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
10
|
-
import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
11
11
|
|
|
12
12
|
const TUI_REDUCED_MOTION = new InjectionToken(ngDevMode ? 'TUI_REDUCED_MOTION' : '', {
|
|
13
13
|
factory: () => inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')
|
|
@@ -38,6 +38,30 @@ function tuiAsAuxiliary(x) {
|
|
|
38
38
|
return tuiProvide(TUI_AUXILIARY, x);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Token for media constant
|
|
43
|
+
*/
|
|
44
|
+
const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
|
|
45
|
+
factory: () => ({
|
|
46
|
+
mobile: 768,
|
|
47
|
+
desktopSmall: 1280,
|
|
48
|
+
desktopLarge: Infinity,
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const TUI_BREAKPOINT = new InjectionToken(ngDevMode ? 'TUI_BREAKPOINT' : '', {
|
|
53
|
+
factory: () => {
|
|
54
|
+
const media = inject(TUI_MEDIA);
|
|
55
|
+
const sorted = Object.values(media).sort((a, b) => a - b);
|
|
56
|
+
const invert = Object.keys(media).reduce((ret, key) => ({
|
|
57
|
+
...ret,
|
|
58
|
+
[media[key]]: key,
|
|
59
|
+
}), {});
|
|
60
|
+
const stream$ = inject(TUI_WINDOW_SIZE).pipe(map(({ width }) => sorted.find((size) => size > width)), map((key) => invert[key || sorted[sorted.length - 1] || 0] ?? 'desktopLarge'), distinctUntilChanged(), tuiZoneOptimized());
|
|
61
|
+
return toSignal(stream$, { initialValue: 'desktopLarge' });
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
41
65
|
// TODO: Rename `ellipsis` to `more` in the next major version
|
|
42
66
|
const COMMON_ICONS = {
|
|
43
67
|
check: '@tui.check',
|
|
@@ -46,13 +70,10 @@ const COMMON_ICONS = {
|
|
|
46
70
|
more: '@tui.chevron-right',
|
|
47
71
|
search: '@tui.search',
|
|
48
72
|
ellipsis: '@tui.ellipsis',
|
|
73
|
+
decrement: '@tui.chevron-left',
|
|
74
|
+
increment: '@tui.chevron-right',
|
|
49
75
|
};
|
|
50
|
-
const TUI_COMMON_ICONS =
|
|
51
|
-
factory: () => COMMON_ICONS,
|
|
52
|
-
});
|
|
53
|
-
function tuiCommonIconsProvider(icons) {
|
|
54
|
-
return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);
|
|
55
|
-
}
|
|
76
|
+
const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);
|
|
56
77
|
|
|
57
78
|
const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';
|
|
58
79
|
const TUI_DARK_MODE_KEY = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE_KEY' : '', {
|
|
@@ -72,14 +93,16 @@ const TUI_DARK_MODE = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE' : '', {
|
|
|
72
93
|
automatic = true;
|
|
73
94
|
result.set(media.matches);
|
|
74
95
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
automatic
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
untracked(() => {
|
|
97
|
+
effect(() => {
|
|
98
|
+
const value = String(result());
|
|
99
|
+
if (automatic) {
|
|
100
|
+
automatic = false;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
storage?.setItem(key, value);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
83
106
|
});
|
|
84
107
|
return Object.assign(result, {
|
|
85
108
|
reset: () => {
|
|
@@ -92,37 +115,28 @@ const TUI_DARK_MODE = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE' : '', {
|
|
|
92
115
|
});
|
|
93
116
|
|
|
94
117
|
const TUI_DEFAULT_DATE_FORMAT = {
|
|
95
|
-
mode: '
|
|
118
|
+
mode: 'dd/mm/yyyy',
|
|
96
119
|
separator: '.',
|
|
97
120
|
};
|
|
98
121
|
/**
|
|
99
122
|
* Formatting configuration for displayed dates
|
|
100
123
|
*/
|
|
101
124
|
const TUI_DATE_FORMAT = new InjectionToken(ngDevMode ? 'TUI_DATE_FORMAT' : '', {
|
|
102
|
-
factory: () =>
|
|
125
|
+
factory: () => signal(TUI_DEFAULT_DATE_FORMAT),
|
|
103
126
|
});
|
|
104
127
|
function tuiDateFormatProvider(options) {
|
|
105
128
|
return {
|
|
106
129
|
provide: TUI_DATE_FORMAT,
|
|
107
|
-
|
|
108
|
-
|
|
130
|
+
useFactory: () => {
|
|
131
|
+
const parent = inject(TUI_DATE_FORMAT, { optional: true, skipSelf: true });
|
|
132
|
+
return computed(() => ({
|
|
133
|
+
...(parent?.() || TUI_DEFAULT_DATE_FORMAT),
|
|
134
|
+
...options,
|
|
135
|
+
}));
|
|
136
|
+
},
|
|
109
137
|
};
|
|
110
138
|
}
|
|
111
139
|
|
|
112
|
-
/**
|
|
113
|
-
* Token for adding data-type attribute to calendar cell
|
|
114
|
-
*/
|
|
115
|
-
const TUI_DAY_TYPE_HANDLER = new InjectionToken(ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '', {
|
|
116
|
-
factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* The first day of the week index
|
|
121
|
-
*/
|
|
122
|
-
const TUI_FIRST_DAY_OF_WEEK = new InjectionToken(ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '', {
|
|
123
|
-
factory: () => TuiDayOfWeek.Monday,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
140
|
/**
|
|
127
141
|
* Localized months names
|
|
128
142
|
*/
|
|
@@ -176,10 +190,6 @@ const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {
|
|
|
176
190
|
const TUI_ICON_REGISTRY = new InjectionToken(ngDevMode ? 'TUI_ICON_REGISTRY' : '', {
|
|
177
191
|
factory: () => ({}),
|
|
178
192
|
});
|
|
179
|
-
/**
|
|
180
|
-
* @deprecated: use {@link TUI_ICON_REGISTRY}
|
|
181
|
-
*/
|
|
182
|
-
const TUI_ICON_STARTS = TUI_ICON_REGISTRY;
|
|
183
193
|
function tuiIconsProvider(icons) {
|
|
184
194
|
return {
|
|
185
195
|
provide: TUI_ICON_REGISTRY,
|
|
@@ -187,35 +197,21 @@ function tuiIconsProvider(icons) {
|
|
|
187
197
|
...(inject(TUI_ICON_REGISTRY, { skipSelf: true, optional: true }) || {}),
|
|
188
198
|
...Object.fromEntries(Object.entries(icons).map(([key, value]) => [
|
|
189
199
|
key,
|
|
190
|
-
`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}`,
|
|
200
|
+
`"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}"`,
|
|
191
201
|
])),
|
|
192
202
|
}),
|
|
193
203
|
};
|
|
194
204
|
}
|
|
195
205
|
|
|
196
|
-
const ICON_MODE_PREFIXES = { font: '@font.', image: '@img.' };
|
|
197
206
|
const TUI_ICON_RESOLVER = new InjectionToken(ngDevMode ? 'TUI_ICON_RESOLVER' : '', {
|
|
198
207
|
factory: () => {
|
|
199
208
|
const path = inject(TUI_ASSETS_PATH);
|
|
200
209
|
// regex for @{any text}. used as a default fallback, returns path to svg from icon pack
|
|
201
|
-
return (icon) => `${path}/${icon
|
|
202
|
-
.replace(/@[a-zA-Z]+\./, '')
|
|
203
|
-
.split('.')
|
|
204
|
-
.join('/')}.svg`;
|
|
210
|
+
return (icon) => `${path}/${icon.replace(/@[a-zA-Z]+\./, '').replaceAll('.', '/')}.svg`;
|
|
205
211
|
},
|
|
206
212
|
});
|
|
207
|
-
/**
|
|
208
|
-
* @deprecated use {@link TUI_ICON_RESOLVER}
|
|
209
|
-
*/
|
|
210
|
-
const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;
|
|
211
213
|
function tuiGetIconMode(icon) {
|
|
212
|
-
|
|
213
|
-
return null;
|
|
214
|
-
}
|
|
215
|
-
if (icon.startsWith(ICON_MODE_PREFIXES.image)) {
|
|
216
|
-
return 'image';
|
|
217
|
-
}
|
|
218
|
-
return icon.startsWith(ICON_MODE_PREFIXES.font) ? 'font' : 'svg';
|
|
214
|
+
return icon?.match(/@([^.]*)\./)?.[1] || icon || undefined;
|
|
219
215
|
}
|
|
220
216
|
function tuiInjectIconResolver() {
|
|
221
217
|
const icons = inject(TUI_ICON_REGISTRY);
|
|
@@ -224,27 +220,15 @@ function tuiInjectIconResolver() {
|
|
|
224
220
|
if (!icon || icon.includes('/')) {
|
|
225
221
|
return icon;
|
|
226
222
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return icons[icon] ?? resolver(icon);
|
|
223
|
+
return icon.startsWith('@font.')
|
|
224
|
+
? icon.replace('@font.', '')
|
|
225
|
+
: (icons[icon] ?? resolver(icon));
|
|
231
226
|
};
|
|
232
227
|
}
|
|
233
228
|
function tuiIconResolverProvider(useValue) {
|
|
234
229
|
return { provide: TUI_ICON_RESOLVER, useValue };
|
|
235
230
|
}
|
|
236
231
|
|
|
237
|
-
/**
|
|
238
|
-
* Token for media constant
|
|
239
|
-
*/
|
|
240
|
-
const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
|
|
241
|
-
factory: () => ({
|
|
242
|
-
mobile: 768,
|
|
243
|
-
desktopSmall: 1024,
|
|
244
|
-
desktopLarge: 1280,
|
|
245
|
-
}),
|
|
246
|
-
});
|
|
247
|
-
|
|
248
232
|
const TUI_DEFAULT_NUMBER_FORMAT = {
|
|
249
233
|
precision: NaN,
|
|
250
234
|
decimalSeparator: '.',
|
|
@@ -256,20 +240,21 @@ const TUI_DEFAULT_NUMBER_FORMAT = {
|
|
|
256
240
|
* Formatting configuration for displayed numbers
|
|
257
241
|
*/
|
|
258
242
|
const TUI_NUMBER_FORMAT = new InjectionToken(ngDevMode ? 'TUI_NUMBER_FORMAT' : '', {
|
|
259
|
-
factory: () =>
|
|
243
|
+
factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT),
|
|
260
244
|
});
|
|
261
245
|
function tuiNumberFormatProvider(options) {
|
|
262
246
|
return {
|
|
263
247
|
provide: TUI_NUMBER_FORMAT,
|
|
264
|
-
|
|
265
|
-
|
|
248
|
+
useFactory: () => {
|
|
249
|
+
const parent = inject(TUI_NUMBER_FORMAT, { optional: true, skipSelf: true });
|
|
250
|
+
return computed(() => ({
|
|
251
|
+
...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),
|
|
252
|
+
...options,
|
|
253
|
+
}));
|
|
254
|
+
},
|
|
266
255
|
};
|
|
267
256
|
}
|
|
268
257
|
|
|
269
|
-
const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {
|
|
270
|
-
factory: () => new ElementRef(inject(DOCUMENT).documentElement),
|
|
271
|
-
});
|
|
272
|
-
|
|
273
258
|
/**
|
|
274
259
|
* A stream of possible selection changes
|
|
275
260
|
*/
|
|
@@ -280,17 +265,15 @@ const TUI_SELECTION_STREAM = new InjectionToken(ngDevMode ? 'TUI_SELECTION_STREA
|
|
|
280
265
|
},
|
|
281
266
|
});
|
|
282
267
|
|
|
283
|
-
const TUI_SPIN_ICONS = new InjectionToken(ngDevMode ? 'TUI_SPIN_ICONS' : '', {
|
|
284
|
-
factory: () => ({
|
|
285
|
-
decrement: '@tui.chevron-left',
|
|
286
|
-
increment: '@tui.chevron-right',
|
|
287
|
-
}),
|
|
288
|
-
});
|
|
289
|
-
|
|
290
268
|
const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {
|
|
291
269
|
factory: () => 'Taiga UI',
|
|
292
270
|
});
|
|
293
271
|
|
|
272
|
+
const TUI_VALIDATION_ERRORS = new InjectionToken(ngDevMode ? 'TUI_VALIDATION_ERRORS' : '', {
|
|
273
|
+
factory: () => ({}),
|
|
274
|
+
});
|
|
275
|
+
const tuiValidationErrorsProvider = (useValue) => ({ provide: TUI_VALIDATION_ERRORS, useValue });
|
|
276
|
+
|
|
294
277
|
/**
|
|
295
278
|
* Viewport accessor
|
|
296
279
|
*/
|
|
@@ -327,5 +310,5 @@ function tuiAsViewport(accessor) {
|
|
|
327
310
|
* Generated bundle index. Do not edit.
|
|
328
311
|
*/
|
|
329
312
|
|
|
330
|
-
export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT,
|
|
313
|
+
export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_BREAKPOINT, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT, TUI_DEFAULT_DATE_FORMAT, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_NUMBER_FORMAT, TUI_ICON_END, TUI_ICON_REGISTRY, TUI_ICON_RESOLVER, TUI_ICON_START, TUI_MEDIA, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NUMBER_FORMAT, TUI_REDUCED_MOTION, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_TEXTS, TUI_THEME, TUI_VALIDATION_ERRORS, TUI_VIEWPORT, tuiAsAuxiliary, tuiAsViewport, tuiAssetsPathProvider, tuiCommonIconsProvider, tuiDateFormatProvider, tuiGetIconMode, tuiIconResolverProvider, tuiIconsProvider, tuiInjectIconResolver, tuiNumberFormatProvider, tuiValidationErrorsProvider };
|
|
331
314
|
//# sourceMappingURL=taiga-ui-core-tokens.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {\n factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),\n },\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n}\n\nexport const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {\n factory: () => COMMON_ICONS,\n});\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {effect, inject, InjectionToken, signal, type WritableSignal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {\n factory: () => TUI_DARK_MODE_DEFAULT_KEY,\n },\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\nimport {map, type Observable, of} from 'rxjs';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'DMY',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Observable<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_DATE_FORMAT),\n },\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],\n useFactory: (\n parent: Observable<TuiDateFormatSettings> | null,\n ): Observable<TuiDateFormatSettings> =>\n (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {type TuiDay} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = new InjectionToken<TuiHandler<TuiDay, string>>(\n ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '',\n {\n factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk/date-time';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<0 | 1 | 2 | 3 | 4 | 5 | 6>(\n ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {\n factory: tuiExtractI18n('nothingFoundMessage'),\n },\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {\n factory: tuiExtractI18n('defaultErrorMessage'),\n },\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {\n factory: tuiExtractI18n('shortWeekDays'),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {\n factory: () => ({}),\n },\n);\n\n/**\n * @deprecated: use {@link TUI_ICON_REGISTRY}\n */\nexport const TUI_ICON_STARTS = TUI_ICON_REGISTRY;\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nconst ICON_MODE_PREFIXES = {font: '@font.', image: '@img.'} as const;\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon\n .replace(/@[a-zA-Z]+\\./, '')\n .split('.')\n .join('/')}.svg`;\n },\n },\n);\n\n/**\n * @deprecated use {@link TUI_ICON_RESOLVER}\n */\nexport const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;\n\nexport function tuiGetIconMode(icon?: string | null): 'font' | 'image' | 'svg' | null {\n if (!icon) {\n return null;\n }\n\n if (icon.startsWith(ICON_MODE_PREFIXES.image)) {\n return 'image';\n }\n\n return icon.startsWith(ICON_MODE_PREFIXES.font) ? 'font' : 'svg';\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n if (tuiGetIconMode(icon) === 'font') {\n return icon.slice(ICON_MODE_PREFIXES.font.length);\n }\n\n return icons[icon] ?? resolver(icon);\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\nimport {map, type Observable, of} from 'rxjs';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Observable<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),\n },\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],\n useFactory: (\n parent: Observable<TuiNumberFormatSettings> | null,\n ): Observable<TuiNumberFormatSettings> =>\n (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {\n factory: () => new ElementRef(inject(DOCUMENT).documentElement),\n});\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiSpinIcons {\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const TUI_SPIN_ICONS = new InjectionToken<TuiSpinIcons>(\n ngDevMode ? 'TUI_SPIN_ICONS' : '',\n {\n factory: () => ({\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n }),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {\n factory: () => 'Taiga UI',\n});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n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A,OAAO,EAAE,MAAM,UAAU;AAC5B,CAAA;;ACCD;;AAEG;AACU,MAAA,YAAY,GAAG,IAAI,cAAc,CAC1C,SAAS,GAAG,cAAc,GAAG,EAAE,EAC/B;IACI,OAAO,EAAE,MAAK;AACV,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAE9B,OAAO;AACH,YAAA,IAAI,EAAE,UAAU;YAChB,aAAa,GAAA;AACT,gBAAA,MAAM,EAAC,MAAM,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAAG,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;AAC7D,gBAAA,MAAM,IAAI,GAAG;AACT,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP,CAAC;gBAEF,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC,CAAC;aACL;SACJ,CAAC;KACL;AACJ,CAAA,EACH;AAEI,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AAC9C;;ACzCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/breakpoint.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/validation-errors.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {\n factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),\n },\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1280,\n desktopLarge: Infinity,\n }),\n});\n","import {inject, InjectionToken, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_WINDOW_SIZE} from '@taiga-ui/cdk/tokens';\nimport {distinctUntilChanged, map} from 'rxjs';\n\nimport {TUI_MEDIA, type TuiMedia} from './media';\n\nexport type TuiBreakpointMediaKey = keyof Omit<TuiMedia, 'tablet'>;\n\nexport const TUI_BREAKPOINT = new InjectionToken<Signal<TuiBreakpointMediaKey>>(\n ngDevMode ? 'TUI_BREAKPOINT' : '',\n {\n factory: () => {\n const media = inject(TUI_MEDIA);\n const sorted: number[] = Object.values(media).sort((a, b) => a - b);\n const invert: Record<number, TuiBreakpointMediaKey> = Object.keys(\n media,\n ).reduce(\n (ret, key) => ({\n ...ret,\n [media[key as TuiBreakpointMediaKey]]: key,\n }),\n {},\n );\n\n const stream$ = inject(TUI_WINDOW_SIZE).pipe(\n map(({width}) => sorted.find((size) => size > width)),\n map(\n (key) =>\n invert[key || sorted[sorted.length - 1] || 0] ?? 'desktopLarge',\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n );\n\n return toSignal(stream$, {initialValue: 'desktopLarge'});\n },\n },\n);\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);\n","import {\n effect,\n inject,\n InjectionToken,\n signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {\n factory: () => TUI_DARK_MODE_DEFAULT_KEY,\n },\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n untracked(() => {\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'dd/mm/yyyy',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Signal<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {\n factory: () => signal(TUI_DEFAULT_DATE_FORMAT),\n },\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n useFactory: (): Signal<TuiDateFormatSettings> => {\n const parent = inject(TUI_DATE_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {\n factory: tuiExtractI18n('nothingFoundMessage'),\n },\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {\n factory: tuiExtractI18n('defaultErrorMessage'),\n },\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {\n factory: tuiExtractI18n('shortWeekDays'),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {\n factory: () => ({}),\n },\n);\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-zA-Z]+\\./, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.match(/@([^.]*)\\./)?.[1] || icon || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Signal<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {\n factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT),\n },\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n useFactory: (): Signal<TuiNumberFormatSettings> => {\n const parent = inject(TUI_NUMBER_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {\n factory: () => 'Taiga UI',\n});\n","import {InjectionToken, type Provider, type Signal} from '@angular/core';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<\n Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>\n>(ngDevMode ? 'TUI_VALIDATION_ERRORS' : '', {\n factory: () => ({}),\n});\n\nexport const tuiValidationErrorsProvider = (\n useValue: Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>,\n): Provider => ({provide: TUI_VALIDATION_ERRORS, useValue});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACU,MAAA,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC;AACI,IAAA,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACtD,CAAA;;ACTQ,MAAA,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBA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
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA4B,EAAA;AAC9D,IAAA,QACI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA4B,EAAA;AAC9D,IAAA,QACI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAEvF;AAEA,SAAS,OAAO,CAAC,OAAoB,EAAA;AACjC,IAAA,QACI,OAAO,CAAC,aAAa,CAAC;UAChB,gBAAgB,CAAC,OAAO;AACzB,SAAA,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO;AAErD;;ACZA;;;;;;;;;;;;;;;;AAgBG;SACa,oBAAoB,CAAC,EAAC,QAAQ,EAAE,WAAW,EAAS,EAAA;AAChE,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC;AACjF;SAEgB,mBAAmB,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAS,EAAA;AAC9D,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,Q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AAU,CAAC,YAAY,EAAE;AAElC,IAAA,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,IAAA,GAAG;AACC,QAAA,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW;AACxC,QAAA,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,IAAI,EAAE;QAC/C,MAAM,OAAO,GACT,SAAS,KAAK,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,WAAW;AAC/E,QAAA,MAAM,MAAM,GAAG;AACX,YAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;AACpB,YAAA,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;AACzB,YAAA,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;AACpC,YAAA,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;AACzC,SAAA,CAAC,MAAM,CACJ,CAAC,MAAM,EAAE,IAAI,KACT,MAAM,KAAK,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC;cACrB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI;AACvB,cAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,EAChC,CAAC,CAAC,CACL;QAED,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC;AAE3C,QAAA,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE;AACf,YAAA,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YACrE;;AAER,KAAC,QAAQ,UAAU,CAAC,QAAQ,EAAE;AAE9B,IAAA,OAAO,KAAK;AAChB;;ACjFA;;AAEG;;;;"}
|
|
@@ -78,30 +78,9 @@ function tuiFormatNumber(value, settings = {}) {
|
|
|
78
78
|
return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* Converts a string to an HSL color
|
|
83
|
-
* @param value string to convert
|
|
84
|
-
* @return HSL color string
|
|
85
|
-
*/
|
|
86
|
-
// @bad TODO: convert stringHashToHsl to stringHashToRgb
|
|
87
|
-
function tuiStringHashToHsl(value) {
|
|
88
|
-
if (value === '') {
|
|
89
|
-
return '';
|
|
90
|
-
}
|
|
91
|
-
let hash = 0;
|
|
92
|
-
for (let i = 0; i < value.length; i++) {
|
|
93
|
-
hash = value.charCodeAt(i) + ((hash << 5) - hash);
|
|
94
|
-
hash &= hash;
|
|
95
|
-
}
|
|
96
|
-
const hue = hash % 360;
|
|
97
|
-
const saturation = 60 + (hash % 5);
|
|
98
|
-
const lightness = 80 + (hash % 5);
|
|
99
|
-
return `hsl(${hue},${saturation}%,${lightness}%)`;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
81
|
/**
|
|
103
82
|
* Generated bundle index. Do not edit.
|
|
104
83
|
*/
|
|
105
84
|
|
|
106
|
-
export { tuiFormatNumber, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp
|
|
85
|
+
export { tuiFormatNumber, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp };
|
|
107
86
|
//# sourceMappingURL=taiga-ui-core-utils-format.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart = ''] = numberPart?.split('.') ?? [];\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {tuiNumberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk/constants';\nimport {tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {precision, decimalSeparator, thousandSeparator, decimalMode, rounding} = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n decimalMode: 'always',\n precision: Infinity,\n ...settings,\n };\n\n const rounded = Number.isFinite(precision)\n ? tuiRoundWith({value, precision, method: rounding})\n : value;\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, precision);\n const hasFraction = Number(fractionPartPadded) > 0;\n\n if (Number.isFinite(precision)) {\n if (decimalMode === 'always' || (hasFraction && decimalMode === 'pad')) {\n const zeroPaddingSize: number = Math.max(\n precision - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AACG,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AACnC,IAAA,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;IAEvD,IAAI,eAAe,GAAG,aAAa;IAEnC,IAAI,OAAO,EAAE;AACT,QAAA,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE;AAC5D,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC,CAAC;AAErE,QAAA,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;;AAGlD,IAAA,OAAO,eAAe;AAC1B;;AChBA;;;;;;AAMG;AACa,SAAA,wBAAwB,CACpC,KAAa,EACb,SAAyB,EAAA;AAEzB,IAAA,MAAM,GAAG,kBAAkB,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC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