From 7be3520bf0e3132a45caa374982c35431e62cd5f Mon Sep 17 00:00:00 2001 From: waterplea Date: Sat, 28 Sep 2024 11:41:56 +0400 Subject: [PATCH] fix(legacy): `PrimitiveTextfield` fix left icon margin for size `s` and many other small style tweaks across components --- .cspell.json | 3 +- package.json | 2 +- .../components/tab-bar/tab-bar.style.less | 1 - .../miscellaneous/test/is-valid-url.spec.ts | 2 +- .../components/textfield/select.template.html | 1 + projects/demo/src/assets/images/by.svg | 35 --------- projects/demo/src/modules/app/app.const.ts | 1 + projects/demo/src/modules/app/app.routes.ts | 2 +- .../demo/src/modules/app/landing/index.html | 6 -- .../src/modules/app/logo/logo.template.html | 6 -- .../input-card-group/examples/2/index.ts | 2 +- .../demo/src/modules/icons/icons/index.html | 2 +- .../demo/src/modules/info/related/index.html | 2 +- .../markup/colors/examples/table/index.html | 2 +- .../markup/colors/examples/table/index.ts | 6 +- .../demo/src/modules/markup/colors/index.html | 71 ++----------------- .../demo/src/modules/markup/colors/index.less | 11 --- .../demo/src/modules/markup/colors/index.ts | 10 +-- projects/demo/used-icons.ts | 2 - .../button-group/button-group.style.less | 9 +++ .../layout/components/card/card.styles.less | 1 + .../layout/components/cell/cell.styles.less | 6 +- .../components/navigation/header.style.less | 2 +- projects/legacy/styles/mixins/textfield.less | 2 +- projects/legacy/styles/mixins/textfield.scss | 2 +- 25 files changed, 38 insertions(+), 151 deletions(-) delete mode 100644 projects/demo/src/assets/images/by.svg delete mode 100644 projects/demo/src/modules/markup/colors/index.less diff --git a/.cspell.json b/.cspell.json index b25944ee34c1..02cb8bae0016 100644 --- a/.cspell.json +++ b/.cspell.json @@ -30,7 +30,8 @@ "contentalign", "inputpassword", "inputcopy", - "docsearch" + "docsearch", + "Wachovia" ], "ignoreRegExpList": ["\\(https?://.*?\\)", "\\/{1}.+\\/{1}", "\\%2F.+", "\\%2C.+", "\\ɵ.+", "\\ыва.+"], "overrides": [ diff --git a/package.json b/package.json index 34dac84ec120..d0f6367ecfd7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@taiga-ui/components", "version": "4.8.1", "private": true, - "description": "Taiga UI by TBank is a set of components, services, directives and other tools to build high quality UI using modern Angular framework", + "description": "Taiga UI is a set of components, services, directives and other tools to build high quality UI using modern Angular framework", "keywords": [ "angular", "kit", diff --git a/projects/addon-mobile/components/tab-bar/tab-bar.style.less b/projects/addon-mobile/components/tab-bar/tab-bar.style.less index 9fbeab43a32b..8d8ddff2ba6b 100644 --- a/projects/addon-mobile/components/tab-bar/tab-bar.style.less +++ b/projects/addon-mobile/components/tab-bar/tab-bar.style.less @@ -5,7 +5,6 @@ position: relative; display: flex; - align-items: flex-start; font: normal 0.625rem/0.75rem -apple-system, BlinkMacSystemFont, diff --git a/projects/cdk/utils/miscellaneous/test/is-valid-url.spec.ts b/projects/cdk/utils/miscellaneous/test/is-valid-url.spec.ts index 71c66c43afd2..7792dc38b95c 100644 --- a/projects/cdk/utils/miscellaneous/test/is-valid-url.spec.ts +++ b/projects/cdk/utils/miscellaneous/test/is-valid-url.spec.ts @@ -3,7 +3,7 @@ import {tuiIsValidUrl} from '@taiga-ui/cdk'; describe('tuiIsValidUrl', () => { it('valid url', () => { expect(tuiIsValidUrl('https://taiga-ui.dev')).toBe(true); - expect(tuiIsValidUrl('https://tbank-group.com/')).toBe(true); + expect(tuiIsValidUrl('https://taiga-group.com/')).toBe(true); expect(tuiIsValidUrl('www.jsowl.com')).toBe(true); expect(tuiIsValidUrl('https://burgers.example.com/?burger=%s')).toBe(true); expect(tuiIsValidUrl('taiga-ui.dev')).toBe(true); diff --git a/projects/core/components/textfield/select.template.html b/projects/core/components/textfield/select.template.html index b689bf293c58..9d829d45676b 100644 --- a/projects/core/components/textfield/select.template.html +++ b/projects/core/components/textfield/select.template.html @@ -10,6 +10,7 @@ diff --git a/projects/demo/src/assets/images/by.svg b/projects/demo/src/assets/images/by.svg deleted file mode 100644 index 68dec7215058..000000000000 --- a/projects/demo/src/assets/images/by.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/projects/demo/src/modules/app/app.const.ts b/projects/demo/src/modules/app/app.const.ts index da4aff85dc08..9a62392b03c6 100644 --- a/projects/demo/src/modules/app/app.const.ts +++ b/projects/demo/src/modules/app/app.const.ts @@ -2,6 +2,7 @@ export const SEE_ALSO_GROUPS: ReadonlyArray = [ ['Tooltip', 'Hint', 'HintManual', 'HintPointer'], ['LineChart', 'LineDaysChart'], ['PrimitiveTextfield', 'Input', 'Textarea'], + ['Icon', 'Icons — Lucide', 'Icons — Material', 'Icons — FontAwesome'], [ 'InputDate', 'InputDateRange', diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index da38a03588ea..cf147ada54e3 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -192,7 +192,7 @@ export const ROUTES: Routes = [ route({ path: DemoRoute.IconsLucide, loadComponent: async () => import('../icons/icons'), - title: 'Icons', + title: 'Icons — Lucide', }), route({ path: DemoRoute.IconsMaterial, diff --git a/projects/demo/src/modules/app/landing/index.html b/projects/demo/src/modules/app/landing/index.html index 3c8a2cf7ab13..029ad680ec47 100644 --- a/projects/demo/src/modules/app/landing/index.html +++ b/projects/demo/src/modules/app/landing/index.html @@ -188,10 +188,4 @@

It’s open source

[class.scroll_hidden]="current === 2" (click)="onClick()" > - by TBank diff --git a/projects/demo/src/modules/app/logo/logo.template.html b/projects/demo/src/modules/app/logo/logo.template.html index 292777f09952..7211fe8f8801 100644 --- a/projects/demo/src/modules/app/logo/logo.template.html +++ b/projects/demo/src/modules/app/logo/logo.template.html @@ -12,9 +12,3 @@ Taiga UI - -by TBank diff --git a/projects/demo/src/modules/components/input-card-group/examples/2/index.ts b/projects/demo/src/modules/components/input-card-group/examples/2/index.ts index 89a5ce639852..d3846d701a91 100644 --- a/projects/demo/src/modules/components/input-card-group/examples/2/index.ts +++ b/projects/demo/src/modules/components/input-card-group/examples/2/index.ts @@ -25,7 +25,7 @@ import {TuiButton, TuiDataList, TuiIcon, TuiTextfield, TuiTitle} from '@taiga-ui }) export default class Example { protected readonly items = [ - {card: '4321***1234', expire: '12/21', name: 'Salary', bank: 'Tbank'}, + {card: '4321***1234', expire: '12/21', name: 'Salary', bank: 'Wachovia Bank'}, { card: '8765***5678', expire: '03/42', diff --git a/projects/demo/src/modules/icons/icons/index.html b/projects/demo/src/modules/icons/icons/index.html index c9e7cc972fc9..fd8c25dbcc7f 100644 --- a/projects/demo/src/modules/icons/icons/index.html +++ b/projects/demo/src/modules/icons/icons/index.html @@ -4,7 +4,7 @@ type="icons" > - Open source theme for Taiga UI + Open source theme for Taiga UI uses
- +

-

- - -

+ -
+
-
+
-
+
-
+
-
+
diff --git a/projects/demo/src/modules/markup/colors/index.less b/projects/demo/src/modules/markup/colors/index.less deleted file mode 100644 index 37a2e7018886..000000000000 --- a/projects/demo/src/modules/markup/colors/index.less +++ /dev/null @@ -1,11 +0,0 @@ -.mobile-colors-switch { - display: none; - - &:host-context([data-tui-theme='tbank']) & { - display: flex; - } - - label[tuiBlock] { - align-items: center; - } -} diff --git a/projects/demo/src/modules/markup/colors/index.ts b/projects/demo/src/modules/markup/colors/index.ts index e6d4d4ab1a1c..8a754db2002f 100644 --- a/projects/demo/src/modules/markup/colors/index.ts +++ b/projects/demo/src/modules/markup/colors/index.ts @@ -1,19 +1,15 @@ import {Component, inject} from '@angular/core'; -import {FormsModule} from '@angular/forms'; import {changeDetection} from '@demo/emulate/change-detection'; import {TuiDemo} from '@demo/utils'; -import {TuiPlatform} from '@taiga-ui/cdk'; -import {TUI_DARK_MODE, TuiGroup} from '@taiga-ui/core'; -import {TuiBlock} from '@taiga-ui/kit'; +import {TUI_DARK_MODE} from '@taiga-ui/core'; import {BACKGROUNDS, CHARTS, OTHERS, STATUSES, TEXT} from './constants'; import {TableColors} from './examples/table'; @Component({ standalone: true, - imports: [FormsModule, TableColors, TuiBlock, TuiDemo, TuiGroup, TuiPlatform], + imports: [TableColors, TuiDemo], templateUrl: './index.html', - styleUrls: ['./index.less'], changeDetection, }) export default class Page { @@ -28,6 +24,4 @@ export default class Page { protected readonly statuses = STATUSES; protected readonly others = OTHERS; protected readonly charts = CHARTS; - - protected platform: 'android' | 'web' = 'web'; } diff --git a/projects/demo/used-icons.ts b/projects/demo/used-icons.ts index 313133513c61..c53ea95328d4 100644 --- a/projects/demo/used-icons.ts +++ b/projects/demo/used-icons.ts @@ -98,6 +98,4 @@ export const TUI_USED_ICONS = [ '@tui.chevron-up', '@tui.play', '@tui.pause', - '@tui.monitor', - '@tui.smartphone', ] as const; diff --git a/projects/kit/directives/button-group/button-group.style.less b/projects/kit/directives/button-group/button-group.style.less index 2e8c4723d931..adc55fce1ef2 100644 --- a/projects/kit/directives/button-group/button-group.style.less +++ b/projects/kit/directives/button-group/button-group.style.less @@ -26,6 +26,15 @@ color: var(--tui-text-action); text-align: center; text-decoration: none; + clip-path: inset(0); + + &:first-child { + clip-path: inset(0 0 0 -10rem); + } + + &:last-child { + clip-path: inset(0 -10rem 0 0); + } &:active { background: var(--tui-background-neutral-1); diff --git a/projects/layout/components/card/card.styles.less b/projects/layout/components/card/card.styles.less index 1c4d8d4be166..b55c5176a060 100644 --- a/projects/layout/components/card/card.styles.less +++ b/projects/layout/components/card/card.styles.less @@ -10,6 +10,7 @@ flex-shrink: 0; text-decoration: none; overscroll-behavior: contain; + overflow: hidden; &[tuiTitle], [tuiTitle]:not([tuiCell] *):not([tuiLabel] *) { diff --git a/projects/layout/components/cell/cell.styles.less b/projects/layout/components/cell/cell.styles.less index b4e40fbfcf72..db16bfcae992 100644 --- a/projects/layout/components/cell/cell.styles.less +++ b/projects/layout/components/cell/cell.styles.less @@ -166,7 +166,8 @@ } &:hover [tuiCellActions] button, - &:hover [tuiCellActions] a { + &:hover [tuiCellActions] a, + &:hover [tuiCellActions] label { opacity: 1; } @@ -178,7 +179,8 @@ @media (hover: hover) and (pointer: fine) { a[tuiCell]:not([tuiSurface]):hover, - button[tuiCell]:not([tuiSurface]):hover { + button[tuiCell]:not([tuiSurface]):hover, + label[tuiCell]:not([tuiSurface]):hover { background: var(--tui-background-neutral-1); cursor: pointer; } diff --git a/projects/layout/components/navigation/header.style.less b/projects/layout/components/navigation/header.style.less index a1c9f975e80c..e3b4177d5f3d 100644 --- a/projects/layout/components/navigation/header.style.less +++ b/projects/layout/components/navigation/header.style.less @@ -1,6 +1,6 @@ @import '@taiga-ui/core/styles/taiga-ui-local'; -header[tuiNavigationHeader] { +header[tuiNavigationHeader][tuiNavigationHeader] { --tui-text-action: var(--tui-text-primary); --tui-text-action-hover: var(--tui-text-primary); diff --git a/projects/legacy/styles/mixins/textfield.less b/projects/legacy/styles/mixins/textfield.less index 74a39e4eabd2..1d387afdb872 100644 --- a/projects/legacy/styles/mixins/textfield.less +++ b/projects/legacy/styles/mixins/textfield.less @@ -298,7 +298,7 @@ &_left { :host[data-size='s'] & { - margin-inline-start: -0.375rem; + margin: 0 0.125rem 0 -0.375rem; } :host[data-size='m'] & { diff --git a/projects/legacy/styles/mixins/textfield.scss b/projects/legacy/styles/mixins/textfield.scss index 5ebb904eba69..54c78f6f29e8 100644 --- a/projects/legacy/styles/mixins/textfield.scss +++ b/projects/legacy/styles/mixins/textfield.scss @@ -288,7 +288,7 @@ $line-height-l: 1.25rem; &_left { :host[data-size='s'] & { - margin-inline-start: -0.375rem; + margin: 0 0.125rem 0 -0.375rem; } :host[data-size='m'] & {