diff --git a/apps/docs/src/app/seo-descriptions.ts b/apps/docs/src/app/seo-descriptions.ts index 94c3827096..7f37171e94 100644 --- a/apps/docs/src/app/seo-descriptions.ts +++ b/apps/docs/src/app/seo-descriptions.ts @@ -160,8 +160,8 @@ export const DOCS_SEO_DESCRIPTIONS = { "ru": "Layout flex — набор CSS-классов Koobiq для компоновки, выравнивания и упорядочивания элементов во flex-контейнерах." }, "link": { - "en": "A link connects web pages or acts as a lighter alternative to a button.", - "ru": "Ссылка связывает веб-страницы или выступает как более легкий аналог кнопки." + "en": "KbqLink is a link that takes the user to another page, a document, or an external site.", + "ru": "KbqLink — ссылка, которая ведет пользователя к другой странице, документу или внешнему сайту." }, "list": { "en": "A list shows a set of related items and lets the user select one or several of them. To pick a single value from a closed set inside a form use Select, and for hierarchical data use Tree.", diff --git a/apps/docs/src/assets/images/link/desktop-link-active.jpg b/apps/docs/src/assets/images/link/desktop-link-active.jpg deleted file mode 100644 index bf1dac2dc8..0000000000 Binary files a/apps/docs/src/assets/images/link/desktop-link-active.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/desktop-link-disabled.jpg b/apps/docs/src/assets/images/link/desktop-link-disabled.jpg deleted file mode 100644 index dbb1220a2b..0000000000 Binary files a/apps/docs/src/assets/images/link/desktop-link-disabled.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/improper-link.jpg b/apps/docs/src/assets/images/link/improper-link.jpg deleted file mode 100644 index 564521de7d..0000000000 Binary files a/apps/docs/src/assets/images/link/improper-link.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/link-printing.jpg b/apps/docs/src/assets/images/link/link-printing.jpg deleted file mode 100644 index 582d9e38e0..0000000000 Binary files a/apps/docs/src/assets/images/link/link-printing.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/proper-link.jpg b/apps/docs/src/assets/images/link/proper-link.jpg deleted file mode 100644 index 6a62865133..0000000000 Binary files a/apps/docs/src/assets/images/link/proper-link.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/shift+f10.jpg b/apps/docs/src/assets/images/link/shift+f10.jpg deleted file mode 100644 index f694aeb6ca..0000000000 Binary files a/apps/docs/src/assets/images/link/shift+f10.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/space-or-return.jpg b/apps/docs/src/assets/images/link/space-or-return.jpg deleted file mode 100644 index d6802180b3..0000000000 Binary files a/apps/docs/src/assets/images/link/space-or-return.jpg and /dev/null differ diff --git a/apps/docs/src/assets/images/link/sw-active.png b/apps/docs/src/assets/images/link/sw-active.png deleted file mode 100644 index 83ebc018cc..0000000000 Binary files a/apps/docs/src/assets/images/link/sw-active.png and /dev/null differ diff --git a/apps/docs/src/llms.txt b/apps/docs/src/llms.txt index 6b10b62e06..517946b012 100644 --- a/apps/docs/src/llms.txt +++ b/apps/docs/src/llms.txt @@ -61,7 +61,7 @@ Rules for code that uses Koobiq: - [Inline edit](https://koobiq.io/en/components/inline-edit.md): Inline editing can replace a traditional form when the user only needs to update a few fields among many available parameters. Entry point: `@koobiq/components/inline-edit`. - [Input](https://koobiq.io/en/components/input.md): Input provides text, numeric, and password fields with formatting, validation, masking, and other data-entry behavior. Entry point: `@koobiq/components/input`. - [Layout flex](https://koobiq.io/en/components/layout-flex.md): Layout flex provides Koobiq CSS classes for arranging, aligning, and ordering elements in flex containers. -- [Link](https://koobiq.io/en/components/link.md): A link connects web pages or acts as a lighter alternative to a button. Entry point: `@koobiq/components/link`. +- [Link](https://koobiq.io/en/components/link.md): `KbqLink` is a link that takes the user to another page, a document, or an external site. Entry point: `@koobiq/components/link`. - [List](https://koobiq.io/en/components/list.md): A list shows a set of related items and lets the user select one or several of them. Entry point: `@koobiq/components/list`. - [Markdown](https://koobiq.io/en/components/markdown.md): `KbqMarkdown` - component that allows converting text written in _Markdown_ markup language into _HTML_. Entry point: `@koobiq/components/markdown`. - [Modal](https://koobiq.io/en/components/modal.md): A modal dialog opens as a window on top of the page, dims the underlying layer, and blocks all interaction with it. Entry point: `@koobiq/components/modal`. diff --git a/packages/components-dev/link/module.ts b/packages/components-dev/link/module.ts index 15ad3f2eac..1d9b250014 100644 --- a/packages/components-dev/link/module.ts +++ b/packages/components-dev/link/module.ts @@ -1,19 +1,16 @@ import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; -import { KbqIconModule } from '@koobiq/components/icon'; -import { KbqLink, KbqLinkPrefix, KbqLinkSuffix } from '@koobiq/components/link'; import { LinkApplicationExample, - LinkCaptionExample, LinkDisabledExample, LinkExternalExample, - LinkGeneralExample, LinkIconsExample, + LinkInTextExample, LinkMultiLineExample, LinkOverviewExample, - LinkPrepositionsExample, LinkPrintExample, LinkPseudoExample, - LinkTargetBlankExample, + LinkSizeExample, + LinkUnderlineExample, LinkVisitedExample, LinkWithCaptionExample } from 'packages/docs-examples/components/link'; @@ -23,48 +20,45 @@ import { DevThemeToggle } from '../theme-toggle'; selector: 'dev-examples', imports: [ LinkApplicationExample, - LinkCaptionExample, LinkDisabledExample, LinkExternalExample, - LinkGeneralExample, LinkIconsExample, + LinkInTextExample, LinkMultiLineExample, LinkOverviewExample, - LinkPrepositionsExample, LinkPrintExample, LinkPseudoExample, - LinkTargetBlankExample, + LinkSizeExample, + LinkUnderlineExample, LinkVisitedExample, LinkWithCaptionExample ], template: ` - +
- +
- +

- -
- +


- +
- +
- +

- +
- + `, changeDetection: ChangeDetectionStrategy.OnPush }) @@ -72,12 +66,10 @@ export class DevDocsExamples {} @Component({ selector: 'dev-app', - imports: [KbqLink, KbqLinkPrefix, KbqLinkSuffix, KbqIconModule, DevDocsExamples, DevThemeToggle], + imports: [DevDocsExamples, DevThemeToggle], templateUrl: './template.html', styleUrls: ['./styles.scss'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }) -export class DevApp { - readonly url = 'http://localhost:3003/'; -} +export class DevApp {} diff --git a/packages/components-dev/link/styles.scss b/packages/components-dev/link/styles.scss index ff7112406e..8f4609b2bd 100644 --- a/packages/components-dev/link/styles.scss +++ b/packages/components-dev/link/styles.scss @@ -1 +1,5 @@ -/* stylelint-disable no-empty-source */ +dev-app { + display: block; + max-width: 608px; + margin: var(--kbq-size-l); +} diff --git a/packages/components-dev/link/template.html b/packages/components-dev/link/template.html index fe4fb3fdfa..9eff7f844b 100644 --- a/packages/components-dev/link/template.html +++ b/packages/components-dev/link/template.html @@ -3,383 +3,3 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DisabledCompact
- - - -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- - - Отчет сканирования - - - - - Отчет сканирования - -
- В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - - - В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - -
- Отчет сканирования (pseudo) - - Отчет сканирования (pseudo) -
- - - Отчет сканирования (pseudo) - - - - - Отчет сканирования (pseudo) - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DisabledNormal
- - - -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- - - Отчет сканирования - - - - - Отчет сканирования - -
- В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - - - В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - -
- Отчет сканирования (pseudo) - - Отчет сканирования (pseudo) -
- - - Отчет сканирования (pseudo) - - - - - Отчет сканирования (pseudo) - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DisabledBig
- - - -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- Отчет сканирования - - Отчет сканирования -
- - - Отчет сканирования - - - - - Отчет сканирования - -
- В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - - - В - западной традиции - рыбой выступает фрагмент латинского текста из философского трактата Цицерона - - «О пределах добра и зла», написанного в 45 году до нашей эры - . - - - Впервые этот текст был применен для набора шрифтовых образцов неизвестным печатником еще в XVI веке - - . - -
- Отчет сканирования (pseudo) - - Отчет сканирования (pseudo) -
- - - Отчет сканирования (pseudo) - - - - - Отчет сканирования (pseudo) - -
diff --git a/packages/components/link/examples.link.en.mdx b/packages/components/link/examples.link.en.mdx index 424447768e..f887c1df82 100644 --- a/packages/components/link/examples.link.en.mdx +++ b/packages/components/link/examples.link.en.mdx @@ -1,3 +1,5 @@ ### Link with caption +A caption under the link is placed in an element with `kbqLinkSuffix`. + diff --git a/packages/components/link/examples.link.ru.mdx b/packages/components/link/examples.link.ru.mdx index 7ca5e8d630..5b55f96afe 100644 --- a/packages/components/link/examples.link.ru.mdx +++ b/packages/components/link/examples.link.ru.mdx @@ -1,3 +1,5 @@ ### Ссылка с подписью +Подпись под ссылкой помещается в элемент с `kbqLinkSuffix`. + diff --git a/packages/components/link/link.en.mdx b/packages/components/link/link.en.mdx index 47f2b47a39..837e2c89ea 100644 --- a/packages/components/link/link.en.mdx +++ b/packages/components/link/link.en.mdx @@ -1,193 +1,85 @@ -A link connects web pages or acts as a lighter alternative to a button. +`KbqLink` is a link that takes the user to another page, a document, or an external site. -### When to use + -- For navigating between pages -- When you need to embed a button in text. In this case, use a [pseudo-link](/en/components/link/overview#pseudo-link) +### Size -#### When not to use links +The `size` attribute changes the font size and the gap to the icon. -- For the primary action in a modal dialog — use a [button](/en/components/button) -- For interactivity outside of text — use a [ghost button](/en/components/button) + -### Component structure +### Pseudo link -- Text -- Underline (for regular links) -- Icon (optional) - -#### Variations - -##### Normal size - -Used by default. - - - -##### Small size - -Used where a small-sized link is needed (for example, in a field caption). Set it with `size`: `compact`, `normal` (the default) or `big`. - - - -### How it works - -#### Link types by destination page - -##### Page within the product - -For main navigation. - - - -##### Page within the product in a new tab - -When it is important to keep the parent page. Use links that open in a new tab as rarely as possible. - - - -##### External page - -For navigating to external pages. External pages are all pages outside the product's scope (other company products are also external). The distinction is indicated by an icon. - -
-
Note
-
- -To mark an external link, add `external`: the icon appears by itself. -To open the page in a new tab, add `target="_blank"` as well. - -
-
- - - -##### External application - -For opening in other applications. It is advisable to write the application name directly in the link. For better clarity, the icon can be replaced with the product logo. - - - -It is useful to detect whether a desktop application is installed on the user's device. If the application is not installed, the link is replaced with plain text. - -| | -| :--------------------------------------------------------------------: | -| AI on Windows. Project links are active and open in AI Desktop | - -| | -| :----------------------------------------------------------------------: | -| AI on macOS. Project links are displayed as plain text | - -Sometimes specifying the product and adding a logo may be excessive. If you are confident that the context makes the link's purpose clear, these elements can be omitted. - -##### Pseudo-link - -An analog of a button. Does not reload the page, does not open in a new tab or by link. +A pseudo link looks like a link, but acts as a button: it performs an action without leaving the page. Use it for an action inside text. -Make a pseudo-link from a ``, or add `pseudo` to an `` without a `href`. It is pressed with Enter and Space, like a button. A `