@broxus/react-uikit 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/components/Article/Meta.d.ts +1 -1
  2. package/dist/cjs/components/Article/Title.d.ts +1 -1
  3. package/dist/cjs/components/Badge/index.d.ts +1 -1
  4. package/dist/cjs/components/Button/Button.d.ts +4 -4
  5. package/dist/cjs/components/Button/Button.js +1 -1
  6. package/dist/cjs/components/Card/Badge.d.ts +1 -1
  7. package/dist/cjs/components/Card/Body.d.ts +1 -1
  8. package/dist/cjs/components/Card/Footer.d.ts +1 -1
  9. package/dist/cjs/components/Card/Header.d.ts +1 -1
  10. package/dist/cjs/components/Card/Media.d.ts +1 -1
  11. package/dist/cjs/components/Card/Title.d.ts +1 -1
  12. package/dist/cjs/components/Control/Select/index.scss +1 -1
  13. package/dist/cjs/components/Flex/Flex.d.ts +3 -3
  14. package/dist/cjs/components/Heading/index.d.ts +1 -1
  15. package/dist/cjs/components/Text/index.d.ts +3 -2
  16. package/dist/cjs/components/Text/index.js +2 -1
  17. package/dist/cjs/components/Text/index.scss +315 -0
  18. package/dist/cjs/styles/text.scss +1 -303
  19. package/dist/cjs/styles/variables.scss +3 -0
  20. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  21. package/dist/cjs/utils/get-breakpoints-config-classes.js +1 -1
  22. package/dist/esm/components/Article/Meta.d.ts +1 -1
  23. package/dist/esm/components/Article/Title.d.ts +1 -1
  24. package/dist/esm/components/Badge/index.d.ts +1 -1
  25. package/dist/esm/components/Button/Button.d.ts +4 -4
  26. package/dist/esm/components/Button/Button.js +1 -1
  27. package/dist/esm/components/Card/Badge.d.ts +1 -1
  28. package/dist/esm/components/Card/Body.d.ts +1 -1
  29. package/dist/esm/components/Card/Footer.d.ts +1 -1
  30. package/dist/esm/components/Card/Header.d.ts +1 -1
  31. package/dist/esm/components/Card/Media.d.ts +1 -1
  32. package/dist/esm/components/Card/Title.d.ts +1 -1
  33. package/dist/esm/components/Control/Select/index.scss +1 -1
  34. package/dist/esm/components/Flex/Flex.d.ts +3 -3
  35. package/dist/esm/components/Heading/index.d.ts +1 -1
  36. package/dist/esm/components/Text/index.d.ts +3 -2
  37. package/dist/esm/components/Text/index.js +2 -1
  38. package/dist/esm/components/Text/index.scss +315 -0
  39. package/dist/esm/styles/text.scss +1 -303
  40. package/dist/esm/styles/variables.scss +3 -0
  41. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  42. package/dist/esm/utils/get-breakpoints-config-classes.js +1 -1
  43. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type ArticleMetaOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type ArticleMetaProps<E extends React.ElementType> = React.PropsWithChildren<ArticleMetaOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ArticleMetaOwnProps>;
6
+ export type ArticleMetaProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<ArticleMetaOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ArticleMetaOwnProps>;
7
7
  declare const defaultElement = "p";
8
8
  export declare function Meta<E extends React.ElementType = typeof defaultElement>(props: ArticleMetaProps<E>): React.JSX.Element;
9
9
  export declare namespace Meta {
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type ArticleTitleOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type ArticleTitleProps<E extends React.ElementType> = React.PropsWithChildren<ArticleTitleOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ArticleTitleOwnProps>;
6
+ export type ArticleTitleProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<ArticleTitleOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ArticleTitleOwnProps>;
7
7
  declare const defaultElement = "h1";
8
8
  export declare function Title<E extends React.ElementType = typeof defaultElement>(props: ArticleTitleProps<E>): React.JSX.Element;
9
9
  export declare namespace Title {
@@ -4,7 +4,7 @@ import './index.scss';
4
4
  export type BadgeOwnProps = {
5
5
  prefixCls?: string;
6
6
  };
7
- export type BadgeProps<E extends React.ElementType> = React.PropsWithChildren<BadgeOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, BadgeOwnProps>;
7
+ export type BadgeProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<BadgeOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, BadgeOwnProps>;
8
8
  declare const defaultElement = "span";
9
9
  export declare function Badge<E extends React.ElementType = typeof defaultElement>(props: BadgeProps<E>): React.JSX.Element;
10
10
  export declare namespace Badge {
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type PolymorphicProps } from '../../components/Component';
3
- export interface AnchorButtonProps extends Omit<React.AnchorHTMLAttributes<any>, 'onClick'> {
3
+ export interface AnchorButtonProps extends Omit<React.AnchorHTMLAttributes<React.ElementType>, 'onClick'> {
4
4
  href: string;
5
5
  target?: string;
6
6
  onClick?: React.MouseEventHandler<HTMLElement>;
7
7
  }
8
- export interface NativeButtonProps extends Omit<React.ButtonHTMLAttributes<any>, 'type' | 'onClick'> {
8
+ export interface NativeButtonProps extends Omit<React.ButtonHTMLAttributes<React.ElementType>, 'type' | 'onClick'> {
9
9
  htmlType?: 'button' | 'reset' | 'submit';
10
10
  onClick?: React.MouseEventHandler<HTMLElement>;
11
11
  }
@@ -16,5 +16,5 @@ export interface ButtonOwnProps extends Partial<AnchorButtonProps>, Partial<Nati
16
16
  size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
17
17
  type?: 'default' | 'primary' | 'secondary' | 'tertiary' | 'danger' | 'link' | 'text';
18
18
  }
19
- export type ButtonProps<E extends React.ElementType = any> = React.PropsWithChildren<ButtonOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ButtonOwnProps>;
20
- export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps<any>, "ref"> & React.RefAttributes<any>>;
19
+ export type ButtonProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<ButtonOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, ButtonOwnProps>;
20
+ export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps<React.ElementType<any>>, "ref"> & React.RefAttributes<any>>;
@@ -47,7 +47,7 @@ exports.Button = React.forwardRef((props, ref) => {
47
47
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'button'), [config, prefixCls]);
48
48
  const className = React.useMemo(() => (0, classnames_1.default)(rootCls, {
49
49
  [`${rootCls}-${type}`]: type !== undefined,
50
- [`${rootCls}-ghost`]: ghost !== undefined,
50
+ [`${rootCls}-ghost`]: ghost === true,
51
51
  [`${rootCls}-${size}`]: size !== undefined,
52
52
  [`${rootCls}-${shape}`]: shape !== undefined && ['circle', 'round'].includes(shape),
53
53
  }, restProps.className), [rootCls, type, ghost, size, shape, restProps.className]);
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type BadgeProps } from '../../components/Badge';
3
- export type CardBadgeProps<E extends React.ElementType> = BadgeProps<E>;
3
+ export type CardBadgeProps<E extends React.ElementType = React.ElementType> = BadgeProps<E>;
4
4
  declare const defaultElement = "span";
5
5
  export declare function Badge<E extends React.ElementType = typeof defaultElement>(props: CardBadgeProps<E>): React.JSX.Element;
6
6
  export declare namespace Badge {
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type CardBodyOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type CardBodyProps<E extends React.ElementType> = React.PropsWithChildren<CardBodyOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardBodyOwnProps>;
6
+ export type CardBodyProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<CardBodyOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardBodyOwnProps>;
7
7
  declare const defaultElement = "div";
8
8
  export declare function Body<E extends React.ElementType = typeof defaultElement>(props: CardBodyProps<E>): React.JSX.Element;
9
9
  export declare namespace Body {
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type CardFooterOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type CardFooterProps<E extends React.ElementType> = React.PropsWithChildren<CardFooterOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardFooterOwnProps>;
6
+ export type CardFooterProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<CardFooterOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardFooterOwnProps>;
7
7
  declare const defaultElement = "footer";
8
8
  export declare function Footer<E extends React.ElementType = typeof defaultElement>(props: CardFooterProps<E>): React.JSX.Element;
9
9
  export declare namespace Footer {
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type CardHeaderOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type CardHeaderProps<E extends React.ElementType> = React.PropsWithChildren<CardHeaderOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardHeaderOwnProps>;
6
+ export type CardHeaderProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<CardHeaderOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardHeaderOwnProps>;
7
7
  declare const defaultElement = "header";
8
8
  export declare function Header<E extends React.ElementType = typeof defaultElement>(props: CardHeaderProps<E>): React.JSX.Element;
9
9
  export declare namespace Header {
@@ -4,7 +4,7 @@ export type CardMediaOwnProps = {
4
4
  position: 'left' | 'top' | 'right' | 'bottom';
5
5
  prefixCls?: string;
6
6
  };
7
- export type CardMediaProps<E extends React.ElementType> = React.PropsWithChildren<CardMediaOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardMediaOwnProps>;
7
+ export type CardMediaProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<CardMediaOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardMediaOwnProps>;
8
8
  declare const defaultElement = "div";
9
9
  export declare function Media<E extends React.ElementType = typeof defaultElement>(props: CardMediaProps<E>): React.JSX.Element;
10
10
  export declare namespace Media {
@@ -3,7 +3,7 @@ import { type PolymorphicProps } from '../../components/Component';
3
3
  export type CardTitleOwnProps = {
4
4
  prefixCls?: string;
5
5
  };
6
- export type CardTitleProps<E extends React.ElementType> = React.PropsWithChildren<CardTitleOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardTitleOwnProps>;
6
+ export type CardTitleProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<CardTitleOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, CardTitleOwnProps>;
7
7
  declare const defaultElement = "h3";
8
8
  export declare function Title<E extends React.ElementType = typeof defaultElement>(props: CardTitleProps<E>): React.JSX.Element;
9
9
  export declare namespace Title {
@@ -538,7 +538,7 @@
538
538
  /* Control
539
539
  ========================================================================== */
540
540
 
541
- .uk-control-select {
541
+ .uk-control.uk-control-select {
542
542
  align-items: unset;
543
543
  border: 0 none;
544
544
  height: auto;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type PolymorphicProps } from '../../components/Component';
3
3
  import { type BreakpointsConfig } from '../../types';
4
- export type FlexAlignContent = 'stretch' | 'between' | 'around' | 'top' | 'middle' | 'bottom';
5
- export type FlexAlignItems = 'stretch' | 'top' | 'middle' | 'bottom';
4
+ export type FlexAlignContent = 'stretch' | 'between' | 'around' | 'start' | 'middle' | 'end';
5
+ export type FlexAlignItems = 'stretch' | 'start' | 'middle' | 'end';
6
6
  export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
7
7
  export type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
8
- export type FlexJustifyContent = 'left' | 'center' | 'right' | 'between' | 'around';
8
+ export type FlexJustifyContent = 'start' | 'center' | 'end' | 'between' | 'around';
9
9
  export type FlexBreakpoint = {
10
10
  alignContent?: FlexAlignContent;
11
11
  alignItems?: FlexAlignItems;
@@ -6,7 +6,7 @@ export type HeadingOwnProps = {
6
6
  prefixCls?: string;
7
7
  size?: 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge';
8
8
  };
9
- export type HeadingProps<E extends React.ElementType> = React.PropsWithChildren<HeadingOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, HeadingOwnProps>;
9
+ export type HeadingProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<HeadingOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, HeadingOwnProps>;
10
10
  declare const defaultElement = "div";
11
11
  export declare function Heading<E extends React.ElementType = typeof defaultElement>(props: HeadingProps<E>): React.JSX.Element;
12
12
  export declare namespace Heading {
@@ -5,13 +5,14 @@ export type TextAlign = 'left' | 'right' | 'center' | 'justify';
5
5
  export type TextOwnProps = {
6
6
  align?: TextAlign | BreakpointsConfig<TextAlign>;
7
7
  className?: string;
8
- color?: 'meta' | 'muted' | 'emphasis' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger';
8
+ color?: 'muted' | 'emphasis' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger';
9
9
  column?: number | BreakpointsConfig<number>;
10
10
  decoration?: 'none';
11
11
  dropcap?: boolean;
12
12
  italic?: boolean;
13
+ kind?: 'meta' | 'lead' | 'base';
13
14
  prefixCls?: string;
14
- size?: 'default' | 'xsmall' | 'small' | 'medium' | 'large' | 'lead';
15
+ size?: 'xsmall' | 'small' | 'large';
15
16
  transform?: 'capitalize' | 'uppercase' | 'lowercase';
16
17
  verticalAlign?: 'top' | 'middle' | 'bottom' | 'baseline';
17
18
  weight?: 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'lighter' | 'bolder';
@@ -35,7 +35,7 @@ const utils_1 = require("../../utils");
35
35
  const defaultElement = 'span';
36
36
  function Text(props) {
37
37
  const config = (0, ConfigProvider_1.useConfig)();
38
- const { align, className, color, column, decoration, dropcap, italic, prefixCls = config.prefixCls, size, transform, verticalAlign, weight, wrap, ...restProps } = props;
38
+ const { align, className, color, column, decoration, dropcap, italic, kind, prefixCls = config.prefixCls, size, transform, verticalAlign, weight, wrap, ...restProps } = props;
39
39
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'text'), [config, prefixCls]);
40
40
  const alignClassName = React.useMemo(() => (typeof align === 'string'
41
41
  ? `${rootCls}-${align}`
@@ -46,6 +46,7 @@ function Text(props) {
46
46
  return (React.createElement(Component_1.Component, { className: (0, classnames_1.default)(columnClassName, alignClassName, {
47
47
  [`${prefixCls || config.prefixCls}-dropcap`]: dropcap,
48
48
  [`${rootCls}-${color}`]: color !== undefined,
49
+ [`${rootCls}-${kind}`]: kind !== undefined,
49
50
  [`${rootCls}-${size}`]: size !== undefined,
50
51
  [`${rootCls}-${transform}`]: transform !== undefined,
51
52
  [`${rootCls}-${verticalAlign}`]: verticalAlign !== undefined,
@@ -0,0 +1,315 @@
1
+ // Name: Text
2
+ // Description: Utilities for text
3
+ //
4
+ // Component: `uk-text-*`
5
+ //
6
+ // ========================================================================
7
+
8
+
9
+ // Variables
10
+ // ========================================================================
11
+
12
+ @import '../../styles/variables.scss';
13
+
14
+
15
+ /* ========================================================================
16
+ Component: Text
17
+ ========================================================================== */
18
+
19
+
20
+ /* Style modifiers
21
+ ========================================================================== */
22
+
23
+ .uk-text-lead {
24
+ color: var(--text-lead-color);
25
+ font-size: var(--text-lead-font-size);
26
+ line-height: var(--text-lead-line-height);
27
+ @if mixin-exists(hook-text-lead) {
28
+ @include hook-text-lead;
29
+ }
30
+ }
31
+
32
+ .uk-text-meta {
33
+ color: var(--text-meta-color);
34
+ font-size: var(--text-meta-font-size);
35
+ line-height: var(--text-meta-line-height);
36
+ @if mixin-exists(hook-text-meta) {
37
+ @include hook-text-meta;
38
+ }
39
+ }
40
+
41
+ .uk-text-base {
42
+ color: var(--text-base-font-size);
43
+ font-size: var(--text-base-font-size);
44
+ line-height: var(--text-base-line-height);
45
+ @if mixin-exists(hook-text-base) {
46
+ @include hook-text-base;
47
+ }
48
+ }
49
+
50
+
51
+ /* Size modifiers
52
+ ========================================================================== */
53
+
54
+ .uk-text-xsmall {
55
+ font-size: var(--text-xsmall-font-size);
56
+ line-height: var(--text-xsmall-line-height);
57
+ @if mixin-exists(hook-text-xsmall) {
58
+ @include hook-text-xsmall;
59
+ }
60
+ }
61
+
62
+ .uk-text-small {
63
+ font-size: var(--text-small-font-size);
64
+ line-height: var(--text-small-line-height);
65
+ @if mixin-exists(hook-text-small) {
66
+ @include hook-text-small;
67
+ }
68
+ }
69
+
70
+ .uk-text-large {
71
+ font-size: var(--text-large-font-size);
72
+ line-height: var(--text-large-line-height);
73
+ @if mixin-exists(hook-text-large) {
74
+ @include hook-text-large;
75
+ }
76
+ }
77
+
78
+ .uk-text-default {
79
+ font-size: var(--global-font-size);
80
+ line-height: var(--global-line-height);
81
+ }
82
+
83
+
84
+ /* Weight modifier
85
+ ========================================================================== */
86
+
87
+ .uk-text-thin { font-weight: 100; }
88
+ .uk-text-light { font-weight: 300; }
89
+ .uk-text-normal { font-weight: 400; }
90
+ .uk-text-medium { font-weight: 500; }
91
+ .uk-text-semibold { font-weight: 600; }
92
+ .uk-text-bold { font-weight: 700; }
93
+
94
+ .uk-text-lighter { font-weight: lighter; }
95
+ .uk-text-bolder { font-weight: bolder; }
96
+
97
+
98
+ /* Style modifier
99
+ ========================================================================== */
100
+
101
+ .uk-text-italic { font-style: italic; }
102
+
103
+
104
+ /* Transform modifier
105
+ ========================================================================== */
106
+
107
+ .uk-text-capitalize { text-transform: capitalize !important; }
108
+ .uk-text-uppercase { text-transform: uppercase !important; }
109
+ .uk-text-lowercase { text-transform: lowercase !important; }
110
+
111
+
112
+ /* Decoration modifier
113
+ ========================================================================== */
114
+
115
+ .uk-text-decoration-none { text-decoration: none !important; }
116
+
117
+
118
+ /* Color modifiers
119
+ ========================================================================== */
120
+
121
+ .uk-text-muted { color: var(--text-muted-color) !important; }
122
+ .uk-text-emphasis { color: var(--text-emphasis-color) !important; }
123
+ .uk-text-primary { color: var(--text-primary-color) !important; }
124
+ .uk-text-secondary { color: var(--text-secondary-color) !important; }
125
+ .uk-text-success { color: var(--text-success-color) !important; }
126
+ .uk-text-warning { color: var(--text-warning-color) !important; }
127
+ .uk-text-danger { color: var(--text-danger-color) !important; }
128
+
129
+
130
+ /* Background modifier
131
+ ========================================================================== */
132
+
133
+ /*
134
+ * 1. The background clips to the foreground text. Works in Chrome, Firefox, Safari, Edge and Opera
135
+ * Default color is set to transparent
136
+ * 2. Container fits the text
137
+ * 3. Fallback color for IE11
138
+ */
139
+
140
+ .uk-text-background {
141
+ /* 1 */
142
+ -webkit-background-clip: text;
143
+
144
+ /* 3 */
145
+ color: var(--text-background-color) !important;
146
+
147
+ /* 2 */
148
+ display: inline-block;
149
+ }
150
+
151
+ @supports (-webkit-background-clip: text) {
152
+ .uk-text-background {
153
+ background-color: var(--text-background-color);
154
+ color: transparent !important;
155
+ @if mixin-exists(hook-text-background) {
156
+ @include hook-text-background;
157
+ }
158
+ }
159
+ }
160
+
161
+
162
+ /* Alignment modifiers
163
+ ========================================================================== */
164
+
165
+ .uk-text-left { text-align: left !important; }
166
+ .uk-text-right { text-align: right !important; }
167
+ .uk-text-center { text-align: center !important; }
168
+ .uk-text-justify { text-align: justify !important; }
169
+
170
+ /* Phone landscape and bigger */
171
+ // noinspection Stylelint
172
+ @media (min-width: $breakpoint-small) {
173
+
174
+ .uk-text-left\@s { text-align: left !important; }
175
+ .uk-text-right\@s { text-align: right !important; }
176
+ .uk-text-center\@s { text-align: center !important; }
177
+
178
+ }
179
+
180
+ /* Tablet landscape and bigger */
181
+ // noinspection Stylelint
182
+ @media (min-width: $breakpoint-medium) {
183
+
184
+ .uk-text-left\@m { text-align: left !important; }
185
+ .uk-text-right\@m { text-align: right !important; }
186
+ .uk-text-center\@m { text-align: center !important; }
187
+
188
+ }
189
+
190
+ /* Desktop and bigger */
191
+ // noinspection Stylelint
192
+ @media (min-width: $breakpoint-large) {
193
+
194
+ .uk-text-left\@l { text-align: left !important; }
195
+ .uk-text-right\@l { text-align: right !important; }
196
+ .uk-text-center\@l { text-align: center !important; }
197
+
198
+ }
199
+
200
+ /* Large screen and bigger */
201
+ // noinspection Stylelint
202
+ @media (min-width: $breakpoint-xlarge) {
203
+
204
+ .uk-text-left\@xl { text-align: left !important; }
205
+ .uk-text-right\@xl { text-align: right !important; }
206
+ .uk-text-center\@xl { text-align: center !important; }
207
+
208
+ }
209
+
210
+ /*
211
+ * Vertical
212
+ */
213
+
214
+ .uk-text-top { vertical-align: top !important; }
215
+ .uk-text-middle { vertical-align: middle !important; }
216
+ .uk-text-bottom { vertical-align: bottom !important; }
217
+ .uk-text-baseline { vertical-align: baseline !important; }
218
+
219
+
220
+ /* Wrap modifiers
221
+ ========================================================================== */
222
+
223
+ /*
224
+ * Prevent text from wrapping onto multiple lines
225
+ */
226
+
227
+ .uk-text-nowrap { white-space: nowrap; }
228
+
229
+ /*
230
+ * 1. Make sure a max-width is set after which truncation can occur
231
+ * 2. Prevent text from wrapping onto multiple lines, and truncate with an ellipsis
232
+ * 3. Fix for table cells
233
+ */
234
+
235
+ .uk-text-truncate {
236
+ /* 1 */
237
+ max-width: 100%;
238
+
239
+ /* 2 */
240
+ overflow: hidden;
241
+ text-overflow: ellipsis;
242
+ white-space: nowrap;
243
+ }
244
+
245
+ /* 2 */
246
+ th.uk-text-truncate,
247
+ td.uk-text-truncate { max-width: 0; }
248
+
249
+
250
+ /*
251
+ * 1. Wrap long words onto the next line and break them if they are too long to fit
252
+ * 2. Legacy `word-wrap` as fallback for `overflow-wrap`
253
+ * 3. Fix `overflow-wrap` which doesn't work with table cells in Chrome, Opera, IE11 and Edge
254
+ * Must use `break-all` to support IE11 and Edge
255
+ * Note: Not using `hyphens: auto;` because it hyphenates text even if not needed
256
+ */
257
+
258
+ .uk-text-break {
259
+ /* 1 */
260
+ overflow-wrap: break-word;
261
+
262
+ /* 2 */
263
+ word-wrap: break-word;
264
+ }
265
+
266
+ /* 3 */
267
+ th.uk-text-break,
268
+ td.uk-text-break { word-break: break-all; }
269
+
270
+
271
+ // Hooks
272
+ // ========================================================================
273
+
274
+ @if mixin-exists(hook-text-misc) {
275
+ @include hook-text-misc;
276
+ }
277
+
278
+
279
+ // Vars
280
+ // ========================================================================
281
+
282
+ :root {
283
+ --text-base-font-size: var(--global-font-size);
284
+ --text-base-line-height: var(--global-line-height);
285
+ --text-base-color: var(--global-base-color);
286
+ --text-lead-font-size: var(--global-large-font-size);
287
+ --text-lead-line-height: #{$text-lead-line-height};
288
+ --text-lead-color: var(--global-emphasis-color);
289
+ --text-meta-font-size: var(--global-small-font-size);
290
+ --text-meta-line-height: #{$text-meta-line-height};
291
+ --text-meta-color: var(--global-muted-color);
292
+ --text-xsmall-font-size: var(--global-xsmall-font-size);
293
+ --text-xsmall-line-height: #{$text-xsmall-line-height};
294
+ --text-small-font-size: var(--global-small-font-size);
295
+ --text-small-line-height: #{$text-small-line-height};
296
+ --text-large-font-size: var(--global-large-font-size);
297
+ --text-large-line-height: #{$text-large-line-height};
298
+ --text-muted-color: var(--global-muted-color);
299
+ --text-emphasis-color: var(--global-emphasis-color);
300
+ --text-primary-color: var(--global-primary-background);
301
+ --text-secondary-color: var(--global-secondary-background);
302
+ --text-success-color: var(--global-success-background);
303
+ --text-warning-color: var(--global-warning-background);
304
+ --text-danger-color: var(--global-danger-background);
305
+ --text-background-color: var(--global-primary-background);
306
+
307
+ // Inverse
308
+ --inverse-text-lead-color: var(--inverse-global-color);
309
+ --inverse-text-meta-color: var(--inverse-global-muted-color);
310
+ --inverse-text-muted-color: var(--inverse-global-muted-color);
311
+ --inverse-text-emphasis-color: var(--inverse-global-emphasis-color);
312
+ --inverse-text-primary-color: var(--inverse-global-primary-background);
313
+ --inverse-text-secondary-color: var(--inverse-global-primary-background);
314
+ --inverse-text-tertiary-color: var(--inverse-global-primary-background);
315
+ }